mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Fixes Atmos fire fighting backpack (#17922)
This commit is contained in:
@@ -118,9 +118,9 @@
|
||||
else
|
||||
to_chat(user, span_warning("\The [W] is empty!"))
|
||||
safety = safety_save
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/item/extinguisher/afterattack(atom/target, mob/user , flag)
|
||||
. = ..()
|
||||
|
||||
@@ -254,40 +254,46 @@
|
||||
return
|
||||
|
||||
/obj/item/extinguisher/mini/nozzle/afterattack(atom/target, mob/user)
|
||||
if(nozzle_mode == EXTINGUISHER)
|
||||
..()
|
||||
if(AttemptRefill(target, user))
|
||||
return
|
||||
|
||||
if(nozzle_mode == EXTINGUISHER)
|
||||
return ..()
|
||||
|
||||
var/Adj = user.Adjacent(target)
|
||||
if(Adj)
|
||||
AttemptRefill(target, user)
|
||||
if(nozzle_mode == RESIN_LAUNCHER)
|
||||
if(Adj)
|
||||
return //Safety check so you don't blast yourself trying to refill your tank
|
||||
|
||||
var/datum/reagents/R = reagents
|
||||
if(R.total_volume < launcher_cost)
|
||||
to_chat(user, span_warning("You need at least [launcher_cost] units of water to use the resin launcher!"))
|
||||
return
|
||||
|
||||
if(!COOLDOWN_FINISHED(src, resin_cooldown))
|
||||
to_chat(user, span_warning("Resin launcher is still recharging..."))
|
||||
return
|
||||
resin_cooldown = TRUE
|
||||
R.remove_any(launcher_cost)
|
||||
var/obj/effect/resin_container/A = new (get_turf(src))
|
||||
log_game("[key_name(user)] used Resin Launcher at [AREACOORD(user)].")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(A, target)
|
||||
sleep(0.2 SECONDS)
|
||||
A.Smoke()
|
||||
|
||||
COOLDOWN_START(src, resin_cooldown, 5 SECONDS)
|
||||
R.remove_any(launcher_cost)
|
||||
var/obj/effect/resin_container/resin = new (get_turf(src))
|
||||
log_game("[key_name(user)] used Resin Launcher at [AREACOORD(user)].")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,TRUE)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(resin, target)
|
||||
sleep(0.2 SECONDS)
|
||||
resin.Smoke()
|
||||
return
|
||||
|
||||
if(nozzle_mode == RESIN_FOAM)
|
||||
if(!Adj|| !isturf(target))
|
||||
if(!Adj || !isturf(target))
|
||||
return
|
||||
|
||||
for(var/S in target)
|
||||
if(istype(S, /obj/effect/particle_effect/fluid/foam/metal/resin) || istype(S, /obj/structure/foamedmetal/resin))
|
||||
to_chat(user, span_warning("There's already resin here!"))
|
||||
return
|
||||
|
||||
if(resin_charges)
|
||||
var/obj/effect/particle_effect/fluid/foam/metal/resin/foam = new (get_turf(target))
|
||||
foam.group.target_size = 0
|
||||
@@ -314,9 +320,9 @@
|
||||
|
||||
/obj/effect/resin_container/proc/Smoke()
|
||||
var/datum/effect_system/fluid_spread/foam/metal/resin/foaming = new
|
||||
foaming.set_up(4, location = src)
|
||||
foaming.set_up(4, holder = src, location = loc)
|
||||
foaming.start()
|
||||
playsound(src,'sound/effects/bamf.ogg',100,1)
|
||||
playsound(src,'sound/effects/bamf.ogg',100,TRUE)
|
||||
qdel(src)
|
||||
|
||||
#undef EXTINGUISHER
|
||||
|
||||
Reference in New Issue
Block a user