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 WithPlayer(Man player)
89 DebugSpawnParams params =
new DebugSpawnParams();
90 params.m_Player = player;
95class TSelectableActionInfoArrayEx
extends array<ref Param> {}
198 float m_LastFTChangeTime;;
199 float m_PresumedTimeRemaining;
206 string param_access_energy_sys =
"CfgVehicles " + type +
" EnergyManager ";
209 if (is_electic_device)
254 if (ConfigIsExisting(
"varTemperatureFreezePoint"))
259 if (ConfigIsExisting(
"varTemperatureThawPoint"))
266 if (ConfigIsExisting(
"varTemperatureOverheatTime"))
271 if (ConfigIsExisting(
"varHeatPermeabilityCoef"))
302 return EInventoryIconVisibility.ALWAYS;
354 int frequency =
GetCEApi().GetCEGlobalInt(
"FlagRefreshFrequency");
355 if ( frequency <= 0 )
360 if ( frequency <= lifetime )
378 override void SetDebugItem()
380 super.SetDebugItem();
398 string component_name;
404 else if ( IsMagazine() )
413 path_base =
string.
Format(
"%1 %2 DamageSystem DamageZones", path_base,
GetType() );
415 if ( !
GetGame().ConfigIsExisting(path_base) )
424 GetDamageZones( zone_names );
426 for (
int i = 0; i < zone_names.Count(); i++ )
428 path =
string.Format(
"%1 %2 displayName", path_base, zone_names[i] );
467 void Log(
string msg,
string fnc_name =
"n/a")
515 string basePath =
string.Format(
"cfgVehicles %1 Skinning BloodInfectionSettings",
GetType());
516 if (
g_Game.ConfigIsExisting(basePath))
520 float value =
g_Game.ConfigGetFloat(
string.Format(
"%1 %2 chance", basePath, agentName));
549 return m_EM.IsWorking();
670 if(!cargo)
return false;
741 return IsDamageDestroyed();
746 if (ai && ai.IsBeingBackstabbed())
753 return !IsDamageDestroyed();
809 if (super.CanBeActionTarget())
847 Debug.
Log(
"TryDelete - not ready for deletion");
851 if (
GetGame().HasInventoryJunctureItem(
this))
853 Debug.
Log(
"TryDelete - deferred call");
859 Debug.
Log(
"TryDelete - OnBeforeTryDelete end");
861 Debug.
Log(
"TryDelete - DeleteSafe end");
902 for (
int i = 0; i <
GetInventory().AttachmentCount(); i++ )
907 if ( attachment.GetInventory().GetCargo() )
912 if ( attachment.GetInventory().GetAttachmentSlotsCount() > 0 )
933 m_EM.OnDeviceDestroyed();
938 super.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
940 g_Game.GetWorld().AddEnvShootingSource(pos, 1.0);
944 m_DestructionBehaviourObj.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
957 EntityAI old_owner = oldLoc.GetParent();
958 EntityAI new_owner = newLoc.GetParent();
971 Error(
"EntityAI::EEItemLocationChanged - detached, but old_owner is null");
979 Error(
"EntityAI::EEItemLocationChanged - attached, but new_owner is null");
984 Man.Cast(oldLoc.GetParent()).OnItemInHandsChanged();
989 Man.Cast(newLoc.GetParent()).OnItemInHandsChanged();
1030 parent.OnAttachmentRuined(
this);
1063 ErrorEx(
"Incorrect destruction behaviour type, make sure the class returned in 'GetDestructionBehaviour()' is a valid type inheriting from 'DestructionEffectBase'");
1103 dead_entity.SetHealth(GetHealth());
1139 m_ComponentsBank.GetComponent(comp_key).Event_OnItemAttached(item, slot_name);
1145 if (
m_EM && item.GetCompEM())
1146 m_EM.OnAttachmentAdded(item);
1148 if ( item.GetInventory().GetCargo() )
1151 if ( item.GetInventory().GetAttachmentSlotsCount() > 0 )
1174 m_ComponentsBank.GetComponent(comp_key).Event_OnItemDetached(item, slot_name);
1180 if (
m_EM && item.GetCompEM())
1181 m_EM.OnAttachmentRemoved(item);
1201 item.OnMovedInsideCargo(
this);
1211 item.OnRemovedFromCargo(
this);
1218 item.OnMovedWithinCargo(
this);
1317 m_EM.HandleMoveInsideCargo(container);
1337 if (
m_EM &&
m_EM.GetRestorePlugState() )
1339 int b1 =
m_EM.GetEnergySourceStorageIDb1();
1340 int b2 =
m_EM.GetEnergySourceStorageIDb2();
1341 int b3 =
m_EM.GetEnergySourceStorageIDb3();
1342 int b4 =
m_EM.GetEnergySourceStorageIDb4();
1352 bool is_attachment =
false;
1354 if (potential_energy_source)
1355 is_attachment =
GetInventory().HasAttachment(potential_energy_source);
1357 if ( !is_attachment && potential_energy_source )
1358 is_attachment = potential_energy_source.GetInventory().HasAttachment(
this);
1360 if ( potential_energy_source && potential_energy_source.GetCompEM() && !is_attachment )
1361 m_EM.PlugThisInto(potential_energy_source);
1385 string cfg_path =
"cfgVehicles " +
GetType() +
" AnimationSources";
1387 if (
GetGame().ConfigIsExisting(cfg_path) )
1391 for (
int i = 0; i < selections; i++)
1393 string selection_name;
1403 string cfg_path =
"cfgVehicles " +
GetType() +
" AnimationSources";
1405 if (
GetGame().ConfigIsExisting(cfg_path) )
1409 for (
int i = 0; i < selections; i++)
1411 string selection_name;
1466 if( attachment && attachment.GetInventory() &&
GetInventory() )
1469 attachment.GetInventory().GetCurrentInventoryLocation( il );
1498 return att.CanBeCombined(e,
true, stack_max_limit);
1525 return GetInventory().GetCargo().CanReceiveItemIntoCargo(item));
1561 return GetInventory().GetCargo().CanSwapItemInCargo(child_entity, new_entity));
1625 int attachmentDepth = 0;
1628 if (ent.GetInventory().GetCurrentInventoryLocation(lcn) && lcn.
IsValid())
1642 ent = ent.GetHierarchyParent();
1702 Debug.
LogWarning(
"Obsolete function - use CanDisplayAttachmentSlot with slot id parameter");
1722 for (
int i = 0; i < count; i++)
1783 SetInvisible(
false);
1784 OnInvisibleSet(
false);
1852 GetInventory().GetCurrentInventoryLocation( inventory_location );
1854 return parent.GetInventory().GetSlotLock( inventory_location.
GetSlot() );
1865 if (
GetGame().IsMultiplayer() )
1880 if (
GetGame().IsMultiplayer() )
1898 if (
GetGame().IsMultiplayer() )
1914 if (
GetGame().IsMultiplayer() )
1932 if (
GetGame().IsMultiplayer() )
1944 if (
GetGame().IsMultiplayer() )
1962 if (
GetGame().IsMultiplayer() )
1978 if (
GetGame().IsMultiplayer() )
1994 if (
GetGame().IsMultiplayer() )
2010 if (
GetGame().IsMultiplayer() )
2029 if (
GetGame().IsMultiplayer())
2063 for (
int i = 0; i <
GetInventory().AttachmentCount(); i++ )
2066 if ( attachment && attachment.IsInherited( type ) )
2077 for (
int i = 0; i <
GetInventory().AttachmentCount(); i++ )
2080 if ( attachment.IsKindOf ( type ) )
2136 void SetWet(
float value,
bool allow_client =
false);
2198 bool SetQuantity(
float value,
bool destroy_config =
true,
bool destroy_forced =
false,
bool allow_client =
false,
bool clamp_to_stack_max =
true);
2242 bool isParentAliveOrganism =
false;
2243 if (rootParent && rootParent !=
this)
2244 isParentAliveOrganism = (rootParent.
IsMan() || rootParent.IsAnimal() || rootParent.IsZombie()) && rootParent.IsAlive();
2250 else if (isParentAliveOrganism)
2299 m_LastFTChangeTime = -1;
2300 m_PresumedTimeRemaining = -1;
2305 Debug.
Log(
"SetTemperatureEx | entity " +
this +
" does not have temperature range defined!");
2309 if (!
m_TAC.TryAccessSource(data))
2390 Debug.
Log(
"RefreshTemperatureAccess | entity " +
this +
" does not have temperature range defined!");
2394 m_TAC.TryAccessSource(data);
2503 if (previous != frozen)
2513 float progressDelta = 1;
2523 if (progressDelta == 0)
2526 float changeTimeDefault;
2527 float changeTimeMin;
2546 changeTimeDefault *= 1/coef;
2549 progressVal = progressVal + progressDelta / changeTime;
2551 float remnantTemp = 0;
2555 if (progressVal > 1.0)
2560 remnantTemp = (((progressVal - 1) * changeTime) / progressDelta) * deltaHeat;
2566 if (progressVal < 0.0)
2571 remnantTemp = ((-progressVal * changeTime) / progressDelta) * deltaHeat;
2586 if (progressVal > 0 && progressVal < 1)
2588 m_LastFTChangeTime = changeTime;
2590 m_PresumedTimeRemaining = (1 - progressVal) * changeTime;
2592 m_PresumedTimeRemaining = progressVal * changeTime;
2641 else if (previous >= 1)
2654 float deltaTime = 1;
2668 progressVal += deltaTime / changeTime;
2674 else if (deltaHeat > 0)
2732 Error(
"Attempting to change variable client side, variables are supposed to be changed on server only !!");
2761 return super.GetHiddenSelections();
2770 return super.GetHiddenSelectionsTextures();
2779 return super.GetHiddenSelectionsMaterials();
2903 energy_source.GetPersistentID(b1, b2, b3, b4);
2947 if ( !ctx.
Read( f_energy ) )
2949 m_EM.SetEnergy(f_energy);
2952 bool b_is_passive =
false;
2953 if ( !ctx.
Read( b_is_passive ) )
2955 m_EM.SetPassiveState(b_is_passive);
2958 bool b_is_on =
false;
2959 if ( !ctx.
Read( b_is_on ) )
2966 bool b_is_plugged =
false;
2967 if ( !ctx.
Read( b_is_plugged ) )
2971 if ( version <= 103 )
2974 int i_energy_source_ID_low = 0;
2975 if ( !ctx.
Read( i_energy_source_ID_low ) )
2979 int i_energy_source_ID_high = 0;
2980 if ( !ctx.
Read( i_energy_source_ID_high ) )
2990 if ( !ctx.
Read(b1) )
return false;
2991 if ( !ctx.
Read(b2) )
return false;
2992 if ( !ctx.
Read(b3) )
return false;
2993 if ( !ctx.
Read(b4) )
return false;
2998 m_EM.StoreEnergySourceIDs( b1, b2, b3, b4 );
2999 m_EM.RestorePlugState(
true);
3029 if (
GetGame().IsMultiplayer() )
3031 bool is_on =
m_EM.IsSwitchedOn();
3033 if (is_on !=
m_EM.GetPreviousSwitchState())
3041 int id_low =
m_EM.GetEnergySourceNetworkIDLow();
3042 int id_High =
m_EM.GetEnergySourceNetworkIDHigh();
3052 string object = energy_source.GetType();
3053 Error(
"Synchronization error! Object " +
object +
" has no instance of the Energy Manager component!");
3056 m_EM.PlugThisInto(energy_source);
3064 m_EM.DeviceUpdate();
3065 m_EM.StartUpdates();
3120 ctx.
Write(varFlags);
3135 if (!ctx.
Read(varFlags))
3171 if (!ctx.
Read(intValue))
3179 if (!ctx.
Read(value))
3183 if (!ctx.
Read(intValue))
3209 int mask =
Math.
Round(floats.Get(index));
3215 float temperature = floats.Get(index);
3217 floats.RemoveOrdered(index);
3219 bool frozen =
Math.
Round(floats.Get(index));
3221 floats.RemoveOrdered(index);
3223 float FTProgress = floats.Get(index);
3225 floats.RemoveOrdered(index);
3249 string text =
string.
Empty;
3252 text +=
"Disabled: " + GetIsSimulationDisabled() +
"\n";
3263 text +=
"Switched On: " + compEM.
IsSwitchedOn() +
"\n";
3264 text +=
"Is Working: " + compEM.
IsWorking() +
"\n";
3311 SetAnimationPhase ( selection_name, 1 );
3320 SetAnimationPhase ( selection_name, 0 );
3418 super.OnRPC(sender, rpc_type, ctx);
3425 case ERPCs.RPC_BS_SKINNED_STATE:
3427 Param1<bool> p_skinned_state=
new Param1<bool>(
false);
3428 if (ctx.
Read(p_skinned_state))
3430 float state = p_skinned_state.param1;
3437 case ERPCs.RPC_EXPLODE_EVENT:
3446 #ifdef DIAG_DEVELOPER
3456 int AttachmentsCount = GetInventory().AttachmentCount();
3457 if (AttachmentsCount > 0)
3459 for (i = 0; i < AttachmentsCount; i++)
3461 GetInventory().GetAttachmentFromIndex(i).FixEntity();
3465 CargoBase cargo = GetInventory().GetCargo();
3469 for (i = 0; i < cargoCount; i++)
3489 string GetConfigWeightModifiedDebugText()
3491 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3493 return "(" + m_ConfigWeight +
"(config weight) * " + GetWetWeightModifier() +
"(Wetness Modifier))";
3495 return string.Empty;
3515 if (WeightDebug.m_VerbosityFlags & WeightDebugType.SET_DIRTY_FLAG)
3517 Print(
"---------------------------------------");
3518 Print(
"ent:" +
this +
" - SetWeightDirty");
3519 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
3523 Print(
"---------------------------------------");
3539 int AttachmentsCount =
GetInventory().AttachmentCount();
3540 if (AttachmentsCount > 0)
3542 for (i = 0; i < AttachmentsCount; i++)
3544 totalWeight +=
GetInventory().GetAttachmentFromIndex(i).GetWeightEx(forceRecalc);
3552 for (i = 0; i < cargoCount; i++)
3554 totalWeight += cargo.
GetItem(i).GetWeightEx(forceRecalc);
3576 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3578 WeightDebug.GetWeightDebug(
this).SetWeight(
m_WeightEx);
3580 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_DIRTY)
3582 Print(
"ent:" +
this +
" - Dirty Recalc");
3583 if (WeightDebug.m_VerbosityFlags & WeightDebugType.DUMP_STACK)
3594 void UpdateWeight(WeightUpdateType updateType = WeightUpdateType.FULL,
float weightAdjustment = 0);
3611 if (action_id ==
EActions.FIX_ENTITY)
3613 #ifdef DIAG_DEVELOPER
3617 else if (action_id ==
EActions.GET_TOTAL_WEIGHT)
3619 WeightDebug.ClearWeightDebug();
3621 Debug.
Log(
"======================== "+
GetType() +
" =================================");
3625 Debug.
Log(
"----------------------------------------------------------------------------------------------");
3627 else if (action_id ==
EActions.GET_TOTAL_WEIGHT_RECALC)
3629 WeightDebug.ClearWeightDebug();
3630 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
3632 Debug.
Log(
"======================== "+
GetType() +
" RECALC ===========================");
3636 WeightDebug.PrintAll(
this);
3637 Debug.
Log(
"----------------------------------------------------------------------------------------------");
3638 WeightDebug.SetVerbosityFlags(0);
3640 else if (action_id ==
EActions.GET_PLAYER_WEIGHT)
3642 WeightDebug.ClearWeightDebug();
3644 Debug.
Log(
"======================== PLAYER: "+player+
" ===========================");
3646 Debug.
Log(
"New overall weight Player:"+player.GetWeightEx().ToString());
3648 Debug.
Log(
"----------------------------------------------------------------------------------------------");
3650 else if (action_id ==
EActions.GET_PLAYER_WEIGHT_RECALC)
3652 WeightDebug.ClearWeightDebug();
3653 WeightDebug.SetVerbosityFlags(WeightDebugType.RECALC_FORCED);
3655 Debug.
Log(
"======================== PLAYER RECALC: "+player+
" ===========================");
3657 Debug.
Log(
"New overall weight Player:"+player.GetWeightEx(
true).ToString());
3658 WeightDebug.PrintAll(player);
3659 Debug.
Log(
"----------------------------------------------------------------------------------------------");
3660 WeightDebug.SetVerbosityFlags(0);
3684 if ( MemoryPointExists(
"invView2" ) )
3686 #ifdef PLATFORM_WINDOWS
3719 #ifdef PLATFORM_CONSOLE
3730 Debug.
LogError(
"EntityAI: HitComponentForAI not set properly for that entity (" +
GetType() +
")");
3738 Debug.
LogError(
"EntityAI: DefaultHitComponent not set properly for that entity (" +
GetType() +
")");
3746 Debug.
LogError(
"EntityAI: DefaultHitPositionComponent not set for that entity (" +
GetType() +
")");
3752 Debug.
LogError(
"EntityAI: SuitableFinisherHitComponents not set for that entity (" +
GetType() +
")");
3833 if (
g_Game.IsWorldWetTempUpdateEnabled())
3837 float target =
g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(
this);
3840 float heatPermCoef = 1.0;
3844 heatPermCoef *= ent.GetHeatPermeabilityCoef();
3845 ent = ent.GetHierarchyParent();
3862 ConfigGetTextArray(
"Attachments", slots);
3865 ConfigGetTextArray(
"magazines", mags);
3879 int consumable_count;
3881 for (
int i = 0; i < all_paths.Count(); i++)
3883 config_path = all_paths.Get(i);
3886 for (
int x = 0;
x < children_count;
x++)
3889 path = config_path +
" " + child_name;
3891 bool should_check = 1;
3892 if ( config_path ==
"CfgVehicles" && scope == 0)
3901 for (
int z = 0; z < slots.Count(); z++)
3903 if (slots.Get(z) == inv_slot)
3937 int invulnerability;
3938 switch (servercfg_param)
3940 case "disableContainerDamage":
3944 case "disableBaseDamage":
3949 if (invulnerability > 0)
3951 SetAllowDamage(
false);
3969 attachmentsArray.Copy(attachments);
3972 for (
int i = 0; i <
GetInventory().GetAttachmentSlotsCount(); i++)
3974 attachmentsArray.Insert(
GetInventory().GetAttachmentSlotId(i));
3980 foreach(
int slot : attachmentsArray )
3983 item = parent.GetInventory().FindAttachment(slot);
3989 if( item.GetInventory().AttachmentCount() > 0 )
3991 for(i = 0; i < item.GetInventory().GetAttachmentSlotsCount(); i++)
3993 childrenAtt.Insert(item.GetInventory().GetAttachmentSlotId(i));
3999 item.SetInvisible(invisible);
4000 item.OnInvisibleSet(invisible);
4041 if (Car.CastTo(car, transport))
4043 if (car.GetSpeedometerAbsolute() > 2 )
4046 ProcessDirectDamage(DT_CUSTOM, transport,
"",
"TransportHit",
"0 0 0", damage);
4054 if (IsDamageDestroyed() && car.GetSpeedometerAbsolute() > 3)
4057 impulse[1] = 40 * 1.5;
4061 else if (Boat.CastTo(boat, transport))
4063 Human player = Human.Cast(
this);
4064 if (player && player.PhysicsGetLinkedEntity() == boat)
4073 ProcessDirectDamage(DT_CUSTOM, transport,
"",
"TransportHit",
"0 0 0", damage);
4084 ProcessDirectDamage(DT_CUSTOM, transport,
"",
"TransportHit",
"0 0 0", damage);
4095 impulse[1] = 40 * 1.5;
4185 for (
int i = 0; i < count; i++)
4195 set<int> dflt =
new set<int>;
4207 if (performLegacyInit)
4222 for (
int i = 0; i < count; i++)
4244 for (
int i = 0; i < slotCount; i++)
4254 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4255 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4256 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4265 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4266 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4267 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4276 if (ConfigGetBool(
"isStrap"))
4278 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4279 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4283 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4284 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4297 for (
int i = 0; i < slotCount; i++)
4307 if (ConfigGetBool(
"noNVStrap"))
4309 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4311 if (ConfigGetBool(
"noMask"))
4313 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4315 if (ConfigGetBool(
"noEyewear"))
4317 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4327 if (ConfigGetBool(
"noNVStrap"))
4329 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4331 if (ConfigGetBool(
"noHelmet"))
4333 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4335 if (ConfigGetBool(
"noEyewear"))
4337 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4347 if (ConfigGetBool(
"isStrap"))
4349 if (ConfigGetBool(
"noHelmet"))
4351 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4353 if (ConfigGetBool(
"noMask"))
4355 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4360 if (ConfigGetBool(
"noHelmet"))
4362 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4364 if (ConfigGetBool(
"noMask"))
4366 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4408 ErrorEx(
"m_AttachmentExclusionSlotMap not available! Fill the 'inventorySlot[]' in the " +
this +
" config file.");
4413 if (values && values.Count() != 0)
4423 parent.PropagateExclusionValueRecursive(passThis,lcn.
GetSlot());
4430 if (values && values.Count() != 0)
4437 int count = passThis.Count();
4438 for (
int i = 0; i < count; i++)
4444 parent.ClearExclusionValueRecursive(passThis,lcn.
GetSlot());
4452 set<int> values =
new set<int>();
4455 values.InsertSet(slotValues);
4484 if (targetSlotValues)
4486 set<int> additionalValues =
new set<int>();
4490 if (additionalValues.Count() > 0)
4492 int countTarget = targetSlotValues.Count();
4493 for (
int i = 0; i < countTarget; i++)
4495 if (additionalValues.Find(targetSlotValues[i]) != -1)
4513 int count = values.Count();
4514 for (
int i = 0; i < count; i++)
4516 if (currentSlotValuesAll.Find(values[i]) != -1)
4525 if (values && values.Count() != 0)
4533 if (parent && parent !=
this)
4535 return parent.IsExclusionFlagPresentRecursive(passThis,lcn.
GetSlot());
4550 if (occupiedException)
4552 adjustedValue = value;
4556 if (targetException)
4558 adjustedValue = null;
4563 return adjustedValue.Count() != 0;
4569 adjustedValue = value;
4578 if (targetException)
4580 adjustedValue = null;
4585 return adjustedValue.Count() != 0;
4598 bool hasInternalConflict = attachment.HasInternalExclusionConflicts(slotId);
4603 diff = attachment.GetAttachmentExclusionMaskAll(slotId);
4604 diff.RemoveItems(currentAtt.GetAttachmentExclusionMaskAll(slotId));
4605 if (diff.Count() == 0)
4607 return !hasInternalConflict;
4616 EntityAI rootOwner = attachment.GetHierarchyRoot();
4619 diff = attachment.GetAttachmentExclusionMaskAll(slotId);
4620 diff.RemoveItems(attachment.GetAttachmentExclusionMaskAll(curLoc.
GetSlot()));
4621 if (diff.Count() == 0)
4623 return !hasInternalConflict;
4652void SetDebugDeveloper_item(
Object entity)
4655 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 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()
override bool IsDestructionBehaviour()
override bool IsSelfAdjustingTemperature()
override bool ReplaceOnDeath()
override string GetDeadItemName()
class Animal_CapraHircus extends AnimalBase GetDestructionBehaviour()
override void OnDamageDestroyed(int oldLevel)
override bool KeepHealthOnReplace()
override void OnFreezeStateChangeServer()
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 CanItemOverheat()
override bool IsPrepareToDelete()
override bool CanHaveTemperature()
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 InitItemVariables()
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 void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
override float GetSingleInventoryItemWeightEx()
override bool IsHologram()
override void DeSerializeNumericalVars(array< float > floats)
override float GetItemOverheatThreshold()
override void SerializeNumericalVars(array< float > floats_out)
override void OnItemAttachmentSlotChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
override void OnWasAttached(EntityAI parent, int slot_id)
override float GetWetMin()
static string GetDisplayName(int liquid_type)
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)
void OnEntityKilled(Object killer, EntityAI target)
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native float GetTickTime()
Returns current time from start of the game.
override ScriptCallQueue GetCallQueue(int call_category)
bool FormatRawConfigStringKeys(inout string value)
Changes localization key format to script-friendly format.
proto native bool ConfigIsExisting(string path)
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native DayZPlayer GetPlayer()
AnalyticsManagerServer GetAnalyticsServer()
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native EntityAI GetEntityByPersitentID(int b1, int b2, int b3, int b4)
static ref TFloatArray ARRAY_FLOAT
proto native int GetItemCount()
proto native EntityAI GetItem(int index)
represents base for cargo storage for entities
static bool GetDisableBaseDamage()
static bool GetDisableContainerDamage()
static array< float > GetWetnessWeightModifiers()
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....
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.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
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.
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)
int GetHideIconMask()
should the item's icon be hidden in any part of the inventory?
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 ClearExclusionValueRecursive(set< int > values, int slotId)
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.
const int DEAD_REPLACE_DELAY
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
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
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
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 SerializeNumericalVars(array< float > floats_out)
void SetAttachmentExclusionMaskSlot(int slotId, set< int > values)
sets values for specific slot
float m_PreviousRoofTestTime
bool IsRefresherSignalingViable()
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
ref map< eAgents, float > m_BloodInfectionChanceCached
ref array< EntityAI > m_AttachmentsWithAttachments
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
ref map< int, ref set< int > > m_AttachmentExclusionSlotMap
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
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()
void EECargoMove(EntityAI item)
bool IsUniversalTemperatureSource()
Universal Temperature Sources Helpers.
void SetTemperatureEx(TemperatureData data)
sets temperature, handles base overheating and freezing state progression logics
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 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 EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
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
ref HiddenSelectionsData m_HiddenSelectionsData
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()
ref map< int, string > m_DamageDisplayNameMap
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)
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()
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()
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()
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")
array< string > GetSuitableFinisherHitComponents()
void OnCEUpdate()
Central economy calls this function whenever going over all the entities.
ref KillerData m_KillerData
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)
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)
const int DELETE_CHECK_DELAY
ComponentEnergyManager m_EM
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,...
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)
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 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.
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)
void PropagateExclusionValueRecursive(set< int > values, int slotId)
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
Component GetComponent(int comp_type, string extended_class_name="")
GetComponent.
ScriptInvoker GetOnAttachmentSetLock()
bool CanDisplayAttachmentCategory(string category_name)
void EEInventoryOut(Man oldParentMan, EntityAI diz, EntityAI newParent)
proto native void SetAITargetCallbacks(AbstractAITargetCallbacks callbacks)
void InitDamageZoneDisplayNameMapping()
Initialize map of damage zone display names for more optimized retrieval.
ref DestructionEffectBase m_DestructionBehaviourObj
void OnFreezeStateChangeClient()
Component CreateComponent(int comp_type, string extended_class_name="")
CreateComponent.
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 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...
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 InitInherentSlotExclusionMap()
map stored on instance to better respond to various state changes
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)
set< int > GetAttachmentExclusionMaskChildren()
Mask value coming from the item's attachments.
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()
ref set< int > m_AttachmentExclusionMaskChildren
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()
void InitAttachmentExclusionValues()
int GetSlotsCountCorrect()
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
proto native int GetUserReservedLocationCount()
proto native int FindFirstUserReservedLocationIndexForContainer(notnull EntityAI e)
proto native void GetUserReservedLocation(int index, out notnull InventoryLocation dst)
inventory for plain man/human
proto native bool IsValid()
verify current set inventory location
proto native int GetSlot()
returns slot id if current type is Attachment
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
proto native int GetType()
returns type of InventoryLocation
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
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)
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.
Manager class for managing Effect (EffectParticle, EffectSound)
proto void Call(func fn, 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)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void CallLater(func fn, int delay=0, bool repeat=false, 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)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
ScriptInvoker Class provide list of callbacks usage:
proto bool Write(void value_out)
proto bool Read(void value_in)
float m_InterpolatedFraction
Base native class for all motorized wheeled vehicles.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
proto native CGame GetGame()
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 int INVENTORY_MAX_REACHABLE_DEPTH_ATT
Inventory visibility depth, also governs default direct access for most cases. Actual inventory depth...
const float MELEE_ITEM_DAMAGE
const int REFRESHER_FREQUENCY_DEFAULT
array< string > TStringArray
const float TEMP_COEF_COOLING_GLOBAL
static const float TEMPERATURE_SENSITIVITY_THRESHOLD
static const float TEMPERATURE_FREEZETHAW_ACCELERATION_COEF
static const float TEMPERATURE_TIME_OVERHEAT_MIN
const float TEMP_COEF_WORLD
static const float TEMPERATURE_TIME_THAW_MIN
static const float TEMPERATURE_RATE_AVERAGE_ABS
static const float TEMPERATURE_FREEZETHAW_LEGACY_COEF
static const float TEMPERATURE_TIME_FREEZE_MIN
const int VARIABLE_TEMPERATURE
const float STATE_SOAKING_WET
const float STATE_DRENCHED
const float LIQUID_THROUGHPUT_DEFAULT
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Round(float f)
Returns mathematical round of value.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
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
class JsonUndergroundAreaTriggerData GetPosition
static const string Empty
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.
proto int ToLower()
Changes string to lowercase. Returns length.