DayZ 1.24
Loading...
Searching...
No Matches
Enforce script essentials

Classes

class  Class
 Super root of all classes in Enforce script. More...
 
class  Managed
 TODO doc. More...
 
class  NonSerialized
 TODO doc. More...
 
class  ScriptModule
 Module containing compiled scripts. More...
 
class  EnScript
 
class  array< Class T >
 
class  set< Class T >
 
class  map< Class TKey, Class TValue >
 Associative array template
usage: More...
 

Typedefs

typedef int[] TypeID
 script representation for C++ RTTI types
 
typedef array< stringTStringArray
 
typedef array< floatTFloatArray
 
typedef array< intTIntArray
 
typedef array< boolTBoolArray
 
typedef array< ClassTClassArray
 
typedef array< ManagedTManagedArray
 
typedef array< ref ManagedTManagedRefArray
 
typedef array< vectorTVectorArray
 
typedef array< typenameTTypenameArray
 
typedef set< stringTStringSet
 
typedef set< floatTFloatSet
 
typedef set< intTIntSet
 
typedef set< ClassTClassSet
 
typedef set< ManagedTManagedSet
 
typedef set< ref ManagedTManagedRefSet
 
typedef set< typenameTTypenameSet
 
typedef int MapIterator
 
typedef map< int, floatTIntFloatMap
 
typedef map< int, intTIntIntMap
 
typedef map< int, stringTIntStringMap
 
typedef map< int, ClassTIntClassMap
 
typedef map< int, ManagedTIntManagedMap
 
typedef map< int, ref ManagedTIntManagedRefMap
 
typedef map< int, typenameTIntTypenameMap
 
typedef map< int, vectorTIntVectorMap
 
typedef map< string, floatTStringFloatMap
 
typedef map< string, intTStringIntMap
 
typedef map< string, stringTStringStringMap
 
typedef map< string, ClassTStringClassMap
 
typedef map< string, ManagedTStringManagedMap
 
typedef map< string, ref ManagedTStringManagedRefMap
 
typedef map< string, typenameTStringTypenameMap
 
typedef map< string, vectorTStringVectorMap
 
typedef map< Class, floatTClassFloatMap
 
typedef map< Class, intTClassIntMap
 
typedef map< Class, stringTClassStringMap
 
typedef map< Class, ClassTClassClassMap
 
typedef map< Class, ManagedTClassManagedMap
 
typedef map< Class, ref ManagedTClassManagedRefMap
 
typedef map< Class, typenameTClassTypenameMap
 
typedef map< Class, vectorTClassVectorMap
 
typedef map< typename, floatTTypeNameFloatMap
 
typedef map< typename, intTTypeNameIntMap
 
typedef map< typename, stringTTypeNameStringMap
 
typedef map< typename, ClassTTypeNameClassMap
 
typedef map< typename, ManagedTTypeNameManagedMap
 
typedef map< typename, ref ManagedTTypeNameManagedRefMap
 
typedef map< typename, typenameTTypeNameTypenameMap
 
typedef map< typename, vectorTTypeNameVectorMap
 
typedef map< Managed, floatTManagedFloatMap
 
typedef map< Managed, intTManagedIntMap
 
typedef map< Managed, stringTManagedStringMap
 
typedef map< Managed, ClassTManagedClassMap
 
typedef map< Managed, ManagedTManagedManagedMap
 
typedef map< Managed, ref ManagedTManagedManagedRefMap
 
typedef map< Managed, typenameTManagedTypenameMap
 
typedef map< Managed, vectorTManagedVectorMap
 
typedef map< ref Managed, floatTManagedRefFloatMap
 
typedef map< ref Managed, intTManagedRefIntMap
 
typedef map< ref Managed, stringTManagedRefStringMap
 
typedef map< ref Managed, ClassTManagedRefClassMap
 
typedef map< ref Managed, ManagedTManagedRefManagedMap
 
typedef map< ref Managed, ref ManagedTManagedRefManagedRefMap
 
typedef map< ref Managed, typenameTManagedRefTypenameMap
 
typedef map< ref Managed, vectorTManagedRefVectorMap
 

Functions

proto native external bool Class::IsInherited (typename type)
 Returns true when instance is of the type, or inherited one.
 
proto native owned external string Class::ClassName ()
 Returns name of class-type.
 
string Class::GetDebugName ()
 
proto native external Class::Type ()
 Returns typename of object's class.
 
proto static external Class::StaticType ()
 Returns typename of object's reference.
 
static Class::StaticGetType (typename t)
 Returns typename of class even without a variable or instance.
 
proto external string Class::ToString ()
 
static proto Class Class::Cast (Class from)
 Try to safely down-cast base class to child class.
 
static proto bool Class::CastTo (out Class to, Class from)
 Try to safely down-cast base class to child class.
 
static proto bool Class::SafeCastType (Class type, out Class to, Class from)
 This function is for internal script usage.
 
void ScriptModule::~ScriptModule ()
 
proto volatile int ScriptModule::Call (Class inst, string function, void parm)
 
proto volatile int ScriptModule::CallFunction (Class inst, string function, out void returnVal, void parm)
 
proto volatile int ScriptModule::CallFunctionParams (Class inst, string function, out void returnVal, Class parms)
 
proto native void ScriptModule::Release ()
 
static proto native ScriptModule ScriptModule::LoadScript (ScriptModule parentModule, string scriptFile, bool listing)
 Do load script and create ScriptModule for it.
 
void EnScript::EnScript ()
 
void EnScript::~EnScript ()
 
static proto int EnScript::GetClassVar (Class inst, string varname, int index, out void result)
 Dynamic read of variable value by its name.
 
static proto int EnScript::SetClassVar (Class inst, string varname, int index, void input)
 Dynamic write to variable by its name.
 
static proto int EnScript::SetVar (out void var, string value)
 Sets variable value by value in string.
 
static proto void EnScript::Watch (void var, int flags)
 Debug tool for watching certain variable. Invokes debugger whenever is variable used.
 
proto void Sort (void param_array[], int num)
 Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)
 
proto void reversearray (void param_array)
 
proto void copyarray (void destArray, void srcArray)
 
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. Input string is left-truncated by the resulting token length.
 
proto int ParseString (string input, out string tokens[])
 Parses string into array of tokens returns number of tokens.
 
proto native int KillThread (Class owner, string name)
 Kills thread.
 
proto volatile void Idle ()
 
proto owned string ThreadFunction (Class owner, string name, int backtrace, out int linenumber)
 Debug function. Returns current function on stack of the thread.
 
string String (string s)
 Helper for passing string expression to functions with void parameter. Example: Print(String("Hello " + var));.
 
void PrintString (string s)
 Helper for printing out string expression. Example: PrintString("Hello " + var);.
 
proto native int array< Class T >::Count ()
 
proto native void array< Class T >::Clear ()
 
proto void array< Class T >::Set (int n, T value)
 
proto int array< Class T >::Find (T value)
 
proto T array< Class T >::Get (int n)
 
proto int array< Class T >::Insert (T value)
 
proto int array< Class T >::InsertAt (T value, int index)
 
void array< Class T >::InsertAll (notnull array< T > from)
 Inserts all elements from array.
 
proto native void array< Class T >::Remove (int index)
 
proto native void array< Class T >::RemoveOrdered (int index)
 
