mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-23 13:33:21 -07:00
Fixes: TypeError: 'set' object is not subscriptable
random.choice does not work over set objects, cast to a list to allow 'trap_selection_override'
This commit is contained in:
committed by
GitHub
parent
59f7147fc4
commit
cd1d7c844b
@@ -832,7 +832,7 @@ class Items:
|
||||
|
||||
def get_filler_item_name(self, random: Random, options: SatisfactoryOptions) -> str:
|
||||
trap_chance: int = options.trap_chance.value
|
||||
enabled_traps: List[str] = options.trap_selection_override.value
|
||||
enabled_traps: List[str] = list(options.trap_selection_override.value)
|
||||
|
||||
if enabled_traps and random.random() < (trap_chance / 100):
|
||||
return random.choice(enabled_traps)
|
||||
|
||||
Reference in New Issue
Block a user