DayZ 1.24
Loading...
Searching...
No Matches
ActionInput.c File Reference

Go to the source code of this file.

Classes

class  ActionInput
 
class  ContinuousInteractActionInput
 
class  InteractActionInput
 
class  NoIndicationActionInputBase
 
class  DefaultActionInput
 
class  DropActionInput
 
class  CarHornShortActionInput
 
class  ToggleLightsActionInput
 
class  ToggleNVGActionInput
 
class  ContinuousWeaponManipulationActionInput
 
class  WeaponManipulationActionInput
 
class  ExternalControlledActionInput
 
class  InventoryOnlyActionInput
 
class  QuickaBarActionInput
 

Enumerations

enum  ActionInputType {
  AIT_CONTINUOUS , AIT_SINGLE , AIT_DOUBLECLICK , AIT_HOLDSINGLE ,
  AIT_CLICKCONTINUOUS , AIT_NOINPUTCONTROL , AIT_INVENTORYINPUT
}
 

Functions

void StandardActionInput (PlayerBase player)
 
override void ForceAction (ActionBase action, ActionTarget target, ItemBase item)
 
void _GetSelectedActions (Object action_source_object, out array< ActionBase > select_actions_all, out bool has_any_action_target)
 
override void UpdatePossibleActions (PlayerBase player, ActionTarget target, ItemBase item, int action_condition_mask)
 
override array< ActionBaseGetPossibleActions ()
 
override int GetPossibleActionsCount ()
 
override bool HasTarget ()
 
override int GetPossibleActionIndex ()
 
override ActionBase GetAction ()
 
override void ActionsSelectReset ()
 
override void SelectNextAction ()
 
override void SelectPrevAction ()
 
void ContinuousDefaultActionInput (PlayerBase player)
 
override ActionBase GetPossibleAction ()
 
CarHornShortActionInput ContinuousDefaultActionInput CarHornLongActionInput (PlayerBase player)
 
void CarHornShortActionInput (PlayerBase player)
 

Variables

enum ActionInputType m_Action
 
ref ActionTarget m_Target
 
ItemBase m_Item
 
ActionInput m_SelectActions
 
int m_selectedActionIndex
 
NoIndicationActionInputBase m_SelectAction
 
ref ActionTarget targetNew
 
ToggleLightsActionInput CarHornLongActionInput
 

Enumeration Type Documentation

◆ ActionInputType

Enumerator
AIT_CONTINUOUS 
AIT_SINGLE 
AIT_DOUBLECLICK 
AIT_HOLDSINGLE 
AIT_CLICKCONTINUOUS 
AIT_NOINPUTCONTROL 
AIT_INVENTORYINPUT 

Definition at line 1 of file ActionInput.c.

2{
3 AIT_CONTINUOUS, //React to hold input and release after it
4 AIT_SINGLE, //React to click input - single use actions
5 AIT_DOUBLECLICK, //React to double click input - single use actions
6 AIT_HOLDSINGLE, //React to hold input - single use actions
7 AIT_CLICKCONTINUOUS, //React to click input for start and click for end
9 AIT_INVENTORYINPUT, //Inventory specific actions
10}
@ AIT_SINGLE
Definition ActionInput.c:4
@ AIT_CONTINUOUS
Definition ActionInput.c:3
@ AIT_DOUBLECLICK
Definition ActionInput.c:5
@ AIT_INVENTORYINPUT
Definition ActionInput.c:9
@ AIT_HOLDSINGLE
Definition ActionInput.c:6
@ AIT_NOINPUTCONTROL
Definition ActionInput.c:8
@ AIT_CLICKCONTINUOUS
Definition ActionInput.c:7

Function Documentation

◆ _GetSelectedActions()

void _GetSelectedActions ( Object action_source_object,
out array< ActionBase > select_actions_all,
out bool has_any_action_target )

Definition at line 302 of file ActionInput.c.

303 {
305 return;
306
309 action_source_object.GetActions(this.Type(), possible_actions);
310 ActionBase action;
311
313 {
314 for (int i = 0; i < possible_actions.Count(); i++)
315 {
316 action = ActionBase.Cast(possible_actions.Get(i));
317
318 if (action.HasVariants())
319 {
320 action.UpdateVariants(m_MainItem, m_Target.GetObject(), m_Target.GetComponentIndex());
321 action.GetVariants(variant_actions);
322 for (int j = 0; j < variant_actions.Count(); j++)
323 {
326 {
328 if (action.HasTarget())
330 }
331 }
332 }
333 else
334 {
336 {
338 if (action.HasTarget())
340 }
341 }
342 }
343 }
344 }
int m_ConditionMask
Definition ActionBase.c:60
enum ActionConditionMask m_MainItem
ref ActionTarget m_Target
Definition ActionInput.c:15
DayZPlayer m_Player
Definition Hand_Events.c:42
string Type

References m_ConditionMask, m_MainItem, m_Player, m_Target, and Type.

Referenced by UpdatePossibleActions().

◆ ActionsSelectReset()

override void ActionsSelectReset ( )

Definition at line 475 of file ActionInput.c.

476 {
477 m_SelectActions.Clear();
479 }
int m_selectedActionIndex
ActionInput m_SelectActions

References m_SelectActions, and m_selectedActionIndex.

◆ CarHornLongActionInput()

Definition at line 602 of file ActionInput.c.

713 {
714 SetInput("UACarHorn");
715 m_InputType = ActionInputType.AIT_CONTINUOUS;
716 m_Priority = 101;
717 m_DetectFromItem = false;
718 m_DetectFromTarget = false;
719 m_DetectFromPlayer = false;
720 }
void SetInput(ActionInput ai)
Definition ActionBase.c:186
ActionInputType
Definition ActionInput.c:2
int m_Priority

