Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MortarHasChargeConfigsCondition.c
Go to the documentation of this file.
3{
4 //------------------------------------------------------------------------------------------------
6 override bool IsAvailable(notnull SCR_AvailableActionsConditionData data)
7 {
8 // Current weapon
9 BaseControllerComponent controller = data.GetCurrentVehicleController();
10 if (!controller)
11 return GetReturnResult(false);
12
13 // Turret
14 IEntity turretEntity = controller.GetOwner();
15 if (!turretEntity)
16 return GetReturnResult(false);
17
19 if (!hudComp)
20 return GetReturnResult(false);
21
22 array<BaseInfoDisplay> infoDisplays = {};
23
24 if (hudComp.GetInfoDisplays(infoDisplays) < 1)
25 return GetReturnResult(false);
26
27 SCR_MortarInfo mortarDisplay;
28 foreach (BaseInfoDisplay display : infoDisplays)
29 {
30 mortarDisplay = SCR_MortarInfo.Cast(display);
31 if (mortarDisplay)
32 break;
33 }
34
35 if (!mortarDisplay)
36 return GetReturnResult(false);
37
38 infoDisplays.Clear();
39 if (mortarDisplay.GetInfoDisplays(infoDisplays) < 1)
40 return GetReturnResult(false);
41
42 SCR_BallisticTableDisplay ballisticsDisplay;
43 foreach (BaseInfoDisplay display : infoDisplays)
44 {
45 ballisticsDisplay = SCR_BallisticTableDisplay.Cast(display);
46 if (ballisticsDisplay)
47 break;
48 }
49
50 if (!ballisticsDisplay)
51 return GetReturnResult(false);
52
53 return GetReturnResult(ballisticsDisplay.GetHasDifferentChargeConfigs());
54 }
55}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Get all prefabs that have the spawner data
proto external Managed FindComponent(typename typeName)
A single available action condition representation.
bool GetHasDifferentChargeConfigs()
Returns true when this display has at least two configs for the same shell with different init speeds...