mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 01:22:24 +00:00
Port of @PsiOmegaDelta's Baystation12/Baystation12#16820
Ports tg's garbage collector subsystem and Destroy() returning qdel hints.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
chemical_reagents_list[D.id] = D
|
||||
|
||||
/datum/reagents/Destroy()
|
||||
..()
|
||||
. = ..()
|
||||
if(chemistryProcess)
|
||||
chemistryProcess.active_holders -= src
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
var/amount_to_take = max(0,min(stack.amount,round(remaining_volume/REAGENTS_PER_SHEET)))
|
||||
if(amount_to_take)
|
||||
stack.use(amount_to_take)
|
||||
if(deleted(stack))
|
||||
if(QDELETED(stack))
|
||||
holdingitems -= stack
|
||||
beaker.reagents.add_reagent(sheet_reagents[stack.type], (amount_to_take*REAGENTS_PER_SHEET))
|
||||
continue
|
||||
|
||||
@@ -118,8 +118,8 @@
|
||||
return null
|
||||
|
||||
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
|
||||
..()
|
||||
holder = null
|
||||
. = ..()
|
||||
|
||||
/* DEPRECATED - TODO: REMOVE EVERYWHERE */
|
||||
|
||||
|
||||
@@ -210,8 +210,8 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/Destroy()
|
||||
if(contents)
|
||||
for(var/atom/movable/something in contents)
|
||||
something.loc = get_turf(src)
|
||||
..()
|
||||
something.dropInto(loc)
|
||||
. = ..()
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// FOOD END
|
||||
|
||||
Reference in New Issue
Block a user