diff --git a/code/game/objects/structures/fires.dm b/code/game/objects/structures/fires.dm index e0fe3055aa7..971d9abb9d4 100644 --- a/code/game/objects/structures/fires.dm +++ b/code/game/objects/structures/fires.dm @@ -70,7 +70,8 @@ var/lit = FIRE_OUT /// How much fuel is left? var/fuel = 0 - + /// Have we been fed by a bellows recently? + var/bellows_oxygenation = 0 /obj/structure/fire_source/Initialize() . = ..() @@ -138,6 +139,7 @@ /obj/structure/fire_source/proc/die() if(lit == FIRE_LIT) + bellows_oxygenation = 0 lit = FIRE_DEAD last_fuel_ignite_temperature = null last_fuel_burn_temperature = T20C @@ -386,7 +388,9 @@ return 0 var/ambient_temperature = get_ambient_temperature(absolute = TRUE) // The effective burn temperature can't go below ambient (no cold flames) or above the actual burn temperature. - return clamp((last_fuel_burn_temperature - T0C) * draught_mult + T0C, ambient_temperature, last_fuel_burn_temperature) + . = clamp((last_fuel_burn_temperature - T0C) * draught_mult + T0C, ambient_temperature, last_fuel_burn_temperature) + if(bellows_oxygenation) + . = round(. * 1.25) // Burns 25% hotter while oxygenated. // If absolute == TRUE, return our actual ambient temperature, otherwise return our effective burn temperature when lit. /obj/structure/fire_source/get_ambient_temperature(absolute = FALSE) @@ -413,6 +417,10 @@ die() return + // Spend our bellows charge. + if(bellows_oxygenation > 0) + bellows_oxygenation-- + fuel -= (FUEL_CONSUMPTION_CONSTANT * get_draught_multiplier()) if(!process_fuel()) die() @@ -461,7 +469,7 @@ switch(lit) if(FIRE_LIT) - if(fuel >= HIGH_FUEL) + if(bellows_oxygenation || fuel >= HIGH_FUEL) var/image/I = image(icon, "[icon_state]_lit") I.appearance_flags |= RESET_COLOR | RESET_ALPHA | KEEP_APART add_overlay(I) diff --git a/code/modules/crafting/forging/bellows.dm b/code/modules/crafting/forging/bellows.dm new file mode 100644 index 00000000000..3402f4c2cfa --- /dev/null +++ b/code/modules/crafting/forging/bellows.dm @@ -0,0 +1,40 @@ +/obj/structure/working/bellows + name = "bellows" + desc = "An air pump used to improve the heat of a furnace." + icon = 'icons/obj/structures/forging/bellows.dmi' + obj_flags = OBJ_FLAG_ANCHORABLE | OBJ_FLAG_ROTATABLE + work_skill = SKILL_HAULING + var/decl/material/bellows_material = /decl/material/solid/organic/leather + +/obj/structure/working/bellows/Initialize() + bellows_material = GET_DECL(bellows_material) + . = ..() + +/obj/structure/working/bellows/on_update_icon() + . = ..() + underlays = list(overlay_image(icon, "[icon_state]-bellows", bellows_material.color, RESET_COLOR)) + +/obj/structure/working/bellows/try_start_working(mob/user) + + var/obj/structure/fire_source/stoking = locate() in get_step(loc, EAST) + if(!istype(stoking) || !stoking.lit) + to_chat(user, SPAN_WARNING("\The [src] must face east towards a lit fire source; it would be pointless to work them currently.")) + return TRUE + + to_chat(user, SPAN_NOTICE("You begin working \the [src], stoking \the [stoking] to a hotter flame.")) + start_working() + while(user.do_skilled(3 SECONDS, work_skill, src)) + if(QDELETED(src) || QDELETED(user) || user.get_stamina() <= 0) + break + stoking = locate() in get_step(loc, EAST) + if(!istype(stoking) || !stoking.lit) + break + user.adjust_stamina(-25) + stoking.bellows_oxygenation = max(50, stoking.bellows_oxygenation+3) + + if(!QDELETED(user)) + to_chat(user, SPAN_NOTICE("You stop working \the [src].")) + + stop_working() + return TRUE + diff --git a/icons/obj/structures/forging/bellows.dmi b/icons/obj/structures/forging/bellows.dmi new file mode 100644 index 00000000000..9e6031422ef Binary files /dev/null and b/icons/obj/structures/forging/bellows.dmi differ diff --git a/nebula.dme b/nebula.dme index d9f1f233c41..5b7d72b5963 100644 --- a/nebula.dme +++ b/nebula.dme @@ -2214,6 +2214,7 @@ #include "code\modules\codex\entries\weapons.dm" #include "code\modules\crafting\handmade_fancy.dm" #include "code\modules\crafting\handmade_items.dm" +#include "code\modules\crafting\forging\bellows.dm" #include "code\modules\crafting\metalwork\metalwork_items.dm" #include "code\modules\crafting\pottery\pottery_moulds.dm" #include "code\modules\crafting\pottery\pottery_structures.dm"