mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[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:
committed by
GitHub
parent
4e2361f8df
commit
fff9f1c3e7
@@ -269,7 +269,10 @@
|
|||||||
if(!uses_charge)
|
if(!uses_charge)
|
||||||
amount -= used
|
amount -= used
|
||||||
if (amount <= 0)
|
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
|
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()
|
update_icon()
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user