diff options
| -rw-r--r-- | __init__.py | 13 |
1 files changed, 11 insertions, 2 deletions
| diff --git a/__init__.py b/__init__.py index 1f426c9..3d98ae9 100644 --- a/__init__.py +++ b/__init__.py | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | """ | 1 | """ |
| 2 | Archipelago init file for Lingo | 2 | Archipelago init file for Lingo |
| 3 | """ | 3 | """ |
| 4 | from BaseClasses import Item, Tutorial | 4 | from BaseClasses import Item, ItemClassification, Tutorial |
| 5 | from worlds.AutoWorld import WebWorld, World | 5 | from worlds.AutoWorld import WebWorld, World |
| 6 | from .items import ALL_ITEM_TABLE, LingoItem | 6 | from .items import ALL_ITEM_TABLE, LingoItem |
| 7 | from .locations import ALL_LOCATION_TABLE | 7 | from .locations import ALL_LOCATION_TABLE |
| @@ -90,7 +90,16 @@ class LingoWorld(World): | |||
| 90 | 90 | ||
| 91 | def create_item(self, name: str) -> Item: | 91 | def create_item(self, name: str) -> Item: |
| 92 | item = ALL_ITEM_TABLE[name] | 92 | item = ALL_ITEM_TABLE[name] |
| 93 | return LingoItem(name, item.classification, item.code, self.player) | 93 | |
| 94 | classification = item.classification | ||
| 95 | if hasattr(self, "options") and self.options.shuffle_paintings and len(item.painting_ids) > 0\ | ||
| 96 | and len(item.door_ids) == 0 and all(painting_id not in self.player_logic.PAINTING_MAPPING | ||
| 97 | for painting_id in item.painting_ids): | ||
| 98 | # If this is a "door" that just moves one or more paintings, and painting shuffle is on and those paintings | ||
| 99 | # go nowhere, then this item should not be progression. | ||
| 100 | classification = ItemClassification.filler | ||
| 101 | |||
| 102 | return LingoItem(name, classification, item.code, self.player) | ||
| 94 | 103 | ||
| 95 | def set_rules(self): | 104 | def set_rules(self): |
| 96 | self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) | 105 | self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) |
