Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
cacontinuousquantityextinguish.c
Go to the documentation of this file.
2{
3 private float m_WetnessGainMultiplier = 1.0;
4
5 void CAContinuousQuantityExtinguish(float quantity_used_per_second, float time_to_repeat, float wetness_gain_multiplier)
6 {
7 m_QuantityUsedPerSecond = quantity_used_per_second;
8 m_DefaultTimeToRepeat = time_to_repeat;
9 m_WetnessGainMultiplier = wetness_gain_multiplier;
10 }
11
12 override void CalcAndSetQuantity(ActionData action_data)
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 {
25 FireplaceBase fireplace = FireplaceBase.Cast(targetObject);
26
27 //add wetness to fireplace targets
28 float wetness = (m_SpentQuantity / 1000) * m_WetnessGainMultiplier;
29 fireplace.AddWetnessToFireplace(wetness);
30
31 //subtract quantity from water source
32 action_data.m_MainItem.AddQuantity(-m_SpentQuantity);
33 }
34 }
35 }
36
37 void MultiplyQuantityUsed(float coef)
38 {
40 }
41}
void SetACData(Param units)
Definition cabase.c:40
void CalcAndSetQuantity()
proto native CGame GetGame()