DayZ 1.24
Loading...
Searching...
No Matches
CAContinuousRepeat.c
Go to the documentation of this file.
2{
3 protected float m_TimeElpased;
4 protected float m_TotalTimeElpased;
5 protected float m_TimeToComplete;
6 protected float m_DefaultTimeToComplete;
8
13
15 {
16 if (!m_SpentUnits)
18 else
19 m_SpentUnits.param1 = 0;
20
21 m_TimeToComplete = action_data.m_Player.GetSoftSkillsManager().SubtractSpecialtyBonus(m_DefaultTimeToComplete, m_Action.GetSpecialtyWeight(), true);
22 }
23
25 {
26 if (!action_data.m_Player)
27 return UA_ERROR;
28
30 {
31 m_TimeElpased += action_data.m_Player.GetDeltaT();
32 m_TotalTimeElpased += action_data.m_Player.GetDeltaT();
33 return UA_PROCESSING;
34 }
35 else
36 {
41 return UA_PROCESSING;
42 }
43 }
44
46 {
47 if (m_SpentUnits)
48 {
51 }
52 return UA_CANCEL;
53 }
54
55 override float GetProgress()
56 {
58 //Print("progress: " + progress + " | m_TimeElpased: " + m_TimeElpased + " | m_TimeToComplete: " + m_TimeToComplete);
59 return progress;
60 }
61
62 void SetProgress(float value)
63 {
65 }
66};
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)
override float GetProgress()
override void Setup(ActionData action_data)
ref Param1< float > m_SpentUnits
void SetProgress(float value)
override int Cancel(ActionData action_data)
void CAContinuousRepeat(float time_to_complete_action)
const int UA_ERROR
Definition constants.c:455
const int UA_PROCESSING
Definition constants.c:434
const int UA_CANCEL
Definition constants.c:437