DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс InventoryItem

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

bool UsesGlobalDeploy ()
 
override int GetQuickBarBonus ()
 
void InitializeActions ()
 
override void GetActions (typename action_input_type, out array< ActionBase_Basic > actions)
 
void SetActions ()
 
void SetActionAnimOverrides ()
 
void AddAction (typename actionName)
 
void RemoveAction (typename actionName)
 
void OverrideActionAnimation (typename action, int commandUID, int stanceMask=-1, int commandUIDProne=-1)
 
void OnItemInHandsPlayerSwimStart (PlayerBase player)
 
ScriptedLightBase GetLight ()
 
void LoadParticleConfigOnFire (int id)
 
void LoadParticleConfigOnOverheating (int id)
 
float GetOverheatingValue ()
 
void IncreaseOverheating (ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
 
void CheckOverheating (ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
 
bool IsOverheatingEffectActive ()
 
void OnOverheatingDecay ()
 
void StartOverheating (ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
 
void UpdateOverheating (ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
 
void StopOverheating (ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
 
void RegisterOverheatingParticle (Particle p, float min_heat_coef, float max_heat_coef, int particle_id, Object parent, vector local_pos, vector local_ori)
 
float GetOverheatingCoef ()
 
void UpdateAllOverheatingParticles ()
 
void KillAllOverheatingParticles ()
 
float GetInfectionChance (int system=0, Param param=null)
 Infection chance while/after using this item, originally used for wound infection after bandaging, params 'system' and 'param' can allow usage by other systems as well.
 
float GetDisinfectQuantity (int system=0, Param param1=null)
 
float GetFilterDamageRatio ()
 
bool HasMuzzle ()
 Returns true if this item has a muzzle (weapons, suppressors)
 
int GetMuzzleID ()
 Returns global muzzle ID. If not found, then it gets automatically registered.
 
int GetDamageSystemVersionChange ()
 Re-sets DamageSystem changes.
 
void ~ItemBase ()
 
void SetCEBasedQuantity ()
 
void LockToParent ()
 Locks this item in it's current attachment slot of its parent. This makes the "locked" icon visible in inventory over this item.
 
void UnlockFromParent ()
 Unlocks this item from its attachment slot of its parent.
 
override void CombineItemsClient (EntityAI entity2, bool use_stack_max=true)
 
bool IsLiquidPresent ()
 
bool IsLiquidContainer ()
 
int GetLiquidContainerMask ()
 
bool IsBloodContainer ()
 
bool IsNVG ()
 
bool IsExplosive ()
 
string GetExplosiveTriggerSlotName ()
 
bool IsLightSource ()
 
bool CanBeRepairedByCrafting ()
 
bool IsFacingPlayer (PlayerBase player, string selection)
 
bool IsPlayerInside (PlayerBase player, string selection)
 
override bool CanObstruct ()
 
override bool IsBeingPlaced ()
 
void SetIsBeingPlaced (bool is_being_placed)
 
void OnEndPlacement ()
 
override bool IsHologram ()
 
bool CanBeDigged ()
 
int GetOnDigWormsAmount ()
 
bool CanMakeGardenplot ()
 
void SetIsHologram (bool is_hologram)
 
override void OnMovedInsideCargo (EntityAI container)
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
override void EOnContact (IEntity other, Contact extra)
 
void RefreshPhysics ()
 
override void OnCreatePhysics ()
 
override void OnItemAttachmentSlotChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override void EEDelete (EntityAI parent)
 
override void EEKilled (Object killer)
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
override string ChangeIntoOnAttach (string slot)
 
override string ChangeIntoOnDetach ()
 
void ExplodeAmmo ()
 
void DoAmmoExplosion ()
 
override void EEHitBy (TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
 
bool DamageItemInCargo (float damage)
 
bool DamageItemAttachments (float damage)
 
override bool IsSplitable ()
 
override bool CanBeSplit ()
 
override void SplitIntoStackMaxClient (EntityAI destination_entity, int slot_id)
 
void SplitIntoStackMax (EntityAI destination_entity, int slot_id, PlayerBase player)
 
override void SplitIntoStackMaxEx (EntityAI destination_entity, int slot_id)
 
void SplitIntoStackMaxToInventoryLocationClient (notnull InventoryLocation dst)
 
void SplitIntoStackMaxCargoClient (EntityAI destination_entity, int idx, int row, int col)
 
void SplitIntoStackMaxToInventoryLocation (notnull InventoryLocation dst)
 
ItemBase SplitIntoStackMaxToInventoryLocationEx (notnull InventoryLocation dst)
 
void SplitIntoStackMaxCargo (EntityAI destination_entity, int idx, int row, int col)
 
void SplitIntoStackMaxHandsClient (PlayerBase player)
 
void SplitIntoStackMaxHands (PlayerBase player)
 
void SplitItemToInventoryLocation (notnull InventoryLocation dst)
 
void SplitItem (PlayerBase player)
 
void OnQuantityChanged (float delta)
 Called on server side when this item's quantity is changed. Call super.OnQuantityChanged(); first when overriding this event.
 
void OnAttachmentQuantityChanged (ItemBase item)
 Called on server side when some attachment's quantity is changed. Call super.OnAttachmentQuantityChanged(item); first when overriding this event.
 
void OnAttachmentQuantityChangedEx (ItemBase item, float delta)
 Called on server side when some attachment's quantity is changed. Call super.OnAttachmentQuantityChanged(item); first when overriding this event.
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
override void OnRightClick ()
 
override bool CanBeCombined (EntityAI other_item, bool reservation_check=true, bool stack_max_limit=false)
 
bool IsCombineAll (ItemBase other_item, bool use_stack_max=false)
 
bool IsResultOfSplit ()
 
void SetResultOfSplit (bool value)
 
int ComputeQuantityUsed (ItemBase other_item, bool use_stack_max=true)
 
float ComputeQuantityUsedEx (ItemBase other_item, bool use_stack_max=true)
 
override void CombineItemsEx (EntityAI entity2, bool use_stack_max=true)
 
void CombineItems (ItemBase other_item, bool use_stack_max=true)
 
void OnCombine (ItemBase other_item)
 
void GetRecipesActions (Man player, out TSelectableActionInfoArray outputList)
 
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
void OnActivatedByTripWire ()
 
void OnActivatedByItem (notnull ItemBase item)
 Called when this item is activated by other.
 
bool CanExplodeInFire ()
 
bool CanEat ()
 
override bool IsIgnoredByConstruction ()
 
bool HasFoodStage ()
 
FoodStage GetFoodStage ()
 overridden on Edible_Base; so we don't have to parse configs all the time
 
bool CanBeCooked ()
 
bool CanBeCookedOnStick ()
 
bool CanRepair (ItemBase item_repair_kit)
 
bool Repair (PlayerBase player, ItemBase item_repair_kit, float specialty_weight)
 
int GetItemSize ()
 
bool CanBeMovedOverride ()
 
void SetCanBeMovedOverride (bool setting)
 
void MessageToOwnerStatus (string text)
 Send message to owner player in grey color.
 
void MessageToOwnerAction (string text)
 Send message to owner player in yellow color.
 
void MessageToOwnerFriendly (string text)
 Send message to owner player in green color.
 
void MessageToOwnerImportant (string text)
 Send message to owner player in red color.
 
override bool IsItemBase ()
 
override bool KindOf (string tag)
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 
int NameToID (string name)
 
string IDToName (int id)
 
void OnSyncVariables (ParamsReadContext ctx)
 DEPRECATED (most likely)
 
override void SerializeNumericalVars (array< float > floats_out)
 
override void DeSerializeNumericalVars (array< float > floats)
 
override void WriteVarsToCTX (ParamsWriteContext ctx)
 
override bool ReadVarsFromCTX (ParamsReadContext ctx, int version=-1)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override void AfterStoreLoad ()
 
override void EEOnAfterLoad ()
 
bool CanBeDisinfected ()
 
override void OnVariablesSynchronized ()
 
override bool SetQuantity (float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
 Set item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity reaches varQuantityMin or lower and the item config contains the varQuantityDestroyOnMin = true entry, the item gets destroyed. destroy_forced = true means item gets destroyed when quantity reaches varQuantityMin or lower regardless of config setting, returns true if the item gets deleted.
 
bool AddQuantity (float value, bool destroy_config=true, bool destroy_forced=false)
 add item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity reaches varQuantityMin or lower and the item config contains the varQuantityDestroyOnMin = true entry, the item gets destroyed. destroy_forced = true means item gets destroyed when quantity reaches varQuantityMin or lower regardless of config setting, returns true if the item gets deleted
 
void SetQuantityMax ()
 
override void SetQuantityToMinimum ()
 
void SetQuantityNormalized (float value, bool destroy_config=true, bool destroy_forced=false)
 Sets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config(for Min 0 and Max 5000, setting 0.5 will result in value 2500)
 
override float GetQuantityNormalized ()
 Gets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config(for Min 0 and Max 5000, value 2500 will result in 0.5)
 
float GetQuantityNormalizedScripted ()
 
override int GetQuantityMax ()
 
override int GetTargetQuantityMax (int attSlotID=-1)
 
override int GetQuantityMin ()
 
int GetQuantityInit ()
 
override bool HasQuantity ()
 
override float GetQuantity ()
 
bool IsFullQuantity ()
 
override float GetSingleInventoryItemWeightEx ()
 
float GetSingleInventoryItemWeight ()
 
float GetWeightSpecialized (bool forceRecalc=false)
 
int GetNumberOfItems ()
 Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
 
float GetUnitWeight (bool include_wetness=true)
 Obsolete, use GetWeightEx instead.
 
override void ClearInventory ()
 
float GetEnergy ()
 
override void OnEnergyConsumed ()
 
override void OnEnergyAdded ()
 
void ConvertEnergyToQuantity ()
 
float GetHeatIsolationInit ()
 
float GetHeatIsolation ()
 
float GetDryingIncrement (string pIncrementName)
 
float GetSoakingIncrement (string pIncrementName)
 
override void SetWet (float value, bool allow_client=false)
 
override void AddWet (float value)
 
override void SetWetMax ()
 
override float GetWet ()
 
override float GetWetMax ()
 
override float GetWetMin ()
 
override float GetWetInit ()
 
override void OnWetChanged (float newVal, float oldVal)
 
override void OnWetLevelChanged (EWetnessLevel newLevel, EWetnessLevel oldLevel)
 
override EWetnessLevel GetWetLevel ()
 
override void SetStoreLoad (bool value)
 
override bool IsStoreLoad ()
 
override void SetStoreLoadedQuantity (float value)
 
override float GetStoreLoadedQuantity ()
 
float GetItemModelLength ()
 
float GetItemAttachOffset ()
 
override void SetCleanness (int value, bool allow_client=false)
 
override int GetCleanness ()
 
bool AllowFoodConsumption ()
 
int GetLockType ()
 
string GetLockSoundSet ()
 
override void SetColor (int r, int g, int b, int a)
 
override void GetColor (out int r, out int g, out int b, out int a)
 gets item's color variable as components
 
bool IsColorSet ()
 
string GetColorString ()
 Returns item's PROCEDURAL color as formated string, i.e. "#(argb,8,8,3)color(0.15,0.15,0.15,1.0,CO)".
 
override void SetLiquidType (int value, bool allow_client=false)
 
int GetLiquidTypeInit ()
 
override int GetLiquidType ()
 
void OnLiquidTypeChanged (int oldType, int newType)
 
void UpdateQuickbarShortcutVisibility (PlayerBase player)
 To be called on moving item within character's inventory; 'player' should never be null.
 
void OnInventoryEnter (Man player)
 Event called on item when it is placed in the player(Man) inventory, passes the owner as a parameter.
 
void OnInventoryExit (Man player)
 Event called on item when it is removed from the player(Man) inventory, passes the old owner as a parameter.
 
override void OnPlacementStarted (Man player)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
bool ContainsAgent (int agent_id)
 
override void RemoveAgent (int agent_id)
 
override void RemoveAllAgents ()
 
override void RemoveAllAgentsExcept (int agents_to_keep_mask)
 
override void InsertAgent (int agent, float count=1)
 
void TransferAgents (int agents)
 transfer agents from another item
 
override int GetAgents ()
 
bool LoadAgents (ParamsReadContext ctx, int version)
 
void SaveAgents (ParamsWriteContext ctx)
 
override void CheckForRoofLimited (float timeTresholdMS=3000)
 Roof check for entity, limited by time (anti-spam solution)
 
float GetProtectionLevel (int type, bool consider_filter=false, int system=0)
 
override void EEOnCECreate ()
 Called when entity is being created as new by CE/ Debug.
 
void Open ()
 Implementations only.
 
void Close ()
 
bool IsOpen ()
 
override bool CanDisplayCargo ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutAsAttachment (EntityAI parent)
 
override bool CanReceiveItemIntoCargo (EntityAI item)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanReleaseAttachment (EntityAI attachment)
 
override bool IsHeavyBehaviour ()
 
override bool IsOneHandedBehaviour ()
 
override bool IsTwoHandedBehaviour ()
 
bool IsDeployable ()
 
float GetDeployTime ()
 how long it takes to deploy this item in seconds
 
override void SetTakeable (bool pState)
 
override bool IsTakeable ()
 
bool IsActionTargetVisible ()
 
void PreLoadSoundAttachmentType ()
 Attachment Sound Type getting from config file.
 
override string GetAttachmentSoundType ()
 
void SoundSynchRemoteReset ()
 
void SoundSynchRemote ()
 
bool IsSoundSynchRemote ()
 
string GetDeploySoundset ()
 
string GetPlaceSoundset ()
 
string GetLoopDeploySoundset ()
 
string GetDeployFinishSoundset ()
 
void SetIsPlaceSound (bool is_place_sound)
 
bool IsPlaceSound ()
 
void SetIsDeploySound (bool is_deploy_sound)
 
bool IsDeploySound ()
 
void PlayDeployLoopSoundEx ()
 
void StopDeployLoopSoundEx ()
 
void PlayDeploySound ()
 
void PlayDeployFinishSound ()
 
void PlayPlaceSound ()
 
bool CanPlayDeployLoopSound ()
 
void PlayAttachSound (string slot_type)
 Plays sound on item attach. Be advised, the config structure may slightly change in 1.11 update to allow for more complex use.
 
void PlayDetachSound (string slot_type)
 
void OnApply (PlayerBase player)
 
float GetBandagingEffectivity ()
 
array< stringGetHeadHidingSelection ()
 
bool HidesSelectionBySlot ()
 
WrittenNoteData GetWrittenNoteData ()
 
void StopItemDynamicPhysics ()
 
void PerformDamageSystemReinit ()
 
void SetZoneDamageCEInit ()
 Sets zone damages to match randomized global health set by CE (CE spawn only)
 
bool IsCoverFaceForShave (string slot_name)
 DEPRECATED in use, but returns correct values nontheless. Check performed elsewhere.
 
void ProcessItemWetness (float delta, bool hasParent, bool hasRootAsPlayer, ItemBase refParentIB)
 
void ProcessItemTemperature (float delta, bool hasParent, bool hasRootAsPlayer, ItemBase refParentIB)
 
void HierarchyCheck (out bool hasParent, out bool hasRootAsPlayer, out ItemBase refParentIB)
 
void ProcessDecay (float delta, bool hasRootAsPlayer)
 
bool CanDecay ()
 
bool CanProcessDecay ()
 
bool CanHaveWetness ()
 
override void ProcessVariables ()
 
float GetTemperaturePerQuantityWeight ()
 Used in heat comfort calculations only!
 
override float GetTemperatureFreezeThreshold ()
 
override float GetTemperatureThawThreshold ()
 
override float GetItemOverheatThreshold ()
 
override float GetTemperatureFreezeTime ()
 
override float GetTemperatureThawTime ()
 
void AffectLiquidContainerOnFill (int liquid_type, float amount)
 
bool IsCargoException4x3 (EntityAI item)
 
void CopyScriptPropertiesFrom (EntityAI oldItem)
 
void AddLightSourceItem (ItemBase lightsource)
 Adds a light source child.
 
void RemoveLightSourceItem ()
 
ItemBase GetLightSourceItem ()
 
array< intGetValidFinishers ()
 returns an array of possible finishers
 
bool GetActionWidgetOverride (out typename name)
 If we need a different (handheld)item action widget displayed, the logic goes in here.
 
bool PairWithDevice (notnull ItemBase otherDevice)
 
float GetBaitEffectivity ()
 generic effectivity as a bait for animal catching
 
bool CanBeUsedForSuicide ()
 
void ProcessItemWetnessAndTemperature (float delta, bool hasParent, bool hasRootAsPlayer, ItemBase refParentIB)
 

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

static int GetDebugActionsMask ()
 
static bool HasDebugActionsMask (int mask)
 
static void SetDebugActionsMask (int mask)
 
static void AddDebugActionsMask (int mask)
 
static void RemoveDebugActionsMask (int mask)
 
static void ToggleDebugActionsMask (int mask)
 
static void PlayFireParticles (ItemBase weapon, int muzzle_index, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
 
static void PlayBulletCasingEjectParticles (ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
 
static void PlayOverheatingParticles (ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
 
static void UpdateOverheatingParticles (ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
 
static void StopOverheatingParticles (ItemBase weapon, string ammoType, ItemBase muzzle_owner, ItemBase suppressor, string config_to_search)
 

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

bool m_CanBeDigged
 
EffectSound m_DeployLoopSoundEx
 distinguish if item has been created as new or it came from splitting (server only flag)
 
string m_SoundAttType
 
int m_ColorComponentR
 
int m_ColorComponentG
 
int m_ColorComponentB
 
int m_ColorComponentA
 
ItemBase m_LightSourceItem
 
ref TIntArray m_SingleUseActions
 
ref TIntArray m_ContinuousActions
 
ref TIntArray m_InteractActions
 
ref TStringArray m_HeadHidingSelections
 
bool m_HideSelectionsBySlot
 
PluginAdminLog m_AdminLog
 
ref Timer m_PhysDropTimer
 
ref array< intm_CompatibleLocks
 
int m_LockType
 
ref EffectSound m_LockingSound
 
string m_LockSoundSet
 
EffectSound m_SoundPlace
 
EffectSound m_SoundDeploy
 
EffectSound m_SoundDeployFinish
 

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

void TransferModifiers (PlayerBase reciever)
 appears to be deprecated, legacy code
 
void ItemBase ()
 
override void InitItemVariables ()
 

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

TInputActionMap m_InputActionMap
 
bool m_ActionsInitialize
 
bool m_RecipesInitialized
 
float m_VarQuantity
 
float m_VarQuantityPrev
 
int m_VarQuantityInit
 
int m_VarQuantityMin
 
int m_VarQuantityMax
 
int m_Count
 
float m_VarStackMax
 
float m_StoreLoadedQuantity = float.LOWEST
 
float m_VarWet
 
float m_VarWetPrev
 
float m_VarWetInit
 
float m_VarWetMin
 
float m_VarWetMax
 
int m_Cleanness
 
int m_CleannessInit
 
int m_CleannessMin
 
int m_CleannessMax
 
bool m_WantPlayImpactSound
 
bool m_CanPlayImpactSound = true
 
float m_ImpactSpeed
 
int m_ImpactSoundSurfaceHash
 
float m_HeatIsolation
 
float m_ItemModelLength
 
float m_ItemAttachOffset
 
int m_LiquidContainerMask
 
int m_VarLiquidType
 
int m_ItemBehaviour
 
int m_QuickBarBonus
 
bool m_IsBeingPlaced
 
bool m_IsHologram
 
bool m_IsPlaceSound
 
bool m_IsDeploySound
 
bool m_IsTakeable
 
bool m_IsSoundSynchRemote
 
bool m_ThrowItemOnDrop
 
bool m_ItemBeingDroppedPhys
 
bool m_CanBeMovedOverride
 
bool m_FixDamageSystemInit = false
 
bool can_this_be_combined
 
bool m_CanThisBeSplit
 
bool m_IsStoreLoad = false
 
bool m_CanShowQuantity
 
bool m_HasQuantityBar
 
int m_AttachedAgents
 
ref map< int, ref array< ref WeaponParticlesOnOverheating > > m_OnOverheatingEffect
 
bool m_IsOverheatingEffectActive
 
float m_OverheatingShots
 
ref Timer m_CheckOverheating
 
int m_ShotsToStartOverheating = 0
 
int m_MaxOverheatingValue = 0
 
float m_OverheatingDecayInterval = 1
 
ref array< ref OverheatingParticlem_OverheatingParticles
 
float m_TemperaturePerQuantityWeight
 

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

static ref map< typename, ref TInputActionMapm_ItemTypeActionsMap = new map<typename, ref TInputActionMap>
 
static ref map< typename, ref TActionAnimOverrideMapm_ItemActionOverrides = new map<typename, ref TActionAnimOverrideMap>
 
static int m_DebugActionsMask
 
static ref map< int, ref array< ref WeaponParticlesOnFire > > m_OnFireEffect
 
static ref map< int, ref array< ref WeaponParticlesOnBulletCasingEject > > m_OnBulletCasingEjectEffect
 
static ref map< string, intm_WeaponTypeToID
 
static int m_LastRegisteredWeaponID = 0
 

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

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

◆ ~ItemBase()

void ~ItemBase ( )
inlineprotected
752 {
753 #ifndef SERVER
756 #endif
757
758 if (GetGame() && GetGame().GetPlayer() && (!GetGame().IsDedicatedServer()))
759 {
761 int r_index = player.GetHumanInventory().FindUserReservedLocationIndex(this);
762
763 if (r_index >= 0)
764 {
766 player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
767
768 player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
769 int r_type = r_il.GetType();
770 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
771 {
772 r_il.GetParent().GetOnReleaseLock().Invoke(this);
773 }
774 else if (r_type == InventoryLocationType.ATTACHMENT)
775 {
776 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
777 }
778
779 }
780
781 player.GetHumanInventory().ClearUserReservedLocation(this);
782 }
783
784 if (m_LockingSound)
786 }
InventoryLocationType
types of Inventory Location
Definition InventoryLocation.c:4
PlayerBase GetPlayer()
Definition ModifierBase.c:51
void SoundStop()
Stops sound.
Definition EffectSound.c:217
EffectSound m_DeployLoopSoundEx
distinguish if item has been created as new or it came from splitting (server only flag)
Definition ItemBase.c:79
ref EffectSound m_LockingSound
Definition ItemBase.c:132
InventoryLocation.
Definition InventoryLocation.c:29
Definition EntityAI.c:95
Definition PlayerBaseClient.c:2
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Definition EffectManager.c:271
proto native CGame GetGame()

Перекрестные ссылки SEffectManager::DestroyEffect(), GetGame(), GetPlayer(), m_DeployLoopSoundEx, m_LockingSound и EffectSound::SoundStop().

Методы

◆ AddAction()

void AddAction ( typename actionName )
inlineprotected
330 {
331 ActionBase action = ActionManagerBase.GetAction(actionName);
332
333 if (!action)
334 {
335 Debug.LogError("Action " + actionName + " dosn't exist!");
336 return;
337 }
338
339 typename ai = action.GetInputType();
340 if (!ai)
341 {
342 m_ActionsInitialize = false;
343 return;
344 }
345
347 if (!action_array)
348 {
351 }
353 {
354 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action");
355 }
356
357 if (action_array.Find(action) != -1)
358 {
359 Debug.Log("Action " + action.Type() + " already added to " + this + ", skipping!");
360 }
361 else
362 {
363 action_array.Insert(action);
364 }
365 }
Definition ActionBase.c:53
Definition Debug.c:14
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:141
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:259
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:136
TInputActionMap m_InputActionMap
Definition ItemBase.c:17
bool m_ActionsInitialize
Definition ItemBase.c:20
Definition Debug.c:600
static bool IsActionLogEnable()
Definition Debug.c:644

Перекрестные ссылки Debug::ActionLog(), LogManager::IsActionLogEnable(), Debug::Log(), Debug::LogError(), m_ActionsInitialize и m_InputActionMap.

◆ AddDebugActionsMask()

static void AddDebugActionsMask ( int mask)
inlinestaticprotected
807 {
808 ItemBase.m_DebugActionsMask |= mask;
809 }
Definition InventoryItem.c:731

◆ AddLightSourceItem()

void AddLightSourceItem ( ItemBase lightsource)
inlineprotected

Adds a light source child.

4679 {
4681 }
ItemBase m_LightSourceItem
Definition ItemBase.c:90

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

◆ AddQuantity()

bool AddQuantity ( float value,
bool destroy_config = true,
bool destroy_forced = false )
inlineprotected

add item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity reaches varQuantityMin or lower and the item config contains the varQuantityDestroyOnMin = true entry, the item gets destroyed. destroy_forced = true means item gets destroyed when quantity reaches varQuantityMin or lower regardless of config setting, returns true if the item gets deleted

3277 {
3279 }
override float GetQuantity()
Definition ItemBase.c:3370
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Set item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity re...
Definition ItemBase.c:3222

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

◆ AddWet()

override void AddWet ( float value)
inlineprotected
3581 {
3582 SetWet(GetWet() + value);
3583 }
override void SetWet(float value, bool allow_client=false)
Definition ItemBase.c:3561
override float GetWet()
Definition ItemBase.c:3590

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

◆ AffectLiquidContainerOnFill()

void AffectLiquidContainerOnFill ( int liquid_type,
float amount )
protected

◆ AfterStoreLoad()

override void AfterStoreLoad ( )
inlineprotected
3132 {
3133 super.AfterStoreLoad();
3134
3136 {
3138 }
3139
3140 if (GetStoreLoadedQuantity() != float.LOWEST)
3141 {
3143 SetStoreLoadedQuantity(float.LOWEST);//IMPORTANT to do this !! we use 'm_StoreLoadedQuantity' inside SetQuantity to distinguish between initial quantity setting and the consequent(normal gameplay) calls
3144 }
3145 }
@ LOWEST
Definition PPEConstants.c:54
override void SetStoreLoadedQuantity(float value)
Definition ItemBase.c:3642
void PerformDamageSystemReinit()
Definition ItemBase.c:4473
bool m_FixDamageSystemInit
Definition ItemBase.c:70
override float GetStoreLoadedQuantity()
Definition ItemBase.c:3647

Перекрестные ссылки GetStoreLoadedQuantity(), LOWEST, m_FixDamageSystemInit, PerformDamageSystemReinit(), SetQuantity() и SetStoreLoadedQuantity().

◆ AllowFoodConsumption()

bool AllowFoodConsumption ( )
inlineprotected
3691 {
3692 return true;
3693 }

◆ CanBeCombined()

override bool CanBeCombined ( EntityAI other_item,
bool reservation_check = true,
bool stack_max_limit = false )
inlineprotected
2127 {
2128 //TODO: delete check zero quantity check after fix double posts hands fsm events
2129 if (!other_item || GetType() != other_item.GetType() || (IsFullQuantity() && other_item.GetQuantity() > 0) || other_item == this)
2130 return false;
2131
2132 if (GetHealthLevel() == GameConstants.STATE_RUINED || other_item.GetHealthLevel() == GameConstants.STATE_RUINED)
2133 return false;
2134
2135 //can_this_be_combined = ConfigGetBool("canBeSplit");
2137 return false;
2138
2139
2140 Magazine mag = Magazine.Cast(this);
2141 if (mag)
2142 {
2143 if (mag.GetAmmoCount() >= mag.GetAmmoMax())
2144 return false;
2145
2146 if (stack_max_limit)
2147 {
2149 if (other_item)
2150 {
2151 if (mag.GetAmmoCount() + other_mag.GetAmmoCount() > mag.GetAmmoMax())
2152 return false;
2153 }
2154
2155 }
2156 }
2157 else
2158 {
2159 //TODO: delete check zero quantity check after fix double posts hands fsm events
2160 if (GetQuantity() >= GetQuantityMax() && other_item.GetQuantity() > 0 )
2161 return false;
2162
2163 if (stack_max_limit && (GetQuantity() + other_item.GetQuantity() > GetQuantityMax()))
2164 return false;
2165 }
2166
2168 if (CastTo(player, GetHierarchyRootPlayer())) //false when attached to player's attachment slot
2169 {
2170 if (player.GetInventory().HasAttachment(this))
2171 return false;
2172
2173 if (player.IsItemsToDelete())
2174 return false;
2175 }
2176
2177 if (reservation_check && (GetInventory().HasInventoryReservation(this, null) || other_item.GetInventory().HasInventoryReservation(other_item, null)))
2178 return false;
2179
2180 int slotID;
2181 string slotName;
2182 if (GetInventory().GetCurrentAttachmentSlotInfo(slotID,slotName) && GetHierarchyParent().GetInventory().GetSlotLock(slotID))
2183 return false;
2184
2185 return true;
2186 }
eBleedingSourceType GetType()
Definition BleedingSource.c:63
PlayerSpawnPreset slotName
Definition constants.c:638
bool IsFullQuantity()
Definition ItemBase.c:3375
bool can_this_be_combined
Definition ItemBase.c:71
override int GetQuantityMax()
Definition ItemBase.c:3322
const int STATE_RUINED
Definition constants.c:807

Перекрестные ссылки can_this_be_combined, GetQuantity(), GetQuantityMax(), GetType(), IsFullQuantity(), slotName и GameConstants::STATE_RUINED.

◆ CanBeCooked()

bool CanBeCooked ( )
inlineprotected
2553 {
2554 return false;
2555 }

◆ CanBeCookedOnStick()

bool CanBeCookedOnStick ( )
inlineprotected
2558 {
2559 return false;
2560 }

◆ CanBeDigged()

bool CanBeDigged ( )
inlineprotected
1007 {
1008 return m_CanBeDigged;
1009 }
bool m_CanBeDigged
Definition ItemBase.c:76

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

◆ CanBeDisinfected()

bool CanBeDisinfected ( )
inlineprotected
3161 {
3162 return false;
3163 }

◆ CanBeMovedOverride()

bool CanBeMovedOverride ( )
inlineprotected
2593 {
2594 return m_CanBeMovedOverride;
2595 }
bool m_CanBeMovedOverride
Definition ItemBase.c:69

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

◆ CanBeRepairedByCrafting()

bool CanBeRepairedByCrafting ( )
inlineprotected
963 {
964 return true;
965 }

◆ CanBeSplit()

override bool CanBeSplit ( )
inlineprotected
1592 {
1593 if (IsSplitable() && (GetQuantity() > 1))
1594 return GetInventory().CanRemoveEntity();
1595
1596 return false;
1597 }
override bool IsSplitable()
Definition ItemBase.c:1586

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

◆ CanBeUsedForSuicide()

bool CanBeUsedForSuicide ( )
inlineprotected
4759 {
4760 return true;
4761 }

◆ CanDecay()

bool CanDecay ( )
inlineprotected
4571 {
4572 // return true used on selected food clases so they can decay
4573 return false;
4574 }

◆ CanDisplayCargo()

override bool CanDisplayCargo ( )
inlineprotected
4021 {
4022 return IsOpen();
4023 }
bool IsOpen()
Definition ItemBase.c:4015

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

◆ CanEat()

bool CanEat ( )
inlineprotected
2528 {
2529 return true;
2530 }

◆ CanExplodeInFire()

bool CanExplodeInFire ( )
inlineprotected
2522 {
2523 return false;
2524 }

◆ CanHaveWetness()

bool CanHaveWetness ( )
inlineprotected
4584 {
4585 // return true used on selected items that have a wetness effect
4586 return false;
4587 }

◆ CanMakeGardenplot()

bool CanMakeGardenplot ( )
inlineprotected
1017 {
1018 return false;
1019 }

◆ CanObstruct()

override bool CanObstruct ( )
inlineprotected
980 {
981 PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
982 return !player || !IsPlayerInside(player, "");
983 }
DayZGame g_Game
Definition DayZGame.c:3815
bool IsPlayerInside(PlayerBase player, string selection)
Definition ItemBase.c:974

Перекрестные ссылки g_Game и ItemBase::IsPlayerInside().

◆ CanPlayDeployLoopSound()

bool CanPlayDeployLoopSound ( )
inlineprotected
4402 {
4403 return IsBeingPlaced() && IsSoundSynchRemote();
4404 }
override bool IsBeingPlaced()
Definition ItemBase.c:985
bool IsSoundSynchRemote()
Definition ItemBase.c:4314

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

◆ CanProcessDecay()

bool CanProcessDecay ( )
inlineprotected
4577 {
4578 // this is stub, implemented on Edible_Base class
4579 // used to determine whether it is still necessary for the food to decay
4580 return false;
4581 }

◆ CanPutAsAttachment()

override bool CanPutAsAttachment ( EntityAI parent)
inlineprotected
4044 {
4045 if (!super.CanPutAsAttachment(parent))
4046 {
4047 return false;
4048 }
4049
4050 if (!IsRuined() && !parent.IsRuined())
4051 {
4052 return true;
4053 }
4054
4055 return false;
4056 }

◆ CanPutInCargo()

override bool CanPutInCargo ( EntityAI parent)
inlineprotected
4030 {
4031 if (parent)
4032 {
4033 if (parent.IsInherited(DayZInfected))
4034 return true;
4035
4036 if (!parent.IsRuined())
4037 return true;
4038 }
4039
4040 return true;
4041 }
Definition ZombieBase.c:2

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected
4068 {
4069 //removed 15.06. coz of loading from storage -> after load items in cargo was lost -> waiting for proper solution
4070 //if (GetHealthLevel() == GameConstants.STATE_RUINED)
4071 // return false;
4072
4073 GameInventory attachmentInv = attachment.GetInventory();
4074 if (attachmentInv && attachmentInv.GetCargo() && attachmentInv.GetCargo().GetItemCount() > 0)
4075 {
4076 if (GetHierarchyParent() && !GetHierarchyParent().IsInherited(PlayerBase))
4077 return false;
4078 }
4079
4081 attachment.GetInventory().GetCurrentInventoryLocation(loc);
4082 if (loc && loc.IsValid() && !GetInventory().AreChildrenAccessible())
4083 return false;
4084
4085 return super.CanReceiveAttachment(attachment, slotId);
4086 }
script counterpart to engine's class Inventory
Definition Inventory.c:79

◆ CanReceiveItemIntoCargo()

override bool CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected
4059 {
4060 //removed 15.06. coz of loading from storage -> after load items in cargo was lost -> waiting for proper solution
4061 //if (GetHealthLevel() == GameConstants.STATE_RUINED)
4062 // return false;
4063
4064 return super.CanReceiveItemIntoCargo(item);
4065 }

◆ CanReleaseAttachment()

override bool CanReleaseAttachment ( EntityAI attachment)
inlineprotected
4089 {
4090 if (!super.CanReleaseAttachment(attachment))
4091 return false;
4092
4093 return GetInventory().AreChildrenAccessible();
4094 }

◆ CanRepair()

bool CanRepair ( ItemBase item_repair_kit)
inlineprotected
2564 {
2566 return module_repairing.CanRepair(this, item_repair_kit);
2567 }
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316

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

◆ ChangeIntoOnAttach()

override string ChangeIntoOnAttach ( string slot)
inlineprotected
1411 {
1412 int idx;
1415
1416 ConfigGetTextArray("ChangeInventorySlot",inventory_slots);
1417 if (inventory_slots.Count() < 1) //is string
1418 {
1419 inventory_slots.Insert(ConfigGetString("ChangeInventorySlot"));
1420 attach_types.Insert(ConfigGetString("ChangeIntoOnAttach"));
1421 }
1422 else //is array
1423 {
1424 ConfigGetTextArray("ChangeIntoOnAttach",attach_types);
1425 }
1426
1427 idx = inventory_slots.Find(slot);
1428 if (idx < 0)
1429 return "";
1430
1431 return attach_types.Get(idx);
1432 }
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28
array< string > TStringArray
Definition EnScript.c:685

◆ ChangeIntoOnDetach()

override string ChangeIntoOnDetach ( )
inlineprotected
1435 {
1436 int idx = -1;
1437 string slot;
1438
1441
1442 this.ConfigGetTextArray("ChangeInventorySlot",inventory_slots);
1443 if (inventory_slots.Count() < 1) //is string
1444 {
1445 inventory_slots.Insert(this.ConfigGetString("ChangeInventorySlot"));
1446 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1447 }
1448 else //is array
1449 {
1450 this.ConfigGetTextArray("ChangeIntoOnDetach",detach_types);
1451 if (detach_types.Count() < 1)
1452 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1453 }
1454
1455 for (int i = 0; i < inventory_slots.Count(); i++)
1456 {
1457 slot = inventory_slots.Get(i);
1458 }
1459
1460 if (slot != "")
1461 {
1462 if (detach_types.Count() == 1)
1463 idx = 0;
1464 else
1465 idx = inventory_slots.Find(slot);
1466 }
1467 if (idx < 0)
1468 return "";
1469
1470 return detach_types.Get(idx);
1471 }

◆ CheckForRoofLimited()

override void CheckForRoofLimited ( float timeTresholdMS = 3000)
inlineprotected

Roof check for entity, limited by time (anti-spam solution)

3949 {
3950 super.CheckForRoofLimited(timeTresholdMS);
3951
3952 float time = GetGame().GetTime();
3953 if ((time - m_PreviousRoofTestTime) >= timeTresholdMS)
3954 {
3955 m_PreviousRoofTestTime = time;
3956 SetRoofAbove(MiscGameplayFunctions.IsUnderRoof(this));
3957 }
3958 }

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

◆ CheckOverheating()

void CheckOverheating ( ItemBase weapon = null,
string ammoType = "",
ItemBase muzzle_owner = null,
ItemBase suppressor = null,
string config_to_search = "" )
inlineprotected
552 {
555
558
561
563 {
565 }
566 }
void UpdateOverheating(ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
Definition ItemBase.c:603
float m_OverheatingShots
Definition ItemBase.c:113
int m_ShotsToStartOverheating
Definition ItemBase.c:115
void StopOverheating(ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
Definition ItemBase.c:610
void StartOverheating(ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
Definition ItemBase.c:597
int m_MaxOverheatingValue
Definition ItemBase.c:116
bool IsOverheatingEffectActive()
Definition ItemBase.c:568

Перекрестные ссылки IsOverheatingEffectActive(), m_MaxOverheatingValue, m_OverheatingShots, m_ShotsToStartOverheating, StartOverheating(), StopOverheating() и UpdateOverheating().

◆ ClearInventory()

override void ClearInventory ( )
inlineprotected
3474 {
3475 if ((GetGame().IsServer() || !GetGame().IsMultiplayer()) && GetInventory())
3476 {
3477 GameInventory inv = GetInventory();
3479 inv.EnumerateInventory(InventoryTraversalType.INORDER, items);
3480 for (int i = 0; i < items.Count(); i++)
3481 {
3482 ItemBase item = ItemBase.Cast(items.Get(i));
3483 if (item)
3484 {
3485 GetGame().ObjectDelete(item);
3486 }
3487 }
3488 }
3489 }
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
Definition gameplay.c:6

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

◆ Close()

void Close ( )
protected

◆ CombineItems()

void CombineItems ( ItemBase other_item,
bool use_stack_max = true )
inlineprotected
2233 {
2234 if (!CanBeCombined(other_item, false))
2235 return;
2236
2237 if (!IsMagazine() && other_item)
2238 {
2240 if (quantity_used != 0)
2241 {
2242 float hp1 = GetHealth01("","");
2243 float hp2 = other_item.GetHealth01("","");
2244 float hpResult = ((hp1*GetQuantity()) + (hp2*quantity_used));
2246
2247 hpResult *= GetMaxHealth();
2249 SetHealth("", "Health", hpResult);
2250
2252 other_item.AddQuantity(-quantity_used);
2253 }
2254 }
2256 }
void OnCombine(ItemBase other_item)
Definition ItemBase.c:2258
float ComputeQuantityUsedEx(ItemBase other_item, bool use_stack_max=true)
Definition ItemBase.c:2208
override bool CanBeCombined(EntityAI other_item, bool reservation_check=true, bool stack_max_limit=false)
Definition ItemBase.c:2126
bool AddQuantity(float value, bool destroy_config=true, bool destroy_forced=false)
add item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity re...
Definition ItemBase.c:3276
Definition EnMath.c:7
static proto float Round(float f)
Returns mathematical round of value.

Перекрестные ссылки AddQuantity(), ItemBase::CanBeCombined(), ComputeQuantityUsedEx(), GetQuantity(), ItemBase::OnCombine() и Math::Round().

◆ CombineItemsClient()

override void CombineItemsClient ( EntityAI entity2,
bool use_stack_max = true )
inlineprotected
884 {
885 /*
886 ref Param1<EntityAI> item = new Param1<EntityAI>(entity2);
887 RPCSingleParam(ERPCs.RPC_ITEM_COMBINE, item, GetGame().GetPlayer());
888 */
890
891 if (GetGame().IsClient())
892 {
894 {
897 ctx.Write(-1);
898 ItemBase i1 = this; // @NOTE: workaround for correct serialization
899 ctx.Write(i1);
900 ctx.Write(item2);
901 ctx.Write(use_stack_max);
902 ctx.Write(-1);
903 ctx.Send();
904
906 {
907 GetGame().GetPlayer().GetInventory().AddInventoryReservationEx(item2,null,GameInventory.c_InventoryReservationTimeoutShortMS);
908 }
909 }
910 }
911 else if (!GetGame().IsMultiplayer())
912 {
914 }
915 }
const int INPUT_UDT_ITEM_MANIPULATION
Definition _constants.c:8
const int c_InventoryReservationTimeoutShortMS
Definition Inventory.c:713
bool IsCombineAll(ItemBase other_item, bool use_stack_max=false)
Definition ItemBase.c:2188
void CombineItems(ItemBase other_item, bool use_stack_max=true)
Definition ItemBase.c:2232
Definition gameplay.c:121
proto static native bool CanStoreInputUserData()

Перекрестные ссылки GameInventory::c_InventoryReservationTimeoutShortMS, ScriptInputUserData::CanStoreInputUserData(), CombineItems(), GetGame(), INPUT_UDT_ITEM_MANIPULATION и IsCombineAll().

◆ CombineItemsEx()

override void CombineItemsEx ( EntityAI entity2,
bool use_stack_max = true )
inlineprotected
2228 {
2230 }

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

◆ ComputeQuantityUsed()

int ComputeQuantityUsed ( ItemBase other_item,
bool use_stack_max = true )
inlineprotected
2204 {
2206 }

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

◆ ComputeQuantityUsedEx()

float ComputeQuantityUsedEx ( ItemBase other_item,
bool use_stack_max = true )
inlineprotected
2209 {
2210 float other_item_quantity = other_item.GetQuantity();
2211 float this_free_space;
2212
2213 float stack_max = GetQuantityMax();
2214
2216
2218 {
2219 return this_free_space;
2220 }
2221 else
2222 {
2223 return other_item_quantity;
2224 }
2225 }

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

◆ ContainsAgent()

bool ContainsAgent ( int agent_id)
inlineprotected
3841 {
3843 {
3844 return true;
3845 }
3846 else
3847 {
3848 return false;
3849 }
3850 }
int m_AttachedAgents
Definition ItemBase.c:98

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

◆ ConvertEnergyToQuantity()

void ConvertEnergyToQuantity ( )
inlineprotected
3521 {
3522 if (GetGame().IsServer() && HasEnergyManager() && GetCompEM().HasConversionOfEnergyToQuantity())
3523 {
3524 if (HasQuantity())
3525 {
3526 float energy_0to1 = GetCompEM().GetEnergy0To1();
3528 }
3529 }
3530 }
override bool HasQuantity()
Definition ItemBase.c:3365
void SetQuantityNormalized(float value, bool destroy_config=true, bool destroy_forced=false)
Sets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config...
Definition ItemBase.c:3294

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

◆ CopyScriptPropertiesFrom()

void CopyScriptPropertiesFrom ( EntityAI oldItem)
inlineprotected
4673 {
4674 MiscGameplayFunctions.TransferItemProperties(oldItem, this);
4675 }

◆ DamageItemAttachments()

bool DamageItemAttachments ( float damage)
inlineprotected
1571 {
1572 int attachment_count = GetInventory().AttachmentCount();
1573 if (attachment_count > 0)
1574 {
1576 ItemBase attachment = ItemBase.Cast(GetInventory().GetAttachmentFromIndex(random_pick));
1577 if (!attachment.IsExplosive())
1578 {
1579 attachment.AddHealth("","",damage);
1580 return true;
1581 }
1582 }
1583 return false;
1584 }
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

Перекрестные ссылки Math::RandomInt().

◆ DamageItemInCargo()

bool DamageItemInCargo ( float damage)
inlineprotected
1552 {
1553 if (GetInventory().GetCargo())
1554 {
1555 int item_count = GetInventory().GetCargo().GetItemCount();
1556 if (item_count > 0)
1557 {
1559 ItemBase item = ItemBase.Cast(GetInventory().GetCargo().GetItem(random_pick));
1560 if (!item.IsExplosive())
1561 {
1562 item.AddHealth("","",damage);
1563 return true;
1564 }
1565 }
1566 }
1567 return false;
1568 }
EntityAI GetItem()
Definition RadialQuickbarMenu.c:37

Перекрестные ссылки GetItem() и Math::RandomInt().

◆ DeSerializeNumericalVars()

override void DeSerializeNumericalVars ( array< float > floats)
inlineprotected
2817 {
2818 //some variables handled on EntityAI level already!
2819 super.DeSerializeNumericalVars(floats);
2820
2821 // the order of serialization must be the same as the order of de-serialization
2822 int index = 0;
2823 int mask = Math.Round(floats.Get(index));
2824
2825 index++;
2826 //--------------------------------------------
2827 if (mask & VARIABLE_QUANTITY)
2828 {
2829 if (m_IsStoreLoad)
2830 {
2832 }
2833 else
2834 {
2835 float quantity = floats.Get(index);
2836 SetQuantity(quantity, true, false, false, false);
2837 }
2838 index++;
2839 }
2840 //--------------------------------------------
2841 if (mask & VARIABLE_WET)
2842 {
2843 float wet = floats.Get(index);
2844 SetWet(wet);
2845 index++;
2846 }
2847 //--------------------------------------------
2849 {
2850 int liquidtype = Math.Round(floats.Get(index));
2852 index++;
2853 }
2854 //--------------------------------------------
2855 if (mask & VARIABLE_COLOR)
2856 {
2858 index++;
2860 index++;
2862 index++;
2864 index++;
2865 }
2866 //--------------------------------------------
2868 {
2869 int cleanness = Math.Round(floats.Get(index));
2871 index++;
2872 }
2873 }
override void SetCleanness(int value, bool allow_client=false)
Definition ItemBase.c:3672
int m_ColorComponentR
Definition ItemBase.c:83
int m_ColorComponentG
Definition ItemBase.c:84
int m_ColorComponentA
Definition ItemBase.c:86
bool m_IsStoreLoad
Definition ItemBase.c:73
override void SetLiquidType(int value, bool allow_client=false)
Definition ItemBase.c:3747
int m_ColorComponentB
Definition ItemBase.c:85
const int VARIABLE_LIQUIDTYPE
Definition constants.c:609
const int VARIABLE_CLEANNESS
Definition constants.c:612
const int VARIABLE_COLOR
Definition constants.c:611
const int VARIABLE_QUANTITY
Definition constants.c:605
const int VARIABLE_WET
Definition constants.c:608

Перекрестные ссылки m_ColorComponentA, m_ColorComponentB, m_ColorComponentG, m_ColorComponentR, m_IsStoreLoad, Math::Round(), SetCleanness(), SetLiquidType(), SetQuantity(), SetStoreLoadedQuantity(), SetWet(), VARIABLE_CLEANNESS, VARIABLE_COLOR, VARIABLE_LIQUIDTYPE, VARIABLE_QUANTITY и VARIABLE_WET.

◆ DoAmmoExplosion()

void DoAmmoExplosion ( )
inlineprotected
1487 {
1488 Magazine magazine = Magazine.Cast(this);
1489 int pop_sounds_count = 6;
1490 string pop_sounds[ 6 ] = { "ammopops_1","ammopops_2","ammopops_3","ammopops_4","ammopops_5","ammopops_6" };
1491
1492 //play sound
1494 string sound_name = pop_sounds[ sound_idx ];
1495 GetGame().CreateSoundOnObject(this, sound_name, 20, false);
1496
1497 //remove ammo count
1498 magazine.ServerAddAmmoCount(-1);
1499
1500 //if condition then repeat -> ExplodeAmmo
1501 float min_temp_to_explode = 100; //min temperature for item to explode
1502
1503 if (magazine.GetAmmoCount() > 0 && GetTemperature() >= min_temp_to_explode) //TODO ? add check for parent -> fireplace
1504 {
1505 ExplodeAmmo();
1506 }
1507 }
void ExplodeAmmo()
Definition ItemBase.c:1473

Перекрестные ссылки ExplodeAmmo(), GetGame() и Math::RandomInt().

◆ EEDelete()

override void EEDelete ( EntityAI parent)
inlineprotected
1333 {
1334 super.EEDelete(parent);
1335 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
1336 if (player)
1337 {
1339
1340 if (player.IsAlive())
1341 {
1342 int r_index = player.GetHumanInventory().FindUserReservedLocationIndex(this);
1343 if (r_index >= 0)
1344 {
1346 player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
1347
1348 player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
1349 int r_type = r_il.GetType();
1350 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
1351 {
1352 r_il.GetParent().GetOnReleaseLock().Invoke(this);
1353 }
1354 else if (r_type == InventoryLocationType.ATTACHMENT)
1355 {
1356 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
1357 }
1358
1359 }
1360
1361 player.RemoveQuickBarEntityShortcut(this);
1362 }
1363 }
1364 }
void OnInventoryExit(Man player)
Event called on item when it is removed from the player(Man) inventory, passes the old owner as a par...
Definition ItemBase.c:3795

Перекрестные ссылки ItemBase::OnInventoryExit().

◆ EEHealthLevelChanged()

override void EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )
inlineprotected

drops content of container when ruined in fireplace

2027 {
2028 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
2029
2030 if (GetGame().IsServer())
2031 {
2033 {
2035 EntityAI parent = GetHierarchyParent();
2036 if (parent && parent.IsFireplace())
2037 {
2038 CargoBase cargo = GetInventory().GetCargo();
2039 if (cargo)
2040 {
2041 for (int i = 0; i < cargo.GetItemCount(); ++i)
2042 {
2043 parent.GetInventory().TakeEntityToInventory(InventoryMode.SERVER, FindInventoryLocationType.CARGO, cargo.GetItem(i));
2044 }
2045 }
2046 }
2047 }
2048
2049 if (IsResultOfSplit())
2050 {
2051 // reset the splitting result flag, return to normal item behavior
2052 SetResultOfSplit(false);
2053 return;
2054 }
2055
2056 if (m_Cleanness != 0 && oldLevel < newLevel && newLevel != 0)
2057 {
2058 SetCleanness(0);//unclean the item upon damage dealt
2059 }
2060 }
2061 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22
FindInventoryLocationType
flags for searching locations in inventory
Definition InventoryLocation.c:17
represents base for cargo storage for entities
Definition Cargo.c:7
Definition Building.c:6
void SetResultOfSplit(bool value)
Definition ItemBase.c:2198
int m_Cleanness
Definition ItemBase.c:44
bool IsResultOfSplit()
Definition ItemBase.c:2193

Перекрестные ссылки GetGame(), IsResultOfSplit(), m_Cleanness, SetCleanness(), SetResultOfSplit() и GameConstants::STATE_RUINED.

◆ EEHitBy()

override void EEHitBy ( TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos,
float speedCoef )
inlineprotected
1511 {
1513
1514 const int CHANCE_DAMAGE_CARGO = 4;
1515 const int CHANCE_DAMAGE_ATTACHMENT = 1;
1516 const int CHANCE_DAMAGE_NOTHING = 2;
1517
1518 if (IsClothing() || IsContainer() || IsItemTent())
1519 {
1520 float dmg = damageResult.GetDamage("","Health") * -0.5;
1521 int chances;
1522 int rnd;
1523
1524 if (GetInventory().GetCargo())
1525 {
1528
1530 {
1532 }
1533 else if (rnd < (chances - CHANCE_DAMAGE_NOTHING))
1534 {
1536 }
1537 }
1538 else
1539 {
1542
1544 {
1546 }
1547 }
1548 }
1549 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
bool DamageItemInCargo(float damage)
Definition ItemBase.c:1551
bool DamageItemAttachments(float damage)
Definition ItemBase.c:1570

Перекрестные ссылки component, DamageItemAttachments(), DamageItemInCargo(), ItemBase::IsClothing(), ItemBase::IsItemTent() и Math::RandomInt().

◆ EEItemLocationChanged()

override void EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected
1069 {
1070 super.EEItemLocationChanged(oldLoc,newLoc);
1071
1074
1075 if (newLoc.GetParent())
1076 new_player = PlayerBase.Cast(newLoc.GetParent().GetHierarchyRootPlayer());
1077
1078 if (oldLoc.GetParent())
1079 old_player = PlayerBase.Cast(oldLoc.GetParent().GetHierarchyRootPlayer());
1080
1081 if (old_player && oldLoc.GetType() == InventoryLocationType.HANDS)
1082 {
1083 int r_index = old_player.GetHumanInventory().FindUserReservedLocationIndex(this);
1084
1085 if (r_index >= 0)
1086 {
1088 old_player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
1089
1090 old_player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
1091 int r_type = r_il.GetType();
1092 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
1093 {
1094 r_il.GetParent().GetOnReleaseLock().Invoke(this);
1095 }
1096 else if (r_type == InventoryLocationType.ATTACHMENT)
1097 {
1098 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
1099 }
1100
1101 }
1102 }
1103
1104 if (newLoc.GetType() == InventoryLocationType.HANDS)
1105 {
1106 if (new_player)
1107 new_player.ForceStandUpForHeavyItems(newLoc.GetItem());
1108
1109 if (new_player == old_player)
1110 {
1111
1112 if (oldLoc.GetParent() && new_player.GetHumanInventory().LocationGetEntity(oldLoc) == NULL)
1113 {
1114 if (oldLoc.GetType() == InventoryLocationType.CARGO)
1115 {
1116 if (oldLoc.GetParent().GetInventory().TestAddEntityInCargoExLoc(oldLoc, false, false, false, true, false, false))
1117 {
1118 new_player.GetHumanInventory().SetUserReservedLocation(this,oldLoc);
1119 }
1120 }
1121 else
1122 {
1123 new_player.GetHumanInventory().SetUserReservedLocation(this,oldLoc);
1124 }
1125 }
1126
1127 if (new_player.GetHumanInventory().FindUserReservedLocationIndex(this) >= 0)
1128 {
1129 int type = oldLoc.GetType();
1130 if (type == InventoryLocationType.CARGO || type == InventoryLocationType.PROXYCARGO)
1131 {
1132 oldLoc.GetParent().GetOnSetLock().Invoke(this);
1133 }
1134 else if (type == InventoryLocationType.ATTACHMENT)
1135 {
1136 oldLoc.GetParent().GetOnAttachmentSetLock().Invoke(this, oldLoc.GetSlot());
1137 }
1138 }
1139 if (!m_OldLocation)
1140 {
1141 m_OldLocation = new InventoryLocation;
1142 }
1143 m_OldLocation.Copy(oldLoc);
1144 }
1145 else
1146 {
1147 if (m_OldLocation)
1148 {
1149 m_OldLocation.Reset();
1150 }
1151 }
1152
1153 GetGame().GetAnalyticsClient().OnItemAttachedAtPlayer(this,"Hands");
1154 }
1155 else
1156 {
1157 if (new_player)
1158 {
1159 int res_index = new_player.GetHumanInventory().FindCollidingUserReservedLocationIndex(this, newLoc);
1160 if (res_index >= 0)
1161 {
1163 new_player.GetHumanInventory().GetUserReservedLocation(res_index,il);
1164 ItemBase it = ItemBase.Cast(il.GetItem());
1165 new_player.GetHumanInventory().ClearUserReservedLocationAtIndex(res_index);
1166 int rel_type = il.GetType();
1167 if (rel_type == InventoryLocationType.CARGO || rel_type == InventoryLocationType.PROXYCARGO)
1168 {
1169 il.GetParent().GetOnReleaseLock().Invoke(it);
1170 }
1171 else if (rel_type == InventoryLocationType.ATTACHMENT)
1172 {
1173 il.GetParent().GetOnAttachmentReleaseLock().Invoke(it, il.GetSlot());
1174 }
1175 //it.GetOnReleaseLock().Invoke(it);
1176 }
1177 }
1178 else if (old_player && newLoc.GetType() == InventoryLocationType.GROUND && m_ThrowItemOnDrop)
1179 {
1180 //ThrowPhysically(old_player, vector.Zero);
1181 m_ThrowItemOnDrop = false;
1182 }
1183
1184 if (m_OldLocation)
1185 {
1186 m_OldLocation.Reset();
1187 }
1188 }
1189 }
bool m_ThrowItemOnDrop
Definition ItemBase.c:67
proto native InventoryLocation Copy(notnull InventoryLocation rhs)
copies location data to another location

Перекрестные ссылки InventoryLocation::Copy(), GetGame() и m_ThrowItemOnDrop.

◆ EEKilled()

override void EEKilled ( Object killer)
inlineprotected

item is able to explode in fire

1367 {
1368 super.EEKilled(killer);
1369
1371 if (killer && killer.IsFireplace() && CanExplodeInFire())
1372 {
1373 if (GetTemperature() >= GameConstants.ITEM_TEMPERATURE_TO_EXPLODE_MIN)
1374 {
1375 if (IsMagazine())
1376 {
1377 if (Magazine.Cast(this).GetAmmoCount() > 0)
1378 {
1379 ExplodeAmmo();
1380 }
1381 }
1382 else
1383 {
1384 Explode(DamageType.EXPLOSION);
1385 }
1386 }
1387 }
1388 }
DamageType
exposed from C++ (do not change)
Definition DamageSystem.c:11
override void Explode(int damageType, string ammoType="")
Definition Trap_LandMine.c:220
bool CanExplodeInFire()
Definition ItemBase.c:2521
const float ITEM_TEMPERATURE_TO_EXPLODE_MIN
misc
Definition constants.c:968

Перекрестные ссылки ItemBase::CanExplodeInFire(), Explode(), ExplodeAmmo() и GameConstants::ITEM_TEMPERATURE_TO_EXPLODE_MIN.

◆ EEOnAfterLoad()

override void EEOnAfterLoad ( )
inlineprotected
3148 {
3149 super.EEOnAfterLoad();
3150
3152 {
3153 m_FixDamageSystemInit = false;
3154 }
3155
3157 GetRemotelyActivatedItemBehaviour().OnAfterLoad();
3158 }
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
Definition RemoteDetonator.c:272

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

◆ EEOnCECreate()

override void EEOnCECreate ( )
inlineprotected

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

4001 {
4002 if (!IsMagazine())
4004
4006 }
void SetZoneDamageCEInit()
Sets zone damages to match randomized global health set by CE (CE spawn only)
Definition ItemBase.c:4485
void SetCEBasedQuantity()
Definition ItemBase.c:829

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

◆ EOnContact()

override void EOnContact ( IEntity other,
Contact extra )
inlineprotected
1192 {
1194 {
1195 int liquidType = -1;
1196 float impactSpeed = ProcessImpactSoundEx(other, extra, m_ConfigWeight, m_ImpactSoundSurfaceHash, liquidType);
1197 if (impactSpeed > 0.0)
1198 {
1200 #ifndef SERVER
1201 PlayImpactSound(m_ConfigWeight, m_ImpactSpeed, m_ImpactSoundSurfaceHash);
1202 #else
1203 m_WantPlayImpactSound = true;
1204 SetSynchDirty();
1205 #endif
1206 m_CanPlayImpactSound = (liquidType == -1);// prevents further playing of the sound when the surface is a liquid type
1207 }
1208 }
1209
1210 #ifdef SERVER
1211 if (GetCompEM() && GetCompEM().IsPlugged())
1212 {
1213 if (GetCompEM().GetCordLength() < vector.Distance(GetPosition(), GetCompEM().GetEnergySource().GetPosition()))
1214 GetCompEM().UnplugThis();
1215 }
1216 #endif
1217 }
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
bool m_CanPlayImpactSound
Definition ItemBase.c:50
int m_ImpactSoundSurfaceHash
Definition ItemBase.c:52
bool m_WantPlayImpactSound
Definition ItemBase.c:49
float m_ImpactSpeed
Definition ItemBase.c:51
Definition EnConvert.c:106
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.

Перекрестные ссылки vector::Distance(), GetPosition, m_CanPlayImpactSound, m_ImpactSoundSurfaceHash, m_ImpactSpeed и m_WantPlayImpactSound.

◆ ExplodeAmmo()

void ExplodeAmmo ( )
inlineprotected
1474 {
1475 //timer
1477
1478 //min/max time
1479 float min_time = 1;
1480 float max_time = 3;
1482
1483 explode_timer.Run(delay, this, "DoAmmoExplosion");
1484 }
Definition DayZPlayerImplement.c:63
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM и Math::RandomFloat().

◆ GetActions()

override void GetActions ( typename action_input_type ,
out array< ActionBase_Basic > actions )
inlineprotected
308 {
310 {
311 m_ActionsInitialize = true;
313 }
314
316 }
void InitializeActions()
Definition ItemBase.c:295

Перекрестные ссылки InitializeActions(), m_ActionsInitialize и m_InputActionMap.

◆ GetActionWidgetOverride()

bool GetActionWidgetOverride ( out typename name)
inlineprotected

If we need a different (handheld)item action widget displayed, the logic goes in here.

4701 {
4702 return false;
4703 }

◆ GetAgents()

override int GetAgents ( )
inlineprotected
3888 {
3889 return m_AttachedAgents;
3890 }

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

◆ GetAttachmentSoundType()

override string GetAttachmentSoundType ( )
inlineprotected
4292 {
4293 return m_SoundAttType;
4294 }
string m_SoundAttType
Definition ItemBase.c:81

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

◆ GetBaitEffectivity()

float GetBaitEffectivity ( )
inlineprotected

generic effectivity as a bait for animal catching

4731 {
4732 float ret = 1.0;
4733 if (HasQuantity())
4735 ret *= GetHealth01();
4736
4737 return ret;
4738 }
override float GetQuantityNormalized()
Gets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config...
Definition ItemBase.c:3303

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

◆ GetBandagingEffectivity()

float GetBandagingEffectivity ( )
inlineprotected
4451 {
4452 return 1.0;
4453 };

◆ GetCleanness()

override int GetCleanness ( )
inlineprotected
3686 {
3687 return m_Cleanness;
3688 }

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

◆ GetColor()

override void GetColor ( out int r,
out int g,
out int b,
out int a )
inlineprotected

gets item's color variable as components

3721 {
3726 }

Перекрестные ссылки m_ColorComponentA, m_ColorComponentB, m_ColorComponentG и m_ColorComponentR.

◆ GetColorString()

string GetColorString ( )
inlineprotected

Returns item's PROCEDURAL color as formated string, i.e. "#(argb,8,8,3)color(0.15,0.15,0.15,1.0,CO)".

3735 {
3736 int r,g,b,a;
3737 GetColor(r,g,b,a);
3738 r = r/255;
3739 g = g/255;
3740 b = b/255;
3741 a = a/255;
3742 return MiscGameplayFunctions.GetColorString(r, g, b, a);
3743 }
proto native int GetColor()

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

◆ GetDamageSystemVersionChange()

int GetDamageSystemVersionChange ( )
inlineprotected

Re-sets DamageSystem changes.

Возвращает
storage version on which the config changes occured (default -1, to be overriden!)
Заметки
Significant changes to DamageSystem in item configs have to be re-set by increasing the storage version and overriding this method. Default return is -1 (does nothing).
744 {
745 return -1;
746 }

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprotected
2288 {
2289 super.GetDebugActions(outputList);
2290
2291 //quantity
2292 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ADD_QUANTITY, "Quantity +20%", FadeColors.LIGHT_GREY));
2293 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.REMOVE_QUANTITY, "Quantity -20%", FadeColors.LIGHT_GREY));
2294 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SET_QUANTITY_0, "Set Quantity 0", FadeColors.LIGHT_GREY));
2295 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SET_MAX_QUANTITY, "Set Quantity Max", FadeColors.LIGHT_GREY));
2296
2297 //health
2298 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ADD_HEALTH, "Health +20%", FadeColors.LIGHT_GREY));
2299 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.REMOVE_HEALTH, "Health -20%", FadeColors.LIGHT_GREY));
2300 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.DESTROY_HEALTH, "Health 0", FadeColors.LIGHT_GREY));
2301 //temperature
2302 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ADD_TEMPERATURE, "Temperature +20", FadeColors.LIGHT_GREY));
2303 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.REMOVE_TEMPERATURE, "Temperature -20", FadeColors.LIGHT_GREY));
2304 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.FLIP_FROZEN, "Toggle Frozen", FadeColors.LIGHT_GREY));
2305
2306 //wet
2307 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ADD_WETNESS, "Wetness +20", FadeColors.LIGHT_GREY));
2308 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.REMOVE_WETNESS, "Wetness -20", FadeColors.LIGHT_GREY));
2309
2310 //liquidtype
2311 if (IsLiquidContainer())
2312 {
2313 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.LIQUIDTYPE_UP, "LiquidType Next", FadeColors.LIGHT_GREY));
2314 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.LIQUIDTYPE_DOWN, "LiquidType Previous", FadeColors.LIGHT_GREY));
2315 }
2316
2317 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.MAKE_SPECIAL, "Make Special", FadeColors.LIGHT_GREY));
2318 // watch
2319 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.WATCH_ITEM, "Watch (CTRL-Z)", FadeColors.LIGHT_GREY));
2320 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.WATCH_PLAYER, "Watch Player", FadeColors.LIGHT_GREY));
2321
2325 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
bool IsLiquidContainer()
Definition ItemBase.c:922
const int SAT_DEBUG_ACTION
Definition constants.c:431

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

