escapy.objects
Ready-made game-object classes for common escape-room mechanics.
Each class composes protocol implementations and mixin behaviour to provide a complete, reusable game object that can be placed in rooms, interacted with, and managed by the inventory system.
- class escapy.objects.PickableObject(id, width, height)[source]
Bases:
Interactable,InventoryInteractable,PlaceableAn object that can be picked up from a room and held in-hand.
Clicking the object in the room picks it up (removes it from the room and adds it to inventory). Clicking it in the inventory puts it in-hand.
- class escapy.objects.SelfSimpleLock(id, on_unlock, width, height)[source]
Bases:
UnlockableMixin,Interactable,Unlockable,PlaceableA lock that can be opened with a simple click (no key required).
- class escapy.objects.SelfKeyLock(id, key_id, on_unlock, width, height)[source]
Bases:
UnlockableMixin,Interactable,Unlockable,PlaceableA lock that requires a specific key held in-hand to open.
If the player interacts without the correct key, an
InteractedWithLockedEventis emitted instead.
- class escapy.objects.SelfAskCodeLock(id, on_unlock, code, width, height)[source]
Bases:
UnlockableMixin,DecodableMixin,Interactable,Unlockable,Decodable,PlaceableA lock that prompts the player to enter a numeric/text code.
When locked, interaction triggers an
AskedForCodeEvent. If the submitted code matches, the lock opens andon_unlockfires.
- class escapy.objects.MoveToRoom(room_id, width, height)[source]
Bases:
Interactable,PlaceableA clickable area that transports the player to another room.
- class escapy.objects.WinMachine(id, code, win_room_id, width, height)[source]
Bases:
DecodableMixin,InventoryInteractable,Decodable,PlaceableA special object that ends (wins) the game when the correct code is entered.
Interacting with it from the inventory triggers a code prompt. A correct code moves the player to the designated win room.
- class escapy.objects.InspectableObject(id, width, height)[source]
Bases:
Interactable,PlaceableAn object that can be inspected (zoomed-in view) when clicked.
- class escapy.objects.PickableInspectableObject(id, width, height)[source]
Bases:
Interactable,InventoryInteractable,PlaceableAn object that can be picked up from a room and inspected from the inventory.