Merge pull request #14482 from silicons/combat_v7
Combat v7 - Sprint removal, automatic block/parry, turns combat mode into a pure UI/interaction toggle with no side effects, and a truckload of other stuff.
This commit is contained in:
@@ -19,10 +19,62 @@
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = FLY_LAYER
|
||||
var/stream = FALSE
|
||||
var/speed = 1
|
||||
var/range = 3
|
||||
var/hits_left = 3
|
||||
var/range_left = 3
|
||||
|
||||
/obj/effect/decal/chempuff/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/effect/decal/chempuff/Initialize(mapload, stream_mode, speed, range, hits_left)
|
||||
. = ..()
|
||||
stream = stream_mode
|
||||
src.speed = speed
|
||||
src.range = src.range_left = range
|
||||
src.hits_left = hits_left
|
||||
|
||||
/obj/effect/decal/chempuff/proc/hit_thing(atom/A)
|
||||
if(A == src || A.invisibility)
|
||||
return
|
||||
if(!hits_left)
|
||||
return
|
||||
if(stream)
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(!M.lying || !range_left)
|
||||
reagents.reaction(M, VAPOR)
|
||||
hits_left--
|
||||
else
|
||||
if(!range_left)
|
||||
reagents.reaction(A, VAPOR)
|
||||
else
|
||||
reagents.reaction(A)
|
||||
if(ismob(A))
|
||||
hits_left--
|
||||
|
||||
/obj/effect/decal/chempuff/Crossed(atom/movable/AM, oldloc)
|
||||
. = ..()
|
||||
hit_thing(AM)
|
||||
|
||||
/obj/effect/decal/chempuff/proc/run_puff(atom/target)
|
||||
set waitfor = FALSE
|
||||
for(var/i in 1 to range)
|
||||
range_left--
|
||||
if(!isturf(loc))
|
||||
break
|
||||
for(var/atom/T in loc)
|
||||
hit_thing(T)
|
||||
if(!hits_left || !isturf(loc))
|
||||
break
|
||||
if(hits_left && isturf(loc) && (!stream || !range_left))
|
||||
reagents.reaction(loc, VAPOR)
|
||||
hits_left--
|
||||
if(!hits_left)
|
||||
break
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/fakelattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
|
||||
Reference in New Issue
Block a user