PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
InventoryItem Class Reference

Private Member Functions

void TransferModifiers (PlayerBase reciever)
 appears to be deprecated, legacy code
 
void ItemBase ()
 
override void InitItemVariables ()
 
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 ()
 
protected bool ShouldSplitQuantity (float quantity)
 
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 ()
 
protected void SetInventoryLocationToVicinityOrCurrent (EntityAI root, inout InventoryLocation dst)
 
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 ()
 
void RefreshAudioVisualsOnClient (CookingMethodType cooking_method, bool is_done, bool is_empty, bool is_burned)
 cooking-related effect methods
 
void RemoveAudioVisualsOnClient ()
 
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 ()
 
override 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 ()
 
override protected 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 ()
 
protected 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 agent_to_keep)
 
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 ()
 
protected void PreLoadSoundAttachmentType ()
 Attachment Sound Type getting from config file.
 
override string GetAttachmentSoundType ()
 
string GetPlaceSoundset ()
 
string GetLoopDeploySoundset ()
 
string GetDeploySoundset ()
 
string GetLoopFoldSoundset ()
 
string GetFoldSoundset ()
 
ItemSoundHandler GetItemSoundHandler ()
 
protected void InitItemSounds ()
 
void StartItemSoundServer (int id)
 
void StopItemSoundServer (int id)
 
protected void ClearStartItemSoundServer ()
 
protected void ClearStopItemSoundServer ()
 
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)
 
protected void ProcessDecay (float delta, bool hasRootAsPlayer)
 
bool CanDecay ()
 
protected bool CanProcessDecay ()
 
protected bool CanHaveWetness ()
 
bool CanBeConsumed (ConsumeConditionData data=null)
 Items cannot be consumed if frozen by default. Override for exceptions.
 
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)
 from enviro source
 
void AffectLiquidContainerOnTransfer (int liquidType, float amount, float sourceLiquidTemperature)
 from other liquid container source
 
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)
 
string GetDeployFinishSoundset ()
 
void PlayDeploySound ()
 
void PlayDeployFinishSound ()
 
void PlayPlaceSound ()
 
void PlayDeployLoopSoundEx ()
 
void StopDeployLoopSoundEx ()
 
void SoundSynchRemoteReset ()
 
void SoundSynchRemote ()
 
bool UsesGlobalDeploy ()
 
bool CanPlayDeployLoopSound ()
 
bool IsSoundSynchRemote ()
 
bool IsPlaceSound ()
 
bool IsDeploySound ()
 
void SetIsPlaceSound (bool is_place_sound)
 
void SetIsDeploySound (bool is_deploy_sound)
 

Static Private Member Functions

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)
 

Private Attributes

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_IsTakeable
 
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
 
protected bool m_CanBeDigged
 
protected bool m_IsResultOfSplit string m_SoundAttType
 distinguish if item has been created as new or it came from splitting (server only flag)
 
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
 
private 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
 
protected ref TStringArray m_HeadHidingSelections
 
protected bool m_HideSelectionsBySlot
 
PluginAdminLog m_AdminLog
 
ref Timer m_PhysDropTimer
 
ref array< intm_CompatibleLocks
 
protected int m_LockType
 
protected ref EffectSound m_LockingSound
 
protected string m_LockSoundSet
 
protected const int ITEM_SOUNDS_MAX = 63
 
protected int m_SoundSyncPlay
 
protected int m_SoundSyncStop
 
private ref ItemSoundHandler m_ItemSoundHandler
 
private float m_TemperaturePerQuantityWeight
 
protected EffectSound m_SoundDeployFinish
 
protected EffectSound m_SoundPlace
 
protected EffectSound m_DeployLoopSoundEx
 
protected EffectSound m_SoundDeploy
 
bool m_IsPlaceSound
 
bool m_IsDeploySound
 
bool m_IsSoundSynchRemote
 

Static Private Attributes

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
 

Constructor & Destructor Documentation

◆ ~ItemBase()

Member Function Documentation

◆ AddAction()

◆ AddDebugActionsMask()

static void AddDebugActionsMask ( int  mask)
inlinestaticprivate

◆ AddLightSourceItem()

void AddLightSourceItem ( ItemBase  lightsource)
inlineprivate

Adds a light source child.

References m_LightSourceItem.

◆ AddQuantity()

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

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

References GetQuantity(), and ItemBase::SetQuantity().

◆ AddWet()

override void AddWet ( float  value)
inlineprivate

References GetWet(), and SetWet().

◆ AffectLiquidContainerOnFill()

void AffectLiquidContainerOnFill ( int  liquid_type,
float  amount 
)
private

from enviro source

◆ AffectLiquidContainerOnTransfer()

void AffectLiquidContainerOnTransfer ( int  liquidType,
float  amount,
float  sourceLiquidTemperature 
)
private

from other liquid container source

◆ AfterStoreLoad()

◆ AllowFoodConsumption()

bool AllowFoodConsumption ( )
inlineprivate

◆ CanBeCombined()

override bool CanBeCombined ( EntityAI  other_item,
bool  reservation_check = true,
bool  stack_max_limit = false 
)
inlineprivate

◆ CanBeConsumed()

bool CanBeConsumed ( ConsumeConditionData  data = null)
inlineprivate

Items cannot be consumed if frozen by default. Override for exceptions.

References IsOpen().

◆ CanBeCooked()

bool CanBeCooked ( )
inlineprivate

◆ CanBeCookedOnStick()

