Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс Entity

Защищенные члены

void EntityAI ()
 
void ~EntityAI ()
 
void DeferredInit ()
 
bool IsInitialized ()
 
int GetHideIconMask ()
 should the item's icon be hidden in any part of the inventory?
 
float ConvertNonlethalDamage (float damage, DamageType damageType)
 
float ConvertNonlethalDamage (float damage)
 DEPRECATED - for legacy purposes.
 
DamageZoneMap GetEntityDamageZoneMap ()
 
map< int, stringGetEntityDamageDisplayNameMap ()
 
bool CanDisplayWeight ()
 'displayWeight' in item config
 
void Log (string msg, string fnc_name="n/a")
 Log.
 
void LogWarning (string msg, string fnc_name="n/a")
 LogWarning.
 
void LogError (string msg, string fnc_name="n/a")
 LogError.
 
bool HasFlammableMaterial ()
 Override this method to return TRUE when this item has or can provide fire. Evaluated on server and client.
 
bool CanBeIgnitedBy (EntityAI igniter=NULL)
 Override this method so it checks whenever this item can be ignited right now or not. Evaluated on Server and Client.
 
bool CanIgniteItem (EntityAI ignite_target=NULL)
 Override this method and check if the given item can be ignited right now by this one. Evaluated on Server and Client.
 
bool IsIgnited ()
 Override this method and make it so it returns whenever this item is on fire right now or not. Evaluated on Server and Client.
 
bool DisassembleOnLastDetach ()
 
bool IsBasebuildingKit ()
 
bool PlacementCanBeRotated ()
 Should return false if you want to disable hologram rotation.
 
void OnIgnitedTarget (EntityAI target_item)
 Executed on Server when this item ignites some target item.
 
void OnIgnitedThis (EntityAI fire_source)
 Executed on Server when some item ignited this one.
 
void OnIgnitedTargetFailed (EntityAI target_item)
 Executed on Server when this item failed to ignite target item.
 
void OnIgnitedThisFailed (EntityAI fire_source)
 Executed on Server when some item failed to ignite this one.
 
bool IsTargetIgnitionSuccessful (EntityAI item_target)
 Final evaluation just before the target item is actually ignited. Evaluated on Server.
 
bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 Final evaluation just before this item is actually ignited from fire source. Evaluated on Server.
 
void OnPlacementStarted (Man player)
 
void OnHologramBeingPlaced (Man player)
 
void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
void OnPlacementCancelled (Man player)
 
bool CanBePlaced (Man player, vector position)
 
string CanBePlacedFailMessage (Man player, vector position)
 Method which returns message why object can't be placed at given position.
 
bool DoPlacingHeightCheck ()
 Do the roof check when placing this?
 
float HeightCheckOverride ()
 used as script-side override of distance for specific height checks
 
float HeightStartCheckOverride ()
 used as script-side override of start pos for specific height checks
 
bool IsEmpty ()
 is this container empty or not, checks both cargo and attachments
 
bool CanBeSplit ()
 
bool HasAnyCargo ()
 is this container empty or not, checks only cargo
 
array< EntityAIGetAttachmentsWithCargo ()
 
array< EntityAIGetAttachmentsWithAttachments ()
 
int GetAgents ()
 
void RemoveAgent (int agent_id)
 
void RemoveAllAgents ()
 
void RemoveAllAgentsExcept (int agent_to_keep)
 
void InsertAgent (int agent, float count=1)
 
override bool IsEntityAI ()
 
bool IsInventoryVisible ()
 
bool IsPlayer ()
 
bool IsAnimal ()
 
bool IsZombie ()
 
bool IsZombieMilitary ()
 
bool IsIgnoredByConstruction ()
 
bool CanBeTargetedByAI (EntityAI ai)
 
bool CanBeBackstabbed ()
 
override void Delete ()
 Delete this object in next frame.
 
void DeleteOnClient ()
 
void DeleteSafe ()
 
void DeleteSave ()
 
bool IsSetForDeletion ()
 
override bool CanBeActionTarget ()
 
void SetPrepareToDelete ()
 
bool IsPreparedToDelete ()
 
void CheckForDestroy ()
 
bool IsPrepareToDelete ()
 
bool TryDelete ()
 
void OnBeforeTryDelete ()
 
proto native EntityAI GetHierarchyRoot ()
 Returns root of current hierarchy (for example: if this entity is in Backpack on gnd, returns Backpack)
 
proto native Man GetHierarchyRootPlayer ()
 Returns root of current hierarchy cast to Man.
 
proto native EntityAI GetHierarchyParent ()
 Returns direct parent of current entity.
 
proto native CEItemProfile GetEconomyProfile ()
 Get economy item profile (if assigned, otherwise null)
 
int GetHierarchyLevel (int lvl=0)
 
void OnInventoryInit ()
 
void EEInit ()
 Called upon object creation.
 
void EEDelete (EntityAI parent)
 Called right before object deleting.
 
override void OnExplosionEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
 
void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
void OnItemAttachmentSlotChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
void EEParentedTo (EntityAI parent)
 Called from 'IEntity.AddChild'.
 
void EEParentedFrom (EntityAI parent)
 Called from 'IEntity.RemoveChild' or 'IEntity.AddChild' when hierarchy changes.
 
void EEInventoryIn (Man newParentMan, EntityAI diz, EntityAI newParent)
 
void EEInventoryOut (Man oldParentMan, EntityAI diz, EntityAI newParent)
 
void EEAmmoChanged ()
 
void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
void OnDamageDestroyed (int oldLevel)
 Called when the health gets to the min value, 'oldLevel' is previous health level, 'oldLevel' -1 means this entity was just spawned.
 
void AttemptDestructionBehaviour (int oldLevel, int newLevel, string zone)
 
void SetTakeable (bool pState)
 
void EEKilled (Object killer)
 called on server when the entity is killed
 
bool ReplaceOnDeath ()
 
string GetDeadItemName ()
 
bool KeepHealthOnReplace ()
 
void DeathUpdate ()
 
void OnAttachmentRuined (EntityAI attachment)
 Called when some attachment of this parent is ruined. Called on server and client side.
 
void EEHitBy (TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
 
void EEHitByRemote (int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
 
void EEItemAttached (EntityAI item, string slot_name)
 
void SwitchItemSelectionTexture (EntityAI item, string slot_name)
 
void SwitchItemSelectionTextureEx (EItemManipulationContext context, Param par=null)
 
void EEItemDetached (EntityAI item, string slot_name)
 
void EECargoIn (EntityAI item)
 
void EECargoOut (EntityAI item)
 
void EECargoMove (EntityAI item)
 
ScriptInvoker GetOnItemAttached ()
 
ScriptInvoker GetOnItemDetached ()
 
ScriptInvoker GetOnItemAddedIntoCargo ()
 
ScriptInvoker GetOnItemRemovedFromCargo ()
 
ScriptInvoker GetOnItemMovedInCargo ()
 
ScriptInvoker GetOnItemFlipped ()
 
ScriptInvoker GetOnViewIndexChanged ()
 
ScriptInvoker GetOnSetLock ()
 
ScriptInvoker GetOnReleaseLock ()
 
ScriptInvoker GetOnAttachmentSetLock ()
 
ScriptInvoker GetOnAttachmentReleaseLock ()
 
ScriptInvoker GetOnHitByInvoker ()
 
ScriptInvoker GetOnKilledInvoker ()
 
void OnMovedInsideCargo (EntityAI container)
 Called when this item enters cargo of some container.
 
void OnRemovedFromCargo (EntityAI container)
 Called when this item exits cargo of some container.
 
void OnMovedWithinCargo (EntityAI container)
 Called when this item moves within cargo of some container.
 
void EEOnAfterLoad ()
 Called when entity is part of "connected system" and being restored after load.
 
void EEOnCECreate ()
 Called when entity is being created as new by CE/ Debug.
 
void AfterStoreLoad ()
 Called when entity is being loaded from DB or Storage (after all children loaded)
 
void OnBinLoadItemsDropped ()
 Called when an item fails to get loaded into the inventory of an entity and gets dropped.
 
void HideAllSelections ()
 Sets all animation values to 1, making them INVISIBLE if they are configured in models.cfg in such way. These selections must also be defined in the entity's config class in 'AnimationSources'.
 
void ShowAllSelections ()
 Sets all animation values to 0, making them VISIBLE if they are configured in models.cfg in such way. These selections must also be defined in the entity's config class in 'AnimationSources'.
 
bool CanReceiveAttachment (EntityAI attachment, int slotId)
 calls this->CanReceiveAttachment(attachment)
 
bool CanLoadAttachment (EntityAI attachment)
 
bool CanPutAsAttachment (EntityAI parent)
 calls this->CanPutAsAttachment(parent)
 
bool CanSwitchDuringAttach (EntityAI parent)
 
bool CanReleaseAttachment (EntityAI attachment)
 calls this->CanReleaseAttachment(attachment)
 
bool CanDetachAttachment (EntityAI parent)
 calls this->CanDetachAttachment(parent)
 
bool CanBeFSwaped ()
 
bool CanCombineAttachment (notnull EntityAI e, int slot, bool stack_max_limit=false)
 
bool CanBeCombined (EntityAI other_item, bool reservation_check=true, bool stack_max_limit=false)
 
void CombineItemsClient (EntityAI entity2, bool use_stack_max=false)
 
bool CanReceiveItemIntoCargo (EntityAI item)
 calls this->CanReceiveItemIntoCargo(item)
 
bool CanLoadItemIntoCargo (EntityAI item)
 calls this->CanLoadItemIntoCargo(item), is called on server start when loading in the storage
 
bool CanPutInCargo (EntityAI parent)
 calls this->CanPutInCargo(parent)
 
bool CanSwapItemInCargo (EntityAI child_entity, EntityAI new_entity)
 calls this->CanSwapItemInCargo(child_entity, new_entity)
 
bool CanReleaseCargo (EntityAI cargo)
 calls this->CanReleaseCargo(cargo)
 
bool CanRemoveFromCargo (EntityAI parent)
 calls this->CanRemoveFromCargo(parent)
 
bool CanReceiveItemIntoHands (EntityAI item_to_hands)
 calls this->CanReceiveItemIntoHands(item_to_hands)
 
bool AreChildrenAccessible ()
 
bool IsBeingPlaced ()
 
override bool IsHologram ()
 
bool CanSaveItemInHands (EntityAI item_in_hands)
 
bool CanPutIntoHands (EntityAI parent)
 calls this->CanPutIntoHands(parent)
 
bool CanReleaseFromHands (EntityAI handheld)
 calls this->CanReleaseFromHands(handheld)
 
bool CanRemoveFromHands (EntityAI parent)
 calls this->CanRemoveFromHands(parent)
 
bool CanDisplayAttachmentSlot (string slot_name)
 
bool CanDisplayAttachmentSlot (int slot_id)
 
bool CanDisplayAnyAttachmentSlot ()
 
bool CanDisplayAttachmentCategory (string category_name)
 
bool CanDisplayCargo ()
 
bool CanAssignToQuickbar ()
 
bool CanAssignAttachmentsToQuickbar ()
 
bool IgnoreOutOfReachCondition ()
 
void OnWasAttached (EntityAI parent, int slot_id)
 
void OnWasDetached (EntityAI parent, int slot_id)
 
void OnCargoChanged ()
 
bool IsTakeable ()
 
proto native GameInventory GetInventory ()
 
proto native void CreateAndInitInventory ()
 
proto native void DestroyInventory ()
 
int GetSlotsCountCorrect ()
 
EntityAI FindAttachmentBySlotName (string slot_name)
 
bool IsLockedInSlot ()
 
bool PredictiveTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 Put item anywhere into this entity (as attachment or into cargo, recursively)
 
bool LocalTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 
bool ServerTakeEntityToInventory (FindInventoryLocationType flags, notnull EntityAI item)
 
bool PredictiveTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool LocalTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool ServerTakeEntityToTargetInventory (notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
 
bool PredictiveTakeEntityToCargo (notnull EntityAI item)
 Put item into into cargo.
 
bool LocalTakeEntityToCargo (notnull EntityAI item)
 
bool ServerTakeEntityToCargo (notnull EntityAI item)
 
bool PredictiveTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
bool LocalTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
bool ServerTakeEntityToTargetCargo (notnull EntityAI target, notnull EntityAI item)
 
bool PredictiveTakeEntityToCargoEx (notnull EntityAI item, int idx, int row, int col)
 Put item into into cargo on specific cargo location.
 
bool LocalTakeEntityToCargoEx (notnull EntityAI item, int idx, int row, int col)
 
bool PredictiveTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
bool LocalTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
bool ServerTakeEntityToTargetCargoEx (notnull CargoBase cargo, notnull EntityAI item, int row, int col)
 
bool PredictiveTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 Returns if item can be added as attachment on specific slot. Note that slot index IS NOT slot ID! Slot ID is defined in DZ/data/config.cpp.
 
bool LocalTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 
bool ServerTakeEntityAsAttachmentEx (notnull EntityAI item, int slot)
 
bool PredictiveTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
bool LocalTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
bool ServerTakeEntityToTargetAttachmentEx (notnull EntityAI target, notnull EntityAI item, int slot)
 
bool PredictiveTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
bool LocalTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
bool ServerTakeEntityToTargetAttachment (notnull EntityAI target, notnull EntityAI item)
 
bool PredictiveTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
bool LocalTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
bool ServerTakeToDst (notnull InventoryLocation src, notnull InventoryLocation dst)
 
bool PredictiveTakeEntityAsAttachment (notnull EntityAI item)
 Put item into as attachment.
 
bool LocalTakeEntityAsAttachment (notnull EntityAI item)
 
bool ServerTakeEntityAsAttachment (notnull EntityAI item)
 
bool PredictiveDropEntity (notnull EntityAI item)
 
bool LocalDropEntity (notnull EntityAI item)
 
bool ServerDropEntity (notnull EntityAI item)
 
EntityAI GetAttachmentByType (typename type)
 Get attached entity by type.
 
EntityAI GetAttachmentByConfigTypeName (string type)
 Get attached entity by config type name.
 
bool CanDropEntity (notnull EntityAI item)
 Returns if item can be dropped out from this entity.
 
EntityAI SpawnInInventoryOrGroundPos (string object_name, GameInventory inv, vector pos)
 
EntityAI SpawnEntityOnGroundPos (string object_name, vector pos)
 
EntityAI SpawnEntityOnGround (string object_name, vector mat[4])
 
bool CanSwapEntities (EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
 
void SetWet (float value, bool allow_client=false)
 
void AddWet (float value)
 
void SetWetMax ()
 
float GetWet ()
 
float GetWetMax ()
 
float GetWetMin ()
 
float GetWetInit ()
 
bool HasWetness ()
 
void OnWetChanged (float newVal, float oldVal)
 
void OnWetLevelChanged (EWetnessLevel newLevel, EWetnessLevel oldLevel)
 
EWetnessLevel GetWetLevel ()
 
float GetQuantity ()
 
int GetQuantityMax ()
 
void SetQuantityToMinimum ()
 
int GetTargetQuantityMax (int attSlotID=-1)
 
int GetQuickBarBonus ()
 
void SetTemperature (float value, bool allow_client=false)
 
void AddTemperature (float value)
 
void SetTemperatureMax ()
 
float GetTemperature ()
 
float GetTemperatureInit ()
 
float GetTemperatureMin ()
 
float GetTemperatureMax ()
 
HiddenSelectionsData GetHiddenSelectionsData ()
 
int GetHiddenSelectionIndex (string selection)
 Returns index of the string found in cfg array 'hiddenSelections'. If it's not found then it returns -1.
 
override TStringArray GetHiddenSelections ()
 Returns the hiddenSelectionsTextures array from the object's config.
 
override TStringArray GetHiddenSelectionsTextures ()
 Returns the hiddenSelectionsTextures array from the object's config.
 
override TStringArray GetHiddenSelectionsMaterials ()
 Returns the hiddenSelectionsMaterials array from the object's config.
 
proto native void PlaceOnSurfaceRotated (out vector trans[4], vector pos, float dx=0, float dz=0, float fAngle=0, bool align=false)
 
proto native void RegisterNetSyncVariableBool (string variableName)
 registers bool variable synchronized over network
 
proto native void RegisterNetSyncVariableBoolSignal (string variableName)
 when bool variable is true, it's sent to clients and become false again
 
proto native void RegisterNetSyncVariableInt (string variableName, int minValue=0, int maxValue=0)
 registers int variable synchronized over network
 
proto native void RegisterNetSyncVariableFloat (string variableName, float minValue=0, float maxValue=0, int precision=1)
 registers float variable synchronized over network
 
proto native void RegisterNetSyncVariableObject (string variableName)
 registers object variable synchronized over network, only synchronizes if network id is assigned. Doesn't handle object despawn on client
 
proto native void UpdateNetSyncVariableInt (string variableName, float minValue=0, float maxValue=0)
 
proto native void UpdateNetSyncVariableFloat (string variableName, float minValue=0, float maxValue=0, int precision=1)
 
proto native void SwitchLight (bool isOn)
 
proto native void SetSimpleHiddenSelectionState (int index, bool state)
 Simple hidden selection state; 0 == hidden.
 
proto native bool IsSimpleHiddenSelectionVisible (int index)
 
proto native void SetObjectTexture (int index, string texture_name)
 Change texture in hiddenSelections.
 
proto native owned string GetObjectTexture (int index)
 
proto native void SetObjectMaterial (int index, string mat_name)
 Change material in hiddenSelections.
 
proto native owned string GetObjectMaterial (int index)
 
proto native bool IsPilotLight ()
 
proto native void SetPilotLight (bool isOn)
 
void OnStoreSave (ParamsWriteContext ctx)
 Engine calls this function to collect data from entity to store for persistence (on server side).
 
bool OnStoreLoad (ParamsReadContext ctx, int version)
 Called when data is loaded from persistence (on server side).
 
proto native void SetSynchDirty ()
 Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take effect only in MP on server side)
 
void OnVariablesSynchronized ()
 Called on clients after receiving synchronization data from server.
 
proto native void SetAITargetCallbacks (AbstractAITargetCallbacks callbacks)
 
override void EOnFrame (IEntity other, float timeSlice)
 
string GetDebugText ()
 
void GetDebugButtonNames (out string button1, out string button2, out string button3, out string button4)
 
void OnDebugButtonPressClient (int button_index)
 
void OnDebugButtonPressServer (int button_index)
 
Shape DebugBBoxDraw ()
 
void DebugBBoxSetColor (int color)
 
void DebugBBoxDelete ()
 
Shape DebugDirectionDraw (float distance=1)
 
void DebugDirectionSetColor (int color)
 
void DebugDirectionDelete ()
 
void HideSelection (string selection_name)
 Hides selection of the given name. Must be configed in config.cpp and models.cfg.
 
void ShowSelection (string selection_name)
 Shows selection of the given name. Must be configed in config.hpp and models.cfg.
 
proto void GetPersistentID (out int b1, out int b2, out int b3, out int b4)
 
proto native void SetLifetime (float fLifeTime)
 Set (override) remaining economy lifetime (seconds)
 
proto native float GetLifetime ()
 Get remaining economy lifetime (seconds)
 
proto native void IncreaseLifetime ()
 Reset economy lifetime to default (seconds)
 
proto native void SetLifetimeMax (float fLifeTime)
 Set (override) max economy lifetime per entity instance (seconds)
 
proto native float GetLifetimeMax ()
 Get max economy lifetime per instance - default is from DB (seconds)
 
void IncreaseLifetimeUp ()
 Reset economy lifetime to default across entity hierarchy all the way to the topmost entity.
 
ComponentBodyStaging GetCompBS ()
 Use this to access Body Staging component on dead character. Returns NULL if the given object lacks such component.
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 
float GetWetWeightModifier ()
 
float GetConfigWeightModified ()
 
int GetWeight ()
 
void ClearWeightDirty ()
 
void SetWeightDirty ()
 
float GetInventoryAndCargoWeight (bool forceRecalc=false)
 
float GetWeightSpecialized (bool forceRecalc=false)
 returns weight of the entity in a way that's specific to the entity type and is internal to the weight system calculation, to obtain entity's weight, use the 'GetWeightEx' method instead
 
float GetWeightEx (bool forceRecalc=false)
 returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging, using it in gameplay code is higly inadvisable as it bypasses the weight caching and has adverse effect on performance
 
void UpdateWeight (WeightUpdateType updateType=WeightUpdateType.FULL, float weightAdjustment=0)
 
float GetSingleInventoryItemWeightEx ()
 
void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
string GetHitComponentForAI ()
 Returns hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected, DayZAnimal, etc.)
 
string GetDefaultHitComponent ()
 returns default hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected, DayZAnimal, etc.)
 
string GetDefaultHitPositionComponent ()
 returns default hit position component name for the Entity (overriden by type if needed - used mainly as support for impact particles)
 
array< stringGetSuitableFinisherHitComponents ()
 
vector GetDefaultHitPosition ()
 
int GetMeleeTargetType ()
 value is related to EMeleeTargetType
 
string GetAttachmentSoundType ()
 returns sound type of attachment (used for clothing and weapons on DayZPlayerImplement, paired with Anim*Type enum from DayZAnimEvents)
 
bool IsHeavyBehaviour ()
 returns item behaviour of item (more in ItemBase)
 
bool IsOneHandedBehaviour ()
 returns item behaviour of item (more in ItemBase)
 
bool IsTwoHandedBehaviour ()
 returns item behaviour of item (more in ItemBase)
 
string ChangeIntoOnAttach (string slot)
 
string ChangeIntoOnDetach ()
 
void OnCEUpdate ()
 Central economy calls this function whenever going over all the entities.
 
void OnDebugSpawnEx (DebugSpawnParams params)
 
void OnDebugSpawn ()
 
override EntityAI ProcessMeleeItemDamage (int mode=0)
 
float GetLiquidThroughputCoef ()
 Returns liquid throughput coeficient.
 
string GetInvulnerabilityTypeString ()
 
void ProcessInvulnerabilityCheck (string servercfg_param)
 
void SetBayonetAttached (bool pState, int slot_idx=-1)
 
bool HasBayonetAttached ()
 
int GetBayonetAttachmentIdx ()
 
void SetButtstockAttached (bool pState, int slot_idx=-1)
 
bool HasButtstockAttached ()
 
int GetButtstockAttachmentIdx ()
 
void SetInvisibleRecursive (bool invisible, EntityAI parent=null, array< int > attachments=null)
 
void SoundHardTreeFallingPlay ()
 
void SoundSoftTreeFallingPlay ()
 
void SoundHardBushFallingPlay ()
 
void SoundSoftBushFallingPlay ()
 
void RegisterTransportHit (Transport transport)
 
bool GetInventoryHandAnimation (notnull InventoryLocation loc, out int value)
 
bool TranslateSlotFromSelection (string selection_name, out int slot_id)
 
bool IsUniversalTemperatureSource ()
 Universal Temperature Sources Helpers.
 
UTemperatureSource GetUniversalTemperatureSource ()
 
void SetUniversalTemperatureSource (UTemperatureSource uts)
 
vector GetUniversalTemperatureSourcePosition ()
 
RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour ()
 Remotely controlled devices helpers.
 
void PairRemote (notnull EntityAI trigger)
 
void UnpairRemote ()
 
EntityAI GetPairDevice ()
 
void SetPersistentPairID (int id)
 
bool HasTurnableValveBehavior ()
 Turnable Valve behaviour.
 
bool IsValveTurnable (int pValveIndex)
 
int GetTurnableValveIndex (int pComponentIndex)
 
void ExecuteActionsConnectedToValve (int pValveIndex)
 
set< intGetAttachmentExclusionInitSlotValue (int slotId)
 override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGlobal' value for simple items
 
void InitLegacyConfigExclusionValues ()
 
bool InitLegacyExclusionCheck ()
 
void InitLegacySlotExclusionValuesImplicit ()
 adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)
 
