DayZ 1.24
Loading...
Searching...
No Matches
CAContinuousLoadMagazine Class Reference
Inheritance diagram for CAContinuousLoadMagazine:
[legend]
Collaboration diagram for CAContinuousLoadMagazine:
[legend]

Protected Member Functions

void CAContinuousLoadMagazine (float time_to_complete_action)
 
override void Setup (ActionData action_data)
 

Protected Attributes

float m_TargetUnits
 
float m_SpentQuantity
 
float m_ItemQuantity
 
float m_ItemMaxQuantity
 
float m_SourceQuantity
 
float m_QuantityFilledPerSecond
 

Additional Inherited Members

- Private Member Functions inherited from CAContinuousRepeat
void CAContinuousRepeat (float time_to_complete_action)
 
override void Setup (ActionData action_data)
 
override int Execute (ActionData action_data)
 
override int Cancel (ActionData action_data)
 
override float GetProgress ()
 
void SetProgress (float value)
 
- Private Attributes inherited from CAContinuousRepeat
float m_TimeElpased
 
float m_TotalTimeElpased
 
float m_TimeToComplete
 
float m_DefaultTimeToComplete
 
ref Param1< floatm_SpentUnits
 

Detailed Description

Definition at line 1 of file CAContinuousLoadMagazine.c.

Constructor & Destructor Documentation

◆ CAContinuousLoadMagazine()

void CAContinuousLoadMagazine::CAContinuousLoadMagazine ( float time_to_complete_action)
inlineprotected

Member Function Documentation

◆ Setup()

override void CAContinuousLoadMagazine::Setup ( ActionData action_data)
inlineprotected

Definition at line 16 of file CAContinuousLoadMagazine.c.

17 {
18 super.Setup(action_data);
20 if (!m_SpentUnits)
22 else
23 m_SpentUnits.param1 = 0;
24
26 Class.CastTo(itm, action_data.m_MainItem);
27 m_ItemQuantity = itm.GetAmmoCount();
28 m_ItemMaxQuantity = itm.GetAmmoMax();
30 Class.CastTo(trg, action_data.m_Target.GetObject());
31 m_SourceQuantity = trg.GetAmmoCount();
32 m_TargetUnits = itm.GetAmmoMax();
33 }
ref Param1< float > m_SpentUnits
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), m_ItemMaxQuantity, m_ItemQuantity, m_SourceQuantity, m_SpentQuantity, CAContinuousRepeat::m_SpentUnits, and m_TargetUnits.

Member Data Documentation

◆ m_ItemMaxQuantity

float CAContinuousLoadMagazine::m_ItemMaxQuantity
protected

Definition at line 6 of file CAContinuousLoadMagazine.c.

Referenced by Setup().

◆ m_ItemQuantity

float CAContinuousLoadMagazine::m_ItemQuantity
protected

Definition at line 5 of file CAContinuousLoadMagazine.c.

Referenced by Setup().

◆ m_QuantityFilledPerSecond

float CAContinuousLoadMagazine::m_QuantityFilledPerSecond
protected

Definition at line 8 of file CAContinuousLoadMagazine.c.

◆ m_SourceQuantity

float CAContinuousLoadMagazine::m_SourceQuantity
protected

Definition at line 7 of file CAContinuousLoadMagazine.c.

Referenced by Setup().

◆ m_SpentQuantity

float CAContinuousLoadMagazine::m_SpentQuantity
protected

Definition at line 4 of file CAContinuousLoadMagazine.c.

Referenced by Setup().

◆ m_TargetUnits

float CAContinuousLoadMagazine::m_TargetUnits
protected

Definition at line 3 of file CAContinuousLoadMagazine.c.

Referenced by Setup().


The documentation for this class was generated from the following file: