mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Adds Firefighting Foam extinguishers, this time hopefully wont be accidentally closing (#28791)
* Adds an atmospherics specific fire extinguisher that sprays firefighting foam! Adds a firefighting foam tank to all the maps that refils the fire extinguisher added! * allowed fff to enter regular extinguishers * changed the FFF to have an F on it rather than an image of smoke * should fix the conflicting object.dmi issues * adds orderable firefighting foam tank crate * makes farragus playable (literally) * removes redundant if statement * changes from max_water to reagent_capacity and reagent_id
This commit is contained in:
@@ -18,7 +18,10 @@
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
resistance_flags = FIRE_PROOF
|
||||
new_attack_chain = TRUE
|
||||
var/max_water = 50
|
||||
/// Used to determine the chemical that spawns in the extinguisher
|
||||
var/reagent_id = "water"
|
||||
/// Used to determine the maximum capacity of extinguishers
|
||||
var/reagent_capacity = 50
|
||||
/// If `TRUE`, using in hand will toggle the extinguisher's safety. This must be set to `FALSE` for extinguishers with different firing modes (i.e. backpacks).
|
||||
var/has_safety = TRUE
|
||||
/// If `TRUE`, the extinguisher will not fire.
|
||||
@@ -29,6 +32,17 @@
|
||||
var/cooling_power = 2
|
||||
COOLDOWN_DECLARE(last_use)
|
||||
|
||||
/obj/item/extinguisher/atmospherics
|
||||
name = "atmospheric fire extinguisher"
|
||||
desc = "An extinguisher coated in yellow paint that is pre-filled with firefighting foam."
|
||||
icon_state = "atmoFE0"
|
||||
item_state = "atmoFE"
|
||||
base_icon_state = "atmoFE"
|
||||
materials = list(MAT_TITANIUM = 200)
|
||||
dog_fashion = null
|
||||
reagent_id = "firefighting_foam"
|
||||
reagent_capacity = 65
|
||||
|
||||
/obj/item/extinguisher/mini
|
||||
name = "pocket fire extinguisher"
|
||||
desc = "A light and compact fibreglass-framed model fire extinguisher."
|
||||
@@ -41,7 +55,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 3
|
||||
materials = list()
|
||||
max_water = 30
|
||||
reagent_capacity = 30
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/extinguisher/examine(mob/user)
|
||||
@@ -52,8 +66,8 @@
|
||||
/obj/item/extinguisher/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!reagents)
|
||||
create_reagents(max_water)
|
||||
reagents.add_reagent("water", max_water)
|
||||
create_reagents(reagent_capacity)
|
||||
reagents.add_reagent(reagent_id, reagent_capacity)
|
||||
ADD_TRAIT(src, TRAIT_CAN_POINT_WITH, ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/item/extinguisher/activate_self(mob/user)
|
||||
@@ -77,7 +91,7 @@
|
||||
if(extinguisher_spray(target, user))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/extinguisher/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
/obj/item/extinguisher/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(extinguisher_spray(target, user))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -90,7 +104,7 @@
|
||||
return TRUE
|
||||
|
||||
var/obj/structure/reagent_dispensers/watertank/W = target
|
||||
var/transferred = W.reagents.trans_to(src, max_water)
|
||||
var/transferred = W.reagents.trans_to(src, reagent_capacity)
|
||||
if(!transferred)
|
||||
to_chat(user, "<span class='notice'>\The [W] is empty!</span>")
|
||||
return TRUE
|
||||
@@ -149,7 +163,7 @@
|
||||
INVOKE_ASYNC(water, TYPE_PROC_REF(/obj/effect/particle_effect/water, extinguish_move), new_target)
|
||||
|
||||
/obj/item/extinguisher/cyborg_recharge(coeff, emagged)
|
||||
reagents.check_and_add("water", max_water, 5 * coeff)
|
||||
reagents.check_and_add("water", reagent_capacity, 5 * coeff)
|
||||
|
||||
/obj/item/extinguisher/proc/buckled_speed_move(obj/structure/chair/buckled_to, direction) // Buckled_to may not be a chair here, but we're assuming so because it makes it easier to typecheck
|
||||
var/movementdirection = turn(direction, 180)
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
item_state = "nozzleatmos"
|
||||
has_safety = FALSE
|
||||
safety_active = FALSE
|
||||
max_water = 500
|
||||
reagent_capacity = 500
|
||||
precision = TRUE
|
||||
cooling_power = 5
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
tank = loc
|
||||
reagents = tank.reagents
|
||||
max_water = tank.volume
|
||||
reagent_capacity = tank.volume
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_atmos(src)
|
||||
new /obj/item/storage/backpack/duffel/atmos(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/extinguisher/atmospherics(src)
|
||||
new /obj/item/grenade/gas/oxygen(src)
|
||||
new /obj/item/grenade/gas/oxygen(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest/staff(src)
|
||||
|
||||
Reference in New Issue
Block a user