From b0b90d4d2869a68a4a51597cb5355225d4863028 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 00:45:17 -0700 Subject: [PATCH 01/11] Update game_options.dm --- code/controllers/configuration/entries/game_options.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 6efc9eab12..52307262ff 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -249,6 +249,9 @@ /datum/config_entry/number/movedelay/walk_delay +/datum/config_entry/number/movedelay/sprint_speed_increase + config_entry_value = 1 + /////////////////////////////////////////////////Outdated move delay /datum/config_entry/number/outdated_movedelay deprecated_by = /datum/config_entry/keyed_list/multiplicative_movespeed From 4a40090061717363e58607b557ae8c1a2192ec34 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:00:29 -0700 Subject: [PATCH 02/11] Update human_movement.dm --- .../code/modules/mob/living/carbon/human/human_movement.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm index 0b6903c9fe..cafd86ac26 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm @@ -12,8 +12,11 @@ /mob/living/carbon/human/movement_delay() . = 0 - if(!resting && m_intent == MOVE_INTENT_RUN && !sprinting) - . += 1 + if(!resting && m_intent == MOVE_INTENT_RUN && sprinting) + var/static/datum/config_entry/number/movespeed/sprint_speed_increase/SSI + if(!SSI) + SSI = CONFIG_GET_ENTRY(number/movespeed/sprint_speed_increase) + . -= SSI.config_entry_value if(wrongdirmovedelay) . += 1 . += ..() From ea5f35a457b55145859217bac1b85b155ed82467 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:06:50 -0700 Subject: [PATCH 03/11] Update game_options.dm --- .../controllers/configuration/entries/game_options.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 52307262ff..b3668bc728 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -249,9 +249,18 @@ /datum/config_entry/number/movedelay/walk_delay -/datum/config_entry/number/movedelay/sprint_speed_increase +/datum/config_entry/number/sprint_speed_increase config_entry_value = 1 +/datum/config_entry/number/sprint_buffer_max + config_entry_value = 42 + +/datum/config_entry/number/sprint_stamina_cost + config_entry_value = 0.7 + +/datum/config_entry/number/sprint_buffer_regen_per_ds + config_entry_value = 0.3 + /////////////////////////////////////////////////Outdated move delay /datum/config_entry/number/outdated_movedelay deprecated_by = /datum/config_entry/keyed_list/multiplicative_movespeed From b47f92716e330d47451bfb987143a3136234d504 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:07:06 -0700 Subject: [PATCH 04/11] Update human_movement.dm --- .../code/modules/mob/living/carbon/human/human_movement.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm index cafd86ac26..4d8c7a4b25 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm @@ -13,9 +13,9 @@ /mob/living/carbon/human/movement_delay() . = 0 if(!resting && m_intent == MOVE_INTENT_RUN && sprinting) - var/static/datum/config_entry/number/movespeed/sprint_speed_increase/SSI + var/static/datum/config_entry/movespeed/sprint_speed_increase/SSI if(!SSI) - SSI = CONFIG_GET_ENTRY(number/movespeed/sprint_speed_increase) + SSI = CONFIG_GET_ENTRY(movespeed/sprint_speed_increase) . -= SSI.config_entry_value if(wrongdirmovedelay) . += 1 From 871ae491927c05c6df6c7b60ac095c44bf5e89dc Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:12:44 -0700 Subject: [PATCH 05/11] Update living.dm --- modular_citadel/code/modules/mob/living/living.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modular_citadel/code/modules/mob/living/living.dm b/modular_citadel/code/modules/mob/living/living.dm index 513a80cae0..536b7ece50 100644 --- a/modular_citadel/code/modules/mob/living/living.dm +++ b/modular_citadel/code/modules/mob/living/living.dm @@ -17,6 +17,12 @@ var/sprint_stamina_cost = 0.70 //stamina loss per tile while insufficient sprint buffer. //---End +/mob/living/update_config_movespeed() + . = ..() + sprint_buffer_max = CONFIG_GET(number/movespeed/sprint_buffer_max) + sprint_buffer_regen_ds = CONFIG_GET(number/movespeed/sprint_buffer_regen_per_ds) + sprint_stamina_cost = CONFIG_GET(number/movespeed/sprint_stamina_cost) + /mob/living/movement_delay(ignorewalk = 0) . = ..() if(resting) From afe9498ebe2ae4cba05144fa3340c3430cfac337 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:51:56 -0700 Subject: [PATCH 06/11] Update living.dm --- modular_citadel/code/modules/mob/living/living.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modular_citadel/code/modules/mob/living/living.dm b/modular_citadel/code/modules/mob/living/living.dm index 536b7ece50..0caf548196 100644 --- a/modular_citadel/code/modules/mob/living/living.dm +++ b/modular_citadel/code/modules/mob/living/living.dm @@ -19,9 +19,9 @@ /mob/living/update_config_movespeed() . = ..() - sprint_buffer_max = CONFIG_GET(number/movespeed/sprint_buffer_max) - sprint_buffer_regen_ds = CONFIG_GET(number/movespeed/sprint_buffer_regen_per_ds) - sprint_stamina_cost = CONFIG_GET(number/movespeed/sprint_stamina_cost) + sprint_buffer_max = CONFIG_GET(number/movedelay/sprint_buffer_max) + sprint_buffer_regen_ds = CONFIG_GET(number/movedelay/sprint_buffer_regen_per_ds) + sprint_stamina_cost = CONFIG_GET(number/movedelay/sprint_stamina_cost) /mob/living/movement_delay(ignorewalk = 0) . = ..() From e5759f21e3e5dc1f9ce1c7e661e9434a6e841104 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:52:20 -0700 Subject: [PATCH 07/11] Update human_movement.dm --- .../code/modules/mob/living/carbon/human/human_movement.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm index 4d8c7a4b25..cafd86ac26 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm @@ -13,9 +13,9 @@ /mob/living/carbon/human/movement_delay() . = 0 if(!resting && m_intent == MOVE_INTENT_RUN && sprinting) - var/static/datum/config_entry/movespeed/sprint_speed_increase/SSI + var/static/datum/config_entry/number/movespeed/sprint_speed_increase/SSI if(!SSI) - SSI = CONFIG_GET_ENTRY(movespeed/sprint_speed_increase) + SSI = CONFIG_GET_ENTRY(number/movespeed/sprint_speed_increase) . -= SSI.config_entry_value if(wrongdirmovedelay) . += 1 From 16c14b55ae930a2bda40a9667d3e7a959dadb69f Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:52:43 -0700 Subject: [PATCH 08/11] Update game_options.dm --- code/controllers/configuration/entries/game_options.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index b3668bc728..a3bc47ac91 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -249,16 +249,16 @@ /datum/config_entry/number/movedelay/walk_delay -/datum/config_entry/number/sprint_speed_increase +/datum/config_entry/number/movedelay/sprint_speed_increase config_entry_value = 1 -/datum/config_entry/number/sprint_buffer_max +/datum/config_entry/number/movedelay/sprint_buffer_max config_entry_value = 42 -/datum/config_entry/number/sprint_stamina_cost +/datum/config_entry/number/movedelay/sprint_stamina_cost config_entry_value = 0.7 -/datum/config_entry/number/sprint_buffer_regen_per_ds +/datum/config_entry/number/movedelay/sprint_buffer_regen_per_ds config_entry_value = 0.3 /////////////////////////////////////////////////Outdated move delay From c345852abb978b17faaecff99678706073f26d72 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 01:53:53 -0700 Subject: [PATCH 09/11] Update human_movement.dm --- .../code/modules/mob/living/carbon/human/human_movement.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm index cafd86ac26..bd43d96ba4 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm @@ -13,9 +13,9 @@ /mob/living/carbon/human/movement_delay() . = 0 if(!resting && m_intent == MOVE_INTENT_RUN && sprinting) - var/static/datum/config_entry/number/movespeed/sprint_speed_increase/SSI + var/static/datum/config_entry/number/movedelay/sprint_speed_increase/SSI if(!SSI) - SSI = CONFIG_GET_ENTRY(number/movespeed/sprint_speed_increase) + SSI = CONFIG_GET_ENTRY(number/movedelay/sprint_speed_increase) . -= SSI.config_entry_value if(wrongdirmovedelay) . += 1 From 10e8d383acd7b4f4eaab43948d5c9d464bf1a4f3 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 02:25:00 -0700 Subject: [PATCH 10/11] Update configuration.dm --- code/__DEFINES/configuration.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/__DEFINES/configuration.dm b/code/__DEFINES/configuration.dm index 3034876e36..6b70eb1e0f 100644 --- a/code/__DEFINES/configuration.dm +++ b/code/__DEFINES/configuration.dm @@ -1,6 +1,7 @@ //config files #define CONFIG_GET(X) global.config.Get(/datum/config_entry/##X) #define CONFIG_SET(X, Y) global.config.Set(/datum/config_entry/##X, ##Y) +#define CONFIG_GET_ENTRY(X) global.config.GetEntryDatum(/datum/config_entry/##X) #define CONFIG_MAPS_FILE "maps.txt" From 3dcd2a75cf020e4f81f6f44abb3b9ca7309d66d6 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 22 Jan 2020 02:27:51 -0700 Subject: [PATCH 11/11] Update configuration.dm --- code/controllers/configuration/configuration.dm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index 4ce0ccf361..ad1f869057 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -193,6 +193,13 @@ stat("[name]:", statclick) /datum/controller/configuration/proc/Get(entry_type) + var/datum/config_entry/E = GetEntryDatum(entry_type) + if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]") + log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]") + return + return E.config_entry_value + +/datum/controller/configuration/proc/GetEntryDatum(entry_type) var/datum/config_entry/E = entry_type var/entry_is_abstract = initial(E.abstract_type) == entry_type if(entry_is_abstract) @@ -200,10 +207,7 @@ E = entries_by_type[entry_type] if(!E) CRASH("Missing config entry for [entry_type]!") - if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]") - log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]") - return - return E.config_entry_value + return E /datum/controller/configuration/proc/Set(entry_type, new_val) var/datum/config_entry/E = entry_type