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

Protected Member Functions

void RainProcurementHandler (MissionBaseWorld mission)
 
void QueueStart (RainProcurementComponentBase component)
 
void QueueStop (RainProcurementComponentBase component)
 
void Update (float timeslice)
 
bool ProcessBatch ()
 returns 'true' when all the batches are finished
 
void Cleanup ()
 
void Reset ()
 
void HandleChangedComponents ()
 
void CheckUpdating ()
 
float GetLiquidAmountCoef ()
 
float DetermineAmountCoef ()
 scalable on handler level
 

Protected Attributes

MissionBaseWorld m_Mission
 
ref set< RainProcurementComponentBasem_ActiveComponents
 
ref set< RainProcurementComponentBasem_ChangedQueue
 
ref set< intm_CleanupQueue
 
const int UPDATE_BATCH_SIZE = 20
 
const int UPDATE_TIME = 10
 
bool m_Update
 
bool m_ProcessComponents
 
bool m_ProcessingFinished
 
int m_NextToProcessIdx
 
float m_UpdateTimer
 
float m_LiquidAmountCoef
 

Additional Inherited Members

- Private Member Functions inherited from Managed
void IntroSceneCharacter ()
 
void ~IntroSceneCharacter ()
 
bool IsDefaultCharacter ()
 
void SetToDefaultCharacter ()
 
void SetCharacterID (int char_id)
 
int GetCharacterID ()
 
PlayerBase GetCharacterObj ()
 
TStringArray GetCharGenderList ()
 
TStringArray GetCharList (ECharGender gender)
 
TStringArray GetCharShirtsList ()
 
TStringArray GetCharPantsList ()
 
TStringArray GetCharShoesList ()
 
void SetCharacterGender (ECharGender gender)
 
bool IsCharacterFemale ()
 
ECharGender GetCharacterGender ()
 
vector GetPosition ()
 
int GetNextCharacterID ()
 
int GetPrevCharacterID ()
 
void CreateNewCharacterRandom ()
 
void CreateNewCharacterById (int character_id)
 
void CreateNewCharacterByName (string character_name, bool randomize_equip=true)
 
void CreateDefaultCharacter ()
 
void GetLastPlayedServer (int characterID, out string address, out string name, out int port)
 
void CreateNewCharacter ()
 
void LoadCharacterData (vector char_pos, vector char_rot, bool default_char=false)
 Generates random equip for the new IntroSceneCharacter, whatever is defined in 'cfgCharacterCreation'.
 
void CharacterUnload ()
 
void CharacterLoad (int character_id, vector char_pos, vector char_rot)
 
void SetupPlayerName (bool new_name)
 
void SetAttachment (string type, int slot)
 
string GetCharacterNameById (int char_id)
 
string GetCharacterName ()
 
void SaveCharName (string name)
 
void SaveDefaultCharacter ()
 
void TransferValues (PlayerBase player)
 
void Init ()
 
void OnScheduledTick (float deltatime)
 
void CheckValues ()
 
float GetBlood ()
 
float GetHealth ()
 
void CheckHealth ()
 
void CheckBlood ()
 
void SendInitValues ()
 Sends values on object creation.
 
void SendValue (int value_type, float value)
 
void ReceiveValue (int value_type, float value)
 
void OnRPC (ParamsReadContext ctx)
 
void ShowDebugValues (bool show)
 
void BleedingIndicator (int source_ID, int severity, GameplayEffectsDataBleeding parent)
 
void InitIndicator (vector position)
 
void StopIndicator (bool instant=false)
 
void StartRunningDrops ()
 
bool IsRunningDrops ()
 Are any drops currently being animated?
 
void TrySpawnNextDrop ()
 
void ResetSequence ()
 
void ResetIndicator ()
 
void Update (float timeSlice)
 
bool GetEndNow ()
 
int GetSeverity ()
 
void GameplayEffectsData (array< ref Widget > input, int type, int user_override=-1)
 
void Init (array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
 
array< ref WidgetGetWidgetSet ()
 
int GetWidgetSetType ()
 
int GetWidgetSetID ()
 
bool HasDefinedHandle ()
 Returns 'true' if this class contains update info.
 
bool DataInitialized ()
 
void UpdateVisibility (bool state)
 
void RegisterData (Param p)
 
void Update (float timeSlice=0, Param p=null, int handle=-1)
 
void ForceStop ()
 
- Private Attributes inherited from Managed
int m_CharacterId
 
string m_CharacterType
 
MenuData m_CharacterDta
 
PlayerBase m_CharacterObj
 
vector m_CharacterPos
 
vector m_CharacterRot
 
ref TStringArray m_CharGenderList = new TStringArray
 
ref TStringArray m_CharShirtList = new TStringArray
 
ref TStringArray m_CharPantsList = new TStringArray
 
ref TStringArray m_CharShoesList = new TStringArray
 
ref map< ECharGender, ref array< string > > m_Characters = new map<ECharGender, ref array<string>>
 
ECharGender m_CharGender
 
bool m_InitialSyncSent
 
bool m_Initialized
 
bool m_Terminating = false
 
bool m_EndNow = false
 
bool m_IsRunning = false
 
int m_DropSpawnsQueued
 
int m_ActiveDropsCount
 
int m_Severity
 
int m_SourceID
 
GameplayEffectsDataBleeding m_ParentMetaData
 
array< floatm_DropProbabilityArray
 
float m_AverageFrequency
 
float m_SequenceTick
 
float m_SequenceDuration
 
float m_TimeElapsedTotal
 
float m_TimeElapsedSequence
 
float m_LastDropSpawnTime
 
float m_DropSpawnMinDelay
 
float m_DropSpawnMaxDelay
 
int m_CurrentDropProbabilityStep
 
int m_DropProbabilityRollsCount
 
vector m_BasePosition
 
ref set< ref BleedingIndicatorDropDatam_ActiveDrops
 
ref set< intm_CleanupQueue
 
ref array< ref Widgetm_WidgetArray
 
int m_Type
 
int m_WidgetSetIdentifier
 
Widget m_LayoutRoot
 

Detailed Description

Definition at line 1 of file RainProcurementHandler.c.

Constructor & Destructor Documentation

◆ RainProcurementHandler()

void RainProcurementHandler::RainProcurementHandler ( MissionBaseWorld mission)
inlineprotected

Definition at line 16 of file RainProcurementHandler.c.

References m_ActiveComponents, m_ChangedQueue, m_CleanupQueue, m_Mission, m_NextToProcessIdx, m_ProcessComponents, m_ProcessingFinished, m_Update, m_UpdateTimer, and mission.

Member Function Documentation

◆ CheckUpdating()

void RainProcurementHandler::CheckUpdating ( )
inlineprotected

Definition at line 142 of file RainProcurementHandler.c.

143 {
144 m_Update = m_ActiveComponents.Count() != 0;
145 }

References m_ActiveComponents, and m_Update.

Referenced by Update().

◆ Cleanup()

void RainProcurementHandler::Cleanup ( )
inlineprotected

Definition at line 100 of file RainProcurementHandler.c.

101 {
102 int count = m_CleanupQueue.Count();
103 if (count == 0)
104 return;
105
106 for (int i = count - 1; i > -1; i--)
108 m_CleanupQueue.Clear();
109 }

References m_ActiveComponents, and m_CleanupQueue.

Referenced by Update().

◆ DetermineAmountCoef()

float RainProcurementHandler::DetermineAmountCoef ( )
inlineprotected

scalable on handler level

Definition at line 153 of file RainProcurementHandler.c.

154 {
155 return GetGame().GetWeather().GetRain().GetActual();
156 }
proto native CGame GetGame()

References GetGame().

Referenced by Update().

◆ GetLiquidAmountCoef()

float RainProcurementHandler::GetLiquidAmountCoef ( )
inlineprotected

Definition at line 147 of file RainProcurementHandler.c.

148 {
149 return m_LiquidAmountCoef;
150 }

References m_LiquidAmountCoef.

◆ HandleChangedComponents()

void RainProcurementHandler::HandleChangedComponents ( )
inlineprotected

Definition at line 118 of file RainProcurementHandler.c.

119 {
121 int count = m_ChangedQueue.Count();
122 int idx;
123
124 for (int i = 0; i < count; i++)
125 {
127 if (!component)
128 continue;
129
130 if (component.IsActive())
132 else
133 {
135 if (idx != -1)
136 m_ActiveComponents.Remove(idx);
137 }
138 }
139 m_ChangedQueue.Clear();
140 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.

References component, m_ActiveComponents, and m_ChangedQueue.

Referenced by Update().

◆ ProcessBatch()

bool RainProcurementHandler::ProcessBatch ( )
inlineprotected

returns 'true' when all the batches are finished

Definition at line 79 of file RainProcurementHandler.c.

80 {
81 bool ret = false;
82 int count = m_ActiveComponents.Count();
84
86 {
89 else
91 }
92
93 ret = target == count;
94 if (ret)
96
97 return ret;
98 }
Param3 int
Definition EnMath.c:7
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

References Math::Clamp(), m_ActiveComponents, m_CleanupQueue, m_LiquidAmountCoef, m_NextToProcessIdx, m_UpdateTimer, and UPDATE_BATCH_SIZE.

Referenced by Update().

◆ QueueStart()

void RainProcurementHandler::QueueStart ( RainProcurementComponentBase component)
inlineprotected

Definition at line 29 of file RainProcurementHandler.c.

30 {
32 m_Update = true;
33 }

References component, m_ChangedQueue, and m_Update.

Referenced by RainProcurementComponentBase::StartRainProcurement().

◆ QueueStop()

void RainProcurementHandler::QueueStop ( RainProcurementComponentBase component)
inlineprotected

Definition at line 35 of file RainProcurementHandler.c.

36 {
38 m_Update = true;
39 }

References component, m_ChangedQueue, and m_Update.

Referenced by RainProcurementComponentBase::StopRainProcurement().

◆ Reset()

void RainProcurementHandler::Reset ( )
inlineprotected

Definition at line 111 of file RainProcurementHandler.c.

112 {
113 m_ProcessComponents = false;
115 m_UpdateTimer = 0;
116 }

References m_ProcessComponents, m_ProcessingFinished, and m_UpdateTimer.

Referenced by Update().

◆ Update()

void RainProcurementHandler::Update ( float timeslice)
inlineprotected

Definition at line 41 of file RainProcurementHandler.c.

42 {
43 if (!m_Update)
44 return;
45
47 {
48 if (m_ProcessingFinished) //do on start and after the batch is finished
49 {
51 if (m_LiquidAmountCoef == 0) //skip processing when not raining
52 {
53 Reset();
54 return;
55 }
56 }
57
59
61 Reset();
62 }
63 else
64 {
67 {
69 Cleanup();
72 if (!m_Update)
73 Reset();
74 }
75 }
76 }
float DetermineAmountCoef()
scalable on handler level
bool ProcessBatch()
returns 'true' when all the batches are finished

References CheckUpdating(), Cleanup(), DetermineAmountCoef(), HandleChangedComponents(), m_LiquidAmountCoef, m_ProcessComponents, m_ProcessingFinished, m_Update, m_UpdateTimer, ProcessBatch(), Reset(), and UPDATE_TIME.

Member Data Documentation

◆ m_ActiveComponents

ref set<RainProcurementComponentBase> RainProcurementHandler::m_ActiveComponents
protected

◆ m_ChangedQueue

ref set<RainProcurementComponentBase> RainProcurementHandler::m_ChangedQueue
protected

◆ m_CleanupQueue

ref set<int> RainProcurementHandler::m_CleanupQueue
protected

Definition at line 6 of file RainProcurementHandler.c.

Referenced by Cleanup(), ProcessBatch(), and RainProcurementHandler().

◆ m_LiquidAmountCoef

float RainProcurementHandler::m_LiquidAmountCoef
protected

Definition at line 14 of file RainProcurementHandler.c.

Referenced by GetLiquidAmountCoef(), ProcessBatch(), and Update().

◆ m_Mission

MissionBaseWorld RainProcurementHandler::m_Mission
protected

Definition at line 3 of file RainProcurementHandler.c.

Referenced by RainProcurementHandler().

◆ m_NextToProcessIdx

int RainProcurementHandler::m_NextToProcessIdx
protected

Definition at line 12 of file RainProcurementHandler.c.

Referenced by ProcessBatch(), and RainProcurementHandler().

◆ m_ProcessComponents

bool RainProcurementHandler::m_ProcessComponents
protected

Definition at line 10 of file RainProcurementHandler.c.

Referenced by RainProcurementHandler(), Reset(), and Update().

◆ m_ProcessingFinished

bool RainProcurementHandler::m_ProcessingFinished
protected

Definition at line 11 of file RainProcurementHandler.c.

Referenced by RainProcurementHandler(), Reset(), and Update().

◆ m_Update

bool RainProcurementHandler::m_Update
protected

◆ m_UpdateTimer

float RainProcurementHandler::m_UpdateTimer
protected

Definition at line 13 of file RainProcurementHandler.c.

Referenced by ProcessBatch(), RainProcurementHandler(), Reset(), and Update().

◆ UPDATE_BATCH_SIZE

const int RainProcurementHandler::UPDATE_BATCH_SIZE = 20
protected

Definition at line 7 of file RainProcurementHandler.c.

Referenced by ProcessBatch().

◆ UPDATE_TIME

const int RainProcurementHandler::UPDATE_TIME = 10
protected

Definition at line 8 of file RainProcurementHandler.c.

Referenced by Update().


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