spawn() removal on effects_*.dm

This commit is contained in:
Jack Edge
2016-06-25 17:50:47 +01:00
parent c374782ebf
commit 7aef42ae8b
9 changed files with 40 additions and 47 deletions
@@ -53,19 +53,23 @@ would spawn and follow the beaker, even if it is carried or thrown.
for(var/i in 1 to number)
if(total_effects > 20)
return
spawn(0)
if(holder)
location = get_turf(holder)
var/obj/effect/E = PoolOrNew(effect_type, location)
total_effects++
var/direction
if(cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
var/steps_amt = pick(1,2,3)
for(var/j in 1 to steps_amt)
sleep(5)
step(E,direction)
spawn(20)
total_effects--
addtimer(src, "generate_effect", 0)
/datum/effect_system/proc/generate_effect()
if(holder)
location = get_turf(holder)
var/obj/effect/E = PoolOrNew(effect_type, location)
total_effects++
var/direction
if(cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
var/steps_amt = pick(1,2,3)
for(var/j in 1 to steps_amt)
sleep(5)
step(E,direction)
addtimer(src, "decrement_total_effect", 20)
/datum/effect_system/proc/decrement_total_effect()
total_effects--