DayZ 1.24
Loading...
Searching...
No Matches
ToggleNVGActionInput Class Reference
Inheritance diagram for ToggleNVGActionInput:
[legend]
Collaboration diagram for ToggleNVGActionInput:
[legend]

Private Member Functions

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

Private Attributes

ref ActionTarget target_new
 

Detailed Description

Definition at line 812 of file ActionInput.c.

Constructor & Destructor Documentation

◆ ToggleNVGActionInput()

void ToggleNVGActionInput::ToggleNVGActionInput ( PlayerBase player)
inlineprivate

Definition at line 816 of file ActionInput.c.

817 {
818 SetInput("UAToggleNVG");
819 m_InputType = ActionInputType.AIT_HOLDSINGLE;
820 m_Priority = 100;
821 }
void SetInput(ActionInput ai)
Definition ActionBase.c:186
ActionInputType
Definition ActionInput.c:2
int m_Priority

References m_Priority, and SetInput().

Member Function Documentation

◆ GetAction()

override ActionBase ToggleNVGActionInput::GetAction ( )
inlineprivate

Definition at line 878 of file ActionInput.c.

879 {
880 return m_SelectAction;
881 }
NoIndicationActionInputBase m_SelectAction

References m_SelectAction.

◆ UpdatePossibleActions()

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

Definition at line 823 of file ActionInput.c.

824 {
825 if (ForceActionCheck(player))
826 {
827 m_SelectAction = m_ForcedActionData.m_Action;
828 return;
829 }
830 //ForceActionTarget(player.m_PlayerLightManager.
831
834 ActionBase action;
835 int i;
836
838 if (player)
839 {
840 Mich2001Helmet helmet = Mich2001Helmet.Cast(player.FindAttachmentBySlotName("Headgear"));
841 NVGHeadstrap headstrap = NVGHeadstrap.Cast(player.FindAttachmentBySlotName("Eyewear"));
842 if (helmet)
843 {
844 //m_MainItem = Headtorch_ColorBase.Cast(player.FindAttachmentBySlotName("Headgear"));
845 target_new = new ActionTarget(helmet, null, -1, vector.Zero, -1);
846 ForceActionTarget(target_new);
847 }
848 else if (headstrap)
849 {
851 ForceActionTarget(target_new);
852 }
853 else
854 ClearForcedTarget();
855 }
856
857 target = m_ForcedTarget;
858 m_Target = m_ForcedTarget;
859
860 if (target && target.GetObject())
861 {
862 target.GetObject().GetActions(this.Type(), possible_actions);
864 {
865 for (i = 0; i < possible_actions.Count(); i++)
866 {
867 action = ActionBase.Cast(possible_actions.Get(i));
869 {
871 return;
872 }
873 }
874 }
875 }
876 }
enum ActionConditionMask m_MainItem
ref ActionTarget m_Target
Definition ActionInput.c:15
class ActionTargets ActionTarget
string Type
ref ActionTarget target_new
static const vector Zero
Definition EnConvert.c:110

References ActionTarget, m_MainItem, m_SelectAction, m_Target, target_new, Type, and vector::Zero.

Member Data Documentation

◆ target_new

ref ActionTarget ToggleNVGActionInput::target_new
private

Definition at line 814 of file ActionInput.c.

Referenced by UpdatePossibleActions().


The documentation for this class was generated from the following file: