mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-07 07:22:56 +00:00
Fix wallets appearing to still contain a removed ID (#37719)
This commit is contained in:
committed by
vuonojenmustaturska
parent
69cdd4f269
commit
b235fceca6
@@ -38,16 +38,20 @@
|
||||
|
||||
/obj/item/storage/wallet/Exited(atom/movable/AM)
|
||||
. = ..()
|
||||
refreshID()
|
||||
// The loc has not actually changed yet when this proc is called, so call
|
||||
// refreshID and have it ignore the outgoing atom.
|
||||
refreshID(AM)
|
||||
|
||||
/obj/item/storage/wallet/proc/refreshID()
|
||||
if(!(front_id in src))
|
||||
/obj/item/storage/wallet/proc/refreshID(atom/movable/removed)
|
||||
LAZYCLEARLIST(combined_access)
|
||||
if(!(front_id in src) || front_id == removed)
|
||||
front_id = null
|
||||
for(var/obj/item/card/id/I in contents)
|
||||
LAZYINITLIST(combined_access)
|
||||
LAZYCLEARLIST(combined_access)
|
||||
if(I == removed)
|
||||
continue
|
||||
if(!front_id)
|
||||
front_id = I
|
||||
LAZYINITLIST(combined_access)
|
||||
combined_access |= I.access
|
||||
update_icon()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user