3 override void CreateActionComponent()
26 override void CreateConditionComponents()
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() )
47 m_SlotName = selection;
57 override void OnFinishProgressServer(
ActionData action_data )
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++)
78 if (test == m_SlotName)
85 base_building.SetHealth01(zone,
"Health",barbed_wire.GetHealth01(
"",
"Health"));
90 override string GetAdminLogMessage(
ActionData action_data )
92 string message =
string.Format(
"Player %1 Mounted BarbedWire on %2", action_data.m_Player, action_data.m_Target.GetObject().ClassName() );