3 override void CreateActionComponent()
18 m_Text =
"#STR_ArmExplosive";
39 if (target.GetParent())
55 return timedTrigger.IsAlarmOn() && explosive.IsTimerDetonable() && explosive.CanBeArmed();
58 return explosive.CanBeArmed();
72 explosive.OnPlacementComplete(action_data.m_Player, explosive.GetPosition(), action_data.m_Player.GetOrientation());
73 explosive.UnlockTriggerSlots();
76 if (action_data.m_MainItem.IsInherited(RemoteDetonator))
95 explosive.UnlockTriggerSlots();
98 if (!action_data.m_MainItem.IsInherited(RemoteDetonator))
107 if (action_data.m_Target.IsProxy())
109 explosive =
ExplosivesBase.Cast(action_data.m_Target.GetParent());
113 explosive =
ExplosivesBase.Cast(action_data.m_Target.GetObject());
116 if (explosive && action_data.m_MainItem)
118 explosive.UnlockTriggerSlots();
126 if (action_data.m_Target.IsProxy())
128 targetEAI =
EntityAI.Cast(action_data.m_Target.GetParent());
132 targetEAI =
EntityAI.Cast(action_data.m_Target.GetObject());
135 if (targetEAI && action_data.m_MainItem)
137 int slotId =
InventorySlots.GetSlotIdFromString(action_data.m_MainItem.GetExplosiveTriggerSlotName());
138 action_data.m_Player.PredictiveTakeEntityToTargetAttachmentEx(targetEAI, action_data.m_MainItem, slotId);