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 00000000000..c75d1671bc0 Binary files /dev/null and b/modular_zubbers/icons/mob/silicon/aibots.dmi differ 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"