References m_SelectAction.

◆ CarHornShortActionInput()

void CarHornLongActionInput::CarHornShortActionInput ( PlayerBase player)

Definition at line 715 of file ActionInput.c.

Referenced by GetInputType().

◆ ContinuousDefaultActionInput()

void ContinuousDefaultActionInput ( PlayerBase player)

Definition at line 585 of file ActionInput.c.

586 {
587 SetInput("UADefaultAction");
588 m_InputType = ActionInputType.AIT_CONTINUOUS;
589 m_Priority = 20;
590 m_DetectFromTarget = false;
591 m_DetectFromItem = true;
592 m_DetectFromPlayer = true;
593
595 }
NoIndicationActionInputBase m_SelectAction

References m_Priority, m_SelectAction, and SetInput().

Referenced by ActionContinuousBase::GetInputType(), and FirearmActionLoadMultiBullet::GetInputType().

◆ ForceAction()

override void ForceAction ( ActionBase action,
ActionTarget target,
ItemBase item )

Definition at line 295 of file ActionInput.c.

296 {
297 super.ForceAction(action, target, item);
298
300 }

References m_selectedActionIndex.

◆ GetAction()

◆ GetPossibleAction()

override ActionBase GetPossibleAction ( )

Definition at line 597 of file ActionInput.c.

598 {
599 return m_SelectAction;
600 }

References m_SelectAction.

◆ GetPossibleActionIndex()

override int GetPossibleActionIndex ( )

Definition at line 463 of file ActionInput.c.

464 {
466 }

References m_selectedActionIndex.

◆ GetPossibleActions()

override array< ActionBase > GetPossibleActions ( )

Definition at line 448 of file ActionInput.c.

449 {
450 return m_SelectActions;
451 }

References m_SelectActions.

◆ GetPossibleActionsCount()

◆ HasTarget()

override bool HasTarget ( )

Definition at line 458 of file ActionInput.c.

459 {
460 return m_HasTarget;
461 }

◆ SelectNextAction()

override void SelectNextAction ( )

Definition at line 481 of file ActionInput.c.

482 {
483 if (m_SelectActions.Count())
484 {
488 }
489 }

References m_SelectActions, and m_selectedActionIndex.

◆ SelectPrevAction()

override void SelectPrevAction ( )

Definition at line 491 of file ActionInput.c.

492 {
493 if (m_SelectActions.Count())
494 {
496 if (0 > m_selectedActionIndex)
498 }
499 }

References m_SelectActions, and m_selectedActionIndex.

◆ StandardActionInput()

void StandardActionInput ( PlayerBase player)

Definition at line 289 of file ActionInput.c.

290 {
293 }

References m_SelectActions, and m_selectedActionIndex.

◆ UpdatePossibleActions()

override void UpdatePossibleActions ( PlayerBase player,
ActionTarget target,
ItemBase item,
int action_condition_mask )

Definition at line 346 of file ActionInput.c.

347 {
348 if (ForceActionCheck(player))
349 {
350 m_SelectActions.Clear();
351 m_SelectActions.Insert(m_ForcedActionData.m_Action);
352 return;
353 }
354
355 if (m_ForcedTarget)
356 target = m_ForcedTarget;
357
359 int i, last_index;
360 bool change = false;
361 m_HasTarget = false;
362
366
367
368 if (m_DetectFromItem)
370
371
372 if (m_DetectFromTarget)
373 {
374 _GetSelectedActions(target.GetObject(), select_actions_all, m_HasTarget);
375 _GetSelectedActions(target.GetParent(), select_actions_all, m_HasTarget);
376 }
377
378 if (m_DetectFromPlayer)
380
381 if (select_actions_all.Count())
382 {
383 last_index = 0;
384 for (i = 0; i < select_actions_all.Count(); i++)
385 {
386 ActionBase action = select_actions_all[i];
387 if (m_HasTarget)
388 {
389 if (action.HasTarget())
390 {
391 if (m_SelectActions.Count() > last_index)
392 {
394 {
395 change = true;
397 }
398 }
399 else
400 {
401 change = true;
402 m_SelectActions.Insert(action);
403 }
404 action.OnActionInfoUpdate(player, target, item);
405 last_index++;
406 }
407 }
408 else
409 {
410 if (m_SelectActions.Count() > last_index)
411 {
413 {
414 change = true;
416 }
417 }
418 else
419 {
420 change = true;
421 m_SelectActions.Insert(action);
422 }
423 action.OnActionInfoUpdate(player, target, item);
424 last_index++;
425 }
426 }
427 }
428 else
429 {
431 m_SelectActions.Clear();
432 }
433
434 if (m_SelectActions.Count() > last_index)
435 {
436 change = true;
437 for (i = last_index; i < m_SelectActions.Count(); i++)
439 }
440
441 if (change)
442 {
444 m_Player.GetActionManager().SelectFirstActionCategory();
445 }
446 }
void _GetSelectedActions(Object action_source_object, out array< ActionBase > select_actions_all, out bool has_any_action_target)

References _GetSelectedActions(), m_ConditionMask, m_MainItem, m_Player, m_SelectActions, m_selectedActionIndex, and m_Target.

Variable Documentation

◆ CarHornLongActionInput

ToggleLightsActionInput CarHornLongActionInput

◆ m_Action

◆ m_Item

◆ m_SelectAction

◆ m_SelectActions

◆ m_selectedActionIndex

◆ m_Target

◆ targetNew

ref ActionTarget targetNew

Definition at line 713 of file ActionInput.c.