From 0af3fc340ca5435eb4f3b3927d653e43ead7bf05 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Thu, 2 Sep 2021 14:17:21 -0400 Subject: [PATCH 1/3] Spin Emote Changes --- code/modules/mob/living/carbon/human/emote.dm | 7 +++--- code/modules/mob/mob.dm | 24 ++++++++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index a8a4133310d..f138681add4 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -446,15 +446,14 @@ SpinAnimation(5,1) if("spin", "spins") - if(!restrained() && !lying) + if(!restrained()) if(prob(5)) - spin(30, 1) - message = "[src] spins too much!" + spin(32, 1) + to_chat(usr, "You spin too much!") Dizzy(12) Confused(12) else spin(20, 1) - message = "[src] spins!" if("aflap", "aflaps") if(!restrained()) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f801c0f072f..cafbc74e5b3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1351,17 +1351,23 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ return FALSE //overridden in living.dm /mob/proc/spin(spintime, speed) - set waitfor = 0 + set waitfor = FALSE if(!spintime || !speed || spintime > 100) CRASH("Aborted attempted call of /mob/proc/spin with invalid args ([spintime],[speed]) which could have frozen the server.") - var/end_time = world.time + spintime - var/spin_dir = prob(50) - while(world.time <= end_time) + var/D = dir + while(spintime >= speed) sleep(speed) - if(spin_dir) - dir = turn(dir, 90) - else - dir = turn(dir, -90) + switch(D) + if(NORTH) + D = EAST + if(SOUTH) + D = WEST + if(EAST) + D = SOUTH + if(WEST) + D = NORTH + setDir(D) + spintime -= speed /mob/proc/is_literate() return FALSE @@ -1479,7 +1485,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ MA.plane = GAME_PLANE pic.appearance = MA flick_overlay(pic, list(client), 10) - + GLOBAL_LIST_INIT(holy_areas, typecacheof(list( /area/chapel From 8fceeb0faa790c5d17b51e8c9be61920ccbf5aea Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Thu, 2 Sep 2021 14:28:35 -0400 Subject: [PATCH 2/3] tweak --- code/modules/mob/living/carbon/human/emote.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index f138681add4..cb86982cc61 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -446,7 +446,7 @@ SpinAnimation(5,1) if("spin", "spins") - if(!restrained()) + if(!incapacitated(ignore_lying = TRUE)) if(prob(5)) spin(32, 1) to_chat(usr, "You spin too much!") From 24f97f62eba3bff32de58fa102669146636595a2 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Wed, 8 Sep 2021 08:56:57 -0400 Subject: [PATCH 3/3] tweaks --- code/modules/mob/living/carbon/human/emote.dm | 2 +- code/modules/mob/mob.dm | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index cb86982cc61..d98e00b1e3f 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -449,7 +449,7 @@ if(!incapacitated(ignore_lying = TRUE)) if(prob(5)) spin(32, 1) - to_chat(usr, "You spin too much!") + to_chat(src, "You spin too much!") Dizzy(12) Confused(12) else diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index cafbc74e5b3..c6cceea3842 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1354,19 +1354,17 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ set waitfor = FALSE if(!spintime || !speed || spintime > 100) CRASH("Aborted attempted call of /mob/proc/spin with invalid args ([spintime],[speed]) which could have frozen the server.") - var/D = dir while(spintime >= speed) sleep(speed) - switch(D) + switch(dir) if(NORTH) - D = EAST + setDir(EAST) if(SOUTH) - D = WEST + setDir(WEST) if(EAST) - D = SOUTH + setDir(SOUTH) if(WEST) - D = NORTH - setDir(D) + setDir(NORTH) spintime -= speed /mob/proc/is_literate()