◆ GetDebugActionsMask()

static int GetDebugActionsMask ( )
inlinestaticprotected
792 {
793 return ItemBase.m_DebugActionsMask;
794 }

◆ GetDeployFinishSoundset()

string GetDeployFinishSoundset ( )
protected

◆ GetDeploySoundset()

string GetDeploySoundset ( )
protected

◆ GetDeployTime()

float GetDeployTime ( )
inlineprotected

how long it takes to deploy this item in seconds

4254 {
4256 }
Definition ActionConstants.c:28
const float DEFAULT_DEPLOY
Definition ActionConstants.c:38

Перекрестные ссылки UATimeSpent::DEFAULT_DEPLOY.

◆ GetDisinfectQuantity()

float GetDisinfectQuantity ( int system = 0,
Param param1 = null )
inlineprotected
701 {
702 return 250;//default value
703 }

◆ GetDryingIncrement()

float GetDryingIncrement ( string pIncrementName)
inlineprotected
3544 {
3545 string paramPath = string.Format("CfgVehicles %1 EnvironmentWetnessIncrements Drying %2", GetType(), pIncrementName);
3546 if (GetGame().ConfigIsExisting(paramPath))
3547 return GetGame().ConfigGetFloat(paramPath);
3548
3549 return 0.0;
3550 }

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

