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

Private Member Functions

void CAContinuousQuantityExtinguish (float quantity_used_per_second, float time_to_repeat, float wetness_gain_multiplier)
 
override void CalcAndSetQuantity (ActionData action_data)
 
override int Interrupt (ActionData action_data)
 
void MultiplyQuantityUsed (float coef)
 
- Private Member Functions inherited from CAContinuousQuantityRepeat
void CAContinuousQuantityRepeat (float quantity_used_per_second, float time_to_repeat)
 
override void Setup (ActionData action_data)
 
override int Execute (ActionData action_data)
 
override int Cancel (ActionData action_data)
 
override float GetProgress ()
 
void CalcAndSetQuantity (ActionData action_data)
 

Private Attributes

float m_WetnessGainMultiplier = 1.0
 
- Private Attributes inherited from CAContinuousQuantityRepeat
float m_ItemQuantity
 
float m_SpentQuantity
 
float m_ItemMaxQuantity
 
float m_TimeElpased
 
float m_QuantityUsedPerSecond
 
float m_AdjustedQuantityUsedPerSecond
 
float m_DefaultTimeToRepeat
 
ref Param1< floatm_SpentUnits
 

Detailed Description

Definition at line 1 of file CAContinuousQuantityExtinguish.c.

Constructor & Destructor Documentation

◆ CAContinuousQuantityExtinguish()

Member Function Documentation

◆ CalcAndSetQuantity()

override void CAContinuousQuantityExtinguish::CalcAndSetQuantity ( ActionData action_data)
inlineprivate

Definition at line 12 of file CAContinuousQuantityExtinguish.c.

13 {
14 if (GetGame().IsServer())
15 {
16 if (m_SpentUnits)
17 {
20 }
21
22 Object targetObject = action_data.m_Target.GetObject();
23 if (targetObject)
24 {
26
27 //add wetness to fireplace targets
29 fireplace.AddWetnessToFireplace(wetness);
30
31 //subtract quantity from water source
32 action_data.m_MainItem.AddQuantity(-m_SpentQuantity);
33 }
34 }
35 }
void SetACData(Param units)
Definition CABase.c:38
proto native CGame GetGame()

References GetGame(), CAContinuousQuantityRepeat::m_SpentQuantity, CAContinuousQuantityRepeat::m_SpentUnits, m_WetnessGainMultiplier, and CABase::SetACData().

◆ Interrupt()

override int CAContinuousQuantityExtinguish::Interrupt ( ActionData action_data)
inlineprivate

Definition at line 37 of file CAContinuousQuantityExtinguish.c.

38 {
39 if (GetGame().IsServer())
40 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(UASoftSkillsWeight.ROUGH_MEDIUM);
41
42 return super.Interrupt(action_data);
43 }

References GetGame(), and UASoftSkillsWeight::ROUGH_MEDIUM.

◆ MultiplyQuantityUsed()

void CAContinuousQuantityExtinguish::MultiplyQuantityUsed ( float coef)
inlineprivate

Member Data Documentation

◆ m_WetnessGainMultiplier

float CAContinuousQuantityExtinguish::m_WetnessGainMultiplier = 1.0
private

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