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

Закрытые члены

void ActionFillCoolant ()
 
override void CreateConditionComponents ()
 
override bool IsUsingProxies ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Закрытые данные

const string RADIATOR_SELECTION_NAME = "radiator"
 

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

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

◆ ActionFillCoolant()

void ActionFillCoolant ( )
inlineprivate
16 {
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
19 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
20 m_FullBody = true;
22 m_LockTargetOnUse = false;
23 m_Text = "#refill_car";
24
25 }
bool m_FullBody
Definition ActionBase.c:61
string m_Text
Definition ActionBase.c:58
bool m_LockTargetOnUse
Definition ActionBase.c:60
float m_SpecialtyWeight
Definition ActionBase.c:77
int m_StanceMask
Definition ActionBase.c:62
Definition ActionFillCoolant.c:2
int m_CommandUID
Definition AnimatedActionBase.c:143
m_CallbackClass
Definition AnimatedActionBase.c:145
Definition EntityAI.c:95
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, ActionBase::m_FullBody, ActionBase::m_LockTargetOnUse, ActionBase::m_SpecialtyWeight, ActionBase::m_StanceMask и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
39 {
40 if (!target)
41 return false;
42
43 if (item.GetQuantity() <= 0)
44 return false;
45
46 if (item.GetLiquidType() != LIQUID_WATER)
47 return false;
48
49 if (item.GetIsFrozen())
50 {
51 return false;
52 }
53
54 Car car = Car.Cast( target.GetParent() );
55 if (!car)
56 return false;
57
58 if (car.GetFluidFraction( CarFluid.COOLANT ) >= 0.95)
59 return false;
60
62 target.GetObject().GetActionComponentNameList(target.GetComponentIndex(), selections);
63
65
66 if (carS)
67 {
70
71 if (CastTo(carAI, car))
72 {
73 radiator = carAI.GetInventory().FindAttachment(InventorySlots.GetSlotIdFromString("CarRadiator"));
74 if (radiator && !radiator.IsRuined())
75 {
76 for (int s = 0; s < selections.Count(); s++)
77 {
78 if (selections[s] == carS.GetActionCompNameCoolant())
79 {
80 float dist = vector.Distance( carS.GetCoolantPtcPosWS(), player.GetPosition() );
81
82 if (dist < carS.GetActionDistanceCoolant())
83 return true;
84 }
85 }
86 }
87 }
88 }
89
90 return false;
91 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
Definition Car.c:19
Definition CivilianSedan.c:2
Definition Building.c:6
provides access to slot configuration
Definition InventorySlots.c:6
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
Definition EnConvert.c:106
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
const int LIQUID_WATER
Definition constants.c:518

Перекрестные ссылки vector::Distance(), InventorySlots::GetSlotIdFromString() и LIQUID_WATER.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
28 {
31 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTObject.c:27

Перекрестные ссылки ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ IsUsingProxies()

override bool IsUsingProxies ( )
inlineprivate
34 {
35 return true;
36 }

Поля

◆ RADIATOR_SELECTION_NAME

const string RADIATOR_SELECTION_NAME = "radiator"
private

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