Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_VehicleFuelCondition.c
Go to the documentation of this file.
1
4{
5 [Attribute(defvalue: SCR_ComparerOperator.GREATER_THAN.ToString(), desc: "Condition operator", uiwidget: UIWidgets.ComboBox, enumType: SCR_ComparerOperator)]
6 private SCR_ComparerOperator m_eOperator;
7
8 [Attribute("2", UIWidgets.EditBox, "Fuel volume", "")]
9 private float m_fValue;
10
11 //------------------------------------------------------------------------------------------------
14 override bool IsAvailable(notnull SCR_AvailableActionsConditionData data)
15 {
16 IEntity vehicle = data.GetCurrentVehicle();
17 if (!vehicle)
18 return false;
19
20 FuelManagerComponent fuelNode = FuelManagerComponent.Cast(vehicle.FindComponent(FuelManagerComponent));
21 return GetReturnResult(fuelNode && SCR_Comparer<int>.Compare(m_eOperator, fuelNode.GetTotalFuel(), (int)m_fValue));
22 }
23}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_ComparerOperator
Definition SCR_Comparer.c:3
Get all prefabs that have the spawner data
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_VONRadialDisplay Compare
proto external Managed FindComponent(typename typeName)
A single available action condition representation.
Returns true if current vehicle fuel volume matches the condition.
SCR_FieldOfViewSettings Attribute