This commit is contained in:
silicons
2021-06-28 19:15:29 -07:00
parent 5ef742ffc1
commit d59ced8f28
2 changed files with 16 additions and 4 deletions
+15 -3
View File
@@ -24,6 +24,7 @@
var/range = 3
var/hits_left = 3
var/range_left = 3
var/firstmove = TRUE
var/list/hit
/obj/effect/decal/chempuff/blob_act(obj/structure/blob/B)
@@ -45,10 +46,12 @@
/obj/effect/decal/chempuff/proc/hit_thing(atom/A)
if(A == src || A.invisibility)
return
if(firstmove)
return
if(!hits_left || hit[A])
return
var/living = isliving(A)
if(!A.density && !living)
if(!A.density)
return
if(ismob(A) && !living)
return
@@ -71,8 +74,18 @@
. = ..()
hit_thing(AM)
/obj/effect/decal/chempuff/Bump(atom/A)
. = ..()
hit_thing(A)
/obj/effect/decal/chempuff/proc/run_puff(atom/target)
for(var/i in 1 to range)
var/safety = 255
while(range_left)
if(!safety--)
CRASH("Spray ran out of safety.")
step_towards(src, target)
if(firstmove)
firstmove = FALSE
range_left--
if(!isturf(loc))
break
@@ -82,7 +95,6 @@
break
if(isturf(loc) && (!stream || !range_left))
reagents.reaction(loc, VAPOR)
step_towards(target)
sleep(speed)
qdel(src)
@@ -16,7 +16,7 @@
var/stream_mode = 0 //whether we use the more focused mode
var/current_range = 3 //the range of tiles the sprayer will reach.
var/spray_range = 3 //the range of tiles the sprayer will reach when in spray mode.
var/stream_range = 1 //the range of tiles the sprayer will reach when in stream mode.
var/stream_range = 3 //the range of tiles the sprayer will reach when in stream mode.
var/stream_amount = 10 //the amount of reagents transfered when in stream mode.
/// Amount of time it takes for a spray to completely travel.
var/spray_delay = 8