DayZ 1.24
Loading...
Searching...
No Matches
RainProcurementManager Class Reference

DEPRECATED, done through the RainProcurementHandler / component instead. More...

Collaboration diagram for RainProcurementManager:
[legend]

Protected Member Functions

void RainProcurementManager (ItemBase procuring_item)
 
void InitRainProcurement ()
 
void RainProcurementCheck ()
 
bool IsRunning ()
 
void StopRainProcurement ()
 

Protected Attributes

ItemBase m_ProcuringItem
 
int m_IsUnderRoof
 
ref Timer m_UpdateTimer
 
const int RAIN_COEFFICIENT = 10
 

Detailed Description

DEPRECATED, done through the RainProcurementHandler / component instead.

Definition at line 2 of file RainProcurementManager.c.

Constructor & Destructor Documentation

◆ RainProcurementManager()

void RainProcurementManager::RainProcurementManager ( ItemBase procuring_item)
inlineprotected

Definition at line 9 of file RainProcurementManager.c.

References m_ProcuringItem.

Member Function Documentation

◆ InitRainProcurement()

void RainProcurementManager::InitRainProcurement ( )
inlineprotected

Definition at line 15 of file RainProcurementManager.c.

16 {
18
19 //m_ProcuringItem.SetQuantity(0); /*set to 0 for debug purposses*/
20
21 if (!m_IsUnderRoof)
22 {
23 m_UpdateTimer = new Timer();
24 m_UpdateTimer.Run(10, this, "RainProcurementCheck", NULL, true);
25 }
26 }

References m_IsUnderRoof, m_ProcuringItem, and m_UpdateTimer.

◆ IsRunning()

bool RainProcurementManager::IsRunning ( )
inlineprotected

Definition at line 71 of file RainProcurementManager.c.

72 {
73 return m_UpdateTimer != null;
74 }

References m_UpdateTimer.

◆ RainProcurementCheck()

void RainProcurementManager::RainProcurementCheck ( )
inlineprotected

Definition at line 29 of file RainProcurementManager.c.

30 {
31 float rain_intensity = GetGame().GetWeather().GetRain().GetActual();
33
34 if (rain_intensity > 0)
35 {
36 if (m_ProcuringItem.GetQuantity() < m_ProcuringItem.GetQuantityMax())
37 {
39
40 //Print( "Quantity of " + m_ProcuringItem + " is: " + m_ProcuringItem.GetQuantity() );
41 }
42 else
43 {
44 //Print("vesel full");
46 }
47 }
48 }
Definition Liquid.c:2
static void FillContainerEnviro(ItemBase container, int liquid_type, float amount, bool inject_agents=false)
Definition Liquid.c:126
proto native CGame GetGame()
const int LIQUID_WATER
Definition constants.c:504

References Liquid::FillContainerEnviro(), GetGame(), LIQUID_WATER, m_ProcuringItem, RAIN_COEFFICIENT, and StopRainProcurement().

◆ StopRainProcurement()

void RainProcurementManager::StopRainProcurement ( )
inlineprotected

Definition at line 76 of file RainProcurementManager.c.

77 {
78 if (!m_IsUnderRoof)
79 m_UpdateTimer.Stop();
80
81 }

References m_IsUnderRoof, and m_UpdateTimer.

Referenced by RainProcurementCheck().

Member Data Documentation

◆ m_IsUnderRoof

int RainProcurementManager::m_IsUnderRoof
protected

Definition at line 5 of file RainProcurementManager.c.

Referenced by InitRainProcurement(), and StopRainProcurement().

◆ m_ProcuringItem

ItemBase RainProcurementManager::m_ProcuringItem
protected

◆ m_UpdateTimer

ref Timer RainProcurementManager::m_UpdateTimer
protected

Definition at line 6 of file RainProcurementManager.c.

Referenced by InitRainProcurement(), IsRunning(), and StopRainProcurement().

◆ RAIN_COEFFICIENT

const int RainProcurementManager::RAIN_COEFFICIENT = 10
protected

Definition at line 7 of file RainProcurementManager.c.

Referenced by RainProcurementCheck().


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