diff --git a/code/LINDA/LINDA_fire.dm b/code/LINDA/LINDA_fire.dm index bdfa2971881..adb59f7f0fe 100644 --- a/code/LINDA/LINDA_fire.dm +++ b/code/LINDA/LINDA_fire.dm @@ -30,7 +30,7 @@ if(air_contents.oxygen < 0.5 || air_contents.toxins < 0.5) return 0 - active_hotspot = new(src) + active_hotspot = PoolOrNew(/obj/effect/hotspot, src) active_hotspot.temperature = exposed_temperature active_hotspot.volume = exposed_volume @@ -98,18 +98,18 @@ var/turf/simulated/location = loc if(!istype(location)) - Kill() + qdel(src) return if(location.excited_group) location.excited_group.reset_cooldowns() if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1)) - Kill() + qdel(src) return if(!(location.air) || location.air.toxins < 0.5 || location.air.oxygen < 0.5) - Kill() + qdel(src) return perform_exposure() @@ -151,19 +151,16 @@ // Garbage collect itself by nulling reference to it -/obj/effect/hotspot/proc/Kill() +/obj/effect/hotspot/Destroy() air_master.hotspots -= src DestroyTurf() - qdel(src) - -/obj/effect/hotspot/Destroy() set_light(0) if(istype(loc, /turf/simulated)) var/turf/simulated/T = loc if(T.active_hotspot == src) T.active_hotspot = null - loc = null - return ..() + ..() + return QDEL_HINT_PUTINPOOL /obj/effect/hotspot/proc/DestroyTurf() diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 6702399aad3..c62976ec171 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -262,11 +262,6 @@ operating = 0 air_update_turf(1) update_freelok_sight() - - //I shall not add a check every x ticks if a door has closed over some fire. - var/obj/effect/hotspot/fire = locate() in loc - if(fire) - qdel(fire) return /obj/machinery/door/proc/crush() diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 60cbc8daafd..f6167259e0b 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -124,7 +124,7 @@ var/atom/movable/AM = atom_movable if(AM) AM.ex_act(dist) if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density) - new/obj/effect/hotspot(T) //Mostly for ambience! + PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience! if(dist > 0) T.ex_act(dist) diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index ff76e6259d3..7dd5365e20a 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -357,7 +357,7 @@ G.temperature = 2 T.air_update_turf() for(var/obj/effect/hotspot/H in T) - H.Kill() + qdel(H) if(G.toxins) G.nitrogen += (G.toxins) G.toxins = 0 diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 11fb7facc5f..63e1d384a4d 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -104,7 +104,7 @@ /obj/item/projectile/bullet/incendiary/shell/Move() ..() var/turf/location = get_turf(src) - new/obj/effect/hotspot(location) + PoolOrNew(/obj/effect/hotspot, location) location.hotspot_expose(700, 50, 1) /obj/item/projectile/bullet/incendiary/shell/dragonsbreath diff --git a/code/modules/reagents/newchem/drugs.dm b/code/modules/reagents/newchem/drugs.dm index 82d945c5403..3ace84f1a5c 100644 --- a/code/modules/reagents/newchem/drugs.dm +++ b/code/modules/reagents/newchem/drugs.dm @@ -90,7 +90,7 @@ /datum/chemical_reaction/crank/on_reaction(var/datum/reagents/holder, var/created_volume) var/turf/T = get_turf(holder.my_atom) for(var/turf/turf in range(1,T)) - new /obj/effect/hotspot(turf) + PoolOrNew(/obj/effect/hotspot, turf) explosion(T,0,0,2) return diff --git a/code/modules/reagents/newchem/pyro.dm b/code/modules/reagents/newchem/pyro.dm index 089a7088f66..2f245243bb5 100644 --- a/code/modules/reagents/newchem/pyro.dm +++ b/code/modules/reagents/newchem/pyro.dm @@ -46,7 +46,7 @@ /datum/chemical_reaction/clf3/on_reaction(var/datum/reagents/holder, var/created_volume) var/turf/T = get_turf(holder.my_atom) for(var/turf/turf in range(1,T)) - new /obj/effect/hotspot(turf) + PoolOrNew(/obj/effect/hotspot, turf) return /datum/reagent/clf3/reaction_turf(var/turf/simulated/T, var/volume) @@ -59,13 +59,13 @@ if(prob(volume/10)) F.make_plating() if(istype(F, /turf/simulated/floor/)) - new /obj/effect/hotspot(F) + PoolOrNew(/obj/effect/hotspot, F) if(istype(T, /turf/simulated/wall/)) var/turf/simulated/wall/W = T if(prob(volume/10)) W.ChangeTurf(/turf/simulated/floor) if(istype(T, /turf/simulated/shuttle/)) - new /obj/effect/hotspot(T) + PoolOrNew(/obj/effect/hotspot, T) return /datum/reagent/clf3/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) @@ -429,7 +429,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit return var/turf/simulated/T = get_turf(holder.my_atom) for(var/turf/simulated/turf in range(created_volume/10,T)) - new /obj/effect/hotspot(turf) + PoolOrNew(/obj/effect/hotspot, turf) return /datum/reagent/phlogiston/on_mob_life(var/mob/living/M as mob) @@ -593,7 +593,7 @@ datum/reagent/firefighting_foam/reaction_obj(var/obj/O, var/volume) lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0) lowertemp.react() T.assume_air(lowertemp) - del(hotspot) + qdel(hotspot) return /datum/chemical_reaction/clf3_firefighting