proto native void array< Class T >::Resize (int newSize)
 
proto native void array< Class T >::Reserve (int newSize)
 
proto native void array< Class T >::Swap (notnull array< T > other)
 
proto native void array< Class T >::Sort (bool reverse=false)
 
proto int array< Class T >::Copy (notnull array< T > from)
 
proto int array< Class T >::Init (T init[])
 
void array< Class T >::RemoveItem (T value)
 
void array< Class T >::RemoveItemUnOrdered (T value)
 
bool array< Class T >::IsValidIndex (int index)
 
void array< Class T >::Debug ()
 Print all elements in array.
 
int array< Class T >::GetRandomIndex ()
 Returns a random index of array. If Count is 0, return index is -1 .
 
T array< Class T >::GetRandomElement ()
 Returns a random element of array.
 
void array< Class T >::SwapItems (int item1_index, int item2_index)
 
void array< Class T >::InsertArray (array< T > other)
 
void array< Class T >::Invert ()
 
int array< Class T >::MoveIndex (int curr_index, int move_number)
 Returns a index in array moved by specific number.
 
void array< Class T >::ShuffleArray ()
 
int array< Class T >::DifferentAtPosition (array< T > pOtherArray)
 Returns an index where 2 arrays start to differ from each other.
 
proto native int set< Class T >::Count ()
 
proto native void set< Class T >::Clear ()
 
proto int set< Class T >::Find (T value)
 
proto T set< Class T >::Get (int n)
 
proto int set< Class T >::Insert (T value)
 
proto int set< Class T >::InsertAt (T value, int index)
 
proto native void set< Class T >::Remove (int index)
 
proto int set< Class T >::Copy (set< T > from)
 
proto native void set< Class T >::Swap (set< T > other)
 
proto int set< Class T >::Init (T init[])
 
void set< Class T >::InsertSet (set< T > other)
 
void set< Class T >::RemoveItem (T value)
 
void set< Class T >::RemoveItems (set< T > other)
 
void set< Class T >::Debug ()
 
proto native int map< Class TKey, Class TValue >::Count ()
 
proto native void map< Class TKey, Class TValue >::Clear ()
 
proto TValue map< Class TKey, Class TValue >::Get (TKey key)
 
proto bool map< Class TKey, Class TValue >::Find (TKey key, out TValue val)
 
proto TValue map< Class TKey, Class TValue >::GetElement (int index)
 
proto TKey map< Class TKey, Class TValue >::GetKey (int i)
 
proto void map< Class TKey, Class TValue >::Set (TKey key, TValue value)
 
proto void map< Class TKey, Class TValue >::Remove (TKey key)
 
proto void map< Class TKey, Class TValue >::RemoveElement (int i)
 
proto bool map< Class TKey, Class TValue >::Contains (TKey key)
 
proto bool map< Class TKey, Class TValue >::Insert (TKey key, TValue value)
 
proto int map< Class TKey, Class TValue >::Copy (map< TKey, TValue > from)
 
array< TKeymap< Class TKey, Class TValue >::GetKeyArray ()
 
array< TValuemap< Class TKey, Class TValue >::GetValueArray ()
 
bool map< Class TKey, Class TValue >::ReplaceKey (TKey old_key, TKey new_key)
 
TKey map< Class TKey, Class TValue >::GetKeyByValue (TValue value)
 
bool map< Class TKey, Class TValue >::GetKeyByValueChecked (TValue value, out TKey key)
 
proto native MapIterator map< Class TKey, Class TValue >::Begin ()
 
proto native MapIterator map< Class TKey, Class TValue >::End ()
 
proto native MapIterator map< Class TKey, Class TValue >::Next (MapIterator it)
 
proto TKey map< Class TKey, Class TValue >::GetIteratorKey (MapIterator it)
 
proto TValue map< Class TKey, Class TValue >::GetIteratorElement (MapIterator it)
 

Detailed Description

Note
float ftime; The deltaTime since last frame
float FLT_MAX; The maximum value for float
float FLT_MIN; The minimum value for float

Typedef Documentation

◆ MapIterator

Definition at line 762 of file EnScript.c.

◆ TBoolArray

Definition at line 669 of file EnScript.c.

◆ TClassArray

Definition at line 670 of file EnScript.c.

◆ TClassClassMap

Definition at line 945 of file EnScript.c.

◆ TClassFloatMap

Definition at line 942 of file EnScript.c.

◆ TClassIntMap

Definition at line 943 of file EnScript.c.

◆ TClassManagedMap

Definition at line 946 of file EnScript.c.

◆ TClassManagedRefMap

Definition at line 947 of file EnScript.c.

◆ TClassSet

Definition at line 757 of file EnScript.c.

◆ TClassStringMap

Definition at line 944 of file EnScript.c.

◆ TClassTypenameMap

Definition at line 948 of file EnScript.c.

◆ TClassVectorMap

Definition at line 949 of file EnScript.c.

◆ TFloatArray

Definition at line 667 of file EnScript.c.

◆ TFloatSet

Definition at line 755 of file EnScript.c.

◆ TIntArray

Definition at line 668 of file EnScript.c.

◆ TIntClassMap

Definition at line 927 of file EnScript.c.

◆ TIntFloatMap

Definition at line 924 of file EnScript.c.

◆ TIntIntMap

Definition at line 925 of file EnScript.c.

◆ TIntManagedMap

Definition at line 928 of file EnScript.c.

◆ TIntManagedRefMap

Definition at line 929 of file EnScript.c.

◆ TIntSet

Definition at line 756 of file EnScript.c.

◆ TIntStringMap

Definition at line 926 of file EnScript.c.

◆ TIntTypenameMap

Definition at line 930 of file EnScript.c.

◆ TIntVectorMap

Definition at line 931 of file EnScript.c.

◆ TManagedArray

Definition at line 671 of file EnScript.c.

◆ TManagedClassMap

Definition at line 963 of file EnScript.c.

◆ TManagedFloatMap

Definition at line 960 of file EnScript.c.

◆ TManagedIntMap

Definition at line 961 of file EnScript.c.

◆ TManagedManagedMap

Definition at line 964 of file EnScript.c.

◆ TManagedManagedRefMap

◆ TManagedRefArray

Definition at line 672 of file EnScript.c.

◆ TManagedRefClassMap

Definition at line 972 of file EnScript.c.

◆ TManagedRefFloatMap

Definition at line 969 of file EnScript.c.

◆ TManagedRefIntMap

Definition at line 970 of file EnScript.c.

◆ TManagedRefManagedMap

◆ TManagedRefManagedRefMap

◆ TManagedRefSet

Definition at line 759 of file EnScript.c.

◆ TManagedRefStringMap

◆ TManagedRefTypenameMap

◆ TManagedRefVectorMap

◆ TManagedSet

Definition at line 758 of file EnScript.c.

◆ TManagedStringMap

Definition at line 962 of file EnScript.c.

◆ TManagedTypenameMap

Definition at line 966 of file EnScript.c.

◆ TManagedVectorMap

Definition at line 967 of file EnScript.c.

◆ TStringArray

Definition at line 666 of file EnScript.c.

◆ TStringClassMap

Definition at line 936 of file EnScript.c.

◆ TStringFloatMap

Definition at line 933 of file EnScript.c.

◆ TStringIntMap

Definition at line 934 of file EnScript.c.

