From a0867d0557210a8ac13a6597397f436106ef3041 Mon Sep 17 00:00:00 2001 From: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:53:29 -0500 Subject: [PATCH] makes the config for random loot weight a define instead (#3645) ## About The Pull Request ## Why It's Good For The Game ## Changelog :cl: fix: no more constant odditys /:cl: --------- Co-authored-by: Sun-Soaked <45698967+Sun-Soaked@users.noreply.github.com> --- code/controllers/configuration/entries/game_options.dm | 10 ---------- code/game/objects/effects/spawners/random.dm/random.dm | 5 +++-- config/game_options.txt | 5 ----- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 37256f9ce833..ac7298dc100d 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -431,13 +431,3 @@ max_val = 255 config_entry_value = 127 min_val = 127 - -/** - * A config that skews with the random spawners weights - * If the value is lower than 1, it'll tend to even out the odds - * If higher than 1, it'll lean toward common spawns even more. - */ -/datum/config_entry/number/random_loot_weight_modifier - integer = FALSE - default = 1 - min_val = 0.05 diff --git a/code/game/objects/effects/spawners/random.dm/random.dm b/code/game/objects/effects/spawners/random.dm/random.dm index 0e6606f3b9ee..aeeab4ab5a31 100644 --- a/code/game/objects/effects/spawners/random.dm/random.dm +++ b/code/game/objects/effects/spawners/random.dm/random.dm @@ -1,3 +1,5 @@ +#define RANDOM_LOOT_WEIGHT_MODIFIER 1 + /** * Base class for all random spawners. */ @@ -54,8 +56,7 @@ if(loot_subtype_path) loot += subtypesof(loot_subtype_path) - if(CONFIG_GET(number/random_loot_weight_modifier) != 1) - skew_loot_weights(loot, CONFIG_GET(number/random_loot_weight_modifier)) + skew_loot_weights(loot, RANDOM_LOOT_WEIGHT_MODIFIER) if(loot?.len) var/loot_spawned = 0 diff --git a/config/game_options.txt b/config/game_options.txt index 005649a1480c..135123b845ad 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -593,8 +593,3 @@ BLUESPACE_JUMP_WAIT 12000 ## If admins are allowed to use the authentication server as a regular server for testing AUTH_ADMIN_TESTING - -# A config that skews with the random spawners weights -# If the value is lower than 1, it'll tend to even out the odds -# If higher than 1, it'll lean toward common spawns even more. -RANDOM_LOOT_WEIGHT_MODIFIER 1