diff options
| -rw-r--r-- | __init__.py | 10 | ||||
| -rw-r--r-- | options.py | 2 | ||||
| -rw-r--r-- | test/TestDoors.py | 9 | ||||
| -rw-r--r-- | test/TestProgressive.py | 3 |
4 files changed, 19 insertions, 5 deletions
| diff --git a/__init__.py b/__init__.py index da8a246..a8dac86 100644 --- a/__init__.py +++ b/__init__.py | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | """ | 1 | """ |
| 2 | Archipelago init file for Lingo | 2 | Archipelago init file for Lingo |
| 3 | """ | 3 | """ |
| 4 | from logging import warning | ||
| 5 | |||
| 4 | from BaseClasses import Item, ItemClassification, Tutorial | 6 | from BaseClasses import Item, ItemClassification, Tutorial |
| 5 | from worlds.AutoWorld import WebWorld, World | 7 | from worlds.AutoWorld import WebWorld, World |
| 6 | from .items import ALL_ITEM_TABLE, LingoItem | 8 | from .items import ALL_ITEM_TABLE, LingoItem |
| @@ -49,6 +51,14 @@ class LingoWorld(World): | |||
| 49 | player_logic: LingoPlayerLogic | 51 | player_logic: LingoPlayerLogic |
| 50 | 52 | ||
| 51 | def generate_early(self): | 53 | def generate_early(self): |
| 54 | if not (self.options.shuffle_doors or self.options.shuffle_colors): | ||
| 55 | if self.multiworld.players == 1: | ||
| 56 | warning(f"{self.multiworld.get_player_name(self.player)}'s Lingo world doesn't have any progression" | ||
| 57 | f" items. Please turn on Door Shuffle or Color Shuffle if that doesn't seem right.") | ||
| 58 | else: | ||
| 59 | raise Exception(f"{self.multiworld.get_player_name(self.player)}'s Lingo world doesn't have any" | ||
| 60 | f" progression items. Please turn on Door Shuffle or Color Shuffle.") | ||
| 61 | |||
| 52 | self.player_logic = LingoPlayerLogic(self) | 62 | self.player_logic = LingoPlayerLogic(self) |
| 53 | 63 | ||
| 54 | def create_regions(self): | 64 | def create_regions(self): |
| diff --git a/options.py b/options.py index fc9ddee..c002086 100644 --- a/options.py +++ b/options.py | |||
| @@ -32,7 +32,7 @@ class LocationChecks(Choice): | |||
| 32 | option_insanity = 2 | 32 | option_insanity = 2 |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | class ShuffleColors(Toggle): | 35 | class ShuffleColors(DefaultOnToggle): |
| 36 | """If on, an item is added to the pool for every puzzle color (besides White). | 36 | """If on, an item is added to the pool for every puzzle color (besides White). |
| 37 | You will need to unlock the requisite colors in order to be able to solve puzzles of that color.""" | 37 | You will need to unlock the requisite colors in order to be able to solve puzzles of that color.""" |
| 38 | display_name = "Shuffle Colors" | 38 | display_name = "Shuffle Colors" |
| diff --git a/test/TestDoors.py b/test/TestDoors.py index 5dc989a..f496c5f 100644 --- a/test/TestDoors.py +++ b/test/TestDoors.py | |||
| @@ -3,7 +3,8 @@ from . import LingoTestBase | |||
| 3 | 3 | ||
| 4 | class TestRequiredRoomLogic(LingoTestBase): | 4 | class TestRequiredRoomLogic(LingoTestBase): |
| 5 | options = { | 5 | options = { |
| 6 | "shuffle_doors": "complex" | 6 | "shuffle_doors": "complex", |
| 7 | "shuffle_colors": "false", | ||
| 7 | } | 8 | } |
| 8 | 9 | ||
| 9 | def test_pilgrim_first(self) -> None: | 10 | def test_pilgrim_first(self) -> None: |
| @@ -49,7 +50,8 @@ class TestRequiredRoomLogic(LingoTestBase): | |||
| 49 | 50 | ||
| 50 | class TestRequiredDoorLogic(LingoTestBase): | 51 | class TestRequiredDoorLogic(LingoTestBase): |
| 51 | options = { | 52 | options = { |
| 52 | "shuffle_doors": "complex" | 53 | "shuffle_doors": "complex", |
| 54 | "shuffle_colors": "false", | ||
| 53 | } | 55 | } |
| 54 | 56 | ||
| 55 | def test_through_rhyme(self) -> None: | 57 | def test_through_rhyme(self) -> None: |
| @@ -76,7 +78,8 @@ class TestRequiredDoorLogic(LingoTestBase): | |||
| 76 | 78 | ||
| 77 | class TestSimpleDoors(LingoTestBase): | 79 | class TestSimpleDoors(LingoTestBase): |
| 78 | options = { | 80 | options = { |
| 79 | "shuffle_doors": "simple" | 81 | "shuffle_doors": "simple", |
| 82 | "shuffle_colors": "false", | ||
| 80 | } | 83 | } |
| 81 | 84 | ||
| 82 | def test_requirement(self): | 85 | def test_requirement(self): |
| diff --git a/test/TestProgressive.py b/test/TestProgressive.py index 026971c..917c6e7 100644 --- a/test/TestProgressive.py +++ b/test/TestProgressive.py | |||
| @@ -81,7 +81,8 @@ class TestSimpleHallwayRoom(LingoTestBase): | |||
| 81 | 81 | ||
| 82 | class TestProgressiveArtGallery(LingoTestBase): | 82 | class TestProgressiveArtGallery(LingoTestBase): |
| 83 | options = { | 83 | options = { |
| 84 | "shuffle_doors": "complex" | 84 | "shuffle_doors": "complex", |
| 85 | "shuffle_colors": "false", | ||
| 85 | } | 86 | } |
| 86 | 87 | ||
| 87 | def test_item(self): | 88 | def test_item(self): |