void InitLegacySlotExclusionValuesDerived ()
 
void InitGlobalExclusionValues ()
 override to init part of the mask, independent of slot-specific behavior
 
void AddSingleExclusionValueGlobal (EAttExclusions value)
 to help with item staging exclusions
 
void ClearSingleExclusionValueGlobal (EAttExclusions value)
 to help with item staging exclusions
 
void SetAttachmentExclusionMaskGlobal (set< int > values)
 
void SetAttachmentExclusionMaskSlot (int slotId, set< int > values)
 sets values for specific slot
 
bool IsExclusionFlagPresent (set< int > values)
 checks 'this' if the incoming flag is present for the current state (slot behavior and others)
 
bool IsExclusionFlagPresentRecursive (set< int > values, int targetSlot)
 Gets flag from what is effectively an owner.
 
bool CheckExclusionAccessCondition (int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
 
void AdjustExclusionAccessCondition (int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
 if we want to filter
 
bool CheckExclusionAccessPropagation (int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
 special propagation contition
 
void AdjustExclusionAccessPropagation (int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
 if we want to filter propagation specifically; DO NOT override unless you know what you are doing.
 
bool IsManagingArrows ()
 
ArrowManagerBase GetArrowManager ()
 
void SetFromProjectile (ProjectileStoppedInfo info)
 
void ClearInventory ()
 
bool IsSkinned ()
 Skinning.
 
void SetAsSkinned ()
 
bool CanBeSkinnedWith (EntityAI tool)
 
ComponentEnergyManager GetCompEM ()
 
bool HasEnergyManager ()
 If this item has class EnergyManager in its config then it returns true. Otherwise returns false.
 
void OnWorkStart ()
 Energy manager event: Called only once when this device starts doing its work.
 
void OnWork (float consumed_energy)
 Energy manager event: Called every device update if its supposed to do some work. The update can be every second or at random, depending on its manipulation.
 
void OnWorkStop ()
 Energy manager event: Called when the device stops working (was switched OFF or ran out of energy)
 
void OnSwitchOn ()
 Energy manager event: Called when the device is switched on.
 
void OnSwitchOff ()
 Energy manager event: Called when the device is switched OFF.
 
void OnIsPlugged (EntityAI source_device)
 Energy manager event: Called when this device is plugged into some energy source.
 
void OnIsUnplugged (EntityAI last_energy_source)
 Energy manager event: Called when this device is UNPLUGGED from the energy source.
 
void OnOwnSocketTaken (EntityAI device)
 Energy manager event: When something is plugged into this device.
 
void OnOwnSocketReleased (EntityAI device)
 Energy manager event: When something is UNPLUGGED from this device.
 
void OnInitEnergy ()
 Energy manager event: Object's initialization. Energy Manager is fully initialized by this point.
 
void OnEnergyConsumed ()
 Energy manager event: Called when energy was consumed on this device. ALWAYS CALL super.OnEnergyConsumed() !!!
 
void OnEnergyAdded ()
 Energy manager event: Called when energy was added on this device. ALWAYS CALL super.OnEnergyAdded() !!!
 

Защищенные статические члены

static EWetnessLevel GetWetLevelInternal (float wetness)
 

Защищенные данные

ref DamageZoneMap m_DamageZoneMap
 
bool m_CanDisplayWeight
 
float m_ElapsedSinceLastUpdate
 
UTemperatureSource m_UniversalTemperatureSource
 
bool m_PendingDelete = false
 
bool m_Initialized = false
 
bool m_TransportHitRegistered = false
 
vector m_TransportHitVelocity
 
ref ScriptInvoker m_OnItemAttached
 
ref ScriptInvoker m_OnItemDetached
 
ref ScriptInvoker m_OnItemAddedIntoCargo
 
ref ScriptInvoker m_OnItemRemovedFromCargo
 
ref ScriptInvoker m_OnItemMovedInCargo
 
ref ScriptInvoker m_OnItemFlipped
 
ref ScriptInvoker m_OnViewIndexChanged
 
ref ScriptInvoker m_OnSetLock
 
ref ScriptInvoker m_OnReleaseLock
 
ref ScriptInvoker m_OnAttachmentSetLock
 
ref ScriptInvoker m_OnAttachmentReleaseLock
 
ref ScriptInvoker m_OnHitByInvoker
 
ref ScriptInvoker m_OnKilledInvoker
 

Закрытые члены

proto native void SetNearPlane (float nearPlane)
 
proto native float GetNearPlane ()
 
proto native void SetActive (bool active)
 Sets this camera as active.
 
proto native bool IsActive ()
 Is this camera active?
 
proto native void SetFOV (float fov)
 Field of View settings.
 
proto native void SetFocus (float distance, float blur)
 Depth of Field settings.
 
proto native void LookAt (vector targetPos)
 Orientation change by lookAt point.
 
Component CreateComponent (int comp_type, string extended_class_name="")
 CreateComponent.
 
Component GetComponent (int comp_type, string extended_class_name="")
 GetComponent.
 
bool DeleteComponent (int comp_type)
 DeleteComponent.
 
string GetDestructionBehaviour ()
 
bool IsDestructionBehaviour ()
 
bool HasComponent (int comp_type)
 IsComponentExist.
 
void MaxLifetimeRefreshCalc ()
 Calculates if the max lifetime is higher than refresher frequency (i.e. gets kept alive by refresher)
 
bool IsRefresherSignalingViable ()
 
void InitDamageZoneMapping ()
 Initializes script-side map of damage zones and their components (named selections in models)
 
void InitDamageZoneDisplayNameMapping ()
 Initialize map of damage zone display names for more optimized retrieval.
 
void InitAttachmentExclusionValues ()
 
void InitInherentSlotExclusionMap ()
 map stored on instance to better respond to various state changes
 
void PropagateExclusionValueRecursive (set< int > values, int slotId)
 
void ClearExclusionValueRecursive (set< int > values, int slotId)
 
set< intGetAttachmentExclusionMaskAll (int slotId)
 Slot-specific, children (attachments), and additional (state etc.) masks combined.
 
set< intGetAttachmentExclusionMaskSlot (int slotId)
 Specific slot behavior.
 
set< intGetAttachmentExclusionMaskGlobal ()
 Global mask value, independent of slot-specific behavior!
 
set< intGetAttachmentExclusionMaskChildren ()
 Mask value coming from the item's attachments.
 
bool HasInternalExclusionConflicts (int targetSlot)
 checks if any attachment or item state would interfere with this being attached into a different slot (Headgear -> Mask)
 
proto native void SetLightType (int pType)
 
proto native int GetLightType ()
 
proto native void SetEnabled (bool pState)
 
proto native bool IsEnabled ()
 
proto native void SetCastShadow (bool pState)
 
proto native bool GetCastShadow ()
 
proto native bool EnableSpecular (bool pState)
 
proto native bool EnableLinear (bool pState)
 
proto native void SetPulseCoef (float pState)
 
proto native void SetVisibleDuringDaylight (bool pState)
 
proto native bool IsVisibleDuringDaylight ()
 
proto native void SetRadius (float pValue)
 
proto native float GetRadius ()
 
proto native void EnableHeatHaze (bool pState)
 
proto native void SetHeatHazeRadius (float pValue)
 
proto native float GetHeatHazeRadius ()
 
proto native void SetHeatHazePower (float pValue)
 
proto native float GetHeatHazePower ()
 
proto native void SetDiffuseColor (float pRed, float pGreen, float pBlue)
 
proto native void SetDiffuseColorV (vector pColorVector)
 
proto native void SetDiffuseAlpha (float pAlpha)
 
proto native vector GetDiffuseColorV ()
 
proto native float GetDiffuseAlpha ()
 
proto native void SetAmbientColor (float pRed, float pGreen, float pBlue)
 
proto native void SetAmbientColorV (vector pColorVector)
 
proto native void SetAmbientAlpha (float pAlpha)
 
proto native vector GetAmbientColorV ()
 
proto native float GetAmbientAlpha ()
 
proto native void SetBrightness (float pValue)
 
proto native float GetBrightness ()
 
proto native void SetFlareVisible (bool pState)
 
proto native bool IsFlareVisible ()
 
proto native void SetFlareRelPosition (vector pPosition)
 
proto native vector GetFlareRelPosition ()
 
proto native void SetSpotLightAngle (float pValue)
 
proto native float GetSpotLightAngle ()
 
proto native float GetSoundLength ()
 

Закрытые статические члены

static proto native Camera GetCurrentCamera ()
 Returns active Camera instance (note: player's camera is not Camera instance - thus it return null)
 
static proto native float GetCurrentFOV ()
 Returns FOV of current camera object.
 
static proto native void InterpolateTo (Camera targetCamera, float time, int type)
 Interpolation between camera instances (current camera becomes targetCamera at the end of interpolation)
 

Закрытые данные

bool m_DeathSyncSent
 
bool m_KilledByHeadshot
 
bool m_PreparedToDelete = false
 
bool m_RefresherViable = false
 
bool m_WeightDirty = 1
 
ref map< int, ref set< int > > m_AttachmentExclusionSlotMap
 
ref set< intm_AttachmentExclusionMaskGlobal
 
ref set< intm_AttachmentExclusionMaskChildren
 
ref DestructionEffectBase m_DestructionBehaviourObj
 
ref KillerData m_KillerData
 
ref HiddenSelectionsData m_HiddenSelectionsData
 
const int DEAD_REPLACE_DELAY = 2000
 
const int DELETE_CHECK_DELAY = 100
 
ref array< EntityAIm_AttachmentsWithCargo
 
ref array< EntityAIm_AttachmentsWithAttachments
 
ref InventoryLocation m_OldLocation
 
ref map< int, stringm_DamageDisplayNameMap = new map<int, string>
 
float m_Weight
 
float m_WeightEx
 
float m_ConfigWeight = ConfigGetInt("weight")
 
float m_LastUpdatedTime
 
ref ComponentsBank m_ComponentsBank
 
ComponentEnergyManager m_EM
 
int m_ViewIndex = 0
 
void SetViewIndex (int index)
 Sets item preview index.
 
int GetViewIndex ()
 Returns item preview index !!!! IF OVERRIDING with more dynamic events call GetOnViewIndexChanged() in constructor on client !!!!
 

Подробное описание

Конструктор(ы)

◆ ~EntityAI()

void ~EntityAI ( )
inlineprotected
205 {
206
207 }

Методы

◆ AddSingleExclusionValueGlobal()

void AddSingleExclusionValueGlobal ( EAttExclusions value)
inlineprotected

to help with item staging exclusions

3503 {
3504 if (m_AttachmentExclusionMaskGlobal.Find(value) == -1)
3506 }
ref set< int > m_AttachmentExclusionMaskGlobal
Definition EntityAI.c:107
Definition EntityAI.c:95

◆ AddTemperature()

void AddTemperature ( float value)
inlineprotected
2064{};

◆ AddWet()

void AddWet ( float value)
protected

◆ AdjustExclusionAccessCondition()

void AdjustExclusionAccessCondition ( int occupiedSlot,
int testedSlot,
set< int > value,
inout set< int > adjustedValue )
inlineprotected

if we want to filter

3687 {
3689 }

◆ AdjustExclusionAccessPropagation()

void AdjustExclusionAccessPropagation ( int occupiedSlot,
int testedSlot,
set< int > value,
inout set< int > adjustedValue )
inlineprotected

if we want to filter propagation specifically; DO NOT override unless you know what you are doing.

3709 {
3711 }
void AdjustExclusionAccessCondition(int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
if we want to filter
Definition EntityAI.c:3686

◆ AfterStoreLoad()

void AfterStoreLoad ( )
inlineprotected

Called when entity is being loaded from DB or Storage (after all children loaded)

1232 {
1233 }

◆ AreChildrenAccessible()

bool AreChildrenAccessible ( )
inlineprotected
1491 {
1493 EntityAI ent = this;
1494 int attachmentDepth = 0;
1495 while (ent)
1496 {
1497 if (ent.GetInventory().GetCurrentInventoryLocation(lcn) && lcn.IsValid())
1498 {
1499 if (lcn.GetType() == InventoryLocationType.CARGO || lcn.GetType() == InventoryLocationType.PROXYCARGO)
1500 {
1501 return false;
1502 }
1503
1504 //hands treated as regular attachment here
1505 if (lcn.GetType() == InventoryLocationType.ATTACHMENT || lcn.GetType() == InventoryLocationType.HANDS)
1506 {
1508 }
1509 }
1510
1511 ent = ent.GetHierarchyParent();
1512 }
1513
1515 }
InventoryLocationType
types of Inventory Location
Definition InventoryLocation.c:4
Definition Building.c:6
Definition constants.c:615
InventoryLocation.
Definition InventoryLocation.c:28
const int INVENTORY_MAX_REACHABLE_DEPTH_ATT
Definition constants.c:912

Перекрестные ссылки GameConstants::INVENTORY_MAX_REACHABLE_DEPTH_ATT.

◆ AttemptDestructionBehaviour()

void AttemptDestructionBehaviour ( int oldLevel,
int newLevel,
string zone )
inlineprotected
902 {
904 {
906
907 if (destType)
908 {
910 {
912 }
913
915 {
916 m_DestructionBehaviourObj.OnHealthLevelChanged(this, oldLevel, newLevel, zone);
917 }
918 }
919 else
920 {
921 ErrorEx("Incorrect destruction behaviour type, make sure the class returned in 'GetDestructionBehaviour()' is a valid type inheriting from 'DestructionEffectBase'");
922 }
923 }
924 }
Definition DestructionEffectBase.c:2
ref DestructionEffectBase m_DestructionBehaviourObj
Definition EntityAI.c:110
bool IsDestructionBehaviour()
Definition EntityAI.c:254
string GetDestructionBehaviour()
Definition EntityAI.c:249
enum ShapeType ErrorEx
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...

Перекрестные ссылки ErrorEx, GetDestructionBehaviour() и IsDestructionBehaviour().

◆ CanAssignAttachmentsToQuickbar()

CanAssignAttachmentsToQuickbar ( )
inlineprotected
Возвращает
true if attached item can be assigned to quickbar safely
1632 {
1633 return true;
1634 }

◆ CanAssignToQuickbar()

CanAssignToQuickbar ( )
inlineprotected
Возвращает
true if item can be assigned to quickbar safely
1624 {
1625 return true;
1626 }

◆ CanBeActionTarget()

override bool CanBeActionTarget ( )
inlineprotected
681 {
682 if (super.CanBeActionTarget())
683 {
684 return !IsSetForDeletion();
685 }
686 else
687 {
688 return false;
689 }
690 }
bool IsSetForDeletion()
Definition EntityAI.c:675

◆ CanBeBackstabbed()

bool CanBeBackstabbed ( )
inlineprotected
630 {
631 return false;
632 }

◆ CanBeCombined()

bool CanBeCombined ( EntityAI other_item,
bool reservation_check = true,
bool stack_max_limit = false )
inlineprotected
1378 {
1379 return false;
1380 }

◆ CanBeFSwaped()

bool CanBeFSwaped ( )
inlineprotected
1365 {
1366 return true;
1367 }

◆ CanBeIgnitedBy()

bool CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprotected

Override this method so it checks whenever this item can be ignited right now or not. Evaluated on Server and Client.

434 {
435 return false;
436 }

◆ CanBePlaced()

bool CanBePlaced ( Man player,
vector position )
inlineprotected
513 {
514 return true;
515 }

◆ CanBePlacedFailMessage()

string CanBePlacedFailMessage ( Man player,
vector position )
inlineprotected

Method which returns message why object can't be placed at given position.

519 {
520 return "";
521 }

◆ CanBeSkinnedWith()

bool CanBeSkinnedWith ( EntityAI tool)
inlineprotected
417 {
418 if ( !IsSkinned() && tool )
419 if ( !IsAlive() )
420 return true;
421 return false;
422 }
bool IsSkinned()
Skinning.
Definition EntityAI.c:405

◆ CanBeSplit()

bool CanBeSplit ( )
inlineprotected
548 {
549 return false;
550 }

◆ CanBeTargetedByAI()

bool CanBeTargetedByAI ( EntityAI ai)
inlineprotected
618 {
619 if (ai && ai.IsBeingBackstabbed())
620 {
621 return false;
622 }
623
624 if ( !dBodyIsActive( this ) && !IsMan() )
625 return false;
626 return !IsDamageDestroyed();
627 }
bool IsDamageDestroyed(ActionTarget target)
Definition ActionBase.c:913
proto native bool dBodyIsActive(notnull IEntity ent)

Перекрестные ссылки dBodyIsActive(), IsDamageDestroyed() и EntityAI::IsMan().

◆ CanCombineAttachment()

bool CanCombineAttachment ( notnull EntityAI e,
int slot,
bool stack_max_limit = false )
inlineprotected
1370 {
1371 EntityAI att = GetInventory().FindAttachment(slot);
1372 if(att)
1373 return att.CanBeCombined(e, true, stack_max_limit);
1374 return false;
1375 }
proto native GameInventory GetInventory()

◆ CanDetachAttachment()

CanDetachAttachment ( EntityAI parent)
inlineprotected

calls this->CanDetachAttachment(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanDetachAttachment");
1360 {
1361 return true;
1362 }

◆ CanDisplayAnyAttachmentSlot()

CanDisplayAnyAttachmentSlot ( )
inlineprotected
Возвращает
true if any attachment slot can be shown
1588 {
1589 int count = GetInventory().GetAttachmentSlotsCount();
1590 int slotID;
1591 for (int i = 0; i < count; i++)
1592 {
1593 slotID = GetInventory().GetAttachmentSlotId(i);
1595 {
1596 return true;
1597 }
1598 }
1599
1600 return false;
1601 }
bool CanDisplayAttachmentSlot(string slot_name)
Definition EntityAI.c:1569

Перекрестные ссылки CanDisplayAttachmentSlot().

◆ CanDisplayAttachmentCategory()

CanDisplayAttachmentCategory ( string category_name)
inlineprotected
Аргументы
category_name->nameof the attachment category that will or won't be displayed
Возвращает
true if attachment icon can be displayed in UI (inventory)
1608 {
1609 return true;
1610 }

◆ CanDisplayAttachmentSlot() [1/2]

bool CanDisplayAttachmentSlot ( int slot_id)
inlineprotected
1580 {
1582 }
provides access to slot configuration
Definition InventorySlots.c:6
static proto native bool GetShowForSlotId(int slot_Id)

Перекрестные ссылки InventorySlots::GetShowForSlotId().

◆ CanDisplayAttachmentSlot() [2/2]

bool CanDisplayAttachmentSlot ( string slot_name)
inlineprotected
1570 {
1571 Debug.LogWarning("Obsolete function - use CanDisplayAttachmentSlot with slot id parameter");
1573 }
Definition Debug.c:14
static void LogWarning(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as warning message.
Definition Debug.c:356
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id

Перекрестные ссылки InventorySlots::GetShowForSlotId(), InventorySlots::GetSlotIdFromString() и Debug::LogWarning().

◆ CanDisplayCargo()

CanDisplayCargo ( )
inlineprotected
Возвращает
true if cargo can be displayed in UI (inventory)
1616 {
1617 return GetInventory().GetCargo() != null;
1618 }

◆ CanDisplayWeight()

bool CanDisplayWeight ( )
inlineprotected

'displayWeight' in item config

382 {
383 return m_CanDisplayWeight;
384 }
bool m_CanDisplayWeight
Definition EntityAI.c:128

◆ CanDropEntity()

bool CanDropEntity ( notnull EntityAI item)
inlineprotected

Returns if item can be dropped out from this entity.

1934 {
1935 return true;
1936 }

◆ CanIgniteItem()

bool CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprotected

Override this method and check if the given item can be ignited right now by this one. Evaluated on Server and Client.

440 {
441 return false;
442 }

◆ CanLoadAttachment()

bool CanLoadAttachment ( EntityAI attachment)
inlineprotected
1312 {
1313 return true;
1314 }

◆ CanLoadItemIntoCargo()

CanLoadItemIntoCargo ( EntityAI item)
inlineprotected

calls this->CanLoadItemIntoCargo(item), is called on server start when loading in the storage

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, item, "CanLoadItemIntoCargo");
1406 {
1407 return true;
1408 }

◆ CanPutAsAttachment()

CanPutAsAttachment ( EntityAI parent)
inlineprotected

calls this->CanPutAsAttachment(parent)

Аргументы
[in]parenttarget entity this is trying to attach to
Возвращает
true if action allowed
Заметки
: engine code is scriptConditionExecute(this, parent, "CanPutAsAttachment")
1324 {
1325 return !IsHologram();
1326 }
override bool IsHologram()
Definition EntityAI.c:1522

Перекрестные ссылки IsHologram().

◆ CanPutInCargo()

CanPutInCargo ( EntityAI parent)
inlineprotected

calls this->CanPutInCargo(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanPutInCargo");
1417 {
1418 return !IsHologram();
1419 }

Перекрестные ссылки IsHologram().

◆ CanPutIntoHands()

CanPutIntoHands ( EntityAI parent)
inlineprotected

calls this->CanPutIntoHands(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanPutIntoHands");
1539 {
1540 return !IsHologram();
1541 }

Перекрестные ссылки IsHologram().

◆ CanReceiveAttachment()

CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

calls this->CanReceiveAttachment(attachment)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, attachment, "CanReceiveAttachment");
1285 {
1286 //generic occupancy check
1287 EntityAI currentAtt = GetInventory().FindAttachment(slotId);
1288 bool hasInternalConflict = attachment.HasInternalExclusionConflicts(slotId);
1289 if (currentAtt) //probably a swap or same-type swap
1290 {
1291 set<int> diff = attachment.GetAttachmentExclusionMaskAll(slotId);
1292 diff.RemoveItems(currentAtt.GetAttachmentExclusionMaskAll(slotId));
1293 if (diff.Count() == 0)
1294 {
1295 return !hasInternalConflict;
1296 }
1297 else
1298 {
1300 }
1301 }
1302 return !hasInternalConflict && !IsExclusionFlagPresentRecursive(attachment.GetAttachmentExclusionMaskAll(slotId),slotId);
1303 }
bool IsExclusionFlagPresentRecursive(set< int > values, int targetSlot)
Gets flag from what is effectively an owner.
Definition EntityAI.c:3642

◆ CanReceiveItemIntoCargo()

CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected

calls this->CanReceiveItemIntoCargo(item)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, item, "CanReceiveItemIntoCargo");
1392 {
1393 if (GetInventory() && GetInventory().GetCargo())
1394 return GetInventory().GetCargo().CanReceiveItemIntoCargo(item));
1395
1396 return true;
1397 }

◆ CanReceiveItemIntoHands()

CanReceiveItemIntoHands ( EntityAI item_to_hands)
inlineprotected

calls this->CanReceiveItemIntoHands(item_to_hands)

Возвращает
true if action allowed
Заметки
: scriptConditionExecute(this, item_to_hands, "CanReceiveItemIntoHands");
1486 {
1487 return true;
1488 }

◆ CanReleaseAttachment()

CanReleaseAttachment ( EntityAI attachment)
inlineprotected

calls this->CanReleaseAttachment(attachment)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, attachment, "CanReleaseAttachment");
1340 {
1341 if( attachment && attachment.GetInventory() && GetInventory() )
1342 {
1344 attachment.GetInventory().GetCurrentInventoryLocation( il );
1345 if( il.IsValid() )
1346 {
1347 int slot = il.GetSlot();
1348 return !GetInventory().GetSlotLock( slot );
1349 }
1350 }
1351 return true;
1352 }

◆ CanReleaseCargo()

CanReleaseCargo ( EntityAI cargo)
inlineprotected

calls this->CanReleaseCargo(cargo)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, cargo, "CanReleaseCargo");
1442 {
1443 return true;
1444 }

◆ CanReleaseFromHands()

CanReleaseFromHands ( EntityAI handheld)
inlineprotected

calls this->CanReleaseFromHands(handheld)

Возвращает
true if action allowed
Заметки
: scriptConditionExecute(this, handheld, "CanReleaseFromHands");
1550 {
1551 return true;
1552 }

◆ CanRemoveFromCargo()

CanRemoveFromCargo ( EntityAI parent)
inlineprotected

calls this->CanRemoveFromCargo(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanRemoveFromCargo");
1453 {
1454 return true;
1455 }

◆ CanRemoveFromHands()

CanRemoveFromHands ( EntityAI parent)
inlineprotected

calls this->CanRemoveFromHands(parent)

Возвращает
true if action allowed
Заметки
: return scriptConditionExecute(this, parent, "CanRemoveFromHands");
1561 {
1562 return true;
1563 }

◆ CanSaveItemInHands()

bool CanSaveItemInHands ( EntityAI item_in_hands)
inlineprotected
1528 {
1529 return true;
1530 }

◆ CanSwapEntities()

bool CanSwapEntities ( EntityAI otherItem,
InventoryLocation otherDestination,
InventoryLocation destination )
inlineprotected
1975 {
1976 return true;
1977 }

◆ CanSwapItemInCargo()

CanSwapItemInCargo ( EntityAI child_entity,
EntityAI new_entity )
inlineprotected

calls this->CanSwapItemInCargo(child_entity, new_entity)

Возвращает
true if action allowed
Заметки
: return ScriptConditionExecute(GetOwner(), child_entity, "CanSwapItemInCargo", new_entity);
1428 {
1429 if (GetInventory() && GetInventory().GetCargo())
1430 return GetInventory().GetCargo().CanSwapItemInCargo(child_entity, new_entity));
1431
1432 return true;
1433 }

◆ CanSwitchDuringAttach()

bool CanSwitchDuringAttach ( EntityAI parent)
inlineprotected
1330 {
1331 return false;
1332 }

◆ ChangeIntoOnAttach()

string ChangeIntoOnAttach ( string slot)
inlineprotected
2969{}

◆ ChangeIntoOnDetach()

string ChangeIntoOnDetach ( )
inlineprotected
2970{}

◆ CheckExclusionAccessCondition()

bool CheckExclusionAccessCondition ( int occupiedSlot,
int targetSlot,
set< int > value,
inout set< int > adjustedValue )
inlineprotected
3665 {
3668
3670 {
3672 return false;
3673 }
3674
3675 if (targetException)
3676 {
3678 return false;
3679 }
3680
3682 return adjustedValue.Count() != 0;
3683 }

◆ CheckExclusionAccessPropagation()

bool CheckExclusionAccessPropagation ( int occupiedSlot,
int targetSlot,
set< int > value,
inout set< int > adjustedValue )
inlineprotected

special propagation contition

3693 {
3696
3697 if (targetException)
3698 {
3700 return false;
3701 }
3702
3704 return adjustedValue.Count() != 0;
3705 }
void AdjustExclusionAccessPropagation(int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
if we want to filter propagation specifically; DO NOT override unless you know what you are doing.
Definition EntityAI.c:3708
const int INVALID
Invalid slot (-1)
Definition InventorySlots.c:17

Перекрестные ссылки InventorySlots::INVALID.

◆ CheckForDestroy()

void CheckForDestroy ( )
inlineprotected
704 {
705 if (IsPrepareToDelete())
706 {
707 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(TryDelete, DELETE_CHECK_DELAY, false);
708 }
709 }
bool IsPrepareToDelete()
Definition EntityAI.c:711
bool TryDelete()
Definition EntityAI.c:716
const int DELETE_CHECK_DELAY
Definition EntityAI.c:116
proto native CGame GetGame()
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame() и IsPrepareToDelete().

◆ ClearExclusionValueRecursive()

void ClearExclusionValueRecursive ( set< int > values,
int slotId )
inlineprivate
3551 {
3552 if (values && values.Count() != 0)
3553 {
3556 GetInventory().GetCurrentInventoryLocation(lcn);
3558 {
3559 int count = passThis.Count();
3560 for (int i = 0; i < count; i++)
3561 {
3563 }
3564 EntityAI parent = GetHierarchyParent();
3565 if (parent)
3566 parent.ClearExclusionValueRecursive(passThis,lcn.GetSlot());
3567 }
3568 }
3569 }
ref set< int > m_AttachmentExclusionMaskChildren
Definition EntityAI.c:108
proto native EntityAI GetHierarchyParent()
Returns direct parent of current entity.
bool CheckExclusionAccessPropagation(int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
special propagation contition
Definition EntityAI.c:3692

◆ ClearInventory()

void ClearInventory ( )
protected

◆ ClearSingleExclusionValueGlobal()

void ClearSingleExclusionValueGlobal ( EAttExclusions value)
inlineprotected

to help with item staging exclusions

3510 {
3512 if (idx != -1)
3514 }

◆ ClearWeightDirty()

void ClearWeightDirty ( )
inlineprotected
2684 {
2685 //Print("ent:" + this + " - ClearWeightDirty");
2686 m_WeightDirty = 0;
2687 }
bool m_WeightDirty
Definition EntityAI.c:105

◆ CombineItemsClient()

void CombineItemsClient ( EntityAI entity2,
bool use_stack_max = false )
inlineprotected
1383 {}

◆ ConvertNonlethalDamage() [1/2]

float ConvertNonlethalDamage ( float damage)
inlineprotected

DEPRECATED - for legacy purposes.

366 {
367 return 0.0;
368 }

◆ ConvertNonlethalDamage() [2/2]

float ConvertNonlethalDamage ( float damage,
DamageType damageType )
inlineprotected
360 {
361 return 0.0;
362 }

◆ CreateAndInitInventory()

proto native void CreateAndInitInventory ( )
protected

◆ CreateComponent()

Component CreateComponent ( int comp_type,
string extended_class_name = "" )
inlineprivate

CreateComponent.

230 {
232 }
Component GetComponent(int comp_type, string extended_class_name="")
GetComponent.
Definition EntityAI.c:235

◆ DeathUpdate()

void DeathUpdate ( )
inlineprotected
957 {
959 dead_entity.SetOrientation(GetOrientation());
960 if ( KeepHealthOnReplace() )
961 dead_entity.SetHealth(GetHealth());
962 this.Delete();
963 }
vector GetOrientation()
Definition AreaDamageManager.c:306
const int ECE_OBJECT_SWAP
Definition CentralEconomy.c:38
const int RF_ORIGINAL
Definition CentralEconomy.c:63
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
override void Delete()
Delete this object in next frame.
Definition EntityAI.c:642
string GetDeadItemName()
Definition EntityAI.c:946
bool KeepHealthOnReplace()
Definition EntityAI.c:951

Перекрестные ссылки ECE_OBJECT_SWAP, GetDeadItemName(), GetGame(), GetOrientation(), GetPosition, KeepHealthOnReplace() и RF_ORIGINAL.

◆ DebugBBoxDelete()

void DebugBBoxDelete ( )
inlineprotected
2464 {
2466 }
void DebugBBoxDelete()
const int COMP_TYPE_ETITY_DEBUG
Definition Component.c:8

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugBBoxDraw()

Shape DebugBBoxDraw ( )
inlineprotected
2454 {
2456 }
Shape DebugBBoxDraw()

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugBBoxSetColor()

void DebugBBoxSetColor ( int color)
inlineprotected
2459 {
2461 }
void DebugBBoxSetColor(int color)

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugDirectionDelete()

void DebugDirectionDelete ( )
inlineprotected

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugDirectionDraw()

Shape DebugDirectionDraw ( float distance = 1)
inlineprotected
2469 {
2471 }
Shape DebugDirectionDraw(float distance=1)

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DebugDirectionSetColor()

void DebugDirectionSetColor ( int color)
inlineprotected
2474 {
2476 }
void DebugDirectionSetColor(int color)

Перекрестные ссылки COMP_TYPE_ETITY_DEBUG.

◆ DeferredInit()

void DeferredInit ( )
inlineprotected
210 {
211 m_Initialized = true;
212 }
bool m_Initialized
Definition EntityAI.c:135

Перекрестные ссылки m_Initialized.

◆ Delete()

override void Delete ( )
inlineprotected

Delete this object in next frame.

Возвращает
void
ItemBase item = GetGame().GetPlayer().CreateInInventory("GrenadeRGD5");
item.Delete();
Definition InventoryItem.c:731
643 {
644 m_PendingDelete = true;
645 super.Delete();
646 }
bool m_PendingDelete
Definition EntityAI.c:134

◆ DeleteComponent()

bool DeleteComponent ( int comp_type)
inlineprivate

DeleteComponent.

245 {
246 return m_ComponentsBank.DeleteComponent(comp_type);
247 }
ref ComponentsBank m_ComponentsBank
Definition EntityAI.c:225

◆ DeleteOnClient()

void DeleteOnClient ( )
inlineprotected
649 {
650 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(GetGame().ObjectDeleteOnClient, this);
651 }

Перекрестные ссылки CALL_CATEGORY_SYSTEM и GetGame().

◆ DeleteSafe()

void DeleteSafe ( )
inlineprotected
655 {
657 {
658 Delete();
659 }
660 else
661 {
662 if (GetGame().IsServer() && GetGame().IsMultiplayer())
663 GetHierarchyRootPlayer().JunctureDeleteItem(this);
664 else
665 GetHierarchyRootPlayer().AddItemToDelete(this);
666 }
667 }
proto native Man GetHierarchyRootPlayer()
Returns root of current hierarchy cast to Man.

Перекрестные ссылки GetGame().

◆ DeleteSave()

void DeleteSave ( )
inlineprotected
671 {
672 DeleteSafe();
673 }
void DeleteSafe()
Definition EntityAI.c:654

◆ DestroyInventory()

proto native void DestroyInventory ( )
protected

◆ DisassembleOnLastDetach()

bool DisassembleOnLastDetach ( )
inlineprotected
454 {
455 return false;
456 }

◆ DoPlacingHeightCheck()

bool DoPlacingHeightCheck ( )
inlineprotected

Do the roof check when placing this?

525 {
526 return false;
527 }

◆ EEAmmoChanged()

void EEAmmoChanged ( )
inlineprotected
875 {
877 }
void SetWeightDirty()
Definition EntityAI.c:2689

◆ EECargoIn()

void EECargoIn ( EntityAI item)
inlineprotected
1055 {
1057
1059 m_OnItemAddedIntoCargo.Invoke( item, this );
1060
1061 item.OnMovedInsideCargo(this);
1062 }
ref ScriptInvoker m_OnItemAddedIntoCargo
Definition EntityAI.c:144

◆ EECargoMove()

void EECargoMove ( EntityAI item)
inlineprotected
1075 {
1077 m_OnItemMovedInCargo.Invoke( item, this );
1078 item.OnMovedWithinCargo(this);
1079 }
ref ScriptInvoker m_OnItemMovedInCargo
Definition EntityAI.c:148

◆ EECargoOut()

void EECargoOut ( EntityAI item)
inlineprotected
1065 {
1067
1069 m_OnItemRemovedFromCargo.Invoke( item, this );
1070
1071 item.OnRemovedFromCargo(this);
1072 }
ref ScriptInvoker m_OnItemRemovedFromCargo
Definition EntityAI.c:146

◆ EEDelete()

void EEDelete ( EntityAI parent)
inlineprotected

Called right before object deleting.

798 {
799 m_PendingDelete = true;
800 GetInventory().EEDelete(parent);
801
802 if (m_EM)
804 }
void OnDeviceDestroyed()
Definition ComponentEnergyManager.c:322
ComponentEnergyManager m_EM
Definition EntityAI.c:226

Перекрестные ссылки ComponentEnergyManager::OnDeviceDestroyed().

◆ EEHealthLevelChanged()

void EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )
inlineprotected
880 {
881 // Notify potential parent that this item was ruined
882 EntityAI parent = GetHierarchyParent();
883
885 {
886 if (parent)
887 {
888 parent.OnAttachmentRuined(this);
889 }
890 if (!zone)
891 {
893 }
895 }
896 }
void AttemptDestructionBehaviour(int oldLevel, int newLevel, string zone)
Definition EntityAI.c:901
void OnDamageDestroyed(int oldLevel)
Called when the health gets to the min value, 'oldLevel' is previous health level,...
const int STATE_RUINED
Definition constants.c:760

Перекрестные ссылки OnDamageDestroyed() и GameConstants::STATE_RUINED.

◆ EEHitBy()

void EEHitBy ( TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos,
float speedCoef )
inlineprotected
972 {
975 #ifdef DEVELOPER
976 //Print("EEHitBy: " + this + "; damageResult:"+ damageResult.GetDamage("","") +"; damageType: "+ damageType +"; source: "+ source +"; component: "+ component +"; dmgZone: "+ dmgZone +"; ammo: "+ ammo +"; modelPos: "+ modelPos);
977 #endif
978 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
ref ScriptInvoker m_OnHitByInvoker
Definition EntityAI.c:162

Перекрестные ссылки component.

◆ EEHitByRemote()

void EEHitByRemote ( int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos )
inlineprotected
982 {
983
984 }

◆ EEInit()

void EEInit ( )
inlineprotected

Called upon object creation.

769 {
770 if (GetInventory())
771 {
772 GetInventory().EEInit();
775 for ( int i = 0; i < GetInventory().AttachmentCount(); i++ )
776 {
777 EntityAI attachment = GetInventory().GetAttachmentFromIndex( i );
778 if ( attachment )
779 {
780 if ( attachment.GetInventory().GetCargo() )
781 {
783 }
784
785 if ( attachment.GetInventory().GetAttachmentSlotsCount() > 0 )
786 {
788 }
789 }
790 }
791 }
792
794 }
void MaxLifetimeRefreshCalc()
Calculates if the max lifetime is higher than refresher frequency (i.e. gets kept alive by refresher)
Definition EntityAI.c:269
ref array< EntityAI > m_AttachmentsWithAttachments
Definition EntityAI.c:119
ref array< EntityAI > m_AttachmentsWithCargo
Definition EntityAI.c:118

◆ EEInventoryIn()

void EEInventoryIn ( Man newParentMan,
EntityAI diz,
EntityAI newParent )
inlineprotected
862 {
863 }

◆ EEInventoryOut()

void EEInventoryOut ( Man oldParentMan,
EntityAI diz,
EntityAI newParent )
inlineprotected
865 {
866 m_LastUpdatedTime = 0.0;
867
868 if (GetInventory() && newParent == null)
869 {
870 GetInventory().ResetFlipCargo();
871 }
872 }
float m_LastUpdatedTime
Definition EntityAI.c:129

◆ EEItemAttached()

void EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected
988 {
990 PropagateExclusionValueRecursive(item.GetAttachmentExclusionMaskAll(slotId),slotId); //Performed from parent to avoid event order issues on swap
992
993 if ( m_ComponentsBank != NULL )
994 {
995 for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
996 {
997 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
998 {
999 m_ComponentsBank.GetComponent(comp_key).Event_OnItemAttached(item, slot_name);
1000 }
1001 }
1002 }
1003
1004 // Energy Manager
1005 if ( m_EM && item.GetCompEM())
1007
1008 if ( item.GetInventory().GetCargo() )
1009 m_AttachmentsWithCargo.Insert( item );
1010
1011 if ( item.GetInventory().GetAttachmentSlotsCount() > 0 )
1013
1014 if ( m_OnItemAttached )
1015 m_OnItemAttached.Invoke( item, slot_name, this );
1016 }
void OnAttachmentAdded(EntityAI elec_device)
Definition ComponentEnergyManager.c:1416
void PropagateExclusionValueRecursive(set< int > values, int slotId)
Definition EntityAI.c:3533
ref ScriptInvoker m_OnItemAttached
Definition EntityAI.c:140
const int COMP_TYPE_COUNT
Definition Component.c:12

Перекрестные ссылки COMP_TYPE_COUNT, InventorySlots::GetSlotIdFromString() и ComponentEnergyManager::OnAttachmentAdded().

◆ EEItemDetached()

void EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected
1023 {
1025 ClearExclusionValueRecursive(item.GetAttachmentExclusionMaskAll(slotId),slotId); //Performed from parent to avoid event order issues on swap
1027
1028 if ( m_ComponentsBank != NULL )
1029 {
1030 for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
1031 {
1032 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
1033 {
1034 m_ComponentsBank.GetComponent(comp_key).Event_OnItemDetached(item, slot_name);
1035 }
1036 }
1037 }
1038
1039 // Energy Manager
1040 if (m_EM && item.GetCompEM())
1042
1043 if ( m_AttachmentsWithCargo.Find( item ) > -1 )
1044 m_AttachmentsWithCargo.RemoveItem( item );
1045
1046 if ( m_AttachmentsWithAttachments.Find( item ) > -1 )
1047 m_AttachmentsWithAttachments.RemoveItem( item );
1048
1049
1050 if ( m_OnItemDetached )
1051 m_OnItemDetached.Invoke( item, slot_name, this );
1052 }
void OnAttachmentRemoved(EntityAI elec_device)
Definition ComponentEnergyManager.c:1434
void ClearExclusionValueRecursive(set< int > values, int slotId)
Definition EntityAI.c:3550
ref ScriptInvoker m_OnItemDetached
Definition EntityAI.c:142

Перекрестные ссылки COMP_TYPE_COUNT, InventorySlots::GetSlotIdFromString() и ComponentEnergyManager::OnAttachmentRemoved().

◆ EEItemLocationChanged()

void EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected
824 {
825 EntityAI old_owner = oldLoc.GetParent();
826 EntityAI new_owner = newLoc.GetParent();
828
829 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT && newLoc.GetType() == InventoryLocationType.ATTACHMENT)
830 {
832 }
833
834 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT)
835 {
836 if (old_owner)
837 OnWasDetached(old_owner, oldLoc.GetSlot());
838 else
839 Error("EntityAI::EEItemLocationChanged - detached, but old_owner is null");
840 }
841
842 if (newLoc.GetType() == InventoryLocationType.ATTACHMENT)
843 {
844 if (new_owner)
845 OnWasAttached(newLoc.GetParent(), newLoc.GetSlot());
846 else
847 Error("EntityAI::EEItemLocationChanged - attached, but new_owner is null");
848 }
849 }
void OnWasDetached(EntityAI parent, int slot_id)
Definition EntityAI.c:1648
void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
Definition EntityAI.c:819
void OnWasAttached(EntityAI parent, int slot_id)
void OnItemAttachmentSlotChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
Definition EntityAI.c:821
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

Перекрестные ссылки Error(), OnItemAttachmentSlotChanged(), OnItemLocationChanged(), OnWasAttached() и OnWasDetached().

◆ EEKilled()

void EEKilled ( Object killer)
inlineprotected

called on server when the entity is killed

931 {
933 m_OnKilledInvoker.Invoke(this, killer);
934 //analytics
935 GetGame().GetAnalyticsServer().OnEntityKilled( killer, this );
936
937 if( ReplaceOnDeath() )
938 GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( DeathUpdate, DEAD_REPLACE_DELAY, false);
939 }
void DeathUpdate()
Definition EntityAI.c:956
bool ReplaceOnDeath()
Definition EntityAI.c:941
const int DEAD_REPLACE_DELAY
Definition EntityAI.c:115
ref ScriptInvoker m_OnKilledInvoker
Definition EntityAI.c:164

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame() и ReplaceOnDeath().

◆ EEOnAfterLoad()

void EEOnAfterLoad ( )
inlineprotected

Called when entity is part of "connected system" and being restored after load.

1194 {
1195 // ENERGY MANAGER
1196 // Restore connections between devices which were connected before server restart
1197 if ( m_EM && m_EM.GetRestorePlugState() )
1198 {
1203
1204 // get pointer to EntityAI based on this ID
1205 EntityAI potential_energy_source = GetGame().GetEntityByPersitentID(b1, b2, b3, b4); // This function is available only in this event!
1206
1207 // IMPORTANT!
1208 // Object IDs acquired here become INVALID when electric devices are transfered to another server while in plugged state (like Flashlight plugged into its attachment 9V battery)
1209 // To avoid issues, these items must be excluded from this system of restoring plug state so they don't unintentionally plug to incorrect devices through these invalid IDs.
1210 // Therefore their plug state is being restored withing the EEItemAttached() event while being excluded by the following 'if' conditions...
1211
1212 bool is_attachment = false;
1213
1216
1218 is_attachment = potential_energy_source.GetInventory().HasAttachment(this);
1219
1220 if ( potential_energy_source && potential_energy_source.GetCompEM() /*&& potential_energy_source.HasEnergyManager()*/ && !is_attachment )
1221 m_EM.PlugThisInto(potential_energy_source); // restore connection
1222 }
1223 }
int GetEnergySourceStorageIDb2()
Definition ComponentEnergyManager.c:1126
bool GetRestorePlugState()
Definition ComponentEnergyManager.c:729
int GetEnergySourceStorageIDb4()
Definition ComponentEnergyManager.c:1138
bool PlugThisInto(EntityAI energy_source, int socket_id=-1)
Energy manager: Attempts to plug this device into the energy_source. Returns true if the action was s...
Definition ComponentEnergyManager.c:735
int GetEnergySourceStorageIDb1()
Definition ComponentEnergyManager.c:1120
int GetEnergySourceStorageIDb3()
Definition ComponentEnergyManager.c:1132

Перекрестные ссылки ComponentEnergyManager::GetEnergySourceStorageIDb1(), ComponentEnergyManager::GetEnergySourceStorageIDb2(), ComponentEnergyManager::GetEnergySourceStorageIDb3(), ComponentEnergyManager::GetEnergySourceStorageIDb4(), GetGame(), ComponentEnergyManager::GetRestorePlugState() и ComponentEnergyManager::PlugThisInto().

◆ EEOnCECreate()

void EEOnCECreate ( )
inlineprotected

Called when entity is being created as new by CE/ Debug.

1227 {
1228 }

◆ EEParentedFrom()

void EEParentedFrom ( EntityAI parent)
inlineprotected

Called from 'IEntity.RemoveChild' or 'IEntity.AddChild' when hierarchy changes.

858 {
859 }

◆ EEParentedTo()

void EEParentedTo ( EntityAI parent)
inlineprotected

Called from 'IEntity.AddChild'.

853 {
854 }

◆ EnableHeatHaze()

proto native void EnableHeatHaze ( bool pState)
private

◆ EnableLinear()

proto native bool EnableLinear ( bool pState)
private

◆ EnableSpecular()

proto native bool EnableSpecular ( bool pState)
private

◆ EntityAI()

void EntityAI ( )
inlineprotected
167 {
168 // Set up the Energy Manager
169 string type = GetType();
170 string param_access_energy_sys = "CfgVehicles " + type + " EnergyManager ";
171 bool is_electic_device = GetGame().ConfigIsExisting(param_access_energy_sys);
172
173 if (is_electic_device) // TO DO: Check if this instance is a hologram (advanced placement). If Yes, then do not create Energy Manager component.
174 {
176 RegisterNetSyncVariableBool("m_EM.m_IsSwichedOn");
177 RegisterNetSyncVariableBool("m_EM.m_CanWork");
178 RegisterNetSyncVariableBool("m_EM.m_IsPlugged");
179 RegisterNetSyncVariableInt("m_EM.m_EnergySourceNetworkIDLow");
180 RegisterNetSyncVariableInt("m_EM.m_EnergySourceNetworkIDHigh");
181 RegisterNetSyncVariableFloat("m_EM.m_Energy");
182 }
183
184 // Item preview index
185 RegisterNetSyncVariableInt( "m_ViewIndex", 0, 99 );
186 // Refresher signalization
187 RegisterNetSyncVariableBool("m_RefresherViable");
188
191 m_LastUpdatedTime = 0.0;
193
194 m_CanDisplayWeight = ConfigGetBool("displayWeight");
195
198
200
201 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(DeferredInit,34);
202 }
eBleedingSourceType GetType()
Definition BleedingSource.c:63
ref HiddenSelectionsData m_HiddenSelectionsData
Definition EntityAI.c:113
proto native void RegisterNetSyncVariableFloat(string variableName, float minValue=0, float maxValue=0, int precision=1)
registers float variable synchronized over network
proto native void RegisterNetSyncVariableBool(string variableName)
registers bool variable synchronized over network
void InitDamageZoneDisplayNameMapping()
Initialize map of damage zone display names for more optimized retrieval.
Definition EntityAI.c:314
proto native void RegisterNetSyncVariableInt(string variableName, int minValue=0, int maxValue=0)
registers int variable synchronized over network
Component CreateComponent(int comp_type, string extended_class_name="")
CreateComponent.
Definition EntityAI.c:229
void DeferredInit()
Definition EntityAI.c:209
void InitDamageZoneMapping()
Initializes script-side map of damage zones and their components (named selections in models)
Definition EntityAI.c:307
float m_ElapsedSinceLastUpdate
Definition EntityAI.c:130
Definition HiddenSelectionsData.c:2
const int COMP_TYPE_ENERGY_MANAGER
Definition Component.c:9

Перекрестные ссылки CALL_CATEGORY_SYSTEM, COMP_TYPE_ENERGY_MANAGER, GetGame() и GetType().

◆ EOnFrame()

override void EOnFrame ( IEntity other,
float timeSlice )
inlineprotected
2411 {
2412 if ( m_ComponentsBank != NULL )
2413 {
2414 for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
2415 {
2416 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
2417 {
2418 m_ComponentsBank.GetComponent(comp_key).Event_OnFrame(other, timeSlice);
2419 }
2420 }
2421 }
2422 }

Перекрестные ссылки COMP_TYPE_COUNT.

◆ ExecuteActionsConnectedToValve()

void ExecuteActionsConnectedToValve ( int pValveIndex)
protected

◆ FindAttachmentBySlotName()

EntityAI FindAttachmentBySlotName ( string slot_name)
inlineprotected
1678 {
1679 if ( GetGame() )
1680 {
1683 return GetInventory().FindAttachment(slot_id);
1684 }
1685 return null;
1686 }

Перекрестные ссылки GetGame(), InventorySlots::GetSlotIdFromString() и InventorySlots::INVALID.

◆ GetAgents()

int GetAgents ( )
inlineprotected
579{ return 0; }

◆ GetAmbientAlpha()

proto native float GetAmbientAlpha ( )
private

◆ GetAmbientColorV()

proto native vector GetAmbientColorV ( )
private

◆ GetArrowManager()

ArrowManagerBase GetArrowManager ( )
inlineprotected
3719 {
3720 return null;
3721 }

◆ GetAttachmentByConfigTypeName()

EntityAI GetAttachmentByConfigTypeName ( string type)
inlineprotected

Get attached entity by config type name.

1921 {
1922 for ( int i = 0; i < GetInventory().AttachmentCount(); i++ )
1923 {
1924 EntityAI attachment = GetInventory().GetAttachmentFromIndex ( i );
1925 if ( attachment.IsKindOf ( type ) )
1926 return attachment;
1927 }
1928 return NULL;
1929 }

◆ GetAttachmentByType()

EntityAI GetAttachmentByType ( typename type )
inlineprotected

Get attached entity by type.

1907 {
1908 for ( int i = 0; i < GetInventory().AttachmentCount(); i++ )
1909 {
1910 EntityAI attachment = GetInventory().GetAttachmentFromIndex( i );
1911 if ( attachment && attachment.IsInherited( type ) )
1912 return attachment;
1913 }
1914 return NULL;
1915 }

◆ GetAttachmentExclusionInitSlotValue()

set< int > GetAttachmentExclusionInitSlotValue ( int slotId)
inlineprotected

override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGlobal' value for simple items

3316 {
3317 set<int> dflt = new set<int>;
3318 return dflt;
3319 }

◆ GetAttachmentExclusionMaskAll()

set< int > GetAttachmentExclusionMaskAll ( int slotId)
inlineprivate

Slot-specific, children (attachments), and additional (state etc.) masks combined.

3573 {
3574 set<int> values = new set<int>();
3576 if (slotValues)
3577 values.InsertSet(slotValues);
3580
3581 return values;
3582 }
set< int > GetAttachmentExclusionMaskSlot(int slotId)
Specific slot behavior.
Definition EntityAI.c:3585

◆ GetAttachmentExclusionMaskChildren()

set< int > GetAttachmentExclusionMaskChildren ( )
inlineprivate

Mask value coming from the item's attachments.

3598 {
3600 }

◆ GetAttachmentExclusionMaskGlobal()

set< int > GetAttachmentExclusionMaskGlobal ( )
inlineprivate

Global mask value, independent of slot-specific behavior!

3592 {
3594 }

◆ GetAttachmentExclusionMaskSlot()

set< int > GetAttachmentExclusionMaskSlot ( int slotId)
inlineprivate

Specific slot behavior.

3586 {
3588 }
ref map< int, ref set< int > > m_AttachmentExclusionSlotMap
Definition EntityAI.c:106

◆ GetAttachmentSoundType()

string GetAttachmentSoundType ( )
inlineprotected

returns sound type of attachment (used for clothing and weapons on DayZPlayerImplement, paired with Anim*Type enum from DayZAnimEvents)

2947 {
2948 return "None";
2949 }

◆ GetAttachmentsWithAttachments()

array< EntityAI > GetAttachmentsWithAttachments ( )
inlineprotected
575 {
577 }

◆ GetAttachmentsWithCargo()

array< EntityAI > GetAttachmentsWithCargo ( )
inlineprotected
570 {
572 }

◆ GetBayonetAttachmentIdx()

int GetBayonetAttachmentIdx ( )
inlineprotected
3098{};

◆ GetBrightness()

proto native float GetBrightness ( )
private

◆ GetButtstockAttachmentIdx()

int GetButtstockAttachmentIdx ( )
inlineprotected
3102{};

◆ GetCastShadow()

proto native bool GetCastShadow ( )
private

◆ GetCompBS()

ComponentBodyStaging GetCompBS ( )
inlineprotected

Use this to access Body Staging component on dead character. Returns NULL if the given object lacks such component.

2529 {
2532 return NULL;
2533 }
Definition BodyStaging.c:10
bool HasComponent(int comp_type)
IsComponentExist.
Definition EntityAI.c:260
const int COMP_TYPE_BODY_STAGING
Definition Component.c:10

Перекрестные ссылки COMP_TYPE_BODY_STAGING.

◆ GetCompEM()

ComponentEnergyManager GetCompEM ( )
inlineprotected

energy manager ENERGY MANAGER:Documentation: Confluence >> Camping & Squatting >> Electricity >> Energy Manager functionalities Use this to access Energy Manager component on your device. Returns NULL if the given object lacks such component.

2539 {
2540 if (m_EM)
2541 return m_EM;
2542
2545 return NULL;
2546 }
Definition ComponentEnergyManager.c:19

Перекрестные ссылки COMP_TYPE_ENERGY_MANAGER.

◆ GetComponent()

Component GetComponent ( int comp_type,
string extended_class_name = "" )
inlineprivate

GetComponent.

236 {
237 if ( m_ComponentsBank == NULL )
239
240 return m_ComponentsBank.GetComponent(comp_type, extended_class_name);
241 }
Definition ComponentsBank.c:2

◆ GetConfigWeightModified()

float GetConfigWeightModified ( )
inlineprotected
2661 {
2663 }
float GetWetWeightModifier()
Definition EntityAI.c:2655
float m_ConfigWeight
Definition EntityAI.c:127

◆ GetCurrentCamera()

static proto native Camera GetCurrentCamera ( )
staticprivate

Returns active Camera instance (note: player's camera is not Camera instance - thus it return null)

Возвращает
Camera active Camera instance

◆ GetCurrentFOV()

static proto native float GetCurrentFOV ( )
staticprivate

Returns FOV of current camera object.

Возвращает
float FOV of current camera object

◆ GetDeadItemName()

string GetDeadItemName ( )
inlineprotected
947 {
948 return "";
949 }

◆ GetDebugActions()

void GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprotected
2776 {
2777 //fix entity
2778 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.FIX_ENTITY, "Fix Entity", FadeColors.LIGHT_GREY));
2779
2780 //weight
2781 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GET_TOTAL_WEIGHT, "Print Weight", FadeColors.LIGHT_GREY));
2782 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GET_TOTAL_WEIGHT_RECALC, "Print Weight Verbose", FadeColors.LIGHT_GREY));
2783 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GET_PLAYER_WEIGHT, "Print Player Weight", FadeColors.LIGHT_GREY));
2784 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GET_PLAYER_WEIGHT_RECALC, "Print Player Weight Verbose", FadeColors.LIGHT_GREY));
2785 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
const int SAT_DEBUG_ACTION
Definition constants.c:424

