Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionGetInTransport
+ Граф наследования:ActionGetInTransport:

Закрытые члены

void ActionGetInTransport ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override bool HasProgress ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 
override void OnStartServer (ActionData action_data)
 
override bool CanBeUsedInRestrain ()
 
override void OnUpdate (ActionData action_data)
 
override int GetActionCategory ()
 
override void OnEndClient (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 

Подробное описание

Конструктор(ы)

◆ ActionGetInTransport()

void ActionGetInTransport ( )
inlineprivate
4 {
5 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
6 m_Text = "#get_in_vehicle";
7 }
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки m_StanceMask и m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
27 {
29
30 if (!target)
31 {
32 return false;
33 }
34
35 if (!Class.CastTo(trans, target.GetObject()))
36 {
37 return false;
38 }
39
40 if (player.GetItemInHands() && player.GetItemInHands().IsHeavyBehaviour())
41 {
42 return false;
43 }
44
45 if (player.GetCommand_Vehicle())
46 {
47 return false;
48 }
49
50 int componentIndex = target.GetComponentIndex();
51 int crew_index = trans.CrewPositionIndex(componentIndex);
52 if (crew_index < 0)
53 {
54 return false;
55 }
56
57 Human crew = trans.CrewMember(crew_index);
58 if (crew)
59 {
60 return false;
61 }
62
63 if (!trans.CrewCanGetThrough(crew_index) || !trans.IsAreaAtDoorFree(crew_index))
64 {
65 return false;
66 }
67
69 trans.GetActionComponentNameList(componentIndex, selections);
70
71 for (int i = 0; i < selections.Count(); i++)
72 {
73 if (trans.CanReachSeatFromDoors(selections[i], player.GetPosition(), 1.0))
74 {
75 return true;
76 }
77 }
78
79 return false;
80 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition EntityAI.c:95
Base native class for all motorized wheeled vehicles.
Definition Car.c:80
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo().

◆ CanBeUsedInRestrain()

override bool CanBeUsedInRestrain ( )
inlineprivate
115 {
116 return true;
117 }

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
11 {
14 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
Definition CCINone.c:2
Definition CCTCursorNoRuinCheck.c:2

Перекрестные ссылки m_ConditionItem и m_ConditionTarget.

◆ GetActionCategory()

override int GetActionCategory ( )
inlineprivate
132 {
133 return AC_INTERACT;
134 }
const int AC_INTERACT
Definition _constants.c:4

Перекрестные ссылки AC_INTERACT.

◆ GetInputType()

override GetInputType ( )
inlineprivate
17 {
19 }
Definition ActionInput.c:522

◆ HasProgress()

override bool HasProgress ( )
inlineprivate
22 {
23 return false;
24 }

◆ OnEndClient()

override void OnEndClient ( ActionData action_data)
inlineprivate
137 {
138 if (action_data.m_Player.GetInventory())
139 {
140 action_data.m_Player.GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
141 }
142 }

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
inlineprivate
145 {
146 if (action_data.m_Player.GetInventory())
147 {
148 action_data.m_Player.GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
149 }
150
151 CarScript car = CarScript.Cast(action_data.m_Target.GetObject());
152 if (car)
153 {
154 car.ForceUpdateLightsEnd();
155 }
156 }
Definition CivilianSedan.c:2

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)
inlineprivate
106 {
107 CarScript car = CarScript.Cast(action_data.m_Target.GetObject());
108 if (car)
109 {
110 car.ForceUpdateLightsStart();
111 }
112 }

◆ OnUpdate()

override void OnUpdate ( ActionData action_data)
inlineprivate
120 {
121
122 if (action_data.m_State == UA_START)
123 {
124 if (!action_data.m_Player.GetCommand_Vehicle() || !action_data.m_Player.GetCommand_Vehicle().IsGettingIn())
125 {
127 }
128 }
129 }
void End()
called on surrender end request end
const int UA_START
Definition constants.c:439

Перекрестные ссылки End() и UA_START.

◆ Start()

override void Start ( ActionData action_data)
inlineprivate
83 {
84 super.Start( action_data );
85
86 Transport trans = Transport.Cast(action_data.m_Target.GetObject());
87 int componentIndex = action_data.m_Target.GetComponentIndex();
88 int crew_index = trans.CrewPositionIndex(componentIndex);
89
90
91 int seat = trans.GetSeatAnimationType(crew_index);
92 HumanCommandVehicle vehCommand = action_data.m_Player.StartCommand_Vehicle(trans, crew_index, seat);
93 if (vehCommand)
94 {
95 vehCommand.SetVehicleType(trans.GetAnimInstance());
96
97 GetDayZGame().GetBacklit().OnEnterCar();
98 if (action_data.m_Player.GetInventory())
99 {
100 action_data.m_Player.GetInventory().LockInventory(LOCK_FROM_SCRIPT);
101 }
102 }
103 }
DayZGame GetDayZGame()
Definition DayZGame.c:3748
Definition human.c:690

Перекрестные ссылки GetDayZGame().


Объявления и описания членов класса находятся в файле: