From 6c7be51221e518778ade7bf59c0c27df4a429b2f Mon Sep 17 00:00:00 2001 From: jtoyoda Date: Sun, 20 Feb 2022 12:36:12 -0700 Subject: [PATCH] Adding in check to ensure there is at least one item in the FFR item pool --- worlds/ff1/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/worlds/ff1/__init__.py b/worlds/ff1/__init__.py index 7cb09fc7..bad40c16 100644 --- a/worlds/ff1/__init__.py +++ b/worlds/ff1/__init__.py @@ -76,6 +76,11 @@ class FF1World(World): if possible_early_items: progression_item = self.world.random.choice(possible_early_items) self._place_locked_item_in_sphere0(progression_item) + else: + # Fail generation if there are no items in the pool + raise Exception("FFR settings submitted with no key items. Please ensure you generated the settings using " + "finalfantasyrandomizer.com AND enabled the AP flag") + items = [self.create_item(name) for name, data in items.items() for x in range(data['count']) if name not in self.locked_items]