[MIRROR] Using up a stack in a bag no longer leaves a lingering icon on the hud (#11310)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-08-04 16:29:03 -07:00
committed by GitHub
parent 4e2361f8df
commit fff9f1c3e7

View File

@@ -269,7 +269,10 @@
if(!uses_charge)
amount -= used
if (amount <= 0)
amount = 0 // stop amount going negative ideally
// Tell container that we used up a stack
if(istype( loc, /obj/item/storage))
var/obj/item/storage/holder = loc
holder.remove_from_storage( src, null)
qdel(src) //should be safe to qdel immediately since if someone is still using this stack it will persist for a little while longer
update_icon()
return 1