Skip to content

Commit

Permalink
Add some more convenience methods
Browse files Browse the repository at this point in the history
  • Loading branch information
NewSoupVi committed Mar 24, 2024
1 parent bdd498d commit 0b9ce28
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion worlds/AutoWorld.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import time
from dataclasses import make_dataclass
from typing import (Any, Callable, ClassVar, Dict, FrozenSet, List, Mapping,
Optional, Set, TextIO, Tuple, TYPE_CHECKING, Type, Union)
Optional, Set, TextIO, Tuple, TYPE_CHECKING, Type, Union, Iterable)

from Options import PerGameCommonOptions
from BaseClasses import CollectionState
Expand Down Expand Up @@ -498,12 +498,24 @@ def create_filler(self) -> "Item":
def get_location(self, location_name: str) -> "Location":
return self.multiworld.get_location(location_name, self.player)

def get_locations(self) -> Iterable["Location"]:
return self.multiworld.get_locations(self.player)

def get_entrance(self, entrance_name: str) -> "Entrance":
return self.multiworld.get_entrance(entrance_name, self.player)

def get_entrances(self):
return self.multiworld.get_entrances(self.player)

def get_region(self, region_name: str) -> "Region":
return self.multiworld.get_region(region_name, self.player)

def get_regions(self) -> Iterable["Region"]:
return self.multiworld.get_regions(self.player)

def push_precollected(self, item: Item):
self.multiworld.push_precollected(item)

@classmethod
def get_data_package_data(cls) -> "GamesPackage":
sorted_item_name_groups = {
Expand Down

0 comments on commit 0b9ce28

Please sign in to comment.