◆ GetEnergy()

float GetEnergy ( )
inlineprotected
3495 {
3496 float energy = 0;
3497 if (HasEnergyManager())
3498 {
3499 energy = GetCompEM().GetEnergy();
3500 }
3501 return energy;
3502 }

◆ GetExplosiveTriggerSlotName()

string GetExplosiveTriggerSlotName ( )
inlineprotected
951 {
952 return "";
953 }

◆ GetFilterDamageRatio()

float GetFilterDamageRatio ( )
inlineprotected
706 {
707 return 0;
708 }

◆ GetFoodStage()

FoodStage GetFoodStage ( )
inlineprotected

overridden on Edible_Base; so we don't have to parse configs all the time

2548 {
2549 return null;
2550 }

◆ GetHeadHidingSelection()

array< string > GetHeadHidingSelection ( )
inlineprotected
4456 {
4458 }
ref TStringArray m_HeadHidingSelections
Definition ItemBase.c:120

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

◆ GetHeatIsolation()

float GetHeatIsolation ( )
inlineprotected
3539 {
3540 return m_HeatIsolation;
3541 }
float m_HeatIsolation
Definition ItemBase.c:54

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

◆ GetHeatIsolationInit()

float GetHeatIsolationInit ( )
inlineprotected
3534 {
3535 return ConfigGetFloat("heatIsolation");
3536 }

◆ GetInfectionChance()

float GetInfectionChance ( int system = 0,
Param param = null )
inlineprotected

Infection chance while/after using this item, originally used for wound infection after bandaging, params 'system' and 'param' can allow usage by other systems as well.

695 {
696 return 0.0;
697 }

◆ GetItemAttachOffset()

float GetItemAttachOffset ( )
inlineprotected
3664 {
3665 if (ConfigIsExisting("itemAttachOffset"))
3666 {
3667 return ConfigGetFloat("itemAttachOffset");
3668 }
3669 return 0;
3670 }

◆ GetItemModelLength()

float GetItemModelLength ( )
inlineprotected
3655 {
3656 if (ConfigIsExisting("itemModelLength"))
3657 {
3658 return ConfigGetFloat("itemModelLength");
3659 }
3660 return 0;
3661 }

◆ GetItemOverheatThreshold()

override float GetItemOverheatThreshold ( )
inlineprotected
4642 {
4644 return Liquid.GetBoilThreshold(GetLiquidType());
4645
4646 return super.GetItemOverheatThreshold();
4647 }
override int GetLiquidType()
Definition ItemBase.c:3763
const int LIQUID_NONE
Definition constants.c:506

Перекрестные ссылки GetLiquidType(), IsLiquidContainer() и LIQUID_NONE.

◆ GetItemSize()

int GetItemSize ( )
inlineprotected
2578 {
2579 /*
2580 vector v_size = this.ConfigGetVector("itemSize");
2581 int v_size_x = v_size[0];
2582 int v_size_y = v_size[1];
2583 int size = v_size_x * v_size_y;
2584 return size;
2585 */
2586
2587 return 1;
2588 }

◆ GetLight()

ScriptedLightBase GetLight ( )
protected

◆ GetLightSourceItem()

ItemBase GetLightSourceItem ( )
inlineprotected
4689 {
4690 return m_LightSourceItem;
4691 }

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

◆ GetLiquidContainerMask()

int GetLiquidContainerMask ( )
inlineprotected
928 {
930 }
int m_LiquidContainerMask
Definition ItemBase.c:57

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

◆ GetLiquidType()

override int GetLiquidType ( )
inlineprotected
3764 {
3765 return m_VarLiquidType;
3766 }
int m_VarLiquidType
Definition ItemBase.c:58

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

◆ GetLiquidTypeInit()

int GetLiquidTypeInit ( )
inlineprotected
3759 {
3760 return ConfigGetInt("varLiquidTypeInit");
3761 }

◆ GetLockSoundSet()

string GetLockSoundSet ( )
inlineprotected
3704 {
3705 return m_LockSoundSet;
3706 }
string m_LockSoundSet
Definition ItemBase.c:133

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

◆ GetLockType()

int GetLockType ( )
inlineprotected
3699 {
3700 return m_LockType;
3701 }
int m_LockType
Definition ItemBase.c:131

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

◆ GetLoopDeploySoundset()

string GetLoopDeploySoundset ( )
protected

◆ GetMuzzleID()

int GetMuzzleID ( )
inlineprotected

Returns global muzzle ID. If not found, then it gets automatically registered.

721 {
722 if (!m_WeaponTypeToID)
724
725 if (m_WeaponTypeToID.Contains(GetType()))
726 {
727 return m_WeaponTypeToID.Get(GetType());
728 }
729 else
730 {
731 // Register new weapon ID
733 }
734
736 }
static ref map< string, int > m_WeaponTypeToID
Definition ItemBase.c:108
static int m_LastRegisteredWeaponID
Definition ItemBase.c:109

Перекрестные ссылки GetType(), m_LastRegisteredWeaponID и m_WeaponTypeToID.

◆ GetNumberOfItems()

int GetNumberOfItems ( )
inlineprotected

Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.