Перекрестные ссылки SAT_DEBUG_ACTION.

◆ GetDebugButtonNames()

void GetDebugButtonNames ( out string button1,
out string button2,
out string button3,
out string button4 )
inlineprotected
2448{}//DEPRICATED, USE GetDebugActions / OnAction

◆ GetDebugText()

string GetDebugText ( )
inlineprotected
2425 {
2426 string text = string.Empty;
2427
2428 text += "Weight: " + GetWeightEx() + "\n";
2429 text += "Disabled: " + GetIsSimulationDisabled() + "\n";
2430 #ifdef SERVER
2431 if (GetEconomyProfile())
2432 text += "CE Lifetime default: " + (int)GetEconomyProfile().GetLifetime() + "\n";
2433 text += "CE Lifetime remaining: " + (int)GetLifetime() + "\n";
2434 #endif
2435
2437 if (compEM)
2438 {
2439 text += "Energy Source: " + Object.GetDebugName(compEM.GetEnergySource()) + "\n";
2440 text += "Switched On: " + compEM.IsSwitchedOn() + "\n";
2441 text += "Is Working: " + compEM.IsWorking() + "\n";
2442 }
2443
2444 return text;
2445 }
Param3 int
float GetWeightEx(bool forceRecalc=false)
returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging,...
Definition EntityAI.c:2745
proto native CEItemProfile GetEconomyProfile()
Get economy item profile (if assigned, otherwise null)
proto native float GetLifetime()
Get remaining economy lifetime (seconds)
ComponentEnergyManager GetCompEM()
Definition EntityAI.c:2538
Definition ObjectTyped.c:2

