Core: Player name property on world class (#3042)

* 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>
This commit is contained in:
NewSoupVi 2024-05-18 00:18:57 +02:00 committed by GitHub
parent b4c263fc9d
commit 5fb0126754
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -504,6 +504,10 @@ class World(metaclass=AutoWorldRegister):
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 = {

View File

@ -217,8 +217,6 @@ class Overcooked2World(World):
# 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