DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionStartEngineBoat.c

См. исходные тексты.

Структуры данных

class  ActionStartEngineBoatCB
 

Функции

ActionStartEngineBoatCB ActionContinuousBaseCB ActionStartEngineBoat ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgress (ActionData action_data)
 
override void OnExecuteServer (ActionData action_data)
 
override bool CanBeUsedInVehicle ()
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
27 {
28 HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
29 if (!vehCommand)
30 return false;
31
32 BoatScript boat = BoatScript.Cast(vehCommand.GetTransport());
33 if (boat && !boat.EngineIsOn())
34 {
35 if (!boat.CheckOperationalState())
36 return false;
37
38 return boat.CrewMemberIndex(player) == DayZPlayerConstants.VEHICLESEAT_DRIVER);
39 }
40
41 return false;
42 }
Definition BoatScript.c:27
Definition human.c:690
Definition EntityAI.c:95
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

◆ ActionStartEngineBoat()

12 {
13 m_CallbackClass = ActionStartEngineBoatCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_STARTENGINE;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_ALL;
16 m_LockTargetOnUse = false;
17 m_Text = "#start_the_car";
18 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionStartEngineBoat.c:2

Используется в ActionConstructor::RegisterActions() и ManBase::SetActions().

◆ CanBeUsedInVehicle()

override bool CanBeUsedInVehicle ( )
75 {
76 return true;
77 }

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionStartEngineBoatCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_STARTENGINE;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_ALL;

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

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
21 {
22 m_ConditionTarget = new CCTNone();
23 m_ConditionItem = new CCINone();
24 }
Definition CCINone.c:2
Definition CCTNone.c:2

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
60 {
61 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
62 if (vehCommand)
63 {
64 Transport trans = vehCommand.GetTransport();
65 if (trans)
66 {
67 Boat boat = Boat.Cast(trans);
68 //if (boat)
69 //boat.OnBeforeEngineStart(); // to be added
70 }
71 }
72 }
Base native class for all motorized wheeled vehicles.
Definition Boat.c:28

◆ OnFinishProgress()

override void OnFinishProgress ( ActionData action_data)
45 {
46 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
47 if (vehCommand)
48 {
49 Transport trans = vehCommand.GetTransport();
50 if (trans)
51 {
52 Boat boat = Boat.Cast(trans);
53 if (boat)
54 boat.EngineStart();
55 }
56 }
57 }