Skip to content

Commit

Permalink
Core: Player name property on world class (ArchipelagoMW#3042)
Browse files Browse the repository at this point in the history
* player property on world class

* Remove dat shi from overcooked

* Update worlds/AutoWorld.py

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

---------

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
  • Loading branch information
2 people authored and qwint committed Jun 24, 2024
1 parent efa12a1 commit 3034ae3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions worlds/AutoWorld.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,10 @@ def get_entrance(self, entrance_name: str) -> "Entrance":
def get_region(self, region_name: str) -> "Region":
return self.multiworld.get_region(region_name, self.player)

@property
def player_name(self) -> str:
return self.multiworld.get_player_name(self.player)

@classmethod
def get_data_package_data(cls) -> "GamesPackage":
sorted_item_name_groups = {
Expand Down
2 changes: 0 additions & 2 deletions worlds/overcooked2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ def get_priority_locations(self) -> List[int]:
# Autoworld Hooks

def generate_early(self):
self.player_name = self.multiworld.player_name[self.player]

# 0.0 to 1.0 where 1.0 is World Record
self.star_threshold_scale = self.options.star_threshold_scale / 100.0

Expand Down

0 comments on commit 3034ae3

Please sign in to comment.