3 protected float m_InitItemQuantity;
4 protected float m_SpentQuantityTotal;
8 m_QuantityUsedPerSecond = quantity_used_per_second;
9 m_DefaultTimeToRepeat = time_to_repeat;
10 m_InitItemQuantity = -1;
15 super.Setup( action_data );
17 if (m_InitItemQuantity < 0)
19 m_InitItemQuantity = action_data.m_MainItem.GetWet();
26 if ( !action_data.m_Player )
31 float wetness = action_data.m_MainItem.GetWet();
32 int trim_wetness = wetness * 100;
33 float rounded_wetness = trim_wetness/100;
35 if ( rounded_wetness <= 0.25 )
41 if ( m_SpentQuantityTotal < m_InitItemQuantity )
43 m_AdjustedQuantityUsedPerSecond = action_data.m_Player.GetSoftSkillsManager().AddSpecialtyBonus( m_QuantityUsedPerSecond,
m_Action.GetSpecialtyWeight(),
true);
44 m_SpentQuantity += m_AdjustedQuantityUsedPerSecond * action_data.m_Player.GetDeltaT();
45 m_TimeElpased += action_data.m_Player.GetDeltaT();
47 if (m_TimeElpased > m_DefaultTimeToRepeat)
49 OnCompletePogress(action_data);
50 m_TimeElpased -= m_DefaultTimeToRepeat;
58 m_SpentUnits.param1 = m_SpentQuantity;
59 SetACData(m_SpentUnits);
62 action_data.m_MainItem.AddWet(-m_SpentQuantity);
65 m_SpentQuantityTotal += m_SpentQuantity;
72 OnCompletePogress(action_data);
78 override float GetProgress()
80 return ((m_TimeElpased - m_DefaultTimeToRepeat) / m_DefaultTimeToRepeat) + 1;