mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge pull request #1446 from Fox-McCloud/pools-and-fires
Pools Hotspots
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user