DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс CAContinuousFillCoolant
+ Граф наследования:CAContinuousFillCoolant:

Защищенные члены

void CAContinuousFillCoolant (float quantity_used_per_second, float time_to_progress)
 
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)
 

Защищенные данные

float m_ItemQuantity
 
float m_SpentQuantity
 
float m_SpentQuantity_total
 
float m_EmptySpace
 
float m_TimeElpased
 
float m_QuantityUsedPerSecond
 
float m_AdjustedQuantityUsedPerSecond
 
float m_DefaultTimeStep
 
ref Param1< floatm_SpentUnits
 
PlayerBase m_Player
 

Подробное описание

Конструктор(ы)

◆ CAContinuousFillCoolant()

void CAContinuousFillCoolant ( float quantity_used_per_second,
float time_to_progress )
inlineprotected
16 {
19 }
float m_QuantityUsedPerSecond
Definition CAContinuousFillCoolant.c:8
float m_DefaultTimeStep
Definition CAContinuousFillCoolant.c:10
Definition EntityAI.c:95

Перекрестные ссылки m_DefaultTimeStep и m_QuantityUsedPerSecond.

Методы

◆ CalcAndSetQuantity()

void CalcAndSetQuantity ( ActionData action_data)
inlineprotected
123 {
124
126
127 if ( m_SpentUnits )
128 {
131 }
132
133 if ( GetGame().IsServer() )
134 {
135 if( action_data.m_MainItem )
136 action_data.m_MainItem.AddQuantity( -m_SpentQuantity );
137
138 Car car = Car.Cast(action_data.m_Target.GetParent());
139 if( car )
140 car.Fill( CarFluid.COOLANT, (m_SpentQuantity * 0.001) );
141 }
142
143 m_SpentQuantity = 0;
144 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
Definition Car.c:19
void SetACData(Param units)
Definition CABase.c:40
float m_SpentQuantity_total
Definition CAContinuousFillCoolant.c:5
float m_SpentQuantity
Definition CAContinuousFillCoolant.c:4
ref Param1< float > m_SpentUnits
Definition CAContinuousFillCoolant.c:11
proto native CGame GetGame()

Перекрестные ссылки GetGame(), m_SpentQuantity, m_SpentQuantity_total, m_SpentUnits и CABase::SetACData().

◆ Cancel()

override int Cancel ( ActionData action_data)
inlineprotected
102 {
103 if ( !action_data.m_Player )
104 {
105 return UA_ERROR;
106 }
107
109 return UA_CANCEL;
110 }
void CalcAndSetQuantity()
Definition FireplaceBase.c:2601
const int UA_ERROR
Definition constants.c:462
const int UA_CANCEL
Definition constants.c:444

Перекрестные ссылки CalcAndSetQuantity(), UA_CANCEL и UA_ERROR.

◆ Execute()

override int Execute ( ActionData action_data)
inlineprotected
59 {
60 Car car = Car.Cast(action_data.m_Target.GetParent());
61
62 if ( !car )
63 return UA_ERROR;
64
65 if ( !action_data.m_Player )
66 {
67 return UA_ERROR;
68 }
69
70 if ( m_ItemQuantity <= 0 )
71 {
72 return UA_FINISHED;
73 }
74 else
75 {
77 {
80 m_TimeElpased += action_data.m_Player.GetDeltaT();
81
83 {
85 m_TimeElpased = 0;
86 //Setup(action_data); //reset data after repeat
87 }
88
89 return UA_PROCESSING;
90 }
91 else
92 {
95 return UA_FINISHED;
96 }
97 }
98 }
void OnCompletePogress(ActionData action_data)
Definition CAContinuousBase.c:8
float m_AdjustedQuantityUsedPerSecond
Definition CAContinuousFillCoolant.c:9
float m_ItemQuantity
Definition CAContinuousFillCoolant.c:3
float m_TimeElpased
Definition CAContinuousFillCoolant.c:7
const int UA_FINISHED
Definition constants.c:443
const int UA_PROCESSING
Definition constants.c:441

Перекрестные ссылки CalcAndSetQuantity(), m_AdjustedQuantityUsedPerSecond, m_DefaultTimeStep, m_ItemQuantity, m_QuantityUsedPerSecond, m_SpentQuantity, m_SpentQuantity_total, m_TimeElpased, CAContinuousBase::OnCompletePogress(), UA_ERROR, UA_FINISHED и UA_PROCESSING.

◆ GetProgress()

override float GetProgress ( )
inlineprotected
114 {
115 if ( m_ItemQuantity <= 0 )
116 return 1;
117
119 }

Перекрестные ссылки m_ItemQuantity и m_SpentQuantity_total.

◆ Setup()

override void Setup ( ActionData action_data)
inlineprotected
23 {
24 m_Player = action_data.m_Player;
25
26 Car car = Car.Cast(action_data.m_Target.GetParent());
27
28 if ( !car )
29 return;
30
31 m_TimeElpased = 0;
33
34 if ( !m_SpentUnits )
35 {
36 m_SpentUnits = new Param1<float>( 0 );
37 }
38 else
39 {
40 m_SpentUnits.param1 = 0;
41 }
42
43 m_QuantityUsedPerSecond *= Math.Min(action_data.m_MainItem.GetLiquidThroughputCoef(),car.GetLiquidThroughputCoef());
44
45 float coolCapacity = car.GetFluidCapacity( CarFluid.COOLANT );
46 float currentCool = car.GetFluidFraction( CarFluid.COOLANT );
48
50 m_ItemQuantity = action_data.m_MainItem.GetQuantity();
51
54
55 }
float m_EmptySpace
Definition CAContinuousFillCoolant.c:6
PlayerBase m_Player
Definition CAContinuousFillCoolant.c:13
Definition EnMath.c:7
static proto float Min(float x, float y)
Returns smaller of two given values.

Перекрестные ссылки m_EmptySpace, m_ItemQuantity, m_Player, m_QuantityUsedPerSecond, m_SpentQuantity, m_SpentUnits, m_TimeElpased и Math::Min().

Поля

◆ m_AdjustedQuantityUsedPerSecond

float m_AdjustedQuantityUsedPerSecond
protected

Используется в Execute().

◆ m_DefaultTimeStep

float m_DefaultTimeStep
protected

Используется в CAContinuousFillCoolant() и Execute().

◆ m_EmptySpace

float m_EmptySpace
protected

Используется в Setup().

◆ m_ItemQuantity

float m_ItemQuantity
protected

Используется в Execute(), GetProgress() и Setup().

◆ m_Player

PlayerBase m_Player
protected

Используется в Setup().

◆ m_QuantityUsedPerSecond

float m_QuantityUsedPerSecond
protected

Используется в CAContinuousFillCoolant(), Execute() и Setup().

◆ m_SpentQuantity

float m_SpentQuantity
protected

Используется в CalcAndSetQuantity(), Execute() и Setup().

◆ m_SpentQuantity_total

float m_SpentQuantity_total
protected

Используется в CalcAndSetQuantity(), Execute() и GetProgress().

◆ m_SpentUnits

ref Param1<float> m_SpentUnits
protected

Используется в CalcAndSetQuantity() и Setup().

◆ m_TimeElpased

float m_TimeElpased
protected

Используется в Execute() и Setup().


Объявления и описания членов класса находятся в файле: