|
237 | 237 | affecting_turf = T |
238 | 238 | affecting_turf.flammability = -10 // set the turf to be non-flammable while the foam is covering it |
239 | 239 | //Remove_element(/datum/element/atmos_sensitive) |
| 240 | + var/static/list/loc_connections = list( |
| 241 | + COMSIG_TURF_HOTSPOT_EXPOSE = PROC_REF(on_hotspot_expose), |
| 242 | + COMSIG_TURF_IGNITED = PROC_REF(on_turf_ignite), |
| 243 | + ) |
| 244 | + AddElement(/datum/element/connect_loc, loc_connections) |
| 245 | + |
| 246 | +/obj/effect/particle_effect/fluid/foam/firefighting/proc/on_hotspot_expose() |
| 247 | + return SUPPRESS_FIRE |
| 248 | + |
| 249 | +/obj/effect/particle_effect/fluid/foam/firefighting/proc/on_turf_ignite() |
| 250 | + return SUPPRESS_FIRE |
240 | 251 |
|
241 | 252 | /obj/effect/particle_effect/fluid/foam/firefighting/Destroy() |
242 | 253 | if(affecting_turf && !QDELETED(affecting_turf)) |
243 | 254 | affecting_turf.flammability = initial(affecting_turf.flammability) |
244 | 255 | return ..() |
245 | 256 |
|
246 | 257 | /obj/effect/particle_effect/fluid/foam/firefighting/process() |
247 | | - ..() |
| 258 | + . = ..() |
248 | 259 |
|
249 | 260 | var/turf/open/location = loc |
250 | 261 | if(!istype(location)) |
251 | 262 | return |
252 | 263 |
|
253 | | - var/obj/effect/hotspot/hotspot = location.active_hotspot |
254 | | - var/obj/effect/abstract/turf_fire/turf_fire = location.turf_fire |
255 | | - if(!((hotspot||turf_fire) && location.air)) |
256 | | - return |
257 | | - |
258 | | - if(hotspot) |
259 | | - QDEL_NULL(hotspot) |
260 | | - if(turf_fire) |
261 | | - QDEL_NULL(turf_fire) |
262 | | - |
263 | 264 | var/datum/gas_mixture/air = location.air |
264 | 265 | var/scrub_amt = min(30, air.get_moles(GAS_PLASMA)) //Absorb some plasma |
265 | 266 | air.adjust_moles(GAS_PLASMA, -scrub_amt) |
266 | 267 | absorbed_plasma += scrub_amt |
267 | 268 |
|
268 | | - if (air.return_temperature() > T20C) |
269 | | - air.set_temperature(max(air.return_temperature() / 2, T20C)) |
| 269 | + location.extinguish_turf() |
270 | 270 |
|
271 | 271 | /obj/effect/particle_effect/fluid/foam/firefighting/make_result() |
272 | 272 | if(!absorbed_plasma) // don't bother if it didn't scrub any plasma |
|
0 commit comments