Skip to content
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

Lingo: Optimize imports and remove unused parameter #4305

Merged
merged 7 commits into from
Dec 3, 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
4 changes: 2 additions & 2 deletions worlds/lingo/player_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def randomize_paintings(self, world: "LingoWorld") -> bool:
required_painting_rooms += REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS
req_exits = [painting_id for painting_id, painting in PAINTINGS.items() if painting.required_when_no_doors]

def is_req_enterable(painting_id: str, painting: Painting) -> bool:
def is_req_enterable(painting: Painting) -> bool:
if painting.exit_only or painting.disable or painting.req_blocked\
or painting.room in required_painting_rooms:
return False
Expand All @@ -433,7 +433,7 @@ def is_req_enterable(painting_id: str, painting: Painting) -> bool:
return True

req_enterable = [painting_id for painting_id, painting in PAINTINGS.items()
if is_req_enterable(painting_id, painting)]
if is_req_enterable(painting)]
req_exits += [painting_id for painting_id, painting in PAINTINGS.items()
if painting.exit_only and painting.required]
req_entrances = world.random.sample(req_enterable, len(req_exits))
Expand Down
1 change: 0 additions & 1 deletion worlds/lingo/utils/pickle_static_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import hashlib
import pickle
import sys
import Utils


Expand Down
Loading