TUNIC: Add exception handling to deal with duplicate apworlds (#4634)

* Add exception handling to deal with duplicate apworlds

* Update worlds/tunic/__init__.py
This commit is contained in:
Scipio Wright
2025-03-08 09:56:29 -05:00
committed by GitHub
parent 3f8e3082c0
commit d4e2698ae0

View File

@@ -110,6 +110,13 @@ class TunicWorld(World):
ut_can_gen_without_yaml = True # class var that tells it to ignore the player yaml
def generate_early(self) -> None:
try:
int(self.settings.disable_local_spoiler)
except AttributeError:
raise Exception("You have a TUNIC APWorld in your lib/worlds folder and custom_worlds folder.\n"
"This would cause an error at the end of generation.\n"
"Please remove one of them, most likely the one in lib/worlds.")
check_options(self)
if self.options.logic_rules >= LogicRules.option_no_major_glitches: