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 int nFrom = from.Count();
452 for (
int i = 0; i < nFrom; ++i )
493 proto native
void Sort(
bool reverse =
false);
504 int remove_index =
Find(value);
506 if ( remove_index >= 0 )
514 int remove_index =
Find(value);
516 if ( remove_index >= 0 )
524 return ( index > -1 && index <
Count() );
550 Print(
string.Format(
"Array count: %1",
Count()));
551 for (
int i = 0; i <
Count(); i++)
554 Print(
string.Format(
"[%1] => %2", i, item));
593 T item1 =
Get(item1_index);
594 Set(item1_index,
Get(item2_index));
595 Set(item2_index, item1);
600 int nOther = other.Count();
601 for (
int i = 0; i < nOther; ++i)
603 T item = other.Get(i);
611 int right =
Count() - 1;
639 int new_index = curr_index;
641 if ( move_number > 0 )
643 new_index = curr_index + move_number;
646 if ( move_number < 0 )
648 new_index = curr_index - move_number;
652 if ( new_index <= -count )
654 new_index = (new_index % count);
657 new_index = new_index + count;
661 if ( new_index >= count )
663 new_index = (new_index % count);
672 for (
int i = 0; i <
Count(); i++)
692 if (
Count() != pOtherArray.Count())
694 ErrorEx(
"arrays are not the same size");
698 int nOther = pOtherArray.Count();
699 for (
int i = 0; i < nOther; ++i)
701 if (
Get(i) != pOtherArray.Get(i))
758 proto native
void Swap(set<T> other);
763 int count = other.Count();
764 for (
int i = 0; i < count; i++)
773 int remove_index =
Find(value);
774 if (remove_index >= 0)
782 int count = other.Count();
783 for (
int i = 0; i < count; i++)
792 Print(
string.Format(
"Set count: %1",
Count()));
793 for (
int i = 0; i <
Count(); i++)
796 Print(
string.Format(
"[%1] => %2", i, item));
847 proto TValue
Get(TKey key);
858 proto
bool Find(TKey key, out TValue val);
883 proto
void Set(TKey key, TValue value);
907 proto
bool Insert(TKey key, TValue value);
913 for (
int i = 0; i <
Count(); ++i)
922 for (
int i = 0; i <
Count(); ++i)
932 Set(new_key,
Get(old_key));
942 for (
int i = 0; i <
Count(); i++)
956 for (
int i = 0; i <
Count(); i++)
void Remove(Object object)
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].