mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Reagent Garbage Collection Edge Case
This commit is contained in:
@@ -104,6 +104,7 @@
|
||||
if(prob(addiction_removal_chance))
|
||||
to_chat(occupant, "<span class='notice'>You no longer feel reliant on [R.name]!</span>")
|
||||
occupant.reagents.addiction_list.Remove(R)
|
||||
qdel(R)
|
||||
|
||||
for(var/mob/M as mob in src) // makes sure that simple mobs don't get stuck inside a sleeper when they resist out of occupant's grasp
|
||||
if(M == occupant)
|
||||
|
||||
@@ -292,6 +292,8 @@ var/const/INGEST = 2
|
||||
if(prob(20) && (world.timeofday > (R.last_addiction_dose + ADDICTION_TIME))) //Each addiction lasts 8 minutes before it can end
|
||||
to_chat(M, "<span class='notice'>You no longer feel reliant on [R.name]!</span>")
|
||||
addiction_list.Remove(R)
|
||||
qdel(R)
|
||||
|
||||
if(update_flags & STATUS_UPDATE_HEALTH)
|
||||
M.updatehealth("reagent metabolism")
|
||||
else if(update_flags & STATUS_UPDATE_STAT)
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
/datum/reagent/Destroy()
|
||||
. = ..()
|
||||
holder = null
|
||||
if(islist(data))
|
||||
data.Cut()
|
||||
data = null
|
||||
|
||||
/datum/reagent/proc/reaction_temperature(exposed_temperature, exposed_volume) //By default we do nothing.
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user