Skip to content

Commit

Permalink
Fix build_world_graphs for per-world settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fenhl committed Nov 25, 2023
1 parent 2bf50bb commit 8e6e832
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def build_world_graphs(world_settings: list[Settings]) -> list[World]:
logger.info('Creating Overworld')

# Load common json rule files (those used regardless of MQ status)
if settings.logic_rules == 'glitched':
if world.settings.logic_rules == 'glitched':
path = 'Glitched World'
else:
path = 'World'
Expand All @@ -143,7 +143,7 @@ def build_world_graphs(world_settings: list[Settings]) -> list[World]:
savewarps_to_connect += world.create_dungeons()
world.create_internal_locations()

if settings.shopsanity != 'off':
if world.settings.shopsanity != 'off':
world.random_shop_prices()
world.set_scrub_prices()

Expand All @@ -157,7 +157,7 @@ def build_world_graphs(world_settings: list[Settings]) -> list[World]:
if world.settings.shuffle_dungeon_rewards in ('vanilla', 'reward'):
world.fill_bosses()

if settings.triforce_hunt:
if any(world.settings.triforce_hunt for world in worlds):
settings.distribution.configure_triforce_hunt(worlds)

logger.info('Setting Entrances.')
Expand Down
7 changes: 4 additions & 3 deletions Plandomizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,9 +1224,10 @@ def configure_triforce_hunt(self, worlds: list[World]) -> None:
#TODO add starting pieces from other skipped checks (Links Pocket, pre-completed dungeons)
if world.skip_child_zelda and 'Song from Impa' in world.distribution.locations and world.distribution.locations['Song from Impa'].item == triforce_piece:
total_starting_count += 1
total_count += world.triforce_count
if world.settings.triforce_hunt_mode == 'ice_percent': #TODO instead of hardcoding Ice%, scan filled locations
total_count += 1
if world.settings.triforce_hunt:
total_count += world.triforce_count_per_world
if world.settings.triforce_hunt_mode == 'ice_percent': #TODO instead of hardcoding Ice%, scan filled locations
total_count += 1

if total_starting_count >= world.triforce_goal:
raise RuntimeError('Too many Triforce Pieces in starting items. There should be at most %d and there are %d.' % (world.triforce_goal - 1, total_starting_count))
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__version__ = '8.0.2'

# This is a supplemental version number for branches based off of main dev.
supplementary_version = 5
supplementary_version = 6

# Pick a unique identifier byte for your fork if you are intending to have a long-lasting branch.
# This will be 0x00 for main releases and 0x01 for main dev.
Expand Down

0 comments on commit 8e6e832

Please sign in to comment.