34 Object targetObject = target.GetObject();
36 if ( targetObject && targetObject.CanUseConstruction() && targetObject.CanUseConstructionBuild() )
40 string selection = targetObject.GetActionComponentName( target.GetComponentIndex() );
42 if ( selection.
Length() > 0 )
44 BarbedWire barbed_wire = BarbedWire.Cast( base_building.FindAttachmentBySlotName( selection ) );
45 if ( barbed_wire && !barbed_wire.IsMounted() && !barbed_wire.IsRuined() )
60 BarbedWire barbed_wire = BarbedWire.Cast( base_building.FindAttachmentBySlotName(
m_SlotName ) );
63 barbed_wire.SetMountedState(
true );
66 string zone =
"invalid";
68 zones.Copy(base_building.GetEntityDamageZoneMap().GetKeyArray());
72 for (
int i = 0; i < zones.Count(); i++)
85 base_building.SetHealth01(zone,
"Health",barbed_wire.GetHealth01(
"",
"Health"));
92 string message =
string.
Format(
"Player %1 Mounted BarbedWire on %2", action_data.
m_Player, action_data.
m_Target.GetObject() );
protected float m_SpecialtyWeight
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
protected bool m_FullBody
protected int m_StanceMask
class ActionTargets ActionTarget
protected ActionData m_ActionData
ref CABase m_ActionComponent
ref ActionTarget m_Target
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
override string GetAdminLogMessage(ActionData action_data)
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
void ActionMountBarbedWire()
protected int m_CommandUID
protected m_CallbackClass
const float DEFAULT_CONSTRUCT
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerConstants
defined in C++
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. Returns length.
proto native int Length()
Returns length of string.