DayZ 1.24
Loading...
Searching...
No Matches
ActionOpenFence Class Reference
Inheritance diagram for ActionOpenFence:
[legend]
Collaboration diagram for ActionOpenFence:
[legend]

Private Member Functions

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)
 

Private Attributes

ref NoiseParams m_NoisePar
 
const string SELECTION_INTERACT = "gate_interact"
 

Detailed Description

Definition at line 1 of file ActionOpenFence.c.

Constructor & Destructor Documentation

◆ ActionOpenFence()

void ActionOpenFence::ActionOpenFence ( )
inlineprivate

Definition at line 6 of file ActionOpenFence.c.

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:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CommandUID, m_StanceMask, and m_Text.

Member Function Documentation

◆ ActionCondition()

override bool ActionOpenFence::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 19 of file ActionOpenFence.c.

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

References SELECTION_INTERACT.

◆ CreateConditionComponents()

override void ActionOpenFence::CreateConditionComponents ( )
inlineprivate

Definition at line 13 of file ActionOpenFence.c.

14 {
17 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ OnEndServer()

override void ActionOpenFence::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 48 of file ActionOpenFence.c.

49 {
50 m_NoisePar = new NoiseParams();
51 m_NoisePar.LoadFromPath("CfgVehicles SurvivorBase NoiseActionDefault");
52 NoiseSystem noise = GetGame().GetNoiseSystem();
53 if (noise)
54 {
55 if (action_data.m_Player)
56 noise.AddNoisePos(action_data.m_Player, action_data.m_Target.GetObject().GetPosition(), m_NoisePar);
57 }
58 }
class NoiseSystem NoiseParams()
Definition Noise.c:15
ref NoiseParams m_NoisePar
proto native CGame GetGame()

References GetGame(), m_NoisePar, and NoiseParams().

◆ OnStartServer()

override void ActionOpenFence::OnStartServer ( ActionData action_data)
inlineprivate

Definition at line 42 of file ActionOpenFence.c.

43 {
44 Fence fence = Fence.Cast(action_data.m_Target.GetObject());
45 fence.OpenFence();
46 }

Member Data Documentation

◆ m_NoisePar

ref NoiseParams ActionOpenFence::m_NoisePar
private

Definition at line 3 of file ActionOpenFence.c.

Referenced by OnEndServer().

◆ SELECTION_INTERACT

const string ActionOpenFence::SELECTION_INTERACT = "gate_interact"
private

Definition at line 4 of file ActionOpenFence.c.

Referenced by ActionCondition().


The documentation for this class was generated from the following file: