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

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

void ActionSwitchLights ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override bool HasTarget ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 
override bool CanBeUsedInVehicle ()
 

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

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

◆ ActionSwitchLights()

void ActionSwitchLights ( )
inlineprivate
4 {
5 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_HEADLIGHT;
6 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
7 m_Text = "#switch_lights";
8 }
string m_Text
Definition ActionBase.c:58
int m_StanceMask
Definition ActionBase.c:62
int m_CommandUID
Definition AnimatedActionBase.c:143
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CommandUID, ActionBase::m_StanceMask и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
27 {
28 HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
29
30 if ( vehCommand )
31 {
32 Transport trans = vehCommand.GetTransport();
33 if ( trans )
34 {
36 if ( Class.CastTo(car, trans) )
37 {
38 if ( car.CrewMemberIndex( player ) == DayZPlayerConstants.VEHICLESEAT_DRIVER )
39 {
40 if ( !car.IsScriptedLightsOn() )
41 {
43
44 if ( car.IsVitalCarBattery() ) neededItem = car.FindAttachmentBySlotName("CarBattery");
45 if ( car.IsVitalTruckBattery() ) neededItem = car.FindAttachmentBySlotName("TruckBattery");
46
47 if (neededItem && !neededItem.IsRuined())
48 {
49 return neededItem.GetCompEM() && neededItem.GetCompEM().GetEnergy() > 0;
50 }
51 }
52 else
53 {
54 return true;
55 }
56 }
57 }
58 }
59 }
60
61 return false;
62 }
Definition CivilianSedan.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition Building.c:6
Definition human.c:690
Definition EntityAI.c:95
Base native class for all motorized wheeled vehicles.
Definition Boat.c:28
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

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

◆ CanBeUsedInVehicle()

override bool CanBeUsedInVehicle ( )
inlineprivate
82 {
83 return true;
84 }

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
11 {
14 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINone.c:2
Definition CCTNone.c:2

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

◆ GetInputType()

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

◆ HasTarget()

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

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
inlineprivate
65 {
66 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
67 if ( vehCommand )
68 {
69 Transport trans = vehCommand.GetTransport();
70 if ( trans )
71 {
73 if ( Class.CastTo(car, trans) )
74 {
75 car.ToggleHeadlights();
76 }
77 }
78 }
79 }

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


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