bool CanBeCookedOnStick ( )
inlineprivate

◆ CanBeDigged()

bool CanBeDigged ( )
inlineprivate

References m_CanBeDigged.

◆ CanBeDisinfected()

bool CanBeDisinfected ( )
inlineprivate

◆ CanBeMovedOverride()

bool CanBeMovedOverride ( )
inlineprivate

References m_CanBeMovedOverride.

◆ CanBeRepairedByCrafting()

bool CanBeRepairedByCrafting ( )
inlineprivate

◆ CanBeSplit()

override bool CanBeSplit ( )
inlineprivate

References GetQuantity(), and IsSplitable().

◆ CanBeUsedForSuicide()

bool CanBeUsedForSuicide ( )
inlineprivate

◆ CanDecay()

bool CanDecay ( )
inlineprivate

◆ CanDisplayCargo()

override bool CanDisplayCargo ( )
inlineprivate

References IsOpen().

◆ CanEat()

bool CanEat ( )
inlineprivate

◆ CanExplodeInFire()

bool CanExplodeInFire ( )
inlineprivate

◆ CanHaveWetness()

protected bool CanHaveWetness ( )
inlineprivate

◆ CanMakeGardenplot()

bool CanMakeGardenplot ( )
inlineprivate

◆ CanObstruct()

override bool CanObstruct ( )
inlineprivate

◆ CanPlayDeployLoopSound()

bool CanPlayDeployLoopSound ( )
inlineprivate

◆ CanProcessDecay()

protected bool CanProcessDecay ( )
inlineprivate

◆ CanPutAsAttachment()

override bool CanPutAsAttachment ( EntityAI  parent)
inlineprivate

◆ CanPutInCargo()

override bool CanPutInCargo ( EntityAI  parent)
inlineprivate

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI  attachment,
int  slotId 
)
inlineprivate

◆ CanReceiveItemIntoCargo()

override bool CanReceiveItemIntoCargo ( EntityAI  item)
inlineprivate

◆ CanReleaseAttachment()

override bool CanReleaseAttachment ( EntityAI  attachment)
inlineprivate

◆ CanRepair()

bool CanRepair ( ItemBase  item_repair_kit)
inlineprivate

References GetPlugin().

◆ ChangeIntoOnAttach()

override string ChangeIntoOnAttach ( string  slot)
inlineprivate

◆ ChangeIntoOnDetach()

override string ChangeIntoOnDetach ( )
inlineprivate

◆ CheckForRoofLimited()

override void CheckForRoofLimited ( float  timeTresholdMS = 3000)
inlineprivate

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

References GetGame(), and CGame::GetTime().

◆ CheckOverheating()

void CheckOverheating ( ItemBase  weapon = null,
string  ammoType = "",
ItemBase  muzzle_owner = null,
ItemBase  suppressor = null,
string  config_to_search = "" 
)
inlineprivate

◆ ClearInventory()

override void ClearInventory ( )
inlineprivate

◆ ClearStartItemSoundServer()

protected void ClearStartItemSoundServer ( )
inlineprivate

References m_SoundSyncPlay.

◆ ClearStopItemSoundServer()

protected void ClearStopItemSoundServer ( )
inlineprivate

References m_SoundSyncStop.

◆ Close()

void Close ( )
private

◆ CombineItems()

void CombineItems ( ItemBase  other_item,
bool  use_stack_max = true 
)
inlineprivate

◆ CombineItemsClient()

◆ CombineItemsEx()

override void CombineItemsEx ( EntityAI  entity2,
bool  use_stack_max = true 
)
inlineprivate

References CombineItems().

◆ ComputeQuantityUsed()

int ComputeQuantityUsed ( ItemBase  other_item,
bool  use_stack_max = true 
)
inlineprivate

◆ ComputeQuantityUsedEx()

float ComputeQuantityUsedEx ( ItemBase  other_item,
bool  use_stack_max = true 
)
inlineprivate

References GetQuantity(), and GetQuantityMax().

◆ ContainsAgent()

bool ContainsAgent ( int  agent_id)
inlineprivate

References m_AttachedAgents.

◆ ConvertEnergyToQuantity()

void ConvertEnergyToQuantity ( )
inlineprivate

◆ CopyScriptPropertiesFrom()

void CopyScriptPropertiesFrom ( EntityAI  oldItem)
inlineprivate

◆ DamageItemAttachments()

bool DamageItemAttachments ( float  damage)
inlineprivate

References Math::RandomInt().

◆ DamageItemInCargo()

bool DamageItemInCargo ( float  damage)
inlineprivate

References GetItem(), and Math::RandomInt().

◆ DeSerializeNumericalVars()

◆ DoAmmoExplosion()

void DoAmmoExplosion ( )
inlineprivate

◆ EEDelete()

◆ EEHealthLevelChanged()

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

◆ EEHitBy()

override void EEHitBy ( TotalDamageResult  damageResult,
int  damageType,
EntityAI  source,
int  component,
string  dmgZone,
string  ammo,
vector  modelPos,
float  speedCoef 
)
inlineprivate

◆ EEItemLocationChanged()

◆ EEKilled()

override void EEKilled ( Object  killer)
inlineprivate

◆ EEOnAfterLoad()

override void EEOnAfterLoad ( )
inlineprivate

◆ EEOnCECreate()

override void EEOnCECreate ( )
inlineprivate

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

References SetCEBasedQuantity(), and SetZoneDamageCEInit().

◆ EOnContact()

override void EOnContact ( IEntity  other,
Contact  extra 
)
inlineprivate

◆ ExplodeAmmo()

void ExplodeAmmo ( )
inlineprivate

◆ GetActions()

override void GetActions ( typename action_input_type  ,
out array< ActionBase_Basic actions 
)
inlineprivate

◆ GetActionWidgetOverride()

bool GetActionWidgetOverride ( out typename  name)
inlineprivate

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

◆ GetAgents()

override int GetAgents ( )
inlineprivate

References m_AttachedAgents.

◆ GetAttachmentSoundType()

override string GetAttachmentSoundType ( )
inlineprivate

References m_SoundAttType.

◆ GetBaitEffectivity()

float GetBaitEffectivity ( )
inlineprivate

generic effectivity as a bait for animal catching

References GetQuantityNormalized(), and HasQuantity().

◆ GetBandagingEffectivity()

float GetBandagingEffectivity ( )
inlineprivate

◆ GetCleanness()

override int GetCleanness ( )
inlineprivate

References m_Cleanness.

◆ GetColor()

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

gets item's color variable as components

References m_ColorComponentA, m_ColorComponentB, m_ColorComponentG, and m_ColorComponentR.

◆ GetColorString()

string GetColorString ( )
inlineprivate

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

References GetColor().

◆ GetDamageSystemVersionChange()

int GetDamageSystemVersionChange ( )
inlineprivate

Re-sets DamageSystem changes.

Returns
storage version on which the config changes occured (default -1, to be overriden!)
Note
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).

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx  outputList)
inlineprivate

◆ GetDebugActionsMask()

static int GetDebugActionsMask ( )
inlinestaticprivate

◆ GetDeployFinishSoundset()

string GetDeployFinishSoundset ( )
private

◆ GetDeploySoundset()

string GetDeploySoundset ( )
private

◆ GetDeployTime()

float GetDeployTime ( )
inlineprivate

how long it takes to deploy this item in seconds

References UATimeSpent::DEFAULT_DEPLOY.

◆ GetDisinfectQuantity()

float GetDisinfectQuantity ( int  system = 0,
Param  param1 = null 
)
inlineprivate

◆ GetDryingIncrement()

float GetDryingIncrement ( string  pIncrementName)
inlineprivate

◆ GetEnergy()

float GetEnergy ( )
inlineprivate

◆ GetExplosiveTriggerSlotName()

string GetExplosiveTriggerSlotName ( )
inlineprivate

◆ GetFilterDamageRatio()

float GetFilterDamageRatio ( )
inlineprivate

◆ GetFoldSoundset()

string GetFoldSoundset ( )
private

◆ GetFoodStage()

FoodStage GetFoodStage ( )
inlineprivate

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

◆ GetHeadHidingSelection()

array< string > GetHeadHidingSelection ( )
inlineprivate

◆ GetHeatIsolation()

float GetHeatIsolation ( )
inlineprivate

References m_HeatIsolation.

◆ GetHeatIsolationInit()

float GetHeatIsolationInit ( )
inlineprivate

◆ GetInfectionChance()

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

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.

◆ GetItemAttachOffset()

float GetItemAttachOffset ( )
inlineprivate

◆ GetItemModelLength()

float GetItemModelLength ( )
inlineprivate

◆ GetItemOverheatThreshold()

override float GetItemOverheatThreshold ( )
inlineprivate

◆ GetItemSize()

int GetItemSize ( )
inlineprivate

◆ GetItemSoundHandler()

ItemSoundHandler GetItemSoundHandler ( )
inlineprivate

◆ GetLight()

ScriptedLightBase GetLight ( )
private

◆ GetLightSourceItem()

ItemBase GetLightSourceItem ( )
inlineprivate

References m_LightSourceItem.

◆ GetLiquidContainerMask()

int GetLiquidContainerMask ( )
inlineprivate

References m_LiquidContainerMask.

◆ GetLiquidType()

override int GetLiquidType ( )
inlineprivate

References m_VarLiquidType.

◆ GetLiquidTypeInit()

int GetLiquidTypeInit ( )
inlineprivate

◆ GetLockSoundSet()

string GetLockSoundSet ( )
inlineprivate

References m_LockSoundSet.

◆ GetLockType()

int GetLockType ( )
inlineprivate

References m_LockType.

◆ GetLoopDeploySoundset()

string GetLoopDeploySoundset ( )
private

◆ GetLoopFoldSoundset()

string GetLoopFoldSoundset ( )
private

◆ GetMuzzleID()

int GetMuzzleID ( )
inlineprivate

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

References GetType(), m_LastRegisteredWeaponID, and m_WeaponTypeToID.

◆ GetNumberOfItems()

int GetNumberOfItems ( )
inlineprivate

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

References Class::CastTo().

◆ GetOnDigWormsAmount()

int GetOnDigWormsAmount ( )
inlineprivate

◆ GetOverheatingCoef()

float GetOverheatingCoef ( )
inlineprivate

◆ GetOverheatingValue()

float GetOverheatingValue ( )
inlineprivate

References m_OverheatingShots.

◆ GetPlaceSoundset()

string GetPlaceSoundset ( )
private

◆ GetProtectionLevel()

float GetProtectionLevel ( int  type,
bool  consider_filter = false,
int  system = 0 
)
inlineprivate

◆ GetQuantity()

override float GetQuantity ( )
inlineprivate

References m_VarQuantity.

◆ GetQuantityInit()

int GetQuantityInit ( )
inlineprivate

