7 proto native
int GetLaddersCount();
8 proto native
vector GetLadderPosTop(
int ladderIndex);
9 proto native
vector GetLadderPosBottom(
int ladderIndex);
12 proto native
int GetDoorIndex(
int componentIndex);
15 proto native
int GetDoorCount();
18 proto native
bool IsDoorOpen(
int index);
21 proto native
bool IsDoorOpening(
int index);
24 proto native
bool IsDoorOpeningAjar(
int index);
27 proto native
bool IsDoorClosing(
int index);
30 proto native
bool IsDoorOpened(
int index);
33 proto native
bool IsDoorOpenedAjar(
int index);
36 proto native
bool IsDoorClosed(
int index);
39 proto native
bool IsDoorLocked(
int index);
42 proto native
void PlayDoorSound(
int index);
45 proto native
void OpenDoor(
int index);
48 proto native
void CloseDoor(
int index);
51 proto native
void LockDoor(
int index,
bool force =
false);
54 proto native
void UnlockDoor(
int index);
57 proto native
vector GetDoorSoundPos(
int index);
60 proto native
float GetDoorSoundDistance(
int index);
63 proto native
void OutputDoorLog();
66 int GetNearestDoorBySoundPos(
vector position)
68 float smallestDist =
float.MAX;
71 int count = GetDoorCount();
72 for (
int i = 0; i < count; i++)
74 float dist =
vector.DistanceSq(GetDoorSoundPos(i), position);
75 if (dist < smallestDist)
125 bool CanDoorBeOpened(
int doorIndex,
bool checkIfLocked =
false)
127 if (IsDoorOpen(doorIndex))
132 if (IsDoorLocked(doorIndex))
137 if (!IsDoorLocked(doorIndex))
143 bool CanDoorBeClosed(
int doorIndex)
145 return IsDoorOpen(doorIndex);
149 bool CanDoorBeLocked(
int doorIndex)
151 return (!IsDoorOpen(doorIndex) && !IsDoorLocked(doorIndex));
154 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
166 super.GetDebugActions(outputList);
171 if (super.OnAction(action_id, player, ctx))
176 case EActions.BUILDING_PLAY_DOOR_SOUND:
177 PlayDoorSound(GetNearestDoorBySoundPos(player.GetPosition()));
190 OpenDoor(GetNearestDoorBySoundPos(player.GetPosition()));
193 CloseDoor(GetNearestDoorBySoundPos(player.GetPosition()));
196 LockDoor(GetNearestDoorBySoundPos(player.GetPosition()));
199 UnlockDoor(GetNearestDoorBySoundPos(player.GetPosition()));
216 override bool IsHealthVisible()
234 override int GetMeleeTargetType()