50 return (barbed_wire && !barbed_wire.IsMounted() && !barbed_wire.IsRuined());
58 BarbedWireActionData action_data =
new BarbedWireActionData();
64 if (super.SetupAction(player, target, item, action_data, extra_data))
67 BarbedWireActionData actionDataBW = BarbedWireActionData.Cast(action_data);
79 super.WriteToContext(ctx, action_data);
80 BarbedWireActionData actionDataBW
84 ctx.
Write(actionDataBW.m_SlotName);
90 if (!action_recive_data)
94 super.ReadFromContext(ctx, action_recive_data);
107 super.HandleReciveData(action_recive_data, action_data);
115 super.OnStartServer(action_data);
118 if (wire && wire.GetLoopDeploySoundset() !=
string.Empty)
119 wire.StartItemSoundServer(SoundConstants.ITEM_DEPLOY_LOOP);
125 if (wire && wire.GetLoopDeploySoundset() !=
string.Empty)
126 wire.StopItemSoundServer(SoundConstants.ITEM_DEPLOY_LOOP);
128 super.OnEndServer(action_data);
133 BarbedWireActionData actionDataBW = BarbedWireActionData.Cast(action_data);
137 BarbedWire wire = BarbedWire.Cast(base_building.FindAttachmentBySlotName(actionDataBW.m_SlotName));
138 wire.SetMountedState(
true);
140 if (wire.GetDeploySoundset() !=
string.Empty)
141 wire.StartItemSoundServer(SoundConstants.ITEM_DEPLOY);
144 string zone =
"invalid";
146 zones.Copy(base_building.GetEntityDamageZoneMap().GetKeyArray());
150 for (
int i = 0; i < zones.Count(); i++)
156 if (test == actionDataBW.m_SlotName)
163 base_building.SetHealth01(zone,
"Health",wire.GetHealth01(
"",
"Health"));
181 return base_building.GetActionComponentName(target.GetComponentIndex());
186 string message =
string.
Format(
"Player %1 Mounted BarbedWire on %2", action_data.m_Player, action_data.m_Target.GetObject().ClassName());
BarbedWireActionReceiveData m_SlotName
class ActionTargets ActionTarget
PlayerSpawnPreset slotName
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ActionContinuousBase()
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
override void OnEndServer(ActionData action_data)
string GetZoneSelection(ActionTarget target)
override string GetAdminLogMessage(ActionData action_data)
override ActionData CreateActionData()
override void CreateConditionComponents()
override bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=null)
override bool ReadFromContext(ParamsReadContext ctx, out ActionReciveData action_recive_data)
BarbedWire GetBarbedWire(ActionTarget target)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
void ActionMountBarbedWire()
override void WriteToContext(ParamsWriteContext ctx, ActionData action_data)
override void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
override void OnStartServer(ActionData action_data)
override bool IsPlayerInside(PlayerBase player, string selection)
override bool CanUseConstructionBuild()
Super root of all classes in Enforce script.
Base Param Class with no parameters.
proto bool Write(void value_out)
proto bool Read(void value_in)
const float DEFAULT_CONSTRUCT
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerConstants
defined in C++
Serializer ParamsReadContext
Serializer ParamsWriteContext
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
proto int ToLower()
Changes string to lowercase.