DayZ 1.24
Loading...
Searching...
No Matches
CAContinuousWringClothes.c
Go to the documentation of this file.
2{
3 protected float m_InitItemQuantity;
4 protected float m_SpentQuantityTotal;
5
12
14 {
15 super.Setup(action_data);
16
17 if (m_InitItemQuantity < 0)
18 m_InitItemQuantity = action_data.m_MainItem.GetWet();
19 }
20
21
23 {
24 if (!action_data.m_Player)
25 return UA_ERROR;
26
27 float wetness = action_data.m_MainItem.GetWet();
28 int trim_wetness = wetness * 100;
29 float rounded_wetness = trim_wetness / 100;
30
31 if (rounded_wetness <= 0.25)
32 return UA_FINISHED;
33 else
34 {
36 {
37 m_AdjustedQuantityUsedPerSecond = action_data.m_Player.GetSoftSkillsManager().AddSpecialtyBonus(m_QuantityUsedPerSecond, m_Action.GetSpecialtyWeight(), true);
39 m_TimeElpased += action_data.m_Player.GetDeltaT();
40
42 {
45 }
46
47
48 if (GetGame().IsServer())
49 {
50 if (m_SpentUnits)
51 {
54 }
55
56 action_data.m_MainItem.AddWet(-m_SpentQuantity);
57 }
58
61
62 return UA_PROCESSING;
63 }
64 else
65 {
67 return UA_FINISHED;
68 }
69 }
70 }
71
72 override float GetProgress()
73 {
75 }
76};
void SetACData(Param units)
Definition CABase.c:38
ActionBase m_Action
Definition CABase.c:3
void OnCompletePogress(ActionData action_data)
override int Execute(ActionData action_data)
void CAContinuousWringClothes(float quantity_used_per_second, float time_to_repeat)
override void Setup(ActionData action_data)
proto native CGame GetGame()
const int UA_FINISHED
Definition constants.c:436
const int UA_ERROR
Definition constants.c:455
const int UA_PROCESSING
Definition constants.c:434