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

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

ItemBase m_SourceForReplug
 DEPRECATED.
 

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

void ActionRepositionPluggedItem ()
 
override GetInputType ()
 
override bool HasProgress ()
 
override bool CanBeUsedOnBack ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool CanContinue (ActionData action_data)
 
override void Start (ActionData action_data)
 
override void OnExecuteServer (ActionData action_data)
 
override void OnExecuteClient (ActionData action_data)
 
override void CreateAndSetupActionCallback (ActionData action_data)
 

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

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

◆ ActionRepositionPluggedItem()

void ActionRepositionPluggedItem ( )
inlineprivate
5 {
7 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
8 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
9
10 m_Text = "#reposition";
11 }
string m_Text
Definition ActionBase.c:58
int m_StanceMask
Definition ActionBase.c:62
Definition ActionInteractBase.c:2
int m_CommandUID
Definition AnimatedActionBase.c:143
m_CallbackClass
Definition AnimatedActionBase.c:145
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
29 {
30 ItemBase targetItem = ItemBase.Cast(target.GetObject());
31 EntityAI targetParent = EntityAI.Cast(targetItem.GetHierarchyParent());
32 if (!targetItem || !targetItem.IsTakeable() || targetItem.IsBeingPlaced() || (targetItem.GetCompEM() && !targetItem.GetCompEM().IsPlugged()) || ( targetItem.GetHierarchyParent() && !BaseBuildingBase.Cast(targetItem.GetHierarchyParent()) ) || ((targetParent && !targetItem.CanDetachAttachment(targetParent)) || (targetParent && !targetParent.CanReleaseAttachment(targetItem))))
33 return false;
34
35 if (targetItem.HasEnergyManager() && targetItem.GetCompEM().IsPlugged())
36 return player.GetInventory().CanAddEntityIntoHands(targetItem);
37
38 return false;
39 }
Definition Fence.c:2
Definition Building.c:6
Definition InventoryItem.c:731
Definition EntityAI.c:95

◆ CanBeUsedOnBack()

override bool CanBeUsedOnBack ( )
inlineprivate
24 {
25 return false;
26 }

◆ CanContinue()

override bool CanContinue ( ActionData action_data)
inlineprivate
42 {
43 EntityAI ent = EntityAI.Cast(action_data.m_Target.GetObject());
44 return ent && ent.GetCompEM().GetCordLength() > 0;
45 }

◆ CreateAndSetupActionCallback()

override void CreateAndSetupActionCallback ( ActionData action_data)
inlineprivate
82 {
83 EntityAI target = EntityAI.Cast(action_data.m_Target.GetObject());
85 if (!target)
86 return;
87
88 if (target.IsHeavyBehaviour())
89 {
90 Class.CastTo(callback, action_data.m_Player.StartCommand_Action(DayZPlayerConstants.CMD_ACTIONFB_PICKUP_HEAVY,GetCallbackClassTypename(), DayZPlayerConstants.STANCEMASK_ERECT));
91 }
92 else
93 {
94 Class.CastTo(callback, action_data.m_Player.AddCommandModifier_Action(DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS,GetCallbackClassTypename()));
95 }
96
97 callback.SetActionData(action_data);
98 callback.InitActionComponent();
99 action_data.m_Callback = callback;
100 }
Definition AnimatedActionBase.c:2
GetCallbackClassTypename()
Definition AnimatedActionBase.c:307
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo() и AnimatedActionBase::GetCallbackClassTypename().

◆ GetInputType()

override GetInputType ( )
inlineprivate
14 {
16 }
Definition ActionInput.c:522

◆ HasProgress()

override bool HasProgress ( )
inlineprivate
19 {
20 return false;
21 }

◆ OnExecuteClient()

override void OnExecuteClient ( ActionData action_data)
inlineprivate
73 {
75 ItemBase ntarget = ItemBase.Cast(action_data.m_Target.GetObject());
77
78 action_data.m_Player.PredictiveTakeEntityToHands(ntarget);
79 }
void ClearInventoryReservationEx(ActionData action_data)
Definition ActionBase.c:921
InventoryLocation.
Definition InventoryLocation.c:29

Перекрестные ссылки ActionBase::ClearInventoryReservationEx().

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
inlineprivate
59 {
61
62 if (GetGame().IsMultiplayer())
63 return;
64
66 ItemBase ntarget = ItemBase.Cast(action_data.m_Target.GetObject());
68
69 action_data.m_Player.PredictiveTakeEntityToHands(ntarget);
70 }
void ClearActionJuncture(ActionData action_data)
Definition ActionBase.c:979
proto native CGame GetGame()

Перекрестные ссылки ActionBase::ClearActionJuncture(), ActionBase::ClearInventoryReservationEx() и GetGame().

◆ Start()

override void Start ( ActionData action_data)
inlineprivate
48 {
49 super.Start(action_data);
50
51 ItemBase ntarget = ItemBase.Cast(action_data.m_Target.GetObject());
52 if (GetGame().IsMultiplayer() && GetGame().IsServer())
53 action_data.m_Player.PlacingStartServer(ntarget);
54 else
55 action_data.m_Player.PlacingStartLocal(ntarget);
56 }

Перекрестные ссылки GetGame().

Поля

◆ m_SourceForReplug

ItemBase m_SourceForReplug
protected

DEPRECATED.


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