References m_VarQuantityInit.

◆ GetQuantityMax()

override int GetQuantityMax ( )
inlineprivate

◆ GetQuantityMin()

override int GetQuantityMin ( )
inlineprivate

References m_VarQuantityMin.

◆ GetQuantityNormalized()

override float GetQuantityNormalized ( )
inlineprivate

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)

References GetQuantityMax(), GetQuantityMin(), Math::InverseLerp(), and m_VarQuantity.

◆ GetQuantityNormalizedScripted()

float GetQuantityNormalizedScripted ( )
inlineprivate

◆ GetQuickBarBonus()

override int GetQuickBarBonus ( )
inlineprivate

References m_QuickBarBonus.

◆ GetRecipesActions()

void GetRecipesActions ( Man  player,
out TSelectableActionInfoArray  outputList 
)
inlineprivate

◆ GetSingleInventoryItemWeight()

float GetSingleInventoryItemWeight ( )
inlineprivate

◆ GetSingleInventoryItemWeightEx()

override float GetSingleInventoryItemWeightEx ( )
inlineprivate

◆ GetSoakingIncrement()

float GetSoakingIncrement ( string  pIncrementName)
inlineprivate

◆ GetStoreLoadedQuantity()

override float GetStoreLoadedQuantity ( )
inlineprivate

References m_StoreLoadedQuantity.

◆ GetTargetQuantityMax()

override int GetTargetQuantityMax ( int  attSlotID = -1)
inlineprivate

◆ GetTemperatureFreezeThreshold()

override float GetTemperatureFreezeThreshold ( )
inlineprivate

◆ GetTemperatureFreezeTime()

override float GetTemperatureFreezeTime ( )
inlineprivate

◆ GetTemperaturePerQuantityWeight()

float GetTemperaturePerQuantityWeight ( )
inlineprivate

Used in heat comfort calculations only!

References GameConstants::ITEM_TEMPERATURE_QUANTITY_WEIGHT_MULTIPLIER, and m_TemperaturePerQuantityWeight.

◆ GetTemperatureThawThreshold()

override float GetTemperatureThawThreshold ( )
inlineprivate

◆ GetTemperatureThawTime()

◆ GetUnitWeight()

float GetUnitWeight ( bool  include_wetness = true)
inlineprivate

Obsolete, use GetWeightEx instead.

References GetWet(), IsLiquidContainer(), and IsSplitable().

◆ GetValidFinishers()

array< int > GetValidFinishers ( )
inlineprivate

returns an array of possible finishers

◆ GetWeightSpecialized()

override protected float GetWeightSpecialized ( bool  forceRecalc = false)
inlineprivate

◆ GetWet()

override float GetWet ( )
inlineprivate

References m_VarWet.

◆ GetWetInit()

override float GetWetInit ( )
inlineprivate

References m_VarWetInit.

◆ GetWetLevel()

override EWetnessLevel GetWetLevel ( )
inlineprivate

References m_VarWet.

◆ GetWetMax()

override float GetWetMax ( )
inlineprivate

References m_VarWetMax.

◆ GetWetMin()

override float GetWetMin ( )
inlineprivate

References m_VarWetMin.

◆ GetWrittenNoteData()

WrittenNoteData GetWrittenNoteData ( )
inlineprivate

◆ HasDebugActionsMask()

static bool HasDebugActionsMask ( int  mask)
inlinestaticprivate

◆ HasFoodStage()

bool HasFoodStage ( )
inlineprivate

◆ HasMuzzle()

bool HasMuzzle ( )
inlineprivate

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

◆ HasQuantity()

override bool HasQuantity ( )
inlineprivate

◆ HidesSelectionBySlot()

bool HidesSelectionBySlot ( )
inlineprivate

◆ HierarchyCheck()

void HierarchyCheck ( out bool  hasParent,
out bool  hasRootAsPlayer,
out ItemBase  refParentIB 
)
inlineprivate

◆ IDToName()

string IDToName ( int  id)
inlineprivate

References GetPlugin().

◆ IncreaseOverheating()

void IncreaseOverheating ( ItemBase  weapon,
string  ammoType,
ItemBase  muzzle_owner,
ItemBase  suppressor,
string  config_to_search 
)
inlineprivate

◆ InitializeActions()

void InitializeActions ( )
inlineprivate

◆ InitItemSounds()

◆ InitItemVariables()

◆ InsertAgent()

override void InsertAgent ( int  agent,
float  count = 1 
)
inlineprivate

References m_AttachedAgents.

◆ IsActionTargetVisible()

bool IsActionTargetVisible ( )
inlineprivate

◆ IsBeingPlaced()

override bool IsBeingPlaced ( )
inlineprivate

References m_IsBeingPlaced.

◆ IsBloodContainer()

bool IsBloodContainer ( )
inlineprivate

◆ IsCargoException4x3()

bool IsCargoException4x3 ( EntityAI  item)
inlineprivate

◆ IsColorSet()

bool IsColorSet ( )
inlineprivate

References VARIABLE_COLOR.

◆ IsCombineAll()

bool IsCombineAll ( ItemBase  other_item,
bool  use_stack_max = false 
)
inlineprivate

References ComputeQuantityUsed().

◆ IsCoverFaceForShave()

bool IsCoverFaceForShave ( string  slot_name)
inlineprivate

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

◆ IsDeployable()

bool IsDeployable ( )
inlineprivate

◆ IsDeploySound()

bool IsDeploySound ( )
inlineprivate

References m_IsDeploySound.

◆ IsExplosive()

bool IsExplosive ( )
inlineprivate

explosive

◆ IsFacingPlayer()

bool IsFacingPlayer ( PlayerBase  player,
string  selection 
)
inlineprivate

◆ IsFullQuantity()

bool IsFullQuantity ( )
inlineprivate

References GetQuantity(), and GetQuantityMax().

◆ IsHeavyBehaviour()

override bool IsHeavyBehaviour ( )
inlineprivate

References m_ItemBehaviour.

◆ IsHologram()

override bool IsHologram ( )
inlineprivate

References m_IsHologram.

◆ IsIgnoredByConstruction()

override bool IsIgnoredByConstruction ( )
inlineprivate

◆ IsItemBase()

override bool IsItemBase ( )
inlineprivate

◆ IsLightSource()

bool IsLightSource ( )
inlineprivate

◆ IsLiquidContainer()

bool IsLiquidContainer ( )
inlineprivate

References m_LiquidContainerMask.

◆ IsLiquidPresent()

bool IsLiquidPresent ( )
inlineprivate

References GetLiquidType(), and HasQuantity().

◆ IsNVG()

bool IsNVG ( )
inlineprivate

◆ IsOneHandedBehaviour()

override bool IsOneHandedBehaviour ( )
inlineprivate

References m_ItemBehaviour.

◆ IsOpen()

bool IsOpen ( )
inlineprivate

◆ IsOverheatingEffectActive()

bool IsOverheatingEffectActive ( )
inlineprivate

◆ IsPlaceSound()

bool IsPlaceSound ( )
inlineprivate

References m_IsPlaceSound.

◆ IsPlayerInside()

bool IsPlayerInside ( PlayerBase  player,
string  selection 
)
inlineprivate

◆ IsResultOfSplit()

bool IsResultOfSplit ( )
inlineprivate

◆ IsSoundSynchRemote()

bool IsSoundSynchRemote ( )
inlineprivate

References m_IsSoundSynchRemote.

◆ IsSplitable()

override bool IsSplitable ( )
inlineprivate

References m_CanThisBeSplit.

◆ IsStoreLoad()

override bool IsStoreLoad ( )
inlineprivate

References m_IsStoreLoad.

◆ IsTakeable()

override bool IsTakeable ( )
inlineprivate

References m_IsTakeable.

◆ IsTwoHandedBehaviour()

override bool IsTwoHandedBehaviour ( )
inlineprivate

References m_ItemBehaviour.

◆ ItemBase()

◆ KillAllOverheatingParticles()

void KillAllOverheatingParticles ( )
inlineprivate

◆ KindOf()

override bool KindOf ( string  tag)
inlineprivate

◆ LoadAgents()

bool LoadAgents ( ParamsReadContext  ctx,
int  version 
)
inlineprivate

◆ LoadParticleConfigOnFire()

void LoadParticleConfigOnFire ( int  id)
inlineprivate

◆ LoadParticleConfigOnOverheating()

◆ LockToParent()

void LockToParent ( )
inlineprivate

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

References InventoryLocation::GetSlot().

◆ MessageToOwnerAction()

void MessageToOwnerAction ( string  text)
inlineprivate

Send message to owner player in yellow color.

Returns
void
item_stone.MessageToOwnerAction("Some Action Message");

◆ MessageToOwnerFriendly()

void MessageToOwnerFriendly ( string  text)
inlineprivate

Send message to owner player in green color.

Returns
void
item_stone.MessageToOwnerFriendly("Some Friendly Message");

◆ MessageToOwnerImportant()

void MessageToOwnerImportant ( string  text)
inlineprivate

Send message to owner player in red color.

Returns
void
item_stone.MessageToOwnerImportant("Some Important Message");

◆ MessageToOwnerStatus()

void MessageToOwnerStatus ( string  text)
inlineprivate

Send message to owner player in grey color.

Returns
void
item_stone.MessageToOwnerStatus("Some Status Message");

◆ NameToID()

int NameToID ( string  name)
inlineprivate

References GetPlugin(), and name.

◆ OnAction()

◆ OnActivatedByItem()

void OnActivatedByItem ( notnull ItemBase  item)
private

Called when this item is activated by other.

◆ OnActivatedByTripWire()

void OnActivatedByTripWire ( )
private

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

◆ OnApply()

void OnApply ( PlayerBase  player)
private

◆ OnAttachmentQuantityChanged()

void OnAttachmentQuantityChanged ( ItemBase  item)
inlineprivate

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

◆ OnAttachmentQuantityChangedEx()

void OnAttachmentQuantityChangedEx ( ItemBase  item,
float  delta 
)
inlineprivate

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

References OnAttachmentQuantityChanged().

◆ OnCombine()

void OnCombine ( ItemBase  other_item)
inlineprivate

◆ OnCreatePhysics()

override void OnCreatePhysics ( )
inlineprivate

◆ OnEndPlacement()

void OnEndPlacement ( )
inlineprivate

◆ OnEnergyAdded()

override void OnEnergyAdded ( )
inlineprivate

◆ OnEnergyConsumed()

override void OnEnergyConsumed ( )
inlineprivate

◆ OnInventoryEnter()

void OnInventoryEnter ( Man  player)
inlineprivate

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

References m_CanPlayImpactSound.

◆ OnInventoryExit()

void OnInventoryExit ( Man  player)
inlineprivate

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

◆ OnItemAttachmentSlotChanged()

