6 m_Text =
"#detach_power_source";
11 Object target_object = target.GetObject();
13 if ( player && target_object )
16 string selection = target_object.GetActionComponentName( target.GetComponentIndex() );
19 if ( target_entity && target_entity.GetInventory() && target_entity.GetInventory().AttachmentCount() > 0 && selection ==
"power_source" )
28 override void OnExecuteClient(
ActionData action_data )
33 override void OnExecuteServer(
ActionData action_data )
43 int attachments_count = target_entity.GetInventory().AttachmentCount();
44 for (
int j = 0; j < attachments_count; j++ )
47 attachment = target_entity.GetInventory().GetAttachmentFromIndex( j );
54 action_data.m_Player.PredictiveTakeEntityToHands(attachment );