Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIDecoIsArrayEmpty.c
Go to the documentation of this file.
1 class SCR_AIDecoIsArrayEmpty : DecoratorScripted
2 {
3  static const string VARIABLE_PORT = "VariableIn";
4 
5  //------------------------------------------------------------------------------------------------
6  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  };
29  override TStringArray GetVariablesIn()
30  {
31  return s_aVarsIn;
32  }
33 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_AIDecoIsArrayEmpty
Definition: SCR_AIDecoIsArrayEmpty.c:1