override void OnItemAttachmentSlotChanged ( notnull InventoryLocation  oldLoc,
notnull InventoryLocation  newLoc 
)
inlineprivate

◆ OnItemInHandsPlayerSwimStart()

void OnItemInHandsPlayerSwimStart ( PlayerBase  player)
private

◆ OnItemLocationChanged()

◆ OnLiquidTypeChanged()

protected void OnLiquidTypeChanged ( int  oldType,
int  newType 
)
inlineprivate

References LIQUID_NONE.

◆ OnMovedInsideCargo()

override void OnMovedInsideCargo ( EntityAI  container)
inlineprivate

◆ OnOverheatingDecay()

◆ OnPlacementComplete()

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

References m_AdminLog.

◆ OnPlacementStarted()

override void OnPlacementStarted ( Man  player)
inlineprivate

References SetTakeable().

◆ OnQuantityChanged()

void OnQuantityChanged ( float  delta)
inlineprivate

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

References ErrorEx, GetLiquidType(), GetLiquidTypeInit(), GetQuantityNormalized(), IsLiquidContainer(), LIQUID_NONE, and SetLiquidType().

◆ OnRightClick()

◆ OnRPC()

◆ OnStoreLoad()

◆ OnStoreSave()

◆ OnSyncVariables()

void OnSyncVariables ( ParamsReadContext  ctx)
inlineprivate

DEPRECATED (most likely)

References ItemVariableFlags::FLOAT, Serializer::Read(), and ReadVarsFromCTX().

◆ OnVariablesSynchronized()

◆ OnWasAttached()

override void OnWasAttached ( EntityAI  parent,
int  slot_id 
)
inlineprivate

◆ OnWasDetached()

override void OnWasDetached ( EntityAI  parent,
int  slot_id 
)
inlineprivate

◆ OnWetChanged()

override void OnWetChanged ( float  newVal,
float  oldVal 
)
inlineprivate

References OnWetLevelChanged().

◆ OnWetLevelChanged()

override void OnWetLevelChanged ( EWetnessLevel  newLevel,
EWetnessLevel  oldLevel 
)
inlineprivate

◆ Open()

void Open ( )
private

Implementations only.

◆ OverrideActionAnimation()

void OverrideActionAnimation ( typename action  ,
int  commandUID,
int  stanceMask = -1,
int  commandUIDProne = -1 
)
inlineprivate

◆ PairWithDevice()

◆ PerformDamageSystemReinit()

void PerformDamageSystemReinit ( )
inlineprivate

◆ PlayAttachSound()

void PlayAttachSound ( string  slot_type)
inlineprivate

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

References GetGame(), GetPosition, GetType(), SEffectManager::PlaySound(), and EffectSound::SetAutodestroy().

◆ PlayBulletCasingEjectParticles()

static void PlayBulletCasingEjectParticles ( ItemBase  weapon,
string  ammoType,
ItemBase  muzzle_owner,
ItemBase  suppressor,
string  config_to_search 
)
inlinestaticprivate

◆ PlayDeployFinishSound()

void PlayDeployFinishSound ( )
private

◆ PlayDeployLoopSoundEx()

void PlayDeployLoopSoundEx ( )
private

◆ PlayDeploySound()

void PlayDeploySound ( )
private

◆ PlayDetachSound()

void PlayDetachSound ( string  slot_type)
inlineprivate

◆ PlayFireParticles()

static void PlayFireParticles ( ItemBase  weapon,
int  muzzle_index,
string  ammoType,
ItemBase  muzzle_owner,
ItemBase  suppressor,
string  config_to_search 
)
inlinestaticprivate

References m_OnFireEffect.

◆ PlayOverheatingParticles()

static void PlayOverheatingParticles ( ItemBase  weapon,
string  ammoType,
ItemBase  muzzle_owner,
ItemBase  suppressor,
string  config_to_search 
)
inlinestaticprivate

◆ PlayPlaceSound()

void PlayPlaceSound ( )
private

◆ PreLoadSoundAttachmentType()

protected void PreLoadSoundAttachmentType ( )
inlineprivate

Attachment Sound Type getting from config file.

References m_SoundAttType.

◆ ProcessDecay()

protected void ProcessDecay ( float  delta,
bool  hasRootAsPlayer 
)
inlineprivate

◆ ProcessItemTemperature()

void ProcessItemTemperature ( float  delta,
bool  hasParent,
bool  hasRootAsPlayer,
ItemBase  refParentIB 
)
inlineprivate

◆ ProcessItemWetness()

void ProcessItemWetness ( float  delta,
bool  hasParent,
bool  hasRootAsPlayer,
ItemBase  refParentIB 
)
inlineprivate

◆ ProcessItemWetnessAndTemperature()

void ProcessItemWetnessAndTemperature ( float  delta,
bool  hasParent,
bool  hasRootAsPlayer,
ItemBase  refParentIB 
)
inlineprivate

◆ ProcessVariables()

◆ ReadVarsFromCTX()

◆ RefreshAudioVisualsOnClient()

void RefreshAudioVisualsOnClient ( CookingMethodType  cooking_method,
bool  is_done,
bool  is_empty,
bool  is_burned 
)
private

cooking-related effect methods

◆ RefreshPhysics()

void RefreshPhysics ( )
private

◆ RegisterOverheatingParticle()

void RegisterOverheatingParticle ( Particle  p,
float  min_heat_coef,
float  max_heat_coef,
int  particle_id,
Object  parent,
vector  local_pos,
vector  local_ori 
)
inlineprivate

