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

Private Member Functions

void ActionToggleTentOpen ()
 
override void CreateConditionComponents ()
 
override bool IsUsingProxies ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 

Detailed Description

Definition at line 1 of file ActionToggleTentOpen.c.

Constructor & Destructor Documentation

◆ ActionToggleTentOpen()

void ActionToggleTentOpen::ActionToggleTentOpen ( )
inlineprivate

Definition at line 3 of file ActionToggleTentOpen.c.

4 {
5 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_INTERACTONCE;
6 m_Text = "#toggle_opening";
7 }
string m_Text
Definition ActionBase.c:49
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CommandUID, and m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 20 of file ActionToggleTentOpen.c.

21 {
22 Object targetObject = target.GetObject();
23 Object targetParent = target.GetParent();
24
26 {
27 if (targetParent.IsInherited(TentBase))
28 {
30 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections);
32
33 for (int s = 0; s < selections.Count(); s++)
34 {
35 if (tent.CanToggleAnimations(selections[s]))
36 {
37 //Print("nazov selekcie: " + selections[s]);
38 return true;
39 }
40 }
41 }
42 }
43
44 return false;
45 }

◆ CreateConditionComponents()

override void ActionToggleTentOpen::CreateConditionComponents ( )
inlineprivate

Definition at line 9 of file ActionToggleTentOpen.c.

10 {
13 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ IsUsingProxies()

override bool ActionToggleTentOpen::IsUsingProxies ( )
inlineprivate

Definition at line 15 of file ActionToggleTentOpen.c.

16 {
17 return true;
18 }

◆ OnEndServer()

override void ActionToggleTentOpen::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 75 of file ActionToggleTentOpen.c.

76 {
77 Object target_object = action_data.m_Target.GetObject();
79 if (ntarget)
80 ntarget.SoundSynchRemoteReset();
81 }

◆ OnExecuteServer()

override void ActionToggleTentOpen::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 47 of file ActionToggleTentOpen.c.

48 {
49 Object targetObject = action_data.m_Target.GetObject();
50 Object targetParent = action_data.m_Target.GetParent();
51
52 if (targetParent && targetParent.IsInherited(TentBase))
53 {
55 targetObject.GetActionComponentNameList(action_data.m_Target.GetComponentIndex(), selections);
56
58 for (int s = 0; s < selections.Count(); s++)
59 {
60 if (tent.CanToggleAnimations(selections[s]))
61 tent.ToggleAnimation(selections[s]);
62 }
63
64 //regenerate pathgraph
65 tent.SetAffectPathgraph(true, false);
66
67 if (tent.CanAffectPathgraph())
68 {
69 //Start update
70 tent.RegenerateNavmesh();
71 }
72 }
73 }

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