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

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

void ActionUnmountBarbedWire ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
override string GetZoneSelection (ActionTarget target)
 
override string GetAdminLogMessage (ActionData action_data)
 

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

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

◆ ActionUnmountBarbedWire()

void ActionUnmountBarbedWire ( )
inlineprivate
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
17
19 m_Text = "#unmount_barbed_wire";
20 }
int m_StanceMask
Definition ActionBase.c:33
bool m_FullBody
Definition ActionBase.c:61
string m_Text
Definition ActionBase.c:58
float m_SpecialtyWeight
Definition ActionBase.c:77
Definition ActionUnMountBarbedWire.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_SpecialtyWeight, m_StanceMask и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
29 {
31 if (base_building && base_building.CanUseConstruction() && base_building.CanUseConstructionBuild())
32 {
33 if (!base_building.IsPlayerInside(player,""))
34 return false;
35
36 BarbedWire barbed_wire = GetBarbedWire(target);
37 return (barbed_wire && barbed_wire.IsMounted());
38 }
39
40 return false;
41 }
BarbedWire GetBarbedWire(ActionTarget target)
Definition ActionMountBarbedWire.c:145
Definition Fence.c:2

Перекрестные ссылки ActionMountBarbedWire::GetBarbedWire().

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
23 {
26 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTNonRuined.c:2
Definition ActionConstants.c:106
const float BASEBUILDING
Definition ActionConstants.c:112

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

◆ GetAdminLogMessage()

override string GetAdminLogMessage ( ActionData action_data)
inlineprivate
75 {
76 string message = string.Format("Player %1 Unmounted BarbedWire from %2", action_data.m_Player, action_data.m_Target.GetObject().ClassName());
77 return message;
78 }

◆ GetZoneSelection()

override string GetZoneSelection ( ActionTarget target)
inlineprivate
54 {
56 string selection = base_building.GetActionComponentName(target.GetComponentIndex());
57
58 if (selection.Length() > 0)
59 {
60 int delimiter_index = selection.IndexOfFrom(0, "_mounted");
61 if (delimiter_index > -1)
62 {
63 selection = selection.Substring(0, delimiter_index);
64 }
65 /*else if (!selection.Contains("_barbedwire_") && selection.Contains("_wall_"))
66 {
67 selection.Insert(selection.Length(),"_barbedwire_1");
68 }*/
69 }
70 //Print(selection);
71 return selection;
72 }
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOfFrom(int start, string sample)
Finds 'sample' in 'str' from 'start' position. Returns -1 when not found.
proto native int Length()
Returns length of string.

Перекрестные ссылки string::IndexOfFrom(), string::Length() и string::Substring().

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprivate
44 {
47
48 //unmount and refresh parent
49 BarbedWire wire = BarbedWire.Cast(base_building.FindAttachmentBySlotName(actionDataBW.m_SlotName));
50 wire.SetMountedState(false);
51 }

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