From d548ed6693713c0032e5e8fb6e897ecbc964c194 Mon Sep 17 00:00:00 2001
From: amsy2 <159543265+amsy2@users.noreply.github.com>
Date: Mon, 29 Dec 2025 00:34:07 +0100
Subject: [PATCH] Adds Firebot upgrade to heat/cool air to room temperature
(#5063)
## About The Pull Request
Adds new Firebot variant and new Freon Firefighting Foam
Freon Firefighting Foam works same as Firefighting Foam (like ones in
advanced extingishers) with added beenfit of bringing temperature
down/up to 20C even if there's no fire, it also leaves no plasma stains
on the floor. This foam is not meant to be available to players and used
only by the upgraded Firebot.
You can upgrade standard Firebot by giving it a piece of Hot Ice! Doing
so will make it use it's foam if air temperature is below 18C or above
22C, effectively helping keep corridors at room temperature.
## Why It's Good For The Game
Firebots are rarely given a chance to shine, giving them option to
effectively work as walking space heaters widens their use and
practicality by a lot, especiely on maps like Ice Box notorious for
having their corridors go cold all the time. The upgrade also require
Hot Ice which is an atmos made material made with Freon, that currently
doesn't have many uses, giving atmos techs another way to contribute
with their projects to well being of the station.
## Proof Of Testing
## Changelog
:cl:
add: You can upgrade Firebots by giving them Hot Ice. Doing so makes
their foam fix air to room temperature.
/:cl:
---------
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
---
.../atmospherics/atmos_mob_interaction.dm | 8 ++
.../air_alarm/air_alarm_thresholds.dm | 4 +-
.../modules/mob/living/basic/bots/firebot.dm | 75 ++++++++++++++++++
modular_zubbers/icons/mob/silicon/aibots.dmi | Bin 0 -> 435 bytes
tgstation.dme | 2 +
5 files changed, 87 insertions(+), 2 deletions(-)
create mode 100644 code/__DEFINES/~~bubber_defines/atmospherics/atmos_mob_interaction.dm
create mode 100644 modular_zubbers/code/modules/mob/living/basic/bots/firebot.dm
create mode 100644 modular_zubbers/icons/mob/silicon/aibots.dmi
diff --git a/code/__DEFINES/~~bubber_defines/atmospherics/atmos_mob_interaction.dm b/code/__DEFINES/~~bubber_defines/atmospherics/atmos_mob_interaction.dm
new file mode 100644
index 00000000000..6088d8ac52d
--- /dev/null
+++ b/code/__DEFINES/~~bubber_defines/atmospherics/atmos_mob_interaction.dm
@@ -0,0 +1,8 @@
+//Air alarms will trigger below this temperature
+#define AIRALARM_TLV_TEMP_WARN_MIN (BODYTEMP_COLD_WARNING_1 + 7)
+//Air alarms will trigger above this temperature
+#define AIRALARM_TLV_TEMP_WARN_MAX (BODYTEMP_HEAT_WARNING_1 - 27)
+//Firebots with hot ice witll use their foam below this temperature
+#define FIREBOT_HOTICE_TLV_TEMP_WARN_MIN (AIRALARM_TLV_TEMP_WARN_MIN + 13)
+//Firebots with hot ice witll use their foam above this temperature
+#define FIREBOT_HOTICE_TLV_TEMP_WARN_MAX (AIRALARM_TLV_TEMP_WARN_MAX - 13)
diff --git a/code/modules/atmospherics/machinery/air_alarm/air_alarm_thresholds.dm b/code/modules/atmospherics/machinery/air_alarm/air_alarm_thresholds.dm
index f0095e9bb90..948fbcf0892 100644
--- a/code/modules/atmospherics/machinery/air_alarm/air_alarm_thresholds.dm
+++ b/code/modules/atmospherics/machinery/air_alarm/air_alarm_thresholds.dm
@@ -93,9 +93,9 @@
hazard_max = HAZARD_HIGH_PRESSURE
/datum/tlv/temperature
- warning_min = BODYTEMP_COLD_WARNING_1 + 7 // BUBBER EDIT CHANGE - Original: BODYTEMP_COLD_WARNING_1+10
+ warning_min = AIRALARM_TLV_TEMP_WARN_MIN // BUBBER EDIT CHANGE - Original: BODYTEMP_COLD_WARNING_1+10
hazard_min = BODYTEMP_COLD_WARNING_1 + 1 // BUBBER EDIT CHANGE - Original: BODYTEMP_COLD_WARNING_1
- warning_max = BODYTEMP_HEAT_WARNING_1-27
+ warning_max = AIRALARM_TLV_TEMP_WARN_MAX // BUBBER EDIT CHANGE - Original: BODYTEMP_HEAT_WARNING_1-27
hazard_max = BODYTEMP_HEAT_WARNING_1 - 4 // BUBBER EDIT CHANGE - Original: BODYTEMP_HEAT_WARNING_1
/datum/tlv/cold_room_pressure
diff --git a/modular_zubbers/code/modules/mob/living/basic/bots/firebot.dm b/modular_zubbers/code/modules/mob/living/basic/bots/firebot.dm
new file mode 100644
index 00000000000..796277585b1
--- /dev/null
+++ b/modular_zubbers/code/modules/mob/living/basic/bots/firebot.dm
@@ -0,0 +1,75 @@
+/mob/living/basic/bot/firebot
+ desc = "A little fire extinguishing bot. He looks rather anxious. Giving him a piece of hot ice would be quite an upgrade."
+
+/mob/living/basic/bot/firebot/hotice_upgrade
+ desc = "A little fire extinguishing bot. Looks like he's holding a piece of hot ice! His foam will bring air temperature toward 20C."
+ light_color = "#8cdeff"
+
+/mob/living/basic/bot/firebot/hotice_upgrade/should_atmos_process(datum/gas_mixture/air, exposed_temperature)
+ return (exposed_temperature > FIREBOT_HOTICE_TLV_TEMP_WARN_MAX || exposed_temperature < FIREBOT_HOTICE_TLV_TEMP_WARN_MIN)
+
+/mob/living/basic/bot/firebot/hotice_upgrade/atmos_expose(datum/gas_mixture/air, exposed_temperature)
+ if(!COOLDOWN_FINISHED(src, foam_cooldown))
+ return
+ var/datum/effect_system/fluid_spread/foam/firefighting_freon/foam = new
+ foam.set_up(5, holder = src, location = loc)
+ foam.start()
+
+ COOLDOWN_START(src, foam_cooldown, 5 SECONDS)
+
+/mob/living/basic/bot/firebot/hotice_upgrade/update_overlays()
+ . = ..()
+ var/mutable_appearance/hot_ice = mutable_appearance('modular_zubbers/icons/mob/silicon/aibots.dmi', "firebot_hotice", BELOW_MOB_LAYER - 0.02)
+ . += hot_ice
+
+//Interaction to upgrade standard firebot by giving it hot ice
+/mob/living/basic/bot/firebot/attackby(obj/item/given_item, mob/living/carbon/human/user, list/modifiers, list/attack_modifiers)
+ if(!istype(given_item, /obj/item/stack/sheet/hot_ice))
+ return ..()
+ var/obj/item/stack/sheet/hot_ice/ice = given_item
+ balloon_alert(user, "inserted")
+ to_chat(user, span_warning("You give a piece of hot ice to the firebot. He seems rather happy! His foam will now bring air temperature toward 20C."))
+ var/atom/movable/to_move = ice.split_stack(1)
+ to_move.forceMove(src)
+ src.change_mob_type(/mob/living/basic/bot/firebot/hotice_upgrade, delete_old_mob = TRUE)
+ update_appearance()
+
+// freon firefighting foam
+/// A variant of firefighting foam for firebot upgrade, atop of usual plasma removal and bringing temperature down, it will also raise the temperature up to 20C and wont leave plasma stains on floor
+/obj/effect/particle_effect/fluid/foam/firefighting_freon
+ name = "freon firefighting foam"
+ lifetime = 10 //doesn't last as long as normal foam
+ allow_duplicate_results = FALSE
+ slippery_foam = FALSE
+
+/obj/effect/particle_effect/fluid/foam/firefighting_freon/Initialize(mapload)
+ . = ..()
+ RemoveElement(/datum/element/atmos_sensitive)
+
+/obj/effect/particle_effect/fluid/foam/firefighting_freon/process()
+ ..()
+
+ var/turf/open/location = loc
+ if(!istype(location))
+ return
+
+ var/obj/effect/hotspot/hotspot = locate() in location
+ if(hotspot && location.air)
+ QDEL_NULL(hotspot)
+
+ var/datum/gas_mixture/air = location.air
+ var/list/gases = air.gases
+ if (gases[/datum/gas/plasma])
+ var/scrub_amt = min(30, gases[/datum/gas/plasma][MOLES]) //Absorb some plasma
+ gases[/datum/gas/plasma][MOLES] -= scrub_amt
+
+ if (air.temperature > T20C)
+ air.temperature = max(air.temperature / 2 , T20C)
+ if (air.temperature < T20C)
+ air.temperature = min(air.temperature * 2 , T20C)
+ air.garbage_collect()
+ location.air_update_turf(FALSE, FALSE)
+
+/// A factory which produces firefighting_freon foam
+/datum/effect_system/fluid_spread/foam/firefighting_freon
+ effect_type = /obj/effect/particle_effect/fluid/foam/firefighting_freon
diff --git a/modular_zubbers/icons/mob/silicon/aibots.dmi b/modular_zubbers/icons/mob/silicon/aibots.dmi
new file mode 100644
index 0000000000000000000000000000000000000000..c75d1671bc0a5924a5fb3ce59b401a1644fb6abe
GIT binary patch
literal 435
zcmV;k0ZjghP)YDR3jkmbBG%2tQnCO50KiE^K~z|U?bk62!axj$;Z&`&C^&1-U5V~Rt8-DV
zvx46L{|TO3lY@lfph({B8QN}ND1hgAA2prmo(UJY)JYER6~h@n{=mFH2v&(p7(Rf{hu3_`(MPn>a_n?aSvM6@BQC&9Ut{g
zaoYd$v+8&prTP6x;~b-IaX+ApK{xt+@I3GDlK%@<@_)fh?!Q&G|5o|_TV?ximG8g#
d3E%&(_X2#xDR-PRTh9Oh002ovPDHLkV1m=*zybgO
literal 0
HcmV?d00001
diff --git a/tgstation.dme b/tgstation.dme
index da877ccc217..43a434397af 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -549,6 +549,7 @@
#include "code\__DEFINES\~~bubber_defines\vehicles.dm"
#include "code\__DEFINES\~~bubber_defines\vomit.dm"
#include "code\__DEFINES\~~bubber_defines\___HELPERS\global_lists.dm"
+#include "code\__DEFINES\~~bubber_defines\atmospherics\atmos_mob_interaction.dm"
#include "code\__DEFINES\~~bubber_defines\research\techweb_nodes.dm"
#include "code\__DEFINES\~~bubber_defines\traits\declarations.dm"
#include "code\__DEFINES\~~bubber_defines\traits\nanites.dm"
@@ -9507,6 +9508,7 @@
#include "modular_zubbers\code\modules\mob\living\examine.dm"
#include "modular_zubbers\code\modules\mob\living\living.dm"
#include "modular_zubbers\code\modules\mob\living\living_defines.dm"
+#include "modular_zubbers\code\modules\mob\living\basic\bots\firebot.dm"
#include "modular_zubbers\code\modules\mob\living\basic\guardian\guardian_types\holoparasite_timestop.dm"
#include "modular_zubbers\code\modules\mob\living\basic\lightgeist\lightgeist.dm"
#include "modular_zubbers\code\modules\mob\living\basic\moonstation\cazador.dm"