Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actionfoldobject.c
Go to the documentation of this file.
2{
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};
float m_SpecialtyWeight
Definition actionbase.c:77
string m_Text
Definition actionbase.c:58