DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Setup()

override void CAContinuousFillCoolant::Setup ( ActionData action_data)
inlineprotected

См. определение в файле CAContinuousFillCoolant.c строка 22

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 );
47 currentCool = currentCool * coolCapacity;
48
49 m_EmptySpace = (coolCapacity - currentCool) * 1000;
50 m_ItemQuantity = action_data.m_MainItem.GetQuantity();
51
54
55 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
Определения Car.c:19
float m_QuantityUsedPerSecond
Определения CAContinuousFillCoolant.c:8
PlayerBase m_Player
Определения CAContinuousFillCoolant.c:13
ref Param1< float > m_SpentUnits
Определения CAContinuousFillCoolant.c:11

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