DIFF

class BuildingSource

Building EntityAI Entity ObjectTyped Object IEntity Managed

All members, including inherited

Constructors 1

Members 1

ref TIntArray m_InteractActions
Referenced by Building()

Methods 41

proto native int GetLaddersCount()
proto native vector GetLadderPosTop(int ladderIndex)
proto native vector GetLadderPosBottom(int ladderIndex)
proto native int GetDoorCount()

Returns the number of the doors in the building

proto native bool IsDoorOpen(int index)

When the door is requested to be fully open (animation wanted phase is greater than 0.5)

proto native bool IsDoorOpening(int index)

When the wanted phase is at the open phase target (1.0)

proto native bool IsDoorOpeningAjar(int index)

When the wanted phase is at the ajar phase target (0.2)

proto native bool IsDoorClosing(int index)

When the wanted phase is at the close phase target (0.0)

proto native bool IsDoorOpened(int index)

When the phase is at the open phase target (1.0)

proto native bool IsDoorOpenedAjar(int index)

When the phase is at the ajar phase target (0.2)

proto native bool IsDoorClosed(int index)

When the phase is at the close phase target (0.0)

proto native void PlayDoorSound(int index)

Plays the appropriate sound at the door, based on animation phase and state

Referenced by OnAction()
proto native void OpenDoor(int index)

Attempts to open the door

proto native void LockDoor(int index, bool force = false)

Locks the door if not already locked, resets the door health. 'force = true' will close the door if open

proto native void UnlockDoor(int index, bool animate = true)

Unlocks the door if locked, AJAR animation optional

proto native vector GetDoorSoundPos(int index)

Position in world space for where the door sounds are played from

proto native float GetDoorSoundDistance(int index)

Audible distance for the door sound

proto native void OutputDoorLog()

Requires special build as logging is disabled even on internal builds due to memory usage. Used for checking of possible causes of navmesh desync

Referenced by OnAction()
int GetNearestDoorBySoundPos(vector position)

Gets the nearest door based on the sound position (quick and dirty function for debugging)

Referenced by OnAction()
void OnDoorOpenStart(DoorStartParams params)

Event for when the door starts opening

void OnDoorOpenFinish(DoorFinishParams params)

Event for when the door finishes opening

void OnDoorOpenAjarStart(DoorStartParams params)

Event for when the door starts opening ajarred (usually after unlock)

void OnDoorOpenAjarFinish(DoorFinishParams params)

Event for when the door finishes opening ajarred (usually after unlock)

void OnDoorCloseStart(DoorStartParams params)

Event for when the door starts closing

void OnDoorCloseFinish(DoorFinishParams params)

Event for when the door finishes closing

void OnDoorLocked(DoorLockParams params)

Event for when the door is locked

void OnDoorUnlocked(DoorLockParams params)

Event for when the door is unlocked

bool CanDoorBeLocked(int doorIndex)

Check if the door is closed and if the door is unlocked

int GetLockCompatibilityType(int doorIdx)

Which door is compatible with which key (door idx supplied). Bitwise.

doorIdx

Returns: bitwise value of all compatible locks

Noteyou can combine the bit values like so:
Notereturn (1 << EBuildingLockType.LOCKPICK) | (1 << EBuildingLockType.SHIP_CONTAINER_1);
Noteyou can also this for each individual door idx
override bool IsBuilding()
override bool CanObstruct()
override bool IsHealthVisible()
override bool IsInventoryVisible()
override int GetMeleeTargetType()