◆ GetDefaultHitComponent()

string GetDefaultHitComponent ( )
inlineprotected

returns default hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected, DayZAnimal, etc.)

returns Global so it is obvious you need to configure that properly on entity

2914 {
2915 Debug.LogError("EntityAI: DefaultHitComponent not set properly for that entity (" + GetType() + ")");
2917 return "";
2918 }
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:378

Перекрестные ссылки GetType() и Debug::LogError().

◆ GetDefaultHitPosition()

vector GetDefaultHitPosition ( )
inlineprotected
2934 {
2935 Debug.LogError("EntityAI: DefaultHitPosition not set for that entity (" + GetType() + ")");
2936 return vector.Zero;
2937 }
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110

Перекрестные ссылки GetType(), Debug::LogError() и vector::Zero.

◆ GetDefaultHitPositionComponent()

string GetDefaultHitPositionComponent ( )
inlineprotected

returns default hit position component name for the Entity (overriden by type if needed - used mainly as support for impact particles)

2922 {
2923 Debug.LogError("EntityAI: DefaultHitPositionComponent not set for that entity (" + GetType() + ")");
2924 return "";
2925 }

Перекрестные ссылки GetType() и Debug::LogError().

◆ GetDestructionBehaviour()

string GetDestructionBehaviour ( )
inlineprivate
250 {
251 return "";
252 }

◆ GetDiffuseAlpha()

proto native float GetDiffuseAlpha ( )
private

◆ GetDiffuseColorV()

proto native vector GetDiffuseColorV ( )
private

◆ GetEconomyProfile()

proto native CEItemProfile GetEconomyProfile ( )
protected

Get economy item profile (if assigned, otherwise null)

◆ GetEntityDamageDisplayNameMap()

map< int, string > GetEntityDamageDisplayNameMap ( )
inlineprotected
376 {
378 }
ref map< int, string > m_DamageDisplayNameMap
Definition EntityAI.c:123

◆ GetEntityDamageZoneMap()

DamageZoneMap GetEntityDamageZoneMap ( )
inlineprotected
371 {
372 return m_DamageZoneMap;
373 }
ref DamageZoneMap m_DamageZoneMap
Definition EntityAI.c:122

◆ GetFlareRelPosition()

proto native vector GetFlareRelPosition ( )
private

◆ GetHeatHazePower()

proto native float GetHeatHazePower ( )
private

◆ GetHeatHazeRadius()

proto native float GetHeatHazeRadius ( )
private

◆ GetHiddenSelectionIndex()

int GetHiddenSelectionIndex ( string selection)
inlineprotected

Returns index of the string found in cfg array 'hiddenSelections'. If it's not found then it returns -1.

2096 {
2098 return m_HiddenSelectionsData.GetHiddenSelectionIndex( selection );
2099
2100 return -1;
2101 }

◆ GetHiddenSelections()

override TStringArray GetHiddenSelections ( )
inlineprotected

Returns the hiddenSelectionsTextures array from the object's config.

2105 {
2107 return m_HiddenSelectionsData.m_HiddenSelections;
2108 else
2109 return super.GetHiddenSelections();
2110 }

◆ GetHiddenSelectionsData()

HiddenSelectionsData GetHiddenSelectionsData ( )
inlineprotected
2090 {
2092 }

◆ GetHiddenSelectionsMaterials()

override TStringArray GetHiddenSelectionsMaterials ( )
inlineprotected

Returns the hiddenSelectionsMaterials array from the object's config.

2123 {
2125 return m_HiddenSelectionsData.m_HiddenSelectionsMaterials;
2126 else
2127 return super.GetHiddenSelectionsMaterials();
2128 }

◆ GetHiddenSelectionsTextures()

override TStringArray GetHiddenSelectionsTextures ( )
inlineprotected

Returns the hiddenSelectionsTextures array from the object's config.

2114 {
2116 return m_HiddenSelectionsData.m_HiddenSelectionsTextures;
2117 else
2118 return super.GetHiddenSelectionsTextures();
2119 }

◆ GetHideIconMask()

int GetHideIconMask ( )
inlineprotected

should the item's icon be hidden in any part of the inventory?

221 {
222 return EInventoryIconVisibility.ALWAYS;
223 }

◆ GetHierarchyLevel()

int GetHierarchyLevel ( int lvl = 0)
inlineprotected
755 {
756 if (!GetHierarchyParent())
757 return lvl;
758
759 return GetHierarchyParent().GetHierarchyLevel(lvl+1);
760 }

◆ GetHierarchyParent()

proto native EntityAI GetHierarchyParent ( )
protected

Returns direct parent of current entity.

◆ GetHierarchyRoot()

proto native EntityAI GetHierarchyRoot ( )
protected

Returns root of current hierarchy (for example: if this entity is in Backpack on gnd, returns Backpack)

◆ GetHierarchyRootPlayer()

proto native Man GetHierarchyRootPlayer ( )
protected

Returns root of current hierarchy cast to Man.

◆ GetHitComponentForAI()

string GetHitComponentForAI ( )
inlineprotected

Returns hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected, DayZAnimal, etc.)

returns Global so it is obvious you need to configure that properly on entity

2906 {
2907 Debug.LogError("EntityAI: HitComponentForAI not set properly for that entity (" + GetType() + ")");
2909 return "";
2910 }

Перекрестные ссылки GetType() и Debug::LogError().

◆ GetInventory()

proto native GameInventory GetInventory ( )
protected

◆ GetInventoryAndCargoWeight()

float GetInventoryAndCargoWeight ( bool forceRecalc = false)
inlineprotected
2711 {
2712 float totalWeight;
2713 if (GetInventory())
2714 {
2715 int i = 0;
2716 int AttachmentsCount = GetInventory().AttachmentCount();
2717 if (AttachmentsCount > 0)
2718 {
2719 for (i = 0; i < AttachmentsCount; i++)
2720 {
2721 totalWeight += GetInventory().GetAttachmentFromIndex(i).GetWeightEx(forceRecalc);
2722 }
2723 }
2724
2725 CargoBase cargo = GetInventory().GetCargo();
2726 if (cargo)
2727 {
2728 int cargoCount = cargo.GetItemCount();
2729 for (i = 0; i < cargoCount; i++)
2730 {
2731 totalWeight += cargo.GetItem(i).GetWeightEx(forceRecalc);
2732 }
2733 }
2734 }
2735 return totalWeight;
2736 }
represents base for cargo storage for entities
Definition Cargo.c:7

◆ GetInventoryHandAnimation()

bool GetInventoryHandAnimation ( notnull InventoryLocation loc,
out int value )
inlineprotected
3225 {
3226 value = -1;
3227 return false;
3228 }

◆ GetInvulnerabilityTypeString()

string GetInvulnerabilityTypeString ( )
inlineprotected
3069 {
3070 return "";
3071 }

◆ GetLifetime()

proto native float GetLifetime ( )
protected

Get remaining economy lifetime (seconds)

◆ GetLifetimeMax()

proto native float GetLifetimeMax ( )
protected

Get max economy lifetime per instance - default is from DB (seconds)

◆ GetLightType()

proto native int GetLightType ( )
private

◆ GetLiquidThroughputCoef()

float GetLiquidThroughputCoef ( )
inlineprotected

Returns liquid throughput coeficient.

3064 {
3066 }
const float LIQUID_THROUGHPUT_DEFAULT
Definition constants.c:525

Перекрестные ссылки LIQUID_THROUGHPUT_DEFAULT.

◆ GetMeleeTargetType()

int GetMeleeTargetType ( )
inlineprotected

value is related to EMeleeTargetType

2941 {
2942 return EMeleeTargetType.ALIGNABLE;
2943 }
EMeleeTargetType
Definition EMeleeTargetType.c:2

◆ GetNearPlane()

proto native float GetNearPlane ( )
private

