Merge pull request #6686 from Citadel-Station-13/upstream-merge-37719
[MIRROR] [s] Fix wallets acting as though they still contain removed IDs
This commit is contained in:
@@ -38,16 +38,20 @@
|
|||||||
|
|
||||||
/obj/item/storage/wallet/Exited(atom/movable/AM)
|
/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()
|
/obj/item/storage/wallet/proc/refreshID(atom/movable/removed)
|
||||||
if(!(front_id in src))
|
LAZYCLEARLIST(combined_access)
|
||||||
|
if(!(front_id in src) || front_id == removed)
|
||||||
front_id = null
|
front_id = null
|
||||||
for(var/obj/item/card/id/I in contents)
|
for(var/obj/item/card/id/I in contents)
|
||||||
LAZYINITLIST(combined_access)
|
if(I == removed)
|
||||||
LAZYCLEARLIST(combined_access)
|
continue
|
||||||
if(!front_id)
|
if(!front_id)
|
||||||
front_id = I
|
front_id = I
|
||||||
|
LAZYINITLIST(combined_access)
|
||||||
combined_access |= I.access
|
combined_access |= I.access
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user