◆ RemoveAction()

void RemoveAction ( typename actionName  )
inlineprivate

◆ RemoveAgent()

override void RemoveAgent ( int  agent_id)
inlineprivate

◆ RemoveAllAgents()

override void RemoveAllAgents ( )
inlineprivate

References m_AttachedAgents.

◆ RemoveAllAgentsExcept()

override void RemoveAllAgentsExcept ( int  agent_to_keep)
inlineprivate

References m_AttachedAgents.

◆ RemoveAudioVisualsOnClient()

void RemoveAudioVisualsOnClient ( )
private

◆ RemoveDebugActionsMask()

static void RemoveDebugActionsMask ( int  mask)
inlinestaticprivate

◆ RemoveLightSourceItem()

void RemoveLightSourceItem ( )
inlineprivate

References m_LightSourceItem.

◆ Repair()

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

References GetPlugin().

◆ SaveAgents()

void SaveAgents ( ParamsWriteContext  ctx)
inlineprivate

◆ SerializeNumericalVars()

◆ SetActionAnimOverrides()

void SetActionAnimOverrides ( )
private

◆ SetActions()

void SetActions ( )
inlineprivate

References ActionDropItem(), and AddAction().

◆ SetCanBeMovedOverride()

void SetCanBeMovedOverride ( bool  setting)
inlineprivate

References m_CanBeMovedOverride.

◆ SetCEBasedQuantity()

◆ SetCleanness()

override void SetCleanness ( int  value,
bool  allow_client = false 
)
inlineprivate

◆ SetColor()

override void SetColor ( int  r,
int  g,
int  b,
int  a 
)
inlineprivate

◆ SetDebugActionsMask()

static void SetDebugActionsMask ( int  mask)
inlinestaticprivate

◆ SetInventoryLocationToVicinityOrCurrent()

protected void SetInventoryLocationToVicinityOrCurrent ( EntityAI  root,
inout InventoryLocation  dst 
)
inlineprivate

◆ SetIsBeingPlaced()

void SetIsBeingPlaced ( bool  is_being_placed)
inlineprivate

◆ SetIsDeploySound()

void SetIsDeploySound ( bool  is_deploy_sound)
private

◆ SetIsHologram()

void SetIsHologram ( bool  is_hologram)
inlineprivate

References m_IsHologram.

◆ SetIsPlaceSound()

void SetIsPlaceSound ( bool  is_place_sound)
private

◆ SetLiquidType()

override void SetLiquidType ( int  value,
bool  allow_client = false 
)
inlineprivate

◆ SetQuantity()

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

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.

References Math::Clamp(), GetQuantityMax(), GetQuantityMin(), GetStoreLoadedQuantity(), HasQuantity(), LOWEST, m_VarQuantity, OnQuantityChanged(), RemoveAllAgents(), and VARIABLE_QUANTITY.

◆ SetQuantityMax()

void SetQuantityMax ( )
inlineprivate

◆ SetQuantityNormalized()

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

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)

References Math::Clamp(), GetQuantityMax(), GetQuantityMin(), Math::Lerp(), Math::Round(), and ItemBase::SetQuantity().

◆ SetQuantityToMinimum()

override void SetQuantityToMinimum ( )
inlineprivate

◆ SetResultOfSplit()

void SetResultOfSplit ( bool  value)
inlineprivate

◆ SetStoreLoad()

override void SetStoreLoad ( bool  value)
inlineprivate

References m_IsStoreLoad.

◆ SetStoreLoadedQuantity()

override void SetStoreLoadedQuantity ( float  value)
inlineprivate

References m_StoreLoadedQuantity.

◆ SetTakeable()

override void SetTakeable ( bool  pState)
inlineprivate

References m_IsTakeable.

◆ SetWet()

override void SetWet ( float  value,
bool  allow_client = false 
)
inlineprivate

◆ SetWetMax()

override void SetWetMax ( )
inlineprivate

References m_VarWetMax, and SetWet().

◆ SetZoneDamageCEInit()

void SetZoneDamageCEInit ( )
inlineprivate

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

◆ ShouldSplitQuantity()

protected bool ShouldSplitQuantity ( float  quantity)
inlineprivate

References GetQuantity(), and IsSplitable().

◆ SoundSynchRemote()

void SoundSynchRemote ( )
private

◆ SoundSynchRemoteReset()

void SoundSynchRemoteReset ( )
private

◆ SplitIntoStackMax()

◆ SplitIntoStackMaxCargo()

void SplitIntoStackMaxCargo ( EntityAI  destination_entity,
int  idx,
int  row,
int  col 
)
inlineprivate

◆ SplitIntoStackMaxCargoClient()

void SplitIntoStackMaxCargoClient ( EntityAI  destination_entity,
int  idx,
int  row,
int  col 
)
inlineprivate

◆ SplitIntoStackMaxClient()

override void SplitIntoStackMaxClient ( EntityAI  destination_entity,
int  slot_id 
)
inlineprivate

◆ SplitIntoStackMaxEx()

◆ SplitIntoStackMaxHands()

void SplitIntoStackMaxHands ( PlayerBase  player)
inlineprivate

◆ SplitIntoStackMaxHandsClient()

◆ SplitIntoStackMaxToInventoryLocation()

void SplitIntoStackMaxToInventoryLocation ( notnull InventoryLocation  dst)
inlineprivate

◆ SplitIntoStackMaxToInventoryLocationClient()

