Skip to content

Commit

Permalink
Merge branch 'main' into wargroove2
Browse files Browse the repository at this point in the history
  • Loading branch information
FlySniper authored Aug 11, 2024
2 parents 1e3bbbd + 8e06ab4 commit c511b70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion worlds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ def load(self) -> bool:
else: # TODO: remove with 3.8 support
mod = importer.load_module(os.path.basename(self.path).rsplit(".", 1)[0])

mod.__package__ = f"worlds.{mod.__package__}"
if mod.__package__ is not None:
mod.__package__ = f"worlds.{mod.__package__}"
else:
# load_module does not populate package, we'll have to assume mod.__name__ is correct here
# probably safe to remove with 3.8 support
mod.__package__ = f"worlds.{mod.__name__}"
mod.__name__ = f"worlds.{mod.__name__}"
sys.modules[mod.__name__] = mod
with warnings.catch_warnings():
Expand Down
3 changes: 2 additions & 1 deletion worlds/soe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ class SoEWorld(World):
connect_name: str

_halls_ne_chest_names: typing.List[str] = [loc.name for loc in _locations if 'Halls NE' in loc.name]
_fillers = sorted(item_name_groups["Ingredients"])

def __init__(self, multiworld: "MultiWorld", player: int):
self.connect_name_available_event = threading.Event()
Expand Down Expand Up @@ -469,7 +470,7 @@ def modify_multidata(self, multidata: typing.Dict[str, typing.Any]) -> None:
multidata["connect_names"][self.connect_name] = payload

def get_filler_item_name(self) -> str:
return self.random.choice(list(self.item_name_groups["Ingredients"]))
return self.random.choice(self._fillers)


class SoEItem(Item):
Expand Down
4 changes: 2 additions & 2 deletions worlds/tloz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ class TLoZWorld(World):
if v is not None:
location_name_to_id[k] = v + base_id

def __init__(self, world: MultiWorld, player: int):
super().__init__(world, player)
def __init__(self, multiworld: MultiWorld, player: int):
super().__init__(multiworld, player)
self.generator_in_use = threading.Event()
self.rom_name_available_event = threading.Event()
self.levels = None
Expand Down

0 comments on commit c511b70

Please sign in to comment.