converts some spawns into timers (#45429)

* converts spawns into timers

* linter

* change per review
This commit is contained in:
spookydonut
2019-07-29 17:23:15 +08:00
committed by Rob Bailey
parent 714c61c70f
commit 88eca69eb5
35 changed files with 228 additions and 232 deletions
+4 -3
View File
@@ -158,10 +158,11 @@
var/mob/living/M = AM
M.forceMove(get_turf(LA))
to_chat(M, "<span class='reallybig redtext'>You're trapped in a deadly arena! To escape, you'll need to drag a severed head to the escape portals.</span>")
spawn()
var/obj/effect/mine/pickup/bloodbath/B = new (M)
B.mineEffect(M)
INVOKE_ASYNC(src, .proc/do_bloodbath, M)
/obj/effect/forcefield/arena_shuttle_entrance/proc/do_bloodbath(mob/living/L)
var/obj/effect/mine/pickup/bloodbath/B = new (L)
B.mineEffect(L)
/area/shuttle_arena
name = "arena"
+1 -2
View File
@@ -288,8 +288,7 @@
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Monkeyize All Humans"))
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
spawn(0)
H.monkeyize()
INVOKE_ASYNC(H, /mob/living/carbon.proc/monkeyize)
ok = 1
if("allspecies")
+4 -8
View File
@@ -753,8 +753,7 @@
L.Unconscious(100)
sleep(5)
L.forceMove(pick(GLOB.tdome1))
spawn(50)
to_chat(L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"), 5 SECONDS)
log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Team 1)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Team 1)")
@@ -780,8 +779,7 @@
L.Unconscious(100)
sleep(5)
L.forceMove(pick(GLOB.tdome2))
spawn(50)
to_chat(L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"), 5 SECONDS)
log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Team 2)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Team 2)")
@@ -804,8 +802,7 @@
L.Unconscious(100)
sleep(5)
L.forceMove(pick(GLOB.tdomeadmin))
spawn(50)
to_chat(L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"), 5 SECONDS)
log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Admin.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Admin.)")
@@ -835,8 +832,7 @@
L.Unconscious(100)
sleep(5)
L.forceMove(pick(GLOB.tdomeobserve))
spawn(50)
to_chat(L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"), 5 SECONDS)
log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Observer.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Observer.)")
+2 -4
View File
@@ -245,8 +245,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(ishuman(M))
log_admin("[key_name(src)] has robotized [M.key].")
var/mob/living/carbon/human/H = M
spawn(0)
H.Robotize()
INVOKE_ASYNC(H, /mob/living/carbon/human.proc/Robotize)
else
alert("Invalid mob")
@@ -283,8 +282,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
return
log_admin("[key_name(src)] has animalized [M.key].")
spawn(0)
M.Animalize()
INVOKE_ASYNC(M, /mob.proc/Animalize)
/client/proc/makepAI(turf/T in GLOB.mob_list)