Skip to content

Commit 89e16da

Browse files
committed
Fix comments
1 parent a323479 commit 89e16da

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,17 +334,17 @@ def write_spoiler(self, spoiler_handle):
334334
before_write_spoiler(self, self.multiworld, spoiler_handle)
335335

336336
def extend_hint_information(self, hint_data: dict[int, dict[int, str]]) -> None:
337-
before_extend_hint_information(self, hint_data)
337+
before_extend_hint_information(hint_data, self, self.multiworld, self.player)
338338

339-
for location in self.multiworld.get_locations(world.player):
339+
for location in self.multiworld.get_locations(self.player):
340340
if not location.address:
341341
continue
342342
if "hint_entrance" in self.location_name_to_location[location.name]:
343343
if self.player not in hint_data:
344344
hint_data.update({self.player: {}})
345345
hint_data[self.player][location.address] = self.location_name_to_location[location.name]["hint_entrance"]
346346

347-
after_extend_hint_information(self, hint_data)
347+
after_extend_hint_information(hint_data, self, self.multiworld, self.player)
348348

349349
###
350350
# Non-standard AP world methods

src/hooks/World.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,20 @@ def before_write_spoiler(world: World, multiworld: MultiWorld, spoiler_handle) -
140140
pass
141141

142142
# This is called when you want to add information to the hint text
143-
def before_extend_hint_information(world: World, hint_data: dict[int, dict[int, str]]) -> None:
143+
def before_extend_hint_information(hint_data: dict[int, dict[int, str]], world: World, multiworld: MultiWorld, player: int) -> None:
144144

145145
### Example way to use this hook:
146-
# hint_data.update({world.player: {}})
147-
# for location in world.multiworld.get_locations(world.player):
146+
# if player not in hint_data:
147+
# hint_data.update({player: {}})
148+
# for location in multiworld.get_locations(player):
148149
# if not location.address:
149150
# continue
150151
#
151152
# use this section to calculate the hint string
152153
#
153-
# hint_data[world.player][location.address] = hint_string
154+
# hint_data[player][location.address] = hint_string
154155

155156
pass
156157

157-
def after_extend_hint_information(world: World, hint_data: dict[int, dict[int, str]]) -> None:
158+
def after_extend_hint_information(hint_data: dict[int, dict[int, str]], world: World, multiworld: MultiWorld, player: int) -> None:
158159
pass

0 commit comments

Comments
 (0)