WebHost/Core: Defer creating slots that have patch files until after multidata is loaded and remove redundant code. (#1250)

* WebHost: On uploads, infer player name if missing in file name.

* Remove conditional logic for not including player name in file name.

* quick readability tweak to "fix"

* Refactored `upload_zip_to_db` to clean up redundancies and fix issues

* Rename `patches` to `files`

* fix comment
This commit is contained in:
Zach Parks
2022-11-20 13:39:52 -06:00
committed by GitHub
parent 5ed8c2e1c0
commit a9ab53cb8b
2 changed files with 39 additions and 54 deletions

View File

@@ -308,10 +308,7 @@ class MultiWorld():
def get_out_file_name_base(self, player: int) -> str:
""" the base name (without file extension) for each player's output file for a seed """
return f"AP_{self.seed_name}_P{player}" \
+ (f"_{self.get_file_safe_player_name(player).replace(' ', '_')}"
if (self.player_name[player] != f"Player{player}")
else '')
return f"AP_{self.seed_name}_P{player}_{self.get_file_safe_player_name(player).replace(' ', '_')}"
def initialize_regions(self, regions=None):
for region in regions if regions else self.regions: