diff options
Diffstat (limited to 'apworld/__init__.py')
-rw-r--r-- | apworld/__init__.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apworld/__init__.py b/apworld/__init__.py index 9e445c7..e126fc0 100644 --- a/apworld/__init__.py +++ b/apworld/__init__.py | |||
@@ -4,6 +4,7 @@ Archipelago init file for Lingo 2 | |||
4 | from typing import ClassVar | 4 | from typing import ClassVar |
5 | 5 | ||
6 | from BaseClasses import ItemClassification, Item, Tutorial | 6 | from BaseClasses import ItemClassification, Item, Tutorial |
7 | from Options import OptionError | ||
7 | from settings import Group, UserFilePath | 8 | from settings import Group, UserFilePath |
8 | from worlds.AutoWorld import WebWorld, World | 9 | from worlds.AutoWorld import WebWorld, World |
9 | from .items import Lingo2Item, ANTI_COLLECTABLE_TRAPS | 10 | from .items import Lingo2Item, ANTI_COLLECTABLE_TRAPS |
@@ -82,9 +83,9 @@ class Lingo2World(World): | |||
82 | else: | 83 | else: |
83 | shuffle_entrances(self) | 84 | shuffle_entrances(self) |
84 | 85 | ||
85 | from Utils import visualize_regions | 86 | #from Utils import visualize_regions |
86 | 87 | ||
87 | visualize_regions(self.multiworld.get_region("Menu", self.player), "my_world.puml") | 88 | #visualize_regions(self.multiworld.get_region("Menu", self.player), "my_world.puml") |
88 | 89 | ||
89 | def create_items(self): | 90 | def create_items(self): |
90 | pool = [self.create_item(name) for name in self.player_logic.real_items] | 91 | pool = [self.create_item(name) for name in self.player_logic.real_items] |
@@ -109,6 +110,11 @@ class Lingo2World(World): | |||
109 | for i in range(0, item_difference): | 110 | for i in range(0, item_difference): |
110 | pool.append(self.create_item(self.get_filler_item_name())) | 111 | pool.append(self.create_item(self.get_filler_item_name())) |
111 | 112 | ||
113 | if not any(ItemClassification.progression in item.classification for item in pool): | ||
114 | raise OptionError(f"Lingo 2 player {self.player} has no progression items. Please enable at least one " | ||
115 | f"option that would add progression gating to your world, such as Shuffle Doors or " | ||
116 | f"Shuffle Letters.") | ||
117 | |||
112 | self.multiworld.itempool += pool | 118 | self.multiworld.itempool += pool |
113 | 119 | ||
114 | def create_item(self, name: str) -> Item: | 120 | def create_item(self, name: str) -> Item: |