◆ SplitIntoStackMaxToInventoryLocationEx()

◆ SplitItem()

◆ SplitItemToInventoryLocation()

◆ StartItemSoundServer()

◆ StartOverheating()

void StartOverheating ( ItemBase  weapon = null,
string  ammoType = "",
ItemBase  muzzle_owner = null,
ItemBase  suppressor = null,
string  config_to_search = "" 
)
inlineprivate

◆ StopDeployLoopSoundEx()

void StopDeployLoopSoundEx ( )
private

◆ StopItemDynamicPhysics()

void StopItemDynamicPhysics ( )
inlineprivate

◆ StopItemSoundServer()

◆ StopOverheating()

void StopOverheating ( ItemBase  weapon = null,
string  ammoType = "",
ItemBase  muzzle_owner = null,
ItemBase  suppressor = null,
string  config_to_search = "" 
)
inlineprivate

◆ StopOverheatingParticles()

static void StopOverheatingParticles ( ItemBase  weapon,
string  ammoType,
ItemBase  muzzle_owner,
ItemBase  suppressor,
string  config_to_search 
)
inlinestaticprivate

◆ ToggleDebugActionsMask()

static void ToggleDebugActionsMask ( int  mask)
inlinestaticprivate

◆ TransferAgents()

void TransferAgents ( int  agents)
inlineprivate

transfer agents from another item

References m_AttachedAgents.

◆ TransferModifiers()

void TransferModifiers ( PlayerBase  reciever)
private

appears to be deprecated, legacy code

◆ UnlockFromParent()

void UnlockFromParent ( )
inlineprivate

Unlocks this item from its attachment slot of its parent.

References InventoryLocation::GetSlot().

◆ UpdateAllOverheatingParticles()

◆ UpdateOverheating()

void UpdateOverheating ( ItemBase  weapon = null,
string  ammoType = "",
ItemBase  muzzle_owner = null,
ItemBase  suppressor = null,
string  config_to_search = "" 
)
inlineprivate

◆ UpdateOverheatingParticles()

static void UpdateOverheatingParticles ( ItemBase  weapon,
string  ammoType,
ItemBase  muzzle_owner,
ItemBase  suppressor,
string  config_to_search 
)
inlinestaticprivate

◆ UpdateQuickbarShortcutVisibility()

void UpdateQuickbarShortcutVisibility ( PlayerBase  player)
inlineprivate

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

◆ UsesGlobalDeploy()

bool UsesGlobalDeploy ( )
inlineprivate

◆ WriteVarsToCTX()

Field Documentation

◆ can_this_be_combined

bool can_this_be_combined
private

◆ ITEM_SOUNDS_MAX

protected const int ITEM_SOUNDS_MAX = 63
private

◆ m_ActionsInitialize

bool m_ActionsInitialize
private

◆ m_AdminLog

PluginAdminLog m_AdminLog
private

◆ m_AttachedAgents

private int m_AttachedAgents
private

◆ m_CanBeDigged

protected bool m_CanBeDigged
private

◆ 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
private

◆ m_ColorComponentB

int m_ColorComponentB
private

◆ m_ColorComponentG

int m_ColorComponentG
private

◆ m_ColorComponentR

int m_ColorComponentR
private

◆ m_CompatibleLocks

ref array<int> m_CompatibleLocks
private

◆ m_ContinuousActions

ref TIntArray m_ContinuousActions
private

◆ m_Count

int m_Count
private

◆ m_DebugActionsMask

int m_DebugActionsMask
staticprivate

◆ m_DeployLoopSoundEx

protected EffectSound m_DeployLoopSoundEx
private

◆ m_FixDamageSystemInit

bool m_FixDamageSystemInit = false
private

◆ m_HasQuantityBar

bool m_HasQuantityBar
private

◆ m_HeadHidingSelections

protected ref TStringArray m_HeadHidingSelections
private

◆ m_HeatIsolation

float m_HeatIsolation
private

◆ m_HideSelectionsBySlot

protected bool m_HideSelectionsBySlot
private

◆ m_ImpactSoundSurfaceHash

int m_ImpactSoundSurfaceHash
private

◆ m_ImpactSpeed

float m_ImpactSpeed
private

◆ m_InputActionMap

TInputActionMap m_InputActionMap
private

◆ m_InteractActions

ref TIntArray m_InteractActions
private

◆ 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_ItemSoundHandler

private ref ItemSoundHandler m_ItemSoundHandler
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
private

◆ m_LiquidContainerMask

int m_LiquidContainerMask
private

◆ m_LockingSound

protected ref EffectSound m_LockingSound
private

◆ m_LockSoundSet

protected string m_LockSoundSet
private

◆ m_LockType

protected int m_LockType
private

◆ 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
private

◆ 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
private

◆ m_SoundAttType

protected bool m_IsResultOfSplit string m_SoundAttType
private

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

◆ m_SoundDeploy

protected EffectSound m_SoundDeploy
private

◆ m_SoundDeployFinish

protected EffectSound m_SoundDeployFinish
private

◆ m_SoundPlace

protected EffectSound m_SoundPlace
private

◆ m_SoundSyncPlay

protected int m_SoundSyncPlay
private

◆ m_SoundSyncStop

protected int m_SoundSyncStop
private

◆ m_StoreLoadedQuantity

float m_StoreLoadedQuantity = float.LOWEST
private

◆ m_TemperaturePerQuantityWeight

private 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

The documentation for this class was generated from the following file: