103 bool m_PreparedToDelete =
false;
104 bool m_RefresherViable =
false;
105 bool m_WeightDirty = 1;
115 const int DEAD_REPLACE_DELAY = 2000;
116 const int DELETE_CHECK_DELAY = 100;
127 float m_ConfigWeight = ConfigGetInt(
"weight");
134 bool m_PendingDelete =
false;
136 bool m_TransportHitRegistered =
false;
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");
185 RegisterNetSyncVariableInt(
"m_ViewIndex", 0, 99);
187 RegisterNetSyncVariableBool(
"m_RefresherViable");
191 m_LastUpdatedTime = 0.0;
192 m_ElapsedSinceLastUpdate = 0.0;
194 m_CanDisplayWeight = ConfigGetBool(
"displayWeight");
196 InitDamageZoneMapping();
197 InitDamageZoneDisplayNameMapping();
237 if (m_ComponentsBank ==
NULL)
246 return m_ComponentsBank.DeleteComponent(
comp_type);
262 if (m_ComponentsBank)
263 return m_ComponentsBank.IsComponentAlreadyExist(
comp_type);
271 if ((!
GetGame().IsMultiplayer() ||
GetGame().IsServer()) && GetEconomyProfile())
273 float lifetime = GetEconomyProfile().GetLifetime();
280 m_RefresherViable =
true;
290 return m_RefresherViable;
296 super.SetDebugItem();
318 else if (IsMagazine())
362 return m_DamageZoneMap;
367 return m_DamageDisplayNameMap;
373 return m_CanDisplayWeight;
397 return GetCompBS() && GetCompBS().IsSkinned();
403 GetCompBS().SetAsSkinned();
408 if (!IsSkinned() &&
tool)
534 return (!HasAnyCargo() && GetInventory().AttachmentCount() == 0);
547 if (!
cargo)
return false;
549 if (
cargo.GetItemCount() > 0)
557 return m_AttachmentsWithCargo;
562 return m_AttachmentsWithAttachments;
575 return !(
GetParent() || GetHierarchyParent());
605 if (
ai &&
ai.IsBeingBackstabbed())
628 m_PendingDelete =
true;
640 if (GetHierarchyRootPlayer() ==
null)
645 GetHierarchyRootPlayer().JunctureDeleteItem(
this);
647 GetHierarchyRootPlayer().AddItemToDelete(
this);
659 return IsPreparedToDelete() || m_PendingDelete || ToDelete() ||
IsPendingDeletion();
664 if (
super.CanBeActionTarget())
665 return !IsSetForDeletion();
672 m_PreparedToDelete =
true;
677 return m_PreparedToDelete;
696 Debug.
Log(
"TryDelete - not ready for deletion");
700 if (
GetGame().HasInventoryJunctureItem(
this))
702 Debug.
Log(
"TryDelete - deferred call");
708 Debug.
Log(
"TryDelete - OnBeforeTryDelete end");
710 Debug.
Log(
"TryDelete - DeleteSafe end");
732 if (!GetHierarchyParent())
735 return GetHierarchyParent().GetHierarchyLevel(
lvl + 1);
740 InitAttachmentExclusionValues();
748 GetInventory().EEInit();
749 m_AttachmentsWithCargo.Clear();
750 m_AttachmentsWithAttachments.Clear();
751 for (
int i = 0;
i < GetInventory().AttachmentCount();
i++)
759 if (
attachment.GetInventory().GetAttachmentSlotsCount() > 0)
760 m_AttachmentsWithAttachments.Insert(
attachment);
765 MaxLifetimeRefreshCalc();
771 m_PendingDelete =
true;
772 GetInventory().EEDelete(parent);
782 g_Game.GetWorld().AddEnvShootingSource(pos, 1.0);
784 if (m_DestructionBehaviourObj && m_DestructionBehaviourObj.HasExplosionDamage())
807 Error(
"EntityAI::EEItemLocationChanged - detached, but old_owner is null");
815 Error(
"EntityAI::EEItemLocationChanged - attached, but new_owner is null");
834 m_LastUpdatedTime = 0.0;
837 GetInventory().ResetFlipCargo();
848 EntityAI parent = GetHierarchyParent();
853 parent.OnAttachmentRuined(
this);
871 if (!m_DestructionBehaviourObj)
874 if (m_DestructionBehaviourObj)
878 ErrorEx(
"Incorrect destruction behaviour type, make sure the class returned in 'GetDestructionBehaviour()' is a valid type inheriting from 'DestructionEffectBase'");
888 if (m_OnKilledInvoker)
889 m_OnKilledInvoker.Invoke(
this,
killer);
929 if (m_OnHitByInvoker)
946 PropagateExclusionValueRecursive(
item.GetAttachmentExclusionMaskAll(
slotId),
slotId);
949 if (m_ComponentsBank !=
NULL)
953 if (m_ComponentsBank.IsComponentAlreadyExist(
comp_key))
959 if (m_EM &&
item.GetCompEM())
962 if (
item.GetInventory().GetCargo())
963 m_AttachmentsWithCargo.Insert(
item);
965 if (
item.GetInventory().GetAttachmentSlotsCount() > 0)
966 m_AttachmentsWithAttachments.Insert(
item);
968 if (m_OnItemAttached)
979 ClearExclusionValueRecursive(
item.GetAttachmentExclusionMaskAll(
slotId),
slotId);
982 if (m_ComponentsBank !=
NULL)
986 if (m_ComponentsBank.IsComponentAlreadyExist(
comp_key))
992 if (m_EM &&
item.GetCompEM())
995 if (m_AttachmentsWithCargo.Find(
item) > -1)
996 m_AttachmentsWithCargo.RemoveItem(
item);
998 if (m_AttachmentsWithAttachments.Find(
item) > -1)
999 m_AttachmentsWithAttachments.RemoveItem(
item);
1002 if (m_OnItemDetached)
1010 if (m_OnItemAddedIntoCargo)
1011 m_OnItemAddedIntoCargo.Invoke(
item,
this);
1013 item.OnMovedInsideCargo(
this);
1020 if (m_OnItemRemovedFromCargo)
1021 m_OnItemRemovedFromCargo.Invoke(
item,
this);
1023 item.OnRemovedFromCargo(
this);
1028 if (m_OnItemMovedInCargo)
1029 m_OnItemMovedInCargo.Invoke(
item,
this);
1030 item.OnMovedWithinCargo(
this);
1035 if (!m_OnItemAttached)
1037 return m_OnItemAttached;
1042 if (!m_OnItemDetached)
1044 return m_OnItemDetached;
1049 if (!m_OnItemAddedIntoCargo)
1051 return m_OnItemAddedIntoCargo;
1056 if (!m_OnItemRemovedFromCargo)
1058 return m_OnItemRemovedFromCargo;
1063 if (!m_OnItemMovedInCargo)
1065 return m_OnItemMovedInCargo;
1070 if (!m_OnItemFlipped)
1072 return m_OnItemFlipped;
1077 if (!m_OnViewIndexChanged)
1079 return m_OnViewIndexChanged;
1091 if (!m_OnReleaseLock)
1093 return m_OnReleaseLock;
1098 if (!m_OnAttachmentSetLock)
1100 return m_OnAttachmentSetLock;
1105 if (!m_OnAttachmentReleaseLock)
1107 return m_OnAttachmentReleaseLock;
1112 if (!m_OnHitByInvoker)
1114 return m_OnHitByInvoker;
1119 if (!m_OnKilledInvoker)
1121 return m_OnKilledInvoker;
1190 if (GetHierarchyRootPlayer())
1191 GetHierarchyRootPlayer().SetProcessUIWarning(
true);
1245 if (
diff.Count() == 0)
1292 attachment.GetInventory().GetCurrentInventoryLocation(
il);
1295 int slot =
il.GetSlot();
1296 return !GetInventory().GetSlotLock(slot);
1319 EntityAI att = GetInventory().FindAttachment(slot);
1341 if (GetInventory() && GetInventory().GetCargo())
1342 return GetInventory().GetCargo().CanReceiveItemIntoCargo(
item));
1377 if (GetInventory() && GetInventory().GetCargo())
1492 Debug.
LogWarning(
"Obsolete function - use CanDisplayAttachmentSlot with slot id parameter");
1510 int count = GetInventory().GetAttachmentSlotsCount();
1514 slotID = GetInventory().GetAttachmentSlotId(
i);
1536 return GetInventory().GetCargo() !=
null;
1560 return GetHierarchyRootPlayer() ==
GetGame().GetPlayer();
1571 SetInvisible(
false);
1572 OnInvisibleSet(
false);
1573 SetInvisibleRecursive(
false, parent);
1591 return GetInventory().GetAttachmentSlotsCount();
1602 return GetInventory().FindAttachment(
slot_id);
1612 EntityAI parent = GetHierarchyParent();
1629 if (
GetGame().IsMultiplayer())
1630 return GetInventory().TakeEntityToInventory(
InventoryMode.JUNCTURE, flags,
item);
1632 return GetInventory().TakeEntityToInventory(
InventoryMode.PREDICTIVE, flags,
item);
1644 if (
GetGame().IsMultiplayer())
1662 if (
GetGame().IsMultiplayer())
1678 if (
GetGame().IsMultiplayer())
1696 if (
GetGame().IsMultiplayer())
1708 if (
GetGame().IsMultiplayer())
1726 if (
GetGame().IsMultiplayer())
1727 return GetInventory().TakeEntityAsAttachmentEx(
InventoryMode.JUNCTURE,
item, slot);
1729 return GetInventory().TakeEntityAsAttachmentEx(
InventoryMode.PREDICTIVE,
item, slot);
1733 return GetInventory().TakeEntityAsAttachmentEx(
InventoryMode.LOCAL,
item, slot);
1737 return GetInventory().TakeEntityAsAttachmentEx(
InventoryMode.SERVER,
item, slot);
1742 if (
GetGame().IsMultiplayer())
1758 if (
GetGame().IsMultiplayer())
1774 if (
GetGame().IsMultiplayer())
1793 if (
GetGame().IsMultiplayer())
1827 for (
int i = 0;
i < GetInventory().AttachmentCount();
i++)
1841 for (
int i = 0;
i < GetInventory().AttachmentCount();
i++)
2000 return m_HiddenSelectionsData;
2006 if (m_HiddenSelectionsData)
2007 return m_HiddenSelectionsData.GetHiddenSelectionIndex(selection);
2015 if (m_HiddenSelectionsData)
2016 return m_HiddenSelectionsData.m_HiddenSelections;
2018 return super.GetHiddenSelections();
2024 if (m_HiddenSelectionsData)
2025 return m_HiddenSelectionsData.m_HiddenSelectionsTextures;
2027 return super.GetHiddenSelectionsTextures();
2033 if (m_HiddenSelectionsData)
2034 return m_HiddenSelectionsData.m_HiddenSelectionsMaterials;
2036 return super.GetHiddenSelectionsMaterials();
2243 if (!
ctx.Read(
b1))
return false;
2244 if (!
ctx.Read(
b2))
return false;
2245 if (!
ctx.Read(
b3))
return false;
2246 if (!
ctx.Read(
b4))
return false;
2272 if (
GetGame().IsMultiplayer())
2296 Error(
"Synchronization error! Object " +
object +
" has no instance of the Energy Manager component!");
2315 if (m_ComponentsBank !=
NULL)
2319 if (m_ComponentsBank.IsComponentAlreadyExist(
comp_key))
2327 string text =
string.Empty;
2329 text +=
"Weight: " + GetWeightEx() +
"\n";
2330 text +=
"Disabled: " + GetIsSimulationDisabled() +
"\n";
2332 if (GetEconomyProfile())
2333 text +=
"CE Lifetime default: " + (
int)GetEconomyProfile().GetLifetime() +
"\n";
2334 text +=
"CE Lifetime remaining: " + (
int)GetLifetime() +
"\n";
2340 text +=
"Energy Source: " +
Object.GetDebugName(
compEM.GetEnergySource()) +
"\n";
2341 text +=
"Switched On: " +
compEM.IsSwitchedOn() +
"\n";
2342 text +=
"Is Working: " +
compEM.IsWorking() +
"\n";
2422 if (GetHierarchyParent())
2423 GetHierarchyParent().IncreaseLifetimeUp();
2503 case ERPCs.RPC_BS_SKINNED_STATE:
2509 if (
state && GetCompBS())
2510 GetCompBS().SetAsSkinnedClient();
2515 case ERPCs.RPC_EXPLODE_EVENT:
2524#ifdef DIAG_DEVELOPER
2538 GetInventory().GetAttachmentFromIndex(
i).FixEntity();
2546 cargo.GetItem(
i).FixEntity();
2559 return m_ConfigWeight * GetWetWeightModifier();
2566 return "(" + m_ConfigWeight +
"(config weight) * " + GetWetWeightModifier() +
"(Wetness Modifier))";
2567 return string.Empty;
2575 return GetWeightEx();
2589 Print(
"---------------------------------------");
2590 Print(
"ent:" +
this +
" - SetWeightDirty");
2593 Print(
"---------------------------------------");
2597 if (GetHierarchyParent())
2598 GetHierarchyParent().SetWeightDirty();
2641 WeightDebug.GetWeightDebug(
this).SetWeight(m_WeightEx);
2644 Print(
"ent:" +
this +
" - Dirty Recalc");
2673#ifdef DIAG_DEVELOPER
2681 Debug.
Log(
"======================== " +
GetType() +
" =================================");
2685 Debug.
Log(
"----------------------------------------------------------------------------------------------");
2692 Debug.
Log(
"======================== " +
GetType() +
" RECALC ===========================");
2697 Debug.
Log(
"----------------------------------------------------------------------------------------------");
2704 Debug.
Log(
"======================== PLAYER: " +
player +
" ===========================");
2706 Debug.
Log(
"New overall weight Player:" +
player.GetWeightEx().ToString());
2708 Debug.
Log(
"----------------------------------------------------------------------------------------------");
2715 Debug.
Log(
"======================== PLAYER RECALC: " +
player +
" ===========================");
2717 Debug.
Log(
"New overall weight Player:" +
player.GetWeightEx(
true).ToString());
2719 Debug.
Log(
"----------------------------------------------------------------------------------------------");
2728 int m_ViewIndex = 0;
2733 m_ViewIndex =
index;
2742 if (MemoryPointExists(
"invView2"))
2744#ifdef PLATFORM_WINDOWS
2746 GetInventory().GetCurrentInventoryLocation(
il);
2777#ifdef PLATFORM_CONSOLE
2788 Debug.
LogError(
"EntityAI: HitComponentForAI not set properly for that entity (" +
GetType() +
")");
2796 Debug.
LogError(
"EntityAI: DefaultHitComponent not set properly for that entity (" +
GetType() +
")");
2804 Debug.
LogError(
"EntityAI: DefaultHitPositionComponent not set for that entity (" +
GetType() +
")");
2810 Debug.
LogError(
"EntityAI: SuitableFinisherHitComponents not set for that entity (" +
GetType() +
")");
2868 if (m_LastUpdatedTime == 0)
2871 m_ElapsedSinceLastUpdate =
currentTime - m_LastUpdatedTime;
2883 ConfigGetTextArray(
"Attachments",
slots);
2886 ConfigGetTextArray(
"magazines",
mags);
2920 for (
int z = 0; z <
slots.Count(); z++)
2924 this.GetInventory().CreateInInventory(
child_name);
2959 case "disableContainerDamage":
2963 case "disableBaseDamage":
2969 SetAllowDamage(
false);
2989 for (
int i = 0;
i < GetInventory().GetAttachmentSlotsCount();
i++)
2998 item = parent.GetInventory().FindAttachment(slot);
3004 if (
item.GetInventory().AttachmentCount() > 0)
3006 for (
i = 0;
i <
item.GetInventory().GetAttachmentSlotsCount();
i++)
3021 sound.SetAutodestroy(
true);
3027 sound.SetAutodestroy(
true);
3033 sound.SetAutodestroy(
true);
3039 sound.SetAutodestroy(
true);
3044 if (!m_TransportHitRegistered)
3046 m_TransportHitRegistered =
true;
3055 if (
car.GetSpeedometerAbsolute() > 2)
3061 m_TransportHitRegistered =
false;
3066 impulse = 40 * m_TransportHitVelocity;
3074 if (m_TransportHitVelocity.
Length() > 0.1)
3080 m_TransportHitRegistered =
false;
3085 impulse = 40 * m_TransportHitVelocity;
3107 return GetUniversalTemperatureSource() !=
null && GetUniversalTemperatureSource().IsActive();
3112 return m_UniversalTemperatureSource;
3117 m_UniversalTemperatureSource =
uts;
3138 raib.SetPersistentPairID(
id);
3153 m_AttachmentExclusionMaskGlobal =
new set<int>;
3154 m_AttachmentExclusionMaskChildren =
new set<int>();
3156 int count = GetInventory().GetSlotIdCount();
3161 InitInherentSlotExclusionMap();
3162 InitGlobalExclusionValues();
3163 InitLegacyConfigExclusionValues();
3169 int count = GetInventory().GetSlotIdCount();
3176 slotId = GetInventory().GetSlotId(
i);
3177 SetAttachmentExclusionMaskSlot(
slotId, GetAttachmentExclusionInitSlotValue(
slotId));
3194 InitLegacySlotExclusionValuesImplicit();
3197 InitLegacySlotExclusionValuesDerived();
3204 if (m_AttachmentExclusionMaskGlobal.Count() > 0)
3208 int count = m_AttachmentExclusionSlotMap.Count();
3213 int countSet = m_AttachmentExclusionSlotMap.GetElement(
i).Count();
3230 int slotCount = GetInventory().GetSlotIdCount();
3233 slotId = GetInventory().GetSlotId(
i);
3240 tmp.Copy(GetAttachmentExclusionInitSlotValue(
slotId));
3244 SetAttachmentExclusionMaskSlot(
slotId,
tmp);
3251 tmp.Copy(GetAttachmentExclusionInitSlotValue(
slotId));
3255 SetAttachmentExclusionMaskSlot(
slotId,
tmp);
3262 tmp.Copy(GetAttachmentExclusionInitSlotValue(
slotId));
3263 if (ConfigGetBool(
"isStrap"))
3273 SetAttachmentExclusionMaskSlot(
slotId,
tmp);
3283 int slotCount = GetInventory().GetSlotIdCount();
3286 slotId = GetInventory().GetSlotId(
i);
3293 tmp.Copy(GetAttachmentExclusionMaskSlot(
slotId));
3294 if (ConfigGetBool(
"noNVStrap"))
3296 if (ConfigGetBool(
"noMask"))
3298 if (ConfigGetBool(
"noEyewear"))
3300 SetAttachmentExclusionMaskSlot(
slotId,
tmp);
3307 tmp.Copy(GetAttachmentExclusionMaskSlot(
slotId));
3308 if (ConfigGetBool(
"noNVStrap"))
3310 if (ConfigGetBool(
"noHelmet"))
3312 if (ConfigGetBool(
"noEyewear"))
3314 SetAttachmentExclusionMaskSlot(
slotId,
tmp);
3321 tmp.Copy(GetAttachmentExclusionMaskSlot(
slotId));
3322 if (ConfigGetBool(
"isStrap"))
3324 if (ConfigGetBool(
"noHelmet"))
3326 if (ConfigGetBool(
"noMask"))
3331 if (ConfigGetBool(
"noHelmet"))
3333 if (ConfigGetBool(
"noMask"))
3336 SetAttachmentExclusionMaskSlot(
slotId,
tmp);
3349 if (m_AttachmentExclusionMaskGlobal.Find(
value) == -1)
3350 m_AttachmentExclusionMaskGlobal.Insert(
value);
3356 int idx = m_AttachmentExclusionMaskGlobal.Find(
value);
3358 m_AttachmentExclusionMaskGlobal.Remove(
idx);
3363 m_AttachmentExclusionMaskGlobal.Clear();
3364 m_AttachmentExclusionMaskGlobal.Copy(
values);
3370 if (m_AttachmentExclusionSlotMap)
3373 ErrorEx(
"m_AttachmentExclusionSlotMap not available! Fill the 'inventorySlot[]' in the " +
this +
" config file.");
3382 GetInventory().GetCurrentInventoryLocation(
lcn);
3385 m_AttachmentExclusionMaskChildren.InsertSet(
passThis);
3386 EntityAI parent = GetHierarchyParent();
3388 parent.PropagateExclusionValueRecursive(
passThis,
lcn.GetSlot());
3399 GetInventory().GetCurrentInventoryLocation(
lcn);
3404 m_AttachmentExclusionMaskChildren.RemoveItem(
passThis[
i]);
3405 EntityAI parent = GetHierarchyParent();
3407 parent.ClearExclusionValueRecursive(
passThis,
lcn.GetSlot());
3419 values.InsertSet(m_AttachmentExclusionMaskGlobal);
3420 values.InsertSet(m_AttachmentExclusionMaskChildren);
3428 return m_AttachmentExclusionSlotMap.Get(
slotId);
3434 return m_AttachmentExclusionMaskGlobal;
3440 return m_AttachmentExclusionMaskChildren;
3486 GetInventory().GetCurrentInventoryLocation(
lcn);
3487 EntityAI parent = GetHierarchyParent();
3491 if (parent && parent !=
this)
3492 return parent.IsExclusionFlagPresentRecursive(
passThis,
lcn.GetSlot());
3494 return IsExclusionFlagPresent(
passThis);
enum EWetnessLevel BUSH_SOFT
enum EWetnessLevel HIDE_HANDS_SLOT
Param4< int, int, string, int > TSelectableActionInfoWithColor
enum EWetnessLevel UPDATE
enum EWetnessLevel HIDE_VICINITY
enum EWetnessLevel DETACHING
enum EWetnessLevel BUSH_HARD
enum EWetnessLevel LeftFrontLimb
enum EWetnessLevel REMOVE
enum EWetnessLevel RECURSIVE_ADD
enum EWetnessLevel TREE_HARD
enum EWetnessLevel TREE_SOFT
Param3 TSelectableActionInfo
enum EWetnessLevel ALWAYS
icon visibility, meant to be used in a bitmask
enum EWetnessLevel HIDE_PLAYER_CONTAINER
enum EWetnessLevel RightFrontLimb
enum EWetnessLevel LeftBackLimb
enum EWetnessLevel ATTACHING
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
eBleedingSourceType GetType()
bool IsDamageDestroyed(ActionTarget target)
override bool IsDestructionBehaviour()
override bool ReplaceOnDeath()
override string GetDeadItemName()
class Animal_CapraHircus extends AnimalBase GetDestructionBehaviour()
override void OnDamageDestroyed(int oldLevel)
override bool KeepHealthOnReplace()
proto native CEApi GetCEApi()
Get the CE API.
const int ECE_OBJECT_SWAP
const int ECE_PLACE_ON_SURFACE
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
PlayerSpawnPreset slotName
map< string, ref array< string > > DamageZoneMap
DamageType
exposed from C++ (do not change)
override bool IsPrepareToDelete()
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn
FindInventoryLocationType
flags for searching locations in inventory
InventoryLocationType
types of Inventory Location
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
float GetWeightSpecialized(bool forceRecalc=false)
override EWetnessLevel GetWetLevel()
override float GetWetMax()
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
override float GetSingleInventoryItemWeightEx()
override bool IsHologram()
override void OnItemAttachmentSlotChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
override void OnWasAttached(EntityAI parent, int slot_id)
override float GetWetMin()
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
override void OnWasDetached(EntityAI parent, int slot_id)
override bool CanDisplayAttachmentSlot(int slot_id)
class JsonUndergroundAreaTriggerData GetPosition
represents base for cargo storage for entities
static bool GetDisableBaseDamage()
static bool GetDisableContainerDamage()
static array< float > GetWetnessWeightModifiers()
void SwitchOn()
Energy manager: Switches ON the device so it starts doing its work if it has enough energy.
bool GetPreviousSwitchState()
int GetEnergySourceNetworkIDLow()
bool IsWorking()
Energy manager: Returns true if this device is working right now.
void SetPassiveState(bool state=true)
Energy manager: Changes the status of this device. When it's passive (true), the main timer and OnWor...
int GetEnergySourceStorageIDb4()
void UnplugThis()
Energy manager: Unplugs this device from its power source.
void HandleMoveInsideCargo(EntityAI container)
float GetEnergy()
Energy manager: Returns the amount of stored energy this device has.
bool IsPlugged()
Energy manager: Returns true if this device is plugged into some other device (even if they are OFF o...
EntityAI GetEnergySource()
Energy manager: Returns the energy source this device is plugged into.
void OnAttachmentRemoved(EntityAI elec_device)
int GetEnergySourceNetworkIDHigh()
bool IsPassive()
Energy manager: Returns true if this device is set to be passive. False if otherwise.
void StoreEnergySourceIDs(int b1, int b2, int b3, int b4)
int GetEnergySourceStorageIDb2()
void OnAttachmentAdded(EntityAI elec_device)
void SetEnergy(float new_energy)
Energy manager: Sets stored energy for this device. It ignores the min/max limit!
bool GetRestorePlugState()
void RestorePlugState(bool state)
void SwitchOff()
Energy manager: Switches OFF the device.
int GetEnergySourceStorageIDb1()
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...
bool IsSwitchedOn()
Energy manager: Returns state of the switch. Whenever the device is working or not does not matter....
int GetEnergySourceStorageIDb3()
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.
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.
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.
Wrapper class for managing sound through SEffectManager.
bool PredictiveDropEntity(notnull EntityAI item)
bool CanLoadAttachment(EntityAI attachment)
void LogError(string msg, string fnc_name="n/a")
LogError.
void OnSwitchOff()
Energy manager event: Called when the device is switched OFF.
bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
bool CanReceiveItemIntoCargo(EntityAI item)
calls this->CanReceiveItemIntoCargo(item)
float GetWetWeightModifier()
void OnEnergyConsumed()
Energy manager event: Called when energy was consumed on this device. ALWAYS CALL super....
proto native EntityAI GetHierarchyParent()
Returns direct parent of current entity.
proto native Man GetHierarchyRootPlayer()
Returns root of current hierarchy cast to Man.
EntityAI GetAttachmentByType(typename type)
Get attached entity by type.
bool IsEmpty()
is this container empty or not, checks both cargo and attachments
vector GetUniversalTemperatureSourcePosition()
void SoundSoftBushFallingPlay()
bool CanPutInCargo(EntityAI parent)
calls this->CanPutInCargo(parent)
bool ServerTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
bool CanCombineAttachment(notnull EntityAI e, int slot, bool stack_max_limit=false)
void HideSelection(string selection_name)
Hides selection of the given name. Must be configed in config.cpp and models.cfg.
int GetHideIconMask()
should the item's icon be hidden in any part of the inventory?
bool CanRemoveFromHands(EntityAI parent)
calls this->CanRemoveFromHands(parent)
bool CanBeTargetedByAI(EntityAI ai)
int GetTurnableValveIndex(int pComponentIndex)
bool CanBePlaced(Man player, vector position)
void EEDelete(EntityAI parent)
Called right before object deleting.
proto native float GetLifetimeMax()
Get max economy lifetime per instance - default is from DB (seconds)
bool PredictiveTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
ArrowManagerBase GetArrowManager()
float GetTemperatureInit()
void ProcessInvulnerabilityCheck(string servercfg_param)
bool CanDisplayAttachmentSlot(string slot_name)
void ClearExclusionValueRecursive(set< int > values, int slotId)
void OnOwnSocketReleased(EntityAI device)
Energy manager event: When something is UNPLUGGED from this device.
bool LocalTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
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...
void SoundHardBushFallingPlay()
bool ServerTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
float ConvertNonlethalDamage(float damage)
DEPRECATED - for legacy purposes.
void EEInventoryIn(Man newParentMan, EntityAI diz, EntityAI newParent)
string GetAttachmentSoundType()
returns sound type of attachment (used for clothing and weapons on DayZPlayerImplement,...
bool IgnoreOutOfReachCondition()
bool PredictiveTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
proto native bool IsPilotLight()
bool CanRemoveFromCargo(EntityAI parent)
calls this->CanRemoveFromCargo(parent)
EntityAI SpawnEntityOnGround(string object_name, vector mat[4])
void SwitchItemSelectionTexture(EntityAI item, string slot_name)
void EEParentedFrom(EntityAI parent)
Called from 'IEntity.RemoveChild' or 'IEntity.AddChild' when hierarchy changes.
bool GetInventoryHandAnimation(notnull InventoryLocation loc, out int value)
ScriptInvoker GetOnItemRemovedFromCargo()
void AfterStoreLoad()
Called when entity is being loaded from DB or Storage (after all children loaded)
void RegisterTransportHit(Transport transport)
bool OnStoreLoad(ParamsReadContext ctx, int version)
Called when data is loaded from persistence (on server side).
void SetPersistentPairID(int id)
void OnIsUnplugged(EntityAI last_energy_source)
Energy manager event: Called when this device is UNPLUGGED from the energy source.
array< EntityAI > GetAttachmentsWithAttachments()
bool HasAnyCargo()
is this container empty or not, checks only cargo
ScriptInvoker GetOnSetLock()
bool CanSwapEntities(EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
void OnBinLoadItemsDropped()
Called when an item fails to get loaded into the inventory of an entity and gets dropped.
void OnDebugSpawnEx(DebugSpawnParams params)
ref ScriptInvoker m_OnAttachmentSetLock
EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
override TStringArray GetHiddenSelectionsMaterials()
Returns the hiddenSelectionsMaterials array from the object's config.
ref array< EntityAI > m_AttachmentsWithCargo
override TStringArray GetHiddenSelections()
Returns the hiddenSelectionsTextures array from the object's config.
ref InventoryLocation m_OldLocation
bool IsIgnoredByConstruction()
void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
float HeightCheckOverride()
used as script-side override of distance for specific height checks
set< int > GetAttachmentExclusionMaskSlot(int slotId)
Specific slot behavior.
proto native void PlaceOnSurfaceRotated(out vector trans[4], vector pos, float dx=0, float dz=0, float fAngle=0, bool align=false)
void SetAttachmentExclusionMaskSlot(int slotId, set< int > values)
sets values for specific slot
bool IsRefresherSignalingViable()
ScriptInvoker GetOnKilledInvoker()
EntityAI SpawnInInventoryOrGroundPos(string object_name, GameInventory inv, vector pos)
ScriptInvoker GetOnAttachmentReleaseLock()
void SetBayonetAttached(bool pState, int slot_idx=-1)
bool TranslateSlotFromSelection(string selection_name, out int slot_id)
override TStringArray GetHiddenSelectionsTextures()
Returns the hiddenSelectionsTextures array from the object's config.
bool OnAction(int action_id, Man player, ParamsReadContext ctx)
float GetInventoryAndCargoWeight(bool forceRecalc=false)
ref array< EntityAI > m_AttachmentsWithAttachments
override EntityAI ProcessMeleeItemDamage(int mode=0)
void IncreaseLifetimeUp()
Reset economy lifetime to default across entity hierarchy all the way to the topmost entity.
void OnIgnitedThisFailed(EntityAI fire_source)
Executed on Server when some item failed to ignite this one.
bool CanReleaseFromHands(EntityAI handheld)
calls this->CanReleaseFromHands(handheld)
float GetWeightEx(bool forceRecalc=false)
returns overall weight of the entity, 'forceRecalc = true' is meant to be used only when debugging,...
void EEItemDetached(EntityAI item, string slot_name)
bool IsValveTurnable(int pValveIndex)
void OnDebugButtonPressServer(int button_index)
proto native GameInventory GetInventory()
ref ScriptInvoker m_OnKilledInvoker
void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
bool LocalTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
bool LocalTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
void OnInitEnergy()
Energy manager event: Object's initialization. Energy Manager is fully initialized by this point.
bool IsTwoHandedBehaviour()
returns item behaviour of item (more in ItemBase)
bool LocalTakeEntityToCargo(notnull EntityAI item)
string ChangeIntoOnAttach(string slot)
void OnStoreSave(ParamsWriteContext ctx)
Engine calls this function to collect data from entity to store for persistence (on server side).
ref ScriptInvoker m_OnSetLock
void InitDamageZoneMapping()
Initializes script-side map of damage zones and their components (named selections in models)
ref ScriptInvoker m_OnItemDetached
void OnPlacementCancelled(Man player)
bool DoPlacingHeightCheck()
Do the roof check when placing this?
proto native void CreateAndInitInventory()
void OnWorkStart()
Energy manager event: Called only once when this device starts doing its work.
bool HasTurnableValveBehavior()
Turnable Valve behaviour.
bool PredictiveTakeEntityToCargoEx(notnull EntityAI item, int idx, int row, int col)
Put item into into cargo on specific cargo location.
bool PredictiveTakeEntityToCargo(notnull EntityAI item)
Put item into into cargo.
ScriptInvoker GetOnItemMovedInCargo()
bool CanPutIntoHands(EntityAI parent)
calls this->CanPutIntoHands(parent)
void EECargoMove(EntityAI item)
bool IsUniversalTemperatureSource()
Universal Temperature Sources Helpers.
proto native void RegisterNetSyncVariableBoolSignal(string variableName)
when bool variable is true, it's sent to clients and become false again
set< int > GetAttachmentExclusionMaskGlobal()
Global mask value, independent of slot-specific behavior!
bool PredictiveTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
bool LocalTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
void SetFromProjectile(ProjectileStoppedInfo info)
string GetDestructionBehaviour()
proto native owned string GetObjectMaterial(int index)
set< int > GetAttachmentExclusionInitSlotValue(int slotId)
override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGloba...
void OnWork(float consumed_energy)
Energy manager event: Called every device update if its supposed to do some work. The update can be e...
void CombineItemsClient(EntityAI entity2, bool use_stack_max=false)
void DebugDirectionDelete()
bool IsSkinned()
Skinning.
static EWetnessLevel GetWetLevelInternal(float wetness)
void OnIsPlugged(EntityAI source_device)
Energy manager event: Called when this device is plugged into some energy source.
ref ScriptInvoker m_OnViewIndexChanged
proto native void SetObjectMaterial(int index, string mat_name)
Change material in hiddenSelections.
Shape DebugDirectionDraw(float distance=1)
UTemperatureSource GetUniversalTemperatureSource()
bool DisassembleOnLastDetach()
bool ServerTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
void EEItemAttached(EntityAI item, string slot_name)
void EEOnAfterLoad()
Called when entity is part of "connected system" and being restored after load.
int GetButtstockAttachmentIdx()
bool CanBeCombined(EntityAI other_item, bool reservation_check=true, bool stack_max_limit=false)
proto native void UpdateNetSyncVariableFloat(string variableName, float minValue=0, float maxValue=0, int precision=1)
void OnWasDetached(EntityAI parent, int slot_id)
proto native void SetSimpleHiddenSelectionState(int index, bool state)
Simple hidden selection state; 0 == hidden.
void ExecuteActionsConnectedToValve(int pValveIndex)
string CanBePlacedFailMessage(Man player, vector position)
Method which returns message why object can't be placed at given position.
void OnIgnitedTarget(EntityAI target_item)
Executed on Server when this item ignites some target item.
bool CanReceiveItemIntoHands(EntityAI item_to_hands)
calls this->CanReceiveItemIntoHands(item_to_hands)
bool CanBeSkinnedWith(EntityAI tool)
void EEOnCECreate()
Called when entity is being created as new by CE/ Debug.
bool CanDisplayAttachmentSlot(int slot_id)
bool LocalTakeEntityAsAttachment(notnull EntityAI item)
bool IsOneHandedBehaviour()
returns item behaviour of item (more in ItemBase)
ref ScriptInvoker m_OnItemMovedInCargo
void EECargoIn(EntityAI item)
int GetMeleeTargetType()
value is related to EMeleeTargetType
ref HiddenSelectionsData m_HiddenSelectionsData
void OnIgnitedTargetFailed(EntityAI target_item)
Executed on Server when this item failed to ignite target item.
bool HasButtstockAttached()
proto native void UpdateNetSyncVariableInt(string variableName, float minValue=0, float maxValue=0)
array< EntityAI > GetAttachmentsWithCargo()
int GetViewIndex()
Returns item preview index !!!! IF OVERRIDING with more dynamic events call GetOnViewIndexChanged() i...
void OnOwnSocketTaken(EntityAI device)
Energy manager event: When something is plugged into this device.
bool IsPreparedToDelete()
bool ServerTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
string GetDefaultHitPositionComponent()
returns default hit position component name for the Entity (overriden by type if needed - used mainly...
bool LocalTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
override bool IsHologram()
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.
void GetDebugButtonNames(out string button1, out string button2, out string button3, out string button4)
void EEKilled(Object killer)
called on server when the entity is killed
EntityAI GetAttachmentByConfigTypeName(string type)
Get attached entity by config type name.
ref set< int > m_AttachmentExclusionMaskGlobal
bool IsTargetIgnitionSuccessful(EntityAI item_target)
Final evaluation just before the target item is actually ignited. Evaluated on Server.
ref ComponentsBank m_ComponentsBank
proto native void IncreaseLifetime()
Reset economy lifetime to default (seconds)
bool KeepHealthOnReplace()
override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
void InsertAgent(int agent, float count=1)
ref ScriptInvoker m_OnItemAddedIntoCargo
void AddTemperature(float value)
void OnRemovedFromCargo(EntityAI container)
Called when this item exits cargo of some container.
proto native float GetLifetime()
Get remaining economy lifetime (seconds)
proto native owned string GetObjectTexture(int index)
bool IsHeavyBehaviour()
returns item behaviour of item (more in ItemBase)
void OnIgnitedThis(EntityAI fire_source)
Executed on Server when some item ignited this one.
void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
void OnSwitchOn()
Energy manager event: Called when the device is switched on.
bool CanDropEntity(notnull EntityAI item)
Returns if item can be dropped out from this entity.
float GetTemperatureMin()
bool PredictiveTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
ScriptInvoker GetOnItemAttached()
void OnDamageDestroyed(int oldLevel)
Called when the health gets to the min value, 'oldLevel' is previous health level,...
float m_ElapsedSinceLastUpdate
void OnWorkStop()
Energy manager event: Called when the device stops working (was switched OFF or ran out of energy)
bool CanIgniteItem(EntityAI ignite_target=NULL)
Override this method and check if the given item can be ignited right now by this one....
ScriptInvoker GetOnItemAddedIntoCargo()
ref ScriptInvoker m_OnItemAttached
RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
Remotely controlled devices helpers.
bool ServerTakeEntityToCargo(notnull EntityAI item)
ref ScriptInvoker m_OnItemFlipped
bool CanSaveItemInHands(EntityAI item_in_hands)
UTemperatureSource m_UniversalTemperatureSource
bool CanBeIgnitedBy(EntityAI igniter=NULL)
Override this method so it checks whenever this item can be ignited right now or not....
override void EOnFrame(IEntity other, float timeSlice)
ScriptInvoker GetOnHitByInvoker()
void MaxLifetimeRefreshCalc()
Calculates if the max lifetime is higher than refresher frequency (i.e. gets kept alive by refresher)
bool ServerDropEntity(notnull EntityAI item)
proto native void DestroyInventory()
bool LocalTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
void SetViewIndex(int index)
Sets item preview index.
void ShowSelection(string selection_name)
Shows selection of the given name. Must be configed in config.hpp and models.cfg.
void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
bool CanAssignToQuickbar()
array< string > GetSuitableFinisherHitComponents()
void OnCEUpdate()
Central economy calls this function whenever going over all the entities.
ref KillerData m_KillerData
proto native void RegisterNetSyncVariableObject(string variableName)
registers object variable synchronized over network, only synchronizes if network id is assigned....
proto native void SetLifetimeMax(float fLifeTime)
Set (override) max economy lifetime per entity instance (seconds)
void OnHologramBeingPlaced(Man player)
DamageZoneMap GetEntityDamageZoneMap()
bool ServerTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
void SetTemperature(float value, bool allow_client=false)
void OnEnergyAdded()
Energy manager event: Called when energy was added on this device. ALWAYS CALL super....
ref ScriptInvoker m_OnHitByInvoker
string GetInvulnerabilityTypeString()
bool PredictiveTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
proto native CEItemProfile GetEconomyProfile()
Get economy item profile (if assigned, otherwise null)
bool CheckExclusionAccessCondition(int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
bool HasInternalExclusionConflicts(int targetSlot)
checks if any attachment or item state would interfere with this being attached into a different slot...
void DebugDirectionSetColor(int color)
bool LocalTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
ComponentEnergyManager m_EM
proto native bool IsSimpleHiddenSelectionVisible(int index)
proto native void RegisterNetSyncVariableFloat(string variableName, float minValue=0, float maxValue=0, int precision=1)
registers float variable synchronized over network
bool LocalTakeEntityToCargoEx(notnull EntityAI item, int idx, int row, int col)
bool ServerTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
void UpdateWeight(WeightUpdateType updateType=WeightUpdateType.FULL, float weightAdjustment=0)
float ConvertNonlethalDamage(float damage, DamageType damageType)
void InitLegacySlotExclusionValuesImplicit()
adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)
proto native EntityAI GetHierarchyRoot()
Returns root of current hierarchy (for example: if this entity is in Backpack on gnd,...
void SwitchItemSelectionTextureEx(EItemManipulationContext context, Param par=null)
float HeightStartCheckOverride()
used as script-side override of start pos for specific height checks
bool HasFlammableMaterial()
Override this method to return TRUE when this item has or can provide fire. Evaluated on server and c...
bool IsExclusionFlagPresentRecursive(set< int > values, int targetSlot)
Gets flag from what is effectively an owner.
ComponentBodyStaging GetCompBS()
Use this to access Body Staging component on dead character. Returns NULL if the given object lacks s...
HiddenSelectionsData GetHiddenSelectionsData()
void OnWetLevelChanged(EWetnessLevel newLevel, EWetnessLevel oldLevel)
void DebugBBoxSetColor(int color)
void AdjustExclusionAccessCondition(int occupiedSlot, int testedSlot, set< int > value, inout set< int > adjustedValue)
if we want to filter
string GetHitComponentForAI()
Returns hit component for the Entity (overriden for each Type - PlayerBase, DayZInfected,...
bool HasComponent(int comp_type)
IsComponentExist.
void LogWarning(string msg, string fnc_name="n/a")
LogWarning.
ScriptInvoker GetOnViewIndexChanged()
void SoundHardTreeFallingPlay()
void AttemptDestructionBehaviour(int oldLevel, int newLevel, string zone)
void OnItemAttachmentSlotChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
void SetUniversalTemperatureSource(UTemperatureSource uts)
float GetConfigWeightModified()
int GetBayonetAttachmentIdx()
ComponentEnergyManager GetCompEM()
void RemoveAllAgentsExcept(int agent_to_keep)
void SetTakeable(bool pState)
bool IsDestructionBehaviour()
bool PredictiveTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
Put item anywhere into this entity (as attachment or into cargo, recursively)
proto native void SetObjectTexture(int index, string texture_name)
Change texture in hiddenSelections.
bool ServerTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
set< int > GetAttachmentExclusionMaskAll(int slotId)
Slot-specific, children (attachments), and additional (state etc.) masks combined.
void SetButtstockAttached(bool pState, int slot_idx=-1)
int GetTargetQuantityMax(int attSlotID=-1)
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
override void Delete()
Delete this object in next frame.
bool CanDisplayWeight()
'displayWeight' in item config
proto void GetPersistentID(out int b1, out int b2, out int b3, out int b4)
void SoundSoftTreeFallingPlay()
bool InitLegacyExclusionCheck()
float GetSingleInventoryItemWeightEx()
void PropagateExclusionValueRecursive(set< int > values, int slotId)
proto native void SwitchLight(bool isOn)
EWetnessLevel GetWetLevel()
bool HasEnergyManager()
If this item has class EnergyManager in its config then it returns true. Otherwise returns false.
void ShowAllSelections()
Sets all animation values to 0, making them VISIBLE if they are configured in models....
bool CanSwitchDuringAttach(EntityAI parent)
ScriptInvoker GetOnItemFlipped()
bool CanReceiveAttachment(EntityAI attachment, int slotId)
calls this->CanReceiveAttachment(attachment)
void HideAllSelections()
Sets all animation values to 1, making them INVISIBLE if they are configured in models....
void InitGlobalExclusionValues()
override to init part of the mask, independent of slot-specific behavior
void SetPrepareToDelete()
override bool IsEntityAI()
proto native void RegisterNetSyncVariableBool(string variableName)
registers bool variable synchronized over network
void SetWet(float value, bool allow_client=false)
bool LocalDropEntity(notnull EntityAI item)
bool CanSwapItemInCargo(EntityAI child_entity, EntityAI new_entity)
calls this->CanSwapItemInCargo(child_entity, new_entity)
bool IsInventoryVisible()
void OnPlacementStarted(Man player)
bool PlacementCanBeRotated()
Should return false if you want to disable hologram rotation.
Component GetComponent(int comp_type, string extended_class_name="")
GetComponent.
ScriptInvoker GetOnAttachmentSetLock()
void EEInventoryOut(Man oldParentMan, EntityAI diz, EntityAI newParent)
bool CanPutAsAttachment(EntityAI parent)
calls this->CanPutAsAttachment(parent)
proto native void SetAITargetCallbacks(AbstractAITargetCallbacks callbacks)
void InitDamageZoneDisplayNameMapping()
Initialize map of damage zone display names for more optimized retrieval.
ref DestructionEffectBase m_DestructionBehaviourObj
Component CreateComponent(int comp_type, string extended_class_name="")
CreateComponent.
void OnWasAttached(EntityAI parent, int slot_id)
ref ScriptInvoker m_OnItemRemovedFromCargo
void EECargoOut(EntityAI item)
void InitLegacySlotExclusionValuesDerived()
void InitLegacyConfigExclusionValues()
proto native void SetLifetime(float fLifeTime)
Set (override) remaining economy lifetime (seconds)
int GetHierarchyLevel(int lvl=0)
EntityAI FindAttachmentBySlotName(string slot_name)
bool CanDisplayAnyAttachmentSlot()
void SetQuantityToMinimum()
bool CanAssignAttachmentsToQuickbar()
bool CanLoadItemIntoCargo(EntityAI item)
calls this->CanLoadItemIntoCargo(item), is called on server start when loading in the storage
bool IsThisIgnitionSuccessful(EntityAI item_source=NULL)
Final evaluation just before this item is actually ignited from fire source. Evaluated on Server.
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!...
void RemoveAgent(int agent_id)
bool DeleteComponent(int comp_type)
DeleteComponent.
bool IsExclusionFlagPresent(set< int > values)
checks 'this' if the incoming flag is present for the current state (slot behavior and others)
void SetAttachmentExclusionMaskGlobal(set< int > values)
void SetInvisibleRecursive(bool invisible, EntityAI parent=null, array< int > attachments=null)
bool LocalTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
void Log(string msg, string fnc_name="n/a")
Log.
proto native void SetSynchDirty()
Sets object synchronization dirty flag, which signalize that object wants to be synchronized (take ef...
void EEInit()
Called upon object creation.
vector GetDefaultHitPosition()
bool PredictiveTakeEntityAsAttachment(notnull EntityAI item)
Put item into as attachment.
int GetHiddenSelectionIndex(string selection)
Returns index of the string found in cfg array 'hiddenSelections'. If it's not found then it returns ...
bool HasBayonetAttached()
void InitInherentSlotExclusionMap()
map stored on instance to better respond to various state changes
bool CanReleaseCargo(EntityAI cargo)
calls this->CanReleaseCargo(cargo)
float GetLiquidThroughputCoef()
Returns liquid throughput coeficient.
bool CanDetachAttachment(EntityAI parent)
calls this->CanDetachAttachment(parent)
ref ScriptInvoker m_OnAttachmentReleaseLock
void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
ref ScriptInvoker m_OnReleaseLock
void EEParentedTo(EntityAI parent)
Called from 'IEntity.AddChild'.
map< int, string > GetEntityDamageDisplayNameMap()
void OnMovedInsideCargo(EntityAI container)
Called when this item enters cargo of some container.
void EEHitByRemote(int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
void ClearSingleExclusionValueGlobal(EAttExclusions value)
to help with item staging exclusions
void OnVariablesSynchronized()
Called on clients after receiving synchronization data from server.
void OnAttachmentRuined(EntityAI attachment)
Called when some attachment of this parent is ruined. Called on server and client side.
void OnDebugButtonPressClient(int button_index)
proto native void SetPilotLight(bool isOn)
set< int > GetAttachmentExclusionMaskChildren()
Mask value coming from the item's attachments.
void AddSingleExclusionValueGlobal(EAttExclusions value)
to help with item staging exclusions
proto native void RegisterNetSyncVariableInt(string variableName, int minValue=0, int maxValue=0)
registers int variable synchronized over network
bool CanReleaseAttachment(EntityAI attachment)
calls this->CanReleaseAttachment(attachment)
bool CanDisplayAttachmentCategory(string category_name)
void OnMovedWithinCargo(EntityAI container)
Called when this item moves within cargo of some container.
override bool CanBeActionTarget()
bool ServerTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
vector m_TransportHitVelocity
void PairRemote(notnull EntityAI trigger)
void OnWetChanged(float newVal, float oldVal)
string GetDefaultHitComponent()
returns default hit component for the Entity (overriden for each Type - PlayerBase,...
ref DamageZoneMap m_DamageZoneMap
bool IsIgnited()
Override this method and make it so it returns whenever this item is on fire right now or not....
bool CheckExclusionAccessPropagation(int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
special propagation contition
ScriptInvoker GetOnReleaseLock()
ref set< int > m_AttachmentExclusionMaskChildren
float GetTemperatureMax()
bool ServerTakeEntityAsAttachment(notnull EntityAI item)
ref map< int, ref set< int > > m_AttachmentExclusionSlotMap
string ChangeIntoOnDetach()
ScriptInvoker GetOnItemDetached()
void InitAttachmentExclusionValues()
int GetSlotsCountCorrect()
script counterpart to engine's class Inventory
provides access to slot configuration
const int INVALID
Invalid slot (-1)
static proto native bool GetShowForSlotId(int slot_Id)
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
The class that will be instanced (moddable)
Manager class for managing Effect (EffectParticle, EffectSound)
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.
ScriptInvoker Class provide list of callbacks usage:
Serialization general interface. Serializer API works with:
Base native class for all motorized wheeled vehicles.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native float Length()
Returns length of vector (magnitude)
proto native CGame GetGame()
const int COMP_TYPE_BODY_STAGING
const int COMP_TYPE_COUNT
const int COMP_TYPE_ENERGY_MANAGER
const int COMP_TYPE_ETITY_DEBUG
void Error(string err)
Messagebox with error message.
proto void DumpStack()
Prints current call stack (stack trace)
proto void Print(void var)
Prints content of variable to console/log.
bool IsPendingDeletion()
Get whether the Effect is queued up for being cleaned up.
const float MELEE_ITEM_DAMAGE
const int REFRESHER_FREQUENCY_DEFAULT
array< string > TStringArray
const float STATE_SOAKING_WET
const float STATE_DRENCHED
const float LIQUID_THROUGHPUT_DEFAULT
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto native bool dBodyIsActive(notnull IEntity ent)
proto void dBodyApplyImpulse(notnull IEntity body, vector impulse)
Applies impuls on a rigidbody (origin)
const int SAT_DEBUG_ACTION
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.