Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_VehicleTurboCondition.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
9 {
10  [Attribute("0", UIWidgets.EditBox, "Minimum temporary turbo time. Set to below zero to track persistent turbo only.", "")]
11  protected float m_fMinimumTime;
12 
13  //------------------------------------------------------------------------------------------------
14  override bool IsAvailable(SCR_AvailableActionsConditionData data)
15  {
16  if (!data)
17  return false;
18 
20  {
21  CarControllerComponent carController = CarControllerComponent.Cast(data.GetCurrentVehicleController());
22  bool result = carController && carController.IsThrottleTurbo();
23 
24  if (m_fMinimumTime > 0)
25  result = result && data.GetCurrentVehicleTurboTime() > m_fMinimumTime;
26  else if (m_fMinimumTime < 0)
27  result = result && data.GetCurrentVehicleTurboTime() == 0;
28 
29  return GetReturnResult(result);
30  }
31  else
32  {
33  CarControllerComponent_SA carController = CarControllerComponent_SA.Cast(data.GetCurrentVehicleController());
34  bool result = carController && carController.IsThrottleTurbo();
35 
36  if (m_fMinimumTime > 0)
37  result = result && data.GetCurrentVehicleTurboTime() > m_fMinimumTime;
38  else if (m_fMinimumTime < 0)
39  result = result && data.GetCurrentVehicleTurboTime() == 0;
40 
41  return GetReturnResult(result);
42  }
43  }
44 
45 };
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_AvailableActionCondition
A single available action condition representation.
Definition: SCR_AvailableActionsCondition.c:3
GetIsClientAuthority
override bool GetIsClientAuthority()
Definition: game.c:268
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_VehicleTurboCondition
Definition: SCR_VehicleTurboCondition.c:8
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