◆ TStringManagedMap

Definition at line 937 of file EnScript.c.

◆ TStringManagedRefMap

◆ TStringSet

Definition at line 754 of file EnScript.c.

◆ TStringStringMap

Definition at line 935 of file EnScript.c.

◆ TStringTypenameMap

Definition at line 939 of file EnScript.c.

◆ TStringVectorMap

Definition at line 940 of file EnScript.c.

◆ TTypenameArray

Definition at line 674 of file EnScript.c.

◆ TTypeNameClassMap

Definition at line 954 of file EnScript.c.

◆ TTypeNameFloatMap

Definition at line 951 of file EnScript.c.

◆ TTypeNameIntMap

Definition at line 952 of file EnScript.c.

◆ TTypeNameManagedMap

Definition at line 955 of file EnScript.c.

◆ TTypeNameManagedRefMap

◆ TTypenameSet

Definition at line 760 of file EnScript.c.

◆ TTypeNameStringMap

Definition at line 953 of file EnScript.c.

◆ TTypeNameTypenameMap

◆ TTypeNameVectorMap

Definition at line 958 of file EnScript.c.

◆ TVectorArray

Definition at line 673 of file EnScript.c.

◆ TypeID

script representation for C++ RTTI types

Definition at line 127 of file EnScript.c.

Function Documentation

◆ Begin()

proto native MapIterator map< Class TKey, Class TValue >::Begin ( )
private

◆ Call()

proto volatile int ScriptModule::Call ( Class inst,
string function,
void parm )
private

dynamic call of function when inst == NULL, it's global function call, otherwise it's method of class returns true, when success The call creates new thread, so it's legal to use sleep/wait

◆ CallFunction()

proto volatile int ScriptModule::CallFunction ( Class inst,
string function,
out void returnVal,
void parm )
private

dynamic call of function when inst == NULL, it's global function call, otherwise it's method of class returns true, when success The call do not create new thread!!!!

Referenced by CallQueueContext::CallParams().

◆ CallFunctionParams()

proto volatile int ScriptModule::CallFunctionParams ( Class inst,
string function,
out void returnVal,
Class parms )
private

◆ Cast()

static proto Class Class::Cast ( Class from)
staticprivate

Try to safely down-cast base class to child class.

Returns
down-casted 'from' pointer when cast is successfull (classes are related), or null if casting is invalid
// assume that Man inheites from Object
Object obj = g_Game.GetPlayer();
Man player = Man.Cast(obj);
if (player)
{
// horay!
}
DayZGame g_Game
Definition DayZGame.c:3528

◆ CastTo()

static proto bool Class::CastTo ( out Class to,
Class from )
staticprivate

Try to safely down-cast base class to child class.

