mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Ports over Timer Subsystem
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user