Skip to content

Lingo: Enable start_inventory_from_pool #2781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions worlds/lingo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ def create_items(self):
skips = int(non_traps * skip_percentage / 100.0)
non_skips = non_traps - skips

filler_list = [":)", "The Feeling of Being Lost", "Wanderlust", "Empty White Hallways"]
for i in range(0, non_skips):
pool.append(self.create_item(filler_list[i % len(filler_list)]))
pool.append(self.create_item(self.get_filler_item_name()))

for i in range(0, skips):
pool.append(self.create_item("Puzzle Skip"))
Expand Down Expand Up @@ -130,3 +129,7 @@ def fill_slot_data(self):
slot_data["painting_entrance_to_exit"] = self.player_logic.painting_mapping

return slot_data

def get_filler_item_name(self) -> str:
filler_list = [":)", "The Feeling of Being Lost", "Wanderlust", "Empty White Hallways"]
return self.random.choice(filler_list)
3 changes: 2 additions & 1 deletion worlds/lingo/options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dataclasses import dataclass

from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions
from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool


class ShuffleDoors(Choice):
Expand Down Expand Up @@ -136,3 +136,4 @@ class LingoOptions(PerGameCommonOptions):
trap_percentage: TrapPercentage
puzzle_skip_percentage: PuzzleSkipPercentage
death_link: DeathLink
start_inventory_from_pool: StartInventoryPool