From 9032f8ccff0efe8efc873eab6b68ef3a3593b81e Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 11 Jul 2024 06:59:05 +0200 Subject: [PATCH] [NO GBP] the random spawner loot weight config is not an integer (#84814) ## About The Pull Request Sets `integer` to false. Also a tidbit about the `skew_loot_weight` proc, though loot lists with uneven weights all tend to add a value to all entries so it isn't an issue. ## Why It's Good For The Game The config isn't an integer. ## Changelog N/A --- code/controllers/configuration/entries/game_options.dm | 1 + code/game/objects/effects/spawners/random/random.dm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 8297085dbcf..30fdfe389ff 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -471,5 +471,6 @@ * 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/random.dm b/code/game/objects/effects/spawners/random/random.dm index fae8ff14cda..9614c4a1781 100644 --- a/code/game/objects/effects/spawners/random/random.dm +++ b/code/game/objects/effects/spawners/random/random.dm @@ -103,7 +103,7 @@ var/loot_weight = loot_list[loot_type] if(loot_weight <= 1) if(exponent < 1) - loot_list[loot_type] *= precision + loot_list[loot_type] = precision continue loot_list[loot_type] = round(loot_weight ** exponent * precision, 1)