ALimenLockDoor
Overview
ALimenLockDoor is a subclass of ALimenDoorBase designed to manage the locking state of a door. It includes properties for inside and outside locks, as well as notification parameters for successful and failed unlock attempts. The class handles interactions through specific handle components and provides functionality to unlock the door using keys.
Properties
Type | Name | Access | Description | |
|---|---|---|---|---|
| InsideLock | EditDefaultsOnly, BlueprintReadOnly | Reference to the inside lock component. | |
| OutsideLock | EditDefaultsOnly, BlueprintReadOnly | Reference to the outside lock component. | |
| DoorUnlockFailedNotification | EditAnywhere, Category=" Limen | Notifications" | Notification parameters for failed unlock attempts. |
| DoorUnlockSuccessNotification | EditAnywhere, Category=" Limen | Notifications" | Notification parameters for successful unlock attempts. |
| InsideHandleInteractionTag | EditDefaultsOnly, BlueprintReadOnly, Category=" Limen | Config" | Tag for the inside handle interaction component. |
| OutsideHandleInteractionTag | EditDefaultsOnly, BlueprintReadOnly, Category=" Limen | Config" | Tag for the outside handle interaction component. |
Functions
Return Type | Signature | Description |
|---|---|---|
| BeginPlay() | Initializes the door by setting up interactable components and notification parameters. |
| GetInsideLock() const | Returns a pointer to the inside lock component. |
| GetOutsideLock() const | Returns a pointer to the outside lock component. |
| IsAnyHandleLocked() const | Checks if either the inside or outside handle is locked. |
| Interact(AController* InController, APawn* InPawn) | Handles general interaction logic (currently empty). |
| InteractInsideHandle(AController* InController, APawn* InPawn) | Handles interaction with the inside handle. Attempts to unlock the door if possible. |
| InteractOutsideHandle(AController* InController, APawn* InPawn) | Handles interaction with the outside handle. Attempts to unlock the door if possible. |
| GetKeyFromPlayer(ULimenLock* LockContext, AController* InController, APawn* InPawn) const | Retrieves a key from the player's inventory that matches the lock context. |
| OnDoorTryUnlock(AController* InController, APawn* InPawn, bool bSuccess) | Queues a notification based on whether the unlock attempt was successful or not. |
| UnlockAllLocks(ALimenKey* Key, AController* InController, APawn* InPawn) const | Attempts to unlock all locks using the provided key (currently empty). |
| UnlockFromInside(AController* InController, APawn* InPawn) | Attempts to unlock the door from inside using a key. |
| UnlockFromOutside(AController* InController, APawn* InPawn) | Attempts to unlock the door from outside using a key. |
Usage & Implementation Notes
Threading Constraints: None.
Replication Requirements: None.
Memory Lifetime Management: The class manages memory for its components and notifications through Unreal Engine's garbage collection system.
Initialization Dependencies: Depends on
ALimenDoorBaseand various interactable components.