1286 {
1289 target =
new ActionTarget(targetItem, null, -1, vector.Zero, -1);
1290 bool hasTarget = targetItem != NULL;
1291
1292 if (mainItem)
1293 {
1294 array<ActionBase_Basic> actions;
1296
1297
1298 mainItem.GetActions(DefaultActionInput, actions);
1299 if (actions)
1300 {
1301 for (int i = 0; i < actions.Count(); i++)
1302 {
1304 if (picked_action && picked_action.Can(
m_Player,target, itemInHand) && picked_action.CanBeSetFromInventory())
1305 {
1306 if (hasTarget == picked_action.HasTarget())
1307 {
1309 return;
1310 }
1311 }
1312 }
1313 }
1314
1316 if (actions)
1317 {
1318 for (int j = 0; j < actions.Count(); j++)
1319 {
1321 if (picked_action && picked_action.HasTarget() && picked_action.Can(
m_Player,target, itemInHand) && picked_action.CanBeSetFromInventory())
1322 {
1323 if (hasTarget == picked_action.HasTarget())
1324 {
1326 return;
1327 }
1328 }
1329 }
1330 }
1331 }
1332 }
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
class GP5GasMask extends MaskBase ItemBase
void SetInventoryAction(ActionBase action_name, ItemBase target_item, ItemBase main_item)