diff --git a/code/__DEFINES/robots.dm b/code/__DEFINES/robots.dm
index 9c81305241..0820d63247 100644
--- a/code/__DEFINES/robots.dm
+++ b/code/__DEFINES/robots.dm
@@ -35,6 +35,7 @@
#define CLEAN_BOT (1<<3) // Cleanbots
#define MED_BOT (1<<4) // Medibots
#define HONK_BOT (1<<5) // Honkbots & ED-Honks
+#define FIRE_BOT (1<<6) // Firebots
//AI notification defines
#define NEW_BORG 1
diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm
index fc268e2b3e..1a733fbff2 100644
--- a/code/game/objects/items/devices/PDA/cart.dm
+++ b/code/game/objects/items/devices/PDA/cart.dm
@@ -31,7 +31,7 @@
var/remote_door_id = ""
- var/bot_access_flags = 0 //Bit flags. Selection: SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT
+ var/bot_access_flags = 0 //Bit flags. Selection: SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT | FIRE_BOT
var/spam_enabled = 0 //Enables "Send to All" Option
var/obj/item/pda/host_pda = null
@@ -65,7 +65,7 @@
name = "\improper BreatheDeep cartridge"
icon_state = "cart-a"
access = CART_ATMOS | CART_DRONEPHONE
- bot_access_flags = FLOOR_BOT
+ bot_access_flags = FLOOR_BOT | FIRE_BOT
/obj/item/cartridge/medical
name = "\improper Med-U cartridge"
@@ -112,7 +112,7 @@
/obj/item/cartridge/roboticist
name = "\improper B.O.O.P. Remote Control cartridge"
desc = "Packed with heavy duty triple-bot interlink!"
- bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT
+ bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT | FIRE_BOT
access = CART_DRONEPHONE
/obj/item/cartridge/signal
@@ -160,7 +160,7 @@
name = "\improper Power-On DELUXE cartridge"
icon_state = "cart-ce"
access = CART_MANIFEST | CART_STATUS_DISPLAY | CART_ENGINE | CART_ATMOS | CART_DRONEPHONE
- bot_access_flags = FLOOR_BOT
+ bot_access_flags = FLOOR_BOT | FIRE_BOT
/obj/item/cartridge/cmo
name = "\improper Med-U DELUXE cartridge"
@@ -172,7 +172,7 @@
name = "\improper Signal Ace DELUXE cartridge"
icon_state = "cart-rd"
access = CART_MANIFEST | CART_STATUS_DISPLAY | CART_REAGENT_SCANNER | CART_ATMOS | CART_DRONEPHONE
- bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT
+ bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT | FIRE_BOT
/obj/item/cartridge/rd/Initialize()
. = ..()
@@ -183,7 +183,7 @@
desc = "Now with 350% more value!" //Give the Captain...EVERYTHING! (Except Mime, Clown, and Syndie)
icon_state = "cart-c"
access = ~(CART_CLOWN | CART_MIME | CART_REMOTE_DOOR)
- bot_access_flags = SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT
+ bot_access_flags = SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT | FIRE_BOT
spam_enabled = 1
/obj/item/cartridge/captain/New()
diff --git a/code/game/objects/items/extinguisher.dm b/code/game/objects/items/extinguisher.dm
index e0d6b553fd..ddbc668c05 100644
--- a/code/game/objects/items/extinguisher.dm
+++ b/code/game/objects/items/extinguisher.dm
@@ -71,6 +71,10 @@
sprite_name = "foam_extinguisher"
precision = TRUE
+/obj/item/extinguisher/proc/refill()
+ create_reagents(max_water, AMOUNT_VISIBLE)
+ reagents.add_reagent(chem, max_water)
+
/obj/item/extinguisher/suicide_act(mob/living/carbon/user)
if (!safety && (reagents.total_volume >= 1))
user.visible_message("[user] puts the nozzle to [user.p_their()] mouth. It looks like [user.p_theyre()] trying to extinguish the spark of life!")
@@ -183,7 +187,7 @@
W.reagents = R
R.my_atom = W
reagents.trans_to(W,1)
-
+
//Make em move dat ass, hun
addtimer(CALLBACK(src, /obj/item/extinguisher/proc/move_particles, water_particles), 2)
@@ -243,3 +247,12 @@
user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "You quietly empty out \the [src] using its release valve.")
+//firebot assembly
+/obj/item/extinguisher/attackby(obj/O, mob/user, params)
+ if(istype(O, /obj/item/bodypart/l_arm/robot) || istype(O, /obj/item/bodypart/r_arm/robot))
+ to_chat(user, "You add [O] to [src].")
+ qdel(O)
+ qdel(src)
+ user.put_in_hands(new /obj/item/bot_assembly/firebot)
+ else
+ ..()
diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm
index 6ada4629d3..c3858da6ad 100644
--- a/code/modules/crafting/recipes.dm
+++ b/code/modules/crafting/recipes.dm
@@ -189,6 +189,16 @@
time = 40
category = CAT_ROBOT
+/datum/crafting_recipe/Firebot
+ name = "Firebot"
+ result = /mob/living/simple_animal/bot/firebot
+ reqs = list(/obj/item/extinguisher = 1,
+ /obj/item/bodypart/r_arm/robot = 1,
+ /obj/item/assembly/prox_sensor = 1,
+ /obj/item/clothing/head/hardhat/red = 1)
+ time = 40
+ category = CAT_ROBOT
+
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
name = "Pneumatic Cannon"
result = /obj/item/pneumatic_cannon/ghetto
@@ -731,7 +741,7 @@
/datum/crafting_recipe/goldenbox
name = "Gold Plated Toolbox"
- result = /obj/item/storage/toolbox/gold_fake
+ result = /obj/item/storage/toolbox/gold_fake
reqs = list(/obj/item/stack/sheet/cardboard = 1, //so we dont null items in crafting
/obj/item/stack/cable_coil = 10,
/obj/item/stack/sheet/mineral/gold = 1,
diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm
index 56d37f667c..9db21f13e0 100644
--- a/code/modules/mob/living/simple_animal/bot/construction.dm
+++ b/code/modules/mob/living/simple_animal/bot/construction.dm
@@ -505,3 +505,33 @@
to_chat(user, "You unbolt [src]'s energy swords")
for(var/IS in 1 to swordamt)
new /obj/item/melee/transforming/energy/sword/saber(Tsec)
+
+//Firebot Assembly
+/obj/item/bot_assembly/firebot
+ name = "incomplete firebot assembly"
+ desc = "A fire extinguisher with an arm attached to it."
+ icon_state = "firebot_arm"
+ created_name = "Firebot"
+
+/obj/item/bot_assembly/firebot/attackby(obj/item/I, mob/user, params)
+ ..()
+ switch(build_step)
+ if(ASSEMBLY_FIRST_STEP)
+ if(istype(I, /obj/item/clothing/head/hardhat/red))
+ if(!user.temporarilyRemoveItemFromInventory(I))
+ return
+ to_chat(user,"You add the [I] to [src]!")
+ icon_state = "firebot_helmet"
+ desc = "An incomplete firebot assembly with a fire helmet."
+ qdel(I)
+ build_step++
+
+ if(ASSEMBLY_SECOND_STEP)
+ if(isprox(I))
+ if(!can_finish_build(I, user))
+ return
+ to_chat(user, "You add the [I] to [src]! Beep Boop!")
+ var/mob/living/simple_animal/bot/firebot/F = new(drop_location())
+ F.name = created_name
+ qdel(I)
+ qdel(src)
diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm
new file mode 100644
index 0000000000..d8c3bca72a
--- /dev/null
+++ b/code/modules/mob/living/simple_animal/bot/firebot.dm
@@ -0,0 +1,325 @@
+//Firebot
+
+#define SPEECH_INTERVAL 300 // Time between idle speeches
+#define DETECTED_VOICE_INTERVAL 300 // Time between fire detected callouts
+#define FOAM_INTERVAL 50 // Time between deployment of fire fighting foam
+
+/mob/living/simple_animal/bot/firebot
+ name = "\improper Firebot"
+ desc = "A little fire extinguishing bot. He looks rather anxious."
+ icon = 'icons/mob/aibots.dmi'
+ icon_state = "firebot"
+ density = FALSE
+ anchored = FALSE
+ health = 25
+ maxHealth = 25
+ spacewalk = TRUE
+
+ radio_key = /obj/item/encryptionkey/headset_eng
+ radio_channel = "Engineering"
+ bot_type = FIRE_BOT
+ model = "Firebot"
+ bot_core = /obj/machinery/bot_core/firebot
+ window_id = "autoextinguisher"
+ window_name = "Mobile Fire Extinguisher v1.0"
+ path_image_color = "#FFA500"
+
+ var/atom/target_fire
+ var/atom/old_target_fire
+
+ var/obj/item/extinguisher/internal_ext
+
+ var/last_found = 0
+
+ var/speech_cooldown = 0
+ var/detected_cooldown = 0
+ var/foam_cooldown = 0
+
+ var/extinguish_people = TRUE
+ var/extinguish_fires = TRUE
+ var/stationary_mode = FALSE
+
+/mob/living/simple_animal/bot/firebot/Initialize()
+ . = ..()
+ update_icon()
+ var/datum/job/engineer/J = new/datum/job/engineer
+ access_card.access += J.get_access()
+ prev_access = access_card.access
+
+ create_extinguisher()
+
+/mob/living/simple_animal/bot/firebot/bot_reset()
+ create_extinguisher()
+
+/mob/living/simple_animal/bot/firebot/proc/create_extinguisher()
+ internal_ext = new /obj/item/extinguisher(src)
+ internal_ext.safety = FALSE
+ internal_ext.precision = TRUE
+ internal_ext.max_water = INFINITY
+ internal_ext.refill()
+
+/mob/living/simple_animal/bot/firebot/UnarmedAttack(atom/A)
+ if(!on)
+ return
+ if(internal_ext)
+ internal_ext.afterattack(A, src)
+ else
+ return ..()
+
+/mob/living/simple_animal/bot/firebot/RangedAttack(atom/A)
+ if(!on)
+ return
+ if(internal_ext)
+ internal_ext.afterattack(A, src)
+ else
+ return ..()
+
+/mob/living/simple_animal/bot/firebot/turn_on()
+ . = ..()
+ update_icon()
+
+/mob/living/simple_animal/bot/firebot/turn_off()
+ ..()
+ update_icon()
+
+/mob/living/simple_animal/bot/firebot/bot_reset()
+ ..()
+ target_fire = null
+ old_target_fire = null
+ ignore_list = list()
+ anchored = FALSE
+ update_icon()
+
+/mob/living/simple_animal/bot/firebot/proc/soft_reset()
+ path = list()
+ target_fire = null
+ mode = BOT_IDLE
+ last_found = world.time
+ update_icon()
+
+/mob/living/simple_animal/bot/firebot/set_custom_texts()
+ text_hack = "You corrupt [name]'s safety protocols."
+ text_dehack = "You detect errors in [name] and reset his programming."
+ text_dehack_fail = "[name] is not responding to reset commands!"
+
+/mob/living/simple_animal/bot/firebot/get_controls(mob/user)
+ var/dat
+ dat += hack(user)
+ dat += showpai(user)
+ dat += "Mobile Fire Extinguisher v1.0
"
+ dat += "Status: [on ? "On" : "Off"]
"
+ dat += "Maintenance panel panel is [open ? "opened" : "closed"]
"
+
+ dat += "Behaviour controls are [locked ? "locked" : "unlocked"]
"
+ if(!locked || issilicon(user) || IsAdminGhost(user))
+ dat += "Extinguish Fires: [extinguish_fires ? "Yes" : "No"]
"
+ dat += "Extinguish People: [extinguish_people ? "Yes" : "No"]
"
+ dat += "Patrol Station: [auto_patrol ? "Yes" : "No"]
"
+ dat += "Stationary Mode: [stationary_mode ? "Yes" : "No"]
"
+
+ return dat
+
+/mob/living/simple_animal/bot/firebot/emag_act(mob/user)
+ ..()
+ if(emagged == 1)
+ if(user)
+ to_chat(user, "[src] buzzes and beeps.")
+ audible_message("[src] buzzes oddly!")
+ playsound(src, "sparks", 75, TRUE)
+ if(user)
+ old_target_fire = user
+ extinguish_fires = FALSE
+ extinguish_people = TRUE
+
+ internal_ext.chem = "clf3" //Refill the internal extinguisher with liquid fire
+ internal_ext.power = 3
+ internal_ext.safety = FALSE
+ internal_ext.precision = FALSE
+ internal_ext.max_water = INFINITY
+ internal_ext.refill()
+
+/mob/living/simple_animal/bot/firebot/Topic(href, href_list)
+ if(..())
+ return TRUE
+
+ switch(href_list["operation"])
+ if("extinguish_fires")
+ extinguish_fires = !extinguish_fires
+ if("extinguish_people")
+ extinguish_people = !extinguish_people
+ if("stationary_mode")
+ stationary_mode = !stationary_mode
+
+ update_controls()
+ update_icon()
+
+/mob/living/simple_animal/bot/firebot/proc/is_burning(atom/target)
+ if(ismob(target))
+ var/mob/living/M = target
+ if(M.on_fire || (emagged == 1 && !M.on_fire))
+ return TRUE
+
+ else if(isturf(target))
+ var/turf/open/T = target
+ if(T.active_hotspot)
+ return TRUE
+
+ return FALSE
+
+/mob/living/simple_animal/bot/firebot/handle_automated_action()
+ if(!..())
+ return
+
+ if(IsStun())
+ old_target_fire = target_fire
+ target_fire = null
+ mode = BOT_IDLE
+ return
+
+ if(prob(1) && target_fire == null)
+ var/list/messagevoice = list("No fires detected." = 'sound/voice/firebot/nofires.ogg',
+ "Only you can prevent station fires." = 'sound/voice/firebot/onlyyou.ogg',
+ "Temperature nominal." = 'sound/voice/firebot/tempnominal.ogg',
+ "Keep it cool." = 'sound/voice/firebot/keepitcool.ogg')
+ var/message = pick(messagevoice)
+ speak(message)
+ playsound(src, messagevoice[message], 50)
+
+ // Couldn't reach the target, reset and try again ignoring the old one
+ if(frustration > 8)
+ old_target_fire = target_fire
+ soft_reset()
+
+ // We extinguished our target or it was deleted
+ if(QDELETED(target_fire) || !is_burning(target_fire) || isdead(target_fire))
+ target_fire = null
+ var/scan_range = (stationary_mode ? 1 : DEFAULT_SCAN_RANGE)
+
+ if(extinguish_people)
+ target_fire = scan(/mob/living, old_target_fire, scan_range) // Scan for burning humans first
+
+ if(target_fire == null && extinguish_fires)
+ target_fire = scan(/turf/open, old_target_fire, scan_range) // Scan for burning turfs second
+
+ old_target_fire = target_fire
+
+ // Target reached ENGAGE WATER CANNON
+ if(target_fire && (get_dist(src, target_fire) <= (emagged == 1 ? 1 : 2))) // Make the bot spray water from afar when not emagged
+ if((speech_cooldown + SPEECH_INTERVAL) < world.time)
+ if(ishuman(target_fire))
+ speak("Stop, drop and roll!")
+ playsound(src, "sound/voice/firebot/stopdropnroll.ogg", 50, 0)
+ else
+ speak("Extinguishing!")
+ playsound(src, "sound/voice/firebot/extinguishing.ogg", 50, 0)
+ speech_cooldown = world.time
+
+ flick("firebot1_use", src)
+ spray_water(target_fire, src)
+
+ soft_reset()
+
+ // Target ran away
+ else if(target_fire && path.len && (get_dist(target_fire,path[path.len]) > 2))
+ path = list()
+ mode = BOT_IDLE
+ last_found = world.time
+
+ else if(target_fire && stationary_mode)
+ soft_reset()
+ return
+
+ if(target_fire && (get_dist(src, target_fire) > 2))
+
+ path = get_path_to(src, get_turf(target_fire), /turf/proc/Distance_cardinal, 0, 30, 1, id=access_card)
+ mode = BOT_MOVING
+ if(!path.len)
+ soft_reset()
+
+ if(path.len > 0 && target_fire)
+ if(!bot_move(path[path.len]))
+ old_target_fire = target_fire
+ soft_reset()
+ return
+
+ // We got a target but it's too far away from us
+ if(path.len > 8 && target_fire)
+ frustration++
+
+ if(auto_patrol && !target_fire && !stationary_mode)
+ if(mode == BOT_IDLE || mode == BOT_START_PATROL)
+ start_patrol()
+
+ if(mode == BOT_PATROL)
+ bot_patrol()
+
+
+//Look for burning people or turfs around the bot
+/mob/living/simple_animal/bot/firebot/process_scan(atom/scan_target)
+ var/result
+
+ if(scan_target == src)
+ return result
+
+ if(is_burning(scan_target))
+ if((detected_cooldown + DETECTED_VOICE_INTERVAL) < world.time)
+ speak("Fire detected!")
+ playsound(src, "sound/voice/firebot/detected.ogg", 50, 0)
+ detected_cooldown = world.time
+ result = scan_target
+
+ return result
+
+/mob/living/simple_animal/bot/firebot/temperature_expose(datum/gas_mixture/air, temperature, volume)
+ if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && foam_cooldown + FOAM_INTERVAL < world.time)
+ new /obj/effect/particle_effect/foam/firefighting(loc)
+ foam_cooldown = world.time
+ ..()
+
+/mob/living/simple_animal/bot/firebot/proc/spray_water(atom/target, mob/user)
+ if(stationary_mode)
+ flick("firebots_use", user)
+ else
+ flick("firebot1_use", user)
+ internal_ext.afterattack(target, user, null)
+
+/mob/living/simple_animal/bot/firebot/update_icon()
+ if(!on)
+ icon_state = "firebot0"
+ return
+ if(IsStun())
+ icon_state = "firebots1"
+ else if(stationary_mode) //Bot has yellow light to indicate stationary mode.
+ icon_state = "firebots1"
+ else
+ icon_state = "firebot1"
+
+
+/mob/living/simple_animal/bot/firebot/explode()
+ on = FALSE
+ visible_message("[src] blows apart!")
+
+ var/atom/Tsec = drop_location()
+
+ new /obj/item/assembly/prox_sensor(Tsec)
+ new /obj/item/clothing/head/hardhat/red(Tsec)
+
+ var/turf/T = get_turf(Tsec)
+
+ if(isopenturf(T))
+ var/turf/open/theturf = T
+ theturf.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
+
+ if(prob(50))
+ drop_part(robot_arm, Tsec)
+
+ do_sparks(3, TRUE, src)
+ ..()
+
+/obj/machinery/bot_core/firebot
+ req_one_access = list(ACCESS_CONSTRUCTION, ACCESS_ROBOTICS)
+
+#undef SPEECH_INTERVAL
+#undef DETECTED_VOICE_INTERVAL
+#undef FOAM_INTERVAL
+
diff --git a/icons/mob/aibots.dmi b/icons/mob/aibots.dmi
index 913a0dff02..f4049abc41 100644
Binary files a/icons/mob/aibots.dmi and b/icons/mob/aibots.dmi differ
diff --git a/sound/voice/firebot/detected.ogg b/sound/voice/firebot/detected.ogg
new file mode 100644
index 0000000000..e5acfa10c7
Binary files /dev/null and b/sound/voice/firebot/detected.ogg differ
diff --git a/sound/voice/firebot/extinguishing.ogg b/sound/voice/firebot/extinguishing.ogg
new file mode 100644
index 0000000000..d7b44b7fce
Binary files /dev/null and b/sound/voice/firebot/extinguishing.ogg differ
diff --git a/sound/voice/firebot/keepitcool.ogg b/sound/voice/firebot/keepitcool.ogg
new file mode 100644
index 0000000000..e04c94337a
Binary files /dev/null and b/sound/voice/firebot/keepitcool.ogg differ
diff --git a/sound/voice/firebot/nofires.ogg b/sound/voice/firebot/nofires.ogg
new file mode 100644
index 0000000000..962f18d135
Binary files /dev/null and b/sound/voice/firebot/nofires.ogg differ
diff --git a/sound/voice/firebot/onlyyou.ogg b/sound/voice/firebot/onlyyou.ogg
new file mode 100644
index 0000000000..e8eb3cdf2e
Binary files /dev/null and b/sound/voice/firebot/onlyyou.ogg differ
diff --git a/sound/voice/firebot/stopdropnroll.ogg b/sound/voice/firebot/stopdropnroll.ogg
new file mode 100644
index 0000000000..9e6b1c1bb6
Binary files /dev/null and b/sound/voice/firebot/stopdropnroll.ogg differ
diff --git a/sound/voice/firebot/tempnominal.ogg b/sound/voice/firebot/tempnominal.ogg
new file mode 100644
index 0000000000..9eaa984cd6
Binary files /dev/null and b/sound/voice/firebot/tempnominal.ogg differ
diff --git a/tgstation.dme b/tgstation.dme
index ec265f1aea..a8c692d023 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -1226,13 +1226,13 @@
#include "code\modules\antagonists\clockcult\clock_scriptures\scripture_scripts.dm"
#include "code\modules\antagonists\clockcult\clock_structures\_trap_object.dm"
#include "code\modules\antagonists\clockcult\clock_structures\ark_of_the_clockwork_justicar.dm"
-#include "code\modules\antagonists\clockcult\clock_structures\stargazer.dm"
#include "code\modules\antagonists\clockcult\clock_structures\clockwork_obelisk.dm"
#include "code\modules\antagonists\clockcult\clock_structures\eminence_spire.dm"
#include "code\modules\antagonists\clockcult\clock_structures\heralds_beacon.dm"
#include "code\modules\antagonists\clockcult\clock_structures\mania_motor.dm"
#include "code\modules\antagonists\clockcult\clock_structures\ocular_warden.dm"
#include "code\modules\antagonists\clockcult\clock_structures\ratvar_the_clockwork_justicar.dm"
+#include "code\modules\antagonists\clockcult\clock_structures\stargazer.dm"
#include "code\modules\antagonists\clockcult\clock_structures\taunting_trail.dm"
#include "code\modules\antagonists\clockcult\clock_structures\wall_gear.dm"
#include "code\modules\antagonists\clockcult\clock_structures\trap_triggers\lever.dm"
@@ -2078,6 +2078,7 @@
#include "code\modules\mob\living\simple_animal\bot\cleanbot.dm"
#include "code\modules\mob\living\simple_animal\bot\construction.dm"
#include "code\modules\mob\living\simple_animal\bot\ed209bot.dm"
+#include "code\modules\mob\living\simple_animal\bot\firebot.dm"
#include "code\modules\mob\living\simple_animal\bot\floorbot.dm"
#include "code\modules\mob\living\simple_animal\bot\honkbot.dm"
#include "code\modules\mob\living\simple_animal\bot\medbot.dm"