[MIRROR] Fixes some potential sleeps as detected by SpacemanDMM improvements (#1216)

* Fix some potential sleeps as detected by SpacemanDMM improvements (#54230)

overrides weren't detected by should not sleep, i think i've mostly
fixed that with SpaceManiac/SpacemanDMM#214

Some of these are wacky but overall this pr is harmless

signals shouldnt sleep even in weird 1 in a million situations or due
to other people adding bad code

overrides of changeling can_sting() use alert() and input() and that's
just too fucked for me to fix in this pr

* Fixes some potential sleeps as detected by SpacemanDMM improvements

Co-authored-by: spookydonut <github@spooksoftware.com>
This commit is contained in:
SkyratBot
2020-10-09 18:28:59 +02:00
committed by GitHub
co-authored by spookydonut
parent a76adbfbb6
commit 7eeaefe645
28 changed files with 111 additions and 95 deletions
+1 -2
View File
@@ -143,5 +143,4 @@
AM.set_anchored(TRUE)
flick("laserbox_burn", AM)
trigger()
sleep(15)
qdel(AM)
QDEL_IN(AM, 15)
+1 -3
View File
@@ -333,9 +333,7 @@
if(ishuman(hit_atom) && !caught && prob(throw_stun_chance))//if they are a carbon and they didn't catch it
baton_effect(hit_atom)
if(thrownby && !caught)
sleep(1)
if(!QDELETED(src))
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
addtimer(CALLBACK(src, /atom/movable.proc/throw_at, thrownby, throw_range+2, throw_speed, null, TRUE), 1)
else
return ..()
+5 -6
View File
@@ -1082,8 +1082,9 @@
playsound(src, 'sound/effects/explosionfar.ogg', 50, FALSE)
for(var/mob/M in urange(10, src)) // Checks range
if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
sleep(8) // Short delay to match up with the explosion sound
shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second.
// Short delay to match up with the explosion sound
// Shakes player camera 2 squares for 1 second.
addtimer(CALLBACK(GLOBAL_PROC, .proc/shake_camera, M, 2, 1), 0.8 SECONDS)
else
to_chat(user, "<span class='alert'>Nothing happens.</span>")
@@ -1471,8 +1472,7 @@
if(cooldown <= world.time)
cooldown = (world.time + 300)
user.visible_message("<span class='notice'>[user] adjusts the dial on [src].</span>")
sleep(5)
playsound(src, 'sound/items/radiostatic.ogg', 50, FALSE)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/items/radiostatic.ogg', 50, FALSE), 0.5 SECONDS)
else
to_chat(user, "<span class='warning'>The dial on [src] jams up</span>")
return
@@ -1487,5 +1487,4 @@
/obj/item/toy/braintoy/attack_self(mob/user)
if(cooldown <= world.time)
cooldown = (world.time + 10)
sleep(5)
playsound(src, 'sound/effects/blobattack.ogg', 50, FALSE)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/effects/blobattack.ogg', 50, FALSE), 0.5 SECONDS)