summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-01-31 01:56:35 -0500
committerGitHub <noreply@github.com>2024-01-31 07:56:35 +0100
commitd6b98f8d8687a2b4f5a640fb17d00db751914519 (patch)
treee85b9e64cdc07f39072bf2fabd26c53a883c70e2
parent83f19a4783b4d4f3720d58f08941721fff5c228d (diff)
downloadlingo-apworld-d6b98f8d8687a2b4f5a640fb17d00db751914519.tar.gz
lingo-apworld-d6b98f8d8687a2b4f5a640fb17d00db751914519.tar.bz2
lingo-apworld-d6b98f8d8687a2b4f5a640fb17d00db751914519.zip
Lingo: Enable start_inventory_from_pool (#2781)
-rw-r--r--__init__.py7
-rw-r--r--options.py3
2 files changed, 7 insertions, 3 deletions
diff --git a/__init__.py b/__init__.py index 0889674..2f93541 100644 --- a/__init__.py +++ b/__init__.py
@@ -82,9 +82,8 @@ class LingoWorld(World):
82 skips = int(non_traps * skip_percentage / 100.0) 82 skips = int(non_traps * skip_percentage / 100.0)
83 non_skips = non_traps - skips 83 non_skips = non_traps - skips
84 84
85 filler_list = [":)", "The Feeling of Being Lost", "Wanderlust", "Empty White Hallways"]
86 for i in range(0, non_skips): 85 for i in range(0, non_skips):
87 pool.append(self.create_item(filler_list[i % len(filler_list)])) 86 pool.append(self.create_item(self.get_filler_item_name()))
88 87
89 for i in range(0, skips): 88 for i in range(0, skips):
90 pool.append(self.create_item("Puzzle Skip")) 89 pool.append(self.create_item("Puzzle Skip"))
@@ -130,3 +129,7 @@ class LingoWorld(World):
130 slot_data["painting_entrance_to_exit"] = self.player_logic.painting_mapping 129 slot_data["painting_entrance_to_exit"] = self.player_logic.painting_mapping
131 130
132 return slot_data 131 return slot_data
132
133 def get_filler_item_name(self) -> str:
134 filler_list = [":)", "The Feeling of Being Lost", "Wanderlust", "Empty White Hallways"]
135 return self.random.choice(filler_list)
diff --git a/options.py b/options.py index ec6158f..ed14264 100644 --- a/options.py +++ b/options.py
@@ -1,6 +1,6 @@
1from dataclasses import dataclass 1from dataclasses import dataclass
2 2
3from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions 3from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool
4 4
5 5
6class ShuffleDoors(Choice): 6class ShuffleDoors(Choice):
@@ -136,3 +136,4 @@ class LingoOptions(PerGameCommonOptions):
136 trap_percentage: TrapPercentage 136 trap_percentage: TrapPercentage
137 puzzle_skip_percentage: PuzzleSkipPercentage 137 puzzle_skip_percentage: PuzzleSkipPercentage
138 death_link: DeathLink 138 death_link: DeathLink
139 start_inventory_from_pool: StartInventoryPool