Ports over Timer Subsystem

This commit is contained in:
Fox McCloud
2018-04-28 20:26:04 -04:00
parent 580d5b353d
commit cfe182a1f7
63 changed files with 642 additions and 209 deletions
+2 -2
View File
@@ -11,7 +11,7 @@
dream_images += pick_n_take(dreams)
dreaming++
for(var/i in 1 to dream_images.len)
addtimer(src, "experience_dream", ((i - 1) * rand(30,60)), FALSE, dream_images[i], FALSE)
addtimer(CALLBACK(src, .proc/experience_dream, dream_images[i], FALSE), ((i - 1) * rand(30,60)))
return TRUE
@@ -33,7 +33,7 @@
dream_images += pick_n_take(nightmares)
nightmare++
for(var/i in 1 to dream_images.len)
addtimer(src, "experience_dream", ((i - 1) * rand(30,60)), FALSE, nightmares[i], TRUE)
addtimer(CALLBACK(src, .proc/experience_dream, nightmares[i], TRUE), ((i - 1) * rand(30,60)))
return TRUE
/mob/living/carbon/proc/handle_dreams()
+5 -5
View File
@@ -339,7 +339,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
s.loc = get_step(get_turf(s), get_dir(s, target))
s.Show()
s.Eat()
addtimer(src, "wake_and_restore", rand(50, 100))
addtimer(CALLBACK(src, .proc/wake_and_restore), rand(50, 100))
qdel(s)
/obj/effect/hallucination/simple/singularity
@@ -365,9 +365,9 @@ Gunshots/explosions/opening doors/less rare audio (done)
for(var/i=0,i<hits,i++)
target.playsound_local(null, 'sound/weapons/Laser.ogg', 25, 1)
if(prob(75))
addtimer(target, "playsound_local", rand(10,20), null, 'sound/weapons/sear.ogg', 25, 1)
addtimer(CALLBACK(target, /mob/.proc/playsound_local, null, 'sound/weapons/sear.ogg', 25, 1), rand(10,20))
else
addtimer(target, "playsound_local", rand(10,20), null, 'sound/weapons/effects/searwall.ogg', 25, 1)
addtimer(CALLBACK(target, /mob/.proc/playsound_local, null, 'sound/weapons/effects/searwall.ogg', 25, 1), rand(10,20))
sleep(rand(CLICK_CD_RANGE, CLICK_CD_RANGE + 8))
target.playsound_local(null, get_sfx("bodyfall"), 25)
if(2) //Esword fight
@@ -381,9 +381,9 @@ Gunshots/explosions/opening doors/less rare audio (done)
for(var/i=0,i<hits,i++)
target.playsound_local(null, get_sfx("gunshot"), 25)
if(prob(75))
addtimer(target, "playsound_local", rand(10,20), null, 'sound/weapons/pierce.ogg', 25, 1)
addtimer(CALLBACK(target, /mob/.proc/playsound_local, null, 'sound/weapons/pierce.ogg', 25, 1), rand(10,20))
else
addtimer(target, "playsound_local", rand(10,20), null, "ricochet", 25, 1)
addtimer(CALLBACK(target, /mob/.proc/playsound_local, null, "ricochet", 25, 1), rand(10,20))
sleep(rand(CLICK_CD_RANGE, CLICK_CD_RANGE + 8))
target.playsound_local(null, get_sfx("bodyfall"), 25, 1)
if(4) //Stunprod + cablecuff