DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionTurnValve.c

См. исходные тексты.

Структуры данных

class  ActionTurnValveCB
 

Функции

ActionTurnValveCB ActionContinuousBaseCB ActionTurnValve ()
 
override void CreateActionComponent ()
 
override GetInputType ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStart (ActionData action_data)
 
override void OnEnd (ActionData action_data)
 
override bool IsLockTargetOnUse ()
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
32 {
34 if (Class.CastTo(targetEntity, target.GetObject()))
35 {
36 if (targetEntity.HasTurnableValveBehavior())
37 {
38 int valveIndex = targetEntity.GetTurnableValveIndex(target.GetComponentIndex());
39 if (valveIndex != -1)
40 {
41 if (!IsInReach(player, target, UAMaxDistances.DEFAULT))
42 {
43 return false;
44 }
45
46 return targetEntity.IsValveTurnable(valveIndex);
47 }
48 }
49 }
50
51 return false;
52 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition Building.c:6
Definition EntityAI.c:95
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), UAMaxDistances::DEFAULT и ActionBase::IsInReach().

◆ ActionTurnValve()

12 {
13 m_CallbackClass = ActionTurnValveCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_TURN_VALVE;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
17 m_Text = "#STR_USRACT_TURN";
18 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionTurnValve.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions().

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionTurnValveCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_TURN_VALVE;
15 m_FullBody = true;

Перекрестные ссылки m_CommandUID и m_StanceMask.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
26 {
27 m_ConditionItem = new CCINone();
28 m_ConditionTarget = new CCTCursor();
29 }
Definition CCINone.c:2
Definition CCTCursor.c:2

◆ GetInputType()

override GetInputType ( )
21 {
23 }
Definition ActionInput.c:522

◆ IsLockTargetOnUse()

override bool IsLockTargetOnUse ( )
70 {
71 return false;
72 }

◆ OnEnd()

override void OnEnd ( ActionData action_data)
63 {
64 action_data.m_Player.TryHideItemInHands(false);
65
66 super.OnEnd(action_data);
67 }

◆ OnStart()

override void OnStart ( ActionData action_data)
55 {
56 super.OnStart(action_data);
57
58 action_data.m_Player.TryHideItemInHands(true);
59
60 }