Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Player name property on world class #3042

Merged
merged 3 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions worlds/AutoWorld.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,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 @@ -219,8 +219,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
Loading