[MIRROR] (Fix) The crew manifest now properly updates after ID modifications. [MDB IGNORE] (#20370)

* (Fix) The crew manifest now properly updates after ID modifications. (#74518)

## About The Pull Request
This PR makes it so that the access modification program now updates the
crew manifest once the inserted ID is ejected. Additionally, when the ID
trim is changed, the manifest is updated.
## Why It's Good For The Game
Demoted heads would still show up on the manifest as their job
pre-demotion, this fixes that.
## Changelog
🆑
fix: The crew manifest now properly updates after ID modifications.
/🆑

* (Fix) The crew manifest now properly updates after ID modifications.

---------

Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-04-07 01:11:00 +02:00
committed by GitHub
parent 041e35e0ac
commit 9b01e0528c
4 changed files with 22 additions and 12 deletions
@@ -22,6 +22,8 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
var/obj/item/stock_parts/cell/internal_cell = /obj/item/stock_parts/cell
///A pAI currently loaded into the modular computer.
var/obj/item/pai_card/inserted_pai
///Does the console update the crew manifest when the ID is removed?
var/crew_manifest_update = FALSE
///The amount of storage space the computer starts with.
var/max_capacity = 128
@@ -278,6 +280,9 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
if(!computer_id_slot)
return ..()
if(crew_manifest_update)
GLOB.manifest.modify(computer_id_slot.registered_name, computer_id_slot.assignment, computer_id_slot.get_trim_assignment())
if(user)
if(!issilicon(user) && in_range(src, user))
user.put_in_hands(computer_id_slot)