Lingo: Optimize imports and remove unused parameter (#4305)

This commit is contained in:
Nicholas Saylor 2024-12-02 21:02:18 -05:00 committed by GitHub
parent ffe0221deb
commit 6f2e1c2a7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -412,7 +412,7 @@ class LingoPlayerLogic:
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
@ -433,7 +433,7 @@ class LingoPlayerLogic:
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))

View File

@ -11,7 +11,6 @@ from datatypes import Door, DoorType, EntranceType, Painting, Panel, PanelDoor,
import hashlib
import pickle
import sys
import Utils