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

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

void ActionOpenFence ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 

Закрытые данные

ref NoiseParams m_NoisePar
 
const string SELECTION_INTERACT = "gate_interact"
 

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

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

◆ ActionOpenFence()

void ActionOpenFence ( )
inlineprivate
7 {
8 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENDOORFW;
9 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
10 m_Text = "#open";
11 }
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
20 {
21 Object targetObject = target.GetObject();
22 if ( targetObject && targetObject.CanUseConstruction() )
23 {
24 Fence fence = Fence.Cast( targetObject );
25
26 if ( fence && fence.CanOpenFence() )
27 {
29 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections);
30
31 for ( int i = 0; i < selections.Count(); i++ )
32 {
34 return true;
35 }
36 }
37 }
38
39 return false;
40 }
const string SELECTION_INTERACT
Definition ActionOpenFence.c:4
Definition ObjectTyped.c:2
Definition EntityAI.c:95

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

◆ CreateConditionComponents()

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

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

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
inlineprivate
51 {
52 super.OnEndServer(action_data);
53
54 m_NoisePar = new NoiseParams();
55 m_NoisePar.LoadFromPath("CfgVehicles SurvivorBase NoiseActionDefault");
56 NoiseSystem noise = GetGame().GetNoiseSystem();
57 if ( noise )
58 {
59 if ( action_data.m_Player )
60 noise.AddNoisePos(action_data.m_Player, action_data.m_Target.GetObject().GetPosition(), m_NoisePar, NoiseAIEvaluate.GetNoiseReduction(GetGame().GetWeather()));
61 }
62 }
class NoiseSystem NoiseParams()
Definition Noise.c:15
ref NoiseParams m_NoisePar
Definition ActionOpenFence.c:3
Definition SensesAIEvaluate.c:2
static float GetNoiseReduction(Weather weather)
Definition SensesAIEvaluate.c:18
Definition Noise.c:2
proto native CGame GetGame()

Перекрестные ссылки GetGame(), NoiseAIEvaluate::GetNoiseReduction(), m_NoisePar и NoiseParams().

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)
inlineprivate
43 {
44 super.OnStartServer(action_data);
45
46 Fence fence = Fence.Cast( action_data.m_Target.GetObject() );
47 fence.OpenFence();
48 }

Поля

◆ m_NoisePar

ref NoiseParams m_NoisePar
private

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

◆ SELECTION_INTERACT

const string SELECTION_INTERACT = "gate_interact"
private

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


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