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

Private Member Functions

void ActionRepackTent ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool HasProgress ()
 
override bool ActionConditionContinue (ActionData action_data)
 
override bool HasAlternativeInterrupt ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool SetupAction (PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
 
override void OnStartServer (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 
void SetupAnimation (ItemBase item)
 
override void OnStartAnimationLoopClient (ActionData action_data)
 
override void OnStartAnimationLoopServer (ActionData action_data)
 
override void OnEndAnimationLoop (ActionData action_data)
 
override string GetAdminLogMessage (ActionData action_data)
 
- Private Member Functions inherited from ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Private Attributes

EntityAI m_RepackedEntity
 
bool m_IsFinished
 

Detailed Description

Definition at line 42 of file ActionRepackTent.c.

Constructor & Destructor Documentation

◆ ActionRepackTent()

void ActionRepackTent::ActionRepackTent ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

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

Definition at line 83 of file ActionRepackTent.c.

84 {
85 if (!player.IsPlacingLocal())
86 return true;
87 return false;
88 }

◆ ActionConditionContinue()

override bool ActionRepackTent::ActionConditionContinue ( ActionData action_data)
inlineprivate

Definition at line 73 of file ActionRepackTent.c.

74 {
75 return true;
76 }

◆ CreateConditionComponents()

override void ActionRepackTent::CreateConditionComponents ( )
inlineprivate

Definition at line 57 of file ActionRepackTent.c.

58 {
61 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ GetAdminLogMessage()

override string ActionRepackTent::GetAdminLogMessage ( ActionData action_data)
inlineprivate

Definition at line 187 of file ActionRepackTent.c.

188 {
189 return " re-packed " + action_data.m_Target.GetObject().GetDisplayName() + " with Hands ";
190 }

◆ HasAlternativeInterrupt()

override bool ActionRepackTent::HasAlternativeInterrupt ( )
inlineprivate

Definition at line 78 of file ActionRepackTent.c.

79 {
80 return true;
81 }

◆ HasProgress()

override bool ActionRepackTent::HasProgress ( )
inlineprivate

Definition at line 68 of file ActionRepackTent.c.

69 {
70 return true;
71 }

◆ HasTarget()

override bool ActionRepackTent::HasTarget ( )
inlineprivate

Definition at line 63 of file ActionRepackTent.c.

64 {
65 return false;
66 }

◆ OnEndAnimationLoop()

override void ActionRepackTent::OnEndAnimationLoop ( ActionData action_data)
inlineprivate

Definition at line 178 of file ActionRepackTent.c.

179 {
180 if (!GetGame().IsMultiplayer() || GetGame().IsServer())
181 {
182 Param1<bool> play = new Param1<bool>(false);
183 GetGame().RPCSingleParam(action_data.m_MainItem, SoundTypeTent.REPACK, play, true);
184 }
185 }
SoundTypeTent
Definition LargeTent.c:2
proto native CGame GetGame()

References GetGame().

◆ OnEndServer()

override void ActionRepackTent::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 113 of file ActionRepackTent.c.

114 {
115 if (m_IsFinished)
116 {
117 if (action_data.m_MainItem.IsInherited(TentBase))
118 {
119 RepackLambda lambda_back_pack = new RepackLambda(action_data.m_MainItem, "LargeTentBackPack", action_data.m_Player);
120 action_data.m_Player.ServerReplaceItemElsewhereWithNewInHands(lambda_back_pack);
121 }
122
123 if (action_data.m_MainItem.IsInherited(Clothing))
124 {
125 RepackLambda lambda_tent = new RepackLambda(action_data.m_MainItem, "LargeTent", action_data.m_Player);
126 action_data.m_Player.ServerReplaceItemElsewhereWithNewInHands(lambda_tent);
127 }
128 }
129 else
130 {
131 if (GetGame().IsMultiplayer())
132 {
133 if (action_data.m_MainItem)
134 action_data.m_Player.ServerTakeEntityToHands(action_data.m_MainItem);
135 }
136 else
137 {
138 if (action_data.m_MainItem)
139 action_data.m_Player.LocalTakeEntityToHands(action_data.m_MainItem);
140 }
141 }
142 }

References GetGame(), and m_IsFinished.

◆ OnFinishProgressServer()

override void ActionRepackTent::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 105 of file ActionRepackTent.c.

106 {
107 Param1<bool> play = new Param1<bool>(false);
108 GetGame().RPCSingleParam(action_data.m_MainItem, SoundTypeTent.REPACK, play, true);
109
110 m_IsFinished = true;
111 }

References GetGame(), and m_IsFinished.

◆ OnStartAnimationLoopClient()

override void ActionRepackTent::OnStartAnimationLoopClient ( ActionData action_data)
inlineprivate

Definition at line 156 of file ActionRepackTent.c.

157 {
158 if (action_data.m_Player.GetItemInHands())
160 }

References ActionRepackTentCB::DropDuringRepacking().

◆ OnStartAnimationLoopServer()

override void ActionRepackTent::OnStartAnimationLoopServer ( ActionData action_data)
inlineprivate

Definition at line 162 of file ActionRepackTent.c.

163 {
164 Param1<bool> play = new Param1<bool>(false);
165 if (!GetGame().IsMultiplayer())
166 {
167 if (action_data.m_Player.GetItemInHands())
169 }
170
171 if (action_data.m_Player.GetItemInHands())
172 {
173 play = new Param1<bool>(true);
174 GetGame().RPCSingleParam(action_data.m_MainItem, SoundTypeTent.REPACK, play, true);
175 }
176 }

References ActionRepackTentCB::DropDuringRepacking(), and GetGame().

◆ OnStartServer()

override void ActionRepackTent::OnStartServer ( ActionData action_data)
inlineprivate

Definition at line 99 of file ActionRepackTent.c.

100 {
102 m_IsFinished = false;
103 }

References m_IsFinished, and m_RepackedEntity.

◆ SetupAction()

override bool ActionRepackTent::SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = NULL )
inlineprivate

Definition at line 90 of file ActionRepackTent.c.

91 {
93
94 if (super.SetupAction(player, target, item, action_data, extra_data))
95 return true;
96 return false;
97 }
void SetupAnimation(ItemBase item)

References SetupAnimation().

◆ SetupAnimation()

void ActionRepackTent::SetupAnimation ( ItemBase item)
inlineprivate

Definition at line 144 of file ActionRepackTent.c.

145 {
146 if (item.IsHeavyBehaviour())
147 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DEPLOY_HEAVY;
148 else if (item.IsOneHandedBehaviour())
149 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DEPLOY_1HD;
150 else if (item.IsTwoHandedBehaviour())
151 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DEPLOY_2HD;
152 else
153 Print("Error: check " + item + " behaviour");
154 }
proto void Print(void var)
Prints content of variable to console/log.

References AnimatedActionBase::m_CommandUID, and Print().

Referenced by SetupAction().

Member Data Documentation

◆ m_IsFinished

bool ActionRepackTent::m_IsFinished
private

Definition at line 45 of file ActionRepackTent.c.

Referenced by OnEndServer(), OnFinishProgressServer(), and OnStartServer().

◆ m_RepackedEntity

EntityAI ActionRepackTent::m_RepackedEntity
private

Definition at line 44 of file ActionRepackTent.c.

Referenced by OnStartServer().


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