Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
cacontinuousloadmagazine.c
Go to the documentation of this file.
2 {
3  protected float m_TargetUnits;
4  protected float m_SpentQuantity;
5  protected float m_ItemQuantity;
6  protected float m_ItemMaxQuantity;
7  protected float m_SourceQuantity;
8  protected float m_QuantityFilledPerSecond;
9  //protected ref Param1<float> m_SpentUnits;
10 
11  void CAContinuousLoadMagazine( float time_to_complete_action )
12  {
13  m_DefaultTimeToComplete = time_to_complete_action;
14  }
15 
16  override void Setup( ActionData action_data )
17  {
18  super.Setup(action_data);
19  m_SpentQuantity = 0;
20  if ( !m_SpentUnits )
21  {
22  m_SpentUnits = new Param1<float>(0);
23  }
24  else
25  {
26  m_SpentUnits.param1 = 0;
27  }
28 
29  Magazine itm;
30  Class.CastTo(itm, action_data.m_MainItem);
31  m_ItemQuantity = itm.GetAmmoCount();
32  m_ItemMaxQuantity = itm.GetAmmoMax();
33  Magazine trg;
34  Class.CastTo(trg, action_data.m_Target.GetObject() );
35  m_SourceQuantity = trg.GetAmmoCount();
36  m_TargetUnits = itm.GetAmmoMax();
37  }
38 };
CAContinuousRepeat
Definition: cacontinuousrepeat.c:1
ActionData
Definition: actionbase.c:20
CAContinuousLoadMagazine
Definition: cacontinuousloadmagazine.c:1
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10