Returns
bool true when 'from' is not null and cast successfull, false when casting is not valid or 'from' is null
// assume that Man inheites from Object
Object obj = g_Game.GetPlayer();
Man player;
if (Class.CastTo(player, obj))
{
// horay!
}
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Referenced by AbortWeaponEvent(), ActionCarHornBase::ActionCondition(), ActionBuryBody::ActionCondition(), ActionCoverHeadTarget::ActionCondition(), ActionDigGardenPlot::ActionCondition(), ActionDigInStash::ActionCondition(), ActionCondition(), ActionDisinfectPlant::ActionCondition(), ActionEatFruit::ActionCondition(), ActionFertilizeSlot::ActionCondition(), ActionFillGeneratorTank::ActionCondition(), ActionFillObject::ActionCondition(), ActionGagTarget::ActionCondition(), ActionLockDoors::ActionCondition(), ActionRefuelTorch::ActionCondition(), ActionRepairShelter::ActionCondition(), ActionRepairTent::ActionCondition(), ActionRepairTentPart::ActionCondition(), ActionShaveTarget::ActionCondition(), ActionUncoverHeadTarget::ActionCondition(), ActionUngagTarget::ActionCondition(), ActionUnlockDoors::ActionCondition(), ActionViewBinoculars::ActionCondition(), ActionViewOptics::ActionCondition(), ActionDefibrilateBase::ActionCondition(), ActionCloseDoors::ActionCondition(), ActionEnterLadder::ActionCondition(), ActionGetInTransport::ActionCondition(), ActionHarvestCrops::ActionCondition(), ActionOpenDoors::ActionCondition(), ActionPickupChicken::ActionCondition(), ActionRemovePlant::ActionCondition(), ActionRemoveSeed::ActionCondition(), ActionAnimateCarSelection::ActionCondition(), ActionAnimateSeats::ActionCondition(), ActionCarDoors::ActionCondition(), ActionCarDoorsOutside::ActionCondition(), ActionSwitchLights::ActionCondition(), ActionClapBearTrapWithThisItem::ActionCondition(), ActionToggleNVMode::ActionCondition(), ActionZoomIn::ActionCondition(), ActionZoomOut::ActionCondition(), ActionStopEngine::ActionCondition(), ActionSwitchSeats::ActionCondition(), UIScriptedMenu::Apply(), Environment::ApplyDrynessToItemEx(), ApplyJumpOutDmg(), Environment::ApplyWetnessToItem(), Environment::BodyPartHeatProperties(), ManBase::BrokenLegForceProne(), CAContinuousEmptyMagazine::CalcAndSetQuantity(), CAContinuousTransferQuantity::CalcAndSetQuantity(), PluginBase::CalculateHealth(), ManBase::CalculateVisibilityForAI(), DayZPlayer::CameraHandler(), WeaponManager::CanAttachMagazine(), DayZPlayer::CanClimb(), Attachments::CanCombineAmmo(), VicinitySlotsContainer::CanCombineAmmo(), AttachmentCategoriesContainer::CanDisplayAnyCategory(), RecipeBase::CanDo(), ActionEmptyMagazine::CanEmpty(), ItemBase::CanLoadAttachment(), ActionLoadMagazine::CanLoadMagazine(), CanPlayEmote(), ItemBase::CanReceiveAttachment(), WeaponManager::CanSwapMagazine(), TrapBase::CauseVictimToStartLimping(), ScriptedWidgetEventHandler::CheckForActionWidgetOverrides(), ManBase::CheckForBurlap(), ManBase::CheckForGag(), ActionTargetsCursor::CheckRefresherFlagVisibility(), ScriptedWidgetEventHandler::ColorRed(), ScriptedWidgetEventHandler::ColorWhite(), ConnectionLost::ConnectionLost(), BreakLongWoodenStick::CopyOldPropertiesToNew(), UnboxLambda::CopyOldPropertiesToNew(), CopyOldPropertiesToNew(), TorchLambda::CopyOldPropertiesToNew(), CreateAndSetupActionCallback(), ActionRepositionPluggedItem::CreateAndSetupActionCallback(), ActionTakeArrowToHands::CreateAndSetupActionCallback(), ActionTakeHybridAttachmentToHands::CreateAndSetupActionCallback(), ActionTakeItemToHands::CreateAndSetupActionCallback(), ActionTakeMaterialToHands::CreateAndSetupActionCallback(), AnimatedActionBase::CreateAndSetupActionCallback(), MissionBase::CreateCharacter(), PlayerSpawnHandler::CreateChildItem(), CreateDamageTriggerEx(), CreateEmoteCallback(), CreateOrgan(), Hologram::CreateTrigger(), CreateTrigger(), EffectArea::CreateTrigger(), EffectAreaLoader::CreateZones(), DamageCrew(), DamageDealtEffect::DamageDealtEffect(), DayZIntroScene::DayZIntroScene(), DayZPlayerCameraBase::DayZPlayerCameraIronsights(), DayZPlayerImplementAiming::DayZPlayerImplementAiming(), InventoryActionHandler::DeactiveAction(), DeferredWeaponFailed(), ActionDefibrilateBase::DefibrillateServer(), StaminaHandler::DepleteStamina(), ActionDismantlePart::DismantleCondition(), Hud::DisplayBadge(), Hud::DisplayNotifier(), Hud::DisplayPresence(), Hud::DisplayStance(), Hud::DisplayTendencyNormal(), RecipeBase::Do(), ClosableContainer::DraggingOverHeader(), WeaponDebug::DrawLineOfFireCameraHybrid(), WeaponDebug::DrawLineOfFireMuzzleToHit(), ManBase::DropAllItems(), ActionDeployBase::DropDuringPlacing(), ManBase::EEItemIntoHands(), Mask_Base::EEItemLocationChanged(), InventoryItemSuper::EEKilled(), EffectRadial(), Trigger::EOnEnter(), Trigger::EOnLeave(), AreaDamageTriggerBase::EOnTouch(), Hologram::EvaluateCollision(), VicinityItemManager::ExcludeFromContainer_Phase1(), VicinityItemManager::ExcludeFromContainer_Phase2(), VicinityItemManager::ExcludeFromContainer_Phase3(), CAContinuousFertilizeGardenSlot::Execute(), CAContinuousMineWood::Execute(), CAContinuousRepeatStartEngine::Execute(), CAContinuousTransferQuantity::Execute(), CAContinuousWaterPlant::Execute(), CAContinuousWaterSlot::Execute(), FlashbangEffect::FlashbangEffect(), FloatingCrossHair(), GameplayEffectsDataImage(), GestureMenuItem(), ActionTargetsCursor::GetActionManager(), ScriptedWidgetEventHandler::GetActionManager(), GetActionManager(), CarScript::GetCarDoorsState(), HandsContainer::GetCombinationFlags(), ItemManager::GetCombinationFlags(), ScriptedWidgetEventHandler::GetCrosshairPosition(), QuantityConversions::GetItemQuantity(), QuantityConversions::GetItemQuantity(), ActionTargetsCursor::GetItemQuantity(), QuantityConversions::GetItemQuantityMax(), QuantityConversions::GetItemQuantityText(), GetMeleeTarget(), CAContinuousMineRock::GetMiningData(), CAContinuousMineWood::GetMiningData(), InventoryItem::GetNumberOfItems(), ActionHarvestCrops::GetPlantSlot(), ActionTargetsCursor::GetPlayer(), ScriptedWidgetEventHandler::GetPlayer(), GetPlayer(), ScriptedWidgetEventHandler::GetRadioFrequency(), Managed::GetRequester(), ActionWorldCraft::GetText(), CGame::GetUserFOVFromConfig(), WeaponDebug::GetWeaponInHands(), HandEventBase(), DayZPlayer::HandleDeath(), BaseBuildingBase::HandleDropAttachment(), HandleDropCartridge(), HandleEngineSound(), HandleInventory(), PlayerSpawnHandler::HandleNewItem(), HandlePlayerBody(), HandleStoreCartridge(), HandleWeaponEvents(), DayZPlayer::HandleWeapons(), QuantityConversions::HasItemQuantity(), UIScriptedMenu::Init(), Init(), ScriptedWidgetEventHandler::Init(), Hud::Init(), Hud::InitBadgesAndNotifiers(), PPEMatClassParameterCommandData::InitDefaults(), IsAuthoritative(), IsEntityBehindEntityInAngle(), EntityAI::IsIgnoredObject(), HumanCommandVehicle::IsObjectIgnoredOnGettingOut(), IsOwner(), IsProxy(), VONManager::IsVoiceThresholdMinimum(), IsWearingBurlap(), ActionUncoverHeadTarget::IsWearingBurlap(), ActionUngagSelf::IsWearingGag(), ActionUngagTarget::IsWearingGag(), ManBase::IsWearingSplint(), LoadingScreen(), ActionLockDoors::LockDoor(), UIScriptedMenu::MarkSelected(), DayZCreature::ModCommandHandlerBefore(), ModifierBase(), ActionWorldCraft::OnActionInfoUpdate(), AKS74U::OnDebugSpawn(), Aug_Base::OnDebugSpawn(), Weapon_Base::OnDebugSpawn(), B95_base::OnDebugSpawn(), CZ550_Base::OnDebugSpawn(), RifleSingleShot_Base::OnDebugSpawn(), Mosin9130_Base::OnDebugSpawn(), Repeater::OnDebugSpawn(), Winchester70_Base::OnDebugSpawn(), Izh43Shotgun_Base::OnDebugSpawn(), Mp133Shotgun_Base::OnDebugSpawn(), VSS_Base::OnDebugSpawn(), CivilianBelt::OnDebugSpawn(), HelmetBase::OnDebugSpawn(), HipPack_ColorBase::OnDebugSpawn(), MilitaryBelt::OnDebugSpawn(), PlateCarrierVest::OnDebugSpawn(), Container_Base::OnDebugSpawn(), ItemBase::OnDebugSpawn(), CarScript::OnDebugSpawn(), AttachmentCategoriesRow::OnDropReceivedFromHeader(), ActionViewOptics::OnEndAnimationLoopClient(), ActionViewOptics::OnEndAnimationLoopServer(), ActionViewOptics::OnEndClient(), ActionContinuousBase::OnEndInput(), ActionViewOptics::OnEndServer(), ActionCollectBloodSelf::OnEndServer(), ActionCollectBloodTarget::OnEndServer(), ActionCollectSampleSelf::OnEndServer(), ActionCollectSampleTarget::OnEndServer(), OnEndServer(), ActionAnimateCarSelection::OnEndServer(), ActionZoomIn::OnEndServer(), ActionZoomOut::OnEndServer(), WeaponStateBase::OnEntry(), WeaponStartAction::OnEntry(), WeaponFire::OnEntry(), OnEntry(), CGame::OnEvent(), OnEvent(), MissionBase::OnEvent(), ActionAttachWheels::OnExecuteClient(), ActionEmptyMagazine::OnExecuteServer(), ActionLoadMagazine::OnExecuteServer(), ActionRefuelTorch::OnExecuteServer(), OnExecuteServer(), ActionSwitchLights::OnExecuteServer(), ActionAttachWheels::OnExecuteServer(), ActionClapBearTrapWithThisItem::OnExecuteServer(), ActionStopEngine::OnExecuteServer(), ActionFillObject::OnFinishProgressClient(), ActionDefibrilateSelf::OnFinishProgressClient(), ActionDefibrilateTarget::OnFinishProgressClient(), ActionBreakLongWoodenStick::OnFinishProgressServer(), ActionCoverHeadSelf::OnFinishProgressServer(), ActionCoverHeadTarget::OnFinishProgressServer(), OnFinishProgressServer(), ActionDigWorms::OnFinishProgressServer(), ActionFillObject::OnFinishProgressServer(), ActionGagSelf::OnFinishProgressServer(), ActionGagTarget::OnFinishProgressServer(), ActionRepairPart::OnFinishProgressServer(), ActionRepairShelter::OnFinishProgressServer(), ActionRepairTent::OnFinishProgressServer(), ActionShaveTarget::OnFinishProgressServer(), ActionStripCarrierVest::OnFinishProgressServer(), ActionUngagSelf::OnFinishProgressServer(), ActionUngagTarget::OnFinishProgressServer(), ActionWorldCraft::OnFinishProgressServer(), ActionDefibrilateSelf::OnFinishProgressServer(), SymptomBase::OnInit(), ItemBase::OnInventoryEnter(), Weapon::OnItemLocationChanged(), Icon::OnPerformCombination(), HandsContainer::OnPerformCombination(), EntityPlacementCallback::OnQuery(), ManBase::OnQuickBarSingleUse(), TrapBase::OnServerSteppedOn(), EntityPlacementCallback::OnSetup(), OnShow(), OnStart(), ActionViewOptics::OnStartAnimationLoopClient(), ActionViewOptics::OnStartAnimationLoopServer(), ActionCloseDoors::OnStartServer(), OnStartServer(), ActionOpenDoors::OnStartServer(), ActionPullBodyFromTransport::OnStartServer(), ActionAnimateCarSelection::OnStartServer(), PPERequester_GameplayBase::OnStop(), InventoryItem::OnStoreLoad(), UngagSelfLambda::OnSuccess(), WeaponStartAction::OnUpdate(), OnUpdate(), WeaponFireMultiMuzzle::OnUpdate(), WeaponStateBase::OnUpdate(), ItemOptics::OnWasAttached(), HeadGear_Base::OnWasAttached(), ItemBase::OnWasAttached(), ItemOptics::OnWasDetached(), ItemBase::OnWasDetached(), Icon::PerformCombination(), Hologram::PlaceEntity(), ManBase::PredictiveSwapEntities(), DayZPlayer::ProcessWeaponEvent(), VicinityItemManager::RefreshVicinityItems(), GameplayEffectsData::RegisterData(), PPEClassBase::RegisterParameterColorEx(), PPEClassBase::RegisterParameterScalarFloatEx(), ManBase::ReloadWeapon(), ManBase::RemoveAllItems(), RemoveSplint(), ActionRepairTent::RepairDamageTransfer(), SelectStoreCartridge(), SendMessageToClient(), InventoryActionHandler::SetAction(), ActionTargetsCursor::SetActionWidget(), ScriptedWidgetEventHandler::SetActionWidget(), Weapon_Base::SetAttachmentsHealth(), ManBase::SetContaminatedEffectEx(), DayZIntroScenePC::SetInitPostprocesses(), DayZIntroSceneXbox::SetInitPostprocesses(), ActionTargetsCursor::SetInteractActionIcon(), ScriptedWidgetEventHandler::SetInteractActionIcon(), ScriptedWidgetEventHandler::SetItemDesc(), ActionTargetsCursor::SetItemDesc(), ActionTargetsCursor::SetItemHealth(), ScriptedWidgetEventHandler::SetItemHealth(), ActionTargetsCursor::SetItemQuantity(), ScriptedWidgetEventHandler::SetItemQuantity(), ScriptedWidgetEventHandler::SetRadioFrequency(), Hud::SetStamina(), CAContinuousCraft::Setup(), CAContinuousDisinfectPlant::Setup(), CAContinuousEmptyMagazine::Setup(), CAContinuousFertilizeGardenSlot::Setup(), CAContinuousFill::Setup(), CAContinuousFish::Setup(), CAContinuousLoadMagazine::Setup(), CAContinuousTransferQuantity::Setup(), CAContinuousWaterPlant::Setup(), CAContinuousWaterSlot::Setup(), ActionWorldCraft::SetupAction(), ScriptedWidgetEventHandler::SetValue(), Hud::SetWalkieTalkieText(), ScriptedWidgetEventHandler::SetWeaponModeAndZeroing(), ScriptedWidgetEventHandler::SetWeaponQuantity(), SoftSkillManagerDebug(), ActionSortAmmoPile::SortAmmo(), SpawnAdditionalItems(), PlayerSpawnHandler::SpawnComplexChildrenItems(), PluginBase::SpawnEntityOnCursorDir(), PluginBase::SpawnEntityOnGroundPatternGrid(), PluginBase::SpawnEntityOnGroundPos(), PlayerSpawnHandler::SpawnSimpleChildrenItems(), ActionEnterLadder::Start(), ActionSwitchSeats::Start(), SwitchPreset(), SyncAnimState(), HandsContainer::TakeAsAttachment(), ClosableContainer::TakeAsAttachment(), DeveloperTeleport::TeleportAtCursor(), DeveloperTeleport::TeleportAtCursorEx(), ScriptedWidgetEventHandler::TextMapUpdateWidget(), PluginDayzPlayerDebug_Weapons::Tick(), DayZPlayer::TriggerPullPlayerOutOfVehicle(), Managed::TrySpawnNextDrop(), ActionUncoverHeadBase::UncoverHead(), ActionUnlockDoors::UnlockDoor(), ScriptedWidgetEventHandler::Update(), GameplayEffectsData::Update(), Hud::UpdateBloodName(), UIScriptedMenu::UpdateItemInfoQuantity(), MissionBase::UpdatePlayersStats(), ActionRepairCarChassis::WriteToContext(), WriteToContext(), ActionRepairPart::WriteToContext(), ActionRepairTent::WriteToContext(), and ActionRepairTentPart::WriteToContext().