3435 {
3436 int item_count = 0;
3437 ItemBase item;
3438
3439 if (GetInventory().GetCargo() != NULL)
3440 {
3441 item_count = GetInventory().GetCargo().GetItemCount();
3442 }
3443
3444 for (int i = 0; i < GetInventory().AttachmentCount(); i++)
3445 {
3446 Class.CastTo(item,GetInventory().GetAttachmentFromIndex(i));
3447 if (item)
3448 item_count += item.GetNumberOfItems();
3449 }
3450 return item_count;
3451 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo().

◆ GetOnDigWormsAmount()

int GetOnDigWormsAmount ( )
inlineprotected
1012 {
1013 return 1;
1014 }

◆ GetOverheatingCoef()

float GetOverheatingCoef ( )
inlineprotected
631 {
632 if (m_MaxOverheatingValue > 0)
634
635 return -1;
636 }

Перекрестные ссылки m_MaxOverheatingValue, m_OverheatingShots и m_ShotsToStartOverheating.

◆ GetOverheatingValue()

float GetOverheatingValue ( )
inlineprotected
531 {
532 return m_OverheatingShots;
533 }

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

◆ GetPlaceSoundset()

string GetPlaceSoundset ( )
protected

◆ GetProtectionLevel()

float GetProtectionLevel ( int type,
bool consider_filter = false,
int system = 0 )
inlineprotected
3962 {
3963 if (IsDamageDestroyed() || (HasQuantity() && GetQuantity() <= 0))
3964 {
3965 return 0;
3966 }
3967
3968 if (GetInventory().GetAttachmentSlotsCount() != 0)//is it an item with attachable filter ?
3969 {
3970 ItemBase filter = ItemBase.Cast(FindAttachmentBySlotName("GasMaskFilter"));
3971 if (filter)
3972 return filter.GetProtectionLevel(type, false, system);//it's a valid filter, return the protection
3973 else
3974 return 0;//otherwise return 0 when no filter attached
3975 }
3976
3977 string subclassPath, entryName;
3978
3979 switch (type)
3980 {
3981 case DEF_BIOLOGICAL:
3982 entryName = "biological";
3983 break;
3984 case DEF_CHEMICAL:
3985 entryName = "chemical";
3986 break;
3987 default:
3988 entryName = "biological";
3989 break;
3990 }
3991
3992 subclassPath = "CfgVehicles " + this.GetType() + " Protection ";
3993
3994 return GetGame().ConfigGetFloat(subclassPath + entryName);
3995 }
const int DEF_BIOLOGICAL
Definition constants.c:489
const int DEF_CHEMICAL
Definition constants.c:490

Перекрестные ссылки DEF_BIOLOGICAL, DEF_CHEMICAL, GetGame(), GetQuantity(), GetType() и HasQuantity().

◆ GetQuantity()

override float GetQuantity ( )
inlineprotected
3371 {
3372 return m_VarQuantity;
3373 }
float m_VarQuantity
Definition ItemBase.c:29

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

◆ GetQuantityInit()

int GetQuantityInit ( )
inlineprotected
3360 {
3361 return m_VarQuantityInit;
3362 }
int m_VarQuantityInit
Definition ItemBase.c:31

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

◆ GetQuantityMax()

override int GetQuantityMax ( )
inlineprotected
3323 {
3324 int slot = -1;
3325 if (GetInventory())
3326 {
3328 GetInventory().GetCurrentInventoryLocation(il);
3329 slot = il.GetSlot();
3330 }
3331
3332 return GetTargetQuantityMax(slot);
3333 }
override int GetTargetQuantityMax(int attSlotID=-1)
Definition ItemBase.c:3335

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

◆ GetQuantityMin()

override int GetQuantityMin ( )
inlineprotected
3355 {
3356 return m_VarQuantityMin;
3357 }
int m_VarQuantityMin
Definition ItemBase.c:32

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

◆ GetQuantityNormalized()

override float GetQuantityNormalized ( )
inlineprotected

Gets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config(for Min 0 and Max 5000, value 2500 will result in 0.5)

3304 {
3306 }
override int GetQuantityMin()
Definition ItemBase.c:3354
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

Перекрестные ссылки GetQuantityMax(), GetQuantityMin(), Math::InverseLerp() и m_VarQuantity.

◆ GetQuantityNormalizedScripted()

float GetQuantityNormalizedScripted ( )
inlineprotected
3309 {
3310 return GetQuantityNormalized();
3311 }

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

◆ GetQuickBarBonus()

override int GetQuickBarBonus ( )
inlineprotected
291 {
292 return m_QuickBarBonus;
293 }
int m_QuickBarBonus
Definition ItemBase.c:60

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

◆ GetRecipesActions()

void GetRecipesActions ( Man player,
out TSelectableActionInfoArray outputList )
inlineprotected
2267 {
2268 PlayerBase p = PlayerBase.Cast(player);
2269
2270 array<int> recipesIds = p.m_Recipes;
2271 PluginRecipesManager moduleRecipesManager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
2273 {
2274 EntityAI itemInHands = player.GetHumanInventory().GetEntityInHands();
2275 moduleRecipesManager.GetValidRecipes(ItemBase.Cast(this), ItemBase.Cast(itemInHands), recipesIds, p);
2276 }
2277
2278 for (int i = 0;i < recipesIds.Count(); i++)
2279 {
2280 int key = recipesIds.Get(i);
2281 string recipeName = moduleRecipesManager.GetRecipeName(key);
2283 }
2284 }
Param3 TSelectableActionInfo
const int SAT_CRAFTING
Definition constants.c:430

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

◆ GetSingleInventoryItemWeight()

float GetSingleInventoryItemWeight ( )
inlineprotected
3391 {
3393 }
override float GetSingleInventoryItemWeightEx()
Definition ItemBase.c:3381

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

◆ GetSingleInventoryItemWeightEx()

override float GetSingleInventoryItemWeightEx ( )
inlineprotected
3382 {
3383 //this needs to be first stored inside local variables, when returned directly during inside return call, the result is completely different due to enforce script bug
3384 float weightEx = GetWeightEx();//overall weight of the item
3385 float special = GetInventoryAndCargoWeight();//cargo and attachment weight
3386 return weightEx - special;
3387 }

◆ GetSoakingIncrement()

float GetSoakingIncrement ( string pIncrementName)
inlineprotected
3553 {
3554 string paramPath = string.Format("CfgVehicles %1 EnvironmentWetnessIncrements Soaking %2", GetType(), pIncrementName);
3555 if (GetGame().ConfigIsExisting(paramPath))
3556 return GetGame().ConfigGetFloat(paramPath);
3557
3558 return 0.0;
3559 }

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

◆ GetStoreLoadedQuantity()

override float GetStoreLoadedQuantity ( )
inlineprotected
3648 {
3649 return m_StoreLoadedQuantity;
3650 }
float m_StoreLoadedQuantity
Definition ItemBase.c:36

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

◆ GetTargetQuantityMax()

override int GetTargetQuantityMax ( int attSlotID = -1)
inlineprotected
3336 {
3337 float quantity_max = 0;
3338
3339 if (IsSplitable()) //only stackable/splitable items can check for stack size
3340 {
3341 if (attSlotID != -1)
3343
3344 if (quantity_max <= 0)
3346 }
3347
3348 if (quantity_max <= 0)
3350
3351 return quantity_max;
3352 }
int m_VarQuantityMax
Definition ItemBase.c:33
float m_VarStackMax
Definition ItemBase.c:35
provides access to slot configuration
Definition InventorySlots.c:6
static proto native int GetStackMaxForSlotId(int slot_Id)

Перекрестные ссылки InventorySlots::GetStackMaxForSlotId(), IsSplitable(), m_VarQuantityMax и m_VarStackMax.

◆ GetTemperatureFreezeThreshold()

override float GetTemperatureFreezeThreshold ( )
inlineprotected
4626 {
4628 return Liquid.GetFreezeThreshold(GetLiquidType());
4629
4630 return super.GetTemperatureFreezeThreshold();
4631 }

Перекрестные ссылки GetLiquidType(), IsLiquidContainer() и LIQUID_NONE.

◆ GetTemperatureFreezeTime()

override float GetTemperatureFreezeTime ( )
inlineprotected
4650 {
4651 if (HasQuantity())
4653
4654 return super.GetTemperatureFreezeTime();
4655 }
static const float TEMPERATURE_TIME_FREEZE_MIN
Definition constants.c:890
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'.

Перекрестные ссылки GetQuantityNormalized(), HasQuantity(), Math::Lerp(), Math::Max() и GameConstants::TEMPERATURE_TIME_FREEZE_MIN.

◆ GetTemperaturePerQuantityWeight()

float GetTemperaturePerQuantityWeight ( )
inlineprotected

Used in heat comfort calculations only!

4621 {
4623 }
float m_TemperaturePerQuantityWeight
Definition ItemBase.c:140
const float ITEM_TEMPERATURE_QUANTITY_WEIGHT_MULTIPLIER
Definition constants.c:775

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

◆ GetTemperatureThawThreshold()

override float GetTemperatureThawThreshold ( )
inlineprotected
4634 {
4636 return Liquid.GetThawThreshold(GetLiquidType());
4637
4638 return super.GetTemperatureThawThreshold();
4639 }

Перекрестные ссылки GetLiquidType(), IsLiquidContainer() и LIQUID_NONE.

◆ GetTemperatureThawTime()

override float GetTemperatureThawTime ( )
inlineprotected
4658 {
4659 if (HasQuantity())
4661
4662 return super.GetTemperatureThawTime();
4663 }
static const float TEMPERATURE_TIME_THAW_MIN
Definition constants.c:891

Перекрестные ссылки GetQuantityNormalized(), HasQuantity(), Math::Lerp(), Math::Max(), GameConstants::TEMPERATURE_TIME_FREEZE_MIN и GameConstants::TEMPERATURE_TIME_THAW_MIN.

◆ GetUnitWeight()

float GetUnitWeight ( bool include_wetness = true)
inlineprotected

Obsolete, use GetWeightEx instead.

3455 {
3456 float weight = 0;
3457 float wetness = 1;
3458 if (include_wetness)
3459 wetness += GetWet();
3460 if (IsSplitable()) //quantity determines size of the stack
3461 {
3462 weight = wetness * m_ConfigWeight;
3463 }
3464 else if (IsLiquidContainer()) //is a liquid container, default liquid weight is set to 1. May revisit later?
3465 {
3466 weight = 1;
3467 }
3468 return weight;
3469 }

Перекрестные ссылки GetWet(), IsLiquidContainer() и IsSplitable().

◆ GetValidFinishers()

array< int > GetValidFinishers ( )
inlineprotected

returns an array of possible finishers

4695 {
4696 return null;
4697 }

◆ GetWeightSpecialized()

float GetWeightSpecialized ( bool forceRecalc = false)
inlineprotected
3396 {
3397 if (IsSplitable()) //quantity determines size of the stack
3398 {
3399 #ifdef DEVELOPER
3400 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3401 {
3402 WeightDebugData data1 = WeightDebug.GetWeightDebug(this);
3403 data1.SetCalcDetails("TIB1: " + GetConfigWeightModifiedDebugText() +" * " + GetQuantity()+"(quantity)");
3404 }
3405 #endif
3406
3407 return GetQuantity() * GetConfigWeightModified();
3408 }
3409 else if (HasEnergyManager())// items with energy manager
3410 {
3411 #ifdef DEVELOPER
3412 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3413 {
3414 WeightDebugData data2 = WeightDebug.GetWeightDebug(this);
3415 data2.SetCalcDetails("TIB2: "+super.GetWeightSpecialized(forceRecalc)+"(contents weight) + " + GetConfigWeightModifiedDebugText() +" + " + GetCompEM().GetEnergy()+"(energy) * " + ConfigGetFloat("weightPerQuantityUnit") +"(weightPerQuantityUnit)");
3416 }
3417 #endif
3418 return super.GetWeightSpecialized(forceRecalc) + (GetCompEM().GetEnergy() * ConfigGetFloat("weightPerQuantityUnit")) + GetConfigWeightModified());
3419 }
3420 else//everything else
3421 {
3422 #ifdef DEVELOPER
3423 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3424 {
3425 WeightDebugData data3 = WeightDebug.GetWeightDebug(this);
3426 data3.SetCalcDetails("TIB3: "+super.GetWeightSpecialized(forceRecalc)+"(contents weight) + " + GetConfigWeightModifiedDebugText() +" + " + GetQuantity()+"(quantity) * " + ConfigGetFloat("weightPerQuantityUnit") +"(weightPerQuantityUnit))");
3427 }
3428 #endif
3429 return super.GetWeightSpecialized(forceRecalc) + (GetQuantity() * ConfigGetFloat("weightPerQuantityUnit")) + GetConfigWeightModified());
3430 }
3431 }
float GetEnergy()
Definition ItemBase.c:3494
Definition Debug.c:805

Перекрестные ссылки GetEnergy(), GetQuantity() и IsSplitable().

◆ GetWet()

override float GetWet ( )
inlineprotected
3591 {
3592 return m_VarWet;
3593 }
float m_VarWet
Definition ItemBase.c:38

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

◆ GetWetInit()

override float GetWetInit ( )
inlineprotected
3606 {
3607 return m_VarWetInit;
3608 }
float m_VarWetInit
Definition ItemBase.c:40

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

◆ GetWetLevel()

override EWetnessLevel GetWetLevel ( )
inlineprotected
3626 {
3627 return GetWetLevelInternal(m_VarWet);
3628 }

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

◆ GetWetMax()

override float GetWetMax ( )
inlineprotected
3596 {
3597 return m_VarWetMax;
3598 }
float m_VarWetMax
Definition ItemBase.c:42

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

◆ GetWetMin()

override float GetWetMin ( )
inlineprotected
3601 {
3602 return m_VarWetMin;
3603 }
float m_VarWetMin
Definition ItemBase.c:41

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

◆ GetWrittenNoteData()

WrittenNoteData GetWrittenNoteData ( )
inlineprotected
4465{};

◆ HasDebugActionsMask()

static bool HasDebugActionsMask ( int mask)
inlinestaticprotected
797 {
798 return ItemBase.m_DebugActionsMask & mask;
799 }

◆ HasFoodStage()

bool HasFoodStage ( )
inlineprotected
2541 {
2542 string config_path = string.Format("CfgVehicles %1 Food FoodStages", GetType());
2543 return GetGame().ConfigIsExisting(config_path);
2544 }

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

◆ HasMuzzle()

bool HasMuzzle ( )
inlineprotected

Returns true if this item has a muzzle (weapons, suppressors)

712 {
713 if (IsInherited(Weapon) || IsInherited(SuppressorBase))
714 return true;
715
716 return false;
717 }
Definition Groza_Barrel_Grip.c:2
script counterpart to engine's class Weapon
Definition InventoryItem.c:49

◆ HasQuantity()

override bool HasQuantity ( )
inlineprotected
3366 {
3367 return !(GetQuantityMax() - GetQuantityMin() == 0);
3368 }

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

◆ HidesSelectionBySlot()

bool HidesSelectionBySlot ( )
inlineprotected
4461 {
4463 }
bool m_HideSelectionsBySlot
Definition ItemBase.c:121

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

◆ HierarchyCheck()

void HierarchyCheck ( out bool hasParent,
out bool hasRootAsPlayer,
out ItemBase refParentIB )
inlineprotected
4549 {
4550 // hierarchy check for an item to decide whether it has some parent and it is in some player inventory
4551 EntityAI parent = GetHierarchyParent();
4552 if (!parent)
4553 {
4554 hasParent = false;
4555 hasRootAsPlayer = false;
4556 }
4557 else
4558 {
4559 hasParent = true;
4560 hasRootAsPlayer = (GetHierarchyRootPlayer() != null);
4561 refParentIB = ItemBase.Cast(parent);
4562 }
4563 }

◆ IDToName()

string IDToName ( int id)
inlineprotected
2760 {
2761 PluginVariables plugin = PluginVariables.Cast(GetPlugin(PluginVariables));
2762 return plugin.GetName(id);
2763 }

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

◆ IncreaseOverheating()

