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

◆ Setup()

override void CAContinuousFillBrakes::Setup ( ActionData action_data)
inlineprotected

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

23 {
24 m_Player = action_data.m_Player;
25
26 Car car = Car.Cast(action_data.m_Target.GetObject());
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 float oilCapacity = car.GetFluidCapacity( CarFluid.BRAKE );
44 float currentOil = car.GetFluidFraction( CarFluid.BRAKE );
45 currentOil = currentOil * oilCapacity;
46
47 m_EmptySpace = (oilCapacity - currentOil) * 1000;
48 m_ItemQuantity = action_data.m_MainItem.GetQuantity();
49
52
53 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
Определения Car.c:19
ref Param1< float > m_SpentUnits
Определения CAContinuousFillBrakes.c:11
float m_ItemQuantity
Определения CAContinuousFillBrakes.c:3
float m_SpentQuantity
Определения CAContinuousFillBrakes.c:4
PlayerBase m_Player
Определения CAContinuousFillBrakes.c:13
float m_TimeElpased
Определения CAContinuousFillBrakes.c:7

Перекрестные ссылки ActionData, m_EmptySpace, m_ItemQuantity, m_Player, m_SpentQuantity, m_SpentUnits и m_TimeElpased.