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

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

void ActionUnplugThisByCord ()
 
override bool HasProgress ()
 
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)
 

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

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

◆ ActionUnplugThisByCord()

void ActionUnplugThisByCord ( )
inlineprivate
4 {
5 m_Text = "#unplug_by_cord";
6 }
string m_Text
Definition ActionBase.c:58

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

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
33 {
34 ItemBase targetItem = ItemBase.Cast(target.GetObject());
35
36 if (targetItem && targetItem.HasEnergyManager())
37 {
38 string selection = targetItem.GetActionComponentName(target.GetComponentIndex());
39
41 return true;
42
43 // Special case for unfolded spotlight
44 if (selection == Spotlight.SEL_CORD_PLUGGED_U)
45 return true;
46 }
47
48 return false;
49 }
Definition ComponentEnergyManager.c:19
static const string SEL_CORD_PLUGGED
Definition ComponentEnergyManager.c:65
Definition InventoryItem.c:731
Definition EntityAI.c:95

Перекрестные ссылки ComponentEnergyManager::SEL_CORD_PLUGGED.

◆ DisplayTargetInActionText()

override bool DisplayTargetInActionText ( )
inlineprivate
14 {
15 return true;
16 }

◆ GetTargetName()

override string GetTargetName ( PlayerBase player,
ActionTarget target )
inlineprivate
19 {
20 ItemBase targetItem = ItemBase.Cast(target.GetObject());
21 if (targetItem && targetItem.HasEnergyManager())
22 {
23 string selection = targetItem.GetActionComponentName(target.GetComponentIndex());
24
25 if (targetItem.GetCompEM() && targetItem.GetCompEM().GetPlugOwner(selection))
26 return targetItem.GetCompEM().GetPlugOwner(selection).GetDisplayName();
27 }
28
29 return super.GetTargetName(player, target);
30 }

◆ HasProgress()

override bool HasProgress ( )
inlineprivate
9 {
10 return false;
11 }

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
inlineprivate
52 {
53 ItemBase targetItem = ItemBase.Cast(action_data.m_Target.GetObject());
54 targetItem.GetCompEM().UnplugThis();
55
56 if (targetItem.IsInherited(Spotlight))
57 {
58 targetItem.HideSelection(Spotlight.SEL_CORD_PLUGGED_U);
59 targetItem.ShowSelection(Spotlight.SEL_CORD_FOLDED_U);
60 }
61 }

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