mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
make world-local items available as a general option
This commit is contained in:
14
Mystery.py
14
Mystery.py
@@ -14,6 +14,7 @@ from Utils import parse_yaml
|
||||
from Rom import get_sprite_from_name
|
||||
from EntranceRandomizer import parse_arguments
|
||||
from Main import main as ERmain
|
||||
from Items import item_name_groups, item_table
|
||||
|
||||
|
||||
|
||||
@@ -355,11 +356,22 @@ def roll_settings(weights):
|
||||
startitems.append(item)
|
||||
elif itemvalue:
|
||||
startitems.append(item)
|
||||
ret.glitch_boots = get_choice('glitch_boots', weights) if 'glitch_boots' in weights else True
|
||||
ret.startinventory = ','.join(startitems)
|
||||
|
||||
ret.glitch_boots = get_choice('glitch_boots', weights) if 'glitch_boots' in weights else True
|
||||
|
||||
ret.remote_items = get_choice('remote_items', weights) if 'remote_items' in weights else False
|
||||
|
||||
ret.local_items = set()
|
||||
for item_name in weights.get('local_items', []):
|
||||
items = item_name_groups.get(item_name, {item_name})
|
||||
for item in items:
|
||||
if item in item_table:
|
||||
ret.local_items.add(item)
|
||||
else:
|
||||
logging.warning(f"Could not force item {item} to be world-local, as it was not recognized.")
|
||||
ret.local_items = ",".join(ret.local_items)
|
||||
|
||||
if 'rom' in weights:
|
||||
romweights = weights['rom']
|
||||
ret.sprite = get_choice('sprite', romweights)
|
||||
|
Reference in New Issue
Block a user