Fixes chameleon cards not updating sechud icons (#88899)

## About The Pull Request

Closes #88510
Also fixed incorrect icon positioning on Big Brother's trim (Human AI)
and medieval punpun icon flickering

## Changelog
🆑
fix: Fixed chameleon cards not updating sechud icons
image: Fixed human AI's and medieval punpun's ID trims
/🆑
This commit is contained in:
SmArtKar
2025-01-11 18:37:22 +01:00
committed by GitHub
parent a3742ce21b
commit 175e8bd7d7
3 changed files with 23 additions and 8 deletions
+9 -1
View File
@@ -452,9 +452,13 @@ SUBSYSTEM_DEF(id_access)
id_card.big_pointer = trim.big_pointer
id_card.pointer_color = trim.pointer_color
if(!check_forged || !id_card.forged)
if (!check_forged || !id_card.forged)
id_card.assignment = trim.assignment
if (ishuman(id_card.loc))
var/mob/living/carbon/human/owner = id_card.loc
owner.sec_hud_set_ID()
// We'll let the chameleon action update the card's label as necessary instead of doing it here.
/**
@@ -474,6 +478,10 @@ SUBSYSTEM_DEF(id_access)
id_card.big_pointer = id_card.trim.big_pointer
id_card.pointer_color = id_card.trim.pointer_color
if (ishuman(id_card.loc))
var/mob/living/carbon/human/owner = id_card.loc
owner.sec_hud_set_ID()
/**
* Adds the accesses associated with a trim to an ID card.
*
+14 -7
View File
@@ -1762,14 +1762,21 @@
to_chat(user, span_notice("You successfully forge the ID card."))
user.log_message("forged \the [initial(name)] with name \"[registered_name]\", occupation \"[assignment]\" and trim \"[trim?.assignment]\".", LOG_GAME)
if(!registered_account && ishuman(user))
var/mob/living/carbon/human/accountowner = user
if(!ishuman(user))
return
var/datum/bank_account/account = SSeconomy.bank_accounts_by_id["[accountowner.account_id]"]
if(account)
account.bank_cards += src
registered_account = account
to_chat(user, span_notice("Your account number has been automatically assigned."))
var/mob/living/carbon/human/owner = user
if (!selected_trim_path) // Ensure that even without a trim update, we update user's sechud
owner.sec_hud_set_ID()
if (registered_account)
return
var/datum/bank_account/account = SSeconomy.bank_accounts_by_id["[owner.account_id]"]
if(account)
account.bank_cards += src
registered_account = account
to_chat(user, span_notice("Your account number has been automatically assigned."))
/obj/item/card/id/advanced/chameleon/add_item_context(obj/item/source, list/context, atom/target, mob/living/user,)
. = ..()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB