From c9193098cf245063141bbee6e1dc6b16661b597e Mon Sep 17 00:00:00 2001 From: Kano <89972582+kano-dot@users.noreply.github.com> Date: Tue, 10 Sep 2024 02:44:29 +0300 Subject: [PATCH] Fixes being unable to ignite bonfire in lavaland (#26648) * fire * Update code/modules/hydroponics/grown/towercap.dm Co-authored-by: Nathan Winters <100448493+CinnamonSnowball@users.noreply.github.com> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> * false * span span * one more * define * Update code/modules/hydroponics/grown/towercap.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> --------- Signed-off-by: Kano <89972582+kano-dot@users.noreply.github.com> Co-authored-by: Nathan Winters <100448493+CinnamonSnowball@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/modules/hydroponics/grown/towercap.dm | 35 ++++++++++++++-------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 7c19394a262..584f9404661 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -1,3 +1,6 @@ +/// Minimum required mole value of oxygen to ignite a bonfire. +#define MIN_OXY_IGNITE 7 + /obj/item/seeds/tower name = "pack of tower-cap mycelium" desc = "This mycelium grows into tower-cap mushrooms." @@ -131,7 +134,7 @@ density = FALSE anchored = TRUE buckle_lying = FALSE - var/burning = 0 + var/burning = FALSE var/lighter // Who lit the fucking thing var/fire_stack_strength = 5 @@ -154,18 +157,17 @@ R.use(1) can_buckle = TRUE buckle_requires_restraints = TRUE - to_chat(user, "You add a rod to [src].") + to_chat(user, "You add a rod to [src].") var/image/U = image(icon='icons/obj/hydroponics/equipment.dmi',icon_state="bonfire_rod",pixel_y=16) underlays += U if(W.get_heat()) lighter = user.ckey user.create_log(MISC_LOG, "lit a bonfire", src) - StartBurning() - + StartBurning(user) /obj/structure/bonfire/attack_hand(mob/user) if(burning) - to_chat(user, "You need to extinguish [src] before removing the logs!") + to_chat(user, "You need to extinguish [src] before removing the logs!") return if(!has_buckled_mobs() && do_after(user, 50, target = src)) for(var/I in 1 to 5) @@ -181,17 +183,22 @@ /obj/structure/bonfire/proc/CheckOxygen() var/turf/T = get_turf(src) var/datum/gas_mixture/G = T.get_readonly_air() - if(G.oxygen() > 13) + if(G.oxygen() > MIN_OXY_IGNITE) return 1 return 0 -/obj/structure/bonfire/proc/StartBurning() - if(!burning && CheckOxygen()) - icon_state = "bonfire_on_fire" - burning = 1 - set_light(6, l_color = "#ED9200") - Burn() - START_PROCESSING(SSobj, src) +/obj/structure/bonfire/proc/StartBurning(mob/user) + if(burning) + return + if(!CheckOxygen()) + to_chat(user, "You can't seem to ignite [src] in this environment!") + return + + icon_state = "bonfire_on_fire" + burning = TRUE + set_light(6, l_color = "#ED9200") + Burn() + START_PROCESSING(SSobj, src) /obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) ..() @@ -238,3 +245,5 @@ /obj/structure/bonfire/unbuckle_mob(mob/living/buckled_mob, force = FALSE) if(..()) buckled_mob.pixel_y -= 13 + +#undef MIN_OXY_IGNITE