303 super.ForceAction(action, target, item);
310 if ( !action_source_object )
315 action_source_object.GetActions(this.
Type(), possible_actions);
320 for (
int i = 0; i < possible_actions.Count(); i++)
322 action =
ActionBase.Cast(possible_actions.Get(i));
324 if ( action.HasVariants() )
327 action.GetVariants( variant_actions);
328 for (
int j = 0; j < variant_actions.Count(); j++)
330 action = variant_actions[j];
333 select_actions_all.Insert(action);
334 if (action.HasTarget())
335 has_any_action_target =
true;
343 select_actions_all.Insert(action);
344 if (action.HasTarget())
345 has_any_action_target =
true;
376 if( m_DetectFromItem )
382 if( m_DetectFromTarget )
388 if( m_DetectFromPlayer )
393 if ( select_actions_all.Count() )
396 for ( i = 0; i < select_actions_all.Count(); i++ )
401 if ( action.HasTarget() )
416 action.OnActionInfoUpdate(player, target, item);
435 action.OnActionInfoUpdate(player, target, item);
458 m_Player.GetActionManager().SelectFirstActionCategory();
528 m_DetectFromTarget =
true;
529 m_DetectFromItem =
false;
530 m_DetectFromPlayer =
true;
544 super.OnActionStart();
581 for (
int i = 0; i < possible_actions.Count(); i++)
583 action =
ActionBase.Cast(possible_actions.Get(i));
611 m_DetectFromTarget =
false;
612 m_DetectFromItem =
true;
613 m_DetectFromPlayer =
true;
625 super.ActionsSelectReset();
640 super.OnActionStart();
668 m_DetectFromItem =
false;
669 m_DetectFromTarget =
false;
670 m_DetectFromPlayer =
false;
675 if (ForceActionCheck(player))
687 if (player && player.IsInVehicle())
706 target = m_ForcedTarget;
709 if (target && target.GetObject())
711 target.GetObject().GetActions(this.
Type(), possibleActions);
714 for (i = 0; i < possibleActions.Count(); i++)
716 action =
ActionBase.Cast(possibleActions.Get(i));
717 if (action.Can(player, target,
m_MainItem, action_condition_mask))
740 m_DetectFromItem =
false;
741 m_DetectFromTarget =
false;
742 m_DetectFromPlayer =
false;
759 if( ForceActionCheck(player) )
772 if ( player && !player.IsInVehicle() )
774 Clothing headgear =
Clothing.Cast(player.FindAttachmentBySlotName(
"Headgear"));
775 Clothing eyewear =
Clothing.Cast(player.FindAttachmentBySlotName(
"Eyewear"));
791 else if ( player && player.IsInVehicle() )
808 target = m_ForcedTarget;
811 if(target && target.GetObject())
813 target.GetObject().GetActions(this.
Type(), possible_actions);
816 for (i = 0; i < possible_actions.Count(); i++)
818 action =
ActionBase.Cast(possible_actions.Get(i));
819 if ( action.Can(player, target,
m_MainItem, action_condition_mask) )
848 if( ForceActionCheck(player) )
863 Mich2001Helmet helmet = Mich2001Helmet.Cast(player.FindAttachmentBySlotName(
"Headgear"));
864 NVGHeadstrap headstrap = NVGHeadstrap.Cast(player.FindAttachmentBySlotName(
"Eyewear"));
871 else if ( headstrap )
880 target = m_ForcedTarget;
883 if(target && target.GetObject())
885 target.GetObject().GetActions(this.
Type(), possible_actions);
888 for (i = 0; i < possible_actions.Count(); i++)
890 action =
ActionBase.Cast(possible_actions.Get(i));
891 if ( action.Can(player, target,
m_MainItem, action_condition_mask) )
enum ActionConditionMask m_MainItem
void SetInput(ActionInput ai)
ref ActionTarget m_Target
class ActionTargets ActionTarget
override ItemBase GetLightSourceItem()
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
proto native Transport GetTransport()
static bool IsActionLogEnable()
Base native class for all motorized wheeled vehicles.
proto native UAInput InputP()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.