From 58b01cf856a6d414c4a212b8ea6356ebe496d5a0 Mon Sep 17 00:00:00 2001 From: Batrachophreno Date: Mon, 11 May 2026 14:12:58 -0400 Subject: [PATCH] Various fire bugfixes (#22431) Fixes https://github.com/Aurorastation/Aurora.3/issues/22384. Fixes https://github.com/Aurorastation/Aurora.3/issues/22389. changes: - bugfix: "Fixes turf fires not spreading." - bugfix: "Fixes atmos fires not consistently igniting." - bugfix: "Fixes dead mobs burning forever." - bugfix: "Fixes fire_act() runtimes for multiple objects." --- code/ZAS/Fire.dm | 2 ++ code/__DEFINES/atmos.dm | 3 --- code/game/machinery/atmoalter/canister.dm | 5 +++-- code/game/objects/effects/fire/fire.dm | 2 +- code/game/objects/items/toys.dm | 4 ++-- code/modules/mob/living/living_defense.dm | 11 ++++++++--- code/modules/reagents/reagent_dispenser.dm | 4 ++-- html/changelogs/Bat-TurfFireFix.yml | 7 +++++++ 8 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 html/changelogs/Bat-TurfFireFix.yml diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index d25630c93e5..11961fd0c1d 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -48,10 +48,12 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin CHECK_COMBUSTIBLE(is_cmb, air_contents) if(liquid && is_cmb) IgniteTurf(liquid.amount * 10) + igniting = TRUE QDEL_NULL(liquid) var/obj/effect/decal/cleanable/napalm/napalm = locate() in src if(napalm) + igniting = TRUE napalm.Ignite() if(is_cmb) diff --git a/code/__DEFINES/atmos.dm b/code/__DEFINES/atmos.dm index d402237efec..252717c05b2 100644 --- a/code/__DEFINES/atmos.dm +++ b/code/__DEFINES/atmos.dm @@ -169,9 +169,6 @@ GLOBAL_LIST_INIT(pipe_colors, list( else if(!(cmb & 2) && gas_data.flags[g] & XGM_GAS_FUEL && QUANTIZE(xgm.gas[g] * GLOB.vsc.fire_consuption_rate) >= 0.005) { \ cmb |= (1 << 1); \ } \ - else if(cmb & 3) { \ - break; \ - } \ } \ if(cmb == 1) { \ cmb = 0; \ diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 1a704f7c3bb..10b9ef446cf 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -351,8 +351,9 @@ update_flag /obj/machinery/portable_atmospherics/canister/add_damage(damage, damage_flags, damage_type, armor_penetration, obj/weapon) . = ..() if (health <= maxhealth * 0.1) - var/atom/location = loc - location.assume_air(air_contents) + var/turf/simulated/floor/location = loc + if(air_contents) + location?.assume_air(air_contents) destroyed = TRUE obj_flags &= ~OBJ_FLAG_SIGNALER diff --git a/code/game/objects/effects/fire/fire.dm b/code/game/objects/effects/fire/fire.dm index 2a7839c513f..075508396ac 100644 --- a/code/game/objects/effects/fire/fire.dm +++ b/code/game/objects/effects/fire/fire.dm @@ -154,7 +154,7 @@ var/turf/simulated/other_tile = get_step(T, direction) // Exit the loop early if the checked tile is not a valid direction for the fire to spread. - if(!istype(other_tile) || (T.open_directions & direction) || other_tile.hotspot || other_tile.turf_fire) //Grab all valid bordering tiles + if(!istype(other_tile) || !(T.open_directions && direction) || other_tile.hotspot || other_tile.turf_fire) //Grab all valid bordering tiles continue other_tile.hotspot_expose(effective_temperature) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 1e9ff3aa271..bc8056343e1 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -178,10 +178,10 @@ burst() -/obj/item/toy/balloon/fire_act(temperature, volume) +/obj/item/toy/balloon/fire_act(exposed_temperature, exposed_volume) . = ..() - if(temperature > T0C+100) + if(exposed_temperature > T0C+100) burst() return diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index fe5ed952b8a..47edd11ff1d 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -442,14 +442,19 @@ fire_stacks = min(0, ++fire_stacks) //If we've doused ourselves in water to avoid fire, dry off slowly if(!on_fire) - return 1 + return TRUE + + // If we're dead, slowly put out the fire. + if(((stat & DEAD) || (status_flags & FAKEDEATH)) && fire_stacks > 0 ) + fire_stacks-- + else if(fire_stacks <= 0) ExtinguishMobCompletely() //Fire's been put out. - return 1 + return TRUE if(environment.gas[GAS_OXYGEN] < 1) ExtinguishMobCompletely() //If there's no oxygen in the tile we're on, put out the fire - return 1 + return TRUE var/turf/location = get_turf(src) location.hotspot_expose(fire_burn_temperature(environment), 50, 1) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 016c9a8ca40..7ca35691a6f 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -225,10 +225,10 @@ ..() -/obj/structure/reagent_dispensers/fueltank/fire_act(temperature, volume) +/obj/structure/reagent_dispensers/fueltank/fire_act(exposed_temperature, exposed_volume) if (is_leaking) ex_act(2.0) - else if (temperature > T0C+500) + else if (exposed_temperature > T0C+500) ex_act(2.0) return ..() diff --git a/html/changelogs/Bat-TurfFireFix.yml b/html/changelogs/Bat-TurfFireFix.yml new file mode 100644 index 00000000000..70c742c3f72 --- /dev/null +++ b/html/changelogs/Bat-TurfFireFix.yml @@ -0,0 +1,7 @@ +author: Batrachophrenoboocosmomachia +delete-after: True +changes: + - bugfix: "Fixes turf fires not spreading." + - bugfix: "Fixes atmos fires not consistently igniting." + - bugfix: "Fixes dead mobs burning forever." + - bugfix: "Fixes fire_act() runtimes for multiple objects."