157 if (
m_input.InputP().LocalClick() )
305 super.ForceAction(action, target, item);
312 if ( !action_source_object )
317 action_source_object.GetActions(this.
Type(), possible_actions);
322 for (
int i = 0; i < possible_actions.Count(); i++)
324 action =
ActionBase.Cast(possible_actions.Get(i));
326 if ( action.HasVariants() )
329 action.GetVariants( variant_actions);
330 for (
int j = 0; j < variant_actions.Count(); j++)
332 action = variant_actions[j];
335 select_actions_all.Insert(action);
336 if (action.HasTarget())
337 has_any_action_target =
true;
345 select_actions_all.Insert(action);
346 if (action.HasTarget())
347 has_any_action_target =
true;
356 if (ForceActionCheck(player))
365 target = m_ForcedTarget;
377 if (m_DetectFromItem)
382 if (m_DetectFromTarget)
388 if (m_DetectFromPlayer)
395 if (select_actions_all.Count() > 0)
398 foreach (
ActionBase action : select_actions_all)
402 if (action.HasTarget())
417 action.OnActionInfoUpdate(player, target, item);
436 action.OnActionInfoUpdate(player, target, item);
460 m_Player.GetActionManager().SelectFirstActionCategory();
470 if (m_HasTarget && action.HasTarget() && !action.CanBeStarted())
480 allActions.RemoveItem(action2);
482 allActions.InsertAll(tmp);
552 m_DetectFromTarget =
true;
553 m_DetectFromItem =
false;
554 m_DetectFromPlayer =
true;
568 super.OnActionStart();
605 for (
int i = 0; i < possible_actions.Count(); i++)
607 action =
ActionBase.Cast(possible_actions.Get(i));
635 m_DetectFromTarget =
false;
636 m_DetectFromItem =
true;
637 m_DetectFromPlayer =
true;
649 super.ActionsSelectReset();
664 super.OnActionStart();
692 m_DetectFromItem =
false;
693 m_DetectFromTarget =
false;
694 m_DetectFromPlayer =
false;
699 if (ForceActionCheck(player))
711 if (player && player.IsInVehicle())
730 target = m_ForcedTarget;
733 if (target && target.GetObject())
735 target.GetObject().GetActions(this.
Type(), possibleActions);
738 for (i = 0; i < possibleActions.Count(); i++)
740 action =
ActionBase.Cast(possibleActions.Get(i));
741 if (action.Can(player, target,
m_MainItem, action_condition_mask))
767 m_DetectFromItem =
false;
768 m_DetectFromTarget =
false;
769 m_DetectFromPlayer =
false;
789 if( ForceActionCheck(player) )
797 array<ActionBase_Basic> possible_actions;
802 if ( player && !player.IsInVehicle() )
804 Clothing headgear =
Clothing.Cast(player.FindAttachmentBySlotName(
"Headgear"));
805 Clothing eyewear =
Clothing.Cast(player.FindAttachmentBySlotName(
"Eyewear"));
822 target = m_ForcedTarget;
825 if(target && target.GetObject())
827 target.GetObject().GetActions(this.
Type(), possible_actions);
830 for (i = 0; i < possible_actions.Count(); i++)
832 action =
ActionBase.Cast(possible_actions.Get(i));
833 if ( action.Can(player, target,
m_MainItem, action_condition_mask) )
862 if (ForceActionCheck(player))
872 if (player && player.IsInVehicle())
889 target = m_ForcedTarget;
892 if(target && target.GetObject())
894 target.GetObject().GetActions(this.
Type(), possibleActions);
895 int possibleActionsCount = possibleActions.Count();
898 for (
int i = 0; i < possibleActionsCount; ++i)
901 if (action.Can(player, target,
m_MainItem, action_condition_mask))
930 if( ForceActionCheck(player) )
937 array<ActionBase_Basic> possible_actions;
944 CachedEquipmentStorageQuery query =
new CachedEquipmentStorageQuery();
951 array<Entity> nvgs = player.GetCachedEquipment().GetEntitiesByCategory(query);
953 foreach (Entity nvg : nvgs)
955 nvgParent =
EntityAI.Cast(nvg).GetHierarchyParent();
968 target = m_ForcedTarget;
971 if(target && target.GetObject())
973 target.GetObject().GetActions(this.
Type(), possible_actions);
976 for (i = 0; i < possible_actions.Count(); i++)
978 action =
ActionBase.Cast(possible_actions.Get(i));
979 if ( action.Can(player, target,
m_MainItem, action_condition_mask) )
void SetInput(ActionInput ai)
ref ActionTarget m_Target
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
class BaitData m_MainItem
ECachedEquipmentItemCategory
ECachedEquipmentPlacement
class GP5GasMask extends MaskBase ItemBase
ECachedEquipmentItemCategory m_Category
ref TIntArray m_ParentPlacement
ECachedEquipmentPlacement m_Placement
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()
Native class for boats - handles physics simulation.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.