get near plane of camera

◆ GetObjectMaterial()

proto native owned string GetObjectMaterial ( int index)
protected

◆ GetObjectTexture()

proto native owned string GetObjectTexture ( int index)
protected

◆ GetOnAttachmentReleaseLock()

ScriptInvoker GetOnAttachmentReleaseLock ( )
inlineprotected
1152 {
1156 }
ref ScriptInvoker m_OnAttachmentReleaseLock
Definition EntityAI.c:160
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116

◆ GetOnAttachmentSetLock()

ScriptInvoker GetOnAttachmentSetLock ( )
inlineprotected
1145 {
1148 return m_OnAttachmentSetLock;
1149 }
ref ScriptInvoker m_OnAttachmentSetLock
Definition EntityAI.c:158

◆ GetOnHitByInvoker()

ScriptInvoker GetOnHitByInvoker ( )
inlineprotected
1159 {
1160 if ( !m_OnHitByInvoker )
1162 return m_OnHitByInvoker;
1163 }

◆ GetOnItemAddedIntoCargo()

ScriptInvoker GetOnItemAddedIntoCargo ( )
inlineprotected
1096 {
1100 }

◆ GetOnItemAttached()

ScriptInvoker GetOnItemAttached ( )
inlineprotected
1082 {
1083 if( !m_OnItemAttached )
1085 return m_OnItemAttached;
1086 }

◆ GetOnItemDetached()

ScriptInvoker GetOnItemDetached ( )
inlineprotected
1089 {
1090 if( !m_OnItemDetached )
1092 return m_OnItemDetached;
1093 }

◆ GetOnItemFlipped()

ScriptInvoker GetOnItemFlipped ( )
inlineprotected
1117 {
1118 if( !m_OnItemFlipped )
1120 return m_OnItemFlipped;
1121 }
ref ScriptInvoker m_OnItemFlipped
Definition EntityAI.c:150

◆ GetOnItemMovedInCargo()

ScriptInvoker GetOnItemMovedInCargo ( )
inlineprotected
1110 {
1113 return m_OnItemMovedInCargo;
1114 }

◆ GetOnItemRemovedFromCargo()

ScriptInvoker GetOnItemRemovedFromCargo ( )
inlineprotected

◆ GetOnKilledInvoker()

ScriptInvoker GetOnKilledInvoker ( )
inlineprotected
1166 {
1167 if ( !m_OnKilledInvoker )
1169 return m_OnKilledInvoker;
1170 }

◆ GetOnReleaseLock()

ScriptInvoker GetOnReleaseLock ( )
inlineprotected
1138 {
1139 if( !m_OnReleaseLock )
1141 return m_OnReleaseLock;
1142 }
ref ScriptInvoker m_OnReleaseLock
Definition EntityAI.c:156

◆ GetOnSetLock()

ScriptInvoker GetOnSetLock ( )
inlineprotected
1131 {
1132 if( !m_OnSetLock )
1134 return m_OnSetLock;
1135 }
ref ScriptInvoker m_OnSetLock
Definition EntityAI.c:154

◆ GetOnViewIndexChanged()

ScriptInvoker GetOnViewIndexChanged ( )
inlineprotected
1124 {
1127 return m_OnViewIndexChanged;
1128 }
ref ScriptInvoker m_OnViewIndexChanged
Definition EntityAI.c:152

◆ GetPairDevice()

EntityAI GetPairDevice ( )
protected

◆ GetPersistentID()

proto void GetPersistentID ( out int b1,
out int b2,
out int b3,
out int b4 )
protected

Returns blocks of bits of persistence id of this entity. This id stays the same even after server restart.

◆ GetQuantity()

float GetQuantity ( )
inlineprotected
2040 {
2041 return 0;
2042 }

◆ GetQuantityMax()

int GetQuantityMax ( )
inlineprotected
2045 {
2046 return 0;
2047 }

◆ GetQuickBarBonus()

int GetQuickBarBonus ( )
inlineprotected
2057 {
2058 return 0;
2059 }

◆ GetRadius()

proto native float GetRadius ( )
private

◆ GetRemotelyActivatedItemBehaviour()

RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour ( )
protected

Remotely controlled devices helpers.

◆ GetSingleInventoryItemWeightEx()

float GetSingleInventoryItemWeightEx ( )
inlineprotected
2773{}

◆ GetSlotsCountCorrect()

int GetSlotsCountCorrect ( )
inlineprotected
1670 {
1671 if (GetInventory())
1672 return GetInventory().GetAttachmentSlotsCount();
1673 else
1674 return -1;
1675 }

◆ GetSoundLength()

proto native float GetSoundLength ( )
private

◆ GetSpotLightAngle()

proto native float GetSpotLightAngle ( )
private

◆ GetSuitableFinisherHitComponents()

array< string > GetSuitableFinisherHitComponents ( )
inlineprotected
2928 {
2929 Debug.LogError("EntityAI: SuitableFinisherHitComponents not set for that entity (" + GetType() + ")");
2930 return null;
2931 }

Перекрестные ссылки GetType() и Debug::LogError().

◆ GetTargetQuantityMax()

int GetTargetQuantityMax ( int attSlotID = -1)
inlineprotected
2052 {
2053 return 0;
2054 }

◆ GetTemperature()

float GetTemperature ( )
inlineprotected
2068 {
2069 return 0;
2070 }

◆ GetTemperatureInit()

float GetTemperatureInit ( )
inlineprotected
2073 {
2074 return 0;
2075 }

◆ GetTemperatureMax()

float GetTemperatureMax ( )
inlineprotected
2083 {
2084 return 0;
2085 }

◆ GetTemperatureMin()

float GetTemperatureMin ( )
inlineprotected
2078 {
2079 return 0;
2080 }

◆ GetTurnableValveIndex()

int GetTurnableValveIndex ( int pComponentIndex)
protected

◆ GetUniversalTemperatureSource()

UTemperatureSource GetUniversalTemperatureSource ( )
inlineprotected
3242 {
3244 }
UTemperatureSource m_UniversalTemperatureSource
Definition EntityAI.c:132

◆ GetUniversalTemperatureSourcePosition()

vector GetUniversalTemperatureSourcePosition ( )
inlineprotected
3252 {
3253 return GetPosition();
3254 }

Перекрестные ссылки GetPosition.

◆ GetViewIndex()

int GetViewIndex ( )
inlineprotected

Returns item preview index !!!! IF OVERRIDING with more dynamic events call GetOnViewIndexChanged() in constructor on client !!!!

2860 {
2861 if ( MemoryPointExists( "invView2" ) )
2862 {
2863 #ifdef PLATFORM_WINDOWS
2865 GetInventory().GetCurrentInventoryLocation( il );
2866 InventoryLocationType type = il.GetType();
2867 switch ( type )
2868 {
2869 case InventoryLocationType.CARGO:
2870 {
2871 return 0;
2872 }
2873 case InventoryLocationType.ATTACHMENT:
2874 {
2875 return 1;
2876 }
2877 case InventoryLocationType.HANDS:
2878 {
2879 return 0;
2880 }
2881 case InventoryLocationType.GROUND:
2882 {
2883 return 1;
2884 }
2885 case InventoryLocationType.PROXYCARGO:
2886 {
2887 return 0;
2888 }
2889 default:
2890 {
2891 return 0;
2892 }
2893 }
2894 #endif
2895
2896 #ifdef PLATFORM_CONSOLE
2897 return 1;
2898 #endif
2899 }
2900 return 0;
2901 }

◆ GetWeight()

int GetWeight ( )
inlineprotected
2679 {
2680 return GetWeightEx();
2681 }

◆ GetWeightEx()

float GetWeightEx ( bool forceRecalc = false)
inlineprotected

returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging, using it in gameplay code is higly inadvisable as it bypasses the weight caching and has adverse effect on performance

2746 {
2747 if (m_WeightDirty || forceRecalc)//recalculate
2748 {
2751
2752 #ifdef DEVELOPER
2753 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
2754 {
2755 WeightDebug.GetWeightDebug(this).SetWeight(m_WeightEx);
2756 }
2757 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_DIRTY)
2758 {
2759 Print("ent:" + this + " - Dirty Recalc");
2760 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
2761 {
2762 DumpStack();
2763 }
2764 }
2765 #endif
2766 }
2767
2768 return m_WeightEx;
2769 }
void ClearWeightDirty()
Definition EntityAI.c:2683
float GetWeightSpecialized(bool forceRecalc=false)
returns weight of the entity in a way that's specific to the entity type and is internal to the weigh...
Definition EntityAI.c:2738
float m_WeightEx
Definition EntityAI.c:126
proto void DumpStack()
Prints current call stack (stack trace)
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки DumpStack(), GetWeightSpecialized() и Print().

◆ GetWeightSpecialized()

float GetWeightSpecialized ( bool forceRecalc = false)
inlineprotected

returns weight of the entity in a way that's specific to the entity type and is internal to the weight system calculation, to obtain entity's weight, use the 'GetWeightEx' method instead

2739 {
2741 }
float GetInventoryAndCargoWeight(bool forceRecalc=false)
Definition EntityAI.c:2710

◆ GetWet()

float GetWet ( )
inlineprotected
1986 {
1987 return 0;
1988 }

◆ GetWetInit()

float GetWetInit ( )
inlineprotected
2001 {
2002 return 0;
2003 }

◆ GetWetLevel()

EWetnessLevel GetWetLevel ( )
protected

◆ GetWetLevelInternal()

static EWetnessLevel GetWetLevelInternal ( float wetness)
inlinestaticprotected
2018 {
2020 {
2021 return EWetnessLevel.DRY;
2022 }
2023 else if (wetness < GameConstants.STATE_WET)
2024 {
2025 return EWetnessLevel.DAMP;
2026 }
2028 {
2029 return EWetnessLevel.WET;
2030 }
2032 {
2033 return EWetnessLevel.SOAKING;
2034 }
2035 return EWetnessLevel.DRENCHED;
2036 }
EWetnessLevel
Definition EntityAI.c:2
const float STATE_SOAKING_WET
Definition constants.c:785
const float STATE_WET
Definition constants.c:786
const float STATE_DRENCHED
Definition constants.c:784
const float STATE_DAMP
Definition constants.c:787

Перекрестные ссылки GameConstants::STATE_DAMP, GameConstants::STATE_DRENCHED, GameConstants::STATE_SOAKING_WET и GameConstants::STATE_WET.

◆ GetWetMax()

float GetWetMax ( )
inlineprotected
1991 {
1992 return 0;
1993 }

◆ GetWetMin()

float GetWetMin ( )
inlineprotected
1996 {
1997 return 0;
1998 }

◆ GetWetWeightModifier()

float GetWetWeightModifier ( )
inlineprotected
2656 {
2658 }
Definition CfgGameplayHandler.c:2
static array< float > GetWetnessWeightModifiers()
Definition CfgGameplayHandler.c:155
EWetnessLevel GetWetLevel()

Перекрестные ссылки GetWetLevel() и CfgGameplayHandler::GetWetnessWeightModifiers().

◆ HasAnyCargo()

bool HasAnyCargo ( )
inlineprotected

is this container empty or not, checks only cargo

554 {
555 CargoBase cargo = GetInventory().GetCargo();
556
557 if(!cargo) return false;//this is not a cargo container
558
559 if( cargo.GetItemCount() > 0 )
560 {
561 return true;
562 }
563 else
564 {
565 return false;
566 }
567 }

◆ HasBayonetAttached()

bool HasBayonetAttached ( )
inlineprotected
3097{};

◆ HasButtstockAttached()

bool HasButtstockAttached ( )
inlineprotected
3101{};

◆ HasComponent()

bool HasComponent ( int comp_type)
inlineprivate

IsComponentExist.

261 {
262 if ( m_ComponentsBank )
263 return m_ComponentsBank.IsComponentAlreadyExist(comp_type);
264
265 return false;
266 }

◆ HasEnergyManager()

bool HasEnergyManager ( )
inlineprotected

If this item has class EnergyManager in its config then it returns true. Otherwise returns false.

2550 {
2552 }

Перекрестные ссылки COMP_TYPE_ENERGY_MANAGER.

◆ HasFlammableMaterial()

bool HasFlammableMaterial ( )
inlineprotected

Override this method to return TRUE when this item has or can provide fire. Evaluated on server and client.

428 {
429 return false;
430 }

◆ HasInternalExclusionConflicts()

bool HasInternalExclusionConflicts ( int targetSlot)
inlineprivate

checks if any attachment or item state would interfere with this being attached into a different slot (Headgear -> Mask)

3604 {
3606 if (targetSlotValues) //can be null, if so, no conflict
3607 {
3608 set<int> additionalValues = new set<int>(); //NOT slot values
3611
3612 int countTarget = targetSlotValues.Count();
3613 for (int i = 0; i < countTarget; i++)
3614 {
3615 if (additionalValues.Find(targetSlotValues[i]) != -1)
3616 {
3617 return true;
3618 }
3619 }
3620 }
3621 return false;
3622 }
set< int > GetAttachmentExclusionMaskChildren()
Mask value coming from the item's attachments.
Definition EntityAI.c:3597
set< int > GetAttachmentExclusionMaskGlobal()
Global mask value, independent of slot-specific behavior!
Definition EntityAI.c:3591

◆ HasTurnableValveBehavior()

bool HasTurnableValveBehavior ( )
protected

Turnable Valve behaviour.

◆ HasWetness()

bool HasWetness ( )
inlineprotected
2006 {
2007 return GetWetMax() - GetWetMin() != 0;
2008 }
float GetWetMax()
Definition EntityAI.c:1990
float GetWetMin()
Definition EntityAI.c:1995

Перекрестные ссылки GetWetMax() и GetWetMin().

◆ HeightCheckOverride()

float HeightCheckOverride ( )
inlineprotected

used as script-side override of distance for specific height checks

531 {
532 return 0.0;
533 }

◆ HeightStartCheckOverride()

float HeightStartCheckOverride ( )
inlineprotected

used as script-side override of start pos for specific height checks

537 {
538 return 0.0;
539 }

◆ HideAllSelections()

void HideAllSelections ( )
inlineprotected

Sets all animation values to 1, making them INVISIBLE if they are configured in models.cfg in such way. These selections must also be defined in the entity's config class in 'AnimationSources'.

1244 {
1245 string cfg_path = "cfgVehicles " + GetType() + " AnimationSources";
1246
1247 if ( GetGame().ConfigIsExisting(cfg_path) )
1248 {
1249 int selections = GetGame().ConfigGetChildrenCount(cfg_path);
1250
1251 for (int i = 0; i < selections; i++)
1252 {
1253 string selection_name;
1254 GetGame().ConfigGetChildName(cfg_path, i, selection_name);
1256 }
1257 }
1258 }
void HideSelection(string selection_name)
Hides selection of the given name. Must be configed in config.cpp and models.cfg.
Definition EntityAI.c:2484

Перекрестные ссылки GetGame() и GetType().

◆ HideSelection()

void HideSelection ( string selection_name)
inlineprotected

Hides selection of the given name. Must be configed in config.cpp and models.cfg.

2485 {
2486 if ( !ToDelete() )
2487 {
2488 SetAnimationPhase ( selection_name, 1 ); // 1 = hide, 0 = unhide!
2489 }
2490 }

◆ IgnoreOutOfReachCondition()

IgnoreOutOfReachCondition ( )
inlineprotected
Возвращает
if true, attachment condition for out of reach (inventory) will be ignored
1640 {
1641 return GetHierarchyRootPlayer() == GetGame().GetPlayer();
1642 }

Перекрестные ссылки GetGame().

◆ IncreaseLifetime()

proto native void IncreaseLifetime ( )
protected

Reset economy lifetime to default (seconds)

◆ IncreaseLifetimeUp()

void IncreaseLifetimeUp ( )
inlineprotected

Reset economy lifetime to default across entity hierarchy all the way to the topmost entity.

2519 {
2521 if (GetHierarchyParent())
2522 GetHierarchyParent().IncreaseLifetimeUp();
2523 }
proto native void IncreaseLifetime()
Reset economy lifetime to default (seconds)

◆ InitAttachmentExclusionValues()

void InitAttachmentExclusionValues ( )
inlineprivate
3284 {
3288
3289 int count = GetInventory().GetSlotIdCount();
3290 //no sense in performing inits for something that cannot be attached anywhere (hand/lefthand and some other 'special' slots are the reason for creating 'new' sets above)
3291 if (count == 0)
3292 return;
3293
3297 }
void InitInherentSlotExclusionMap()
map stored on instance to better respond to various state changes
Definition EntityAI.c:3300
void InitLegacyConfigExclusionValues()
Definition EntityAI.c:3322
void InitGlobalExclusionValues()
override to init part of the mask, independent of slot-specific behavior

◆ InitDamageZoneDisplayNameMapping()

void InitDamageZoneDisplayNameMapping ( )
inlineprivate

Initialize map of damage zone display names for more optimized retrieval.

315 {
316 string path_base;
317 string path;
318 string component_name;
319
320 if ( IsWeapon() )
321 {
323 }
324 else if ( IsMagazine() )
325 {
327 }
328 else
329 {
331 }
332
333 path_base = string.Format( "%1 %2 DamageSystem DamageZones", path_base, GetType() );
334
335 if ( !GetGame().ConfigIsExisting(path_base) )
336 {
337 component_name = GetDisplayName();
338 GetGame().FormatRawConfigStringKeys(component_name);
339 m_DamageDisplayNameMap.Insert( "".Hash(), component_name );
340 }
341 else
342 {
344 GetDamageZones( zone_names );
345
346 for ( int i = 0; i < zone_names.Count(); i++ )
347 {
348 path = string.Format( "%1 %2 displayName", path_base, zone_names[i] );
349
350 if (GetGame().ConfigIsExisting(path) && GetGame().ConfigGetTextRaw(path,component_name))
351 {
352 GetGame().FormatRawConfigStringKeys(component_name);
354 }
355 }
356 }
357 }
string path
Definition OptionSelectorMultistate.c:135
array< string > TStringArray
Definition EnScript.c:685
const string CFG_VEHICLESPATH
Definition constants.c:209
const string CFG_WEAPONSPATH
Definition constants.c:210
const string CFG_MAGAZINESPATH
Definition constants.c:211
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, string::Format(), GetGame(), GetType() и path.

◆ InitDamageZoneMapping()

void InitDamageZoneMapping ( )
inlineprivate

Initializes script-side map of damage zones and their components (named selections in models)

308 {
310 DamageSystem.GetDamageZoneMap(this,m_DamageZoneMap);
311 }
map< string, ref array< string > > DamageZoneMap
Definition DamageSystem.c:157

◆ InitGlobalExclusionValues()

void InitGlobalExclusionValues ( )
protected

override to init part of the mask, independent of slot-specific behavior

◆ InitInherentSlotExclusionMap()

void InitInherentSlotExclusionMap ( )
inlineprivate

map stored on instance to better respond to various state changes

3301 {
3302 int count = GetInventory().GetSlotIdCount();
3303 //starting with the INVALID slot, so it is always in the map of attachable items
3305
3306 int slotId;
3307 for (int i = 0; i < count; i++)
3308 {
3309 slotId = GetInventory().GetSlotId(i);
3311 }
3312 }
void SetAttachmentExclusionMaskSlot(int slotId, set< int > values)
sets values for specific slot
Definition EntityAI.c:3523
set< int > GetAttachmentExclusionInitSlotValue(int slotId)
override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGloba...
Definition EntityAI.c:3315

Перекрестные ссылки InventorySlots::INVALID.

◆ InitLegacyConfigExclusionValues()

void InitLegacyConfigExclusionValues ( )
inlineprotected
3323 {
3325
3326 //adding implicit slot info AFTER the check is performed
3328
3331 }
void InitLegacySlotExclusionValuesImplicit()
adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)
Definition EntityAI.c:3362
bool InitLegacyExclusionCheck()
Definition EntityAI.c:3334
void InitLegacySlotExclusionValuesDerived()
Definition EntityAI.c:3415

◆ InitLegacyExclusionCheck()

bool InitLegacyExclusionCheck ( )
inlineprotected
3335 {
3336 //first check the globals
3337 if (m_AttachmentExclusionMaskGlobal.Count() > 0)
3338 return false;
3339
3340 //now the map
3341 int count = m_AttachmentExclusionSlotMap.Count();
3342 if (count > 1) //more than InventorySlots.INVALID
3343 {
3344 for (int i = 0; i < count; i++)
3345 {
3346 int countSet = m_AttachmentExclusionSlotMap.GetElement(i).Count();
3347 if (countSet > 0) //SOMETHING is defined
3348 {
3349 return false;
3350 }
3351 }
3352 }
3353
3354 return true;
3355 }

◆ InitLegacySlotExclusionValuesDerived()

void InitLegacySlotExclusionValuesDerived ( )
inlineprotected
3416 {
3417 int slotId;
3418 int slotCount = GetInventory().GetSlotIdCount();
3419 for (int i = 0; i < slotCount; i++)
3420 {
3421 slotId = GetInventory().GetSlotId(i);
3422 set<int> tmp;
3423 switch (slotId)
3424 {
3425 case InventorySlots.HEADGEAR:
3426 {
3427 tmp = new set<int>;
3429 if (ConfigGetBool("noNVStrap"))
3430 {
3431 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
3432 }
3433 if (ConfigGetBool("noMask"))
3434 {
3435 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
3436 }
3437 if (ConfigGetBool("noEyewear"))
3438 {
3439 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
3440 }
3442 break;
3443 }
3444
3445 case InventorySlots.MASK:
3446 {
3447 tmp = new set<int>;
3449 if (ConfigGetBool("noNVStrap"))
3450 {
3451 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
3452 }
3453 if (ConfigGetBool("noHelmet"))
3454 {
3455 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
3456 }
3457 if (ConfigGetBool("noEyewear"))
3458 {
3459 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
3460 }
3462 break;
3463 }
3464
3465 case InventorySlots.EYEWEAR:
3466 {
3467 tmp = new set<int>;
3469 if (ConfigGetBool("isStrap"))
3470 {
3471 if (ConfigGetBool("noHelmet"))
3472 {
3473 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
3474 }
3475 if (ConfigGetBool("noMask"))
3476 {
3477 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
3478 }
3479 }
3480 else
3481 {
3482 if (ConfigGetBool("noHelmet"))
3483 {
3484 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
3485 }
3486 if (ConfigGetBool("noMask"))
3487 {
3488 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
3489 }
3490 }
3492 break;
3493 }
3494 }
3495 }
3496 }

