From 53d71ca90b092e311310589a2654313cd569e4fe Mon Sep 17 00:00:00 2001
From: Star Rauchenberger <fefferburbia@gmail.com>
Date: Fri, 24 Nov 2023 11:30:15 -0500
Subject: Lingo: Demote warpless painting items to filler (#2481)

---
 __init__.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to '__init__.py')

diff --git a/__init__.py b/__init__.py
index 1f426c9..3d98ae9 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,7 +1,7 @@
 """
 Archipelago init file for Lingo
 """
-from BaseClasses import Item, Tutorial
+from BaseClasses import Item, ItemClassification, Tutorial
 from worlds.AutoWorld import WebWorld, World
 from .items import ALL_ITEM_TABLE, LingoItem
 from .locations import ALL_LOCATION_TABLE
@@ -90,7 +90,16 @@ class LingoWorld(World):
 
     def create_item(self, name: str) -> Item:
         item = ALL_ITEM_TABLE[name]
-        return LingoItem(name, item.classification, item.code, self.player)
+
+        classification = item.classification
+        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
+
+        return LingoItem(name, classification, item.code, self.player)
 
     def set_rules(self):
         self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player)
-- 
cgit 1.4.1