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

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

void ActionPullOutPlug ()
 
override bool DisplayTargetInActionText ()
 
override string GetTargetName (PlayerBase player, ActionTarget target)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

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

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

◆ ActionPullOutPlug()

void ActionPullOutPlug ( )
inlineprivate
4 {
5 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_INTERACTONCE;
6
7 m_Text = "#pull_out_plug";
8 }
string m_Text
Definition ActionBase.c:58
int m_CommandUID
Definition AnimatedActionBase.c:143
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
30 {
31 EntityAI targetEntity = EntityAI.Cast(target.GetObject());
32
33 if (targetEntity.HasEnergyManager())
34 {
35 string selection = targetEntity.GetActionComponentName(target.GetComponentIndex());
36
37 if (GetGame().IsServer())
38 return targetEntity.GetCompEM().GetPlugOwner(selection) != null;
39 else
40 return targetEntity.GetCompEM().IsSelectionAPlug(selection);
41 }
42
43 return false;
44 }
Definition Building.c:6
Definition EntityAI.c:95
proto native CGame GetGame()

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

◆ DisplayTargetInActionText()

override bool DisplayTargetInActionText ( )
inlineprivate
11 {
12 return true;
13 }

◆ GetTargetName()

override string GetTargetName ( PlayerBase player,
ActionTarget target )
inlineprivate
16 {
17 ItemBase targetItem = ItemBase.Cast(target.GetObject());
18 if (targetItem && targetItem.HasEnergyManager())
19 {
20 string selection = targetItem.GetActionComponentName(target.GetComponentIndex());
21
22 if (targetItem.GetCompEM() && targetItem.GetCompEM().GetPlugOwner(selection))
23 return targetItem.GetCompEM().GetPlugOwner(selection).GetDisplayName();
24 }
25
26 return super.GetTargetName(player, target);
27 }
Definition InventoryItem.c:731

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
inlineprivate
47 {
48 Object targetObject = action_data.m_Target.GetObject();
49 if (targetObject)
50 {
52 string selection = targetObject.GetActionComponentName(action_data.m_Target.GetComponentIndex());
53
54 EntityAI device = EntityAI.Cast(targetEntity.GetCompEM().GetPlugOwner(selection));
55 if (device)
56 device.GetCompEM().UnplugThis();
57
58 // Disable Advanced Placement
59 if (action_data.m_Player.IsPlacingServer())
60 action_data.m_Player.PlacingCancelServer();
61 }
62 }
Definition ObjectTyped.c:2

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