Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
alwaysintreble committed Nov 2, 2022
1 parent 1c71588 commit 53716db
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions BaseClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,7 @@ def write_option(option_key: str, option_obj: type(Options.Option)):
if player in self.multiworld.get_game_players("A Link to the Past"):
outfile.write('%s%s\n' % ('Hash: ', self.hashes[player]))

outfile.write('Goal: %s\n' % self.multiworld.goal[player].value)
outfile.write('Entrance Shuffle: %s\n' % self.multiworld.shuffle[player])
if self.multiworld.shuffle[player] != "vanilla":
outfile.write('Entrance Shuffle Seed %s\n' % self.multiworld.worlds[player].er_seed)
Expand Down
16 changes: 8 additions & 8 deletions Generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,14 @@ def handle_name(name: str, player: int, name_counter: Counter):

from worlds.alttp.Options import Goal
goals = {
'ganon': Goal.option_ganon_and_tower,
'crystals': Goal.option_ganon,
'bosses': Goal.option_all_bosses,
'pedestal': Goal.option_pedestal,
'ganon_pedestal': Goal.option_pedestal_ganon,
'triforce_hunt': Goal.option_triforce_hunt,
'ganon_triforce_hunt': Goal.option_triforce_hunt_ganon,
'ice_rod_hunt': Goal.option_ice_rod_hunt,
'ganon': Goal.from_any(Goal.option_ganon_and_tower),
'crystals': Goal.from_any(Goal.option_ganon),
'bosses': Goal.from_any(Goal.option_all_bosses),
'pedestal': Goal.from_any(Goal.option_pedestal),
'ganon_pedestal': Goal.from_any(Goal.option_pedestal_ganon),
'triforce_hunt': Goal.from_any(Goal.option_triforce_hunt),
'ganon_triforce_hunt': Goal.from_any(Goal.option_triforce_hunt_ganon),
'ice_rod_hunt': Goal.from_any(Goal.option_ice_rod_hunt),
}


Expand Down
1 change: 1 addition & 0 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No

world.shuffle = args.shuffle.copy()
world.boss_shuffle = args.shufflebosses.copy()
world.goal = args.goal.copy()
world.beemizer_total_chance = args.beemizer_total_chance.copy()
world.beemizer_trap_chance = args.beemizer_trap_chance.copy()
world.shop_shuffle = args.shop_shuffle.copy()
Expand Down
6 changes: 6 additions & 0 deletions Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,12 @@ def __eq__(self, other: typing.Any):
else:
raise TypeError(f"Can't compare {self.__class__.__name__} with {other.__class__.__name__}")

@classmethod
def get_option_name(cls, value: T) -> str:
if value in cls.name_lookup:
return cls.name_lookup[value]
return value


class BossMeta(AssembleOptions):
def __new__(mcs, name, bases, attrs):
Expand Down

0 comments on commit 53716db

Please sign in to comment.