◆ ClassName()

proto native owned external string Class::ClassName ( )
private

Returns name of class-type.

Parameters
instClass
Returns
string class-type
Man player = g_Game.GetPlayer();
string className = player.ClassName();
>> className = 'Man'
proto void Print(void var)
Prints content of variable to console/log.

Referenced by Class::GetDebugName().

◆ Clear() [1/3]

proto native void array< Class T >::Clear ( )
private

Destroyes all elements of the array and sets the Count to 0. The underlying memory of the array is not freed.

◆ Clear() [2/3]

proto native void set< Class T >::Clear ( )
private

◆ Clear() [3/3]

proto native void map< Class TKey, Class TValue >::Clear ( )
private

Clears the hash map.

◆ Contains()

proto bool map< Class TKey, Class TValue >::Contains ( TKey key)
private

Returns if map contains element with given key.

◆ Copy() [1/3]

proto int map< Class TKey, Class TValue >::Copy ( map< TKey, TValue > from)
private

◆ Copy() [2/3]

proto int array< Class T >::Copy ( notnull array< T > from)
private

Copes contents of from array to this array.

Returns
How many elements were copied

◆ Copy() [3/3]

proto int set< Class T >::Copy ( set< T > from)
private

◆ copyarray()

proto void copyarray ( void destArray,
void srcArray )

◆ Count() [1/3]

proto native int array< Class T >::Count ( )
private

O(1) complexity.

Returns
Number of elements of the array

◆ Count() [2/3]

proto native int set< Class T >::Count ( )
private

◆ Count() [3/3]

proto native int map< Class TKey, Class TValue >::Count ( )
private
Returns
The number of elements in the hashmap.

◆ Debug() [1/2]

void array< Class T >::Debug ( )
inlineprivate

Print all elements in array.

