10enum SurfaceAnimationBone
35enum EItemManipulationContext
43enum EInventoryIconVisibility
55 OCCUPANCY_INVALID = -1,
57 LEGACY_EYEWEAR_HEADGEAR,
59 LEGACY_HEADSTRAP_HEADGEAR,
60 LEGACY_HEADSTRAP_MASK,
62 LEGACY_HEADGEAR_EYEWEWEAR,
63 LEGACY_HEADGEAR_HEADSTRAP,
65 LEGACY_MASK_EYEWEWEAR,
66 LEGACY_MASK_HEADSTRAP,
68 EXCLUSION_HEADGEAR_HELMET_0,
70 EXCLUSION_HEADSTRAP_0,
75 EXCLUSION_GLASSES_REGULAR_0,
76 EXCLUSION_GLASSES_TIGHT_0,
79 SHAVING_HEADGEAR_ATT_0,
80 SHAVING_EYEWEAR_ATT_0,
87 static DebugSpawnParams
None()
89 DebugSpawnParams params =
new DebugSpawnParams();
90 params.m_Player = null;
94 static DebugSpawnParams WithPlayer(Man player)
96 DebugSpawnParams params =
new DebugSpawnParams();
97 params.m_Player = player;
102class TSelectableActionInfoArrayEx
extends array<ref Param> {}
108 bool m_DeathSyncSent;
109 bool m_KilledByHeadshot;
110 bool m_PreparedToDelete =
false;
111 bool m_RefresherViable =
false;
112 bool m_WeightDirty = 1;
115 private ref set<int> m_AttachmentExclusionMaskGlobal;
116 private ref set<int> m_AttachmentExclusionMaskChildren;
123 const int DEAD_REPLACE_DELAY = 250;
124 const int DELETE_CHECK_DELAY = 100;
135 float m_ConfigWeight = ConfigGetInt(
"weight");
137 private float m_LastUpdatedTime;
205 float m_LastFTChangeTime;;
206 float m_PresumedTimeRemaining;
213 string param_access_energy_sys =
"CfgVehicles " + type +
" EnergyManager ";
214 bool is_electic_device =
g_Game.ConfigIsExisting(param_access_energy_sys);
216 if (is_electic_device)
234 m_LastUpdatedTime = 0.0;
239 InitDamageZoneMapping();
240 InitDamageZoneDisplayNameMapping();
255 void InitItemVariables()
257 m_VarTemperatureInit = ConfigGetFloat(
"varTemperatureInit");
258 m_VarTemperatureMin = ConfigGetFloat(
"varTemperatureMin");
259 m_VarTemperatureMax = ConfigGetFloat(
"varTemperatureMax");
261 if (ConfigIsExisting(
"varTemperatureFreezePoint"))
262 m_VarTemperatureFreezeThreshold = ConfigGetFloat(
"varTemperatureFreezePoint");
264 m_VarTemperatureFreezeThreshold =
float.LOWEST;
266 if (ConfigIsExisting(
"varTemperatureThawPoint"))
267 m_VarTemperatureThawThreshold = ConfigGetFloat(
"varTemperatureThawPoint");
269 m_VarTemperatureThawThreshold =
float.LOWEST;
271 m_VarTemperatureFreezeTime = Math.Clamp(ConfigGetFloat(
"varTemperatureFreezeTime"),1,
float.
MAX);
272 m_VarTemperatureThawTime = Math.Clamp(ConfigGetFloat(
"varTemperatureThawTime"),1,
float.
MAX);
273 if (ConfigIsExisting(
"varTemperatureOverheatTime"))
274 m_VarTemperatureOverheatTime = ConfigGetFloat(
"varTemperatureOverheatTime");
276 m_VarTemperatureOverheatTime = -1;
278 if (ConfigIsExisting(
"varHeatPermeabilityCoef"))
279 m_VarHeatPermeabilityCoef = ConfigGetFloat(
"varHeatPermeabilityCoef");
281 m_VarHeatPermeabilityCoef = 1;
285 RegisterNetSyncVariableFloat(
"m_VarTemperature", GetTemperatureMin(),GetTemperatureMax());
286 RegisterNetSyncVariableBool(
"m_IsFrozen");
289 m_TAC =
new TemperatureAccessComponent(
this);
292 m_FreezeThawProgress = -1;
309 return EInventoryIconVisibility.ALWAYS;
312 private ref ComponentsBank m_ComponentsBank;
313 ComponentEnergyManager m_EM;
316 Component CreateComponent(
int comp_type,
string extended_class_name=
"")
318 return GetComponent(comp_type, extended_class_name);
322 Component GetComponent(
int comp_type,
string extended_class_name=
"")
324 if ( m_ComponentsBank == NULL )
325 m_ComponentsBank =
new ComponentsBank(
this);
327 return m_ComponentsBank.GetComponent(comp_type, extended_class_name);
331 bool DeleteComponent(
int comp_type)
333 return m_ComponentsBank.DeleteComponent(comp_type);
352 bool HasComponent(
int comp_type)
354 if ( m_ComponentsBank )
355 return m_ComponentsBank.IsComponentAlreadyExist(comp_type);
361 void MaxLifetimeRefreshCalc()
363 if ( (!
g_Game.IsMultiplayer() ||
g_Game.IsServer()) && GetEconomyProfile() )
365 float lifetime = GetEconomyProfile().GetLifetime();
366 int frequency = GetCEApi().GetCEGlobalInt(
"FlagRefreshFrequency");
367 if ( frequency <= 0 )
369 frequency = GameConstants.REFRESHER_FREQUENCY_DEFAULT;
372 if ( frequency <= lifetime )
374 m_RefresherViable =
true;
386 return m_RefresherViable;
390 override void SetDebugItem()
392 super.SetDebugItem();
399 void InitDamageZoneMapping()
402 DamageSystem.GetDamageZoneMap(
this,m_DamageZoneMap);
406 void InitDamageZoneDisplayNameMapping()
410 string component_name;
416 else if ( IsMagazine() )
425 path_base =
string.Format(
"%1 %2 DamageSystem DamageZones", path_base,
GetType() );
427 if ( !
g_Game.ConfigIsExisting(path_base) )
429 component_name = GetDisplayName();
430 g_Game.FormatRawConfigStringKeys(component_name);
431 m_DamageDisplayNameMap.Insert(
"".Hash(), component_name );
436 GetDamageZones( zone_names );
438 for (
int i = 0; i < zone_names.Count(); i++ )
440 path =
string.Format(
"%1 %2 displayName", path_base, zone_names[i] );
444 g_Game.FormatRawConfigStringKeys(component_name);
445 m_DamageDisplayNameMap.Insert( zone_names[i].Hash(), component_name );
469 return m_DamageDisplayNameMap;
479 void Log(
string msg,
string fnc_name =
"n/a")
481 Debug.Log(msg,
"Object",
"n/a", fnc_name, this.
GetType());
487 Debug.LogWarning(msg,
"Object",
"n/a", fnc_name, this.
GetType());
493 Debug.LogError(msg,
"Object",
"n/a", fnc_name, this.
GetType());
519 if (m_BloodInfectionChanceCached.Find(type, value))
527 string basePath =
string.Format(
"cfgVehicles %1 Skinning BloodInfectionSettings",
GetType());
528 if (
g_Game.ConfigIsExisting(basePath))
532 float value =
g_Game.ConfigGetFloat(
string.Format(
"%1 %2 chance", basePath, agentName));
533 m_BloodInfectionChanceCached.Set(type, value);
561 return m_EM.IsWorking();
682 if(!cargo)
return false;
684 return cargo.GetItemCount() > 0;
689 return m_AttachmentsWithCargo;
694 return m_AttachmentsWithAttachments;
746 return IsDamageDestroyed();
751 if (ai && ai.IsBeingBackstabbed())
758 return !IsDamageDestroyed();
814 if (super.CanBeActionTarget())
826 m_PreparedToDelete =
true;
831 return m_PreparedToDelete;
852 Debug.Log(
"TryDelete - not ready for deletion");
856 if (
g_Game.HasInventoryJunctureItem(
this))
858 Debug.Log(
"TryDelete - deferred call");
864 Debug.Log(
"TryDelete - OnBeforeTryDelete end");
866 Debug.Log(
"TryDelete - DeleteSafe end");
896 InitAttachmentExclusionValues();
906 m_AttachmentsWithCargo.Clear();
907 m_AttachmentsWithAttachments.Clear();
913 GameInventory attachmentInventory = attachment.GetInventory();
914 if ( attachmentInventory.
GetCargo() )
916 m_AttachmentsWithCargo.Insert( attachment );
921 m_AttachmentsWithAttachments.Insert( attachment );
927 MaxLifetimeRefreshCalc();
940 m_EM.OnDeviceDestroyed();
945 super.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
947 g_Game.GetWorld().AddEnvShootingSource(pos, 1.0);
949 if (m_DestructionBehaviourObj && m_DestructionBehaviourObj.HasExplosionDamage())
951 m_DestructionBehaviourObj.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
964 EntityAI oldOwner = oldLoc.GetParent();
965 EntityAI newOwner = newLoc.GetParent();
976 Error(
"EntityAI::EEItemLocationChanged - detached, but oldOwner is null");
984 Error(
"EntityAI::EEItemLocationChanged - attached, but newOwner is null");
990 player = Man.Cast(oldOwner);
991 player.OnItemInHandsChanged();
992 player.GetCachedEquipment().OnItemCargoOut(
this);
997 player = Man.Cast(newOwner);
998 player.OnItemInHandsChanged();
999 player.GetCachedEquipment().OnItemCargoIn(
this);
1012 m_LastUpdatedTime =
g_Game.GetTickTime();
1014 if (newParent == null)
1036 parent.OnAttachmentRuined(
this);
1057 if (!m_DestructionBehaviourObj)
1062 if (m_DestructionBehaviourObj)
1064 m_DestructionBehaviourObj.OnHealthLevelChanged(
this, oldLevel, newLevel, zone);
1069 ErrorEx(
"Incorrect destruction behaviour type, make sure the class returned in 'GetDestructionBehaviour()' is a valid type inheriting from 'DestructionEffectBase'");
1083 g_Game.GetAnalyticsServer().OnEntityKilled(killer,
this);
1109 dead_entity.SetHealth(GetHealth());
1136 PropagateExclusionValueRecursive(item.GetAttachmentExclusionMaskAll(slotId), slotId);
1141 player.GetCachedEquipment().OnItemAttached(item, slotId,
this);
1143 if ( m_ComponentsBank != NULL )
1147 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
1149 m_ComponentsBank.GetComponent(comp_key).Event_OnItemAttached(item, slot_name);
1155 if ( m_EM && item.GetCompEM())
1156 m_EM.OnAttachmentAdded(item);
1160 m_AttachmentsWithCargo.Insert( item );
1163 m_AttachmentsWithAttachments.Insert( item );
1176 ClearExclusionValueRecursive(item.GetAttachmentExclusionMaskAll(slotId), slotId);
1181 player.GetCachedEquipment().OnItemDetached(item, slotId,
this);
1183 if ( m_ComponentsBank != NULL )
1187 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
1189 m_ComponentsBank.GetComponent(comp_key).Event_OnItemDetached(item, slot_name);
1195 if (m_EM && item.GetCompEM())
1196 m_EM.OnAttachmentRemoved(item);
1198 if ( m_AttachmentsWithCargo.Find( item ) > -1 )
1199 m_AttachmentsWithCargo.RemoveItem( item );
1201 if ( m_AttachmentsWithAttachments.Find( item ) > -1 )
1202 m_AttachmentsWithAttachments.RemoveItem( item );
1215 Man player = item.GetHierarchyRootPlayer();
1217 player.GetCachedEquipment().OnItemCargoIn(item);
1218 item.OnMovedInsideCargo(
this);
1228 Man player = item.GetHierarchyRootPlayer();
1230 player.GetCachedEquipment().OnItemCargoOut(item);
1231 item.OnRemovedFromCargo(
this);
1238 item.OnMovedWithinCargo(
this);
1337 m_EM.HandleMoveInsideCargo(container);
1357 if ( m_EM && m_EM.GetRestorePlugState() )
1359 int b1 = m_EM.GetEnergySourceStorageIDb1();
1360 int b2 = m_EM.GetEnergySourceStorageIDb2();
1361 int b3 = m_EM.GetEnergySourceStorageIDb3();
1362 int b4 = m_EM.GetEnergySourceStorageIDb4();
1365 EntityAI potential_energy_source =
g_Game.GetEntityByPersitentID(b1, b2, b3, b4);
1372 bool is_attachment =
false;
1374 if (potential_energy_source)
1375 is_attachment =
GetInventory().HasAttachment(potential_energy_source);
1377 if ( !is_attachment && potential_energy_source )
1378 is_attachment = potential_energy_source.GetInventory().HasAttachment(
this);
1380 if ( potential_energy_source && potential_energy_source.GetCompEM() && !is_attachment )
1381 m_EM.PlugThisInto(potential_energy_source);
1405 string cfg_path =
"cfgVehicles " +
GetType() +
" AnimationSources";
1407 if (
g_Game.ConfigIsExisting(cfg_path) )
1409 int selections =
g_Game.ConfigGetChildrenCount(cfg_path);
1411 for (
int i = 0; i < selections; i++)
1413 string selection_name;
1414 g_Game.ConfigGetChildName(cfg_path, i, selection_name);
1423 string cfg_path =
"cfgVehicles " +
GetType() +
" AnimationSources";
1425 if (
g_Game.ConfigIsExisting(cfg_path) )
1427 int selections =
g_Game.ConfigGetChildrenCount(cfg_path);
1429 for (
int i = 0; i < selections; i++)
1431 string selection_name;
1432 g_Game.ConfigGetChildName(cfg_path, i, selection_name);
1488 GameInventory attachmentInventory = attachment.GetInventory();
1489 if (attachmentInventory)
1498 int slot = il.GetSlot();
1526 return att.CanBeCombined(e,
true, stack_max_limit);
1530 bool CanBeCombined(EntityAI other_item,
bool reservation_check =
true,
bool stack_max_limit =
false )
1557 return cargo.CanReceiveItemIntoCargo(item);
1597 return cargo.CanSwapItemInCargo(child_entity, new_entity);
1660 EntityAI ent =
this;
1661 int attachmentDepth = 0;
1664 if (ent.GetInventory().GetCurrentInventoryLocation(lcn) && lcn.IsValid())
1666 int lcnType = lcn.GetType();
1679 ent = ent.GetHierarchyParent();
1682 return attachmentDepth <=
GameConstants.INVENTORY_MAX_REACHABLE_DEPTH_ATT;
1739 Debug.LogWarning(
"Obsolete function - use CanDisplayAttachmentSlot with slot id parameter");
1760 for (
int i = 0; i < count; ++i)
1821 SetInvisible(
false);
1822 OnInvisibleSet(
false);
1867 if (!inv || inv.GetUserReservedLocationCount() == 0)
1870 int id = inv.FindFirstUserReservedLocationIndexForContainer(
this);
1875 inv.GetUserReservedLocation(
id, loc);
1877 if (loc.GetSlot() != slotID)
1892 GetInventory().GetCurrentInventoryLocation( inventory_location );
1894 return parent.GetInventory().GetSlotLock( inventory_location.GetSlot() );
1905 if (
g_Game.IsMultiplayer() )
1920 if (
g_Game.IsMultiplayer() )
1938 if (
g_Game.IsMultiplayer() )
1954 if (
g_Game.IsMultiplayer() )
1972 if (
g_Game.IsMultiplayer() )
1984 if (
g_Game.IsMultiplayer() )
2002 if (
g_Game.IsMultiplayer() )
2018 if (
g_Game.IsMultiplayer() )
2034 if (
g_Game.IsMultiplayer() )
2050 if (
g_Game.IsMultiplayer() )
2069 if (
g_Game.IsMultiplayer())
2105 for (
int i = 0; i < nAttachment; ++i )
2108 if ( attachment && attachment.IsInherited( type ) )
2121 for (
int i = 0; i < nAttachment; ++i )
2124 if ( attachment.IsKindOf ( type ) )
2157 Math3D.MatrixIdentity4(mat);
2159 il.SetGround(NULL, mat);
2167 il.SetGround(NULL, mat);
2180 void SetWet(
float value,
bool allow_client =
false);
2242 bool SetQuantity(
float value,
bool destroy_config =
true,
bool destroy_forced =
false,
bool allow_client =
false,
bool clamp_to_stack_max =
true);
2288 bool isParentAliveOrganism =
false;
2289 if (rootParent && rootParent !=
this)
2290 isParentAliveOrganism = (rootParent.IsMan() || rootParent.IsAnimal() || rootParent.IsZombie()) && rootParent.IsAlive();
2296 else if (isParentAliveOrganism)
2345 m_LastFTChangeTime = -1;
2346 m_PresumedTimeRemaining = -1;
2351 Debug.Log(
"SetTemperatureEx | entity " +
this +
" does not have temperature range defined!");
2355 if (!
m_TAC.TryAccessSource(data))
2436 Debug.Log(
"RefreshTemperatureAccess | entity " +
this +
" does not have temperature range defined!");
2440 m_TAC.TryAccessSource(data);
2549 if (previous != frozen)
2559 float progressDelta = 1;
2564 if (data.m_UpdateTimeInfo == -1)
2565 progressDelta = (-deltaHeat /
GameConstants.TEMPERATURE_RATE_AVERAGE_ABS) *
GameConstants.TEMPERATURE_FREEZETHAW_LEGACY_COEF;
2567 progressDelta *= data.m_UpdateTimeInfo;
2569 if (progressDelta == 0)
2572 float changeTimeDefault;
2573 float changeTimeMin;
2587 float coef = data.m_UpdateTimeCoef;
2592 changeTimeDefault *= 1/coef;
2594 changeTime =
Math.Lerp(
Math.Max(changeTimeDefault,changeTimeMin),changeTimeMin,data.m_InterpolatedFraction);
2595 progressVal = progressVal + progressDelta / changeTime;
2597 float remnantTemp = 0;
2601 if (progressVal > 1.0)
2603 if (data.m_UpdateTimeInfo == -1)
2604 remnantTemp = (progressVal - 1) * changeTime *
GameConstants.TEMPERATURE_RATE_AVERAGE_ABS * -1;
2606 remnantTemp = (((progressVal - 1) * changeTime) / progressDelta) * deltaHeat;
2612 if (progressVal < 0.0)
2614 if (data.m_UpdateTimeInfo == -1)
2615 remnantTemp = -progressVal * changeTime *
GameConstants.TEMPERATURE_RATE_AVERAGE_ABS;
2617 remnantTemp = ((-progressVal * changeTime) / progressDelta) * deltaHeat;
2628 if (remnantTemp >=
GameConstants.TEMPERATURE_SENSITIVITY_THRESHOLD)
2632 if (progressVal > 0 && progressVal < 1)
2634 m_LastFTChangeTime = changeTime;
2636 m_PresumedTimeRemaining = (1 - progressVal) * changeTime;
2638 m_PresumedTimeRemaining = progressVal * changeTime;
2687 else if (previous >= 1)
2700 float deltaTime = 1;
2706 if (data.m_UpdateTimeInfo == -1)
2707 deltaTime = deltaHeat /
GameConstants.TEMPERATURE_RATE_AVERAGE_ABS;
2709 deltaTime *= data.m_UpdateTimeInfo;
2714 progressVal += deltaTime / changeTime;
2720 else if (deltaHeat > 0)
2778 Error(
"Attempting to change variable client side, variables are supposed to be changed on server only !!");
2789 return m_HiddenSelectionsData;
2795 if (m_HiddenSelectionsData)
2796 return m_HiddenSelectionsData.GetHiddenSelectionIndex( selection );
2804 if (m_HiddenSelectionsData)
2805 return m_HiddenSelectionsData.m_HiddenSelections;
2807 return super.GetHiddenSelections();
2813 if (m_HiddenSelectionsData)
2814 return m_HiddenSelectionsData.m_HiddenSelectionsTextures;
2816 return super.GetHiddenSelectionsTextures();
2822 if (m_HiddenSelectionsData)
2823 return m_HiddenSelectionsData.m_HiddenSelectionsMaterials;
2825 return super.GetHiddenSelectionsMaterials();
2931 ctx.Write( m_EM.GetEnergy() );
2934 ctx.Write( m_EM.IsPassive() );
2937 ctx.Write( m_EM.IsSwitchedOn() );
2940 ctx.Write( m_EM.IsPlugged() );
2944 EntityAI energy_source = m_EM.GetEnergySource();
2952 energy_source.GetPersistentID(b1, b2, b3, b4);
2996 if ( !ctx.Read( f_energy ) )
2998 m_EM.SetEnergy(f_energy);
3001 bool b_is_passive =
false;
3002 if ( !ctx.Read( b_is_passive ) )
3004 m_EM.SetPassiveState(b_is_passive);
3007 bool b_is_on =
false;
3008 if ( !ctx.Read( b_is_on ) )
3015 bool b_is_plugged =
false;
3016 if ( !ctx.Read( b_is_plugged ) )
3020 if ( version <= 103 )
3023 int i_energy_source_ID_low = 0;
3024 if ( !ctx.Read( i_energy_source_ID_low ) )
3028 int i_energy_source_ID_high = 0;
3029 if ( !ctx.Read( i_energy_source_ID_high ) )
3039 if ( !ctx.Read(b1) )
return false;
3040 if ( !ctx.Read(b2) )
return false;
3041 if ( !ctx.Read(b3) )
return false;
3042 if ( !ctx.Read(b4) )
return false;
3047 m_EM.StoreEnergySourceIDs( b1, b2, b3, b4 );
3048 m_EM.RestorePlugState(
true);
3078 if (
g_Game.IsMultiplayer() )
3080 bool is_on = m_EM.IsSwitchedOn();
3082 if (is_on != m_EM.GetPreviousSwitchState())
3090 int id_low = m_EM.GetEnergySourceNetworkIDLow();
3091 int id_High = m_EM.GetEnergySourceNetworkIDHigh();
3093 EntityAI energy_source = EntityAI.Cast(
g_Game.GetObjectByNetworkId(id_low, id_High) );
3101 string object = energy_source.GetType();
3102 Error(
"Synchronization error! Object " +
object +
" has no instance of the Energy Manager component!");
3105 m_EM.PlugThisInto(energy_source);
3113 m_EM.DeviceUpdate();
3114 m_EM.StartUpdates();
3169 ctx.Write(varFlags);
3184 if (!ctx.Read(varFlags))
3220 if (!ctx.Read(intValue))
3228 if (!ctx.Read(value))
3232 if (!ctx.Read(intValue))
3258 int mask =
Math.Round(floats.Get(index));
3264 float temperature = floats.Get(index);
3266 floats.RemoveOrdered(index);
3268 bool frozen =
Math.Round(floats.Get(index));
3270 floats.RemoveOrdered(index);
3272 float FTProgress = floats.Get(index);
3274 floats.RemoveOrdered(index);
3284 if ( m_ComponentsBank != NULL )
3288 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
3290 m_ComponentsBank.GetComponent(comp_key).Event_OnFrame(other, timeSlice);
3298 string text =
string.Empty;
3301 text +=
"Disabled: " + GetIsSimulationDisabled() +
"\n";
3312 text +=
"Switched On: " + compEM.
IsSwitchedOn() +
"\n";
3313 text +=
"Is Working: " + compEM.
IsWorking() +
"\n";
3360 SetAnimationPhase ( selection_name, 1 );
3369 SetAnimationPhase ( selection_name, 0 );
3467 super.OnRPC(sender, rpc_type, ctx);
3474 case ERPCs.RPC_BS_SKINNED_STATE:
3476 Param1<bool> p_skinned_state=
new Param1<bool>(
false);
3477 if (ctx.Read(p_skinned_state))
3479 float state = p_skinned_state.param1;
3486 case ERPCs.RPC_EXPLODE_EVENT:
3495 #ifdef DIAG_DEVELOPER
3498 if (!(
g_Game.IsServer()))
3507 for (i = 0; i < AttachmentsCount; ++i)
3512 CargoBase cargo = inventory.
GetCargo();
3515 int cargoCount = cargo.GetItemCount();
3516 for (i = 0; i < cargoCount; ++i)
3518 cargo.GetItem(i).FixEntity();
3536 string GetConfigWeightModifiedDebugText()
3538 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3540 return "(" + m_ConfigWeight +
"(config weight) * " + GetWetWeightModifier() +
"(Wetness Modifier))";
3542 return string.Empty;
3562 if (WeightDebug.m_VerbosityFlags & WeightDebugType.SET_DIRTY_FLAG)
3564 Print(
"---------------------------------------");
3565 Print(
"ent:" +
this +
" - SetWeightDirty");
3566 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
3570 Print(
"---------------------------------------");
3588 for (i = 0; i < AttachmentsCount; ++i)
3596 int cargoCount = cargo.GetItemCount();
3597 for (i = 0; i < cargoCount; ++i)
3599 totalWeight += cargo.GetItem(i).GetWeightEx(forceRecalc);
3615 if (m_WeightDirty || forceRecalc)
3621 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3623 WeightDebug.GetWeightDebug(
this).SetWeight(m_WeightEx);
3625 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_DIRTY)
3627 Print(
"ent:" +
this +
" - Dirty Recalc");
3628 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
3639 void UpdateWeight(WeightUpdateType updateType = WeightUpdateType.FULL,
float weightAdjustment = 0);
3659 if (action_id ==
EActions.FIX_ENTITY)
3661 #ifdef DIAG_DEVELOPER
3665 else if (action_id ==
EActions.GET_TOTAL_WEIGHT)
3667 WeightDebug.ClearWeightDebug();
3669 Debug.Log(
"======================== "+
GetType() +
" =================================");
3673 Debug.Log(
"----------------------------------------------------------------------------------------------");
3675 else if (action_id ==
EActions.GET_TOTAL_WEIGHT_RECALC)
3677 WeightDebug.ClearWeightDebug();
3678 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
3680 Debug.Log(
"======================== "+
GetType() +
" RECALC ===========================");
3684 WeightDebug.PrintAll(
this);
3685 Debug.Log(
"----------------------------------------------------------------------------------------------");
3686 WeightDebug.SetVerbosityFlags(0);
3688 else if (action_id ==
EActions.GET_PLAYER_WEIGHT)
3690 WeightDebug.ClearWeightDebug();
3692 Debug.Log(
"======================== PLAYER: "+player+
" ===========================");
3694 Debug.Log(
"New overall weight Player:"+player.GetWeightEx().ToString());
3696 Debug.Log(
"----------------------------------------------------------------------------------------------");
3698 else if (action_id ==
EActions.GET_PLAYER_WEIGHT_RECALC)
3700 WeightDebug.ClearWeightDebug();
3701 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
3703 Debug.Log(
"======================== PLAYER RECALC: "+player+
" ===========================");
3705 Debug.Log(
"New overall weight Player:"+player.GetWeightEx(
true).ToString());
3706 WeightDebug.PrintAll(player);
3707 Debug.Log(
"----------------------------------------------------------------------------------------------");
3708 WeightDebug.SetVerbosityFlags(0);
3732 if ( MemoryPointExists(
"invView2" ) )
3734 #ifdef PLATFORM_WINDOWS
3767 #ifdef PLATFORM_CONSOLE
3778 Debug.LogError(
"EntityAI: HitComponentForAI not set properly for that entity (" +
GetType() +
")");
3786 Debug.LogError(
"EntityAI: DefaultHitComponent not set properly for that entity (" +
GetType() +
")");
3794 Debug.LogError(
"EntityAI: DefaultHitPositionComponent not set for that entity (" +
GetType() +
")");
3800 Debug.LogError(
"EntityAI: SuitableFinisherHitComponents not set for that entity (" +
GetType() +
")");
3806 Debug.LogError(
"EntityAI: DefaultHitPosition not set for that entity (" +
GetType() +
")");
3868 float currentTime =
g_Game.GetTickTime();
3869 if (m_LastUpdatedTime == 0)
3870 m_LastUpdatedTime = currentTime;
3873 m_LastUpdatedTime = currentTime;
3881 if (
g_Game.IsWorldWetTempUpdateEnabled())
3885 float target =
g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(
this);
3888 float heatPermCoef = 1.0;
3889 EntityAI ent =
this;
3892 heatPermCoef *= ent.GetHeatPermeabilityCoef();
3893 ent = ent.GetHierarchyParent();
3910 ConfigGetTextArray(
"Attachments", slots);
3913 ConfigGetTextArray(
"magazines", mags);
3927 int consumable_count;
3929 for (
int i = 0; i < all_paths.Count(); i++)
3931 config_path = all_paths.Get(i);
3932 int children_count =
g_Game.ConfigGetChildrenCount(config_path);
3934 for (
int x = 0;
x < children_count;
x++)
3936 g_Game.ConfigGetChildName(config_path,
x, child_name);
3937 path = config_path +
" " + child_name;
3938 scope =
g_Game.ConfigGetInt( config_path +
" " + child_name +
" scope" );
3939 bool should_check =
true;
3940 if ( config_path ==
"CfgVehicles" && scope == 0)
3942 should_check =
false;
3948 g_Game.ConfigGetText( config_path +
" " + child_name +
" inventorySlot",inv_slot );
3949 for (
int z = 0; z < slots.Count(); z++)
3951 if (slots.Get(z) == inv_slot)
3985 int invulnerability;
3986 switch (servercfg_param)
3988 case "disableContainerDamage":
3992 case "disableBaseDamage":
3997 if (invulnerability > 0)
3999 SetAllowDamage(
false);
4017 attachmentsArray.Copy(attachments);
4022 for (
int i = 0; i < nAttachmentSlots; ++i)
4032 parentInventory = parent.GetInventory();
4034 foreach(
int slot : attachmentsArray )
4036 if( parentInventory )
4045 if( nAttachment > 0 )
4048 for(i = 0; i < nAttachmentSlots2; ++i)
4056 item.SetInvisible(invisible);
4057 item.OnInvisibleSet(invisible);
4098 if (
Car.CastTo(car, transport))
4100 if (car.GetSpeedometerAbsolute() > 2 )
4103 ProcessDirectDamage(DT_CUSTOM, transport,
"",
"TransportHit",
"0 0 0", damage);
4111 if (IsDamageDestroyed() && car.GetSpeedometerAbsolute() > 3)
4114 impulse[1] = 40 * 1.5;
4118 else if (Boat.CastTo(boat, transport))
4120 Human player = Human.Cast(
this);
4121 if (player && player.PhysicsGetLinkedEntity() == boat)
4130 ProcessDirectDamage(DT_CUSTOM, transport,
"",
"TransportHit",
"0 0 0", damage);
4141 ProcessDirectDamage(DT_CUSTOM, transport,
"",
"TransportHit",
"0 0 0", damage);
4152 impulse[1] = 40 * 1.5;
4218 private void InitAttachmentExclusionValues()
4221 m_AttachmentExclusionMaskGlobal =
new set<int>;
4222 m_AttachmentExclusionMaskChildren =
new set<int>();
4229 InitInherentSlotExclusionMap();
4235 private void InitInherentSlotExclusionMap()
4243 for (
int i = 0; i < count; ++i)
4246 SetAttachmentExclusionMaskSlot(slotId,GetAttachmentExclusionInitSlotValue(slotId));
4253 set<int> dflt =
new set<int>;
4265 if (performLegacyInit)
4273 if (m_AttachmentExclusionMaskGlobal.Count() > 0)
4277 int count = m_AttachmentExclusionSlotMap.Count();
4280 for (
int i = 0; i < count; i++)
4282 int countSet = m_AttachmentExclusionSlotMap.GetElement(i).Count();
4303 for (
int i = 0; i < slotCount; i++)
4313 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4314 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4315 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4324 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4325 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4326 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4335 if (ConfigGetBool(
"isStrap"))
4337 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4338 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4342 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4343 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4357 for (
int i = 0; i < slotCount; i++)
4366 tmp.Copy(GetAttachmentExclusionMaskSlot(slotId));
4367 if (ConfigGetBool(
"noNVStrap"))
4369 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4371 if (ConfigGetBool(
"noMask"))
4373 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4375 if (ConfigGetBool(
"noEyewear"))
4377 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4386 tmp.Copy(GetAttachmentExclusionMaskSlot(slotId));
4387 if (ConfigGetBool(
"noNVStrap"))
4389 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4391 if (ConfigGetBool(
"noHelmet"))
4393 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4395 if (ConfigGetBool(
"noEyewear"))
4397 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4406 tmp.Copy(GetAttachmentExclusionMaskSlot(slotId));
4407 if (ConfigGetBool(
"isStrap"))
4409 if (ConfigGetBool(
"noHelmet"))
4411 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4413 if (ConfigGetBool(
"noMask"))
4415 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4420 if (ConfigGetBool(
"noHelmet"))
4422 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4424 if (ConfigGetBool(
"noMask"))
4426 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4442 if (m_AttachmentExclusionMaskGlobal.Find(value) == -1)
4443 m_AttachmentExclusionMaskGlobal.Insert(value);
4449 int idx = m_AttachmentExclusionMaskGlobal.Find(value);
4451 m_AttachmentExclusionMaskGlobal.Remove(idx);
4456 m_AttachmentExclusionMaskGlobal.Clear();
4457 m_AttachmentExclusionMaskGlobal.Copy(values);
4463 if (m_AttachmentExclusionSlotMap)
4465 m_AttachmentExclusionSlotMap.Set(slotId,values);
4468 ErrorEx(
"m_AttachmentExclusionSlotMap not available! Fill the 'inventorySlot[]' in the " +
this +
" config file.");
4471 private void PropagateExclusionValueRecursive(set<int> values,
int slotId)
4473 if (values && values.Count() != 0)
4477 GetInventory().GetCurrentInventoryLocation(lcn);
4478 if (CheckExclusionAccessPropagation(lcn.GetSlot(), slotId, values, passThis))
4480 m_AttachmentExclusionMaskChildren.InsertSet(passThis);
4481 EntityAI parent = GetHierarchyParent();
4483 parent.PropagateExclusionValueRecursive(passThis,lcn.GetSlot());
4488 private void ClearExclusionValueRecursive(set<int> values,
int slotId)
4490 if (values && values.Count() != 0)
4493 InventoryLocation lcn =
new InventoryLocation();
4494 GetInventory().GetCurrentInventoryLocation(lcn);
4495 if (CheckExclusionAccessPropagation(lcn.GetSlot(), slotId, values, passThis))
4497 int count = passThis.Count();
4498 for (
int i = 0; i < count; ++i)
4500 m_AttachmentExclusionMaskChildren.RemoveItem(passThis[i]);
4502 EntityAI parent = GetHierarchyParent();
4504 parent.ClearExclusionValueRecursive(passThis,lcn.GetSlot());
4510 set<int> GetAttachmentExclusionMaskAll(
int slotId)
4512 set<int> values =
new set<int>();
4513 set<int> slotValues = GetAttachmentExclusionMaskSlot(slotId);
4515 values.InsertSet(slotValues);
4516 values.InsertSet(m_AttachmentExclusionMaskGlobal);
4517 values.InsertSet(m_AttachmentExclusionMaskChildren);
4523 set<int> GetAttachmentExclusionMaskSlot(
int slotId)
4525 return m_AttachmentExclusionSlotMap.Get(slotId);
4529 set<int> GetAttachmentExclusionMaskGlobal()
4531 return m_AttachmentExclusionMaskGlobal;
4535 set<int> GetAttachmentExclusionMaskChildren()
4537 return m_AttachmentExclusionMaskChildren;
4541 private bool HasInternalExclusionConflicts(
int targetSlot)
4543 set<int> targetSlotValues = GetAttachmentExclusionMaskSlot(targetSlot);
4544 if (targetSlotValues)
4546 set<int> additionalValues =
new set<int>();
4547 additionalValues.InsertSet(GetAttachmentExclusionMaskGlobal());
4548 additionalValues.InsertSet(GetAttachmentExclusionMaskChildren());
4550 if (additionalValues.Count() > 0)
4552 int countTarget = targetSlotValues.Count();
4553 for (
int i = 0; i < countTarget; i++)
4555 if (additionalValues.Find(targetSlotValues[i]) != -1)
4572 set<int> currentSlotValuesAll = GetAttachmentExclusionMaskAll(slotId);
4573 int count = values.Count();
4574 for (
int i = 0; i < count; ++i)
4576 if (currentSlotValuesAll.Find(values[i]) != -1)
4585 if (values && values.Count() != 0)
4593 if (parent && parent !=
this)
4595 return parent.IsExclusionFlagPresentRecursive(passThis,lcn.GetSlot());
4610 if (occupiedException)
4612 adjustedValue = value;
4616 if (targetException)
4618 adjustedValue = null;
4623 return adjustedValue.Count() != 0;
4629 adjustedValue = value;
4638 if (targetException)
4640 adjustedValue = null;
4645 return adjustedValue.Count() != 0;
4657 EntityAI currentAtt =
GetInventory().FindAttachment(slotId);
4658 bool hasInternalConflict = attachment.HasInternalExclusionConflicts(slotId);
4663 diff = attachment.GetAttachmentExclusionMaskAll(slotId);
4664 diff.RemoveItems(currentAtt.GetAttachmentExclusionMaskAll(slotId));
4665 if (diff.Count() == 0)
4667 return !hasInternalConflict;
4674 else if (attachment.GetInventory().GetCurrentInventoryLocation(curLoc) && curLoc.GetType() ==
InventoryLocationType.ATTACHMENT)
4676 EntityAI rootOwner = attachment.GetHierarchyRoot();
4679 diff = attachment.GetAttachmentExclusionMaskAll(slotId);
4680 diff.RemoveItems(attachment.GetAttachmentExclusionMaskAll(curLoc.GetSlot()));
4681 if (diff.Count() == 0)
4683 return !hasInternalConflict;
4712void SetDebugDeveloper_item(
Object entity)
4715 entity.SetDebugItem();
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 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()
override bool IsDestructionBehaviour()
override bool IsSelfAdjustingTemperature()
override bool ReplaceOnDeath()
class Animal_CapraHircus extends AnimalBase GetDestructionBehaviour()
override bool IsRefresherSignalingViable()
override void OnDamageDestroyed(int oldLevel)
override bool KeepHealthOnReplace()
const int ECE_OBJECT_SWAP
const int ECE_PLACE_ON_SURFACE
PlayerSpawnPreset slotName
represents base for cargo storage for entities
bool IsWorking()
Energy manager: Returns true if this device is working right now.
EntityAI GetEnergySource()
Energy manager: Returns the energy source this device is plugged into.
bool IsSwitchedOn()
Energy manager: Returns state of the switch. Whenever the device is working or not does not matter....
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
override int GetHideIconMask()
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.
void InitLegacySlotExclusionValuesImplicit()
adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)
bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
float GetWetWeightModifier()
void SetStoreLoadedQuantity(float value)
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.
void TransferVariablesFloat(array< float > float_vars)
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 InterpolateTempData(TemperatureDataInterpolated data)
void SoundSoftBushFallingPlay()
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.
bool CanDetachAttachment(EntityAI parent)
calls this->CanDetachAttachment(parent)
bool CanAssignToQuickbar()
bool CanReceiveAttachment(EntityAI attachment, int slotId)
calls this->CanReceiveAttachment(attachment)
float GetTemperatureFreezeTime()
bool CanBeTargetedByAI(EntityAI ai)
int GetTurnableValveIndex(int pComponentIndex)
bool UseConfigInitTemperature()
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 GetColor(out int r, out int g, out int b, out int a)
float m_VarTemperatureFreezeTime
void ProcessInvulnerabilityCheck(string servercfg_param)
bool CanDisplayAttachmentSlot(string slot_name)
void SplitIntoStackMaxEx(EntityAI destination_entity, int slot_id)
void OnOwnSocketReleased(EntityAI device)
Energy manager event: When something is UNPLUGGED from this device.
void SetColor(int r, int g, int b, int a)
bool LocalTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
ref TemperatureAccessComponent m_TAC
float GetItemOverheatProgress()
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,...
float GetTemperatureFreezeThreshold()
bool PredictiveTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
proto native bool IsPilotLight()
void OnChildItemRemoved(InventoryItem item)
EntityAI SpawnEntityOnGround(string object_name, vector mat[4])
void CacheSkinningBloodInfectionChance(eAgents type)
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 SetFrozen(bool frozen)
void RegisterTransportHit(Transport transport)
bool OnStoreLoad(ParamsReadContext ctx, int version)
Called when data is loaded from persistence (on server side).
float GetItemOverheatThreshold()
if undefined, max temperature used as default
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()
void SetFreezeThawProgress(float val)
0->1 when freezing, 1->0 when thawing
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)
bool CanLoadItemIntoCargo(EntityAI item)
calls this->CanLoadItemIntoCargo(item), is called on server start when loading in the storage
proto native void SetRequiredSimulation(bool req)
ref ScriptInvoker m_OnAttachmentSetLock
EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
override TStringArray GetHiddenSelectionsMaterials()
Returns the hiddenSelectionsMaterials array from the object's config.
override TStringArray GetHiddenSelections()
Returns the hiddenSelectionsTextures array from the object's config.
float GetHeatPermeabilityCoef()
Returns temperature change speed multiplier for this item and all its children (multiplicative intera...
bool IsIgnoredByConstruction()
float m_VarTemperatureThawThreshold
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
proto native void PlaceOnSurfaceRotated(out vector trans[4], vector pos, float dx=0, float dz=0, float fAngle=0, bool align=false)
void SerializeNumericalVars(array< float > floats_out)
void SetAttachmentExclusionMaskSlot(int slotId, set< int > values)
sets values for specific slot
float m_PreviousRoofTestTime
ScriptInvoker GetOnKilledInvoker()
EntityAI SpawnInInventoryOrGroundPos(string object_name, GameInventory inv, vector pos)
void SetStoreLoad(bool value)
ScriptInvoker GetOnAttachmentReleaseLock()
void SetBayonetAttached(bool pState, int slot_idx=-1)
bool CanReleaseFromHands(EntityAI handheld)
calls this->CanReleaseFromHands(handheld)
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)
proto native void RegisterNetSyncVariableFloat(string variableName, float minValue=0, float maxValue=0, int precision=1)
registers float variable synchronized over network
bool CanSwapItemInCargo(EntityAI child_entity, EntityAI new_entity)
calls this->CanSwapItemInCargo(child_entity, new_entity)
override EntityAI ProcessMeleeItemDamage(int mode=0)
void RemoveItemVariable(int variable)
Removes variable from variable mask, making it appear as though the variable has never been changed f...
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.
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()
bool GetCookingTargetTemperature(out float temperature)
specifically for cooking system, to get heat source target temperatures
float m_VarHeatPermeabilityCoef
void SetTemperatureMax()
presumably for debug purposes?
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)
void CheckForRoofLimited(float timeTresholdMS=3000)
Roof check for entity, limited by time (anti-spam solution).
bool LocalTakeEntityToCargo(notnull EntityAI item)
string ChangeIntoOnAttach(string slot)
bool CanReleaseCargo(EntityAI cargo)
calls this->CanReleaseCargo(cargo)
void OnStoreSave(ParamsWriteContext ctx)
Engine calls this function to collect data from entity to store for persistence (on server side).
float GetStoreLoadedQuantity()
ref ScriptInvoker m_OnSetLock
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()
void EECargoMove(EntityAI item)
bool IsUniversalTemperatureSource()
Universal Temperature Sources Helpers.
void SetTemperatureEx(TemperatureData data)
sets temperature, handles base overheating and freezing state progression logics
bool PredictiveTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
bool LocalTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
void SetFromProjectile(ProjectileStoppedInfo info)
proto native void RegisterNetSyncVariableBoolSignal(string variableName)
when bool variable is true, it's sent to clients and become false again
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.
proto native void RegisterNetSyncVariableBool(string variableName)
registers bool variable synchronized over network
ref ScriptInvoker m_OnViewIndexChanged
proto native void SetObjectMaterial(int index, string mat_name)
Change material in hiddenSelections.
Shape DebugDirectionDraw(float distance=1)
UTemperatureSource GetUniversalTemperatureSource()
void RefreshTemperatureAccess(TemperatureData data)
refreshes access without setting temperature, keeps the source locked in
bool DisassembleOnLastDetach()
float m_VarTemperatureInit
void OnItemOverheatStart()
override to implement desired overheat behavior on entity
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)
bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
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 CanBeSkinnedWith(EntityAI tool)
bool CanReceiveItemIntoHands(EntityAI item_to_hands)
calls this->CanReceiveItemIntoHands(item_to_hands)
void EEOnCECreate()
Called when entity is being created as new by CE/ Debug.
bool CanDisplayAttachmentSlot(int slot_id)
bool IgnoreOutOfReachCondition()
bool LocalTakeEntityAsAttachment(notnull EntityAI item)
bool IsOneHandedBehaviour()
returns item behaviour of item (more in ItemBase)
ref ScriptInvoker m_OnItemMovedInCargo
void EECargoIn(EntityAI item)
void SplitIntoStackMaxClient(EntityAI destination_entity, int slot_id)
int GetMeleeTargetType()
value is related to EMeleeTargetType
array< float > GetVariablesFloat()
void OnIgnitedTargetFailed(EntityAI target_item)
Executed on Server when this item failed to ignite target item.
bool IsSplitable()
returns just the configured 'canBeSplit' bool
bool HasButtstockAttached()
proto native void UpdateNetSyncVariableInt(string variableName, float minValue=0, float maxValue=0)
array< EntityAI > GetAttachmentsWithCargo()
void DeSerializeNumericalVars(array< float > floats)
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 CanReleaseAttachment(EntityAI attachment)
calls this->CanReleaseAttachment(attachment)
bool LocalTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
proto native bool IsRequiredSimulation()
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.
float GetTemperatureThawTime()
bool IsTargetIgnitionSuccessful(EntityAI item_target)
Final evaluation just before the target item is actually ignited. Evaluated on Server.
proto native void IncreaseLifetime()
Reset economy lifetime to default (seconds).
bool KeepHealthOnReplace()
bool CanAssignAttachmentsToQuickbar()
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.
void OnFreezeStateChangeServer()
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)
float GetSkinningBloodInfectionChance(eAgents type)
void OnIgnitedThis(EntityAI fire_source)
Executed on Server when some item ignited this one.
float m_VarTemperatureMax
void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
void SetVariableMask(int variable)
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()
void SetItemOverheatProgress(float val, float deltaTime=0)
bool ReadVarsFromCTX(ParamsReadContext ctx, int version=-1)
Reads from storage CTX.
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()
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")
array< string > GetSuitableFinisherHitComponents()
void OnCEUpdate()
Central economy calls this function whenever going over all the entities.
void SetQuantityNormalized(float value, bool destroy_config=true, bool destroy_forced=false)
void HandleFreezingProgression(float deltaHeat, TemperatureData data)
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)
not really deprecated, but missing context info from TemperatureData. Default values used instead.
void OnEnergyAdded()
Energy manager event: Called when energy was added on this device. ALWAYS CALL super....
ref ScriptInvoker m_OnHitByInvoker
void OnItemOverheat(float deltaTime)
string GetInvulnerabilityTypeString()
bool PredictiveTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
bool CheckAttachmentReceiveExclusion(EntityAI attachment, int slotId)
checks specifically for att. exclusion conflicts before att. receive
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)
void DebugDirectionSetColor(int color)
bool LocalTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
proto native bool IsSimpleHiddenSelectionVisible(int index)
void SaveVariables(ParamsWriteContext ctx)
void SetCleanness(int value, bool allow_client=false)
bool LocalTakeEntityToCargoEx(notnull EntityAI item, int idx, int row, int col)
bool CanHaveTemperature()
returns true used on selected items that have a temperature effect and can processes temperature chan...
bool ServerTakeEntityAsAttachmentEx(notnull EntityAI item, int slot)
void UpdateWeight(WeightUpdateType updateType=WeightUpdateType.FULL, float weightAdjustment=0)
float m_VarTemperatureThawTime
float ConvertNonlethalDamage(float damage, DamageType damageType)
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,...
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)
proto native void RegisterNetSyncVariableInt(string variableName, int minValue=0, int maxValue=0)
registers int variable synchronized over network
void SetUniversalTemperatureSource(UTemperatureSource uts)
float GetConfigWeightModified()
bool CanItemOverheat()
Overheat time CAN be 0, GameConstants.TEMPERATURE_TIME_OVERHEAT_MIN is ignored if so.
int GetBayonetAttachmentIdx()
ComponentEnergyManager GetCompEM()
void RemoveAllAgentsExcept(int agent_to_keep)
void SetTakeable(bool pState)
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)
bool CanDisplayAnyAttachmentSlot()
void SetButtstockAttached(bool pState, int slot_idx=-1)
int GetTargetQuantityMax(int attSlotID=-1)
bool CanPutIntoHands(EntityAI parent)
calls this->CanPutIntoHands(parent)
bool IsSlotReserved(int slotID)
float m_VarTemperatureOverheatTime
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
bool IsSelfAdjustingTemperature()
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()
bool IsVariableSet(int variable)
'true' if this variable has ever been changed from default
float GetSingleInventoryItemWeightEx()
bool CanReceiveItemIntoCargo(EntityAI item)
calls this->CanReceiveItemIntoCargo(item)
proto native void SwitchLight(bool isOn)
bool LoadVariables(ParamsReadContext ctx, int version=-1)
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)
bool CanBeSplit()
returns current splitability
ScriptInvoker GetOnItemFlipped()
void HideAllSelections()
Sets all animation values to 1, making them INVISIBLE if they are configured in models....
void OnItemOverheatEnd()
note, that the deltaTime could be reverse-calculated and not totally accurate
void InitGlobalExclusionValues()
override to init part of the mask, independent of slot-specific behavior
float GetFreezeThawProgress()
on server only
void SetPrepareToDelete()
override bool IsEntityAI()
void SetWet(float value, bool allow_client=false)
bool AreChildrenAccessible()
bool LocalDropEntity(notnull EntityAI item)
float GetQuantityNormalized()
void SetLiquidType(int value, bool allow_client=false)
bool CanRemoveFromHands(EntityAI parent)
calls this->CanRemoveFromHands(parent)
void OnChildItemReceived(InventoryItem item)
bool IsInventoryVisible()
void OnPlacementStarted(Man player)
bool PlacementCanBeRotated()
Should return false if you want to disable hologram rotation.
float GetItemOverheatTime()
any configured value >= 0 will simulate overheating
ScriptInvoker GetOnAttachmentSetLock()
bool CanDisplayAttachmentCategory(string category_name)
void EEInventoryOut(Man oldParentMan, EntityAI diz, EntityAI newParent)
proto native void SetAITargetCallbacks(AbstractAITargetCallbacks callbacks)
void OnFreezeStateChangeClient()
void OnWasAttached(EntityAI parent, int slot_id)
ref ScriptInvoker m_OnItemRemovedFromCargo
void SetRoofAbove(bool state)
float m_VarTemperatureMin
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 CanPutInCargo(EntityAI parent)
calls this->CanPutInCargo(parent)
bool IsFreezeThawProgressFinished()
on server only
void SetQuantityToMinimum()
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 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...
bool m_TransportHitRegistered
void EEInit()
Called upon object creation.
float m_VarTemperatureFreezeThreshold
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 ...
float m_FreezeThawProgress
bool HasBayonetAttached()
void SetTemperatureDirect(float value, bool allow_client=false)
float GetLiquidThroughputCoef()
Returns liquid throughput coeficient.
void WriteVarsToCTX(ParamsWriteContext ctx)
Writes to storage CTX.
ref ScriptInvoker m_OnAttachmentReleaseLock
float GetTemperatureThawThreshold()
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)
void AddSingleExclusionValueGlobal(EAttExclusions value)
to help with item staging exclusions
bool CanRemoveFromCargo(EntityAI parent)
calls this->CanRemoveFromCargo(parent)
void CombineItemsEx(EntityAI entity2, bool use_stack_max=false)
proto native void RegisterNetSyncVariableObject(string variableName)
registers object variable synchronized over network, only synchronizes if network id is assigned....
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 IsServerCheck(bool allow_client)
bool CheckExclusionAccessPropagation(int occupiedSlot, int targetSlot, set< int > value, inout set< int > adjustedValue)
special propagation contition
ScriptInvoker GetOnReleaseLock()
void HandleItemOverheating(float deltaHeat, TemperatureData data)
float GetTemperatureMax()
bool ServerTakeEntityAsAttachment(notnull EntityAI item)
bool CanPutAsAttachment(EntityAI parent)
calls this->CanPutAsAttachment(parent)
string ChangeIntoOnDetach()
ScriptInvoker GetOnItemDetached()
int GetSlotsCountCorrect()
script counterpart to engine's class Inventory
proto native int GetAttachmentSlotsCount()
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
proto native EntityAI GetAttachmentFromIndex(int index)
proto native bool GetCurrentInventoryLocation(out notnull InventoryLocation loc)
returns information about current item location
proto native CargoBase GetCargo()
cargo
proto native bool GetSlotLock(int slot)
proto native int GetSlotId(int index)
attachments
proto native int AttachmentCount()
Returns count of attachments attached to this item.
proto native int GetSlotIdCount()
proto native int GetAttachmentSlotId(int index)
proto native void ResetFlipCargo()
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)...
inventory for plain man/human
provides access to slot configuration
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
The class that will be instanced (moddable).
void SetPersistentPairID(int id)
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:
Native class for boats - handles physics simulation.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
override bool IsInitialized()
override void DeferredInit()
map< string, ref array< string > > DamageZoneMap
DamageType
exposed from C++ (do not change)
ECachedEquipmentItemCategory
override bool IsPrepareToDelete()
override bool CanHaveTemperature()
Serializer ParamsReadContext
EntityAI SpawnEntity(string object_name, notnull InventoryLocation inv_loc, int iSetupFlags, int iRotation)
Serializer ParamsWriteContext
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
array< string > TStringArray
const int VARIABLE_TEMPERATURE
const float LIQUID_THROUGHPUT_DEFAULT
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
vector GetPosition()
Get the world position of the Effect.
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.
override void ProcessVariables()
float GetWeightSpecialized(bool forceRecalc=false)
override float GetTemperatureFreezeThreshold()
override float GetTemperatureFreezeTime()
override float GetTemperatureThawThreshold()
override EWetnessLevel GetWetLevel()
override float GetWetMax()
override bool ReadVarsFromCTX(ParamsReadContext ctx, int version=-1)
override void WriteVarsToCTX(ParamsWriteContext ctx)
override float GetTemperatureThawTime()
override float GetSingleInventoryItemWeightEx()
override void DeSerializeNumericalVars(array< float > floats)
override float GetItemOverheatThreshold()
override void SerializeNumericalVars(array< float > floats_out)
override float GetWetMin()
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
override void OnWasDetached(EntityAI parent, int slot_id)
void TemperatureData(float val, ETemperatureAccessTypes accessType=ETemperatureAccessTypes.ACCESS_UNKNOWN, float time=-1, float timeCoef=1, float heatPermCoef=1)
override bool CanDisplayAttachmentSlot(int slot_id)