52 proto native external
typename Type();
139 proto
volatile int Call(
Class inst,
string function,
void parm);
222 static proto
int SetVar(out
void var,
string value);
230 static proto
void Watch(
void var,
int flags);
253proto
void Sort(
void param_array[],
int num);
389 proto
void Set(
int n, T value);
451 for (
int i = 0; i < from.Count(); i++ )
492 proto native
void Sort(
bool reverse =
false);
503 int remove_index =
Find(value);
505 if ( remove_index >= 0 )
513 int remove_index =
Find(value);
515 if ( remove_index >= 0 )
523 return ( index > -1 && index <
Count() );
549 Print(
string.Format(
"Array count: %1",
Count()));
550 for (
int i = 0; i <
Count(); i++)
553 Print(
string.Format(
"[%1] => %2", i, item));
592 T item1 =
Get(item1_index);
593 Set(item1_index,
Get(item2_index));
594 Set(item2_index, item1);
599 for (
int i = 0; i < other.Count(); i++)
601 T item = other.Get(i);
609 int right =
Count() - 1;
637 int new_index = curr_index;
639 if ( move_number > 0 )
641 new_index = curr_index + move_number;
644 if ( move_number < 0 )
646 new_index = curr_index - move_number;
650 if ( new_index <= -count )
652 new_index = (new_index % count);
655 new_index = new_index + count;
659 if ( new_index >= count )
661 new_index = (new_index % count);
670 for (
int i = 0; i <
Count(); i++)
690 if (
Count() != pOtherArray.Count())
692 ErrorEx(
"arrays are not the same size");
696 for (
int i = 0; i < pOtherArray.Count(); ++i)
698 if (
Get(i) != pOtherArray.Get(i))
755 proto native
void Swap(set<T> other);
760 int count = other.Count();
761 for (
int i = 0; i < count; i++)
770 int remove_index =
Find(value);
771 if (remove_index >= 0)
779 int count = other.Count();
780 for (
int i = 0; i < count; i++)
789 Print(
string.Format(
"Set count: %1",
Count()));
790 for (
int i = 0; i <
Count(); i++)
793 Print(
string.Format(
"[%1] => %2", i, item));
844 proto TValue
Get(TKey key);
855 proto
bool Find(TKey key, out TValue val);
880 proto
void Set(TKey key, TValue value);
904 proto
bool Insert(TKey key, TValue value);
910 for (
int i = 0; i <
Count(); i++)
912 keys.Insert(
GetKey( i ) );
920 for (
int i = 0; i <
Count(); i++)
931 Set(new_key,
Get(old_key));
941 for (
int i = 0; i <
Count(); i++)
955 for (
int i = 0; i <
Count(); i++)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DisplayElementBase GetElement(eDisplayElements element_id)
enum MagnumStableStateID init
void Set(T value, string system="")
Super root of all classes in Enforce script.
Module containing compiled scripts.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto void Print(void var)
Prints content of variable to console/log.
proto int ParseString(string input, out string tokens[])
Parses string into array of tokens returns number of tokens.
map< Managed, int > TManagedIntMap
proto native void Sort(bool reverse=false)
map< Managed, Class > TManagedClassMap
map< typename, float > TTypeNameFloatMap
proto int ParseStringEx(inout string input, string token)
Parses one token from input string. Result is put into token string, and type of token is returned....
proto int Insert(T value)
static proto int SetClassVar(Class inst, string varname, int index, void input)
Dynamic write to variable by its name.
void InsertAll(notnull array< T > from)
Inserts all elements from array.
proto void Sort(void param_array[], int num)
Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)
array< typename > TTypenameArray
static proto int SetVar(out void var, string value)
Sets variable value by value in string.
array< float > TFloatArray
map< Class, vector > TClassVectorMap
map< Class, typename > TClassTypenameMap
int MoveIndex(int curr_index, int move_number)
Returns a index in array moved by specific number.
proto void RemoveElement(int i)
array< TKey > GetKeyArray()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto native void Clear()
map< ref Managed, Managed > TManagedRefManagedMap
proto int Insert(T value)
array< string > TStringArray
static proto int GetClassVar(Class inst, string varname, int index, out void result)
Dynamic read of variable value by its name.
void SwapItems(int item1_index, int item2_index)
map< int, Class > TIntClassMap
proto native MapIterator End()
map< Class, float > TClassFloatMap
proto void Set(int n, T value)
map< string, vector > TStringVectorMap
proto native int KillThread(Class owner, string name)
Kills thread.
proto native owned external string ClassName()
Returns name of class-type.
map< int, string > TIntStringMap
map< int, float > TIntFloatMap
proto owned string ThreadFunction(Class owner, string name, int backtrace, out int linenumber)
Debug function. Returns current function on stack of the thread.
proto native external bool IsInherited(typename type)
Returns true when instance is of the type, or inherited one.
proto native void RemoveOrdered(int index)
proto void Remove(TKey key)
array< Managed > TManagedArray
map< ref Managed, vector > TManagedRefVectorMap
void RemoveItemUnOrdered(T value)
bool IsValidIndex(int index)
proto native void Clear()
proto TValue Get(TKey key)
map< ref Managed, float > TManagedRefFloatMap
array< vector > TVectorArray
array< ref Managed > TManagedRefArray
proto TKey GetIteratorKey(MapIterator it)
map< ref Managed, ref Managed > TManagedRefManagedRefMap
proto native void Swap(notnull array< T > other)
proto volatile int CallFunctionParams(Class inst, string function, out void returnVal, Class parms)
proto int InsertAt(T value, int index)
map< Class, Class > TClassClassMap
static proto native ScriptModule LoadScript(ScriptModule parentModule, string scriptFile, bool listing)
Do load script and create ScriptModule for it.
proto int Copy(notnull array< T > from)
int GetRandomIndex()
Returns a random index of array. If Count is 0, return index is -1 .
array< Class > TClassArray
map< Class, int > TClassIntMap
proto void copyarray(void destArray, void srcArray)
proto bool Contains(TKey key)
static proto void Watch(void var, int flags)
Debug tool for watching certain variable. Invokes debugger whenever is variable used.
proto native external Type()
Returns typename of object's class.
array< TValue > GetValueArray()
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
TKey GetKeyByValue(TValue value)
map< ref Managed, typename > TManagedRefTypenameMap
void InsertSet(set< T > other)
map< Managed, typename > TManagedTypenameMap
proto TValue GetIteratorElement(MapIterator it)
map< string, int > TStringIntMap
proto volatile void Idle()
set< ref Managed > TManagedRefSet
void InsertArray(array< T > other)
map< typename, vector > TTypeNameVectorMap
proto native void Release()
map< ref Managed, string > TManagedRefStringMap
map< int, typename > TIntTypenameMap
map< Class, ref Managed > TClassManagedRefMap
proto volatile int Call(Class inst, string function, void parm)
map< Managed, Managed > TManagedManagedMap
proto native void Reserve(int newSize)
proto native void Resize(int newSize)
map< typename, Managed > TTypeNameManagedMap
proto volatile int CallFunction(Class inst, string function, out void returnVal, void parm)
proto static external StaticType()
Returns typename of object's reference.
proto bool Insert(TKey key, TValue value)
bool ReplaceKey(TKey old_key, TKey new_key)
proto void reversearray(void param_array)
map< Managed, ref Managed > TManagedManagedRefMap
proto native MapIterator Next(MapIterator it)
void RemoveItems(set< T > other)
map< string, ref Managed > TStringManagedRefMap
proto native void Clear()
map< typename, ref Managed > TTypeNameManagedRefMap
map< typename, int > TTypeNameIntMap
proto native MapIterator Begin()
static StaticGetType(typename t)
Returns typename of class even without a variable or instance.
map< string, string > TStringStringMap
map< Class, string > TClassStringMap
map< int, int > TIntIntMap
void Debug()
Print all elements in array.
proto external string ToString()
int DifferentAtPosition(array< T > pOtherArray)
Returns an index where 2 arrays start to differ from each other.
map< string, float > TStringFloatMap
map< ref Managed, int > TManagedRefIntMap
T GetRandomElement()
Returns a random element of array.
proto native void Remove(int index)
proto void Set(TKey key, TValue value)
map< typename, Class > TTypeNameClassMap
bool GetKeyByValueChecked(TValue value, out TKey key)
void Obsolete(string msg="")
static proto Class Cast(Class from)
Try to safely down-cast base class to child class.
map< string, Class > TStringClassMap
int[] TypeID
script representation for C++ RTTI types
proto TValue GetElement(int index)
set< typename > TTypenameSet
map< typename, string > TTypeNameStringMap
proto int InsertAt(T value, int index)
map< int, Managed > TIntManagedMap
map< string, typename > TStringTypenameMap
map< Managed, float > TManagedFloatMap
proto int Copy(set< T > from)
proto int Copy(map< TKey, TValue > from)
proto native void Swap(set< T > other)
static proto bool SafeCastType(Class type, out Class to, Class from)
This function is for internal script usage.
proto bool Find(TKey key, out TValue val)
class array< Class T > PrintString
map< int, vector > TIntVectorMap
set< Managed > TManagedSet
map< int, ref Managed > TIntManagedRefMap
map< typename, typename > TTypeNameTypenameMap
map< ref Managed, Class > TManagedRefClassMap
proto native void Remove(int index)
map< Managed, string > TManagedStringMap
map< Managed, vector > TManagedVectorMap
map< string, Managed > TStringManagedMap
map< Class, Managed > TClassManagedMap
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].