◆ InitLegacySlotExclusionValuesImplicit()

InitLegacySlotExclusionValuesImplicit ( )
inlineprotected

adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)

Заметки
: 'InitLegacyConfigExclusionValues' adds them the other way if the item does not have any script-side exclusions AND has some legacy config parameter.
3363 {
3364 int slotId;
3365 int slotCount = GetInventory().GetSlotIdCount();
3366 for (int i = 0; i < slotCount; i++)
3367 {
3368 slotId = GetInventory().GetSlotId(i);
3369 set<int> tmp;
3370 switch (slotId)
3371 {
3372 case InventorySlots.HEADGEAR:
3373 {
3374 tmp = new set<int>;
3376 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
3377 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
3378 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
3380 break;
3381 }
3382
3383 case InventorySlots.MASK:
3384 {
3385 tmp = new set<int>;
3387 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
3388 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
3389 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
3391 break;
3392 }
3393
3394 case InventorySlots.EYEWEAR:
3395 {
3396 tmp = new set<int>;
3398 if (ConfigGetBool("isStrap"))
3399 {
3400 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
3401 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
3402 }
3403 else
3404 {
3405 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
3406 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
3407 }
3409 break;
3410 }
3411 }
3412 }
3413 }

◆ InsertAgent()

void InsertAgent ( int agent,
float count = 1 )
protected

◆ InterpolateTo()

static proto native void InterpolateTo ( Camera targetCamera,
float time,
int type )
staticprivate

Interpolation between camera instances (current camera becomes targetCamera at the end of interpolation)

Аргументы
targetCamerato which camera we want to interpolate
timetrue interpolation time
type0 = without dynamics 1 = first half - acceleration, second half deceleration 2 = first third - acceleration, second third - linear movement, last third - deceleration

◆ IsActive()

proto native bool IsActive ( )
private

Is this camera active?

Возвращает
bool true if this camera is active

◆ IsAnimal()

bool IsAnimal ( )
inlineprotected
598 {
599 return false;
600 }

◆ IsBasebuildingKit()

bool IsBasebuildingKit ( )
inlineprotected
459 {
460 return false;
461 }

◆ IsBeingPlaced()

bool IsBeingPlaced ( )
inlineprotected
1518 {
1519 return false;
1520 }

◆ IsDestructionBehaviour()

bool IsDestructionBehaviour ( )
inlineprivate
255 {
256 return false;
257 }

◆ IsEmpty()

bool IsEmpty ( )
inlineprotected

is this container empty or not, checks both cargo and attachments

543 {
544 return (!HasAnyCargo() && GetInventory().AttachmentCount() == 0);
545 }
bool HasAnyCargo()
is this container empty or not, checks only cargo
Definition EntityAI.c:553

◆ IsEnabled()

proto native bool IsEnabled ( )
private

◆ IsEntityAI()

override bool IsEntityAI ( )
inlineprotected
585{ return true; }

◆ IsExclusionFlagPresent()

bool IsExclusionFlagPresent ( set< int > values)
inlineprotected

checks 'this' if the incoming flag is present for the current state (slot behavior and others)

3626 {
3627 int slotId;
3628 string slotName;
3629 GetInventory().GetCurrentAttachmentSlotInfo(slotId,slotName); //if currently attached, treat it accordingly
3630
3632 int count = values.Count();
3633 for (int i = 0; i < count; i++)
3634 {
3635 if (currentSlotValuesAll.Find(values[i]) != -1)
3636 return true;
3637 }
3638 return false;
3639 }
PlayerSpawnPreset slotName
set< int > GetAttachmentExclusionMaskAll(int slotId)
Slot-specific, children (attachments), and additional (state etc.) masks combined.
Definition EntityAI.c:3572

Перекрестные ссылки slotName.

◆ IsExclusionFlagPresentRecursive()

bool IsExclusionFlagPresentRecursive ( set< int > values,
int targetSlot )
inlineprotected

Gets flag from what is effectively an owner.

