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--
@@ -6,8 +6,7 @@
/obj/effect/particle_effect/expl_particles/New()
..()
spawn (15)
qdel(src)
QDEL_IN(src, 15)
/datum/effect_system/expl_particles
number = 10
@@ -34,9 +33,7 @@
/obj/effect/explosion/New()
..()
spawn (10)
qdel(src)
return
QDEL_IN(src, 10)
/datum/effect_system/explosion
@@ -54,4 +51,4 @@
spawn(5)
var/datum/effect_system/smoke_spread/S = new
S.set_up(2, location)
S.start()
S.start()
@@ -44,9 +44,7 @@
M.metal = metal
M.updateicon()
flick("[icon_state]-disolve", src)
spawn(5)
qdel(src)
QDEL_IN(src, 5)
/obj/effect/particle_effect/foam/process()
lifetime--
@@ -220,7 +218,6 @@
/obj/structure/foamedmetal/attack_paw(mob/user)
attack_hand(user)
return
/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/user)
@@ -283,4 +280,4 @@
/obj/structure/foamedmetal/CanAtmosPass()
return !density
return !density
@@ -101,8 +101,6 @@
flashing = flash
flashing_factor = flash_fact
return
/datum/effect_system/reagents_explosion/start()
if(explosion_message)
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
@@ -39,10 +39,8 @@
/obj/effect/particle_effect/smoke/proc/kill_smoke()
STOP_PROCESSING(SSobj, src)
spawn(0)
fade_out()
spawn(10)
qdel(src)
addtimer(src, "fade_out", 0)
QDEL_IN(src, 10)
/obj/effect/particle_effect/smoke/process()
lifetime--
@@ -63,11 +61,13 @@
if(C.smoke_delay)
return 0
C.smoke_delay++
spawn(10)
if(C)
C.smoke_delay = 0
addtimer(src, "remove_smoke_delay", 10, FALSE, C)
return 1
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
if(C)
C.smoke_delay = 0
/obj/effect/particle_effect/smoke/proc/spread_smoke()
var/turf/t_loc = get_turf(src)
var/list/newsmokes = list()
@@ -178,7 +178,6 @@
L.ExtinguishMob()
for(var/obj/item/Item in T)
Item.extinguish()
return
/datum/effect_system/smoke_spread/freezing/set_up(radius = 5, loca, blasting = 0)
..()
@@ -18,8 +18,7 @@
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
spawn(20)
qdel(src)
QDEL_IN(src, 20)
/obj/effect/particle_effect/sparks/Destroy()
var/turf/T = src.loc
@@ -44,4 +43,4 @@
icon_state = "electricity"
/datum/effect_system/lightning_spread
effect_type = /obj/effect/particle_effect/sparks/electricity
effect_type = /obj/effect/particle_effect/sparks/electricity
@@ -9,8 +9,7 @@
/obj/effect/particle_effect/water/New()
..()
spawn( 70 )
qdel(src)
QDEL_IN(src, 70)
/obj/effect/particle_effect/water/Move(turf/newloc)
if (--src.life < 1)
@@ -48,8 +47,7 @@ steam.start() -- spawns the effect
/obj/effect/particle_effect/steam/New()
..()
spawn(20)
qdel(src)
QDEL_IN(src, 20)
/datum/effect_system/steam_spread
effect_type = /obj/effect/particle_effect/steam