From d4e2698ae0d58ebb05fd041d9d21dbd2affaa978 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sat, 8 Mar 2025 09:56:29 -0500 Subject: [PATCH] TUNIC: Add exception handling to deal with duplicate apworlds (#4634) * Add exception handling to deal with duplicate apworlds * Update worlds/tunic/__init__.py --- worlds/tunic/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index 2ee58d42..250f6706 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -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: