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

Private Member Functions

void ToggleLightsActionInput (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 723 of file ActionInput.c.

Constructor & Destructor Documentation

◆ ToggleLightsActionInput()

void ToggleLightsActionInput::ToggleLightsActionInput ( PlayerBase player)
inlineprivate

Definition at line 727 of file ActionInput.c.

728 {
729 SetInput("UAToggleHeadlight");
730 m_InputType = ActionInputType.AIT_SINGLE;
731 m_Priority = 100;
732 }
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 ToggleLightsActionInput::GetAction ( )
inlineprivate

Definition at line 806 of file ActionInput.c.

807 {
808 return m_SelectAction;
809 }
NoIndicationActionInputBase m_SelectAction

References m_SelectAction.

◆ UpdatePossibleActions()

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

Definition at line 734 of file ActionInput.c.

735 {
736 if (ForceActionCheck(player))
737 {
738 m_SelectAction = m_ForcedActionData.m_Action;
739 return;
740 }
741 //ForceActionTarget(player.m_PlayerLightManager.
742
745 ActionBase action;
746 int i;
747
749 if (player && !player.IsInVehicle())
750 {
751 Clothing headgear = Clothing.Cast(player.FindAttachmentBySlotName("Headgear"));
752 Clothing eyewear = Clothing.Cast(player.FindAttachmentBySlotName("Eyewear"));
753 //TODO - extend this to allow for a switchable control over all possible light sources (depth 0 or 1 only?)
754
755 if (headgear && headgear.GetLightSourceItem())
756 {
758 ForceActionTarget(target_new);
759 }
760 else if (eyewear && eyewear.GetLightSourceItem())
761 {
763 ForceActionTarget(target_new);
764 }
765 else
766 ClearForcedTarget();
767 }
768 else if (player && player.IsInVehicle())
769 {
770 HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
771 if (vehCommand)
772 {
773 Transport trans = vehCommand.GetTransport();
774 if (trans)
775 {
776 target_new = new ActionTarget(trans, null, -1, vector.Zero, -1);
777 ForceActionTarget(target_new);
778 }
779 }
780
781 if (!target_new)
782 ClearForcedTarget();
783 }
784
785 target = m_ForcedTarget;
786 m_Target = m_ForcedTarget;
787
788 if (target && target.GetObject())
789 {
790 target.GetObject().GetActions(this.Type(), possible_actions);
792 {
793 for (i = 0; i < possible_actions.Count(); i++)
794 {
795 action = ActionBase.Cast(possible_actions.Get(i));
797 {
799 return;
800 }
801 }
802 }
803 }
804 }
enum ActionConditionMask m_MainItem
ref ActionTarget m_Target
Definition ActionInput.c:15
class ActionTargets ActionTarget
string Type
ref ActionTarget target_new
Base native class for all motorized wheeled vehicles.
Definition Car.c:75
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 ToggleLightsActionInput::target_new
private

Definition at line 725 of file ActionInput.c.

Referenced by UpdatePossibleActions().


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