Skip to content

Commit 7c9319c

Browse files
authored
Bookcases Burning (#36902)
1 parent d07db0d commit 7c9319c

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

code/ZAS/Fire.dm

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
367367
if(check_fire_protection())
368368
return 0
369369

370-
if(!istype(loc, /turf)) //worn or held items don't ignite (for now >:^) )
370+
if(!isturf(loc)) //worn or held items don't ignite (for now >:^) )
371371
return 0
372372

373373
if(!flammable)
@@ -389,8 +389,7 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
389389
return 1
390390

391391
/atom/movable/ignite()
392-
..()
393-
if(!firelightdummy)
392+
if(..() && !firelightdummy)
394393
firelightdummy = new (src)
395394

396395
/atom/proc/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -607,15 +606,22 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
607606
QDEL_NULL(firelightdummy)
608607
qdel(src)
609608

609+
610+
/obj/effect/fire/burnSolidFuel()
611+
return 0
612+
613+
/obj/effect/fire/burnLiquidFuel()
614+
return 0
615+
610616
/obj/effect/fire/process()
611617
if(timestopped)
612618
return 0
613619
. = 1
614620

615621
//Fires shouldn't spawn in areas or mobs, but it has happened...
616-
if(istype(loc,/area) || istype(loc,/mob))
622+
if(!istype(loc,/turf))
617623
qdel(src)
618-
CRASH("Fire was created at [loc] instead of a turf.")
624+
CRASH("Fire was created at src->loc: [src]->[loc] instead of a turf.")
619625

620626
// Get location and check if it is in a proper ZAS zone.
621627
var/turf/simulated/S = get_turf(loc)
@@ -648,14 +654,15 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
648654
setfirelight(firelevel, air_contents.temperature)
649655

650656
//Burn mobs.
651-
for(var/mob/living/carbon/human/M in loc)
657+
for(var/mob/living/carbon/human/M in S)
652658
if(M.mutations.Find(M_UNBURNABLE))
653659
continue
654660
M.FireBurn(firelevel, FLAME_TEMPERATURE_PLASTIC, air_contents.return_pressure())
655661

656662
//Burn items in the turf.
657-
for(var/atom/A in loc)
658-
A.fire_act(air_contents, air_contents.temperature, air_contents.return_volume())
663+
for(var/atom/A in S)
664+
if(A.loc == S)
665+
A.fire_act(air_contents, air_contents.temperature, air_contents.return_volume())
659666

660667
//Burn the turf, too.
661668
S.fire_act(air_contents, air_contents.temperature, air_contents.return_volume())
@@ -759,15 +766,15 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
759766
var/solid_burn_products
760767
var/liquid_burn_products
761768
if(T)
762-
if(T.flammable) //burn the turf
769+
if(T.on_fire) //burn the turf
763770
solid_burn_products = T.burnSolidFuel()
764771
if(solid_burn_products)
765772
combustion_energy += solid_burn_products["heat_out"]
766773
combustion_oxy_used += solid_burn_products["oxy_used"]
767774
combustion_co2_prod += solid_burn_products["co2_prod"]
768775
max_temperature = max(max_temperature, solid_burn_products["max_temperature"])
769776
for(var/atom/A in T)
770-
if(A.flammable) //burn items on the turf
777+
if(A.on_fire) //burn items on the turf
771778
solid_burn_products = A.burnSolidFuel()
772779
if(solid_burn_products)
773780
combustion_energy += solid_burn_products["heat_out"]

code/game/objects/objs.dm

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ var/global/list/reagents_to_log = list(FUEL, PLASMA, PACID, SACID, AMUTATIONTOXI
7575
if(W_CLASS_MEDIUM)
7676
thermal_mass = 1.0
7777
if(W_CLASS_LARGE)
78-
thermal_mass = 10.0
78+
thermal_mass = 5.0
7979
if(W_CLASS_HUGE)
80-
thermal_mass = 25.0 //combo breaker but 100kg is way too heavy
80+
thermal_mass = 20.0
8181
if(W_CLASS_GIANT)
82-
thermal_mass = 100
82+
thermal_mass = 50.0
8383
if(thermal_mass)
8484
initial_thermal_mass = thermal_mass
8585
if(flammable)
@@ -425,11 +425,9 @@ var/global/list/reagents_to_log = list(FUEL, PLASMA, PACID, SACID, AMUTATIONTOXI
425425
return SUICIDE_ACT_BRUTELOSS
426426

427427
/obj/ignite()
428-
if(!isturf(loc)) //Prevent things from burning if worn, held, or inside something else. Storage containers will eject their contents when ignited, allowing for burning of the contents.
429-
return
430-
ash_covered = TRUE
431-
remove_particles(PS_SMOKE)
432-
return ..()
428+
if(..())
429+
ash_covered = TRUE
430+
remove_particles(PS_SMOKE)
433431

434432
/obj/item/checkburn()
435433
if(!flammable)

code/modules/library/lib_items.dm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
I.forceMove(src)
4545
update_icon()
4646

47+
/obj/structure/bookcase/ignite()
48+
..()
49+
QDEL_NULL(firelightdummy) //prevent people from grabbing "fire" from the bookcase
50+
4751
/obj/structure/bookcase/proc/healthcheck()
4852

4953
if(health <= 0)

0 commit comments

Comments
 (0)