155 if (
m_input.InputP().LocalClick() )
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));
328 for (
int j = 0; j < variant_actions.Count(); j++)
330 action = variant_actions[j];
333 select_actions_all.Insert(action);
335 has_any_action_target =
true;
343 select_actions_all.Insert(action);
345 has_any_action_target =
true;
354 if ( ForceActionCheck(player))
363 target = m_ForcedTarget;
373 m_ConditionMask = action_condition_mask;
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++ )
459 m_Player.GetActionManager().SelectFirstActionCategory();
526 SetInput(
"UAAction");
529 m_DetectFromTarget =
true;
530 m_DetectFromItem =
false;
531 m_DetectFromPlayer =
true;
545 super.OnActionStart();
582 for (
int i = 0; i < possible_actions.Count(); i++)
584 action =
ActionBase.Cast(possible_actions.Get(i));
609 SetInput(
"UADefaultAction");
612 m_DetectFromTarget =
false;
613 m_DetectFromItem =
true;
614 m_DetectFromPlayer =
true;
626 super.ActionsSelectReset();
641 super.OnActionStart();
666 SetInput(
"UACarHorn");
669 m_DetectFromItem =
false;
670 m_DetectFromTarget =
false;
671 m_DetectFromPlayer =
false;
676 if (ForceActionCheck(player))
688 if (player && player.IsInVehicle())
707 target = m_ForcedTarget;
710 if (target && target.GetObject())
712 target.GetObject().GetActions(this.
Type(), possibleActions);
715 for (i = 0; i < possibleActions.Count(); i++)
717 action =
ActionBase.Cast(possibleActions.Get(i));
718 if (action.
Can(player, target,
m_MainItem, action_condition_mask))
738 SetInput(
"UACarHorn");
741 m_DetectFromItem =
false;
742 m_DetectFromTarget =
false;
743 m_DetectFromPlayer =
false;
753 SetInput(
"UAToggleHeadlight");
760 if( ForceActionCheck(player) )
773 if ( player && !player.IsInVehicle() )
775 Clothing headgear =
Clothing.Cast(player.FindAttachmentBySlotName(
"Headgear"));
776 Clothing eyewear =
Clothing.Cast(player.FindAttachmentBySlotName(
"Eyewear"));
792 else if ( player && player.IsInVehicle() )
809 target = m_ForcedTarget;
812 if(target && target.GetObject())
814 target.GetObject().GetActions(this.
Type(), possible_actions);
817 for (i = 0; i < possible_actions.Count(); i++)
819 action =
ActionBase.Cast(possible_actions.Get(i));
820 if ( action.
Can(player, target,
m_MainItem, action_condition_mask) )
842 SetInput(
"UAToggleNVG");
849 if( ForceActionCheck(player) )
864 Mich2001Helmet helmet = Mich2001Helmet.Cast(player.FindAttachmentBySlotName(
"Headgear"));
865 NVGHeadstrap headstrap = NVGHeadstrap.Cast(player.FindAttachmentBySlotName(
"Eyewear"));
872 else if ( headstrap )
881 target = m_ForcedTarget;
884 if(target && target.GetObject())
886 target.GetObject().GetActions(this.
Type(), possible_actions);
889 for (i = 0; i < possible_actions.Count(); i++)
891 action =
ActionBase.Cast(possible_actions.Get(i));
892 if ( action.
Can(player, target,
m_MainItem, action_condition_mask) )
ref ActionTarget m_Target
class ActionTargets ActionTarget
class BaitData m_MainItem
int GetVariants(out array< ref ActionBase > variants)
void UpdateVariants(Object item, Object target, int componet_index)
void OnActionInfoUpdate(PlayerBase player, ActionTarget target, ItemBase item)
bool Can(PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
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.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.