Setup: also delete old disabled worlds (#2267)

This commit is contained in:
Fabian Dill 2023-10-07 16:44:21 +02:00 committed by GitHub
parent 6028112e0e
commit b8fe3196e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -370,6 +370,10 @@ class BuildExeCommand(cx_Freeze.command.build_exe.BuildEXE):
assert not non_apworlds - set(AutoWorldRegister.world_types), \ assert not non_apworlds - set(AutoWorldRegister.world_types), \
f"Unknown world {non_apworlds - set(AutoWorldRegister.world_types)} designated for .apworld" f"Unknown world {non_apworlds - set(AutoWorldRegister.world_types)} designated for .apworld"
folders_to_remove: typing.List[str] = [] folders_to_remove: typing.List[str] = []
disabled_worlds_folder = "worlds_disabled"
for entry in os.listdir(disabled_worlds_folder):
if os.path.isdir(os.path.join(disabled_worlds_folder, entry)):
folders_to_remove.append(entry)
generate_yaml_templates(self.buildfolder / "Players" / "Templates", False) generate_yaml_templates(self.buildfolder / "Players" / "Templates", False)
for worldname, worldtype in AutoWorldRegister.world_types.items(): for worldname, worldtype in AutoWorldRegister.world_types.items():
if worldname not in non_apworlds: if worldname not in non_apworlds: