From 380eea2c6607aed2231d3e96a96bd304a20470fb Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 20 Nov 2023 00:05:44 -0500 Subject: [PATCH] Handle edge case of unit test with no options object --- worlds/lingo/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worlds/lingo/__init__.py b/worlds/lingo/__init__.py index 88b4373e066f..3d98ae91834f 100644 --- a/worlds/lingo/__init__.py +++ b/worlds/lingo/__init__.py @@ -92,8 +92,9 @@ def create_item(self, name: str) -> Item: item = ALL_ITEM_TABLE[name] classification = item.classification - if self.options.shuffle_paintings and len(item.painting_ids) > 0 and len(item.door_ids) == 0\ - and all(painting_id not in self.player_logic.PAINTING_MAPPING for painting_id in item.painting_ids): + if hasattr(self, "options") and self.options.shuffle_paintings and len(item.painting_ids) > 0\ + and len(item.door_ids) == 0 and all(painting_id not in self.player_logic.PAINTING_MAPPING + for painting_id in item.painting_ids): # If this is a "door" that just moves one or more paintings, and painting shuffle is on and those paintings # go nowhere, then this item should not be progression. classification = ItemClassification.filler