implement "non_local_items"

This commit is contained in:
Fabian Dill
2020-11-22 22:53:31 +01:00
parent fd020ead7f
commit fc2f1dfd29
6 changed files with 32 additions and 3 deletions

View File

@@ -490,6 +490,17 @@ def roll_settings(weights):
ret.local_items = ",".join(ret.local_items)
ret.non_local_items = set()
for item_name in weights.get('non_local_items', []):
items = item_name_groups.get(item_name, {item_name})
for item in items:
if item in item_table:
ret.non_local_items.add(item)
else:
raise Exception(f"Could not force item {item} to be world-local, as it was not recognized.")
ret.non_local_items = ",".join(ret.non_local_items)
if 'rom' in weights:
romweights = weights['rom']