Returns
void
my_array.Debug();
>> "One"
>> "Two"
>> "Three"

Definition at line 516 of file EnScript.c.

517 {
518 Print(string.Format("Array count: %1", Count()));
519 for (int i = 0; i < Count(); i++)
520 {
521 T item = Get(i);
522 Print(string.Format("[%1] => %2", i, item));
523 }
524 }
array< ref PlayerStatBase > Get()
proto native int Count()

References Count, Get(), and Print().

◆ Debug() [2/2]

void set< Class T >::Debug ( )
inlineprivate

Definition at line 742 of file EnScript.c.

743 {
744 Print(string.Format("Set count: %1", Count()));
745 for (int i = 0; i < Count(); i++)
746 {
747 T item = Get(i);
748 Print(string.Format("[%1] => %2", i, item));
749 }
750 }
proto native int Count()

References Count, Get(), and Print().

◆ DifferentAtPosition()

int array< Class T >::DifferentAtPosition ( array< T > pOtherArray)
inlineprivate

Returns an index where 2 arrays start to differ from each other.

Returns
int Index from where arrays differ
array<int> arr1 = {0,1,2,3};
array<int> arr2 = {0,1,3,2};
int differsAt = arr1.DifferentAtPosition(arr2);
>> 2

Definition at line 647 of file EnScript.c.

648 {
649 if (Count() != pOtherArray.Count())
650 {
651 ErrorEx("arrays are not the same size");
652 return -1;
653 }
654
655 for (int i = 0; i < pOtherArray.Count(); ++i)
656 {
657 if (Get(i) != pOtherArray.Get(i))
658 return i;
659 }
660
661 return -1;
662 }
enum ShapeType ErrorEx

References Count, ErrorEx, and Get().

◆ End()

proto native MapIterator map< Class TKey, Class TValue >::End ( )
private

◆ EnScript()

void EnScript::EnScript ( )
inlineprivate

Definition at line 168 of file EnScript.c.

168{}

◆ Find() [1/3]

proto int array< Class T >::Find ( T value)
private

Tries to find the first occurance of given value in the array.

Returns
Index of the first occurance of value if found, -1 otherwise

◆ Find() [2/3]

proto int set< Class T >::Find ( T value)
private

Tries to find the first occurance of given value in the set.

Returns
Index of the first occurance of value if found, -1 otherwise

◆ Find() [3/3]

proto bool map< Class TKey, Class TValue >::Find ( TKey key,
out TValue val )
private

Search for an element with the given key.

Parameters
keyThe key of the element to find
valresult is stored to val
Returns
returns True if given key exist.

◆ Get() [1/3]

proto T array< Class T >::Get ( int n)
private
Returns
Element at the index n

◆ Get() [2/3]

proto T set< Class T >::Get ( int n)
private

◆ Get() [3/3]

proto TValue map< Class TKey, Class TValue >::Get ( TKey key)
private

Search for an element with the given key.

Parameters
keyThe key of the element to find
Returns
Pointer to element data if found, NULL otherwise.

◆ GetClassVar()

static proto int EnScript::GetClassVar ( Class inst,
string varname,
int index,
out void result )
staticprivate

Dynamic read of variable value by its name.

Parameters
instWhen inst == NULL, it's for global variable, otherwise it's class member
indexIs index when variable is array
[out]resultVariable must be of the same type!
Returns
int true when success
float count = 0;
bool success = EnScript.GetClassVar(myClass, "m_Counter", 0, count);
>> count = 5
>> success = 1
static proto int GetClassVar(Class inst, string varname, int index, out void result)
Dynamic read of variable value by its name.

◆ GetDebugName()

string Class::GetDebugName ( )
inlineprivate

Definition at line 39 of file EnScript.c.

39{ return ClassName(); }
proto native owned external string ClassName()
Returns name of class-type.

References Class::ClassName().

◆ GetElement()

proto TValue map< Class TKey, Class TValue >::GetElement ( int index)
private

Return the i:th element in the map. Note: This operation is O(n) complexity. Use with care!

Parameters
indexThe position of the element in the map
Returns
The element on the i:th position

◆ GetIteratorElement()

proto TValue map< Class TKey, Class TValue >::GetIteratorElement ( MapIterator it)
private

◆ GetIteratorKey()

proto TKey map< Class TKey, Class TValue >::GetIteratorKey ( MapIterator it)
private

◆ GetKey()

proto TKey map< Class TKey, Class TValue >::GetKey ( int i)
private

Return the i:th element key in the map. Note: This operation is O(n) complexity. Use with care!

Parameters
iThe position of the element key in the map
Returns
Return key of i-th element

◆ GetKeyArray()

array< TKey > map< Class TKey, Class TValue >::GetKeyArray ( )
inlineprivate

Definition at line 862 of file EnScript.c.

863 {
865 for (int i = 0; i < Count(); i++)
866 keys.Insert(GetKey(i));
867 return keys;
868 }

References Count.

◆ GetKeyByValue()

TKey map< Class TKey, Class TValue >::GetKeyByValue ( TValue value)
inlineprivate

Definition at line 889 of file EnScript.c.

890 {
891 TKey ret;
892 for (int i = 0; i < Count(); i++)
893 {
894 if (GetElement(i) == value)
895 {
896 ret = GetKey(i);
897 break;
898 }
899 }
900
901 return ret;
902 }
proto TValue GetElement(int index)

References Count, and GetElement().

◆ GetKeyByValueChecked()

bool map< Class TKey, Class TValue >::GetKeyByValueChecked ( TValue value,
out TKey key )
inlineprivate

Definition at line 904 of file EnScript.c.

905 {
906 for (int i = 0; i < Count(); i++)
907 {
908 if (GetElement(i) == value)
909 {
910 key = GetKey(i);
911 return true;
912 }
913 }
914 return false;
915 }

References Count, and GetElement().

◆ GetRandomElement()

T array< Class T >::GetRandomElement ( )
inlineprivate

Returns a random element of array.

Returns
int Random element of array
Print( my_array.GetRandomElement() );
>> "Three"

Definition at line 552 of file EnScript.c.

553 {
554 return Get(GetRandomIndex());
555 }
int GetRandomIndex()
Returns a random index of array. If Count is 0, return index is -1 .
Definition EnScript.c:535

References Get().

◆ GetRandomIndex()

int array< Class T >::GetRandomIndex ( )
inlineprivate

Returns a random index of array. If Count is 0, return index is -1 .

Returns
int Random index of array
Print( my_array.GetRandomIndex() );
>> 2

Definition at line 535 of file EnScript.c.

536 {
537 if (Count() > 0)
538 return Math.RandomInt(0, Count());
539
540 return -1;
541 }
Definition EnMath.c:7
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

References Count, and Math::RandomInt().

◆ GetValueArray()

array< TValue > map< Class TKey, Class TValue >::GetValueArray ( )
inlineprivate

Definition at line 870 of file EnScript.c.

871 {
873 for (int i = 0; i < Count(); i++)
874 elements.Insert(GetElement(i));
875 return elements;
876 }

References Count, and GetElement().

◆ Idle()

proto volatile void Idle ( )

Yiels execution to other threads and then it continues. Obsolete...

◆ Init() [1/2]

proto int array< Class T >::Init ( T init[])
private

◆ Init() [2/2]

proto int set< Class T >::Init ( T init[])
private

◆ Insert() [1/3]

