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

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

void ActionMountBarbedWire ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override ActionData CreateActionData ()
 
override bool SetupAction (PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=null)
 
override void WriteToContext (ParamsWriteContext ctx, ActionData action_data)
 
override bool ReadFromContext (ParamsReadContext ctx, out ActionReciveData action_recive_data)
 
override void HandleReciveData (ActionReciveData action_recive_data, ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
BarbedWire GetBarbedWire (ActionTarget target)
 
string GetZoneSelection (ActionTarget target)
 
override string GetAdminLogMessage (ActionData action_data)
 
- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Закрытые данные

float m_DamageAmount
 
string m_SlotName
 

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

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

◆ ActionMountBarbedWire()

void ActionMountBarbedWire ( )
inlineprivate
25 {
27 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
28 m_FullBody = true;
29 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
30
32 m_Text = "#mount";
33 }
bool m_FullBody
Definition ActionBase.c:61
string m_Text
Definition ActionBase.c:58
float m_SpecialtyWeight
Definition ActionBase.c:77
int m_StanceMask
Definition ActionBase.c:62
Definition ActionMountBarbedWire.c:12
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, ActionBase::m_StanceMask и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
42 {
44 if (base_building && base_building.CanUseConstruction() && base_building.CanUseConstructionBuild())
45 {
46 if (!base_building.IsPlayerInside(player,""))
47 return false;
48
49 BarbedWire barbed_wire = GetBarbedWire(target);
50 return (barbed_wire && !barbed_wire.IsMounted() && !barbed_wire.IsRuined());
51 }
52
53 return false;
54 }
BarbedWire GetBarbedWire(ActionTarget target)
Definition ActionMountBarbedWire.c:145
Definition Fence.c:2

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

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprivate

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
36 {
39 }
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
164 {
165 string message = string.Format("Player %1 Mounted BarbedWire on %2", action_data.m_Player, action_data.m_Target.GetObject().ClassName());
166 return message;
167 }

◆ GetBarbedWire()

BarbedWire GetBarbedWire ( ActionTarget target)
inlineprivate
146 {
148 BarbedWire wire;
149 if (Class.CastTo(wire,base_building.FindAttachmentBySlotName(GetZoneSelection(target))))
150 {
151 return wire;
152 }
153
154 return null;
155 }
string GetZoneSelection(ActionTarget target)
Definition ActionMountBarbedWire.c:157
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() и GetZoneSelection().

Используется в ActionCondition() и ActionUnmountBarbedWire::ActionCondition().

◆ GetZoneSelection()

string GetZoneSelection ( ActionTarget target)
inlineprivate
158 {
160 return base_building.GetActionComponentName(target.GetComponentIndex());
161 }

Используется в GetBarbedWire() и SetupAction().

◆ HandleReciveData()

override void HandleReciveData ( ActionReciveData action_recive_data,
ActionData action_data )
inlineprivate
106 {
107 super.HandleReciveData(action_recive_data, action_data);
108
110 BarbedWireActionData.Cast(action_data).m_SlotName = receiveDataBW.m_SlotName;
111 }
Definition ActionMountBarbedWire.c:2

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprivate
114 {
116 BaseBuildingBase base_building = BaseBuildingBase.Cast(actionDataBW.m_Target.GetObject());
117
118 //mount and refresh parent
119 BarbedWire wire = BarbedWire.Cast(base_building.FindAttachmentBySlotName(actionDataBW.m_SlotName));
120 wire.SetMountedState(true);
121
122 //solution for DamageSystem's case sensitivity
123 string zone = "invalid";
125 zones.Copy(base_building.GetEntityDamageZoneMap().GetKeyArray());
126
127 string tmp = "";
128 string test = "";
129 for (int i = 0; i < zones.Count(); i++)
130 {
131 tmp = zones.Get(i);
132 test = tmp;
133 test.ToLower();
134
135 if (test == actionDataBW.m_SlotName)
136 {
137 zone = tmp;
138 break;
139 }
140 }
141
142 base_building.SetHealth01(zone,"Health",wire.GetHealth01("","Health")); //attachment slot names and damagezone names must match
143 }

◆ ReadFromContext()

override bool ReadFromContext ( ParamsReadContext ctx,
out ActionReciveData action_recive_data )
inlineprivate
89 {
91 {
93 }
94 super.ReadFromContext(ctx, action_recive_data);
96
97 string slotName;
98 if (!ctx.Read(slotName))
99 return false;
100 receiveDataBW.m_SlotName = slotName;
101
102 return true;
103 }
PlayerSpawnPreset slotName

Перекрестные ссылки slotName.

◆ SetupAction()

override bool SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = null )
inlineprivate
63 {
64 if (super.SetupAction(player, target, item, action_data, extra_data))
65 {
66 #ifndef SERVER
69 #endif
70
71 return true;
72 }
73
74 return false;
75 }

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

◆ WriteToContext()

override void WriteToContext ( ParamsWriteContext ctx,
ActionData action_data )
inlineprivate
78 {
79 super.WriteToContext(ctx, action_data);
81
83 {
84 ctx.Write(actionDataBW.m_SlotName);
85 }
86 }

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

Поля

◆ m_DamageAmount

float m_DamageAmount
private

◆ m_SlotName

string m_SlotName
private

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