mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
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 🆑 fix: Fixed ID cards sometimes not functioning within wallets/PDAs /🆑
This commit is contained in:
@@ -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)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user