23 proto native external
bool IsInherited(
typename type);
37 proto native owned external
string ClassName();
52 proto native external
typename Type();
64 proto external
static typename StaticType();
73 static typename StaticGetType(
typename t)
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();
168 private void EnScript() {}
169 private void ~EnScript() {}
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);
362 void Obsolete(
string msg =
"")
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 int nFrom = from.Count();
452 for (
int i = 0; i < nFrom; ++i )
454 Insert( from.Get(i) );
463 proto native
void Remove(
int index);
470 proto native
void RemoveOrdered(
int index);
476 proto native
void Resize(
int newSize);
482 proto native
void Reserve(
int newSize);
488 proto native
void Swap(notnull
array<T> other);
493 proto native
void Sort(
bool reverse =
false);
499 proto
int Copy(notnull
array<T> from);
502 void RemoveItem(T value)
504 int remove_index = Find(value);
506 if ( remove_index >= 0 )
508 RemoveOrdered(remove_index);
512 void RemoveItemUnOrdered(T value)
514 int remove_index = Find(value);
516 if ( remove_index >= 0 )
518 Remove(remove_index);
522 bool IsValidIndex(
int index )
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));
588 return Get(GetRandomIndex());
591 void SwapItems(
int item1_index,
int item2_index)
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;
636 int MoveIndex(
int curr_index,
int move_number)
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++)
674 SwapItems(i,GetRandomIndex());
690 int DifferentAtPosition(
array<T> pOtherArray)
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))
724 proto native
int Count();
725 proto native
void Clear();
730 proto
int Find(T value);
739 proto
int Insert(T value);
750 proto
int InsertAt(T value,
int index);
756 proto native
void Remove(
int index);
757 proto
int Copy(set<T> from);
758 proto native
void Swap(set<T> other);
761 void InsertSet(set<T> other)
763 int count = other.Count();
764 for (
int i = 0; i < count; i++)
771 void RemoveItem(T value)
773 int remove_index = Find(value);
774 if (remove_index >= 0)
776 Remove(remove_index);
780 void RemoveItems(set<T> other)
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));
833 proto native
int Count();
838 proto native
void Clear();
847 proto TValue
Get(TKey key);
858 proto
bool Find(TKey key, out TValue val);
878 proto TKey GetKey(
int i);
883 proto
void Set(TKey key, TValue value);
887 proto
void Remove(TKey key);
894 proto
void RemoveElement(
int i);
898 proto
bool Contains(TKey key);
907 proto
bool Insert(TKey key, TValue value);
913 for (
int i = 0; i <
Count(); ++i)
914 keys.Insert(GetKey(i));
922 for (
int i = 0; i <
Count(); ++i)
923 elements.Insert(GetElement(i));
928 bool ReplaceKey(TKey old_key, TKey new_key)
930 if (Contains(old_key))
932 Set(new_key,
Get(old_key));
939 TKey GetKeyByValue(TValue value)
942 for (
int i = 0; i <
Count(); i++)
954 bool GetKeyByValueChecked(TValue value, out TKey key)
956 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.
override string GetDebugName()
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)