void IncreaseOverheating ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlineprotected
536 {
537 if (m_MaxOverheatingValue > 0)
538 {
540
543
544 m_CheckOverheating.Stop();
545 m_CheckOverheating.Run(m_OverheatingDecayInterval, this, "OnOverheatingDecay");
546
548 }
549 }
float m_OverheatingDecayInterval
Definition ItemBase.c:117
void CheckOverheating(ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
Definition ItemBase.c:551
ref Timer m_CheckOverheating
Definition ItemBase.c:114

Перекрестные ссылки CALL_CATEGORY_SYSTEM, CheckOverheating(), m_CheckOverheating, m_MaxOverheatingValue, m_OverheatingDecayInterval и m_OverheatingShots.

◆ InitializeActions()

void InitializeActions ( )
inlineprotected
296 {
298 if (!m_InputActionMap)
299 {
302 SetActions();
304 }
305 }
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Definition ActionManagerClient.c:1
string Type
Definition JsonDataContaminatedArea.c:11
void SetActions()
Definition ItemBase.c:318
static ref map< typename, ref TInputActionMap > m_ItemTypeActionsMap
Definition ItemBase.c:16

Перекрестные ссылки m_InputActionMap, m_ItemTypeActionsMap, ItemBase::SetActions() и Type.

◆ InitItemVariables()

override void InitItemVariables ( )
inlineprivate
193 {
194 super.InitItemVariables();
195
196 m_VarQuantityInit = ConfigGetInt("varQuantityInit");
197 m_VarQuantity = m_VarQuantityInit;//should be by the CE, this is just a precaution
198 m_VarQuantityMin = ConfigGetInt("varQuantityMin");
199 m_VarQuantityMax = ConfigGetInt("varQuantityMax");
200 m_VarStackMax = ConfigGetFloat("varStackMax");
201 m_Count = ConfigGetInt("count");
202
203 m_CanShowQuantity = ConfigGetBool("quantityShow");
204 m_HasQuantityBar = ConfigGetBool("quantityBar");
205
206 m_CleannessInit = ConfigGetInt("varCleannessInit");
208 m_CleannessMin = ConfigGetInt("varCleannessMin");
209 m_CleannessMax = ConfigGetInt("varCleannessMax");
210
211 m_WantPlayImpactSound = false;
212 m_ImpactSpeed = 0.0;
213
214 m_VarWetInit = ConfigGetFloat("varWetInit");
216 m_VarWetMin = ConfigGetFloat("varWetMin");
217 m_VarWetMax = ConfigGetFloat("varWetMax");
218
219 m_LiquidContainerMask = ConfigGetInt("liquidContainerType");
220 if (IsLiquidContainer() && GetQuantity() != 0)
222 m_IsBeingPlaced = false;
223 m_IsHologram = false;
224 m_IsPlaceSound = false;
225 m_IsDeploySound = false;
226 m_IsTakeable = true;
227 m_IsSoundSynchRemote = false;
228 m_CanBeMovedOverride = false;
232 m_CanBeDigged = ConfigGetBool("canBeDigged");
233
235 ConfigGetIntArray("compatibleLocks", m_CompatibleLocks);
236 m_LockType = ConfigGetInt("lockType");
237
238 //Define if item can be split and set ability to be combined accordingly
239 m_CanThisBeSplit = false;
240 can_this_be_combined = false;
241 if (ConfigIsExisting("canBeSplit"))
242 {
243 can_this_be_combined = ConfigGetBool("canBeSplit");
245 }
246
247 m_ItemBehaviour = -1;
248 if (ConfigIsExisting("itemBehaviour"))
249 m_ItemBehaviour = ConfigGetInt("itemBehaviour");
250
251 //RegisterNetSyncVariableInt("m_VariablesMask");
252 if (HasQuantity()) RegisterNetSyncVariableFloat("m_VarQuantity", GetQuantityMin(), m_VarQuantityMax);
253 RegisterNetSyncVariableFloat("m_VarWet", GetWetMin(), GetWetMax(), 2);
254 RegisterNetSyncVariableInt("m_VarLiquidType");
255 RegisterNetSyncVariableInt("m_Cleanness",0,1);
256
257 RegisterNetSyncVariableBoolSignal("m_WantPlayImpactSound");
258 RegisterNetSyncVariableFloat("m_ImpactSpeed");
259 RegisterNetSyncVariableInt("m_ImpactSoundSurfaceHash");
260
261 RegisterNetSyncVariableInt("m_ColorComponentR", 0, 255);
262 RegisterNetSyncVariableInt("m_ColorComponentG", 0, 255);
263 RegisterNetSyncVariableInt("m_ColorComponentB", 0, 255);
264 RegisterNetSyncVariableInt("m_ColorComponentA", 0, 255);
265
266 RegisterNetSyncVariableBool("m_IsBeingPlaced");
267 RegisterNetSyncVariableBool("m_IsTakeable");
268 RegisterNetSyncVariableBool("m_IsHologram");
269
270 if (UsesGlobalDeploy())
271 {
272 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
273 RegisterNetSyncVariableBool("m_IsDeploySound");
274 }
275
276 m_LockSoundSet = ConfigGetString("lockSoundSet");
277
279 if (ConfigIsExisting("temperaturePerQuantityWeight"))
280 m_TemperaturePerQuantityWeight = ConfigGetFloat("temperaturePerQuantityWeight");
281
282 }
float GetHeatIsolationInit()
Definition ItemBase.c:3533
bool m_IsSoundSynchRemote
Definition ItemBase.c:66
ref array< int > m_CompatibleLocks
Definition ItemBase.c:130
override float GetWetMax()
Definition ItemBase.c:3595
int m_ItemBehaviour
Definition ItemBase.c:59
bool m_HasQuantityBar
Definition ItemBase.c:75
float m_ItemAttachOffset
Definition ItemBase.c:56
int GetLiquidTypeInit()
Definition ItemBase.c:3758
int m_CleannessMin
Definition ItemBase.c:46
bool m_IsTakeable
Definition ItemBase.c:65
int m_Count
Definition ItemBase.c:34
override float GetWetMin()
Definition ItemBase.c:3600
float GetItemAttachOffset()
Definition ItemBase.c:3663
bool UsesGlobalDeploy()
Definition ItemBase.c:285
bool m_IsDeploySound
Definition ItemBase.c:64
int m_CleannessInit
Definition ItemBase.c:45
int m_CleannessMax
Definition ItemBase.c:47
float GetItemModelLength()
Definition ItemBase.c:3654
bool m_CanThisBeSplit
Definition ItemBase.c:72
float m_ItemModelLength
Definition ItemBase.c:55
bool m_IsHologram
Definition ItemBase.c:62
bool m_CanShowQuantity
Definition ItemBase.c:74
bool m_IsBeingPlaced
Definition ItemBase.c:61
bool m_IsPlaceSound
Definition ItemBase.c:63

Перекрестные ссылки can_this_be_combined, GetHeatIsolationInit(), GetItemAttachOffset(), GetItemModelLength(), GetLiquidTypeInit(), GetQuantity(), GetQuantityMin(), GetWetMax(), GetWetMin(), HasQuantity(), IsLiquidContainer(), m_CanBeDigged, m_CanBeMovedOverride, m_CanShowQuantity, m_CanThisBeSplit, m_Cleanness, m_CleannessInit, m_CleannessMax, m_CleannessMin, m_CompatibleLocks, m_Count, m_HasQuantityBar, m_HeatIsolation, m_ImpactSpeed, m_IsBeingPlaced, m_IsDeploySound, m_IsHologram, m_IsPlaceSound, m_IsSoundSynchRemote, m_IsTakeable, m_ItemAttachOffset, m_ItemBehaviour, m_ItemModelLength, m_LiquidContainerMask, m_LockSoundSet, m_LockType, m_TemperaturePerQuantityWeight, m_VarLiquidType, m_VarQuantity, m_VarQuantityInit, m_VarQuantityMax, m_VarQuantityMin, m_VarStackMax, m_VarWet, m_VarWetInit, m_VarWetMax, m_VarWetMin, m_WantPlayImpactSound и UsesGlobalDeploy().

◆ InsertAgent()

override void InsertAgent ( int agent,
float count = 1 )
inlineprotected
3873 {
3874 if (count < 1)
3875 return;
3876 //Debug.Log("Inserting Agent on item: " + agent.ToString() +" count: " + count.ToString());
3878 }

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

◆ IsActionTargetVisible()

bool IsActionTargetVisible ( )
inlineprotected
4274 {
4275 return false;
4276 }

◆ IsBeingPlaced()

override bool IsBeingPlaced ( )
inlineprotected
986 {
987 return m_IsBeingPlaced;
988 }

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

◆ IsBloodContainer()

bool IsBloodContainer ( )
inlineprotected
933 {
934 //m_LiquidContainerMask & GROUP_LIQUID_BLOOD ???
935 return false;
936 }

◆ IsCargoException4x3()

bool IsCargoException4x3 ( EntityAI item)
inlineprotected
4668 {
4669 return (item.IsKindOf("Cauldron") || item.IsKindOf("Pot") || item.IsKindOf("FryingPan") || item.IsKindOf("SmallProtectorCase") || (item.IsKindOf("PortableGasStove") && item.FindAttachmentBySlotName("CookingEquipment")));
4670 }

◆ IsColorSet()

bool IsColorSet ( )
inlineprotected
3729 {
3730 return IsVariableSet(VARIABLE_COLOR);
3731 }

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

◆ IsCombineAll()

bool IsCombineAll ( ItemBase other_item,
bool use_stack_max = false )
inlineprotected
2189 {
2190 return ComputeQuantityUsed(other_item, use_stack_max) == other_item.GetQuantity();
2191 }
int ComputeQuantityUsed(ItemBase other_item, bool use_stack_max=true)
Definition ItemBase.c:2203

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

◆ IsCoverFaceForShave()

bool IsCoverFaceForShave ( string slot_name)
inlineprotected

DEPRECATED in use, but returns correct values nontheless. Check performed elsewhere.

4499 {
4500 return IsExclusionFlagPresent(PlayerBase.GetFaceCoverageShaveValues());
4501 }

◆ IsDeployable()

bool IsDeployable ( )
inlineprotected
4248 {
4249 return false;
4250 }

◆ IsDeploySound()

bool IsDeploySound ( )
inlineprotected
4340 {
4341 return m_IsDeploySound;
4342 }

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

◆ IsExplosive()

bool IsExplosive ( )
inlineprotected

explosive

946 {
947 return false;
948 }

◆ IsFacingPlayer()

bool IsFacingPlayer ( PlayerBase player,
string selection )
inlineprotected
970 {
971 return true;
972 }

◆ IsFullQuantity()

bool IsFullQuantity ( )
inlineprotected
3376 {
3377 return GetQuantity() >= GetQuantityMax();
3378 }

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

◆ IsHeavyBehaviour()

override bool IsHeavyBehaviour ( )
inlineprotected
4218 {
4219 if (m_ItemBehaviour == 0)
4220 {
4221 return true;
4222 }
4223
4224 return false;
4225 }

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

◆ IsHologram()

override bool IsHologram ( )
inlineprotected
1002 {
1003 return m_IsHologram;
1004 }

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

◆ IsIgnoredByConstruction()

override bool IsIgnoredByConstruction ( )
inlineprotected
2534 {
2535 return true;
2536 }

◆ IsItemBase()

override bool IsItemBase ( )
inlineprotected
2677 {
2678 return true;
2679 }

◆ IsLightSource()

bool IsLightSource ( )
inlineprotected

958 {
959 return false;
960 }

◆ IsLiquidContainer()

bool IsLiquidContainer ( )
inlineprotected
923 {
924 return m_LiquidContainerMask != 0;
925 }

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

◆ IsLiquidPresent()

bool IsLiquidPresent ( )
inlineprotected
918 {
919 return (GetLiquidType() != 0 && HasQuantity());
920 }

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

◆ IsNVG()

bool IsNVG ( )
inlineprotected
939 {
940 return false;
941 }

◆ IsOneHandedBehaviour()

override bool IsOneHandedBehaviour ( )
inlineprotected
4228 {
4229 if (m_ItemBehaviour == 1)
4230 {
4231 return true;
4232 }
4233
4234 return false;
4235 }

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

◆ IsOpen()

bool IsOpen ( )
inlineprotected
4016 {
4017 return true;
4018 }

◆ IsOverheatingEffectActive()

bool IsOverheatingEffectActive ( )
inlineprotected
569 {
571 }
bool m_IsOverheatingEffectActive
Definition ItemBase.c:112

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

◆ IsPlaceSound()

bool IsPlaceSound ( )
inlineprotected
4330 {
4331 return m_IsPlaceSound;
4332 }

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

◆ IsPlayerInside()

bool IsPlayerInside ( PlayerBase player,
string selection )
inlineprotected
975 {
976 return true;
977 }

◆ IsResultOfSplit()

bool IsResultOfSplit ( )
inlineprotected
2194 {
2195 return m_IsResultOfSplit;
2196 }

◆ IsSoundSynchRemote()

bool IsSoundSynchRemote ( )
inlineprotected
4315 {
4316 return m_IsSoundSynchRemote;
4317 }

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

◆ IsSplitable()

override bool IsSplitable ( )
inlineprotected
1587 {
1588 return m_CanThisBeSplit;
1589 }

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

◆ IsStoreLoad()

override bool IsStoreLoad ( )
inlineprotected
3638 {
3639 return m_IsStoreLoad;
3640 }

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

◆ IsTakeable()

override bool IsTakeable ( )
inlineprotected
4268 {
4269 return m_IsTakeable;
4270 }

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

◆ IsTwoHandedBehaviour()

override bool IsTwoHandedBehaviour ( )
inlineprotected
4238 {
4239 if (m_ItemBehaviour == 2)
4240 {
4241 return true;
4242 }
4243
4244 return false;
4245 }

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

◆ ItemBase()

void ItemBase ( )
inlineprivate
144 {
145 SetEventMask(EntityEvent.INIT); // Enable EOnInit event
149
150 if (!GetGame().IsDedicatedServer())
151 {
152 if (HasMuzzle())
153 {
155
157 {
159 }
160 }
161
163 m_ActionsInitialize = false;
164 }
165
166 m_OldLocation = null;
167
168 if (GetGame().IsServer())
169 {
170 m_AdminLog = PluginAdminLog.Cast(GetPlugin(PluginAdminLog));
171 }
172
173 if (ConfigIsExisting("headSelectionsToHide"))
174 {
176 ConfigGetTextArray("headSelectionsToHide",m_HeadHidingSelections);
177 }
178
180 if (ConfigIsExisting("hideSelectionsByinventorySlot"))
181 {
182 m_HideSelectionsBySlot = ConfigGetBool("hideSelectionsByinventorySlot");
183 }
184
185 m_QuickBarBonus = Math.Max(0, ConfigGetInt("quickBarBonus"));
186
187 m_IsResultOfSplit = false;
188
190 }
bool HasMuzzle()
Returns true if this item has a muzzle (weapons, suppressors)
Definition ItemBase.c:711
ref TIntArray m_SingleUseActions
Definition ItemBase.c:92
void LoadParticleConfigOnOverheating(int id)
Definition ItemBase.c:474
ref TIntArray m_InteractActions
Definition ItemBase.c:94
PluginAdminLog m_AdminLog
Definition ItemBase.c:124
ref TIntArray m_ContinuousActions
Definition ItemBase.c:93
void SetActionAnimOverrides()
int GetMuzzleID()
Returns global muzzle ID. If not found, then it gets automatically registered.
Definition ItemBase.c:720
void PreLoadSoundAttachmentType()
Attachment Sound Type getting from config file.
Definition ItemBase.c:4279
void LoadParticleConfigOnFire(int id)
Definition ItemBase.c:405
array< int > TIntArray
Definition EnScript.c:687
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:45

Перекрестные ссылки GetGame(), GetMuzzleID(), GetPlugin(), HasMuzzle(), LoadParticleConfigOnFire(), LoadParticleConfigOnOverheating(), m_ActionsInitialize, m_AdminLog, m_ContinuousActions, m_HeadHidingSelections, m_HideSelectionsBySlot, m_InteractActions, m_QuickBarBonus, m_ShotsToStartOverheating, m_SingleUseActions, Math::Max(), PreLoadSoundAttachmentType() и ItemBase::SetActionAnimOverrides().

◆ KillAllOverheatingParticles()

void KillAllOverheatingParticles ( )
inlineprotected
667 {
669 {
670 for (int i = m_OverheatingParticles.Count(); i > 0; i--)
671 {
672 int id = i - 1;
674
675 if (OP)
676 {
677 Particle p = OP.GetParticle();
678
679 if (p)
680 {
681 p.Stop();
682 }
683
684 delete OP;
685 }
686 }
687
690 }
691 }
ref array< ref OverheatingParticle > m_OverheatingParticles
Definition ItemBase.c:118
Definition WeaponParticles.c:382
Legacy way of using particles in the game.
Definition Particle.c:7

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

◆ KindOf()

override bool KindOf ( string tag)
inlineprotected
2683 {
2684 bool found = false;
2685 string item_name = this.GetType();
2687 GetGame().ConfigGetTextArray("cfgVehicles " + item_name + " itemInfo", item_tag_array);
2688
2689 int array_size = item_tag_array.Count();
2690 for (int i = 0; i < array_size; i++)
2691 {
2692 if (item_tag_array.Get(i) == tag)
2693 {
2694 found = true;
2695 break;
2696 }
2697 }
2698 return found;
2699 }

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

◆ LoadAgents()

bool LoadAgents ( ParamsReadContext ctx,
int version )
inlineprotected
3934 {
3935 if (!ctx.Read(m_AttachedAgents))
3936 return false;
3937 return true;
3938 }

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

◆ LoadParticleConfigOnFire()

void LoadParticleConfigOnFire ( int id)
inlineprotected
406 {
407 if (!m_OnFireEffect)
409
412
413 string config_to_search = "CfgVehicles";
414 string muzzle_owner_config;
415
416 if (!m_OnFireEffect.Contains(id))
417 {
418 if (IsInherited(Weapon))
419 config_to_search = "CfgWeapons";
420
422
423 string config_OnFire_class = muzzle_owner_config + "Particles " + "OnFire ";
424
425 int config_OnFire_subclass_count = GetGame().ConfigGetChildrenCount(config_OnFire_class);
426
428 {
430
431 for (int i = 0; i < config_OnFire_subclass_count; i++)
432 {
433 string particle_class = "";
434 GetGame().ConfigGetChildName(config_OnFire_class, i, particle_class);
437 WPOF_array.Insert(WPOF);
438 }
439
440
441 m_OnFireEffect.Insert(id, WPOF_array);
442 }
443 }
444
445 if (!m_OnBulletCasingEjectEffect.Contains(id))
446 {
447 config_to_search = "CfgWeapons"; // Bullet Eject efect is supported on weapons only.
449
450 string config_OnBulletCasingEject_class = muzzle_owner_config + "Particles " + "OnBulletCasingEject ";
451
453
454 if (config_OnBulletCasingEject_count > 0 && IsInherited(Weapon))
455 {
457
458 for (i = 0; i < config_OnBulletCasingEject_count; i++)
459 {
460 string particle_class2 = "";
464 WPOBE_array.Insert(WPOBE);
465 }
466
467
469 }
470 }
471 }
static ref map< int, ref array< ref WeaponParticlesOnBulletCasingEject > > m_OnBulletCasingEjectEffect
Definition ItemBase.c:106
static ref map< int, ref array< ref WeaponParticlesOnFire > > m_OnFireEffect
Definition ItemBase.c:105

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

◆ LoadParticleConfigOnOverheating()

void LoadParticleConfigOnOverheating ( int id)
inlineprotected
475 {
478
479 if (!m_OnOverheatingEffect.Contains(id))
480 {
481 string config_to_search = "CfgVehicles";
482
483 if (IsInherited(Weapon))
484 config_to_search = "CfgWeapons";
485
486 string muzzle_owner_config = config_to_search + " " + GetType() + " ";
487 string config_OnOverheating_class = muzzle_owner_config + "Particles " + "OnOverheating ";
488
489 if (GetGame().ConfigIsExisting(config_OnOverheating_class))
490 {
491
492 m_ShotsToStartOverheating = GetGame().ConfigGetFloat(config_OnOverheating_class + "shotsToStartOverheating");
493
495 {
496 m_ShotsToStartOverheating = -1; // This prevents futher readings from config for future creations of this item
497 string error = "Error reading config " + GetType() + ">Particles>OnOverheating - Parameter shotsToStartOverheating is configured wrong or is missing! Its value must be 1 or higher!";
498 Error(error);
499 return;
500 }
501
502 m_OverheatingDecayInterval = GetGame().ConfigGetFloat(config_OnOverheating_class + "overheatingDecayInterval");
503 m_MaxOverheatingValue = GetGame().ConfigGetFloat(config_OnOverheating_class + "maxOverheatingValue");
504
505
506
509
510 for (int i = 0; i < config_OnOverheating_subclass_count; i++)
511 {
512 string particle_class = "";
513 GetGame().ConfigGetChildName(config_OnOverheating_class, i, particle_class);
515 int entry_type = GetGame().ConfigGetType(config_OnOverheating_entry);
516
517 if (entry_type == CT_CLASS)
518 {
520 WPOOH_array.Insert(WPOF);
521 }
522 }
523
524
526 }
527 }
528 }
ref map< int, ref array< ref WeaponParticlesOnOverheating > > m_OnOverheatingEffect
Definition ItemBase.c:107
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

Перекрестные ссылки Error(), GetGame(), GetType(), m_MaxOverheatingValue, m_OnOverheatingEffect, m_OverheatingDecayInterval и m_ShotsToStartOverheating.

◆ LockToParent()

void LockToParent ( )
inlineprotected

Locks this item in it's current attachment slot of its parent. This makes the "locked" icon visible in inventory over this item.

859 {
860 EntityAI parent = GetHierarchyParent();
861
862 if (parent)
863 {
865 GetInventory().GetCurrentInventoryLocation(inventory_location_to_lock);
866 parent.GetInventory().SetSlotLock(inventory_location_to_lock.GetSlot(), true);
867 }
868 }

◆ MessageToOwnerAction()

void MessageToOwnerAction ( string text)
inlineprotected

Send message to owner player in yellow color.

Возвращает
void
item_stone.MessageToOwnerAction("Some Action Message");
2631 {
2632 PlayerBase player = PlayerBase.Cast(this.GetHierarchyRootPlayer());
2633
2634 if (player)
2635 {
2636 player.MessageAction(text);
2637 }
2638 }

◆ MessageToOwnerFriendly()

void MessageToOwnerFriendly ( string text)
inlineprotected

Send message to owner player in green color.

Возвращает
void
item_stone.MessageToOwnerFriendly("Some Friendly Message");
2649 {
2650 PlayerBase player = PlayerBase.Cast(this.GetHierarchyRootPlayer());
2651
2652 if (player)
2653 {
2654 player.MessageFriendly(text);
2655 }
2656 }

◆ MessageToOwnerImportant()

void MessageToOwnerImportant ( string text)
inlineprotected

Send message to owner player in red color.

Возвращает
void
item_stone.MessageToOwnerImportant("Some Important Message");
2667 {
2668 PlayerBase player = PlayerBase.Cast(this.GetHierarchyRootPlayer());
2669
2670 if (player)
2671 {
2672 player.MessageImportant(text);
2673 }
2674 }

◆ MessageToOwnerStatus()

void MessageToOwnerStatus ( string text)
inlineprotected

Send message to owner player in grey color.

Возвращает
void
item_stone.MessageToOwnerStatus("Some Status Message");
2613 {
2614 PlayerBase player = PlayerBase.Cast(this.GetHierarchyRootPlayer());
2615
2616 if (player)
2617 {
2618 player.MessageStatus(text);
2619 }
2620 }

◆ NameToID()

int NameToID ( string name)
inlineprotected
2754 {
2755 PluginVariables plugin = PluginVariables.Cast(GetPlugin(PluginVariables));
2756 return plugin.GetID(name);
2757 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo

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

◆ OnAction()

override bool OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprotected
2331 {
2332 super.OnAction(action_id, player, ctx);
2333 if (action_id >= EActions.RECIPES_RANGE_START && action_id < EActions.RECIPES_RANGE_END)
2334 {
2335 PluginRecipesManager plugin_recipes_manager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
2336 int idWithoutOffset = action_id - EActions.RECIPES_RANGE_START;
2337 PlayerBase p = PlayerBase.Cast(player);
2338 if (EActions.RECIPES_RANGE_START < 1000)
2339 {
2340 float anim_length = plugin_recipes_manager.GetRecipeLengthInSecs(idWithoutOffset);
2341 float specialty_weight = plugin_recipes_manager.GetRecipeSpecialty(idWithoutOffset);
2342 }
2343 }
2344 #ifndef SERVER
2345 else if (action_id == EActions.WATCH_PLAYER)
2346 {
2347 PluginDeveloper.SetDeveloperItemClientEx(player);
2348 }
2349 #endif
2350 if (GetGame().IsServer())
2351 {
2352 if (action_id >= EActions.DEBUG_ITEM_WATCH_BUTTON_RANGE_START && action_id < EActions.DEBUG_ITEM_WATCH_BUTTON_RANGE_END)
2353 {
2354 int id = action_id - EActions.DEBUG_ITEM_WATCH_BUTTON_RANGE_START;
2355 OnDebugButtonPressServer(id + 1);
2356 }
2357
2358 else if (action_id >= EActions.DEBUG_AGENTS_RANGE_INJECT_START && action_id < EActions.DEBUG_AGENTS_RANGE_INJECT_END)
2359 {
2360 int agent_id = action_id - EActions.DEBUG_AGENTS_RANGE_INJECT_START;
2361 InsertAgent(agent_id,100);
2362 }
2363
2364 else if (action_id >= EActions.DEBUG_AGENTS_RANGE_REMOVE_START && action_id < EActions.DEBUG_AGENTS_RANGE_REMOVE_END)
2365 {
2366 int agent_id2 = action_id - EActions.DEBUG_AGENTS_RANGE_REMOVE_START;
2368 }
2369
2370 else if (action_id == EActions.ADD_QUANTITY)
2371 {
2372 if (IsMagazine())
2373 {
2374 Magazine mag = Magazine.Cast(this);
2375 mag.ServerSetAmmoCount(mag.GetAmmoCount() + mag.GetAmmoMax() * 0.2);
2376 }
2377 else
2378 {
2379 AddQuantity(GetQuantityMax() * 0.2);
2380 }
2381
2382 if (m_EM)
2383 {
2384 m_EM.AddEnergy(m_EM.GetEnergyMax() * 0.2);
2385 }
2386 //PrintVariables();
2387 }
2388
2389 else if (action_id == EActions.REMOVE_QUANTITY) //Quantity -20%
2390 {
2391 if (IsMagazine())
2392 {
2393 Magazine mag2 = Magazine.Cast(this);
2394 mag2.ServerSetAmmoCount(mag2.GetAmmoCount() - mag2.GetAmmoMax() * 0.2);
2395 }
2396 else
2397 {
2398 AddQuantity(- GetQuantityMax() * 0.2);
2399 }
2400 if (m_EM)
2401 {
2402 m_EM.AddEnergy(- m_EM.GetEnergyMax() * 0.2);
2403 }
2404 //PrintVariables();
2405 }
2406
2407 else if (action_id == EActions.SET_QUANTITY_0) //SetMaxQuantity
2408 {
2409 SetQuantity(0);
2410
2411 if (m_EM)
2412 {
2413 m_EM.SetEnergy(0);
2414 }
2415 }
2416
2417 else if (action_id == EActions.SET_MAX_QUANTITY) //SetMaxQuantity
2418 {
2420
2421 if (m_EM)
2422 {
2423 m_EM.SetEnergy(m_EM.GetEnergyMax());
2424 }
2425 }
2426
2427 else if (action_id == EActions.ADD_HEALTH)
2428 {
2429 AddHealth("","",GetMaxHealth("","Health")/5);
2430 }
2431 else if (action_id == EActions.REMOVE_HEALTH)
2432 {
2433 AddHealth("","",-GetMaxHealth("","Health")/5);
2434 }
2435 else if (action_id == EActions.DESTROY_HEALTH)
2436 {
2437 SetHealth01("","",0);
2438 }
2439 else if (action_id == EActions.WATCH_ITEM)
2440 {
2442 mid.RegisterDebugItem(ItemBase.Cast(this), PlayerBase.Cast(player));
2443 #ifdef DEVELOPER
2445 #endif
2446 }
2447
2448 else if (action_id == EActions.ADD_TEMPERATURE)
2449 {
2450 AddTemperature(20);
2451 //PrintVariables();
2452 }
2453
2454 else if (action_id == EActions.REMOVE_TEMPERATURE)
2455 {
2456 AddTemperature(-20);
2457 //PrintVariables();
2458 }
2459
2460 else if (action_id == EActions.FLIP_FROZEN)
2461 {
2462 SetFrozen(!GetIsFrozen());
2463 //PrintVariables();
2464 }
2465
2466 else if (action_id == EActions.ADD_WETNESS)
2467 {
2468 AddWet(GetWetMax()/5);
2469 //PrintVariables();
2470 }
2471
2472 else if (action_id == EActions.REMOVE_WETNESS)
2473 {
2474 AddWet(-GetWetMax()/5);
2475 //PrintVariables();
2476 }
2477
2478 else if (action_id == EActions.LIQUIDTYPE_UP)
2479 {
2480 int curr_type = GetLiquidType();
2482 //AddWet(1);
2483 //PrintVariables();
2484 }
2485
2486 else if (action_id == EActions.LIQUIDTYPE_DOWN)
2487 {
2488 int curr_type2 = GetLiquidType();
2490 }
2491
2492 else if (action_id == EActions.MAKE_SPECIAL)
2493 {
2494 auto debugParams = DebugSpawnParams.WithPlayer(player);
2495 OnDebugSpawnEx(debugParams);
2496 }
2497
2498 else if (action_id == EActions.DELETE)
2499 {
2500 Delete();
2501 }
2502
2503 }
2504
2505
2506 return false;
2507 }
void PluginItemDiagnostic()
Definition PluginItemDiagnostic.c:83
override void InsertAgent(int agent, float count=1)
Definition ItemBase.c:3872
override void RemoveAgent(int agent_id)
Definition ItemBase.c:3853
void SetQuantityMax()
Definition ItemBase.c:3281
override void AddWet(float value)
Definition ItemBase.c:3580

Перекрестные ссылки AddQuantity(), AddWet(), GetGame(), GetLiquidType(), GetPlugin(), GetQuantityMax(), GetWetMax(), InsertAgent(), PluginItemDiagnostic(), RemoveAgent(), SetLiquidType(), SetQuantity() и SetQuantityMax().

◆ OnActivatedByItem()

void OnActivatedByItem ( notnull ItemBase item)
protected

Called when this item is activated by other.

◆ OnActivatedByTripWire()

void OnActivatedByTripWire ( )
protected

DEPRECATED use OnActivatedByItem below Called when this item is activated from a trip wire that was stepped on.

◆ OnApply()

void OnApply ( PlayerBase player)
protected

◆ OnAttachmentQuantityChanged()

void OnAttachmentQuantityChanged ( ItemBase item)
inlineprotected

Called on server side when some attachment's quantity is changed. Call super.OnAttachmentQuantityChanged(item); first when overriding this event.

2016 {
2017 // insert code here
2018 }

◆ OnAttachmentQuantityChangedEx()

void OnAttachmentQuantityChangedEx ( ItemBase item,
float delta )
inlineprotected

Called on server side when some attachment's quantity is changed. Call super.OnAttachmentQuantityChanged(item); first when overriding this event.

2022 {
2024 }
void OnAttachmentQuantityChanged(ItemBase item)
Called on server side when some attachment's quantity is changed. Call super.OnAttachmentQuantityChan...
Definition ItemBase.c:2015

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

◆ OnCombine()

void OnCombine ( ItemBase other_item)
inlineprotected
2259 {
2260 #ifdef SERVER
2261 if (!GetHierarchyRootPlayer() && GetHierarchyParent())
2262 GetHierarchyParent().IncreaseLifetimeUp();
2263 #endif
2264 };

◆ OnCreatePhysics()

override void OnCreatePhysics ( )
inlineprotected
1222 {
1224 }
void RefreshPhysics()

Перекрестные ссылки ItemBase::RefreshPhysics().

◆ OnEndPlacement()

void OnEndPlacement ( )
inlineprotected
999{}

◆ OnEnergyAdded()

override void OnEnergyAdded ( )
inlineprotected
3513 {
3514 super.OnEnergyAdded();
3515
3517 }
void ConvertEnergyToQuantity()
Definition ItemBase.c:3520

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

◆ OnEnergyConsumed()

override void OnEnergyConsumed ( )
inlineprotected
3506 {
3507 super.OnEnergyConsumed();
3508
3510 }

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

◆ OnInventoryEnter()

void OnInventoryEnter ( Man player)
inlineprotected

Event called on item when it is placed in the player(Man) inventory, passes the owner as a parameter.

3783 {
3785 if (PlayerBase.CastTo(nplayer, player))
3786 {
3787 m_CanPlayImpactSound = true;
3788 //nplayer.OnItemInventoryEnter(this);
3789 nplayer.SetEnableQuickBarEntityShortcut(this,!GetHierarchyParent() || GetHierarchyParent().GetInventory().AreChildrenAccessible());
3790 }
3791 }

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

◆ OnInventoryExit()

void OnInventoryExit ( Man player)
inlineprotected

Event called on item when it is removed from the player(Man) inventory, passes the old owner as a parameter.

3796 {
3798 if (PlayerBase.CastTo(nplayer,player))
3799 {
3800 //nplayer.OnItemInventoryExit(this);
3801 nplayer.SetEnableQuickBarEntityShortcut(this,false);
3802
3803 }
3804
3805 //if (!GetGame().IsDedicatedServer())
3806 player.GetHumanInventory().ClearUserReservedLocationForContainer(this);
3807
3808
3809 if (HasEnergyManager())
3810 {
3811 GetCompEM().UpdatePlugState(); // Unplug the el. device if it's necesarry.
3812 }
3813 }

◆ OnItemAttachmentSlotChanged()

override void OnItemAttachmentSlotChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected
1227 {
1228
1229 }

◆ OnItemInHandsPlayerSwimStart()

void OnItemInHandsPlayerSwimStart ( PlayerBase player)
protected

◆ OnItemLocationChanged()

override void OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected
1232 {
1233 super.OnItemLocationChanged(old_owner, new_owner);
1234
1237
1238 if (!relatedPlayer && playerNew)
1240
1241 if (relatedPlayer && relatedPlayer.GetPerformedActionID() != -1)
1242 {
1243 ActionManagerBase actionMgr = relatedPlayer.GetActionManager();
1244 if (actionMgr)
1245 {
1246 ActionBase currentAction = actionMgr.GetRunningAction();
1247 if (currentAction)
1248 currentAction.OnItemLocationChanged(this);
1249 }
1250 }
1251
1252 Man ownerPlayerOld = null;
1253 Man ownerPlayerNew = null;
1254
1255 if (old_owner)
1256 {
1257 if (old_owner.IsMan())
1258 {
1259 ownerPlayerOld = Man.Cast(old_owner);
1260 }
1261 else
1262 {
1263 ownerPlayerOld = Man.Cast(old_owner.GetHierarchyRootPlayer());
1264 }
1265 }
1266 else
1267 {
1268 if (new_owner && IsElectricAppliance() && GetCompEM() && GetCompEM().IsPlugged())
1269 {
1270 ActionBase action = ActionManagerBase.GetAction(ActionRepositionPluggedItem);
1271
1272 if (!action || !playerNew || playerNew.GetPerformedActionID() != action.GetID())
1273 {
1274 GetCompEM().UnplugThis();
1275 }
1276 }
1277 }
1278
1279 if (new_owner)
1280 {
1281 if (new_owner.IsMan())
1282 {
1283 ownerPlayerNew = Man.Cast(new_owner);
1284 }
1285 else
1286 {
1287 ownerPlayerNew = Man.Cast(new_owner.GetHierarchyRootPlayer());
1288 }
1289 }
1290
1292 {
1293 if (ownerPlayerOld)
1294 {
1296 GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER,subItemsExit);
1297 for (int i = 0; i < subItemsExit.Count(); i++)
1298 {
1300 itemExit.OnInventoryExit(ownerPlayerOld);
1301 }
1302 }
1303
1304 if (ownerPlayerNew)
1305 {
1307 GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER,subItemsEnter);
1308 for (int j = 0; j < subItemsEnter.Count(); j++)
1309 {
1311 itemEnter.OnInventoryEnter(ownerPlayerNew);
1312 }
1313 }
1314 }
1315 else if (ownerPlayerNew != null)
1316 {
1318 if (PlayerBase.CastTo(nplayer, ownerPlayerNew))
1319 {
1321 GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER,subItemsUpdate);
1322 for (int k = 0; k < subItemsUpdate.Count(); k++)
1323 {
1325 itemUpdate.UpdateQuickbarShortcutVisibility(nplayer);
1326 }
1327 }
1328 }
1329 }
Definition ActionRepositionPluggedItem.c:2