proto int array< Class T >::Insert ( T value)
private

Inserts element at the end of array.

Parameters
valueElement to be inserted
Returns
Position at which element is inserted

◆ Insert() [2/3]

proto int set< Class T >::Insert ( T value)
private

Inserts element at the end of array.

Parameters
valueElement to be inserted
Returns
Position at which element is inserted

◆ Insert() [3/3]

proto bool map< Class TKey, Class TValue >::Insert ( TKey key,
TValue value )
private

Insert new element into hash map.

Parameters
keyKey of element to be inserted.
valueData of element to be inserted.

◆ InsertAll()

void array< Class T >::InsertAll ( notnull array< T > from)
inlineprivate

Inserts all elements from array.

Parameters
fromarray<T> array from which all elements will be added
arr1.Insert( "Dave" );
arr1.Insert( "Mark" );
arr1.Insert( "John" );
arr2.Insert( "Sarah" );
arr2.Insert( "Cate" );
arr1.InsertAll(arr2);
for ( int i = 0; i < arr1.Count(); i++ )
{
Print( arr1.Get(i) );
}
delete arr2;
delete arr1;
>> "Dave"
>> "Mark"
>> "John"
>> "Sarah"
>> "Cate"
array< string > TStringArray
Definition EnScript.c:666

Definition at line 424 of file EnScript.c.

425 {
426 for (int i = 0; i < from.Count(); i++)
427 Insert(from.Get(i));
428 }
proto int Insert(T value)

◆ InsertArray()

void array< Class T >::InsertArray ( array< T > other)
inlineprivate

Definition at line 564 of file EnScript.c.

565 {
566 for (int i = 0; i < other.Count(); i++)
567 {
568 T item = other.Get(i);
569 Insert(item);
570 }
571 }

◆ InsertAt() [1/2]

proto int array< Class T >::InsertAt ( T value,
int index )
private

Inserts element at certain position and moves all elements behind this position by one.

Parameters
valueElement to be inserted
indexPosition at which element is inserted. Must be less than Array::GetCardinality()
Returns
Number of elements after insertion

◆ InsertAt() [2/2]

proto int set< Class T >::InsertAt ( T value,
int index )
private

Inserts element at certain position and moves all elements behind this position by one.

Parameters
valueElement to be inserted
indexPosition at which element is inserted. Must be less than Array::GetCardinality()
Returns
Number of elements after insertion

◆ InsertSet()

void set< Class T >::InsertSet ( set< T > other)
inlineprivate

Definition at line 715 of file EnScript.c.

716 {
717 int count = other.Count();
718 for (int i = 0; i < count; i++)
719 {
720 T item = other[i];
721 Insert(item);
722 }
723 }
proto int Insert(T value)

◆ Invert()

void array< Class T >::Invert ( )
inlineprivate

Definition at line 573 of file EnScript.c.

574 {
575 int left = 0;
576 int right = Count() - 1;
577 if (right > 0)
578 {
579 while (left < right)
580 {
581 T temp = Get(left);
582 Set(left++, Get(right));
583 Set(right--, temp);
584 }
585 }
586 }
proto void Set(int n, T value)

References Count, and Get().

◆ IsInherited()

proto native external bool Class::IsInherited ( typename type )
private

Returns true when instance is of the type, or inherited one.

Parameters
typeClass type
Returns
bool true when 'clType' is the same as 'type', or inherited one.
if (inst && inst.IsInherited(Widget))
{
Print("inst is inherited from Widget class!");
}

◆ IsValidIndex()

bool array< Class T >::IsValidIndex ( int index)
inlineprivate

Definition at line 490 of file EnScript.c.

491 {
492 return (index > -1 && index < Count());
493 }

References Count.

◆ KillThread()

proto native int KillThread ( Class owner,
string name )

Kills thread.

Parameters
ownerCan be NULL for global threads.
nameName of the first function on stack
Returns
int ???
???

◆ LoadScript()

static proto native ScriptModule ScriptModule::LoadScript ( ScriptModule parentModule,
string scriptFile,
bool listing )
staticprivate

Do load script and create ScriptModule for it.

Parameters
parentModuleModule
scriptFileScript path
listing??
Returns
ScriptModule Loaded scripted module
???

◆ MoveIndex()

int array< Class T >::MoveIndex ( int curr_index,
int move_number )
inlineprivate

Returns a index in array moved by specific number.

Returns
int Moved index in this array
Print( "Count: "+ my_array.Count() );
Print( "Moved 1:"+ my_array.MoveIndex(2, 1) );
Print( "Moved 3:"+ my_array.MoveIndex(2, 2) );
>> "Count: 4"
>> "Moved index 2 by 1: 3";
>> "Moved index 2 by 2: 0";

Definition at line 601 of file EnScript.c.

602 {
603 int count = Count();
604 int new_index = curr_index;
605
606 if (move_number > 0)
608
609 if (move_number < 0)
610 {
612
613 if (new_index < 0)
614 {
615 if (new_index <= -count)
617
619 }
620 }
621
622 if (new_index >= count)
624
625 // move_number is 0
626 return new_index;
627 }

References Count.

◆ Next()

◆ ParseString()

proto int ParseString ( string input,
out string tokens[] )

Parses string into array of tokens returns number of tokens.

Parameters
inputstring String for parse
[out]tokensarray[] Parsed string in array
Returns
int Number of tokens
string token[2];
int result = ParseString("Hello World", token);
for( int i = 0; i < 2; i++ )
{
}
>> 'Hello'
>> 'World'
proto int ParseString(string input, out string tokens[])
Parses string into array of tokens returns number of tokens.

◆ ParseStringEx()

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. Input string is left-truncated by the resulting token length.

Parameters
[in,out]inputstring String for parse\ Output is without founded token
[out]tokenstring Founded string token
Returns
int Type of token
Token types:
0 - error, no token
1 - defined token (special characters etc. . / * )
2 - quoted string. Quotes are removed -> TODO
3 - alphabetic string
4 - number
5 - end of line -> TODO
string input = "Hello*World";
string token1;
string token2;
Print( String( "Token1 = '" + token1 + "' Type = " + result1.ToString() ) );
Print( String( "Token2 = '" + token2 + "' Type = " + result2.ToString() ) );
>> 'Toke1 = 'Hello' Type = 3'
>> 'Toke1 = '*' Type = 1'
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....
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
Definition EnScript.c:338

◆ PrintString()

◆ Release()

proto native void ScriptModule::Release ( )
private

◆ Remove() [1/3]

proto native void array< Class T >::Remove ( int index)
private

Removes element from array. The empty position is replaced by last element, so removal is quite fast but do not retain order.

Parameters
indexIndex of element to be removed

◆ Remove() [2/3]

proto native void set< Class T >::Remove ( int index)
private

Removes element from array, but retain all elements ordered.

Parameters
indexIndex of element to be removed

◆ Remove() [3/3]

proto void map< Class TKey, Class TValue >::Remove ( TKey key)
private

Removes element with given key.

◆ RemoveElement()

proto void map< Class TKey, Class TValue >::RemoveElement ( int i)
private

Removes i:th element with given key. Note: This operation is O(n) complexity. Use with care!

Parameters
iThe position of the element key in the map

◆ RemoveItem() [1/2]

void array< Class T >::RemoveItem ( T value)
inlineprivate

