From bc76fa615d90e1dbe2e4690a2cb2381b5d1f1b65 Mon Sep 17 00:00:00 2001 From: Weblure Date: Fri, 3 Jul 2020 17:05:56 -0700 Subject: [PATCH 1/3] Fixed small strides formula --- code/datums/dna.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index ed5104e296..80059bece7 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -678,7 +678,7 @@ holder.update_transform() var/danger = CONFIG_GET(number/threshold_body_size_slowdown) if(features["body_size"] < danger) - var/slowdown = 1 + round(danger/features["body_size"], 0.1) * CONFIG_GET(number/body_size_slowdown_multiplier) + var/slowdown = (1 - round(features["body_size"] / danger, 0.1)) * CONFIG_GET(number/body_size_slowdown_multiplier) holder.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/small_stride, TRUE, slowdown) else if(old_size < danger) holder.remove_movespeed_modifier(/datum/movespeed_modifier/small_stride) From c9ec6d4a037f27a949c380340dbd9a3922aa2aa7 Mon Sep 17 00:00:00 2001 From: Weblure Date: Fri, 3 Jul 2020 21:51:22 -0700 Subject: [PATCH 2/3] Fixes a button, rewords text to be clearer --- code/modules/client/preferences.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 2efc7f8cd3..37dffc191d 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2326,10 +2326,12 @@ GLOBAL_LIST_EMPTY(preferences_datums) if (new_body_size) new_body_size = clamp(new_body_size * 0.01, min, max) var/dorfy - if(danger > new_body_size) - dorfy = alert(user, "The chosen size appears to be smaller than the threshold of [danger*100]%, which will lead to an added exponential slowdown. Are you sure about that?", "Dwarfism Alert", "Yes", "Move it to the threshold", "No") - if(!dorfy || dorfy == "Move it above the threshold") + if((new_body_size + 0.01) < danger) //Skyrat - Adding 0.01 as a dumb fix to prevent the warning message from appearing when exactly at threshold... Not sure why that happens in the first place. + dorfy = alert(user, "You have chosen a size below the slowdown threshold of [danger*100]%. For balancing purposes, the further you go below this percentage, the slower your character will be. Do you wish to keep this size?", "Speed Penalty Alert", "Yes", "Move it to the threshold", "No") //Skyrat - reworded + if(dorfy == "Move it to the threshold") //Skyrat - typo fix new_body_size = danger + if(!dorfy) //Skyrat - Aborts if this var is somehow empty + return if(dorfy != "No") features["body_size"] = new_body_size if("tongue") From 832bea9ca5239e66f526be1ecd99865edf573ff3 Mon Sep 17 00:00:00 2001 From: Weblure Date: Fri, 3 Jul 2020 21:55:42 -0700 Subject: [PATCH 3/3] Fixed sentence formatting, removed Skyrat comments --- code/modules/client/preferences.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 37dffc191d..aaee5c85f6 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2322,15 +2322,15 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/min = CONFIG_GET(number/body_size_min) var/max = CONFIG_GET(number/body_size_max) var/danger = CONFIG_GET(number/threshold_body_size_slowdown) - var/new_body_size = input(user, "Choose your desired sprite size:\n([min*100]%-[max*100]%), Warning: May make your character look distorted[danger > min ? ", and an exponential slowdown will occur for those smaller than [danger*100]%!" : "!"]", "Character Preference", features["body_size"]*100) as num|null + var/new_body_size = input(user, "Choose your desired sprite size: ([min*100]%-[max*100]%)\nWarning: This may make your character look distorted[danger > min ? "! Additionally, a proportional movement speed penalty will be applied to characters smaller than [danger*100]%." : "!"]", "Character Preference", features["body_size"]*100) as num|null if (new_body_size) new_body_size = clamp(new_body_size * 0.01, min, max) var/dorfy - if((new_body_size + 0.01) < danger) //Skyrat - Adding 0.01 as a dumb fix to prevent the warning message from appearing when exactly at threshold... Not sure why that happens in the first place. - dorfy = alert(user, "You have chosen a size below the slowdown threshold of [danger*100]%. For balancing purposes, the further you go below this percentage, the slower your character will be. Do you wish to keep this size?", "Speed Penalty Alert", "Yes", "Move it to the threshold", "No") //Skyrat - reworded - if(dorfy == "Move it to the threshold") //Skyrat - typo fix + if((new_body_size + 0.01) < danger) // Adding 0.01 as a dumb fix to prevent the warning message from appearing when exactly at threshold... Not sure why that happens in the first place. + dorfy = alert(user, "You have chosen a size below the slowdown threshold of [danger*100]%. For balancing purposes, the further you go below this percentage, the slower your character will be. Do you wish to keep this size?", "Speed Penalty Alert", "Yes", "Move it to the threshold", "No") + if(dorfy == "Move it to the threshold") new_body_size = danger - if(!dorfy) //Skyrat - Aborts if this var is somehow empty + if(!dorfy) //Aborts if this var is somehow empty return if(dorfy != "No") features["body_size"] = new_body_size