Перекрестные ссылки ItemBase::IsElectricAppliance().

◆ OnLiquidTypeChanged()

void OnLiquidTypeChanged ( int oldType,
int newType )
inlineprotected
3769 {
3770 if (newType == LIQUID_NONE && GetIsFrozen())
3771 SetFrozen(false);
3772 }

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

◆ OnMovedInsideCargo()

override void OnMovedInsideCargo ( EntityAI container)
inlineprotected
1062 {
1063 super.OnMovedInsideCargo(container);
1064
1065 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(this, {Bolt_Base});
1066 }
Definition AmmunitionPiles.c:84

◆ OnOverheatingDecay()

void OnOverheatingDecay ( )
inlineprotected
574 {
575 if (m_MaxOverheatingValue > 0)
576 m_OverheatingShots -= 1 + m_OverheatingShots / m_MaxOverheatingValue; // The hotter a barrel is, the faster it needs to cool down.
577 else
579
580 if (m_OverheatingShots <= 0)
581 {
582 m_CheckOverheating.Stop();
584 }
585 else
586 {
589
590 m_CheckOverheating.Stop();
591 m_CheckOverheating.Run(m_OverheatingDecayInterval, this, "OnOverheatingDecay");
592 }
593
594 CheckOverheating(this, "", this);
595 }
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10

Перекрестные ссылки CALL_CATEGORY_GAMEPLAY, CheckOverheating(), m_CheckOverheating, m_MaxOverheatingValue, m_OverheatingDecayInterval и m_OverheatingShots.

◆ OnPlacementComplete()

override void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected
3824 {
3825 if (m_AdminLog)
3826 {
3827 m_AdminLog.OnPlacementComplete(player, this);
3828 }
3829 if (GetGame().IsServer())
3830 {
3831 SetIsDeploySound(true);
3832 }
3833 super.OnPlacementComplete(player, position, orientation);
3834 }
void SetIsDeploySound(bool is_deploy_sound)
Definition ItemBase.c:4334

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

◆ OnPlacementStarted()

override void OnPlacementStarted ( Man player)
inlineprotected
3817 {
3818 super.OnPlacementStarted(player);
3819
3820 SetTakeable(false);
3821 }
override void SetTakeable(bool pState)
Definition ItemBase.c:4261

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

◆ OnQuantityChanged()

void OnQuantityChanged ( float delta)
inlineprotected

Called on server side when this item's quantity is changed. Call super.OnQuantityChanged(); first when overriding this event.

1992 {
1993 SetWeightDirty();
1994 ItemBase parent = ItemBase.Cast(GetHierarchyParent());
1995
1996 if (parent)
1997 parent.OnAttachmentQuantityChangedEx(this, delta);
1998
1999 if (IsLiquidContainer())
2000 {
2001 if (GetQuantityNormalized() <= 0.0)
2002 {
2004 }
2005 else if (GetLiquidType() == LIQUID_NONE)
2006 {
2007 ErrorEx("Undefined liquid type quantity changed, please define liquid type first! Using init value.",ErrorExSeverity.INFO);
2009 }
2010 }
2011
2012 }
ErrorExSeverity
Definition EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, GetLiquidType(), GetLiquidTypeInit(), GetQuantityNormalized(), IsLiquidContainer(), LIQUID_NONE и SetLiquidType().

◆ OnRightClick()

override void OnRightClick ( )
inlineprotected
2065 {
2066 super.OnRightClick();
2067
2068 if (CanBeSplit() && !GetDayZGame().IsLeftCtrlDown() && !GetGame().GetPlayer().GetInventory().HasInventoryReservation(this,null))
2069 {
2070 if (GetGame().IsClient())
2071 {
2073 {
2074 vector m4[4];
2076
2077 EntityAI root = GetHierarchyRoot();
2078
2080 if (!player.GetInventory().FindFirstFreeLocationForNewEntity(GetType(), FindInventoryLocationType.CARGO, dst))
2081 {
2082 if (root)
2083 {
2084 root.GetTransform(m4);
2085 dst.SetGround(this, m4);
2086 }
2087 else
2088 GetInventory().GetCurrentInventoryLocation(dst);
2089 }
2090 else
2091 {
2092 dst.SetCargo(dst.GetParent(), this, dst.GetIdx(), dst.GetRow(), dst.GetCol(), dst.GetFlip());
2093 if (GetGame().GetPlayer().GetInventory().HasInventoryReservation(null, dst))
2094 {
2095 if (root)
2096 {
2097 root.GetTransform(m4);
2098 dst.SetGround(this, m4);
2099 }
2100 else
2101 GetInventory().GetCurrentInventoryLocation(dst);
2102 }
2103 else
2104 {
2105 GetGame().GetPlayer().GetInventory().AddInventoryReservationEx(null, dst, GameInventory.c_InventoryReservationTimeoutShortMS);
2106 }
2107 }
2108
2111 ctx.Write(4);
2112 ItemBase thiz = this; // @NOTE: workaround for correct serialization
2113 ctx.Write(thiz);
2114 dst.WriteToContext(ctx);
2115 ctx.Write(true); // dummy
2116 ctx.Send();
2117 }
2118 }
2119 else if (!GetGame().IsMultiplayer())
2120 {
2122 }
2123 }
2124 }
DayZGame GetDayZGame()
Definition DayZGame.c:3817
override bool CanBeSplit()
Definition ItemBase.c:1591
void SplitItem(PlayerBase player)
Definition ItemBase.c:1955

Перекрестные ссылки GameInventory::c_InventoryReservationTimeoutShortMS, ItemBase::CanBeSplit(), ScriptInputUserData::CanStoreInputUserData(), GetDayZGame(), GetGame(), GetPlayer(), GetType(), INPUT_UDT_ITEM_MANIPULATION и SplitItem().

◆ OnRPC()

override void OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
inlineprotected
2703 {
2704 //Debug.Log("OnRPC called");
2705 super.OnRPC(sender, rpc_type,ctx);
2706
2707 //Play soundset for attachment locking (ActionLockAttachment.c)
2708 switch (rpc_type)
2709 {
2710 #ifndef SERVER
2711 case ERPCs.RPC_SOUND_LOCK_ATTACH:
2713
2714 if (!ctx.Read(p))
2715 return;
2716
2717 bool play = p.param1;
2718 string soundSet = p.param2;
2719
2720 if (play)
2721 {
2722 if (m_LockingSound)
2723 {
2724 if (!m_LockingSound.IsSoundPlaying())
2725 {
2727 }
2728 }
2729 else
2730 {
2732 }
2733 }
2734 else
2735 {
2737 }
2738
2739 break;
2740 #endif
2741
2742 }
2743
2744 if (GetWrittenNoteData())
2745 {
2747 }
2748 }
ERPCs
Definition ERPCs.c:2
WrittenNoteData GetWrittenNoteData()
Definition ItemBase.c:4465
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Definition EffectManager.c:169
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Definition WrittenNoteData.c:13

Перекрестные ссылки SEffectManager::DestroyEffect(), GetPosition, ItemBase::GetWrittenNoteData(), EffectSound::IsSoundPlaying(), m_LockingSound и SEffectManager::PlaySound().

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected
3003 {
3004 m_IsStoreLoad = true;
3006 {
3007 m_FixDamageSystemInit = true;
3008 }
3009
3010 if (!super.OnStoreLoad(ctx, version))
3011 {
3012 m_IsStoreLoad = false;
3013 return false;
3014 }
3015
3016 if (version >= 114)
3017 {
3019
3020 if (!ctx.Read(hasQuickBarIndexSaved))
3021 {
3022 m_IsStoreLoad = false;
3023 return false;
3024 }
3025
3027 {
3028 int itmQBIndex;
3029
3030 //Load quickbar item bind
3031 if (!ctx.Read(itmQBIndex))
3032 {
3033 m_IsStoreLoad = false;
3034 return false;
3035 }
3036
3037 PlayerBase parentPlayer = PlayerBase.Cast(GetHierarchyRootPlayer());
3038 if (itmQBIndex != -1 && parentPlayer)
3039 parentPlayer.SetLoadedQuickBarItemBind(this, itmQBIndex);
3040 }
3041 }
3042 else
3043 {
3044 // Backup of how it used to be
3046 int itemQBIndex;
3047 if (version == int.MAX)
3048 {
3049 if (!ctx.Read(itemQBIndex))
3050 {
3051 m_IsStoreLoad = false;
3052 return false;
3053 }
3054 }
3055 else if (Class.CastTo(player, GetHierarchyRootPlayer()))
3056 {
3057 //Load quickbar item bind
3058 if (!ctx.Read(itemQBIndex))
3059 {
3060 m_IsStoreLoad = false;
3061 return false;
3062 }
3063 if (itemQBIndex != -1 && player)
3064 player.SetLoadedQuickBarItemBind(this,itemQBIndex);
3065 }
3066 }
3067
3068 if (version < 140)
3069 {
3070 // variable management system
3071 if (!LoadVariables(ctx, version))
3072 {
3073 m_IsStoreLoad = false;
3074 return false;
3075 }
3076 }
3077
3078 //agent trasmission system
3079 if (!LoadAgents(ctx, version))
3080 {
3081 m_IsStoreLoad = false;
3082 return false;
3083 }
3084 if (version >= 132)
3085 {
3087 if (raib)
3088 {
3089 if (!raib.OnStoreLoad(ctx,version))
3090 {
3091 m_IsStoreLoad = false;
3092 return false;
3093 }
3094 }
3095 }
3096
3097 m_IsStoreLoad = false;
3098 return true;
3099 }
const int MAX
Definition EnConvert.c:27
bool LoadAgents(ParamsReadContext ctx, int version)
Definition ItemBase.c:3933
int GetDamageSystemVersionChange()
Re-sets DamageSystem changes.
Definition ItemBase.c:743
Definition RemotelyActivatedItemBehaviour.c:2

Перекрестные ссылки Class::CastTo(), ItemBase::GetDamageSystemVersionChange(), GetRemotelyActivatedItemBehaviour(), LoadAgents(), m_FixDamageSystemInit, m_IsStoreLoad и MAX.

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected
3104 {
3105 super.OnStoreSave(ctx);
3106
3108 if (PlayerBase.CastTo(player,GetHierarchyRootPlayer()))
3109 {
3110 ctx.Write(true); // Keep track of if we should actually read this in or not
3111 //Save quickbar item bind
3112 int itemQBIndex = -1;
3113 itemQBIndex = player.FindQuickBarEntityIndex(this);
3114 ctx.Write(itemQBIndex);
3115 }
3116 else
3117 {
3118 ctx.Write(false); // Keep track of if we should actually read this in or not
3119 }
3120
3121 SaveAgents(ctx);//agent trasmission system
3122
3124 if (raib)
3125 {
3126 raib.OnStoreSave(ctx);
3127 }
3128 }
void SaveAgents(ParamsWriteContext ctx)
Definition ItemBase.c:3940

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

◆ OnSyncVariables()

void OnSyncVariables ( ParamsReadContext ctx)
inlineprotected

DEPRECATED (most likely)

2767 {
2768 //Debug.Log("OnSyncVariables called for item: "+ ToString(this.GetType()),"varSync");
2769 //read the flags
2770 int varFlags;
2771 if (!ctx.Read(varFlags))
2772 return;
2773
2775 {
2777 }
2778 }
override bool ReadVarsFromCTX(ParamsReadContext ctx, int version=-1)
Definition ItemBase.c:2911
Definition UtilityClasses.c:2
static const int FLOAT
Definition UtilityClasses.c:4

Перекрестные ссылки ItemVariableFlags::FLOAT и ReadVarsFromCTX().

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
inlineprotected
3168 {
3169 if (m_Initialized)
3170 {
3171 #ifdef PLATFORM_CONSOLE
3172 //bruteforce it is
3173 if (IsSplitable())
3174 {
3175 UIScriptedMenu menu = GetGame().GetUIManager().FindMenu(MENU_INVENTORY);
3176 if (menu)
3177 {
3178 menu.Refresh();
3179 }
3180 }
3181 #endif
3182 }
3183
3185 {
3187 }
3188
3190 {
3192 }
3193
3194 if (IsDeploySound())
3195 {
3197 }
3198
3200 {
3201 PlayImpactSound(m_ConfigWeight, m_ImpactSpeed, m_ImpactSoundSurfaceHash);
3202 m_WantPlayImpactSound = false;
3203 }
3204
3206 {
3207 SetWeightDirty();
3209 }
3210 if (m_VarWet != m_VarWetPrev)
3211 {
3214 }
3215
3216 super.OnVariablesSynchronized();
3217 }
bool m_Initialized
Definition UiHintPanel.c:317
void PlayDeploySound()
Definition ItemBase.c:4365
override void OnWetChanged(float newVal, float oldVal)
Definition ItemBase.c:3610
float m_VarWetPrev
Definition ItemBase.c:39
void StopDeployLoopSoundEx()
Definition ItemBase.c:4356
bool IsDeploySound()
Definition ItemBase.c:4339
bool CanPlayDeployLoopSound()
Definition ItemBase.c:4401
void PlayDeployLoopSoundEx()
Definition ItemBase.c:4344
float m_VarQuantityPrev
Definition ItemBase.c:30
Definition DayZGame.c:64
const int MENU_INVENTORY
Definition constants.c:178
proto native bool dBodyIsDynamic(notnull IEntity ent)

Перекрестные ссылки CanPlayDeployLoopSound(), dBodyIsDynamic(), GetGame(), IsDeploySound(), IsSplitable(), m_DeployLoopSoundEx, m_ImpactSoundSurfaceHash, m_ImpactSpeed, m_Initialized, m_VarQuantity, m_VarQuantityPrev, m_VarWet, m_VarWetPrev, m_WantPlayImpactSound, MENU_INVENTORY, OnWetChanged(), PlayDeployLoopSoundEx(), PlayDeploySound() и StopDeployLoopSoundEx().

◆ OnWasAttached()

override void OnWasAttached ( EntityAI parent,
int slot_id )
inlineprotected
1391 {
1392 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(this, {Bolt_Base});
1393
1394 super.OnWasAttached(parent, slot_id);
1395
1396 if (HasQuantity())
1397 UpdateNetSyncVariableFloat("m_VarQuantity", GetQuantityMin(), m_VarQuantityMax);
1398
1400 }
void PlayAttachSound(string slot_type)
Plays sound on item attach. Be advised, the config structure may slightly change in 1....
Definition ItemBase.c:4407
static proto native owned string GetSlotName(int id)
converts slot_id to string

Перекрестные ссылки GetQuantityMin(), InventorySlots::GetSlotName(), HasQuantity(), m_VarQuantityMax и PlayAttachSound().

◆ OnWasDetached()

override void OnWasDetached ( EntityAI parent,
int slot_id )
inlineprotected
1403 {
1404 super.OnWasDetached(parent, slot_id);
1405
1406 if (HasQuantity())
1407 UpdateNetSyncVariableFloat("m_VarQuantity", GetQuantityMin(), m_VarQuantityMax);
1408 }

Перекрестные ссылки GetQuantityMin(), HasQuantity() и m_VarQuantityMax.

◆ OnWetChanged()

override void OnWetChanged ( float newVal,
float oldVal )
inlineprotected
3611 {
3612 EWetnessLevel newLevel = GetWetLevelInternal(newVal);
3613 EWetnessLevel oldLevel = GetWetLevelInternal(oldVal);
3614 if (newLevel != oldLevel)
3615 {
3617 }
3618 }
EWetnessLevel
Definition EntityAI.c:2
override void OnWetLevelChanged(EWetnessLevel newLevel, EWetnessLevel oldLevel)
Definition ItemBase.c:3620

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

◆ OnWetLevelChanged()

override void OnWetLevelChanged ( EWetnessLevel newLevel,
EWetnessLevel oldLevel )
inlineprotected
3621 {
3622 SetWeightDirty();
3623 }

◆ Open()

void Open ( )
protected

Implementations only.

◆ OverrideActionAnimation()

void OverrideActionAnimation ( typename action ,
int commandUID,
int stanceMask = -1,
int commandUIDProne = -1 )
inlineprotected
383 {
385 overrideData.m_CommandUID = commandUID;
386 overrideData.m_CommandUIDProne = commandUIDProne;
387 overrideData.m_StanceMask = stanceMask;
388
390 if (!actionMap) // create new map of action > overidables map
391 {
394 }
395
396 actionMap.Insert(this.Type(), overrideData); // insert item -> overrides
397
398 }
map< typename, ref ActionOverrideData > TActionAnimOverrideMap
Definition ItemBase.c:2
Definition ActionBase.c:22
static ref map< typename, ref TActionAnimOverrideMap > m_ItemActionOverrides
Definition ItemBase.c:18

Перекрестные ссылки m_ItemActionOverrides и Type.

◆ PairWithDevice()

bool PairWithDevice ( notnull ItemBase otherDevice)
inlineprotected
4706 {
4707 if (GetGame().IsServer())
4708 {
4711 if (!trg)
4712 {
4714 explosive = this;
4715 }
4716
4717 explosive.PairRemote(trg);
4718 trg.SetControlledDevice(explosive);
4719
4721 trg.SetPersistentPairID(persistentID);
4722 explosive.SetPersistentPairID(persistentID);
4723
4724 return true;
4725 }
4726 return false;
4727 }
Definition RemoteDetonator.c:47
static int GeneratePersistentID()
Definition RemotelyActivatedItemBehaviour.c:81

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

◆ PerformDamageSystemReinit()

void PerformDamageSystemReinit ( )
inlineprotected
4474 {
4476 GetDamageZones(zone_names);
4477 for (int i = 0; i < zone_names.Count(); i++)
4478 {
4479 SetHealthMax(zone_names.Get(i),"Health");
4480 }
4481 SetHealthMax("","Health");
4482 }

◆ PlayAttachSound()

void PlayAttachSound ( string slot_type)
inlineprotected

Plays sound on item attach. Be advised, the config structure may slightly change in 1.11 update to allow for more complex use.

4408 {
4409 if (!GetGame().IsDedicatedServer())
4410 {
4411 if (ConfigIsExisting("attachSoundSet"))
4412 {
4413 string cfg_path = "";
4414 string soundset = "";
4415 string type_name = GetType();
4416
4419 ConfigGetTextArray("attachSoundSet",cfg_soundset_array);
4420 ConfigGetTextArray("attachSoundSlot",cfg_slot_array);
4421
4422 if (cfg_soundset_array.Count() > 0 && cfg_soundset_array.Count() == cfg_slot_array.Count())
4423 {
4424 for (int i = 0; i < cfg_soundset_array.Count(); i++)
4425 {
4426 if (cfg_slot_array[i] == slot_type)
4427 {
4429 break;
4430 }
4431 }
4432 }
4433
4434 if (soundset != "")
4435 {
4437 sound.SetAutodestroy(true);
4438 }
4439 }
4440 }
4441 }
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5

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

◆ PlayBulletCasingEjectParticles()

static void PlayBulletCasingEjectParticles ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4137 {
4138 int id = muzzle_owner.GetMuzzleID();
4140
4141 if (WPOBE_array)
4142 {
4143 for (int i = 0; i < WPOBE_array.Count(); i++)
4144 {
4146
4147 if (WPOBE)
4148 {
4150 }
4151 }
4152 }
4153 }

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

◆ PlayDeployFinishSound()

void PlayDeployFinishSound ( )
inlineprotected
4378 {
4379 if (!GetGame().IsDedicatedServer() && !m_SoundDeployFinish)
4380 {
4384 else
4385 Debug.Log("null m_SoundDeployFinish from sound set: " + GetDeployFinishSoundset());
4386 }
4387 }
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Definition EffectSound.c:600
string GetDeployFinishSoundset()
EffectSound m_SoundDeployFinish
Definition ItemBase.c:137

Перекрестные ссылки ItemBase::GetDeployFinishSoundset(), GetGame(), GetPosition, Debug::Log(), m_SoundDeployFinish, SEffectManager::PlaySound() и EffectSound::SetAutodestroy().

◆ PlayDeployLoopSoundEx()

void PlayDeployLoopSoundEx ( )
inlineprotected
4345 {
4346 if (!GetGame().IsDedicatedServer() && !m_DeployLoopSoundEx)
4347 {
4351 else
4352 Debug.Log("null m_DeployLoopSoundEx from sound set: " + GetLoopDeploySoundset());
4353 }
4354 }
string GetLoopDeploySoundset()

Перекрестные ссылки GetGame(), ItemBase::GetLoopDeploySoundset(), GetPosition, Debug::Log(), m_DeployLoopSoundEx, SEffectManager::PlaySound() и EffectSound::SetAutodestroy().

◆ PlayDeploySound()

void PlayDeploySound ( )
inlineprotected
4366 {
4367 if (!GetGame().IsDedicatedServer() && !m_SoundDeploy)
4368 {
4370 if (m_SoundDeploy)
4372 else
4373 Debug.Log("null m_SoundDeploy from sound set: " + GetDeploySoundset());
4374 }
4375 }
EffectSound m_SoundDeploy
Definition ItemBase.c:136
string GetDeploySoundset()

Перекрестные ссылки ItemBase::GetDeploySoundset(), GetGame(), GetPosition, Debug::Log(), m_SoundDeploy, SEffectManager::PlaySound() и EffectSound::SetAutodestroy().

◆ PlayDetachSound()

void PlayDetachSound ( string slot_type)
inlineprotected
4444 {
4445 //TODO - evaluate if needed and devise universal config structure if so
4446 }

◆ PlayFireParticles()

