small config fix
This commit is contained in:
parent
67afa22e2e
commit
956d5927cd
1 changed files with 2 additions and 2 deletions
|
@ -25,8 +25,8 @@ def get_rarity_to_weight(config_section):
|
|||
"""Parses Rarity_X keys from config and returns a {rarity: weight} dict."""
|
||||
rarity_weights = {}
|
||||
for key, value in config_section.items():
|
||||
if key.startswith("Rarity_"):
|
||||
rarity = int(key.removeprefix("Rarity_"))
|
||||
if key.startswith("rarity_"):
|
||||
rarity = int(key.removeprefix("rarity_"))
|
||||
rarity_weights[rarity] = float(value)
|
||||
return rarity_weights
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue