From 1bfa6964cf0d2aec1c1a29ed4ce7b71fd83014f3 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Sat, 17 Jan 2026 14:46:51 +0100 Subject: [PATCH] Fix for ID cards sometimes not functioning within wallets/PDAs (#94896) ## About The Pull Request The signals weren't registered if the PDA/wallet were already equipped in the ID slot. ## Changelog :cl: fix: Fixed ID cards sometimes not functioning within wallets/PDAs /:cl: --- code/game/objects/items/cards_ids.dm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index a1d173dadfe..dae22df48eb 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -176,9 +176,15 @@ if (ismob(old_loc.loc)) UnregisterSignal(old_loc.loc, list(COMSIG_MOVABLE_POINTED, COMSIG_MOB_RETRIEVE_ACCESS)) . = ..() - if (isitem(loc)) - RegisterSignal(loc, COMSIG_ITEM_EQUIPPED, PROC_REF(on_loc_equipped)) - RegisterSignal(loc, COMSIG_ITEM_DROPPED, PROC_REF(on_loc_dropped)) + if (!isitem(loc)) + return + RegisterSignal(loc, COMSIG_ITEM_EQUIPPED, PROC_REF(on_loc_equipped)) + RegisterSignal(loc, COMSIG_ITEM_DROPPED, PROC_REF(on_loc_dropped)) + if (ismob(loc.loc)) + var/mob/wearer = loc.loc + // Equip chain shenanigans + UnregisterSignal(wearer, list(COMSIG_MOVABLE_POINTED, COMSIG_MOB_RETRIEVE_ACCESS)) + on_loc_equipped(loc, wearer, wearer.get_slot_by_item(loc)) /obj/item/card/id/equipped(mob/user, slot) . = ..()