Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIDecoIsArrayEmpty.c
Go to the documentation of this file.
2{
3 static const string VARIABLE_PORT = "VariableIn";
4
5 //------------------------------------------------------------------------------------------------
6 static override bool VisibleInPalette() {return true;}
7
8 //------------------------------------------------------------------------------------------------
9 protected override bool TestFunction(AIAgent owner)
10 {
11 bool isEmpty;
12 Managed myManaged = null;
13 string typeOfArray = GetVariableType(true, VARIABLE_PORT).ToString();
14
15 if (!typeOfArray.Contains("array"))
16 return false;
17 if (!GetVariableIn(VARIABLE_PORT, myManaged))
18 return false;
19
20 GetGame().GetScriptModule().Call(myManaged, "IsEmpty", false, isEmpty);
21
22 return isEmpty;
23 }
24
25 //------------------------------------------------------------------------------------------------
26 protected static ref TStringArray s_aVarsIn = {
27 VARIABLE_PORT
28 };
30 {
31 return s_aVarsIn;
32 }
33};
ArmaReforgerScripted GetGame()
Definition game.c:1398
override bool VisibleInPalette()
proto bool GetVariableIn(string name, out void val)
proto external GetVariableType(bool inputPort, string name)
override bool TestFunction(AIAgent owner)
static ref TStringArray s_aVarsIn
override TStringArray GetVariablesIn()
array< string > TStringArray
Definition Types.c:385