Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
actionfoldobject.c
Go to the documentation of this file.
1class ActionFoldObject: ActionInteractBase
2{
3 void ActionFoldObject()
4 {
5 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_MEDIUM;
6 m_Text = "#fold";
7 }
8
9 override typename GetInputType()
10 {
12 }
13
14 override bool HasProgress()
15 {
16 return false;
17 }
18
19 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
20 {
21 Object targetObject = target.GetObject();
22 if ( targetObject.IsInherited(HescoBox) )
23 {
24 HescoBox hesco = HescoBox.Cast( targetObject );
25
26 if ( hesco.GetState() == HescoBox.UNFOLDED )
27 {
28 return true;
29 }
30 }
31 return false;
32 }
33
34 override void OnExecuteServer( ActionData action_data )
35 {
36 Object targetObject = action_data.m_Target.GetObject();
37 HescoBox hesco = HescoBox.Cast( targetObject );
38 if ( hesco.GetState() == HescoBox.UNFOLDED )
39 {
40 hesco.Fold();
41 }
42 }
43};
ActionBase ActionData
Definition actionbase.c:30
float m_SpecialtyWeight
Definition actionbase.c:83
bool HasProgress()
For UI: hiding of progress bar.
Definition actionbase.c:256
string m_Text
Definition actionbase.c:64