(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.
/🆑
This commit is contained in:
Pinta
2023-04-06 00:23:23 -04:00
committed by GitHub
parent 561dc6e4b1
commit 4bca7fc729
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)