3643 {
3644 if (values && values.Count() != 0)
3645 {
3647 GetInventory().GetCurrentInventoryLocation(lcn);
3648 EntityAI parent = GetHierarchyParent();
3651 {
3652 if (parent && parent != this) //we reached root if false
3653 {
3654 return parent.IsExclusionFlagPresentRecursive(passThis,lcn.GetSlot());
3655 }
3656 }
3658 }
3659
3660 return false;
3661 }
bool IsExclusionFlagPresent(set< int > values)
checks 'this' if the incoming flag is present for the current state (slot behavior and others)
Definition EntityAI.c:3625
bool CheckExclusionAccessCondition(int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
Definition EntityAI.c:3664

◆ IsFlareVisible()

proto native bool IsFlareVisible ( )
private

◆ IsHeavyBehaviour()

bool IsHeavyBehaviour ( )
inlineprotected

returns item behaviour of item (more in ItemBase)

2953 {
2954 return false;
2955 }

◆ IsHologram()

override bool IsHologram ( )
inlineprotected
1523 {
1524 return false;
1525 }

◆ IsIgnited()

bool IsIgnited ( )
inlineprotected

Override this method and make it so it returns whenever this item is on fire right now or not. Evaluated on Server and Client.

446 {
447 if (m_EM)
448 return m_EM.IsWorking();
449 return false;
450 }
bool IsWorking()
Energy manager: Returns true if this device is working right now.
Definition ComponentEnergyManager.c:900

Перекрестные ссылки ComponentEnergyManager::IsWorking().

◆ IsIgnoredByConstruction()

bool IsIgnoredByConstruction ( )
inlineprotected
613 {
614 return IsDamageDestroyed();
615 }

Перекрестные ссылки IsDamageDestroyed().

◆ IsInitialized()

bool IsInitialized ( )
inlineprotected
215 {
216 return m_Initialized;
217 }

Перекрестные ссылки m_Initialized.

◆ IsInventoryVisible()

bool IsInventoryVisible ( )
inlineprotected
588 {
589 return !( GetParent() || GetHierarchyParent() );
590 }
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:405

Перекрестные ссылки GetParent().

◆ IsLockedInSlot()

IsLockedInSlot ( )
inlineprotected
Возвращает
true if entity is locked in attachment slot
1692 {
1693 EntityAI parent = GetHierarchyParent();
1694 if ( parent )
1695 {
1697 GetInventory().GetCurrentInventoryLocation( inventory_location );
1698
1699 return parent.GetInventory().GetSlotLock( inventory_location.GetSlot() );
1700 }
1701
1702 return false;
1703 }

◆ IsManagingArrows()

bool IsManagingArrows ( )
inlineprotected
3714 {
3715 return false;
3716 }

◆ IsOneHandedBehaviour()

bool IsOneHandedBehaviour ( )
inlineprotected

returns item behaviour of item (more in ItemBase)

2959 {
2960 return false;
2961 }

◆ IsPilotLight()

proto native bool IsPilotLight ( )
protected

◆ IsPlayer()

bool IsPlayer ( )
inlineprotected
593 {
594 return false;
595 }

◆ IsPreparedToDelete()

bool IsPreparedToDelete ( )
inlineprotected
698 {
699 return m_PreparedToDelete;
700 }
bool m_PreparedToDelete
Definition EntityAI.c:103

◆ IsPrepareToDelete()

bool IsPrepareToDelete ( )
inlineprotected
712 {
713 return false;
714 }

◆ IsRefresherSignalingViable()

bool IsRefresherSignalingViable ( )
inlineprivate
289 {
290 if (IsRuined())
291 {
292 return false;
293 }
294 return m_RefresherViable;
295 }
bool m_RefresherViable
Definition EntityAI.c:104

◆ IsSetForDeletion()

bool IsSetForDeletion ( )
inlineprotected
676 {
677 return IsPreparedToDelete() || m_PendingDelete || ToDelete() || IsPendingDeletion();
678 }
bool IsPreparedToDelete()
Definition EntityAI.c:697
bool IsPendingDeletion()
Get whether the Effect is queued up for being cleaned up.
Definition Effect.c:256

Перекрестные ссылки IsPendingDeletion().

◆ IsSimpleHiddenSelectionVisible()

proto native bool IsSimpleHiddenSelectionVisible ( int index)
protected

◆ IsSkinned()

bool IsSkinned ( )
inlineprotected

Skinning.

406 {
407 return GetCompBS() && GetCompBS().IsSkinned();
408 }
bool IsSkinned()
Definition BodyStaging.c:44
ComponentBodyStaging GetCompBS()
Use this to access Body Staging component on dead character. Returns NULL if the given object lacks s...
Definition EntityAI.c:2528

◆ IsTakeable()

bool IsTakeable ( )
inlineprotected
1661 {
1662 return false;
1663 }

◆ IsTargetIgnitionSuccessful()

bool IsTargetIgnitionSuccessful ( EntityAI item_target)
inlineprotected

Final evaluation just before the target item is actually ignited. Evaluated on Server.

495 {
496 return true;
497 }

◆ IsThisIgnitionSuccessful()

bool IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprotected

Final evaluation just before this item is actually ignited from fire source. Evaluated on Server.

501 {
502 return true;
503 }

◆ IsTwoHandedBehaviour()

bool IsTwoHandedBehaviour ( )
inlineprotected

returns item behaviour of item (more in ItemBase)

2965 {
2966 return false;
2967 }

◆ IsUniversalTemperatureSource()

bool IsUniversalTemperatureSource ( )
inlineprotected

Universal Temperature Sources Helpers.

3237 {
3239 }
UTemperatureSource GetUniversalTemperatureSource()
Definition EntityAI.c:3241

◆ IsValveTurnable()

bool IsValveTurnable ( int pValveIndex)
protected

◆ IsVisibleDuringDaylight()

proto native bool IsVisibleDuringDaylight ( )
private

◆ IsZombie()

bool IsZombie ( )
inlineprotected
603 {
604 return false;
605 }

◆ IsZombieMilitary()

bool IsZombieMilitary ( )
inlineprotected
608 {
609 return false;
610 }

◆ KeepHealthOnReplace()

bool KeepHealthOnReplace ( )
inlineprotected
952 {
953 return false;
954 }

◆ LocalDropEntity()

bool LocalDropEntity ( notnull EntityAI item)
inlineprotected
1894 {
1895 return false;
1896 }

◆ LocalTakeEntityAsAttachment()

bool LocalTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected
1880 {
1881 return GetInventory().TakeEntityAsAttachment(InventoryMode.LOCAL, item);
1882 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22

◆ LocalTakeEntityAsAttachmentEx()

bool LocalTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected
1813 {
1814 return GetInventory().TakeEntityAsAttachmentEx(InventoryMode.LOCAL, item, slot);
1815 }

◆ LocalTakeEntityToCargo()

bool LocalTakeEntityToCargo ( notnull EntityAI item)
inlineprotected
1749 {
1750 return GetInventory().TakeEntityToCargo(InventoryMode.LOCAL, item);
1751 }

◆ LocalTakeEntityToCargoEx()

bool LocalTakeEntityToCargoEx ( notnull EntityAI item,
int idx,
int row,
int col )
inlineprotected
1783 {
1784 return GetInventory().TakeEntityToCargoEx(InventoryMode.LOCAL, item, idx, row, col);
1785 }

◆ LocalTakeEntityToInventory()

bool LocalTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1716 {
1717 return GetInventory().TakeEntityToInventory(InventoryMode.LOCAL, flags, item);
1718 }

◆ LocalTakeEntityToTargetAttachment()

bool LocalTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1845 {
1846 return GetInventory().TakeEntityAsTargetAttachment(InventoryMode.LOCAL, target, item);
1847 }

◆ LocalTakeEntityToTargetAttachmentEx()

bool LocalTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected
1829 {
1830 return GetInventory().TakeEntityAsTargetAttachmentEx(InventoryMode.LOCAL, target, item, slot);
1831 }

◆ LocalTakeEntityToTargetCargo()

bool LocalTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1765 {
1766 return GetInventory().TakeEntityToTargetCargo(InventoryMode.LOCAL, target, item);
1767 }

◆ LocalTakeEntityToTargetCargoEx()

bool LocalTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected
1795 {
1796 return GetInventory().TakeEntityToTargetCargoEx(InventoryMode.LOCAL, cargo, item, row, col);
1797 }

◆ LocalTakeEntityToTargetInventory()

bool LocalTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1731 {
1732 return GetInventory().TakeEntityToTargetInventory(InventoryMode.LOCAL, target, flags, item);
1733 }

◆ LocalTakeToDst()

bool LocalTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected
1861 {
1862 return GetInventory().TakeToDst(InventoryMode.LOCAL, src, dst);
1863 }

◆ Log()

void Log ( string msg,
string fnc_name = "n/a" )
inlineprotected

Log.

388 {
389 Debug.Log(msg, "Object", "n/a", fnc_name, this.GetType());
390 }
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:136

Перекрестные ссылки GetType() и Debug::Log().

◆ LogError()

void LogError ( string msg,
string fnc_name = "n/a" )
inlineprotected

LogError.

400 {
401 Debug.LogError(msg, "Object", "n/a", fnc_name, this.GetType());
402 }

Перекрестные ссылки GetType() и Debug::LogError().

◆ LogWarning()

void LogWarning ( string msg,
string fnc_name = "n/a" )
inlineprotected

LogWarning.

394 {
395 Debug.LogWarning(msg, "Object", "n/a", fnc_name, this.GetType());
396 }

Перекрестные ссылки GetType() и Debug::LogWarning().

◆ LookAt()

proto native void LookAt ( vector targetPos)
private

Orientation change by lookAt point.

Аргументы
targetPoswhere to look at

◆ MaxLifetimeRefreshCalc()

void MaxLifetimeRefreshCalc ( )
inlineprivate

Calculates if the max lifetime is higher than refresher frequency (i.e. gets kept alive by refresher)

270 {
271 if ( (!GetGame().IsMultiplayer() || GetGame().IsServer()) && GetEconomyProfile() )
272 {
273 float lifetime = GetEconomyProfile().GetLifetime();
274 int frequency = GetCEApi().GetCEGlobalInt("FlagRefreshFrequency");
275 if ( frequency <= 0 )
276 {
278 }
279
280 if ( frequency <= lifetime )
281 {
282 m_RefresherViable = true;
284 }
285 }
286 }
proto native CEApi GetCEApi()
Get the CE API.
proto native void SetSynchDirty()
Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take ef...
const int REFRESHER_FREQUENCY_DEFAULT
Definition constants.c:883

Перекрестные ссылки GetCEApi(), GetGame() и GameConstants::REFRESHER_FREQUENCY_DEFAULT.

◆ OnAction()

bool OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprotected
2787 {
2788 if (action_id == EActions.FIX_ENTITY)
2789 {
2790 #ifdef DIAG_DEVELOPER
2791 FixEntity();
2792 #endif
2793 }
2794 else if (action_id == EActions.GET_TOTAL_WEIGHT) //Prints total weight of item + its contents
2795 {
2796 WeightDebug.ClearWeightDebug();
2797 #ifndef SERVER
2798 Debug.Log("======================== "+ GetType() +" =================================");
2799 #endif
2800 Debug.Log("Weight:" + GetWeightEx().ToString());
2801 Debug.Log("Weight excluding cargo and attachments:" + GetSingleInventoryItemWeightEx());
2802 Debug.Log("----------------------------------------------------------------------------------------------");
2803 }
2804 else if (action_id == EActions.GET_TOTAL_WEIGHT_RECALC) //Prints total weight of item + its contents
2805 {
2806 WeightDebug.ClearWeightDebug();
2807 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
2808 #ifndef SERVER
2809 Debug.Log("======================== "+ GetType() +" RECALC ===========================");
2810 #endif
2811 Debug.Log("Weight:" + GetWeightEx(true).ToString());
2812 Debug.Log("Weight excluding cargo and attachments:" + GetSingleInventoryItemWeightEx());
2813 WeightDebug.PrintAll(this);
2814 Debug.Log("----------------------------------------------------------------------------------------------");
2815 WeightDebug.SetVerbosityFlags(0);
2816 }
2817 else if (action_id == EActions.GET_PLAYER_WEIGHT) //Prints total weight of item + its contents
2818 {
2819 WeightDebug.ClearWeightDebug();
2820 #ifndef SERVER
2821 Debug.Log("======================== PLAYER: "+player+" ===========================");
2822 #endif
2823 Debug.Log("New overall weight Player:"+player.GetWeightEx().ToString());
2824
2825 Debug.Log("----------------------------------------------------------------------------------------------");
2826 }
2827 else if (action_id == EActions.GET_PLAYER_WEIGHT_RECALC) //Prints total weight of item + its contents
2828 {
2829 WeightDebug.ClearWeightDebug();
2830 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
2831 #ifndef SERVER
2832 Debug.Log("======================== PLAYER RECALC: "+player+" ===========================");
2833 #endif
2834 Debug.Log("New overall weight Player:"+player.GetWeightEx(true).ToString());
2835 WeightDebug.PrintAll(player);
2836 Debug.Log("----------------------------------------------------------------------------------------------");
2837 WeightDebug.SetVerbosityFlags(0);
2838 }
2839 return false;
2840 }
proto string ToString()
float GetSingleInventoryItemWeightEx()
Definition EntityAI.c:2773

Перекрестные ссылки GetSingleInventoryItemWeightEx(), GetType(), Debug::Log() и ToString().

◆ OnAttachmentRuined()

void OnAttachmentRuined ( EntityAI attachment)
inlineprotected

Called when some attachment of this parent is ruined. Called on server and client side.

967 {
968 // ...
969 }

◆ OnBeforeTryDelete()

void OnBeforeTryDelete ( )
protected

◆ OnBinLoadItemsDropped()

void OnBinLoadItemsDropped ( )
inlineprotected

Called when an item fails to get loaded into the inventory of an entity and gets dropped.

1237 {
1239 GetHierarchyRootPlayer().SetProcessUIWarning(true);
1240 }

◆ OnCargoChanged()

void OnCargoChanged ( )
inlineprotected
1658{ }

◆ OnCEUpdate()

void OnCEUpdate ( )
inlineprotected

Central economy calls this function whenever going over all the entities.

void OnCEUpdate()
{
// dont forget to propagate this call trough class hierarchy! - always at the start of the function
super.OnCEUpdate();
// use m_ElapsedSinceLastUpdate for time-related purposes
}
void OnCEUpdate()
Central economy calls this function whenever going over all the entities.
Definition EntityAI.c:2984
2985 {
2986 float currentTime = GetGame().GetTickTime();
2987 if (m_LastUpdatedTime == 0)
2989
2992 }

Перекрестные ссылки GetGame().

◆ OnDamageDestroyed()

void OnDamageDestroyed ( int oldLevel)
protected

Called when the health gets to the min value, 'oldLevel' is previous health level, 'oldLevel' -1 means this entity was just spawned.

◆ OnDebugButtonPressClient()

void OnDebugButtonPressClient ( int button_index)
inlineprotected
2449{}//DEPRICATED, USE GetDebugActions / OnAction

◆ OnDebugButtonPressServer()

void OnDebugButtonPressServer ( int button_index)
inlineprotected
2450{}//DEPRICATED, USE GetDebugActions / OnAction

◆ OnDebugSpawn()

void OnDebugSpawn ( )
inlineprotected
3000 {
3002 ConfigGetTextArray("Attachments", slots);
3003
3005 ConfigGetTextArray("magazines", mags);
3006
3007 //-------
3008
3010
3013 all_paths.Insert(CFG_WEAPONSPATH);
3014
3015 string config_path;
3016 string child_name;
3017 int scope;
3018 string path;
3019 int consumable_count;
3020
3021 for (int i = 0; i < all_paths.Count(); i++)
3022 {
3023 config_path = all_paths.Get(i);
3024 int children_count = GetGame().ConfigGetChildrenCount(config_path);
3025
3026 for (int x = 0; x < children_count; x++)
3027 {
3028 GetGame().ConfigGetChildName(config_path, x, child_name);
3029 path = config_path + " " + child_name;
3030 scope = GetGame().ConfigGetInt( config_path + " " + child_name + " scope" );
3031 bool should_check = 1;
3032 if ( config_path == "CfgVehicles" && scope == 0)
3033 {
3034 should_check = 0;
3035 }
3036
3037 if ( should_check )
3038 {
3039 string inv_slot;
3040 GetGame().ConfigGetText( config_path + " " + child_name + " inventorySlot",inv_slot );
3041 for (int z = 0; z < slots.Count(); z++)
3042 {
3043 if (slots.Get(z) == inv_slot)
3044 {
3045 this.GetInventory().CreateInInventory( child_name );
3046 continue;
3047 //Print("matching attachment: " + child_name + " for inv. slot name:" +inv_slot);
3048 }
3049 }
3050 }
3051 }
3052 }
3053 };
Icon x

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, GetGame(), path и x.

◆ OnDebugSpawnEx()

void OnDebugSpawnEx ( DebugSpawnParams params)
inlineprotected
2995 {
2996 OnDebugSpawn();
2997 }
void OnDebugSpawn()
Definition EntityAI.c:2999

Перекрестные ссылки OnDebugSpawn.

◆ OnEnergyAdded()

void OnEnergyAdded ( )
inlineprotected

Energy manager event: Called when energy was added on this device. ALWAYS CALL super.OnEnergyAdded() !!!

2590{}

◆ OnEnergyConsumed()

void OnEnergyConsumed ( )
inlineprotected

Energy manager event: Called when energy was consumed on this device. ALWAYS CALL super.OnEnergyConsumed() !!!

2587{}

◆ OnExplosionEffects()

override void OnExplosionEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
float energyFactor,
float explosionFactor,
bool isWater,
string ammoType )
inlineprotected
807 {
809 #ifndef SERVER
810 g_Game.GetWorld().AddEnvShootingSource(pos, 1.0);
811 #endif
812 if (m_DestructionBehaviourObj && m_DestructionBehaviourObj.HasExplosionDamage())
813 {
815 }
816 }
DayZGame g_Game
Definition DayZGame.c:3746

Перекрестные ссылки g_Game.

◆ OnHologramBeingPlaced()

void OnHologramBeingPlaced ( Man player)
protected

◆ OnIgnitedTarget()

void OnIgnitedTarget ( EntityAI target_item)
inlineprotected

Executed on Server when this item ignites some target item.

471 {
472
473 }

◆ OnIgnitedTargetFailed()

void OnIgnitedTargetFailed ( EntityAI target_item)
inlineprotected

Executed on Server when this item failed to ignite target item.

483 {
484
485 }

◆ OnIgnitedThis()

void OnIgnitedThis ( EntityAI fire_source)
inlineprotected

Executed on Server when some item ignited this one.

477 {
478
479 }

◆ OnIgnitedThisFailed()

void OnIgnitedThisFailed ( EntityAI fire_source)
inlineprotected

Executed on Server when some item failed to ignite this one.

489 {
490
491 }

◆ OnInitEnergy()

void OnInitEnergy ( )
inlineprotected

Energy manager event: Object's initialization. Energy Manager is fully initialized by this point.

2584{}

◆ OnInventoryInit()

void OnInventoryInit ( )
inlineprotected
763 {
765 }
void InitAttachmentExclusionValues()
Definition EntityAI.c:3283

◆ OnIsPlugged()

void OnIsPlugged ( EntityAI source_device)
inlineprotected

Energy manager event: Called when this device is plugged into some energy source.

2572{}

◆ OnIsUnplugged()

void OnIsUnplugged ( EntityAI last_energy_source)
inlineprotected

Energy manager event: Called when this device is UNPLUGGED from the energy source.

2575{}

◆ OnItemAttachmentSlotChanged()

void OnItemAttachmentSlotChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected
821{}

◆ OnItemLocationChanged()

void OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected
819{ }

◆ OnMovedInsideCargo()

void OnMovedInsideCargo ( EntityAI container)
inlineprotected

Called when this item enters cargo of some container.

1175 {
1176 if (m_EM)
1178 }
void HandleMoveInsideCargo(EntityAI container)
Definition ComponentEnergyManager.c:711

Перекрестные ссылки ComponentEnergyManager::HandleMoveInsideCargo().

◆ OnMovedWithinCargo()

void OnMovedWithinCargo ( EntityAI container)
inlineprotected

Called when this item moves within cargo of some container.

1188 {
1189
1190 }

◆ OnOwnSocketReleased()

void OnOwnSocketReleased ( EntityAI device)
inlineprotected

Energy manager event: When something is UNPLUGGED from this device.

2581{}

◆ OnOwnSocketTaken()

void OnOwnSocketTaken ( EntityAI device)
inlineprotected

Energy manager event: When something is plugged into this device.

2578{}

◆ OnPlacementCancelled()

void OnPlacementCancelled ( Man player)
protected

◆ OnPlacementComplete()

void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
protected

◆ OnPlacementStarted()

void OnPlacementStarted ( Man player)
protected

◆ OnRemovedFromCargo()

void OnRemovedFromCargo ( EntityAI container)
inlineprotected

Called when this item exits cargo of some container.

1182 {
1183
1184 }

◆ OnRPC()

override void OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
inlineprotected
2594 {
2595 super.OnRPC(sender, rpc_type, ctx);
2596
2597 if ( GetGame().IsClient() )
2598 {
2599 switch (rpc_type)
2600 {
2601 // BODY STAGING - server => client synchronization of skinned state.
2602 case ERPCs.RPC_BS_SKINNED_STATE:
2603 {
2605 if (ctx.Read(p_skinned_state))
2606 {
2607 float state = p_skinned_state.param1;
2608 if (state && GetCompBS())
2610 }
2611 break;
2612 }
2613
2614 case ERPCs.RPC_EXPLODE_EVENT:
2615 {
2616 OnExplodeClient();
2617 break;
2618 }
2619 }
2620 }
2621 }
ERPCs
Definition ERPCs.c:2
void SetAsSkinnedClient()
Definition BodyStaging.c:49

Перекрестные ссылки GetGame().

◆ OnStoreLoad()

bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Called when data is loaded from persistence (on server side).

void OnStoreLoad(ParamsReadContext ctx, int version)
{
// dont forget to propagate this call trough class hierarchy!
if ( !super.OnStoreLoad(ctx, version) )
return false;
// read data loaded from game database (format and order of reading must be the same as writing!)
int a;
if ( !ctx.Read(a) )
return false;
float b;
if ( !ctx.Read(b) )
return false;
return true;
}
bool OnStoreLoad(ParamsReadContext ctx, int version)
Called when data is loaded from persistence (on server side).
Definition EntityAI.c:2285
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
2286 {
2287 // Restoring of energy related states
2288
2289 if ( m_EM )
2290 {
2291 // Load energy amount
2292 float f_energy = 0;
2293 if ( !ctx.Read( f_energy ) )
2294 f_energy = 0;
2296
2297 // Load passive/active state
2298 bool b_is_passive = false;
2299 if ( !ctx.Read( b_is_passive ) )
2300 return false;
2302
2303 // Load ON/OFF state
2304 bool b_is_on = false;
2305 if ( !ctx.Read( b_is_on ) )
2306 {
2307 m_EM.SwitchOn();
2308 return false;
2309 }
2310
2311 // Load plugged/unplugged state
2312 bool b_is_plugged = false;
2313 if ( !ctx.Read( b_is_plugged ) )
2314 return false;
2315
2316 // ENERGY SOURCE
2317 if ( version <= 103 )
2318 {
2319 // Load energy source ID low
2320 int i_energy_source_ID_low = 0; // Even 0 can be valid ID!
2321 if ( !ctx.Read( i_energy_source_ID_low ) )
2322 return false;
2323
2324 // Load energy source ID high
2325 int i_energy_source_ID_high = 0; // Even 0 can be valid ID!
2326 if ( !ctx.Read( i_energy_source_ID_high ) )
2327 return false;
2328 }
2329 else
2330 {
2331 int b1 = 0;
2332 int b2 = 0;
2333 int b3 = 0;
2334 int b4 = 0;
2335
2336 if ( !ctx.Read(b1) ) return false;
2337 if ( !ctx.Read(b2) ) return false;
2338 if ( !ctx.Read(b3) ) return false;
2339 if ( !ctx.Read(b4) ) return false;
2340
2341 if ( b_is_plugged )
2342 {
2343 // Because function GetEntityByPersitentID() cannot be called here, ID values must be stored and used later.
2345 m_EM.RestorePlugState(true);
2346 }
2347 }
2348
2349 if (b_is_on)
2350 {
2351 m_EM.SwitchOn();
2352 }
2353 }
2354 return true;
2355 }
void StoreEnergySourceIDs(int b1, int b2, int b3, int b4)
Definition ComponentEnergyManager.c:621
void SwitchOn()
Energy manager: Switches ON the device so it starts doing its work if it has enough energy.
Definition ComponentEnergyManager.c:375
void SetEnergy(float new_energy)
Energy manager: Sets stored energy for this device. It ignores the min/max limit!
Definition ComponentEnergyManager.c:525
void RestorePlugState(bool state)
Definition ComponentEnergyManager.c:519
void SetPassiveState(bool state=true)
Energy manager: Changes the status of this device. When it's passive (true), the main timer and OnWor...
Definition ComponentEnergyManager.c:441

Перекрестные ссылки ComponentEnergyManager::RestorePlugState(), ComponentEnergyManager::SetEnergy(), ComponentEnergyManager::SetPassiveState(), ComponentEnergyManager::StoreEnergySourceIDs() и ComponentEnergyManager::SwitchOn().

◆ OnStoreSave()

void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Engine calls this function to collect data from entity to store for persistence (on server side).

{
// dont forget to propagate this call trough class hierarchy!
super.OnStoreSave(ctx);
// write any data (using params) you want to store
int a = 5;
float b = 6.0;
ctx.Write(a);
ctx.Write(b);
}
void OnStoreSave(ParamsWriteContext ctx)
Engine calls this function to collect data from entity to store for persistence (on server side).
Definition EntityAI.c:2224
2225 {
2226 // Saving of energy related states
2227 if ( m_EM )
2228 {
2229 // Save energy amount
2230 ctx.Write( m_EM.GetEnergy() );
2231
2232 // Save passive/active state
2233 ctx.Write( m_EM.IsPassive() );
2234
2235 // Save ON/OFF state
2236 ctx.Write( m_EM.IsSwitchedOn() );
2237
2238 // Save plugged/unplugged state
2239 ctx.Write( m_EM.IsPlugged() );
2240
2241 // ENERGY SOURCE
2242 // Save energy source IDs
2244 int b1 = 0;
2245 int b2 = 0;
2246 int b3 = 0;
2247 int b4 = 0;
2248
2249 if (energy_source)
2250 {
2251 energy_source.GetPersistentID(b1, b2, b3, b4);
2252 }
2253
2254 ctx.Write( b1 ); // Save energy source block 1
2255 ctx.Write( b2 ); // Save energy source block 2
2256 ctx.Write( b3 ); // Save energy source block 3
2257 ctx.Write( b4 ); // Save energy source block 4
2258 }
2259 }
bool IsPlugged()
Energy manager: Returns true if this device is plugged into some other device (even if they are OFF o...
Definition ComponentEnergyManager.c:887
float GetEnergy()
Energy manager: Returns the amount of stored energy this device has.
Definition ComponentEnergyManager.c:1214
EntityAI GetEnergySource()
Energy manager: Returns the energy source this device is plugged into.
Definition ComponentEnergyManager.c:1292
bool IsPassive()
Energy manager: Returns true if this device is set to be passive. False if otherwise.
Definition ComponentEnergyManager.c:881
bool IsSwitchedOn()
Energy manager: Returns state of the switch. Whenever the device is working or not does not matter....
Definition ComponentEnergyManager.c:866

Перекрестные ссылки ComponentEnergyManager::GetEnergy(), ComponentEnergyManager::GetEnergySource(), ComponentEnergyManager::IsPassive(), ComponentEnergyManager::IsPlugged() и ComponentEnergyManager::IsSwitchedOn().

◆ OnSwitchOff()

void OnSwitchOff ( )
inlineprotected

Energy manager event: Called when the device is switched OFF.

2569{}

◆ OnSwitchOn()

void OnSwitchOn ( )
inlineprotected

Energy manager event: Called when the device is switched on.

2566{}

◆ OnVariablesSynchronized()

void OnVariablesSynchronized ( )
inlineprotected

Called on clients after receiving synchronization data from server.

2364 {
2365 if ( m_EM )
2366 {
2367 if ( GetGame().IsMultiplayer() )
2368 {
2369 bool is_on = m_EM.IsSwitchedOn();
2370
2372 {
2373 if (is_on)
2374 m_EM.SwitchOn();
2375 else
2376 m_EM.SwitchOff();
2377 }
2378
2381
2382 EntityAI energy_source = EntityAI.Cast( GetGame().GetObjectByNetworkId(id_low, id_High) );
2383
2384 if (energy_source)
2385 {
2387
2388 if ( !esem )
2389 {
2390 string object = energy_source.GetType();
2391 Error("Synchronization error! Object " + object + " has no instance of the Energy Manager component!");
2392 }
2393
2395
2396 }
2397 else
2398 {
2399 m_EM.UnplugThis();
2400 }
2401
2404 }
2405 }
2406 }
void SwitchOff()
Energy manager: Switches OFF the device.
Definition ComponentEnergyManager.c:406
void UnplugThis()
Energy manager: Unplugs this device from its power source.
Definition ComponentEnergyManager.c:494
int GetEnergySourceNetworkIDHigh()
Definition ComponentEnergyManager.c:1150
void StartUpdates()
Definition ComponentEnergyManager.c:1452
int GetEnergySourceNetworkIDLow()
Definition ComponentEnergyManager.c:1144
bool GetPreviousSwitchState()
Definition ComponentEnergyManager.c:860
void DeviceUpdate()
Definition ComponentEnergyManager.c:1747

Перекрестные ссылки ComponentEnergyManager::DeviceUpdate(), Error(), ComponentEnergyManager::GetEnergySourceNetworkIDHigh(), ComponentEnergyManager::GetEnergySourceNetworkIDLow(), GetGame(), ComponentEnergyManager::GetPreviousSwitchState(), ComponentEnergyManager::IsSwitchedOn(), ComponentEnergyManager::PlugThisInto(), ComponentEnergyManager::StartUpdates(), ComponentEnergyManager::SwitchOff(), ComponentEnergyManager::SwitchOn() и ComponentEnergyManager::UnplugThis().

◆ OnWasAttached()

void OnWasAttached ( EntityAI parent,
int slot_id )
protected

◆ OnWasDetached()

void OnWasDetached ( EntityAI parent,
int slot_id )
inlineprotected
1649 {
1650 if (!IsFlagSet(EntityFlags.VISIBLE))
1651 {
1652 SetInvisible(false);
1653 OnInvisibleSet(false);
1654 SetInvisibleRecursive(false,parent);
1655 }
1656 }
void SetInvisibleRecursive(bool invisible, EntityAI parent=null, array< int > attachments=null)
Definition EntityAI.c:3104
EntityFlags
Entity flags.
Definition EnEntity.c:115

◆ OnWetChanged()

void OnWetChanged ( float newVal,
float oldVal )
protected

◆ OnWetLevelChanged()

void OnWetLevelChanged ( EWetnessLevel newLevel,
EWetnessLevel oldLevel )
protected

◆ OnWork()

void OnWork ( float consumed_energy)
inlineprotected

Energy manager event: Called every device update if its supposed to do some work. The update can be every second or at random, depending on its manipulation.

2560{}

◆ OnWorkStart()

void OnWorkStart ( )
inlineprotected

Energy manager event: Called only once when this device starts doing its work.

2557{}

◆ OnWorkStop()

void OnWorkStop ( )
inlineprotected

Energy manager event: Called when the device stops working (was switched OFF or ran out of energy)

2563{}

◆ PairRemote()

void PairRemote ( notnull EntityAI trigger)
protected

◆ PlacementCanBeRotated()

bool PlacementCanBeRotated ( )
inlineprotected

Should return false if you want to disable hologram rotation.

465 {
466 return true;
467 }

◆ PlaceOnSurfaceRotated()

proto native void PlaceOnSurfaceRotated ( out vector trans[4],
vector pos,
float dx = 0,
float dz = 0,
float fAngle = 0,
bool align = false )
protected

◆ PredictiveDropEntity()

bool PredictiveDropEntity ( notnull EntityAI item)
inlineprotected
1889 {
1890 return false;
1891 }

◆ PredictiveTakeEntityAsAttachment()

bool PredictiveTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected

Put item into as attachment.

1873 {
1874 if (GetGame().IsMultiplayer())
1875 return GetInventory().TakeEntityAsAttachment(InventoryMode.JUNCTURE, item);
1876 else
1877 return GetInventory().TakeEntityAsAttachment(InventoryMode.PREDICTIVE, item);
1878 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityAsAttachmentEx()

bool PredictiveTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected

Returns if item can be added as attachment on specific slot. Note that slot index IS NOT slot ID! Slot ID is defined in DZ/data/config.cpp.

1806 {
1807 if ( GetGame().IsMultiplayer() )
1808 return GetInventory().TakeEntityAsAttachmentEx(InventoryMode.JUNCTURE, item, slot);
1809 else
1810 return GetInventory().TakeEntityAsAttachmentEx(InventoryMode.PREDICTIVE, item, slot);
1811 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToCargo()

bool PredictiveTakeEntityToCargo ( notnull EntityAI item)
inlineprotected

Put item into into cargo.

1742 {
1743 if ( GetGame().IsMultiplayer() )
1744 return GetInventory().TakeEntityToCargo(InventoryMode.JUNCTURE, item);
1745 else
1746 return GetInventory().TakeEntityToCargo(InventoryMode.PREDICTIVE, item);
1747 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToCargoEx()

bool PredictiveTakeEntityToCargoEx ( notnull EntityAI item,
int idx,
int row,
int col )
inlineprotected

Put item into into cargo on specific cargo location.

1776 {
1777 if ( GetGame().IsMultiplayer() )
1778 return GetInventory().TakeEntityToCargoEx(InventoryMode.JUNCTURE, item, idx, row, col);
1779 else
1780 return GetInventory().TakeEntityToCargoEx(InventoryMode.PREDICTIVE, item, idx, row, col);
1781 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToInventory()

bool PredictiveTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

Put item anywhere into this entity (as attachment or into cargo, recursively)

1709 {
1710 if ( GetGame().IsMultiplayer() )
1711 return GetInventory().TakeEntityToInventory(InventoryMode.JUNCTURE, flags, item);
1712 else
1713 return GetInventory().TakeEntityToInventory(InventoryMode.PREDICTIVE, flags, item);
1714 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetAttachment()

bool PredictiveTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1838 {
1839 if ( GetGame().IsMultiplayer() )
1840 return GetInventory().TakeEntityAsTargetAttachment(InventoryMode.JUNCTURE, target, item);
1841 else
1842 return GetInventory().TakeEntityAsTargetAttachment(InventoryMode.PREDICTIVE, target, item);
1843 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetAttachmentEx()

bool PredictiveTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected
1822 {
1823 if ( GetGame().IsMultiplayer() )
1824 return GetInventory().TakeEntityAsTargetAttachmentEx(InventoryMode.JUNCTURE, target, item, slot);
1825 else
1826 return GetInventory().TakeEntityAsTargetAttachmentEx(InventoryMode.PREDICTIVE, target, item, slot);
1827 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetCargo()

bool PredictiveTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1758 {
1759 if ( GetGame().IsMultiplayer() )
1760 return GetInventory().TakeEntityToTargetCargo(InventoryMode.JUNCTURE, target, item);
1761 else
1762 return GetInventory().TakeEntityToTargetCargo(InventoryMode.PREDICTIVE, target, item);
1763 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetCargoEx()

bool PredictiveTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected
1788 {
1789 if ( GetGame().IsMultiplayer() )
1790 return GetInventory().TakeEntityToTargetCargoEx(InventoryMode.JUNCTURE, cargo, item, row, col);
1791 else
1792 return GetInventory().TakeEntityToTargetCargoEx(InventoryMode.PREDICTIVE, cargo, item, row, col);
1793 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeEntityToTargetInventory()

bool PredictiveTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1724 {
1725 if ( GetGame().IsMultiplayer() )
1726 return GetInventory().TakeEntityToTargetInventory(InventoryMode.JUNCTURE, target, flags, item);
1727 else
1728 return GetInventory().TakeEntityToTargetInventory(InventoryMode.PREDICTIVE, target, flags, item);
1729 }

Перекрестные ссылки GetGame().

◆ PredictiveTakeToDst()

bool PredictiveTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected
1854 {
1855 if ( GetGame().IsMultiplayer() )
1856 return GetInventory().TakeToDst(InventoryMode.JUNCTURE, src, dst);
1857 else
1858 return GetInventory().TakeToDst(InventoryMode.PREDICTIVE, src, dst);
1859 }

Перекрестные ссылки GetGame().

◆ ProcessInvulnerabilityCheck()

void ProcessInvulnerabilityCheck ( string servercfg_param)
inlineprotected
3074 {
3075 if ( GetGame() && GetGame().IsMultiplayer() && GetGame().IsServer() )
3076 {
3077 int invulnerability;
3078 switch (servercfg_param)
3079 {
3080 case "disableContainerDamage":
3082 break;
3083
3084 case "disableBaseDamage":
3086 break;
3087 }
3088
3089 if (invulnerability > 0)
3090 {
3091 SetAllowDamage(false);
3092 }
3093 }
3094 }
static bool GetDisableBaseDamage()
Definition CfgGameplayHandler.c:162
static bool GetDisableContainerDamage()
Definition CfgGameplayHandler.c:168

Перекрестные ссылки CfgGameplayHandler::GetDisableBaseDamage(), CfgGameplayHandler::GetDisableContainerDamage() и GetGame().

◆ ProcessMeleeItemDamage()

override EntityAI ProcessMeleeItemDamage ( int mode = 0)
inlineprotected
3056 {
3057 if (GetGame().IsServer())
3058 AddHealth("","Health",-MELEE_ITEM_DAMAGE);
3059 return this;
3060 }
const float MELEE_ITEM_DAMAGE
Definition constants.c:602

Перекрестные ссылки GetGame() и MELEE_ITEM_DAMAGE.

◆ PropagateExclusionValueRecursive()

void PropagateExclusionValueRecursive ( set< int > values,
int slotId )
inlineprivate
3534 {
3535 if (values && values.Count() != 0)
3536 {
3539 GetInventory().GetCurrentInventoryLocation(lcn);
3541 {
3543 EntityAI parent = GetHierarchyParent();
3544 if (parent)
3545 parent.PropagateExclusionValueRecursive(passThis,lcn.GetSlot());
3546 }
3547 }
3548 }

◆ RegisterNetSyncVariableBool()

RegisterNetSyncVariableBool ( string variableName)
protected

registers bool variable synchronized over network

Аргументы
[in]variableNamewhich variable should be synchronized

◆ RegisterNetSyncVariableBoolSignal()

RegisterNetSyncVariableBoolSignal ( string variableName)
protected

when bool variable is true, it's sent to clients and become false again

Аргументы
[in]variableNamewhich variable should be synchronized

◆ RegisterNetSyncVariableFloat()

RegisterNetSyncVariableFloat ( string variableName,
float minValue = 0,
float maxValue = 0,
int precision = 1 )
protected

registers float variable synchronized over network

Аргументы
[in]variableNamewhich variable should be synchronized
[in]minValueminimal value used for quantization (when minValue == maxValue, no quatization is done)
[in]maxValuemaximal value used for quantization (when minValue == maxValue, no quatization is done)
[in]precisionprecision in number of digits after decimal point

◆ RegisterNetSyncVariableInt()

RegisterNetSyncVariableInt ( string variableName,
int minValue = 0,
int maxValue = 0 )
protected

registers int variable synchronized over network

Аргументы
[in]variableNamewhich variable should be synchronized
[in]minValueminimal value used for quantization (when minValue == maxValue, no quatization is done)
[in]maxValuemaximal value used for quantization (when minValue == maxValue, no quatization is done)

◆ RegisterNetSyncVariableObject()

RegisterNetSyncVariableObject ( string variableName)
protected

registers object variable synchronized over network, only synchronizes if network id is assigned. Doesn't handle object despawn on client

Аргументы
[in]variableNamewhich variable should be synchronized

◆ RegisterTransportHit()

void RegisterTransportHit ( Transport transport)
inlineprotected
3170 {
3172 {
3175 Car car;
3176 float damage;
3178
3179 // a different attempt to solve hits from "standing" car to the players
3180 if (Car.CastTo(car, transport))
3181 {
3182 if (car.GetSpeedometerAbsolute() > 2 )
3183 {
3185 ProcessDirectDamage(DT_CUSTOM, transport, "", "TransportHit", "0 0 0", damage);
3186 }
3187 else
3188 {
3190 }
3191
3192 // compute impulse and apply only if the body dies
3193 if (IsDamageDestroyed() && car.GetSpeedometerAbsolute() > 3)
3194 {
3196 impulse[1] = 40 * 1.5;
3198 }
3199 }
3200 else //old solution just in case if somebody use it
3201 {
3202 // avoid damage because of small movements
3203 if (m_TransportHitVelocity.Length() > 0.1)
3204 {
3206 ProcessDirectDamage(DT_CUSTOM, transport, "", "TransportHit", "0 0 0", damage);
3207 }
3208 else
3209 {
3211 }
3212
3213 // compute impulse and apply only if the body dies
3215 {
3217 impulse[1] = 40 * 1.5;
3219 }
3220 }
3221 }
3222 }
vector m_TransportHitVelocity
Definition EntityAI.c:137
bool m_TransportHitRegistered
Definition EntityAI.c:136
proto native float Length()
Returns length of vector (magnitude)
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto void dBodyApplyImpulse(notnull IEntity body, vector impulse)
Applies impuls on a rigidbody (origin)

Перекрестные ссылки dBodyApplyImpulse(), GetVelocity(), IsDamageDestroyed() и vector::Length().

◆ RemoveAgent()

void RemoveAgent ( int agent_id)
protected

◆ RemoveAllAgents()

void RemoveAllAgents ( )
protected

◆ RemoveAllAgentsExcept()

void RemoveAllAgentsExcept ( int agent_to_keep)
protected

◆ ReplaceOnDeath()

bool ReplaceOnDeath ( )
inlineprotected
942 {
943 return false;
944 }

◆ ServerDropEntity()

bool ServerDropEntity ( notnull EntityAI item)
inlineprotected
1899 {
1900 return false;
1901 }

◆ ServerTakeEntityAsAttachment()

bool ServerTakeEntityAsAttachment ( notnull EntityAI item)
inlineprotected
1884 {
1885 return GetInventory().TakeEntityAsAttachment(InventoryMode.SERVER, item);
1886 }

◆ ServerTakeEntityAsAttachmentEx()

bool ServerTakeEntityAsAttachmentEx ( notnull EntityAI item,
int slot )
inlineprotected
1817 {
1818 return GetInventory().TakeEntityAsAttachmentEx(InventoryMode.SERVER, item, slot);
1819 }

◆ ServerTakeEntityToCargo()

bool ServerTakeEntityToCargo ( notnull EntityAI item)
inlineprotected
1753 {
1754 return GetInventory().TakeEntityToCargo(InventoryMode.SERVER, item);
1755 }

◆ ServerTakeEntityToInventory()

bool ServerTakeEntityToInventory ( FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1720 {
1721 return GetInventory().TakeEntityToInventory(InventoryMode.SERVER, flags, item);
1722 }

◆ ServerTakeEntityToTargetAttachment()

bool ServerTakeEntityToTargetAttachment ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1849 {
1850 return GetInventory().TakeEntityAsTargetAttachment(InventoryMode.SERVER, target, item);
1851 }

◆ ServerTakeEntityToTargetAttachmentEx()

bool ServerTakeEntityToTargetAttachmentEx ( notnull EntityAI target,
notnull EntityAI item,
int slot )
inlineprotected
1833 {
1834 return GetInventory().TakeEntityAsTargetAttachmentEx(InventoryMode.SERVER, target, item, slot);
1835 }

◆ ServerTakeEntityToTargetCargo()

bool ServerTakeEntityToTargetCargo ( notnull EntityAI target,
notnull EntityAI item )
inlineprotected
1769 {
1770 return GetInventory().TakeEntityToTargetCargo(InventoryMode.SERVER, target, item);
1771 }

◆ ServerTakeEntityToTargetCargoEx()

bool ServerTakeEntityToTargetCargoEx ( notnull CargoBase cargo,
notnull EntityAI item,
int row,
int col )
inlineprotected
1799 {
1800 return GetInventory().TakeEntityToTargetCargoEx(InventoryMode.SERVER, cargo, item, row, col);
1801 }

◆ ServerTakeEntityToTargetInventory()

bool ServerTakeEntityToTargetInventory ( notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected
1735 {
1736 return GetInventory().TakeEntityToTargetInventory(InventoryMode.SERVER, target, flags, item);
1737 }

◆ ServerTakeToDst()

bool ServerTakeToDst ( notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected
1865 {
1866 return GetInventory().TakeToDst(InventoryMode.SERVER, src, dst);
1867 }

◆ SetActive()

proto native void SetActive ( bool active)
private

Sets this camera as active.

◆ SetAITargetCallbacks()

proto native void SetAITargetCallbacks ( AbstractAITargetCallbacks callbacks)
protected

◆ SetAmbientAlpha()

proto native void SetAmbientAlpha ( float pAlpha)
private

◆ SetAmbientColor()

proto native void SetAmbientColor ( float pRed,
float pGreen,
float pBlue )
private

◆ SetAmbientColorV()

proto native void SetAmbientColorV ( vector pColorVector)
private

◆ SetAsSkinned()

void SetAsSkinned ( )
inlineprotected
411 {
412 if (GetCompBS())
414 }
void SetAsSkinned()
Definition BodyStaging.c:23

◆ SetAttachmentExclusionMaskGlobal()

void SetAttachmentExclusionMaskGlobal ( set< int > values)
inlineprotected

◆ SetAttachmentExclusionMaskSlot()

void SetAttachmentExclusionMaskSlot ( int slotId,
set< int > values )
inlineprotected

sets values for specific slot

3524 {
3526 {
3528 }
3529 else
3530 ErrorEx("m_AttachmentExclusionSlotMap not available! Fill the 'inventorySlot[]' in the " + this + " config file.");
3531 }

Перекрестные ссылки ErrorEx.

◆ SetBayonetAttached()

void SetBayonetAttached ( bool pState,
int slot_idx = -1 )
inlineprotected
3096{};

◆ SetBrightness()

proto native void SetBrightness ( float pValue)
private

◆ SetButtstockAttached()

void SetButtstockAttached ( bool pState,
int slot_idx = -1 )
inlineprotected
3100{};

◆ SetCastShadow()

proto native void SetCastShadow ( bool pState)
private

◆ SetDiffuseAlpha()

proto native void SetDiffuseAlpha ( float pAlpha)
private

◆ SetDiffuseColor()

proto native void SetDiffuseColor ( float pRed,
float pGreen,
float pBlue )
private

◆ SetDiffuseColorV()

proto native void SetDiffuseColorV ( vector pColorVector)
private

◆ SetEnabled()

proto native void SetEnabled ( bool pState)
private

◆ SetFlareRelPosition()

proto native void SetFlareRelPosition ( vector pPosition)
private

◆ SetFlareVisible()

proto native void SetFlareVisible ( bool pState)
private

◆ SetFocus()

proto native void SetFocus ( float distance,
float blur )
private

Depth of Field settings.

Аргументы
distanceDOF distance parameter
blurDOF blur parameter

◆ SetFOV()

proto native void SetFOV ( float fov)
private

Field of View settings.

Аргументы
fovFOV angle in radians

◆ SetFromProjectile()

void SetFromProjectile ( ProjectileStoppedInfo info)
inlineprotected
3724 {
3725 }

◆ SetHeatHazePower()

proto native void SetHeatHazePower ( float pValue)
private

◆ SetHeatHazeRadius()

proto native void SetHeatHazeRadius ( float pValue)
private

◆ SetInvisibleRecursive()

void SetInvisibleRecursive ( bool invisible,
EntityAI parent = null,
array< int > attachments = null )
inlineprotected
3105 {
3108 if (attachments)
3110 else
3111 {
3112 for (int i = 0; i < GetInventory().GetAttachmentSlotsCount(); i++)
3113 {
3114 attachmentsArray.Insert(GetInventory().GetAttachmentSlotId(i));
3115 }
3116 }
3117
3118 EntityAI item;
3119
3120 foreach( int slot : attachmentsArray )
3121 {
3122 if( parent )
3123 item = parent.GetInventory().FindAttachment(slot);
3124 else
3125 item = this;//GetInventory().FindAttachment(slot);
3126
3127 if( item )
3128 {
3129 if( item.GetInventory().AttachmentCount() > 0 )
3130 {
3131 for(i = 0; i < item.GetInventory().GetAttachmentSlotsCount(); i++)
3132 {
3133 childrenAtt.Insert(item.GetInventory().GetAttachmentSlotId(i));
3134 }
3135
3137 }
3138
3139 item.SetInvisible(invisible);
3140 item.OnInvisibleSet(invisible);
3141 }
3142 }
3143 }

◆ SetLifetime()

proto native void SetLifetime ( float fLifeTime)
protected

Set (override) remaining economy lifetime (seconds)

◆ SetLifetimeMax()

proto native void SetLifetimeMax ( float fLifeTime)
protected

Set (override) max economy lifetime per entity instance (seconds)

◆ SetLightType()

proto native void SetLightType ( int pType)
private

◆ SetNearPlane()

proto native void SetNearPlane ( float nearPlane)
private

set near plane of camera

Аргументы
nearPlaneclamped internally to 0.01m

◆ SetObjectMaterial()

proto native void SetObjectMaterial ( int index,
string mat_name )
protected

Change material in hiddenSelections.

◆ SetObjectTexture()

proto native void SetObjectTexture ( int index,
string texture_name )
protected

Change texture in hiddenSelections.

◆ SetPersistentPairID()

void SetPersistentPairID ( int id)
inlineprotected
3266 {
3268 if (raib)
3269 {
3270 raib.SetPersistentPairID(id);
3271 }
3272 }
RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
Remotely controlled devices helpers.
Definition RemotelyActivatedItemBehaviour.c:2

Перекрестные ссылки GetRemotelyActivatedItemBehaviour().

◆ SetPilotLight()

proto native void SetPilotLight ( bool isOn)
protected

◆ SetPrepareToDelete()

void SetPrepareToDelete ( )
inlineprotected
693 {
694 m_PreparedToDelete = true;
695 }

◆ SetPulseCoef()

proto native void SetPulseCoef ( float pState)
private

◆ SetQuantityToMinimum()

void SetQuantityToMinimum ( )
protected

◆ SetRadius()

proto native void SetRadius ( float pValue)
private

◆ SetSimpleHiddenSelectionState()

proto native void SetSimpleHiddenSelectionState ( int index,
bool state )
protected

Simple hidden selection state; 0 == hidden.

◆ SetSpotLightAngle()

proto native void SetSpotLightAngle ( float pValue)
private

◆ SetSynchDirty()

proto native void SetSynchDirty ( )
protected

Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take effect only in MP on server side)

◆ SetTakeable()

void SetTakeable ( bool pState)
protected

◆ SetTemperature()

void SetTemperature ( float value,
bool allow_client = false )
inlineprotected
2063{};

◆ SetTemperatureMax()

void SetTemperatureMax ( )
inlineprotected
2065{};

◆ SetUniversalTemperatureSource()

void SetUniversalTemperatureSource ( UTemperatureSource uts)
inlineprotected
3247 {
3249 }

◆ SetViewIndex()

void SetViewIndex ( int index)
inlineprotected

Sets item preview index.

2849 {
2851
2852 if( GetGame().IsServer() )
2853 {
2854 SetSynchDirty();
2855 }
2856 }
int m_ViewIndex
Definition EntityAI.c:2845

Перекрестные ссылки GetGame().

◆ SetVisibleDuringDaylight()

proto native void SetVisibleDuringDaylight ( bool pState)
private

◆ SetWeightDirty()

void SetWeightDirty ( )
inlineprotected
2690 {
2691 #ifdef DEVELOPER
2692 if (WeightDebug.m_VerbosityFlags & WeightDebugType.SET_DIRTY_FLAG)
2693 {
2694 Print("---------------------------------------");
2695 Print("ent:" + this + " - SetWeightDirty");
2696 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
2697 {
2698 DumpStack();
2699 }
2700 Print("---------------------------------------");
2701 }
2702 #endif
2703 m_WeightDirty = 1;
2704 if (GetHierarchyParent())
2705 {
2706 GetHierarchyParent().SetWeightDirty();
2707 }
2708 }

Перекрестные ссылки DumpStack() и Print().

◆ SetWet()

void SetWet ( float value,
bool allow_client = false )
protected

◆ SetWetMax()

void SetWetMax ( )
protected

◆ ShowAllSelections()

void ShowAllSelections ( )
inlineprotected

Sets all animation values to 0, making them VISIBLE if they are configured in models.cfg in such way. These selections must also be defined in the entity's config class in 'AnimationSources'.

1262 {
1263 string cfg_path = "cfgVehicles " + GetType() + " AnimationSources";
1264
1265 if ( GetGame().ConfigIsExisting(cfg_path) )
1266 {
1267 int selections = GetGame().ConfigGetChildrenCount(cfg_path);
1268
1269 for (int i = 0; i < selections; i++)
1270 {
1271 string selection_name;
1272 GetGame().ConfigGetChildName(cfg_path, i, selection_name);
1274 }
1275 }
1276 }
void ShowSelection(string selection_name)
Shows selection of the given name. Must be configed in config.hpp and models.cfg.
Definition EntityAI.c:2493

Перекрестные ссылки GetGame() и GetType().

◆ ShowSelection()

void ShowSelection ( string selection_name)
inlineprotected

Shows selection of the given name. Must be configed in config.hpp and models.cfg.

2494 {
2495 if ( !ToDelete() )
2496 {
2497 SetAnimationPhase ( selection_name, 0 ); // 1 = hide, 0 = unhide!
2498 }
2499 }

◆ SoundHardBushFallingPlay()

void SoundHardBushFallingPlay ( )
inlineprotected
3158 {
3159 EffectSound sound = SEffectManager.PlaySound( "hardBushFall_SoundSet", GetPosition() );
3160 sound.SetAutodestroy( true );
3161 }
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Definition EffectManager.c:165

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ SoundHardTreeFallingPlay()

void SoundHardTreeFallingPlay ( )
inlineprotected
3146 {
3147 EffectSound sound = SEffectManager.PlaySound( "hardTreeFall_SoundSet", GetPosition() );
3148 sound.SetAutodestroy( true );
3149 }

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ SoundSoftBushFallingPlay()

void SoundSoftBushFallingPlay ( )
inlineprotected
3164 {
3165 EffectSound sound = SEffectManager.PlaySound( "softBushFall_SoundSet", GetPosition() );
3166 sound.SetAutodestroy( true );
3167 }

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ SoundSoftTreeFallingPlay()

void SoundSoftTreeFallingPlay ( )
inlineprotected
3152 {
3153 EffectSound sound = SEffectManager.PlaySound( "softTreeFall_SoundSet", GetPosition() );
3154 sound.SetAutodestroy( true );
3155 }

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

◆ SpawnEntityOnGround()

EntityAI SpawnEntityOnGround ( string object_name,
vector mat[4] )
inlineprotected
1966 {
1968 il.SetGround(NULL, mat);
1970 }
const int ECE_PLACE_ON_SURFACE
Definition CentralEconomy.c:37
const int RF_DEFAULT
Definition CentralEconomy.c:65
EntityAI SpawnEntity(string object_name, notnull InventoryLocation inv_loc, int iSetupFlags, int iRotation)
Definition gameplay.c:1503

Перекрестные ссылки ECE_PLACE_ON_SURFACE, RF_DEFAULT и SpawnEntity().

◆ SpawnEntityOnGroundPos()

EntityAI SpawnEntityOnGroundPos ( string object_name,
vector pos )
inlineprotected
1955 {
1957 vector mat[4];
1959 mat[3] = pos;
1960 il.SetGround(NULL, mat);
1962 }
Definition EnMath3D.c:28
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Definition EnMath3D.c:256

Перекрестные ссылки ECE_PLACE_ON_SURFACE, Math3D::MatrixIdentity4(), RF_DEFAULT и SpawnEntity().

◆ SpawnInInventoryOrGroundPos()

EntityAI SpawnInInventoryOrGroundPos ( string object_name,
GameInventory inv,
vector pos )
inlineprotected
1939 {
1940 if (inv)
1941 {
1942 EntityAI res = inv.CreateInInventory(object_name);
1943 if (res)
1944 {
1945 return res;
1946 }
1947 }
1948
1950 }
EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
Definition EntityAI.c:1954

◆ SwitchItemSelectionTexture()

void SwitchItemSelectionTexture ( EntityAI item,
string slot_name )
protected

◆ SwitchItemSelectionTextureEx()

void SwitchItemSelectionTextureEx ( EItemManipulationContext context,
Param par = null )
protected

◆ SwitchLight()

proto native void SwitchLight ( bool isOn)
protected

◆ TranslateSlotFromSelection()

bool TranslateSlotFromSelection ( string selection_name,
out int slot_id )
inlineprotected
3231 {
3232 return false;
3233 }

◆ TryDelete()

bool TryDelete ( )
inlineprotected
717 {
718 if (!IsPrepareToDelete())
719 {
720 Debug.Log("TryDelete - not ready for deletion");
721 return false;
722 }
723
724 if (GetGame().HasInventoryJunctureItem(this))
725 {
726 Debug.Log("TryDelete - deferred call");
727 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(TryDelete, DELETE_CHECK_DELAY, false);
728 return false;
729 }
730
732 Debug.Log("TryDelete - OnBeforeTryDelete end");
733 DeleteSafe();
734 Debug.Log("TryDelete - DeleteSafe end");
735
736 return true;
737 }
void OnBeforeTryDelete()

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame(), IsPrepareToDelete() и Debug::Log().

◆ UnpairRemote()

void UnpairRemote ( )
protected

◆ UpdateNetSyncVariableFloat()

proto native void UpdateNetSyncVariableFloat ( string variableName,
float minValue = 0,
float maxValue = 0,
int precision = 1 )
protected

◆ UpdateNetSyncVariableInt()

proto native void UpdateNetSyncVariableInt ( string variableName,
float minValue = 0,
float maxValue = 0 )
protected

◆ UpdateWeight()

void UpdateWeight ( WeightUpdateType updateType = WeightUpdateType.FULL,
float weightAdjustment = 0 )
protected

Поля

◆ DEAD_REPLACE_DELAY

const int DEAD_REPLACE_DELAY = 2000
private

◆ DELETE_CHECK_DELAY

const int DELETE_CHECK_DELAY = 100
private

◆ m_AttachmentExclusionMaskChildren

ref set<int> m_AttachmentExclusionMaskChildren
private

◆ m_AttachmentExclusionMaskGlobal

ref set<int> m_AttachmentExclusionMaskGlobal
private

◆ m_AttachmentExclusionSlotMap

ref map<int,ref set<int> > m_AttachmentExclusionSlotMap
private

◆ m_AttachmentsWithAttachments

ref array<EntityAI> m_AttachmentsWithAttachments
private

◆ m_AttachmentsWithCargo

ref array<EntityAI> m_AttachmentsWithCargo
private

◆ m_CanDisplayWeight

bool m_CanDisplayWeight
protected

◆ m_ComponentsBank

ref ComponentsBank m_ComponentsBank
private

◆ m_ConfigWeight

float m_ConfigWeight = ConfigGetInt("weight")
private

◆ m_DamageDisplayNameMap

ref map<int, string> m_DamageDisplayNameMap = new map<int, string>
private

◆ m_DamageZoneMap

ref DamageZoneMap m_DamageZoneMap
protected

◆ m_DeathSyncSent

bool m_DeathSyncSent
private

◆ m_DestructionBehaviourObj

ref DestructionEffectBase m_DestructionBehaviourObj
private

◆ m_ElapsedSinceLastUpdate

float m_ElapsedSinceLastUpdate
protected

◆ m_EM

ComponentEnergyManager m_EM
private

◆ m_HiddenSelectionsData

ref HiddenSelectionsData m_HiddenSelectionsData
private

◆ m_Initialized

bool m_Initialized = false
protected

◆ m_KilledByHeadshot

bool m_KilledByHeadshot
private

◆ m_KillerData

ref KillerData m_KillerData
private

◆ m_LastUpdatedTime

float m_LastUpdatedTime
private

◆ m_OldLocation

ref InventoryLocation m_OldLocation
private

◆ m_OnAttachmentReleaseLock

ref ScriptInvoker m_OnAttachmentReleaseLock
protected

◆ m_OnAttachmentSetLock

ref ScriptInvoker m_OnAttachmentSetLock
protected

◆ m_OnHitByInvoker

ref ScriptInvoker m_OnHitByInvoker
protected

◆ m_OnItemAddedIntoCargo

ref ScriptInvoker m_OnItemAddedIntoCargo
protected

◆ m_OnItemAttached

ref ScriptInvoker m_OnItemAttached
protected

◆ m_OnItemDetached

ref ScriptInvoker m_OnItemDetached
protected

◆ m_OnItemFlipped

ref ScriptInvoker m_OnItemFlipped
protected

◆ m_OnItemMovedInCargo

ref ScriptInvoker m_OnItemMovedInCargo
protected

◆ m_OnItemRemovedFromCargo

ref ScriptInvoker m_OnItemRemovedFromCargo
protected

◆ m_OnKilledInvoker

ref ScriptInvoker m_OnKilledInvoker
protected

◆ m_OnReleaseLock

ref ScriptInvoker m_OnReleaseLock
protected

◆ m_OnSetLock

ref ScriptInvoker m_OnSetLock
protected

◆ m_OnViewIndexChanged

ref ScriptInvoker m_OnViewIndexChanged
protected

◆ m_PendingDelete

bool m_PendingDelete = false
protected

◆ m_PreparedToDelete

bool m_PreparedToDelete = false
private

◆ m_RefresherViable

bool m_RefresherViable = false
private

◆ m_TransportHitRegistered

bool m_TransportHitRegistered = false
protected

◆ m_TransportHitVelocity

vector m_TransportHitVelocity
protected

◆ m_UniversalTemperatureSource

UTemperatureSource m_UniversalTemperatureSource
protected

◆ m_ViewIndex

int m_ViewIndex = 0
protected

view index Item view index is used to setup which camera will be used in item view widget in inventory. With this index you can setup various camera angles for different item states (e.g. fireplace, weapons).

◆ m_Weight

float m_Weight
private

◆ m_WeightDirty

bool m_WeightDirty = 1
private

◆ m_WeightEx

float m_WeightEx
private

Объявления и описания членов классов находятся в файлах: