Gets rid of another 400 sleep in init problems (#17265)

* Shadekin phase_in moved to timers

* Capture crystal to timers

* async

* PROC_REF
This commit is contained in:
Cameron Lennox
2025-03-04 09:41:53 -05:00
committed by GitHub
parent 8e4aadc657
commit a4a49b203f
3 changed files with 60 additions and 58 deletions
@@ -494,18 +494,14 @@
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
else if(!active) //The ball isn't set up, let's try to set it up.
if(isliving(target)) //We're hitting a mob, let's try to capture it.
sleep(10)
activate(thrower, target)
addtimer(CALLBACK(src, PROC_REF(activate), thrower, target), 10, TIMER_DELETE_ME)
return
sleep(10)
activate(thrower, src)
addtimer(CALLBACK(src, PROC_REF(activate), thrower, src), 10, TIMER_DELETE_ME)
else if(!bound_mob) //We hit something else, and we don't have a mob, so we can't really do anything!
to_chat(thrower, span_notice("\The [src] clicks unpleasantly..."))
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)
else if(bound_mob in contents) //We have our mob! Let's try to let it out.
sleep(10)
unleash(thrower, src)
update_icon()
addtimer(CALLBACK(src, PROC_REF(unleash), thrower, src), 10, TIMER_DELETE_ME)
else //Our mob isn't here, we can't do anything.
to_chat(thrower, span_notice("\The [src] clicks unpleasantly..."))
playsound(src, 'sound/effects/capture-crystal-negative.ogg', 75, 1, -1)