static void PlayFireParticles ( ItemBase weapon,
int muzzle_index,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4117 {
4118 int id = muzzle_owner.GetMuzzleID();
4120
4121 if (WPOF_array)
4122 {
4123 for (int i = 0; i < WPOF_array.Count(); i++)
4124 {
4126
4127 if (WPOF)
4128 {
4130 }
4131 }
4132 }
4133 }

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

◆ PlayOverheatingParticles()

static void PlayOverheatingParticles ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4157 {
4158 int id = muzzle_owner.GetMuzzleID();
4159 array<ref WeaponParticlesOnOverheating> WPOOH_array = weapon.m_OnOverheatingEffect.Get(id);
4160
4161 if (WPOOH_array)
4162 {
4163 for (int i = 0; i < WPOOH_array.Count(); i++)
4164 {
4166
4167 if (WPOOH)
4168 {
4170 }
4171 }
4172 }
4173 }

◆ PlayPlaceSound()

void PlayPlaceSound ( )
inlineprotected
4390 {
4391 if (!GetGame().IsDedicatedServer() && !m_SoundPlace)
4392 {
4394 if (m_SoundPlace)
4396 else
4397 Debug.Log("null m_SoundPlace from sound set: " + GetPlaceSoundset());
4398 }
4399 }
string GetPlaceSoundset()
EffectSound m_SoundPlace
Definition ItemBase.c:135

Перекрестные ссылки GetGame(), ItemBase::GetPlaceSoundset(), GetPosition, Debug::Log(), m_SoundPlace, SEffectManager::PlaySound() и EffectSound::SetAutodestroy().

◆ PreLoadSoundAttachmentType()

void PreLoadSoundAttachmentType ( )
inlineprotected

Attachment Sound Type getting from config file.

4280 {
4281 string att_type = "None";
4282
4283 if (ConfigIsExisting("soundAttType"))
4284 {
4285 att_type = ConfigGetString("soundAttType");
4286 }
4287
4289 }

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

◆ ProcessDecay()

void ProcessDecay ( float delta,
bool hasRootAsPlayer )
inlineprotected
4566 {
4567 // this is stub, implemented on Edible_Base
4568 }

◆ ProcessItemTemperature()

void ProcessItemTemperature ( float delta,
bool hasParent,
bool hasRootAsPlayer,
ItemBase refParentIB )
inlineprotected
4529 {
4531 {
4532 float target = g_Game.GetMission().GetWorldData().GetBaseEnvTemperatureAtObject(this);
4533 if (GetTemperature() != target)
4534 {
4535 float heatPermCoef = 1.0;
4536 EntityAI ent = this;
4537 while (ent)
4538 {
4539 heatPermCoef *= ent.GetHeatPermeabilityCoef();
4540 ent = ent.GetHierarchyParent();
4541 }
4542
4544 }
4545 }
4546 }
override bool IsSelfAdjustingTemperature()
Definition AnimalBase.c:57
override bool CanHaveTemperature()
Definition FireplaceBase.c:575
ETemperatureAccessTypes
Definition TemperatureAccessConstants.c:2
const float TEMP_COEF_WORLD
Definition constants.c:900

Перекрестные ссылки CanHaveTemperature(), g_Game, ItemBase::IsSelfAdjustingTemperature() и GameConstants::TEMP_COEF_WORLD.

◆ ProcessItemWetness()

void ProcessItemWetness ( float delta,
bool hasParent,
bool hasRootAsPlayer,
ItemBase refParentIB )
inlineprotected
4504 {
4505 if (!hasRootAsPlayer)
4506 {
4507 if (refParentIB)
4508 {
4509 // parent is wet
4512 // parent has liquid inside
4513 else if ((refParentIB.GetLiquidType() != 0) && (refParentIB.GetQuantity() > 0) && (m_VarWet < m_VarWetMax))
4515 // drying
4516 else if (m_VarWet > m_VarWetMin)
4517 AddWet(-1 * delta * GetDryingIncrement("ground") * 2);
4518 }
4519 else
4520 {
4521 // drying on ground or inside non-itembase (car, ...)
4522 if (m_VarWet > m_VarWetMin)
4523 AddWet(-1 * delta * GetDryingIncrement("ground"));
4524 }
4525 }
4526 }
float GetDryingIncrement(string pIncrementName)
Definition ItemBase.c:3543
const float WETNESS_RATE_WETTING_INSIDE
Definition constants.c:870
const float WETNESS_RATE_WETTING_LIQUID
Definition constants.c:871
const float STATE_SOAKING_WET
Definition constants.c:832

Перекрестные ссылки AddWet(), GetDryingIncrement(), m_VarWet, m_VarWetMax, m_VarWetMin, GameConstants::STATE_SOAKING_WET, GameConstants::WETNESS_RATE_WETTING_INSIDE и GameConstants::WETNESS_RATE_WETTING_LIQUID.

◆ ProcessItemWetnessAndTemperature()

void ProcessItemWetnessAndTemperature ( float delta,
bool hasParent,
bool hasRootAsPlayer,
ItemBase refParentIB )
inlineprotected
4768 {
4771 }
void ProcessItemWetness(float delta, bool hasParent, bool hasRootAsPlayer, ItemBase refParentIB)
Definition ItemBase.c:4503
void ProcessItemTemperature(float delta, bool hasParent, bool hasRootAsPlayer, ItemBase refParentIB)
Definition ItemBase.c:4528

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

◆ ProcessVariables()

override void ProcessVariables ( )
inlineprotected
4590 {
4591 bool hasParent = false, hasRootAsPlayer = false;
4593
4594 bool wwtu = g_Game.IsWorldWetTempUpdateEnabled();
4595 bool foodDecay = g_Game.IsFoodDecayEnabled();
4596
4597 if (wwtu || foodDecay)
4598 {
4602
4604 {
4606
4607 if (processWetness)
4608 ProcessItemWetness(m_ElapsedSinceLastUpdate, hasParent, hasRootAsPlayer, refParentIB);
4609
4611 ProcessItemTemperature(m_ElapsedSinceLastUpdate, hasParent, hasRootAsPlayer, refParentIB);
4612
4613 if (processDecay)
4614 ProcessDecay(m_ElapsedSinceLastUpdate, hasRootAsPlayer);
4615 }
4616 }
4617 }
void ProcessDecay(float delta, bool hasRootAsPlayer)
Definition ItemBase.c:4565
bool CanHaveWetness()
Definition ItemBase.c:4583
bool CanProcessDecay()
Definition ItemBase.c:4576
bool CanDecay()
Definition ItemBase.c:4570
void HierarchyCheck(out bool hasParent, out bool hasRootAsPlayer, out ItemBase refParentIB)
Definition ItemBase.c:4548

Перекрестные ссылки CanDecay(), CanHaveTemperature(), CanHaveWetness(), CanProcessDecay(), g_Game, HierarchyCheck(), ProcessDecay(), ProcessItemTemperature() и ProcessItemWetness().

◆ ReadVarsFromCTX()

override bool ReadVarsFromCTX ( ParamsReadContext ctx,
int version = -1 )
inlineprotected
2912 {
2913 if (!super.ReadVarsFromCTX(ctx,version))
2914 return false;
2915
2916 int intValue;
2917 float value;
2918
2919 if (version < 140)
2920 {
2921 if (!ctx.Read(intValue))
2922 return false;
2923
2924 m_VariablesMask = intValue;
2925 }
2926
2927 if (m_VariablesMask & VARIABLE_QUANTITY)
2928 {
2929 if (!ctx.Read(value))
2930 return false;
2931
2932 if (IsStoreLoad())
2933 {
2935 }
2936 else
2937 {
2938 SetQuantity(value, true, false, false, false);
2939 }
2940 }
2941 //--------------------------------------------
2942 if (version < 140)
2943 {
2944 if (m_VariablesMask & VARIABLE_TEMPERATURE)
2945 {
2946 if (!ctx.Read(value))
2947 return false;
2948 SetTemperatureDirect(value);
2949 }
2950 }
2951 //--------------------------------------------
2952 if (m_VariablesMask & VARIABLE_WET)
2953 {
2954 if (!ctx.Read(value))
2955 return false;
2956 SetWet(value);
2957 }
2958 //--------------------------------------------
2959 if (m_VariablesMask & VARIABLE_LIQUIDTYPE)
2960 {
2961 if (!ctx.Read(intValue))
2962 return false;
2964 }
2965 //--------------------------------------------
2966 if (m_VariablesMask & VARIABLE_COLOR)
2967 {
2968 int r,g,b,a;
2969 if (!ctx.Read(r))
2970 return false;
2971 if (!ctx.Read(g))
2972 return false;
2973 if (!ctx.Read(b))
2974 return false;
2975 if (!ctx.Read(a))
2976 return false;
2977
2978 SetColor(r,g,b,a);
2979 }
2980 //--------------------------------------------
2981 if (m_VariablesMask & VARIABLE_CLEANNESS)
2982 {
2983 if (!ctx.Read(intValue))
2984 return false;
2986 }
2987 //--------------------------------------------
2988 if (version >= 138 && version < 140)
2989 {
2990 if (m_VariablesMask & VARIABLE_TEMPERATURE)
2991 {
2992 if (!ctx.Read(intValue))
2993 return false;
2994 SetFrozen(intValue);
2995 }
2996 }
2997
2998 return true;
2999 }
override void SetColor(int r, int g, int b, int a)
Definition ItemBase.c:3711
override bool IsStoreLoad()
Definition ItemBase.c:3637
const int VARIABLE_TEMPERATURE
Definition constants.c:607

Перекрестные ссылки IsStoreLoad(), SetCleanness(), SetColor(), SetLiquidType(), SetQuantity(), SetStoreLoadedQuantity(), SetWet(), VARIABLE_CLEANNESS, VARIABLE_COLOR, VARIABLE_LIQUIDTYPE, VARIABLE_QUANTITY, VARIABLE_TEMPERATURE и VARIABLE_WET.

◆ RefreshPhysics()

void RefreshPhysics ( )
protected

◆ RegisterOverheatingParticle()

void RegisterOverheatingParticle ( Particle p,
float min_heat_coef,
float max_heat_coef,
int particle_id,
Object parent,
vector local_pos,
vector local_ori )
inlineprotected
617 {
620
622 OP.RegisterParticle(p);
623 OP.SetOverheatingLimitMin(min_heat_coef);
624 OP.SetOverheatingLimitMax(max_heat_coef);
625 OP.SetParticleParams(particle_id, parent, local_pos, local_ori);
626
628 }
int particle_id
Definition SmokeSimulation.c:28

Перекрестные ссылки m_OverheatingParticles и particle_id.

◆ RemoveAction()

void RemoveAction ( typename actionName )
inlineprotected
368 {
370 ActionBase action = player.GetActionManager().GetAction(actionName);
371 typename ai = action.GetInputType();
373
374 if (action_array)
375 {
376 action_array.RemoveItem(action);
377 }
378 }

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

◆ RemoveAgent()

override void RemoveAgent ( int agent_id)
inlineprotected
3854 {
3856 {
3858 }
3859 }
bool ContainsAgent(int agent_id)
Definition ItemBase.c:3840

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

◆ RemoveAllAgents()

override void RemoveAllAgents ( )
inlineprotected
3863 {
3864 m_AttachedAgents = 0;
3865 }

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

◆ RemoveAllAgentsExcept()

override void RemoveAllAgentsExcept ( int agents_to_keep_mask)
inlineprotected

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

◆ RemoveDebugActionsMask()

static void RemoveDebugActionsMask ( int mask)
inlinestaticprotected
812 {
813 ItemBase.m_DebugActionsMask &= ~mask;
814 }

◆ RemoveLightSourceItem()

void RemoveLightSourceItem ( )
inlineprotected
4684 {
4686 }

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

◆ Repair()

bool Repair ( PlayerBase player,
ItemBase item_repair_kit,
float specialty_weight )
inlineprotected

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

◆ SaveAgents()

void SaveAgents ( ParamsWriteContext ctx)
inlineprotected
3941 {
3942
3943 ctx.Write(m_AttachedAgents);
3944 }

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

◆ SerializeNumericalVars()

override void SerializeNumericalVars ( array< float > floats_out)
inlineprotected
2781 {
2782 //some variables handled on EntityAI level already!
2783 super.SerializeNumericalVars(floats_out);
2784
2785 // the order of serialization must be the same as the order of de-serialization
2786 //--------------------------------------------
2787 if (IsVariableSet(VARIABLE_QUANTITY))
2788 {
2789 floats_out.Insert(m_VarQuantity);
2790 }
2791 //--------------------------------------------
2792 if (IsVariableSet(VARIABLE_WET))
2793 {
2794 floats_out.Insert(m_VarWet);
2795 }
2796 //--------------------------------------------
2797 if (IsVariableSet(VARIABLE_LIQUIDTYPE))
2798 {
2800 }
2801 //--------------------------------------------
2802 if (IsVariableSet(VARIABLE_COLOR))
2803 {
2808 }
2809 //--------------------------------------------
2810 if (IsVariableSet(VARIABLE_CLEANNESS))
2811 {
2812 floats_out.Insert(m_Cleanness);
2813 }
2814 }

Перекрестные ссылки m_Cleanness, m_ColorComponentA, m_ColorComponentB, m_ColorComponentG, m_ColorComponentR, m_VarLiquidType, m_VarQuantity, m_VarWet, VARIABLE_CLEANNESS, VARIABLE_COLOR, VARIABLE_LIQUIDTYPE, VARIABLE_QUANTITY и VARIABLE_WET.

◆ SetActionAnimOverrides()

void SetActionAnimOverrides ( )
protected

◆ SetActions()

void SetActions ( )
inlineprotected
319 {
323 AddAction(ActionDropItem);
325 }
Definition ActionAttachWithSwich.c:2
Definition ActionTakeItem.c:7
Definition ActionTakeItemToHands.c:2
Definition ActionWorldCraft.c:33
void AddAction(typename actionName)
Definition ItemBase.c:329

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

◆ SetCanBeMovedOverride()

void SetCanBeMovedOverride ( bool setting)
inlineprotected
2600 {
2602 }

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

◆ SetCEBasedQuantity()

void SetCEBasedQuantity ( )
inlineprotected
830 {
831 if (GetEconomyProfile())
832 {
833 float q_max = GetEconomyProfile().GetQuantityMax();
834 if (q_max > 0)
835 {
836 float q_min = GetEconomyProfile().GetQuantityMin();
838
839 if (HasComponent(COMP_TYPE_ENERGY_MANAGER))//more direct access for speed
840 {
841 ComponentEnergyManager comp = GetCompEM();
842 if (comp && (comp.GetEnergyMaxPristine() || comp.GetEnergyAtSpawn()))//checking for a potential for energy, we need to check both values, as both are optional, only when both are set to 0, we know the item can't have energy
843 {
844 comp.SetEnergy0To1(quantity_randomized);
845 }
846 }
847 else if (HasQuantity())
848 {
850 //PrintString("<==> Normalized quantity for item: "+ GetType()+", qmin:"+q_min.ToString()+"; qmax:"+q_max.ToString()+";quantity:" +quantity_randomized.ToString());
851 }
852
853 }
854 }
855 }
Definition ComponentEnergyManager.c:19
const int COMP_TYPE_ENERGY_MANAGER
Definition Component.c:9
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

Перекрестные ссылки COMP_TYPE_ENERGY_MANAGER, HasQuantity(), Math::RandomFloatInclusive() и SetQuantityNormalized().

◆ SetCleanness()

override void SetCleanness ( int value,
bool allow_client = false )
inlineprotected
3673 {
3674 if (!IsServerCheck(allow_client))
3675 return;
3676
3678
3680
3682 SetVariableMask(VARIABLE_CLEANNESS);
3683 }
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'.

Перекрестные ссылки Math::Clamp(), m_Cleanness, m_CleannessMax, m_CleannessMin и VARIABLE_CLEANNESS.

◆ SetColor()

override void SetColor ( int r,
int g,
int b,
int a )
inlineprotected
3712 {
3717 SetVariableMask(VARIABLE_COLOR);
3718 }

Перекрестные ссылки m_ColorComponentA, m_ColorComponentB, m_ColorComponentG, m_ColorComponentR и VARIABLE_COLOR.

◆ SetDebugActionsMask()

static void SetDebugActionsMask ( int mask)
inlinestaticprotected
802 {
803 ItemBase.m_DebugActionsMask = mask;
804 }

◆ SetIsBeingPlaced()

void SetIsBeingPlaced ( bool is_being_placed)
inlineprotected
991 {
993 if (!is_being_placed)
995 SetSynchDirty();
996 }
void OnEndPlacement()
Definition ItemBase.c:999

Перекрестные ссылки m_IsBeingPlaced и ItemBase::OnEndPlacement().

◆ SetIsDeploySound()

void SetIsDeploySound ( bool is_deploy_sound)
inlineprotected
4335 {
4337 }

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

◆ SetIsHologram()

void SetIsHologram ( bool is_hologram)
inlineprotected
1022 {
1024 SetSynchDirty();
1025 }

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

◆ SetIsPlaceSound()

void SetIsPlaceSound ( bool is_place_sound)
inlineprotected
4325 {
4327 }

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

◆ SetLiquidType()

override void SetLiquidType ( int value,
bool allow_client = false )
inlineprotected
3748 {
3749 if (!IsServerCheck(allow_client))
3750 return;
3751
3752 int old = m_VarLiquidType;
3755 SetVariableMask(VARIABLE_LIQUIDTYPE);
3756 }
void OnLiquidTypeChanged(int oldType, int newType)
Definition ItemBase.c:3768

Перекрестные ссылки m_VarLiquidType, OnLiquidTypeChanged() и VARIABLE_LIQUIDTYPE.

◆ SetQuantity()

override bool SetQuantity ( float value,
bool destroy_config = true,
bool destroy_forced = false,
bool allow_client = false,
bool clamp_to_stack_max = true )
inlineprotected

Set item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity reaches varQuantityMin or lower and the item config contains the varQuantityDestroyOnMin = true entry, the item gets destroyed. destroy_forced = true means item gets destroyed when quantity reaches varQuantityMin or lower regardless of config setting, returns true if the item gets deleted.

3223 {
3224 if (!IsServerCheck(allow_client))
3225 return false;
3226
3227 if (!HasQuantity())
3228 return false;
3229
3230 float min = GetQuantityMin();
3231 float max = GetQuantityMax();
3232
3233 if (value <= (min + 0.001))
3234 value = min;
3235
3236 if (value == min)
3237 {
3238 if (destroy_config)
3239 {
3240 bool dstr = ConfigGetBool("varQuantityDestroyOnMin");
3241 if (dstr)
3242 {
3244 this.Delete();
3245 return true;
3246 }
3247 }
3248 else if (destroy_forced)
3249 {
3251 this.Delete();
3252 return true;
3253 }
3254 // we get here if destroy_config IS true AND dstr(config destroy param) IS false;
3255 RemoveAllAgents();//we remove all agents when we got to the min value, but the item is not getting deleted
3256 }
3257
3258 float delta = m_VarQuantity;
3260
3261 if (GetStoreLoadedQuantity() == float.LOWEST)//any other value means we are setting quantity from storage
3262 {
3264
3265 if (delta)
3267 }
3268
3269 SetVariableMask(VARIABLE_QUANTITY);
3270
3271 return false;
3272 }
override void RemoveAllAgents()
Definition ItemBase.c:3862
void OnQuantityChanged(float delta)
Called on server side when this item's quantity is changed. Call super.OnQuantityChanged(); first whe...
Definition ItemBase.c:1991

Перекрестные ссылки Math::Clamp(), GetQuantityMax(), GetQuantityMin(), GetStoreLoadedQuantity(), HasQuantity(), LOWEST, m_VarQuantity, OnQuantityChanged(), RemoveAllAgents() и VARIABLE_QUANTITY.

◆ SetQuantityMax()

void SetQuantityMax ( )
inlineprotected
3282 {
3283 float max = GetQuantityMax();
3285 }

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

◆ SetQuantityNormalized()

void SetQuantityNormalized ( float value,
bool destroy_config = true,
bool destroy_forced = false )
inlineprotected

Sets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config(for Min 0 and Max 5000, setting 0.5 will result in value 2500)

3295 {
3296 float value_clamped = Math.Clamp(value, 0, 1);//just to make sure
3299 }

Перекрестные ссылки Math::Clamp(), GetQuantityMax(), GetQuantityMin(), Math::Lerp(), Math::Round() и SetQuantity().

◆ SetQuantityToMinimum()

override void SetQuantityToMinimum ( )
inlineprotected
3288 {
3289 float min = GetQuantityMin();
3291 }

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

◆ SetResultOfSplit()

void SetResultOfSplit ( bool value)
inlineprotected
2199 {
2201 }

◆ SetStoreLoad()

override void SetStoreLoad ( bool value)
inlineprotected
3633 {
3635 }

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

◆ SetStoreLoadedQuantity()

override void SetStoreLoadedQuantity ( float value)
inlineprotected
3643 {
3645 }

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

◆ SetTakeable()

override void SetTakeable ( bool pState)
inlineprotected
4262 {
4264 SetSynchDirty();
4265 }

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

◆ SetWet()

override void SetWet ( float value,
bool allow_client = false )
inlineprotected
3562 {
3563 if (!IsServerCheck(allow_client))
3564 return;
3565
3566 float min = GetWetMin();
3567 float max = GetWetMax();
3568
3569 float previousValue = m_VarWet;
3570
3572
3573 if (previousValue != m_VarWet)
3574 {
3575 SetVariableMask(VARIABLE_WET);
3577 }
3578 }

Перекрестные ссылки Math::Clamp(), GetWetMax(), GetWetMin(), m_VarWet, OnWetChanged() и VARIABLE_WET.

◆ SetWetMax()

override void SetWetMax ( )
inlineprotected
3586 {
3588 }

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

◆ SetZoneDamageCEInit()

void SetZoneDamageCEInit ( )
inlineprotected

Sets zone damages to match randomized global health set by CE (CE spawn only)

4486 {
4487 float global_health = GetHealth01("","Health");
4489 GetDamageZones(zones);
4490 //set damage of all zones to match global health level
4491 for (int i = 0; i < zones.Count(); i++)
4492 {
4493 SetHealth01(zones.Get(i),"Health",global_health);
4494 }
4495 }

◆ SoundSynchRemote()

void SoundSynchRemote ( )
inlineprotected
4308 {
4309 m_IsSoundSynchRemote = true;
4310
4311 SetSynchDirty();
4312 }

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

◆ SoundSynchRemoteReset()

void SoundSynchRemoteReset ( )
inlineprotected
4301 {
4302 m_IsSoundSynchRemote = false;
4303
4304 SetSynchDirty();
4305 }

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

◆ SplitIntoStackMax()

void SplitIntoStackMax ( EntityAI destination_entity,
int slot_id,
PlayerBase player )
inlineprotected
1623 {
1624 float split_quantity_new;
1626 float quantity = GetQuantity();
1629
1631 {
1632 if (stack_max <= GetQuantity())
1634 else
1636
1637 new_item = ItemBase.Cast(destination_entity.GetInventory().CreateAttachmentEx(this.GetType(), slot_id));
1638 if (new_item)
1639 {
1640 new_item.SetResultOfSplit(true);
1641 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1643 new_item.SetQuantity(split_quantity_new);
1644 }
1645 }
1646 else if (destination_entity && slot_id == -1)
1647 {
1648 if (quantity > stack_max)
1650 else
1652
1653 if (destination_entity.GetInventory().FindFreeLocationFor(this, FindInventoryLocationType.ANY, loc))
1654 {
1655 Object o = destination_entity.GetInventory().LocationCreateEntity(loc, GetType(), ECE_IN_INVENTORY, RF_DEFAULT);
1656 new_item = ItemBase.Cast(o);
1657 }
1658
1659 if (new_item)
1660 {
1661 new_item.SetResultOfSplit(true);
1662 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1664 new_item.SetQuantity(split_quantity_new);
1665 }
1666 }
1667 else
1668 {
1669 if (stack_max != 0)
1670 {
1671 if (stack_max < GetQuantity())
1672 {
1674 }
1675
1676 if (split_quantity_new == 0)
1677 {
1678 if (!GetGame().IsMultiplayer())
1679 player.PhysicalPredictiveDropItem(this);
1680 else
1681 player.ServerDropEntity(this);
1682 return;
1683 }
1684
1685 new_item = ItemBase.Cast(GetGame().CreateObjectEx(GetType(), player.GetWorldPosition(), ECE_PLACE_ON_SURFACE));
1686
1687 if (new_item)
1688 {
1689 new_item.SetResultOfSplit(true);
1690 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1692 new_item.SetQuantity(stack_max);
1693 new_item.PlaceOnSurface();
1694 }
1695 }
1696 }
1697 }
const int ECE_PLACE_ON_SURFACE
Definition CentralEconomy.c:37
const int ECE_IN_INVENTORY
Definition CentralEconomy.c:36
const int RF_DEFAULT
Definition CentralEconomy.c:65
static proto native bool IsSlotIdValid(int slotId)
verifies existence of the slot id
Definition ObjectTyped.c:2

Перекрестные ссылки AddQuantity(), ECE_IN_INVENTORY, ECE_PLACE_ON_SURFACE, GetGame(), GetQuantity(), GetTargetQuantityMax(), GetType(), InventorySlots::IsSlotIdValid(), RF_DEFAULT и SetQuantity().

◆ SplitIntoStackMaxCargo()

void SplitIntoStackMaxCargo ( EntityAI destination_entity,
int idx,
int row,
int col )
inlineprotected
1850 {
1851 float quantity = GetQuantity();
1852 float split_quantity_new;
1855 {
1857 if (quantity > stackable)
1859 else
1861
1862 new_item = ItemBase.Cast(destination_entity.GetInventory().CreateEntityInCargoEx(this.GetType(), idx, row, col, false));
1863 if (new_item)
1864 {
1865 new_item.SetResultOfSplit(true);
1866 MiscGameplayFunctions.TransferItemProperties(this,new_item);
1868 new_item.SetQuantity(split_quantity_new);
1869 }
1870 }
1871 }

Перекрестные ссылки AddQuantity(), GetQuantity() и GetTargetQuantityMax().

◆ SplitIntoStackMaxCargoClient()

void SplitIntoStackMaxCargoClient ( EntityAI destination_entity,
int idx,
int row,
int col )
inlineprotected
1789 {
1790 if (GetGame().IsClient())
1791 {
1793 {
1796 ctx.Write(2);
1797 ItemBase dummy = this; // @NOTE: workaround for correct serialization
1798 ctx.Write(dummy);
1799 ctx.Write(destination_entity);
1800 ctx.Write(true);
1801 ctx.Write(idx);
1802 ctx.Write(row);
1803 ctx.Write(col);
1804 ctx.Send();
1805 }
1806 }
1807 else if (!GetGame().IsMultiplayer())
1808 {
1810 }
1811 }
void SplitIntoStackMaxCargo(EntityAI destination_entity, int idx, int row, int col)
Definition ItemBase.c:1849

Перекрестные ссылки ScriptInputUserData::CanStoreInputUserData(), GetGame(), INPUT_UDT_ITEM_MANIPULATION и SplitIntoStackMaxCargo().

◆ SplitIntoStackMaxClient()

override void SplitIntoStackMaxClient ( EntityAI destination_entity,
int slot_id )
inlineprotected
1600 {
1601 if (GetGame().IsClient())
1602 {
1604 {
1607 ctx.Write(1);
1608 ItemBase i1 = this; // @NOTE: workaround for correct serialization
1609 ctx.Write(i1);
1610 ctx.Write(destination_entity);
1611 ctx.Write(true);
1612 ctx.Write(slot_id);
1613 ctx.Send();
1614 }
1615 }
1616 else if (!GetGame().IsMultiplayer())
1617 {
1619 }
1620 }
void SplitIntoStackMax(EntityAI destination_entity, int slot_id, PlayerBase player)
Definition ItemBase.c:1622

Перекрестные ссылки ScriptInputUserData::CanStoreInputUserData(), GetGame(), GetPlayer(), INPUT_UDT_ITEM_MANIPULATION и SplitIntoStackMax().

◆ SplitIntoStackMaxEx()

override void SplitIntoStackMaxEx ( EntityAI destination_entity,
int slot_id )
inlineprotected
1700 {
1701 float split_quantity_new;
1703 float quantity = GetQuantity();
1706
1708 {
1709 if (stack_max <= GetQuantity())
1711 else
1713
1714 new_item = ItemBase.Cast(destination_entity.GetInventory().CreateAttachmentEx(this.GetType(), slot_id));
1715 if (new_item)
1716 {
1717 new_item.SetResultOfSplit(true);
1718 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1720 new_item.SetQuantity(split_quantity_new);
1721 }
1722 }
1723 else if (destination_entity && slot_id == -1)
1724 {
1725 if (quantity > stack_max)
1727 else
1729
1730 if (destination_entity.GetInventory().FindFreeLocationFor(this, FindInventoryLocationType.ANY, loc))
1731 {
1732 Object o = destination_entity.GetInventory().LocationCreateEntity(loc, GetType(), ECE_IN_INVENTORY, RF_DEFAULT);
1733 new_item = ItemBase.Cast(o);
1734 }
1735
1736 if (new_item)
1737 {
1738 new_item.SetResultOfSplit(true);
1739 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1741 new_item.SetQuantity(split_quantity_new);
1742 }
1743 }
1744 else
1745 {
1746 if (stack_max != 0)
1747 {
1748 if (stack_max < GetQuantity())
1749 {
1751 }
1752
1753 new_item = ItemBase.Cast(GetGame().CreateObjectEx(GetType(),GetWorldPosition(), ECE_PLACE_ON_SURFACE));
1754
1755 if (new_item)
1756 {
1757 new_item.SetResultOfSplit(true);
1758 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1760 new_item.SetQuantity(stack_max);
1761 new_item.PlaceOnSurface();
1762 }
1763 }
1764 }
1765 }

Перекрестные ссылки AddQuantity(), ECE_IN_INVENTORY, ECE_PLACE_ON_SURFACE, GetGame(), GetQuantity(), GetTargetQuantityMax(), GetType(), InventorySlots::IsSlotIdValid(), RF_DEFAULT и SetQuantity().

◆ SplitIntoStackMaxHands()

void SplitIntoStackMaxHands ( PlayerBase player)
inlineprotected
1898 {
1899 float quantity = GetQuantity();
1900 float split_quantity_new;
1902 if (player)
1903 {
1905 if (quantity > stackable)
1907 else
1909
1910 EntityAI in_hands = player.GetHumanInventory().CreateInHands(this.GetType());
1911 new_item = ItemBase.Cast(in_hands);
1912 if (new_item)
1913 {
1914 new_item.SetResultOfSplit(true);
1915 MiscGameplayFunctions.TransferItemProperties(this,new_item);
1917 new_item.SetQuantity(split_quantity_new);
1918 }
1919 }
1920 }

Перекрестные ссылки AddQuantity(), GetQuantity(), GetTargetQuantityMax() и GetType().

◆ SplitIntoStackMaxHandsClient()

void SplitIntoStackMaxHandsClient ( PlayerBase player)
inlineprotected
1874 {
1875 if (GetGame().IsClient())
1876 {
1878 {
1881 ctx.Write(3);
1882 ItemBase i1 = this; // @NOTE: workaround for correct serialization
1883 ctx.Write(i1);
1885 ctx.Write(destination_entity);
1886 ctx.Write(true);
1887 ctx.Write(0);
1888 ctx.Send();
1889 }
1890 }
1891 else if (!GetGame().IsMultiplayer())
1892 {
1894 }
1895 }
void SplitIntoStackMaxHands(PlayerBase player)
Definition ItemBase.c:1897

Перекрестные ссылки ScriptInputUserData::CanStoreInputUserData(), GetGame(), INPUT_UDT_ITEM_MANIPULATION и SplitIntoStackMaxHands().

◆ SplitIntoStackMaxToInventoryLocation()

void SplitIntoStackMaxToInventoryLocation ( notnull InventoryLocation dst)
inlineprotected
1814 {
1816 }
ItemBase SplitIntoStackMaxToInventoryLocationEx(notnull InventoryLocation dst)
Definition ItemBase.c:1818

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

◆ SplitIntoStackMaxToInventoryLocationClient()

void SplitIntoStackMaxToInventoryLocationClient ( notnull InventoryLocation dst)
inlineprotected
1768 {
1769 if (GetGame().IsClient())
1770 {
1772 {
1775 ctx.Write(4);
1776 ItemBase thiz = this; // @NOTE: workaround for correct serialization
1777 ctx.Write(thiz);
1778 dst.WriteToContext(ctx);
1779 ctx.Send();
1780 }
1781 }
1782 else if (!GetGame().IsMultiplayer())
1783 {
1785 }
1786 }
void SplitIntoStackMaxToInventoryLocation(notnull InventoryLocation dst)
Definition ItemBase.c:1813

Перекрестные ссылки ScriptInputUserData::CanStoreInputUserData(), GetGame(), INPUT_UDT_ITEM_MANIPULATION и SplitIntoStackMaxToInventoryLocation().

◆ SplitIntoStackMaxToInventoryLocationEx()

ItemBase SplitIntoStackMaxToInventoryLocationEx ( notnull InventoryLocation dst)
inlineprotected
1819 {
1820 float quantity = GetQuantity();
1821 float split_quantity_new;
1823 if (dst.IsValid())
1824 {
1825 int slot_id = dst.GetSlot();
1827
1828 if (quantity > stack_max)
1830 else
1832
1834
1835 if (new_item)
1836 {
1837 new_item.SetResultOfSplit(true);
1838 MiscGameplayFunctions.TransferItemProperties(this,new_item);
1840 new_item.SetQuantity(split_quantity_new);
1841 }
1842
1843 return new_item;
1844 }
1845
1846 return null;
1847 }
static proto native EntityAI LocationCreateEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new item directly at location

Перекрестные ссылки AddQuantity(), ECE_IN_INVENTORY, GetQuantity(), GetTargetQuantityMax(), GameInventory::LocationCreateEntity() и RF_DEFAULT.

◆ SplitItem()

void SplitItem ( PlayerBase player)
inlineprotected
1956 {
1957 if (!CanBeSplit())
1958 {
1959 return;
1960 }
1961
1962 float quantity = GetQuantity();
1964
1966 bool found = player.GetInventory().FindFirstFreeLocationForNewEntity(GetType(), FindInventoryLocationType.ATTACHMENT, invloc);
1967
1969 new_item = player.CreateCopyOfItemInInventoryOrGroundEx(this, true);
1970
1971 if (new_item)
1972 {
1973 if (new_item.GetQuantityMax() < split_quantity_new)
1974 {
1975 split_quantity_new = new_item.GetQuantityMax();
1976 }
1977 if (found && invloc.IsValid() && invloc.GetType() == InventoryLocationType.ATTACHMENT && split_quantity_new > 1)
1978 {
1979 AddQuantity(-1);
1980 new_item.SetQuantity(1);
1981 }
1982 else
1983 {
1985 new_item.SetQuantity(split_quantity_new);
1986 }
1987 }
1988 }
static proto float Floor(float f)
Returns floor of value.

Перекрестные ссылки AddQuantity(), ItemBase::CanBeSplit(), Math::Floor(), GetQuantity() и GetType().

◆ SplitItemToInventoryLocation()

void SplitItemToInventoryLocation ( notnull InventoryLocation dst)
inlineprotected
1923 {
1924 if (!CanBeSplit())
1925 return;
1926
1927 float quantity = GetQuantity();
1928 float split_quantity_new = Math.Floor(quantity * 0.5);
1929
1931
1932 if (new_item)
1933 {
1934 if (new_item.GetQuantityMax() < split_quantity_new)
1935 {
1936 split_quantity_new = new_item.GetQuantityMax();
1937 }
1938
1939 new_item.SetResultOfSplit(true);
1940 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1941
1942 if (dst.IsValid() && dst.GetType() == InventoryLocationType.ATTACHMENT && split_quantity_new > 1)
1943 {
1944 AddQuantity(-1);
1945 new_item.SetQuantity(1);
1946 }
1947 else
1948 {
1950 new_item.SetQuantity(split_quantity_new);
1951 }
1952 }
1953 }

Перекрестные ссылки AddQuantity(), ItemBase::CanBeSplit(), ECE_IN_INVENTORY, Math::Floor(), GetQuantity(), GetType(), GameInventory::LocationCreateEntity() и RF_DEFAULT.

◆ StartOverheating()

void StartOverheating ( ItemBase weapon = null,
string ammoType = "",
ItemBase muzzle_owner = null,
ItemBase suppressor = null,
string config_to_search = "" )
inlineprotected
598 {
600 ItemBase.PlayOverheatingParticles(this, ammoType, this, suppressor, "CfgWeapons");
601 }

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

◆ StopDeployLoopSoundEx()

void StopDeployLoopSoundEx ( )
inlineprotected
4357 {
4358 if (!GetGame().IsDedicatedServer())
4359 {
4362 }
4363 }
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
Definition EffectSound.c:888

Перекрестные ссылки GetGame(), m_DeployLoopSoundEx, EffectSound::SetSoundFadeOut() и EffectSound::SoundStop().

◆ StopItemDynamicPhysics()

void StopItemDynamicPhysics ( )
inlineprotected
4468 {
4469 SetDynamicPhysicsLifeTime(0.01);
4470 m_ItemBeingDroppedPhys = false;
4471 }
bool m_ItemBeingDroppedPhys
Definition ItemBase.c:68

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

◆ StopOverheating()

void StopOverheating ( ItemBase weapon = null,
string ammoType = "",
ItemBase muzzle_owner = null,
ItemBase suppressor = null,
string config_to_search = "" )
inlineprotected
611 {
613 ItemBase.StopOverheatingParticles(weapon, ammoType, muzzle_owner, suppressor, config_to_search);
614 }

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

◆ StopOverheatingParticles()

static void StopOverheatingParticles ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4197 {
4198 int id = muzzle_owner.GetMuzzleID();
4199 array<ref WeaponParticlesOnOverheating> WPOOH_array = weapon.m_OnOverheatingEffect.Get(id);
4200
4201 if (WPOOH_array)
4202 {
4203 for (int i = 0; i < WPOOH_array.Count(); i++)
4204 {
4206
4207 if (WPOOH)
4208 {
4210 }
4211 }
4212 }
4213 }

◆ ToggleDebugActionsMask()

static void ToggleDebugActionsMask ( int mask)
inlinestaticprotected
817 {
819 {
821 }
822 else
823 {
825 }
826 }
static bool HasDebugActionsMask(int mask)
Definition ItemBase.c:796
static void AddDebugActionsMask(int mask)
Definition ItemBase.c:806
static void RemoveDebugActionsMask(int mask)
Definition ItemBase.c:811

Перекрестные ссылки AddDebugActionsMask(), HasDebugActionsMask() и RemoveDebugActionsMask().

◆ TransferAgents()

void TransferAgents ( int agents)
inlineprotected

transfer agents from another item

3882 {
3884 }

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

◆ TransferModifiers()

void TransferModifiers ( PlayerBase reciever)
private

appears to be deprecated, legacy code

◆ UnlockFromParent()

void UnlockFromParent ( )
inlineprotected

Unlocks this item from its attachment slot of its parent.

872 {
873 EntityAI parent = GetHierarchyParent();
874
875 if (parent)
876 {
878 GetInventory().GetCurrentInventoryLocation(inventory_location_to_unlock);
879 parent.GetInventory().SetSlotLock(inventory_location_to_unlock.GetSlot(), false);
880 }
881 }

◆ UpdateAllOverheatingParticles()

void UpdateAllOverheatingParticles ( )
inlineprotected
639 {
641 {
643 int count = m_OverheatingParticles.Count();
644
645 for (int i = count; i > 0; --i)
646 {
647 int id = i - 1;
649 Particle p = OP.GetParticle();
650
651 float overheat_min = OP.GetOverheatingLimitMin();
652 float overheat_max = OP.GetOverheatingLimitMax();
653
655 {
656 if (p)
657 {
658 p.Stop();
659 OP.RegisterParticle(null);
660 }
661 }
662 }
663 }
664 }
float GetOverheatingCoef()
Definition ItemBase.c:630

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

◆ UpdateOverheating()

void UpdateOverheating ( ItemBase weapon = null,
string ammoType = "",
ItemBase muzzle_owner = null,
ItemBase suppressor = null,
string config_to_search = "" )
inlineprotected
604 {
606 ItemBase.UpdateOverheatingParticles(this, ammoType, this, suppressor, "CfgWeapons");
608 }
void UpdateAllOverheatingParticles()
Definition ItemBase.c:638
void KillAllOverheatingParticles()
Definition ItemBase.c:666

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

◆ UpdateOverheatingParticles()

static void UpdateOverheatingParticles ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4177 {
4178 int id = muzzle_owner.GetMuzzleID();
4179 array<ref WeaponParticlesOnOverheating> WPOOH_array = weapon.m_OnOverheatingEffect.Get(id);
4180
4181 if (WPOOH_array)
4182 {
4183 for (int i = 0; i < WPOOH_array.Count(); i++)
4184 {
4186
4187 if (WPOOH)
4188 {
4190 }
4191 }
4192 }
4193 }

◆ UpdateQuickbarShortcutVisibility()

void UpdateQuickbarShortcutVisibility ( PlayerBase player)
inlineprotected

To be called on moving item within character's inventory; 'player' should never be null.

3776 {
3777 player.SetEnableQuickBarEntityShortcut(this,!GetHierarchyParent() || GetHierarchyParent().GetInventory().AreChildrenAccessible());
3778 }

◆ UsesGlobalDeploy()

bool UsesGlobalDeploy ( )
inlineprotected
286 {
287 return false;
288 }

◆ WriteVarsToCTX()

override void WriteVarsToCTX ( ParamsWriteContext ctx)
inlineprotected
2876 {
2877 super.WriteVarsToCTX(ctx);
2878
2879 //--------------------------------------------
2880 if (IsVariableSet(VARIABLE_QUANTITY))
2881 {
2882 ctx.Write(GetQuantity());
2883 }
2884 //--------------------------------------------
2885 if (IsVariableSet(VARIABLE_WET))
2886 {
2887 ctx.Write(GetWet());
2888 }
2889 //--------------------------------------------
2890 if (IsVariableSet(VARIABLE_LIQUIDTYPE))
2891 {
2892 ctx.Write(GetLiquidType());
2893 }
2894 //--------------------------------------------
2895 if (IsVariableSet(VARIABLE_COLOR))
2896 {
2897 int r,g,b,a;
2898 GetColor(r,g,b,a);
2899 ctx.Write(r);
2900 ctx.Write(g);
2901 ctx.Write(b);
2902 ctx.Write(a);
2903 }
2904 //--------------------------------------------
2905 if (IsVariableSet(VARIABLE_CLEANNESS))
2906 {
2907 ctx.Write(GetCleanness());
2908 }
2909 }
override int GetCleanness()
Definition ItemBase.c:3685

Перекрестные ссылки GetCleanness(), GetColor(), GetLiquidType(), GetQuantity(), GetWet(), VARIABLE_CLEANNESS, VARIABLE_COLOR, VARIABLE_LIQUIDTYPE, VARIABLE_QUANTITY и VARIABLE_WET.

Поля

◆ can_this_be_combined

bool can_this_be_combined
private

◆ m_ActionsInitialize

bool m_ActionsInitialize
private

◆ m_AdminLog

PluginAdminLog m_AdminLog
protected

◆ m_AttachedAgents

int m_AttachedAgents
private

◆ m_CanBeDigged

bool m_CanBeDigged
protected

◆ m_CanBeMovedOverride

bool m_CanBeMovedOverride
private

◆ m_CanPlayImpactSound

bool m_CanPlayImpactSound = true
private

◆ m_CanShowQuantity

bool m_CanShowQuantity
private

◆ m_CanThisBeSplit

bool m_CanThisBeSplit
private

◆ m_CheckOverheating

ref Timer m_CheckOverheating
private

◆ m_Cleanness

int m_Cleanness
private

◆ m_CleannessInit

int m_CleannessInit
private

◆ m_CleannessMax

int m_CleannessMax
private

◆ m_CleannessMin

int m_CleannessMin
private

◆ m_ColorComponentA

int m_ColorComponentA
protected

◆ m_ColorComponentB

int m_ColorComponentB
protected

◆ m_ColorComponentG

int m_ColorComponentG
protected

◆ m_ColorComponentR

int m_ColorComponentR
protected

◆ m_CompatibleLocks

ref array<int> m_CompatibleLocks
protected

◆ m_ContinuousActions

ref TIntArray m_ContinuousActions
protected

◆ m_Count

int m_Count
private

◆ m_DebugActionsMask

int m_DebugActionsMask
staticprivate

◆ m_DeployLoopSoundEx

EffectSound m_DeployLoopSoundEx
protected

distinguish if item has been created as new or it came from splitting (server only flag)

◆ m_FixDamageSystemInit

bool m_FixDamageSystemInit = false
private

◆ m_HasQuantityBar

bool m_HasQuantityBar
private

◆ m_HeadHidingSelections

ref TStringArray m_HeadHidingSelections
protected

◆ m_HeatIsolation

float m_HeatIsolation
private

◆ m_HideSelectionsBySlot

bool m_HideSelectionsBySlot
protected

◆ m_ImpactSoundSurfaceHash

int m_ImpactSoundSurfaceHash
private

◆ m_ImpactSpeed

float m_ImpactSpeed
private

◆ m_InputActionMap

TInputActionMap m_InputActionMap
private

◆ m_InteractActions

ref TIntArray m_InteractActions
protected

◆ m_IsBeingPlaced

bool m_IsBeingPlaced
private

◆ m_IsDeploySound

bool m_IsDeploySound
private

◆ m_IsHologram

bool m_IsHologram
private

◆ m_IsOverheatingEffectActive

bool m_IsOverheatingEffectActive
private

◆ m_IsPlaceSound

bool m_IsPlaceSound
private

◆ m_IsSoundSynchRemote

bool m_IsSoundSynchRemote
private

◆ m_IsStoreLoad

bool m_IsStoreLoad = false
private

◆ m_IsTakeable

bool m_IsTakeable
private

◆ m_ItemActionOverrides

ref map<typename, ref TActionAnimOverrideMap> m_ItemActionOverrides = new map<typename, ref TActionAnimOverrideMap>
staticprivate

◆ m_ItemAttachOffset

float m_ItemAttachOffset
private

◆ m_ItemBehaviour

int m_ItemBehaviour
private

◆ m_ItemBeingDroppedPhys

bool m_ItemBeingDroppedPhys
private

◆ m_ItemModelLength

float m_ItemModelLength
private

◆ m_ItemTypeActionsMap

ref map<typename, ref TInputActionMap> m_ItemTypeActionsMap = new map<typename, ref TInputActionMap>
staticprivate

◆ m_LastRegisteredWeaponID

int m_LastRegisteredWeaponID = 0
staticprivate

◆ m_LightSourceItem

ItemBase m_LightSourceItem
protected

◆ m_LiquidContainerMask

int m_LiquidContainerMask
private

◆ m_LockingSound

ref EffectSound m_LockingSound
protected

◆ m_LockSoundSet

string m_LockSoundSet
protected

◆ m_LockType

int m_LockType
protected

◆ m_MaxOverheatingValue

int m_MaxOverheatingValue = 0
private

◆ m_OnBulletCasingEjectEffect

ref map<int, ref array<ref WeaponParticlesOnBulletCasingEject> > m_OnBulletCasingEjectEffect
staticprivate

◆ m_OnFireEffect

ref map<int, ref array<ref WeaponParticlesOnFire> > m_OnFireEffect
staticprivate

◆ m_OnOverheatingEffect

ref map<int, ref array<ref WeaponParticlesOnOverheating> > m_OnOverheatingEffect
private

◆ m_OverheatingDecayInterval

float m_OverheatingDecayInterval = 1
private

◆ m_OverheatingParticles

ref array<ref OverheatingParticle> m_OverheatingParticles
private

◆ m_OverheatingShots

float m_OverheatingShots
private

◆ m_PhysDropTimer

ref Timer m_PhysDropTimer
protected

◆ m_QuickBarBonus

int m_QuickBarBonus
private

◆ m_RecipesInitialized

bool m_RecipesInitialized
private

◆ m_ShotsToStartOverheating

int m_ShotsToStartOverheating = 0
private

◆ m_SingleUseActions

ref TIntArray m_SingleUseActions
protected

◆ m_SoundAttType

string m_SoundAttType
protected

◆ m_SoundDeploy

EffectSound m_SoundDeploy
protected

◆ m_SoundDeployFinish

EffectSound m_SoundDeployFinish
protected

◆ m_SoundPlace

EffectSound m_SoundPlace
protected

◆ m_StoreLoadedQuantity

float m_StoreLoadedQuantity = float.LOWEST
private

◆ m_TemperaturePerQuantityWeight

float m_TemperaturePerQuantityWeight
private

◆ m_ThrowItemOnDrop

bool m_ThrowItemOnDrop
private

◆ m_VarLiquidType

int m_VarLiquidType
private

◆ m_VarQuantity

float m_VarQuantity
private

◆ m_VarQuantityInit

int m_VarQuantityInit
private

◆ m_VarQuantityMax

int m_VarQuantityMax
private

◆ m_VarQuantityMin

int m_VarQuantityMin
private

◆ m_VarQuantityPrev

float m_VarQuantityPrev
private

◆ m_VarStackMax

float m_VarStackMax
private

◆ m_VarWet

float m_VarWet
private

◆ m_VarWetInit

float m_VarWetInit
private

◆ m_VarWetMax

float m_VarWetMax
private

◆ m_VarWetMin

float m_VarWetMin
private

◆ m_VarWetPrev

float m_VarWetPrev
private

◆ m_WantPlayImpactSound

bool m_WantPlayImpactSound
private

◆ m_WeaponTypeToID

ref map<string, int> m_WeaponTypeToID
staticprivate

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