23 proto native external
bool IsInherited(
typename type);
37 proto native owned external
string ClassName();
39 string GetDebugName() {
return ClassName(); }
52 proto native external
typename Type();
64 proto external
static typename StaticType();
73 static typename StaticGetType(
typename t)
78 proto external
string ToString();
110 proto
static bool CastTo(out
Class to,
Class from);
113 private proto
static bool SafeCastType(
Class type, out
Class to,
Class from);
139 proto
volatile int Call(
Class inst,
string function,
void parm);
146 proto
volatile int CallFunction(
Class inst,
string function, out
void returnVal,
void parm);
147 proto
volatile int CallFunctionParams(
Class inst,
string function, out
void returnVal,
Class parms);
148 proto native
void Release();
188 static proto
int GetClassVar(
Class inst,
string varname,
int index, out
void result);
211 static proto
int SetClassVar(
Class inst,
string varname,
int index,
void input);
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);
380 proto native
int Count();
385 proto native
void Clear();
389 proto
void Set(
int n, T value);
394 proto
int Find(T value);
407 proto
int Insert(T value);
418 proto
int InsertAt(T value,
int index);
449 void InsertAll(notnull
array<T> from)
451 for (
int i = 0; i < from.Count(); i++ )
453 Insert( from.Get(i) );
462 proto native
void Remove(
int index);
469 proto native
void RemoveOrdered(
int index);
475 proto native
void Resize(
int newSize);
481 proto native
void Reserve(
int newSize);
487 proto native
void Swap(notnull
array<T> other);
492 proto native
void Sort(
bool reverse =
false);
498 proto
int Copy(notnull
array<T> from);
501 void RemoveItem(T value)
503 int remove_index = Find(value);
505 if ( remove_index >= 0 )
507 RemoveOrdered(remove_index);
511 void RemoveItemUnOrdered(T value)
513 int remove_index = Find(value);
515 if ( remove_index >= 0 )
517 Remove(remove_index);
521 bool IsValidIndex(
int index )
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));
587 return Get(GetRandomIndex());
590 void SwapItems(
int item1_index,
int item2_index)
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;
634 int MoveIndex(
int curr_index,
int move_number)
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++)
672 SwapItems(i,GetRandomIndex());
688 int DifferentAtPosition(
array<T> pOtherArray)
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))
721 proto native
int Count();
722 proto native
void Clear();
727 proto
int Find(T value);
736 proto
int Insert(T value);
747 proto
int InsertAt(T value,
int index);
753 proto native
void Remove(
int index);
754 proto
int Copy(set<T> from);
755 proto native
void Swap(set<T> other);
758 void InsertSet(set<T> other)
760 int count = other.Count();
761 for (
int i = 0; i < count; i++)
768 void RemoveItem(T value)
770 int remove_index = Find(value);
771 if (remove_index >= 0)
773 Remove(remove_index);
777 void RemoveItems(set<T> other)
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));
830 proto native
int Count();
835 proto native
void Clear();
844 proto TValue
Get(TKey key);
855 proto
bool Find(TKey key, out TValue val);
875 proto TKey GetKey(
int i);
880 proto
void Set(TKey key, TValue value);
884 proto
void Remove(TKey key);
891 proto
void RemoveElement(
int i);
895 proto
bool Contains(TKey key);
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++)
927 bool ReplaceKey(TKey old_key, TKey new_key)
929 if (Contains(old_key))
931 Set(new_key,
Get(old_key));
938 TKey GetKeyByValue(TValue value)
941 for (
int i = 0; i <
Count(); i++)
953 bool GetKeyByValueChecked(TValue value, out TKey key)
955 for (
int i = 0; i <
Count(); i++)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Super root of all classes in Enforce script.
Module containing compiled scripts.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DisplayElementBase GetElement(eDisplayElements element_id)
void End()
called on surrender end request end
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
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 void Sort(void param_array[], int num)
Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)
array< typename > TTypenameArray
array< float > TFloatArray
map< Class, vector > TClassVectorMap
map< Class, typename > TClassTypenameMap
map< ref Managed, Managed > TManagedRefManagedMap
array< string > TStringArray
map< int, Class > TIntClassMap
map< Class, float > TClassFloatMap
map< string, vector > TStringVectorMap
proto native int KillThread(Class owner, string name)
Kills thread.
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.
array< Managed > TManagedArray
map< ref Managed, vector > TManagedRefVectorMap
map< ref Managed, float > TManagedRefFloatMap
array< vector > TVectorArray
array< ref Managed > TManagedRefArray
map< ref Managed, ref Managed > TManagedRefManagedRefMap
map< Class, Class > TClassClassMap
array< Class > TClassArray
map< Class, int > TClassIntMap
proto void copyarray(void destArray, void srcArray)
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
map< ref Managed, typename > TManagedRefTypenameMap
map< Managed, typename > TManagedTypenameMap
map< string, int > TStringIntMap
proto volatile void Idle()
set< ref Managed > TManagedRefSet
map< typename, vector > TTypeNameVectorMap
map< ref Managed, string > TManagedRefStringMap
map< int, typename > TIntTypenameMap
map< Class, ref Managed > TClassManagedRefMap
map< Managed, Managed > TManagedManagedMap
map< typename, Managed > TTypeNameManagedMap
proto void reversearray(void param_array)
map< Managed, ref Managed > TManagedManagedRefMap
map< string, ref Managed > TStringManagedRefMap
map< typename, ref Managed > TTypeNameManagedRefMap
map< typename, int > TTypeNameIntMap
map< string, string > TStringStringMap
map< Class, string > TClassStringMap
map< int, int > TIntIntMap
map< string, float > TStringFloatMap
map< ref Managed, int > TManagedRefIntMap
map< typename, Class > TTypeNameClassMap
map< string, Class > TStringClassMap
int[] TypeID
script representation for C++ RTTI types
set< typename > TTypenameSet
map< typename, string > TTypeNameStringMap
map< int, Managed > TIntManagedMap
map< string, typename > TStringTypenameMap
map< Managed, float > TManagedFloatMap
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
map< Managed, string > TManagedStringMap
map< Managed, vector > TManagedVectorMap
map< string, Managed > TStringManagedMap
map< Class, Managed > TClassManagedMap
enum MagnumStableStateID init
void Set(T value, string system="")
void Clear(bool clearFile=false)