Definition at line 474 of file EnScript.c.

475 {
476 int remove_index = Find(value);
477
478 if (remove_index >= 0)
480 }
proto native void RemoveOrdered(int index)
proto int Find(T value)

◆ RemoveItem() [2/2]

void set< Class T >::RemoveItem ( T value)
inlineprivate

Definition at line 725 of file EnScript.c.

726 {
727 int remove_index = Find(value);
728 if (remove_index >= 0)
730 }
proto int Find(T value)
proto native void Remove(int index)

References Remove().

◆ RemoveItems()

void set< Class T >::RemoveItems ( set< T > other)
inlineprivate

Definition at line 732 of file EnScript.c.

733 {
734 int count = other.Count();
735 for (int i = 0; i < count; i++)
736 {
737 T item = other[i];
739 }
740 }
void RemoveItem(T value)
Definition EnScript.c:725

◆ RemoveItemUnOrdered()

void array< Class T >::RemoveItemUnOrdered ( T value)
inlineprivate

Definition at line 482 of file EnScript.c.

483 {
484 int remove_index = Find(value);
485
486 if (remove_index >= 0)
488 }
proto native void Remove(int index)

References Remove().

◆ RemoveOrdered()

proto native void array< Class T >::RemoveOrdered ( int index)
private

Removes element from array, but retain all elements ordered. It's slower than Remove

Parameters
indexIndex of element to be removed

◆ ReplaceKey()

bool map< Class TKey, Class TValue >::ReplaceKey ( TKey old_key,
TKey new_key )
inlineprivate

Definition at line 878 of file EnScript.c.

879 {
880 if (Contains(old_key))
881 {
884 return true;
885 }
886 return false;
887 }
proto void Remove(TKey key)
proto bool Contains(TKey key)
proto void Set(TKey key, TValue value)

References Get(), and Remove().

◆ Reserve()

proto native void array< Class T >::Reserve ( int newSize)
private

Resizes the array to given size internally. Is used for optimization purposes when the approx. size is known beforehand

◆ Resize()

proto native void array< Class T >::Resize ( int newSize)
private

Resizes the array to given size. If the newSize is lower than current Count overflowing objects are destroyed. If the newSize is higher than current Count missing elements are initialized to zero (null).

◆ reversearray()

proto void reversearray ( void param_array)

◆ SafeCastType()

static proto bool Class::SafeCastType ( Class type,
out Class to,
Class from )
staticprivate

This function is for internal script usage.

◆ Set() [1/2]

proto void array< Class T >::Set ( int n,
T value )
private

Sets n-th element to given value.

◆ Set() [2/2]

proto void map< Class TKey, Class TValue >::Set ( TKey key,
TValue value )
private

Sets value of element with given key. If element with key not exists, it is created. Note: creating new elements is faster using Insert function.

◆ SetClassVar()

static proto int EnScript::SetClassVar ( Class inst,
string varname,
int index,
void input )
staticprivate

Dynamic write to variable by its name.

Parameters
instwhen inst == NULL, it's for global variable, otherwise it's class member
varname
indexIs index when variable is array
inputInput variable must be of the same type!
Returns
int Returns true(1) when success
Print(myClass.m_Counter);
>> m_Counter = 0
bool success = EnScript.SetClassVar(myClass, "m_Counter", 0, 5.0);
Print(myClass.m_Counter);
>> m_Counter = 5
>> success = 1
int m_Counter
Definition DayZGame.c:674
static proto int SetClassVar(Class inst, string varname, int index, void input)
Dynamic write to variable by its name.

◆ SetVar()

static proto int EnScript::SetVar ( out void var,
string value )
staticprivate

Sets variable value by value in string.

Parameters
[out]var
value
Returns
int
???

◆ ShuffleArray()

void array< Class T >::ShuffleArray ( )
inlineprivate

Definition at line 629 of file EnScript.c.

630 {
631 for (int i = 0; i < Count(); i++)
633 }
void SwapItems(int item1_index, int item2_index)
Definition EnScript.c:557

References Count.

◆ Sort() [1/2]

proto native void array< Class T >::Sort ( bool reverse = false)
private

Sorts elements of array, depends on underlaying type.

◆ Sort() [2/2]

proto void Sort ( void param_array[],
int num )

Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)

Parameters
param_arrayarray Array to sort
numint How many items will be sorted in array
Returns
void
string arrStr[3] = {"Dog", "Car", "Apple"};
for ( int x = 0; x < 3; x++ )
{
Print( arrStr[x] );
}
>> 'Car'
>> 'Dog'
>> 'Apple'
Icon x
proto void Sort(void param_array[], int num)
Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)

Referenced by ActionConstructor::ConstructActions(), and EmoteConstructor::ConstructEmotes().

◆ StaticGetType()

static Class::StaticGetType ( typename t )
inlinestaticprivate

Returns typename of class even without a variable or instance.

Returns
typename class-type
static StaticGetType(typename t)
Returns typename of class even without a variable or instance.
Definition EnScript.c:73

Definition at line 73 of file EnScript.c.

74 {
75 return t;
76 }

◆ StaticType()

proto static external Class::StaticType ( )
staticprivate

Returns typename of object's reference.

Returns
typename class-type
Print(e.StaticType());
>> 'EntityAI'

◆ String()

string String ( string s)

Helper for passing string expression to functions with void parameter. Example: Print(String("Hello " + var));.

Definition at line 338 of file EnScript.c.

339{
340 return s;
341}

Referenced by ScriptConsoleEnfScriptTab::Add(), ScriptConsoleOutputTab::Add(), Hud::DisplayNotifier(), Hud::DisplayTendencyNormal(), Hud::DisplayTendencyTemp(), Hud::InitBadgesAndNotifiers(), ScriptedWidgetEventHandler::Remove(), and ScriptedWidgetEventHandler::Show().

◆ Swap() [1/2]

proto native void array< Class T >::Swap ( notnull array< T > other)
private

Swaps the contents of this and other arrays. Does not involve copying of the elements.

◆ Swap() [2/2]

proto native void set< Class T >::Swap ( set< T > other)
private

◆ SwapItems()

void array< Class T >::SwapItems ( int item1_index,
int item2_index )
inlineprivate

Definition at line 557 of file EnScript.c.

558 {
562 }

References Get().

◆ ThreadFunction()

proto owned string ThreadFunction ( Class owner,
string name,
int backtrace,
out int linenumber )

Debug function. Returns current function on stack of the thread.

Parameters
ownerCan be NULL for global threads
nameName of the first function on stack
backtrace???
linenumber???
Returns
string ???
???

◆ ToString()

proto external string Class::ToString ( )
private

◆ Type()

proto native external Class::Type ( )
private

Returns typename of object's class.

Returns
typename class-type
Man player = g_Game.GetPlayer();
typename type = player.Type();
Print(type.ToString());
>> 'Man'

◆ Watch()

static proto void EnScript::Watch ( void var,
int flags )
staticprivate

Debug tool for watching certain variable. Invokes debugger whenever is variable used.

Parameters
varCertain variable for watching
flags= 1 means it will break even when not modified
Returns
void

◆ ~EnScript()

void EnScript::~EnScript ( )
inlineprivate

Definition at line 169 of file EnScript.c.

169{}

◆ ~ScriptModule()

void ScriptModule::~ScriptModule ( )
private