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

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

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

class  ActionStartCarCB
 

Функции

void ActionStartEngine ()
 DEPRECATED.
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnEndServer (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnExecuteServer (ActionData action_data)
 
override bool CanBeUsedInVehicle ()
 

Переменные

ActionStartCarCB ROUGH_SPECIALTY_WEIGHT = 0.5
 
static const float MINIMUM_BATTERY_ENERGY = 5.0
 
bool m_BatteryCon = false
 DEPRECATED.
 
bool m_SparkCon = false
 DEPRECATED.
 
bool m_BeltCon = false
 DEPRECATED.
 
bool m_FuelCon = false
 DEPRECATED.
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
36 {
37 HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
38 if (vehCommand)
39 {
40 Transport trans = vehCommand.GetTransport();
41 if (trans)
42 {
43 Car car;
44 if (Class.CastTo(car, trans) && !car.EngineIsOn())
45 {
46 if (car.GetHealthLevel("Engine") >= GameConstants.STATE_RUINED)
47 {
48 return false;
49 }
50
51 return car.CrewMemberIndex(player) == DayZPlayerConstants.VEHICLESEAT_DRIVER);
52 }
53 }
54 }
55
56 return false;
57 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition constants.c:638
Definition human.c:690
Definition EntityAI.c:95
Base native class for all motorized wheeled vehicles.
Definition Boat.c:28
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int STATE_RUINED
Definition constants.c:807

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

◆ ActionStartEngine()

void ActionStartEngine ( )

DEPRECATED.

20 {
21 m_CallbackClass = ActionStartCarCB;
22 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_STARTENGINE;
23 m_StanceMask = DayZPlayerConstants.STANCEMASK_ALL;
24 m_SpecialtyWeight = ROUGH_SPECIALTY_WEIGHT;
25 m_LockTargetOnUse = false;
26 m_Text = "#start_the_car";
27 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
ActionStartCarCB ROUGH_SPECIALTY_WEIGHT
Definition ActionStartEngine.c:2

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

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

◆ CanBeUsedInVehicle()

override bool CanBeUsedInVehicle ( )
111 {
112 return true;
113 }

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
30 {
31 m_ConditionTarget = new CCTNone();
32 m_ConditionItem = new CCINone();
33 }
Definition CCINone.c:2
Definition CCTNone.c:2

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
60 {
61 super.OnEndServer(action_data);
62
63 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
64 if (!vehCommand)
65 return;
66
67 Transport trans = vehCommand.GetTransport();
68 if (!trans)
69 return;
70
72 if (Class.CastTo(car, trans))
73 car.SetCarEngineSoundState(CarEngineSoundState.NONE);
74 }
Definition CivilianSedan.c:2

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

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
94 {
95 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
96 if (vehCommand)
97 {
98 Transport trans = vehCommand.GetTransport();
99 if (trans)
100 {
102 if (Class.CastTo(car, trans))
103 {
104 car.OnBeforeEngineStart();
105 }
106 }
107 }
108 }

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

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
77 {
78 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
79 if (vehCommand)
80 {
81 Transport trans = vehCommand.GetTransport();
82 if (trans)
83 {
85 if (Class.CastTo(car, trans))
86 {
87 car.EngineStart();
88 }
89 }
90 }
91 }

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

Переменные

◆ m_BatteryCon

bool m_BatteryCon = false

DEPRECATED.

◆ m_BeltCon

bool m_BeltCon = false

DEPRECATED.

◆ m_FuelCon

bool m_FuelCon = false

DEPRECATED.

◆ m_SparkCon

bool m_SparkCon = false

DEPRECATED.

◆ MINIMUM_BATTERY_ENERGY

const float MINIMUM_BATTERY_ENERGY = 5.0
static

◆ ROUGH_SPECIALTY_WEIGHT

ActionStartCarCB ROUGH_SPECIALTY_WEIGHT = 0.5

Используется в ActionStartEngine().