Skip to content

Commit

Permalink
Merge branch 'timespinner_make_hidden_options_pickle' of https://gith…
Browse files Browse the repository at this point in the history
…ub.com/Jarno458/Archipelago into timespinner_make_hidden_options_pickle
  • Loading branch information
Jarno458 committed Oct 15, 2024
2 parents 4f84edb + 28d4189 commit f8dd965
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
11 changes: 6 additions & 5 deletions MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,9 @@ class Context:
slot_info: typing.Dict[int, NetworkSlot]
generator_version = Version(0, 0, 0)
checksums: typing.Dict[str, str]
item_names: typing.Dict[str, typing.Dict[int, str]] = (
collections.defaultdict(lambda: Utils.KeyedDefaultDict(lambda code: f'Unknown item (ID:{code})')))
item_names: typing.Dict[str, typing.Dict[int, str]]
item_name_groups: typing.Dict[str, typing.Dict[str, typing.Set[str]]]
location_names: typing.Dict[str, typing.Dict[int, str]] = (
collections.defaultdict(lambda: Utils.KeyedDefaultDict(lambda code: f'Unknown location (ID:{code})')))
location_names: typing.Dict[str, typing.Dict[int, str]]
location_name_groups: typing.Dict[str, typing.Dict[str, typing.Set[str]]]
all_item_and_group_names: typing.Dict[str, typing.Set[str]]
all_location_and_group_names: typing.Dict[str, typing.Set[str]]
Expand All @@ -198,7 +196,6 @@ class Context:
""" each sphere is { player: { location_id, ... } } """
logger: logging.Logger


def __init__(self, host: str, port: int, server_password: str, password: str, location_check_points: int,
hint_cost: int, item_cheat: bool, release_mode: str = "disabled", collect_mode="disabled",
remaining_mode: str = "disabled", auto_shutdown: typing.SupportsFloat = 0, compatibility: int = 2,
Expand Down Expand Up @@ -269,6 +266,10 @@ def __init__(self, host: str, port: int, server_password: str, password: str, lo
self.location_name_groups = {}
self.all_item_and_group_names = {}
self.all_location_and_group_names = {}
self.item_names = collections.defaultdict(
lambda: Utils.KeyedDefaultDict(lambda code: f'Unknown item (ID:{code})'))
self.location_names = collections.defaultdict(
lambda: Utils.KeyedDefaultDict(lambda code: f'Unknown location (ID:{code})'))
self.non_hintable_names = collections.defaultdict(frozenset)

self._load_game_data()
Expand Down
2 changes: 1 addition & 1 deletion worlds/minecraft/Structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def set_pair(exit, struct):

# Connect plando structures first
if self.options.plando_connections:
for conn in self.plando_connections:
for conn in self.options.plando_connections:
set_pair(conn.entrance, conn.exit)

# The algorithm tries to place the most restrictive structures first. This algorithm always works on the
Expand Down
4 changes: 4 additions & 0 deletions worlds/oot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ class OOTWorld(World):
"Small Key Ring (Spirit Temple)", "Small Key Ring (Thieves Hideout)", "Small Key Ring (Water Temple)",
"Boss Key (Fire Temple)", "Boss Key (Forest Temple)", "Boss Key (Ganons Castle)",
"Boss Key (Shadow Temple)", "Boss Key (Spirit Temple)", "Boss Key (Water Temple)"},

# aliases
"Longshot": {"Progressive Hookshot"}, # fuzzy hinting thought Longshot was Slingshot
"Hookshot": {"Progressive Hookshot"}, # for consistency, mostly
}

location_name_groups = build_location_name_groups()
Expand Down
2 changes: 1 addition & 1 deletion worlds/timespinner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def write_spoiler_header(self, spoiler_handle: TextIO) -> None:

if self.options.has_replaced_options:
warning = \
f"NOTICE: Timespinner options for player '{self.player_name}' where renamed from PasCalCase to snake_case, " \
f"NOTICE: Timespinner options for player '{self.player_name}' were renamed from PascalCase to snake_case, " \
"please update your yaml"

spoiler_handle.write("\n")
Expand Down

0 comments on commit f8dd965

Please sign in to comment.