Refactored fire_act (#19158)

Refactored fire_act() to be in line with TG version, removed useless
parameter, added signal, made non sleepable and forced to call parent.
Added atom_act.dm file for the various *_act procs.
This commit is contained in:
Fluffy
2024-05-26 20:55:36 +00:00
committed by GitHub
parent 263cce7f1e
commit db5b1ee6b2
36 changed files with 171 additions and 46 deletions
+3 -1
View File
@@ -69,7 +69,9 @@
for(var/_R in reagents.reagent_volumes)
F.reagents.add_reagent(_R, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams
/obj/effect/effect/foam/fire_act(exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams
. = ..()
if(!metal && prob(max(0, exposed_temperature - 475)))
flick("[icon_state]-disolve", src)
+3 -1
View File
@@ -46,7 +46,9 @@
if(health <= 0)
qdel(src)
/obj/effect/spider/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/effect/spider/fire_act(exposed_temperature, exposed_volume)
. = ..()
if(exposed_temperature > 300 + T0C)
health -= 5
healthcheck()
@@ -114,7 +114,7 @@
//Step two - washing..... it's actually in washing machine code.
//Step three - drying
/obj/item/stack/material/animalhide/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/item/stack/material/animalhide/wetleather/fire_act(exposed_temperature, exposed_volume)
..()
if(exposed_temperature >= drying_threshold_temperature)
wetness--
+3 -1
View File
@@ -170,7 +170,9 @@
/obj/item/toy/balloon/bullet_act()
burst()
/obj/item/toy/balloon/fire_act(datum/gas_mixture/air, temperature, volume)
/obj/item/toy/balloon/fire_act(temperature, volume)
. = ..()
if(temperature > T0C+100)
burst()
return
@@ -57,6 +57,8 @@
if(!active)
prime()
/obj/item/grenade/dynamite/fire_act()
/obj/item/grenade/dynamite/fire_act(exposed_temperature, exposed_volume)
. = ..()
if(!active)
prime()
+3 -1
View File
@@ -944,7 +944,9 @@
to_chat(user, SPAN_WARNING("The cell isn't charged!"))
return TRUE
/obj/item/steelwool/fire_act()
/obj/item/steelwool/fire_act(exposed_temperature, exposed_volume)
. = ..()
ignite()
/obj/item/steelwool/proc/ignite(var/L, mob/user)
@@ -132,7 +132,9 @@
health -= maxHealth / 5
healthcheck()
/obj/structure/gore/tendrils/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/gore/tendrils/fire_act(exposed_temperature, exposed_volume)
. = ..()
if(exposed_temperature > 300 + T0C)
health -= 5
healthcheck()
+1 -1
View File
@@ -274,7 +274,7 @@
return 0
return 0
/obj/structure/grille/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/grille/fire_act(exposed_temperature, exposed_volume)
if(!destroyed)
if(exposed_temperature > T0C + 1500)
health -= 1
+3 -1
View File
@@ -15,7 +15,9 @@
var/health = 100
var/maxhealth = 100
/obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/simple_door/fire_act(exposed_temperature, exposed_volume)
. = ..()
TemperatureAct(exposed_temperature)
/obj/structure/simple_door/proc/TemperatureAct(temperature)
@@ -323,7 +323,9 @@
anchored = FALSE
density = FALSE
/obj/structure/flora/log_bench/fire_act()
/obj/structure/flora/log_bench/fire_act(exposed_temperature, exposed_volume)
. = ..()
for(var/obj/structure/bonfire/B in get_turf(src))
if(B.on_fire)
B.fuel = min(B.max_fuel, B.fuel + 300)
+1 -1
View File
@@ -409,7 +409,7 @@
return 1
return 0
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/window/fire_act(exposed_temperature, exposed_volume)
if(exposed_temperature > maximal_heat)
hit(damage_per_fire_tick, 0)
..()