Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_VehicleLightsCondition.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
5 {
6  [Attribute(defvalue: SCR_Enum.GetDefault(ELightType.NoLight), uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(ELightType))]
7  ELightType m_eLightType;
8 
10  [Attribute("-1", uiwidget: UIWidgets.ComboBox, enums: {ParamEnum("Either", "-1"), ParamEnum("Left", "0"), ParamEnum("Right", "1")})]
11  protected int m_iLightSide;
12 
13  //------------------------------------------------------------------------------------------------
14  override bool IsAvailable(SCR_AvailableActionsConditionData data)
15  {
16  if (!data)
17  return false;
18 
20  {
21  VehicleControllerComponent controller = VehicleControllerComponent.Cast(data.GetCurrentVehicleController());
22  if (!controller)
23  return false;
24 
25  BaseLightManagerComponent lightManager = controller.GetLightManager();
26  if (!lightManager)
27  return false;
28 
29  bool result = lightManager.GetLightsState(m_eLightType, m_iLightSide);
30  return GetReturnResult(result);
31  }
32  else
33  {
34  VehicleControllerComponent_SA controller = VehicleControllerComponent_SA.Cast(data.GetCurrentVehicleController());
35  if (!controller)
36  return false;
37 
38  BaseLightManagerComponent lightManager = controller.GetLightManager();
39  if (!lightManager)
40  return false;
41 
42  bool result = lightManager.GetLightsState(m_eLightType, m_iLightSide);
43  return GetReturnResult(result);
44  }
45  }
46 }
SCR_Enum
Definition: SCR_Enum.c:1
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_VehicleLightsCondition
Returns true if current vehicle lights are enabled.
Definition: SCR_VehicleLightsCondition.c:4
SCR_AvailableActionCondition
A single available action condition representation.
Definition: SCR_AvailableActionsCondition.c:3
GetIsClientAuthority
override bool GetIsClientAuthority()
Definition: game.c:268
ELightType
ELightType
Definition: ELightType.c:7
Attribute
typedef Attribute
Post-process effect of scripted camera.
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468