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

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

void ItemBase ()
 
void InitItemVariables ()
 
bool UsesGlobalDeploy ()
 
override int GetQuickBarBonus ()
 
void InitializeActions ()
 
override void GetActions (typename action_input_type, out array< ActionBase_Basic > actions)
 
void SetActions ()
 
void AddAction (typename actionName)
 
void RemoveAction (typename actionName)
 
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 ()
 
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 ()
 
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 CanBeSplit ()
 
void SplitIntoStackMaxClient (EntityAI destination_entity, int slot_id)
 
void SplitIntoStackMax (EntityAI destination_entity, int slot_id, PlayerBase player)
 
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)
 
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 ()
 
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)
 
void TransferVariablesFloat (array< float > float_vars)
 
array< floatGetVariablesFloat ()
 
int NameToID (string name)
 
string IDToName (int id)
 
void OnSyncVariables (ParamsReadContext ctx)
 
void SerializeNumericalVars (array< float > floats_out)
 
void DeSerializeNumericalVars (array< float > floats)
 
void WriteVarsToCTX (ParamsWriteContext ctx)
 
bool ReadVarsFromCTX (ParamsReadContext ctx, int version=-1)
 
void SaveVariables (ParamsWriteContext ctx)
 
bool LoadVariables (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 ()
 
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)
 
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)
 
override int GetQuantityMax ()
 
override int GetTargetQuantityMax (int attSlotID=-1)
 
int GetQuantityMin ()
 
int GetQuantityInit ()
 
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.
 
void SetVariableMask (int variable)
 
void RemoveItemVariable (int variable)
 Removes variable from variable mask, making it appear as though the variable has never been changed from default.
 
bool IsVariableSet (int variable)
 'true' if this variable has ever been changed from default
 
override void ClearInventory ()
 
float GetEnergy ()
 
override void OnEnergyConsumed ()
 
override void OnEnergyAdded ()
 
void ConvertEnergyToQuantity ()
 
override void SetTemperature (float value, bool allow_client=false)
 
override void AddTemperature (float value)
 
override void SetTemperatureMax ()
 
override float GetTemperature ()
 
override float GetTemperatureInit ()
 
override float GetTemperatureMin ()
 
override float GetTemperatureMax ()
 
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 ()
 
bool IsServerCheck (bool allow_client)
 
float GetItemModelLength ()
 
float GetItemAttachOffset ()
 
void SetCleanness (int value, bool allow_client=false)
 
bool AllowFoodConsumption ()
 
int GetLockType ()
 
string GetLockSoundSet ()
 
void SetColor (int r, int g, int b, int a)
 
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)".
 
void SetLiquidType (int value, bool allow_client=false)
 
int GetLiquidTypeInit ()
 
int GetLiquidType ()
 
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)
 
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 ()
 
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 ProcessItemWetnessAndTemperature (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 ()
 
bool CanHaveTemperature ()
 
override void OnCEUpdate ()
 
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)
 
bool CanBeUsedForSuicide ()
 

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

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 = new array<int>
 
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
 

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

TInputActionMap m_InputActionMap
 
bool m_ActionsInitialize
 
bool m_RecipesInitialized
 
int m_VariablesMask
 
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_VarTemperature
 
float m_VarTemperatureInit
 
float m_VarTemperatureMin
 
float m_VarTemperatureMax
 
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_VarLiquidType
 
int m_ItemBehaviour = -1
 
int m_QuickBarBonus = 0
 
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 = false
 
bool m_CanThisBeSplit = false
 
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
 

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

static ref map< typename, ref TInputActionMapm_ItemTypeActionsMap = new map<typename, ref TInputActionMap>
 
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
727 {
728 #ifndef SERVER
731 #endif
732
733 if (GetGame() && GetGame().GetPlayer() && (!GetGame().IsDedicatedServer()))
734 {
736 int r_index = player.GetHumanInventory().FindUserReservedLocationIndex(this);
737
738 if (r_index >= 0)
739 {
741 player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
742
743 player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
744 int r_type = r_il.GetType();
745 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
746 {
747 r_il.GetParent().GetOnReleaseLock().Invoke(this);
748 }
749 else if (r_type == InventoryLocationType.ATTACHMENT)
750 {
751 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
752 }
753
754 }
755
756 player.GetHumanInventory().ClearUserReservedLocation(this);
757 }
758
760 }
InventoryLocationType
types of Inventory Location
Definition InventoryLocation.c:4
PlayerBase GetPlayer()
Definition ModifierBase.c:47
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:83
ref EffectSound m_LockingSound
Definition ItemBase.c:136
InventoryLocation.
Definition InventoryLocation.c:28
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:267
proto native CGame GetGame()

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

Методы

◆ AddAction()

void AddAction ( typename actionName )
inlineprotected
325 {
326 ActionBase action = ActionManagerBase.GetAction(actionName);
327
328 if (!action)
329 {
330 Debug.LogError("Action " + actionName + " dosn't exist!");
331 return;
332 }
333
334 typename ai = action.GetInputType();
335 if (!ai)
336 {
337 m_ActionsInitialize = false;
338 return;
339 }
340
342 if (!action_array)
343 {
346 }
348 {
349 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action");
350 }
351
352 if (action_array.Find(action) != -1)
353 {
354 Debug.Log("Action " + action.Type() + " already added to " + this + ", skipping!");
355 }
356 else
357 {
358 action_array.Insert(action);
359 }
360 }
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:148
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:378
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:16
bool m_ActionsInitialize
Definition ItemBase.c:17
Definition Debug.c:735
static bool IsActionLogEnable()
Definition Debug.c:779

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

◆ AddDebugActionsMask()

static void AddDebugActionsMask ( int mask)
inlinestaticprotected
781 {
782 ItemBase.m_DebugActionsMask |= mask;
783 }
Definition InventoryItem.c:731

◆ AddLightSourceItem()

void AddLightSourceItem ( ItemBase lightsource)
inlineprotected

Adds a light source child.

4649 {
4651 }
ItemBase m_LightSourceItem
Definition ItemBase.c:94

Перекрестные ссылки 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

3249 {
3251 }
override float GetQuantity()
Definition ItemBase.c:3343
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:3186

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

◆ AddTemperature()

override void AddTemperature ( float value)
inlineprotected
3543 {
3545 }
override void SetTemperature(float value, bool allow_client=false)
Definition ItemBase.c:3526
override float GetTemperature()
Definition ItemBase.c:3552

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

◆ AddWet()

override void AddWet ( float value)
inlineprotected
3620 {
3621 SetWet(GetWet() + value);
3622 }
override void SetWet(float value, bool allow_client=false)
Definition ItemBase.c:3600
override float GetWet()
Definition ItemBase.c:3629

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

◆ AfterStoreLoad()

override void AfterStoreLoad ( )
inlineprotected
3096 {
3097 super.AfterStoreLoad();
3098
3100 {
3102 }
3103
3104 if (m_StoreLoadedQuantity != float.LOWEST)
3105 {
3107 m_StoreLoadedQuantity = float.LOWEST;//IMPORTANT to do this !! we use 'm_StoreLoadedQuantity' inside SetQuantity to distinguish between initial quantity setting and the consequent(normal gameplay) calls
3108 }
3109 }
@ LOWEST
Definition PPEConstants.c:53
float m_StoreLoadedQuantity
Definition ItemBase.c:36
void PerformDamageSystemReinit()
Definition ItemBase.c:4478
bool m_FixDamageSystemInit
Definition ItemBase.c:74
const float LOWEST
Definition EnConvert.c:100

Перекрестные ссылки float::LOWEST, LOWEST, m_FixDamageSystemInit, m_StoreLoadedQuantity, PerformDamageSystemReinit() и SetQuantity().

◆ AllowFoodConsumption()

bool AllowFoodConsumption ( )
inlineprotected
3720 {
3721 return true;
3722 }

◆ CanBeCombined()

override bool CanBeCombined ( EntityAI other_item,
bool reservation_check = true,
bool stack_max_limit = false )
inlineprotected
1984 {
1985 //Print("CanBeCombined - " + this + ": " + GetQuantity() + " + " + other_item + ": " + other_item.GetQuantity());
1986 //TODO: delete check zero quantity check after fix double posts hands fsm events
1987 if (!other_item || GetType() != other_item.GetType() || (IsFullQuantity() && other_item.GetQuantity() > 0) || other_item == this)
1988 return false;
1989
1990 if (GetHealthLevel() == GameConstants.STATE_RUINED || other_item.GetHealthLevel() == GameConstants.STATE_RUINED)
1991 return false;
1992
1993 //can_this_be_combined = ConfigGetBool("canBeSplit");
1995 return false;
1996
1997
1998 Magazine mag = Magazine.Cast(this);
1999 if (mag)
2000 {
2001 if (mag.GetAmmoCount() >= mag.GetAmmoMax())
2002 return false;
2003
2004 if (stack_max_limit)
2005 {
2007 if (other_item)
2008 {
2009 if (mag.GetAmmoCount() + other_mag.GetAmmoCount() > mag.GetAmmoMax())
2010 return false;
2011 }
2012
2013 }
2014 }
2015 else
2016 {
2017 //TODO: delete check zero quantity check after fix double posts hands fsm events
2018 if (GetQuantity() >= GetQuantityMax() && other_item.GetQuantity() > 0 )
2019 return false;
2020
2021 if (stack_max_limit && (GetQuantity() + other_item.GetQuantity() > GetQuantityMax()))
2022 return false;
2023 }
2024
2026 if (CastTo(player, GetHierarchyRootPlayer())) //false when attached to player's attachment slot
2027 {
2028 if (player.GetInventory().HasAttachment(this))
2029 return false;
2030
2031 if (player.IsItemsToDelete())
2032 return false;
2033 }
2034
2035 if (reservation_check && (GetInventory().HasInventoryReservation(this, null) || other_item.GetInventory().HasInventoryReservation(other_item, null)))
2036 return false;
2037
2038 int slotID;
2039 string slotName;
2040 if (GetInventory().GetCurrentAttachmentSlotInfo(slotID,slotName) && GetHierarchyParent().GetInventory().GetSlotLock(slotID))
2041 return false;
2042
2043 return true;
2044 }
eBleedingSourceType GetType()
Definition BleedingSource.c:63
PlayerSpawnPreset slotName
Definition constants.c:615
bool IsFullQuantity()
Definition ItemBase.c:3348
bool can_this_be_combined
Definition ItemBase.c:75
override int GetQuantityMax()
Definition ItemBase.c:3289
const int STATE_RUINED
Definition constants.c:760

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

◆ CanBeCooked()

bool CanBeCooked ( )
inlineprotected
2393 {
2394 return false;
2395 }

◆ CanBeCookedOnStick()

bool CanBeCookedOnStick ( )
inlineprotected
2398 {
2399 return false;
2400 }

◆ CanBeDigged()

bool CanBeDigged ( )
inlineprotected
981 {
982 return m_CanBeDigged;
983 }
bool m_CanBeDigged
Definition ItemBase.c:80

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

◆ CanBeDisinfected()

bool CanBeDisinfected ( )
inlineprotected
3125 {
3126 return false;
3127 }

◆ CanBeMovedOverride()

bool CanBeMovedOverride ( )
inlineprotected
2433 {
2434 return m_CanBeMovedOverride;
2435 }
bool m_CanBeMovedOverride
Definition ItemBase.c:73

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

◆ CanBeRepairedByCrafting()

bool CanBeRepairedByCrafting ( )
inlineprotected
937 {
938 return true;
939 }

◆ CanBeSplit()

override bool CanBeSplit ( )
inlineprotected
1529 {
1530 if (m_CanThisBeSplit)
1531 return (GetQuantity() > 1);
1532
1533 return false;
1534 }
bool m_CanThisBeSplit
Definition ItemBase.c:76

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

◆ CanBeUsedForSuicide()

bool CanBeUsedForSuicide ( )
inlineprotected
4708 {
4709 return true;
4710 }

◆ CanDecay()

bool CanDecay ( )
inlineprotected
4581 {
4582 // return true used on selected food clases so they can decay
4583 return false;
4584 }

◆ CanDisplayCargo()

override bool CanDisplayCargo ( )
inlineprotected
4032 {
4033 return IsOpen();
4034 }
bool IsOpen()
Definition ItemBase.c:4026

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

◆ CanEat()

bool CanEat ( )
inlineprotected
2374 {
2375 return true;
2376 }

◆ CanExplodeInFire()

bool CanExplodeInFire ( )
inlineprotected
2368 {
2369 return false;
2370 }

◆ CanHaveTemperature()

bool CanHaveTemperature ( )
inlineprotected
4600 {
4601 // return true used on selected items that have a temperature effect
4602 return false;
4603 }

◆ CanHaveWetness()

bool CanHaveWetness ( )
inlineprotected
4594 {
4595 // return true used on selected items that have a wetness effect
4596 return false;
4597 }

◆ CanMakeGardenplot()

bool CanMakeGardenplot ( )
inlineprotected
986 {
987 return false;
988 }

◆ CanObstruct()

override bool CanObstruct ( )
inlineprotected
954 {
955 PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
956 return !player || !IsPlayerInside(player, "");
957 }
DayZGame g_Game
Definition DayZGame.c:3746
bool IsPlayerInside(PlayerBase player, string selection)
Definition ItemBase.c:948

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

◆ CanPlayDeployLoopSound()

bool CanPlayDeployLoopSound ( )
inlineprotected
4407 {
4408 return IsBeingPlaced() && IsSoundSynchRemote();
4409 }
override bool IsBeingPlaced()
Definition ItemBase.c:959
bool IsSoundSynchRemote()
Definition ItemBase.c:4319

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

◆ CanProcessDecay()

bool CanProcessDecay ( )
inlineprotected
4587 {
4588 // this is stub, implemented on Edible_Base class
4589 // used to determine whether it is still necessary for the food to decay
4590 return false;
4591 }

◆ CanPutAsAttachment()

override bool CanPutAsAttachment ( EntityAI parent)
inlineprotected
4055 {
4056 if (!super.CanPutAsAttachment(parent))
4057 {
4058 return false;
4059 }
4060
4061 if (!IsRuined() && !parent.IsRuined())
4062 {
4063 return true;
4064 }
4065
4066 return false;
4067 }

◆ CanPutInCargo()

override bool CanPutInCargo ( EntityAI parent)
inlineprotected
4041 {
4042 if (parent)
4043 {
4044 if (parent.IsInherited(DayZInfected))
4045 return true;
4046
4047 if (!parent.IsRuined())
4048 return true;
4049 }
4050
4051 return true;
4052 }
Definition ZombieBase.c:2

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected
4079 {
4080 //removed 15.06. coz of loading from storage -> after load items in cargo was lost -> waiting for proper solution
4081 //if (GetHealthLevel() == GameConstants.STATE_RUINED)
4082 // return false;
4083
4084 GameInventory attachmentInv = attachment.GetInventory();
4085 if (attachmentInv && attachmentInv.GetCargo() && attachmentInv.GetCargo().GetItemCount() > 0)
4086 {
4087 if (GetHierarchyParent() && !GetHierarchyParent().IsInherited(PlayerBase))
4088 return false;
4089 }
4090
4092 attachment.GetInventory().GetCurrentInventoryLocation(loc);
4093 if (loc && loc.IsValid() && !GetInventory().AreChildrenAccessible())
4094 return false;
4095
4096 return super.CanReceiveAttachment(attachment, slotId);
4097 }
script counterpart to engine's class Inventory
Definition Inventory.c:79

◆ CanReceiveItemIntoCargo()

override bool CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected
4070 {
4071 //removed 15.06. coz of loading from storage -> after load items in cargo was lost -> waiting for proper solution
4072 //if (GetHealthLevel() == GameConstants.STATE_RUINED)
4073 // return false;
4074
4075 return super.CanReceiveItemIntoCargo(item);
4076 }

◆ CanReleaseAttachment()

override bool CanReleaseAttachment ( EntityAI attachment)
inlineprotected
4100 {
4101 if (!super.CanReleaseAttachment(attachment))
4102 return false;
4103
4104 return GetInventory().AreChildrenAccessible();
4105 }

◆ CanRepair()

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

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

◆ ChangeIntoOnAttach()

override string ChangeIntoOnAttach ( string slot)
inlineprotected
1352 {
1353 int idx;
1356
1357 ConfigGetTextArray("ChangeInventorySlot",inventory_slots);
1358 if (inventory_slots.Count() < 1) //is string
1359 {
1360 inventory_slots.Insert(ConfigGetString("ChangeInventorySlot"));
1361 attach_types.Insert(ConfigGetString("ChangeIntoOnAttach"));
1362 }
1363 else //is array
1364 {
1365 ConfigGetTextArray("ChangeIntoOnAttach",attach_types);
1366 }
1367
1368 idx = inventory_slots.Find(slot);
1369 if (idx < 0)
1370 return "";
1371
1372 return attach_types.Get(idx);
1373 }
array< string > TStringArray
Definition EnScript.c:685

◆ ChangeIntoOnDetach()

override string ChangeIntoOnDetach ( )
inlineprotected
1376 {
1377 int idx = -1;
1378 string slot;
1379
1382
1383 this.ConfigGetTextArray("ChangeInventorySlot",inventory_slots);
1384 if (inventory_slots.Count() < 1) //is string
1385 {
1386 inventory_slots.Insert(this.ConfigGetString("ChangeInventorySlot"));
1387 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1388 }
1389 else //is array
1390 {
1391 this.ConfigGetTextArray("ChangeIntoOnDetach",detach_types);
1392 if (detach_types.Count() < 1)
1393 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1394 }
1395
1396 for (int i = 0; i < inventory_slots.Count(); i++)
1397 {
1398 slot = inventory_slots.Get(i);
1399 }
1400
1401 if (slot != "")
1402 {
1403 if (detach_types.Count() == 1)
1404 idx = 0;
1405 else
1406 idx = inventory_slots.Find(slot);
1407 }
1408 if (idx < 0)
1409 return "";
1410
1411 return detach_types.Get(idx);
1412 }

◆ CheckOverheating()

void CheckOverheating ( ItemBase weapon = null,
string ammoType = "",
ItemBase muzzle_owner = null,
ItemBase suppressor = null,
string config_to_search = "" )
inlineprotected
527 {
530
533
536
538 {
540 }
541 }
void UpdateOverheating(ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
Definition ItemBase.c:578
float m_OverheatingShots
Definition ItemBase.c:117
int m_ShotsToStartOverheating
Definition ItemBase.c:119
void StopOverheating(ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
Definition ItemBase.c:585
void StartOverheating(ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
Definition ItemBase.c:572
int m_MaxOverheatingValue
Definition ItemBase.c:120
bool IsOverheatingEffectActive()
Definition ItemBase.c:543

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

◆ ClearInventory()

override void ClearInventory ( )
inlineprotected
3468 {
3469 if ((GetGame().IsServer() || !GetGame().IsMultiplayer()) && GetInventory())
3470 {
3471 GameInventory inv = GetInventory();
3473 inv.EnumerateInventory(InventoryTraversalType.INORDER, items);
3474 for (int i = 0; i < items.Count(); i++)
3475 {
3476 ItemBase item = ItemBase.Cast(items.Get(i));
3477 if (item)
3478 {
3479 GetGame().ObjectDelete(item);
3480 }
3481 }
3482 }
3483 }
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
2086 {
2087 if (!CanBeCombined(other_item, false))
2088 return;
2089
2090 if (!IsMagazine() && other_item)
2091 {
2093 if (quantity_used != 0)
2094 {
2095 float hp1 = GetHealth01("","");
2096 float hp2 = other_item.GetHealth01("","");
2097 float hpResult = ((hp1*GetQuantity()) + (hp2*quantity_used));
2099
2100 hpResult *= GetMaxHealth();
2102 SetHealth("", "Health", hpResult);
2103
2105 other_item.AddQuantity(-quantity_used);
2106 }
2107 }
2109 }
void OnCombine(ItemBase other_item)
Definition ItemBase.c:2111
float ComputeQuantityUsedEx(ItemBase other_item, bool use_stack_max=true)
Definition ItemBase.c:2066
override bool CanBeCombined(EntityAI other_item, bool reservation_check=true, bool stack_max_limit=false)
Definition ItemBase.c:1983
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:3248
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
863 {
864 /*
865 ref Param1<EntityAI> item = new Param1<EntityAI>(entity2);
866 RPCSingleParam(ERPCs.RPC_ITEM_COMBINE, item, GetGame().GetPlayer());
867 */
869
870 if (GetGame().IsClient())
871 {
873 {
876 ctx.Write(-1);
877 ItemBase i1 = this; // @NOTE: workaround for correct serialization
878 ctx.Write(i1);
879 ctx.Write(item2);
880 ctx.Write(use_stack_max);
881 ctx.Write(-1);
882 ctx.Send();
883
885 {
886 GetGame().GetPlayer().GetInventory().AddInventoryReservationEx(item2,null,GameInventory.c_InventoryReservationTimeoutShortMS);
887 }
888 }
889 }
890 else if (!GetGame().IsMultiplayer())
891 {
893 }
894 }
const int INPUT_UDT_ITEM_MANIPULATION
Definition _constants.c:8
const int c_InventoryReservationTimeoutShortMS
Definition Inventory.c:714
bool IsCombineAll(ItemBase other_item, bool use_stack_max=false)
Definition ItemBase.c:2046
void CombineItems(ItemBase other_item, bool use_stack_max=true)
Definition ItemBase.c:2085
Definition gameplay.c:121
proto static native bool CanStoreInputUserData()

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

◆ ComputeQuantityUsed()

int ComputeQuantityUsed ( ItemBase other_item,
bool use_stack_max = true )
inlineprotected
2062 {
2064 }

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

◆ ComputeQuantityUsedEx()

float ComputeQuantityUsedEx ( ItemBase other_item,
bool use_stack_max = true )
inlineprotected
2067 {
2068 float other_item_quantity = other_item.GetQuantity();
2069 float this_free_space;
2070
2071 float stack_max = GetQuantityMax();
2072
2074
2076 {
2077 return this_free_space;
2078 }
2079 else
2080 {
2081 return other_item_quantity;
2082 }
2083 }

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

◆ ContainsAgent()

bool ContainsAgent ( int agent_id)
inlineprotected
3862 {
3864 {
3865 return true;
3866 }
3867 else
3868 {
3869 return false;
3870 }
3871 }
int m_AttachedAgents
Definition ItemBase.c:102

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

◆ ConvertEnergyToQuantity()

void ConvertEnergyToQuantity ( )
inlineprotected
3515 {
3516 if (GetGame().IsServer() && HasEnergyManager() && GetCompEM().HasConversionOfEnergyToQuantity())
3517 {
3518 if (HasQuantity())
3519 {
3520 float energy_0to1 = GetCompEM().GetEnergy0To1();
3522 }
3523 }
3524 }
bool HasQuantity()
Definition ItemBase.c:3338
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:3266

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

◆ CopyScriptPropertiesFrom()

void CopyScriptPropertiesFrom ( EntityAI oldItem)
inlineprotected
4643 {
4644 MiscGameplayFunctions.TransferItemProperties(oldItem, this);
4645 }

◆ DamageItemAttachments()

bool DamageItemAttachments ( float damage)
inlineprotected
1512 {
1513 int attachment_count = GetInventory().AttachmentCount();
1514 if (attachment_count > 0)
1515 {
1517 ItemBase attachment = ItemBase.Cast(GetInventory().GetAttachmentFromIndex(random_pick));
1518 if (!attachment.IsExplosive())
1519 {
1520 attachment.AddHealth("","",damage);
1521 return true;
1522 }
1523 }
1524 return false;
1525 }
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
1493 {
1494 if (GetInventory().GetCargo())
1495 {
1496 int item_count = GetInventory().GetCargo().GetItemCount();
1497 if (item_count > 0)
1498 {
1500 ItemBase item = ItemBase.Cast(GetInventory().GetCargo().GetItem(random_pick));
1501 if (!item.IsExplosive())
1502 {
1503 item.AddHealth("","",damage);
1504 return true;
1505 }
1506 }
1507 }
1508 return false;
1509 }
EntityAI GetItem()
Definition RadialQuickbarMenu.c:37

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

◆ DeSerializeNumericalVars()

void DeSerializeNumericalVars ( array< float > floats)
inlineprotected
2686 {
2687 // the order of serialization must be the same as the order of de-serialization
2688 int index = 0;
2689 int mask = Math.Round(floats.Get(index));
2690
2691 index++;
2692 //--------------------------------------------
2693 if (mask & VARIABLE_QUANTITY)
2694 {
2695 if (m_IsStoreLoad)
2696 {
2698 }
2699 else
2700 {
2701 float quantity = floats.Get(index);
2702 SetQuantity(quantity, true, false, false, false);
2703 }
2704 index++;
2705 }
2706 //--------------------------------------------
2708 {
2709 float temperature = floats.Get(index);
2711 index++;
2712 }
2713 //--------------------------------------------
2714 if (mask & VARIABLE_WET)
2715 {
2716 float wet = floats.Get(index);
2717 SetWet(wet);
2718 index++;
2719 }
2720 //--------------------------------------------
2722 {
2723 int liquidtype = Math.Round(floats.Get(index));
2725 index++;
2726 }
2727 //--------------------------------------------
2728 if (mask & VARIABLE_COLOR)
2729 {
2731 index++;
2733 index++;
2735 index++;
2737 index++;
2738 }
2740 {
2741 int cleanness = Math.Round(floats.Get(index));
2743 index++;
2744 }
2745 //--------------------------------------------
2746 }
int m_ColorComponentR
Definition ItemBase.c:87
void SetCleanness(int value, bool allow_client=false)
Definition ItemBase.c:3705
int m_ColorComponentG
Definition ItemBase.c:88
int m_ColorComponentA
Definition ItemBase.c:90
void SetLiquidType(int value, bool allow_client=false)
Definition ItemBase.c:3776
bool m_IsStoreLoad
Definition ItemBase.c:77
int m_ColorComponentB
Definition ItemBase.c:89
const int VARIABLE_LIQUIDTYPE
Definition constants.c:586
const int VARIABLE_CLEANNESS
Definition constants.c:589
const int VARIABLE_COLOR
Definition constants.c:588
const int VARIABLE_TEMPERATURE
Definition constants.c:584
const int VARIABLE_QUANTITY
Definition constants.c:582
const int VARIABLE_WET
Definition constants.c:585

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

◆ DoAmmoExplosion()

void DoAmmoExplosion ( )
inlineprotected
1428 {
1429 Magazine magazine = Magazine.Cast(this);
1430 int pop_sounds_count = 6;
1431 string pop_sounds[ 6 ] = { "ammopops_1","ammopops_2","ammopops_3","ammopops_4","ammopops_5","ammopops_6" };
1432
1433 //play sound
1435 string sound_name = pop_sounds[ sound_idx ];
1436 GetGame().CreateSoundOnObject(this, sound_name, 20, false);
1437
1438 //remove ammo count
1439 magazine.ServerAddAmmoCount(-1);
1440
1441 //if condition then repeat -> ExplodeAmmo
1442 float min_temp_to_explode = 100; //min temperature for item to explode
1443
1444 if (magazine.GetAmmoCount() > 0 && GetTemperature() >= min_temp_to_explode) //TODO ? add check for parent -> fireplace
1445 {
1446 ExplodeAmmo();
1447 }
1448 }
void ExplodeAmmo()
Definition ItemBase.c:1414

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

◆ EEDelete()

override void EEDelete ( EntityAI parent)
inlineprotected
1274 {
1275 super.EEDelete(parent);
1276 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
1277 if (player)
1278 {
1280
1281 if (player.IsAlive())
1282 {
1283 int r_index = player.GetHumanInventory().FindUserReservedLocationIndex(this);
1284 if (r_index >= 0)
1285 {
1287 player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
1288
1289 player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
1290 int r_type = r_il.GetType();
1291 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
1292 {
1293 r_il.GetParent().GetOnReleaseLock().Invoke(this);
1294 }
1295 else if (r_type == InventoryLocationType.ATTACHMENT)
1296 {
1297 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
1298 }
1299
1300 }
1301
1302 player.RemoveQuickBarEntityShortcut(this);
1303 }
1304 }
1305 }
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:3816

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

◆ EEHealthLevelChanged()

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

drops content of container when ruined in fireplace

1884 {
1885 super.EEHealthLevelChanged(oldLevel,newLevel,zone);
1886
1887 if (GetGame().IsServer())
1888 {
1890 {
1892 EntityAI parent = GetHierarchyParent();
1893 if (parent && parent.IsFireplace())
1894 {
1895 CargoBase cargo = GetInventory().GetCargo();
1896 if (cargo)
1897 {
1898 for (int i = 0; i < cargo.GetItemCount(); ++i)
1899 {
1900 parent.GetInventory().TakeEntityToInventory(InventoryMode.SERVER, FindInventoryLocationType.CARGO, cargo.GetItem(i));
1901 }
1902 }
1903 }
1904 }
1905
1906 if (IsResultOfSplit())
1907 {
1908 // reset the splitting result flag, return to normal item behavior
1909 SetResultOfSplit(false);
1910 return;
1911 }
1912
1913 if (m_Cleanness != 0 && oldLevel < newLevel && newLevel != 0)
1914 {
1915 SetCleanness(0);//unclean the item upon damage dealt
1916 }
1917 }
1918 }
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:16
represents base for cargo storage for entities
Definition Cargo.c:7
Definition Building.c:6
void SetResultOfSplit(bool value)
Definition ItemBase.c:2056
int m_Cleanness
Definition ItemBase.c:49
bool IsResultOfSplit()
Definition ItemBase.c:2051

Перекрестные ссылки 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
1452 {
1454
1455 const int CHANCE_DAMAGE_CARGO = 4;
1456 const int CHANCE_DAMAGE_ATTACHMENT = 1;
1457 const int CHANCE_DAMAGE_NOTHING = 2;
1458
1459 if (IsClothing() || IsContainer() || IsItemTent())
1460 {
1461 float dmg = damageResult.GetDamage("","Health") * -0.5;
1462 int chances;
1463 int rnd;
1464
1465 if (GetInventory().GetCargo())
1466 {
1469
1471 {
1473 }
1474 else if (rnd < (chances - CHANCE_DAMAGE_NOTHING))
1475 {
1477 }
1478 }
1479 else
1480 {
1483
1485 {
1487 }
1488 }
1489 }
1490 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
bool DamageItemInCargo(float damage)
Definition ItemBase.c:1492
bool DamageItemAttachments(float damage)
Definition ItemBase.c:1511

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

◆ EEItemLocationChanged()

override void EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected
1038 {
1039 super.EEItemLocationChanged(oldLoc,newLoc);
1040
1043
1044 if (newLoc.GetParent())
1045 new_player = PlayerBase.Cast(newLoc.GetParent().GetHierarchyRootPlayer());
1046
1047 if (oldLoc.GetParent())
1048 old_player = PlayerBase.Cast(oldLoc.GetParent().GetHierarchyRootPlayer());
1049
1050 if (old_player && oldLoc.GetType() == InventoryLocationType.HANDS)
1051 {
1052 int r_index = old_player.GetHumanInventory().FindUserReservedLocationIndex(this);
1053
1054 if (r_index >= 0)
1055 {
1057 old_player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
1058
1059 old_player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
1060 int r_type = r_il.GetType();
1061 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
1062 {
1063 r_il.GetParent().GetOnReleaseLock().Invoke(this);
1064 }
1065 else if (r_type == InventoryLocationType.ATTACHMENT)
1066 {
1067 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
1068 }
1069
1070 }
1071 }
1072
1073 if (newLoc.GetType() == InventoryLocationType.HANDS)
1074 {
1075 if (new_player)
1076 new_player.ForceStandUpForHeavyItems(newLoc.GetItem());
1077
1078 if (new_player == old_player)
1079 {
1080
1081 if (oldLoc.GetParent() && new_player.GetHumanInventory().LocationGetEntity(oldLoc) == NULL)
1082 {
1083 if (oldLoc.GetType() == InventoryLocationType.CARGO)
1084 {
1085 if (oldLoc.GetParent().GetInventory().TestAddEntityInCargoExLoc(oldLoc, false, false, false, true, false, false))
1086 {
1087 new_player.GetHumanInventory().SetUserReservedLocation(this,oldLoc);
1088 }
1089 }
1090 else
1091 {
1092 new_player.GetHumanInventory().SetUserReservedLocation(this,oldLoc);
1093 }
1094 }
1095
1096 if (new_player.GetHumanInventory().FindUserReservedLocationIndex(this) >= 0)
1097 {
1098 int type = oldLoc.GetType();
1099 if (type == InventoryLocationType.CARGO || type == InventoryLocationType.PROXYCARGO)
1100 {
1101 oldLoc.GetParent().GetOnSetLock().Invoke(this);
1102 }
1103 else if (type == InventoryLocationType.ATTACHMENT)
1104 {
1105 oldLoc.GetParent().GetOnAttachmentSetLock().Invoke(this, oldLoc.GetSlot());
1106 }
1107 }
1108 if (!m_OldLocation)
1109 {
1110 m_OldLocation = new InventoryLocation;
1111 }
1112 m_OldLocation.Copy(oldLoc);
1113 }
1114 else
1115 {
1116 if (m_OldLocation)
1117 {
1118 m_OldLocation.Reset();
1119 }
1120 }
1121
1122 GetGame().GetAnalyticsClient().OnItemAttachedAtPlayer(this,"Hands");
1123 }
1124 else
1125 {
1126 if (new_player)
1127 {
1128 int res_index = new_player.GetHumanInventory().FindCollidingUserReservedLocationIndex(this, newLoc);
1129 if (res_index >= 0)
1130 {
1132 new_player.GetHumanInventory().GetUserReservedLocation(res_index,il);
1133 ItemBase it = ItemBase.Cast(il.GetItem());
1134 new_player.GetHumanInventory().ClearUserReservedLocationAtIndex(res_index);
1135 int rel_type = il.GetType();
1136 if (rel_type == InventoryLocationType.CARGO || rel_type == InventoryLocationType.PROXYCARGO)
1137 {
1138 il.GetParent().GetOnReleaseLock().Invoke(it);
1139 }
1140 else if (rel_type == InventoryLocationType.ATTACHMENT)
1141 {
1142 il.GetParent().GetOnAttachmentReleaseLock().Invoke(it, il.GetSlot());
1143 }
1144 //it.GetOnReleaseLock().Invoke(it);
1145 }
1146 }
1147 else if (old_player && newLoc.GetType() == InventoryLocationType.GROUND && m_ThrowItemOnDrop)
1148 {
1149 //Print("---ThrowPhysically---");
1150 //ThrowPhysically(old_player, vector.Zero);
1151 m_ThrowItemOnDrop = false;
1152 }
1153
1154 if (m_OldLocation)
1155 {
1156 m_OldLocation.Reset();
1157 }
1158 }
1159 }
bool m_ThrowItemOnDrop
Definition ItemBase.c:71
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

1308 {
1309 super.EEKilled(killer);
1310
1312 if (killer && killer.IsFireplace() && CanExplodeInFire())
1313 {
1315 {
1316 if (IsMagazine())
1317 {
1318 if (Magazine.Cast(this).GetAmmoCount() > 0)
1319 {
1320 ExplodeAmmo();
1321 }
1322 }
1323 else
1324 {
1325 Explode(DamageType.EXPLOSION);
1326 }
1327 }
1328 }
1329 }
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:2367
const float ITEM_TEMPERATURE_TO_EXPLODE_MIN
misc
Definition constants.c:873

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

◆ EEOnAfterLoad()

override void EEOnAfterLoad ( )
inlineprotected
3112 {
3113 super.EEOnAfterLoad();
3114
3116 {
3117 m_FixDamageSystemInit = false;
3118 }
3119
3121 GetRemotelyActivatedItemBehaviour().OnAfterLoad();
3122 }
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.

4011 {
4012 //Print("EEOnCECreate");
4013 if (!IsMagazine())
4015
4017 }
void SetZoneDamageCEInit()
Sets zone damages to match randomized global health set by CE (CE spawn only)
Definition ItemBase.c:4490
void SetCEBasedQuantity()
Definition ItemBase.c:803

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

◆ EOnContact()

override void EOnContact ( IEntity other,
Contact extra )
inlineprotected
1162 {
1164 {
1165 int liquidType = -1;
1166 float impactSpeed = ProcessImpactSoundEx(other, extra, m_ConfigWeight, m_ImpactSoundSurfaceHash, liquidType);
1167 if (impactSpeed > 0.0)
1168 {
1170 #ifndef SERVER
1171 PlayImpactSound(m_ConfigWeight, m_ImpactSpeed, m_ImpactSoundSurfaceHash);
1172 #else
1173 m_WantPlayImpactSound = true;
1174 SetSynchDirty();
1175 #endif
1176 m_CanPlayImpactSound = (liquidType == -1);// prevents further playing of the sound when the surface is a liquid type
1177 }
1178 }
1179
1180 #ifdef SERVER
1181 if (GetCompEM() && GetCompEM().IsPlugged())
1182 {
1183 if (GetCompEM().GetCordLength() < vector.Distance(GetPosition(), GetCompEM().GetEnergySource().GetPosition()))
1184 GetCompEM().UnplugThis();
1185 }
1186 #endif
1187 }
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
bool m_CanPlayImpactSound
Definition ItemBase.c:55
int m_ImpactSoundSurfaceHash
Definition ItemBase.c:57
bool m_WantPlayImpactSound
Definition ItemBase.c:54
float m_ImpactSpeed
Definition ItemBase.c:56
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
1415 {
1416 //timer
1418
1419 //min/max time
1420 float min_time = 1;
1421 float max_time = 3;
1423
1424 explode_timer.Run(delay, this, "DoAmmoExplosion");
1425 }
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
305 {
307 {
308 m_ActionsInitialize = true;
310 }
311
313 }
void InitializeActions()
Definition ItemBase.c:292

Перекрестные ссылки 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.

4671 {
4672 return false;
4673 }

◆ GetAgents()

override int GetAgents ( )
inlineprotected
3909 {
3910 return m_AttachedAgents;
3911 }

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

◆ GetAttachmentSoundType()

override string GetAttachmentSoundType ( )
inlineprotected
4297 {
4298 return m_SoundAttType;
4299 }
string m_SoundAttType
Definition ItemBase.c:85

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

◆ GetBandagingEffectivity()

float GetBandagingEffectivity ( )
inlineprotected
4456 {
4457 return 1.0;
4458 };

◆ GetColor()

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

gets item's color variable as components

3750 {
3755 }

Перекрестные ссылки 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)".

3764 {
3765 int r,g,b,a;
3766 GetColor(r,g,b,a);
3767 r = r/255;
3768 g = g/255;
3769 b = b/255;
3770 a = a/255;
3771 return MiscGameplayFunctions.GetColorString(r, g, b, a);
3772 }
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).
719 {
720 return -1;
721 }

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprotected
2141 {
2142 super.GetDebugActions(outputList);
2143
2144 //quantity
2145 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ADD_QUANTITY, "Quantity +20%", FadeColors.LIGHT_GREY));
2146 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.REMOVE_QUANTITY, "Quantity -20%", FadeColors.LIGHT_GREY));
2147 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SET_QUANTITY_0, "Set Quantity 0", FadeColors.LIGHT_GREY));
2148 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SET_MAX_QUANTITY, "Set Quantity Max", FadeColors.LIGHT_GREY));
2149
2150 //health
2151 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ADD_HEALTH, "Health +20%", FadeColors.LIGHT_GREY));
2152 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.REMOVE_HEALTH, "Health -20%", FadeColors.LIGHT_GREY));
2153 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.DESTROY_HEALTH, "Health 0", FadeColors.LIGHT_GREY));
2154 //temperature
2155 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ADD_TEMPERATURE, "Temperature +20", FadeColors.LIGHT_GREY));
2156 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.REMOVE_TEMPERATURE, "Temperature -20", FadeColors.LIGHT_GREY));
2157
2158 //wet
2159 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ADD_WETNESS, "Wetness +20", FadeColors.LIGHT_GREY));
2160 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.REMOVE_WETNESS, "Wetness -20", FadeColors.LIGHT_GREY));
2161
2162 //liquidtype
2163 if (IsLiquidContainer())
2164 {
2165 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.LIQUIDTYPE_UP, "LiquidType Next", FadeColors.LIGHT_GREY));
2166 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.LIQUIDTYPE_DOWN, "LiquidType Previous", FadeColors.LIGHT_GREY));
2167 }
2168
2169 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.MAKE_SPECIAL, "Make Special", FadeColors.LIGHT_GREY));
2170 // watch
2171 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.WATCH_ITEM, "Watch (CTRL-Z)", FadeColors.LIGHT_GREY));
2172 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.WATCH_PLAYER, "Watch Player", FadeColors.LIGHT_GREY));
2173
2177 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
bool IsLiquidContainer()
Definition ItemBase.c:902
const int SAT_DEBUG_ACTION
Definition constants.c:424

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

◆ GetDebugActionsMask()

static int GetDebugActionsMask ( )
inlinestaticprotected
766 {
767 return ItemBase.m_DebugActionsMask;
768 }

◆ GetDeployFinishSoundset()

string GetDeployFinishSoundset ( )
protected

◆ GetDeploySoundset()

string GetDeploySoundset ( )
protected

◆ GetDeployTime()

float GetDeployTime ( )
inlineprotected

how long it takes to deploy this item in seconds

4265 {
4267 }
Definition ActionConstants.c:27
const float DEFAULT_DEPLOY
Definition ActionConstants.c:37

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

◆ GetDisinfectQuantity()

float GetDisinfectQuantity ( int system = 0,
Param param1 = null )
inlineprotected
676 {
677 return 250;//default value
678 }

◆ GetDryingIncrement()

float GetDryingIncrement ( string pIncrementName)
inlineprotected
3583 {
3584 string paramPath = string.Format("CfgVehicles %1 EnvironmentWetnessIncrements Drying %2", GetType(), pIncrementName);
3585 if (GetGame().ConfigIsExisting(paramPath))
3586 return GetGame().ConfigGetFloat(paramPath);
3587
3588 return 0.0;
3589 }

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

◆ GetEnergy()

float GetEnergy ( )
inlineprotected
3489 {
3490 float energy = 0;
3491 if (HasEnergyManager())
3492 {
3493 energy = GetCompEM().GetEnergy();
3494 }
3495 return energy;
3496 }

◆ GetExplosiveTriggerSlotName()

string GetExplosiveTriggerSlotName ( )
inlineprotected
925 {
926 return "";
927 }

◆ GetFilterDamageRatio()

float GetFilterDamageRatio ( )
inlineprotected
681 {
682 return 0;
683 }

◆ GetHeadHidingSelection()

array< string > GetHeadHidingSelection ( )
inlineprotected
4461 {
4463 }
ref TStringArray m_HeadHidingSelections
Definition ItemBase.c:124

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

◆ GetHeatIsolation()

float GetHeatIsolation ( )
inlineprotected
3578 {
3579 return m_HeatIsolation;
3580 }
float m_HeatIsolation
Definition ItemBase.c:59

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

◆ GetHeatIsolationInit()

float GetHeatIsolationInit ( )
inlineprotected
3573 {
3574 return ConfigGetFloat("heatIsolation");
3575 }

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

670 {
671 return 0.0;
672 }

◆ GetItemAttachOffset()

float GetItemAttachOffset ( )
inlineprotected
3697 {
3698 if (ConfigIsExisting("itemAttachOffset"))
3699 {
3700 return ConfigGetFloat("itemAttachOffset");
3701 }
3702 return 0;
3703 }

◆ GetItemModelLength()

float GetItemModelLength ( )
inlineprotected
3688 {
3689 if (ConfigIsExisting("itemModelLength"))
3690 {
3691 return ConfigGetFloat("itemModelLength");
3692 }
3693 return 0;
3694 }

◆ GetItemSize()

int GetItemSize ( )
inlineprotected
2418 {
2419 /*
2420 vector v_size = this.ConfigGetVector("itemSize");
2421 int v_size_x = v_size[0];
2422 int v_size_y = v_size[1];
2423 int size = v_size_x * v_size_y;
2424 return size;
2425 */
2426
2427 return 1;
2428 }

◆ GetLight()

ScriptedLightBase GetLight ( )
protected

◆ GetLightSourceItem()

ItemBase GetLightSourceItem ( )
inlineprotected
4659 {
4660 return m_LightSourceItem;
4661 }

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

◆ GetLiquidType()

int GetLiquidType ( )
inlineprotected
3791 {
3792 return m_VarLiquidType;
3793 }
int m_VarLiquidType
Definition ItemBase.c:62

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

◆ GetLiquidTypeInit()

int GetLiquidTypeInit ( )
inlineprotected
3786 {
3787 return ConfigGetInt("varLiquidTypeInit");
3788 }

◆ GetLockSoundSet()

string GetLockSoundSet ( )
inlineprotected
3733 {
3734 return m_LockSoundSet;
3735 }
string m_LockSoundSet
Definition ItemBase.c:137

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

◆ GetLockType()

int GetLockType ( )
inlineprotected
3728 {
3729 return m_LockType;
3730 }
int m_LockType
Definition ItemBase.c:135

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

◆ GetLoopDeploySoundset()

string GetLoopDeploySoundset ( )
protected

◆ GetMuzzleID()

int GetMuzzleID ( )
inlineprotected

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

696 {
697 if (!m_WeaponTypeToID)
699
700 if (m_WeaponTypeToID.Contains(GetType()))
701 {
702 return m_WeaponTypeToID.Get(GetType());
703 }
704 else
705 {
706 // Register new weapon ID
708 }
709
711 }
static ref map< string, int > m_WeaponTypeToID
Definition ItemBase.c:112
static int m_LastRegisteredWeaponID
Definition ItemBase.c:113

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

◆ GetNumberOfItems()

int GetNumberOfItems ( )
inlineprotected

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

3408 {
3409 int item_count = 0;
3410 ItemBase item;
3411
3412 if (GetInventory().GetCargo() != NULL)
3413 {
3414 item_count = GetInventory().GetCargo().GetItemCount();
3415 }
3416
3417 for (int i = 0; i < GetInventory().AttachmentCount(); i++)
3418 {
3419 Class.CastTo(item,GetInventory().GetAttachmentFromIndex(i));
3420 if (item)
3421 item_count += item.GetNumberOfItems();
3422 }
3423 return item_count;
3424 }
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().

◆ GetOverheatingCoef()

float GetOverheatingCoef ( )
inlineprotected
606 {
607 if (m_MaxOverheatingValue > 0)
609
610 return -1;
611 }

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

◆ GetOverheatingValue()

float GetOverheatingValue ( )
inlineprotected
506 {
507 return m_OverheatingShots;
508 }

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

◆ GetPlaceSoundset()

string GetPlaceSoundset ( )
protected

◆ GetProtectionLevel()

float GetProtectionLevel ( int type,
bool consider_filter = false,
int system = 0 )
inlineprotected
3972 {
3973 if (IsDamageDestroyed() || (HasQuantity() && GetQuantity() <= 0))
3974 {
3975 return 0;
3976 }
3977
3978 if (GetInventory().GetAttachmentSlotsCount() != 0)//is it an item with attachable filter ?
3979 {
3980 ItemBase filter = ItemBase.Cast(FindAttachmentBySlotName("GasMaskFilter"));
3981 if (filter)
3982 return filter.GetProtectionLevel(type, false, system);//it's a valid filter, return the protection
3983 else
3984 return 0;//otherwise return 0 when no filter attached
3985 }
3986
3987 string subclassPath, entryName;
3988
3989 switch (type)
3990 {
3991 case DEF_BIOLOGICAL:
3992 entryName = "biological";
3993 break;
3994 case DEF_CHEMICAL:
3995 entryName = "chemical";
3996 break;
3997 default:
3998 entryName = "biological";
3999 break;
4000 }
4001
4002 subclassPath = "CfgVehicles " + this.GetType() + " Protection ";
4003
4004 return GetGame().ConfigGetFloat(subclassPath + entryName);
4005 }
bool IsDamageDestroyed(ActionTarget target)
Definition ActionBase.c:913
const int DEF_BIOLOGICAL
Definition constants.c:478
const int DEF_CHEMICAL
Definition constants.c:479

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

◆ GetQuantity()

override float GetQuantity ( )
inlineprotected
3344 {
3345 return m_VarQuantity;
3346 }
float m_VarQuantity
Definition ItemBase.c:29

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

◆ GetQuantityInit()

int GetQuantityInit ( )
inlineprotected
3333 {
3334 return m_VarQuantityInit;
3335 }
int m_VarQuantityInit
Definition ItemBase.c:31

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

◆ GetQuantityMax()

override int GetQuantityMax ( )
inlineprotected
3290 {
3291 float max = 0;
3292
3294 if (GetInventory())
3295 GetInventory().GetCurrentInventoryLocation(il);
3296
3297 int slot = il.GetSlot();
3298
3299 if (slot != -1)
3301
3302 if (max <= 0)
3304
3305 if (max <= 0)
3307
3308 return max;
3309 }
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(), m_VarQuantityMax и m_VarStackMax.

◆ GetQuantityMin()

int GetQuantityMin ( )
inlineprotected
3328 {
3329 return m_VarQuantityMin;
3330 }
int m_VarQuantityMin
Definition ItemBase.c:32

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

◆ GetQuantityNormalized()

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)

3276 {
3278 }
int GetQuantityMin()
Definition ItemBase.c:3327
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.

◆ GetQuickBarBonus()

override int GetQuickBarBonus ( )
inlineprotected
288 {
289 return m_QuickBarBonus;
290 }
int m_QuickBarBonus
Definition ItemBase.c:64

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

◆ GetRecipesActions()

void GetRecipesActions ( Man player,
out TSelectableActionInfoArray outputList )
inlineprotected
2120 {
2121 PlayerBase p = PlayerBase.Cast(player);
2122
2123 array<int> recipesIds = p.m_Recipes;
2124 PluginRecipesManager moduleRecipesManager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
2126 {
2127 EntityAI itemInHands = player.GetHumanInventory().GetEntityInHands();
2128 moduleRecipesManager.GetValidRecipes(ItemBase.Cast(this), ItemBase.Cast(itemInHands), recipesIds, p);
2129 }
2130
2131 for (int i = 0;i < recipesIds.Count(); i++)
2132 {
2133 int key = recipesIds.Get(i);
2134 string recipeName = moduleRecipesManager.GetRecipeName(key);
2136 }
2137 }
Param3 TSelectableActionInfo
const int SAT_CRAFTING
Definition constants.c:423

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

◆ GetSingleInventoryItemWeight()

float GetSingleInventoryItemWeight ( )
inlineprotected
3364 {
3366 }
override float GetSingleInventoryItemWeightEx()
Definition ItemBase.c:3354

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

◆ GetSingleInventoryItemWeightEx()

override float GetSingleInventoryItemWeightEx ( )
inlineprotected
3355 {
3356 //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
3357 float weightEx = GetWeightEx();//overall weight of the item
3358 float special = GetInventoryAndCargoWeight();//cargo and attachment weight
3359 return weightEx - special;
3360 }

◆ GetSoakingIncrement()

float GetSoakingIncrement ( string pIncrementName)
inlineprotected
3592 {
3593 string paramPath = string.Format("CfgVehicles %1 EnvironmentWetnessIncrements Soaking %2", GetType(), pIncrementName);
3594 if (GetGame().ConfigIsExisting(paramPath))
3595 return GetGame().ConfigGetFloat(paramPath);
3596
3597 return 0.0;
3598 }

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

◆ GetTargetQuantityMax()

override int GetTargetQuantityMax ( int attSlotID = -1)
inlineprotected
3312 {
3313 float quantity_max = 0;
3314
3315 if (attSlotID != -1)
3317
3318 if (quantity_max <= 0)
3320
3321 if (quantity_max <= 0)
3323
3324 return quantity_max;
3325 }

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

◆ GetTemperature()

override float GetTemperature ( )
inlineprotected
3553 {
3554 return m_VarTemperature;
3555 }
float m_VarTemperature
Definition ItemBase.c:38

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

◆ GetTemperatureInit()

override float GetTemperatureInit ( )
inlineprotected
3558 {
3559 return m_VarTemperatureInit;
3560 }
float m_VarTemperatureInit
Definition ItemBase.c:39

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

◆ GetTemperatureMax()

override float GetTemperatureMax ( )
inlineprotected
3568 {
3569 return m_VarTemperatureMax;
3570 }
float m_VarTemperatureMax
Definition ItemBase.c:41

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

◆ GetTemperatureMin()

override float GetTemperatureMin ( )
inlineprotected
3563 {
3564 return m_VarTemperatureMin;
3565 }
float m_VarTemperatureMin
Definition ItemBase.c:40

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

◆ GetUnitWeight()

float GetUnitWeight ( bool include_wetness = true)
inlineprotected

Obsolete, use GetWeightEx instead.

3428 {
3429 float weight = 0;
3430 float wetness = 1;
3431 if (include_wetness)
3432 wetness += GetWet();
3433 if (m_CanThisBeSplit) //quantity determines size of the stack
3434 {
3435 weight = wetness * m_ConfigWeight;
3436 }
3437 else if (ConfigGetFloat("liquidContainerType") > 0) //is a liquid container, default liquid weight is set to 1. May revisit later?
3438 {
3439 weight = 1;
3440 }
3441 return weight;
3442 }

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

◆ GetValidFinishers()

array< int > GetValidFinishers ( )
inlineprotected

returns an array of possible finishers

4665 {
4666 return null;
4667 }

◆ GetVariablesFloat()

array< float > GetVariablesFloat ( )
inlineprotected
2600 {
2604 }
Definition UtilityClasses.c:41
static ref TFloatArray ARRAY_FLOAT
Definition UtilityClasses.c:50
void SerializeNumericalVars(array< float > floats_out)
Definition ItemBase.c:2645

Перекрестные ссылки CachedObjectsArrays::ARRAY_FLOAT и SerializeNumericalVars().

◆ GetWeightSpecialized()

float GetWeightSpecialized ( bool forceRecalc = false)
inlineprotected
3369 {
3370 if (m_CanThisBeSplit) //quantity determines size of the stack
3371 {
3372 #ifdef DEVELOPER
3373 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3374 {
3375 WeightDebugData data1 = WeightDebug.GetWeightDebug(this);
3376 data1.SetCalcDetails("TIB1: " + GetConfigWeightModifiedDebugText() +" * " + GetQuantity()+"(quantity)");
3377 }
3378 #endif
3379
3380 return GetQuantity() * GetConfigWeightModified();
3381 }
3382 else if (HasEnergyManager())// items with energy manager
3383 {
3384 #ifdef DEVELOPER
3385 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3386 {
3387 WeightDebugData data2 = WeightDebug.GetWeightDebug(this);
3388 data2.SetCalcDetails("TIB2: "+super.GetWeightSpecialized(forceRecalc)+"(contents weight) + " + GetConfigWeightModifiedDebugText() +" + " + GetCompEM().GetEnergy()+"(energy) * " + ConfigGetFloat("weightPerQuantityUnit") +"(weightPerQuantityUnit)");
3389 }
3390 #endif
3391 return super.GetWeightSpecialized(forceRecalc) + (GetCompEM().GetEnergy() * ConfigGetFloat("weightPerQuantityUnit")) + GetConfigWeightModified());
3392 }
3393 else//everything else
3394 {
3395 #ifdef DEVELOPER
3396 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3397 {
3398 WeightDebugData data3 = WeightDebug.GetWeightDebug(this);
3399 data3.SetCalcDetails("TIB3: "+super.GetWeightSpecialized(forceRecalc)+"(contents weight) + " + GetConfigWeightModifiedDebugText() +" + " + GetQuantity()+"(quantity) * " + ConfigGetFloat("weightPerQuantityUnit") +"(weightPerQuantityUnit))");
3400 }
3401 #endif
3402 return super.GetWeightSpecialized(forceRecalc) + (GetQuantity() * ConfigGetFloat("weightPerQuantityUnit")) + GetConfigWeightModified());
3403 }
3404 }
float GetEnergy()
Definition ItemBase.c:3488
Definition Debug.c:940

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

◆ GetWet()

override float GetWet ( )
inlineprotected
3630 {
3631 return m_VarWet;
3632 }
float m_VarWet
Definition ItemBase.c:43

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

◆ GetWetInit()

override float GetWetInit ( )
inlineprotected
3645 {
3646 return m_VarWetInit;
3647 }
float m_VarWetInit
Definition ItemBase.c:45

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

◆ GetWetLevel()

override EWetnessLevel GetWetLevel ( )
inlineprotected
3665 {
3666 return GetWetLevelInternal(m_VarWet);
3667 }

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

◆ GetWetMax()

override float GetWetMax ( )
inlineprotected
3635 {
3636 return m_VarWetMax;
3637 }
float m_VarWetMax
Definition ItemBase.c:47

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

◆ GetWetMin()

override float GetWetMin ( )
inlineprotected
3640 {
3641 return m_VarWetMin;
3642 }
float m_VarWetMin
Definition ItemBase.c:46

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

◆ GetWrittenNoteData()

WrittenNoteData GetWrittenNoteData ( )
inlineprotected
4470{};

◆ HasDebugActionsMask()

static bool HasDebugActionsMask ( int mask)
inlinestaticprotected
771 {
772 return ItemBase.m_DebugActionsMask & mask;
773 }

◆ HasFoodStage()

bool HasFoodStage ( )
inlineprotected
2387 {
2388 string config_path = string.Format("CfgVehicles %1 Food FoodStages", GetType());
2389 return GetGame().ConfigIsExisting(config_path);
2390 }

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

◆ HasMuzzle()

bool HasMuzzle ( )
inlineprotected

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

687 {
688 if (IsInherited(Weapon) || IsInherited(SuppressorBase))
689 return true;
690
691 return false;
692 }
Definition Groza_Barrel_Grip.c:2
script counterpart to engine's class Weapon
Definition InventoryItem.c:49

◆ HasQuantity()

bool HasQuantity ( )
inlineprotected
3339 {
3340 return !(GetQuantityMax() - GetQuantityMin() == 0);
3341 }

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

◆ HidesSelectionBySlot()

bool HidesSelectionBySlot ( )
inlineprotected
4466 {
4468 }
bool m_HideSelectionsBySlot
Definition ItemBase.c:125

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

◆ HierarchyCheck()

void HierarchyCheck ( out bool hasParent,
out bool hasRootAsPlayer,
out ItemBase refParentIB )
inlineprotected
4559 {
4560 // hierarchy check for an item to decide whether it has some parent and it is in some player inventory
4561 EntityAI parent = GetHierarchyParent();
4562 if (!parent)
4563 {
4564 hasParent = false;
4565 hasRootAsPlayer = false;
4566 }
4567 else
4568 {
4569 hasParent = true;
4570 hasRootAsPlayer = (GetHierarchyRootPlayer() != null);
4571 refParentIB = ItemBase.Cast(parent);
4572 }
4573 }

◆ IDToName()

string IDToName ( int id)
inlineprotected
2613 {
2614 PluginVariables plugin = PluginVariables.Cast(GetPlugin(PluginVariables));
2615 return plugin.GetName(id);
2616 }

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

◆ IncreaseOverheating()

void IncreaseOverheating ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlineprotected
511 {
512 if (m_MaxOverheatingValue > 0)
513 {
515
518
519 m_CheckOverheating.Stop();
520 m_CheckOverheating.Run(m_OverheatingDecayInterval, this, "OnOverheatingDecay");
521
523 }
524 }
float m_OverheatingDecayInterval
Definition ItemBase.c:121
void CheckOverheating(ItemBase weapon=null, string ammoType="", ItemBase muzzle_owner=null, ItemBase suppressor=null, string config_to_search="")
Definition ItemBase.c:526
ref Timer m_CheckOverheating
Definition ItemBase.c:118

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

◆ InitializeActions()

void InitializeActions ( )
inlineprotected
293 {
295 if (!m_InputActionMap)
296 {
299 SetActions();
301 }
302 }
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Definition ActionManagerClient.c:1
string Type
Definition JsonDataContaminatedArea.c:11
void SetActions()
Definition ItemBase.c:315
static ref map< typename, ref TInputActionMap > m_ItemTypeActionsMap
Definition ItemBase.c:15

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

◆ InitItemVariables()

void InitItemVariables ( )
inlineprotected
196 {
197 m_VarQuantityInit = ConfigGetInt("varQuantityInit");
198 m_VarQuantity = m_VarQuantityInit;//should be by the CE, this is just a precaution
199 m_VarQuantityMin = ConfigGetInt("varQuantityMin");
200 m_VarQuantityMax = ConfigGetInt("varQuantityMax");
201 m_VarStackMax = ConfigGetFloat("varStackMax");
202 m_Count = ConfigGetInt("count");
203
204 m_CanShowQuantity = ConfigGetBool("quantityShow");
205 m_HasQuantityBar = ConfigGetBool("quantityBar");
206
207 m_VarTemperatureInit = ConfigGetFloat("varTemperatureInit");
209 m_VarTemperatureMin = ConfigGetFloat("varTemperatureMin");
210 m_VarTemperatureMax = ConfigGetFloat("varTemperatureMax");
211
212
213 m_CleannessInit = ConfigGetInt("varCleannessInit");
215 m_CleannessMin = ConfigGetInt("varCleannessMin");
216 m_CleannessMax = ConfigGetInt("varCleannessMax");
217
218 m_WantPlayImpactSound = false;
219 m_ImpactSpeed = 0.0;
220
221 m_VarWetInit = ConfigGetFloat("varWetInit");
223 m_VarWetMin = ConfigGetFloat("varWetMin");
224 m_VarWetMax = ConfigGetFloat("varWetMax");
225
227 m_IsBeingPlaced = false;
228 m_IsHologram = false;
229 m_IsPlaceSound = false;
230 m_IsDeploySound = false;
231 m_IsTakeable = true;
232 m_IsSoundSynchRemote = false;
233 m_CanBeMovedOverride = false;
237 m_CanBeDigged = ConfigGetBool("canBeDigged");
238
239 ConfigGetIntArray("compatibleLocks", m_CompatibleLocks);
240 m_LockType = ConfigGetInt("lockType");
241
242 //Define if item can be split and set ability to be combined accordingly
243 if (ConfigIsExisting("canBeSplit"))
244 {
245 can_this_be_combined = ConfigGetBool("canBeSplit");
247 }
248
249 if (ConfigIsExisting("itemBehaviour"))
250 m_ItemBehaviour = ConfigGetInt("itemBehaviour");
251
252 //RegisterNetSyncVariableInt("m_VariablesMask");
253 if (HasQuantity()) RegisterNetSyncVariableFloat("m_VarQuantity", GetQuantityMin(), m_VarQuantityMax);
254 RegisterNetSyncVariableFloat("m_VarTemperature", GetTemperatureMin(),GetTemperatureMax());
255 RegisterNetSyncVariableFloat("m_VarWet", GetWetMin(), GetWetMax(), 2);
256 RegisterNetSyncVariableInt("m_VarLiquidType");
257 RegisterNetSyncVariableInt("m_Cleanness",0,1);
258
259 RegisterNetSyncVariableBoolSignal("m_WantPlayImpactSound");
260 RegisterNetSyncVariableFloat("m_ImpactSpeed");
261 RegisterNetSyncVariableInt("m_ImpactSoundSurfaceHash");
262
263 RegisterNetSyncVariableInt("m_ColorComponentR", 0, 255);
264 RegisterNetSyncVariableInt("m_ColorComponentG", 0, 255);
265 RegisterNetSyncVariableInt("m_ColorComponentB", 0, 255);
266 RegisterNetSyncVariableInt("m_ColorComponentA", 0, 255);
267
268 RegisterNetSyncVariableBool("m_IsBeingPlaced");
269 RegisterNetSyncVariableBool("m_IsTakeable");
270 RegisterNetSyncVariableBool("m_IsHologram");
271
272 if (UsesGlobalDeploy())
273 {
274 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
275 RegisterNetSyncVariableBool("m_IsDeploySound");
276 }
277
278 m_LockSoundSet = ConfigGetString("lockSoundSet");
279 }
float GetHeatIsolationInit()
Definition ItemBase.c:3572
bool m_IsSoundSynchRemote
Definition ItemBase.c:70
ref array< int > m_CompatibleLocks
Definition ItemBase.c:134
override float GetTemperatureMax()
Definition ItemBase.c:3567
override float GetWetMax()
Definition ItemBase.c:3634
int m_ItemBehaviour
Definition ItemBase.c:63
bool m_HasQuantityBar
Definition ItemBase.c:79
float m_ItemAttachOffset
Definition ItemBase.c:61
int GetLiquidTypeInit()
Definition ItemBase.c:3785
int m_CleannessMin
Definition ItemBase.c:51
bool m_IsTakeable
Definition ItemBase.c:69
int m_Count
Definition ItemBase.c:34
override float GetWetMin()
Definition ItemBase.c:3639
float GetItemAttachOffset()
Definition ItemBase.c:3696
bool UsesGlobalDeploy()
Definition ItemBase.c:282
bool m_IsDeploySound
Definition ItemBase.c:68
int m_CleannessInit
Definition ItemBase.c:50
int m_CleannessMax
Definition ItemBase.c:52
float GetItemModelLength()
Definition ItemBase.c:3687
float m_ItemModelLength
Definition ItemBase.c:60
bool m_IsHologram
Definition ItemBase.c:66
override float GetTemperatureMin()
Definition ItemBase.c:3562
bool m_CanShowQuantity
Definition ItemBase.c:78
bool m_IsBeingPlaced
Definition ItemBase.c:65
bool m_IsPlaceSound
Definition ItemBase.c:67

Перекрестные ссылки can_this_be_combined, GetHeatIsolationInit(), GetItemAttachOffset(), GetItemModelLength(), GetLiquidTypeInit(), GetQuantityMin(), GetTemperatureMax(), GetTemperatureMin(), GetWetMax(), GetWetMin(), HasQuantity(), 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_LockSoundSet, m_LockType, m_VarLiquidType, m_VarQuantity, m_VarQuantityInit, m_VarQuantityMax, m_VarQuantityMin, m_VarStackMax, m_VarTemperature, m_VarTemperatureInit, m_VarTemperatureMax, m_VarTemperatureMin, m_VarWet, m_VarWetInit, m_VarWetMax, m_VarWetMin, m_WantPlayImpactSound и UsesGlobalDeploy().

◆ InsertAgent()

override void InsertAgent ( int agent,
float count = 1 )
inlineprotected
3894 {
3895 if (count < 1)
3896 return;
3897 //Debug.Log("Inserting Agent on item: " + agent.ToString() +" count: " + count.ToString());
3899 }

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

◆ IsBeingPlaced()

override bool IsBeingPlaced ( )
inlineprotected
960 {
961 return m_IsBeingPlaced;
962 }

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

◆ IsBloodContainer()

bool IsBloodContainer ( )
inlineprotected
908 {
909 return false;
910 }

◆ IsCargoException4x3()

bool IsCargoException4x3 ( EntityAI item)
inlineprotected
4638 {
4639 return (item.IsKindOf("Cauldron") || item.IsKindOf("Pot") || item.IsKindOf("FryingPan") || item.IsKindOf("SmallProtectorCase") || (item.IsKindOf("PortableGasStove") && item.FindAttachmentBySlotName("CookingEquipment")));
4640 }

◆ IsColorSet()

bool IsColorSet ( )
inlineprotected
3758 {
3760 }
bool IsVariableSet(int variable)
'true' if this variable has ever been changed from default
Definition ItemBase.c:3460

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

◆ IsCombineAll()

bool IsCombineAll ( ItemBase other_item,
bool use_stack_max = false )
inlineprotected
2047 {
2048 return ComputeQuantityUsed(other_item, use_stack_max) == other_item.GetQuantity();
2049 }
int ComputeQuantityUsed(ItemBase other_item, bool use_stack_max=true)
Definition ItemBase.c:2061

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

◆ IsCoverFaceForShave()

bool IsCoverFaceForShave ( string slot_name)
inlineprotected

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

4504 {
4505 return IsExclusionFlagPresent(PlayerBase.GetFaceCoverageShaveValues());
4506 }

◆ IsDeployable()

bool IsDeployable ( )
inlineprotected
4259 {
4260 return false;
4261 }

◆ IsDeploySound()

bool IsDeploySound ( )
inlineprotected
4345 {
4346 return m_IsDeploySound;
4347 }

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

◆ IsExplosive()

bool IsExplosive ( )
inlineprotected

explosive

920 {
921 return false;
922 }

◆ IsFacingPlayer()

bool IsFacingPlayer ( PlayerBase player,
string selection )
inlineprotected
944 {
945 return true;
946 }

◆ IsFullQuantity()

bool IsFullQuantity ( )
inlineprotected
3349 {
3350 return GetQuantity() >= GetQuantityMax();
3351 }

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

◆ IsHeavyBehaviour()

override bool IsHeavyBehaviour ( )
inlineprotected
4229 {
4230 if (m_ItemBehaviour == 0)
4231 {
4232 return true;
4233 }
4234
4235 return false;
4236 }

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

◆ IsHologram()

override bool IsHologram ( )
inlineprotected
976 {
977 return m_IsHologram;
978 }

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

◆ IsIgnoredByConstruction()

override bool IsIgnoredByConstruction ( )
inlineprotected
2380 {
2381 return true;
2382 }

◆ IsItemBase()

override bool IsItemBase ( )
inlineprotected
2517 {
2518 return true;
2519 }

◆ IsLightSource()

bool IsLightSource ( )
inlineprotected

932 {
933 return false;
934 }

◆ IsLiquidContainer()

bool IsLiquidContainer ( )
inlineprotected
903 {
904 return (ConfigGetFloat("liquidContainerType") != 0);
905 }

◆ IsLiquidPresent()

bool IsLiquidPresent ( )
inlineprotected
897 {
898
899 return (GetLiquidType() != 0 && HasQuantity());
900 }
int GetLiquidType()
Definition ItemBase.c:3790

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

◆ IsNVG()

bool IsNVG ( )
inlineprotected
913 {
914 return false;
915 }

◆ IsOneHandedBehaviour()

override bool IsOneHandedBehaviour ( )
inlineprotected
4239 {
4240 if (m_ItemBehaviour == 1)
4241 {
4242 return true;
4243 }
4244
4245 return false;
4246 }

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

◆ IsOpen()

bool IsOpen ( )
inlineprotected
4027 {
4028 return true;
4029 }

◆ IsOverheatingEffectActive()

bool IsOverheatingEffectActive ( )
inlineprotected
544 {
546 }
bool m_IsOverheatingEffectActive
Definition ItemBase.c:116

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

◆ IsPlaceSound()

bool IsPlaceSound ( )
inlineprotected
4335 {
4336 return m_IsPlaceSound;
4337 }

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

◆ IsPlayerInside()

bool IsPlayerInside ( PlayerBase player,
string selection )
inlineprotected
949 {
950 return true;
951 }

◆ IsResultOfSplit()

bool IsResultOfSplit ( )
inlineprotected
2052 {
2053 return m_IsResultOfSplit;
2054 }

◆ IsServerCheck()

bool IsServerCheck ( bool allow_client)
inlineprotected
3671 {
3672 if (g_Game.IsServer())
3673 return true;
3674
3675 if (allow_client)
3676 return true;
3677
3678 if (GetGame().IsClient() && GetGame().IsMultiplayer())
3679 {
3680 Error("Attempting to change variable client side, variables are supposed to be changed on server only !!");
3681 return false;
3682 }
3683
3684 return true;
3685 }
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

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

◆ IsSoundSynchRemote()

bool IsSoundSynchRemote ( )
inlineprotected
4320 {
4321 return m_IsSoundSynchRemote;
4322 }

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

◆ IsTakeable()

override bool IsTakeable ( )
inlineprotected
4279 {
4280 return m_IsTakeable;
4281 }

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

◆ IsTwoHandedBehaviour()

override bool IsTwoHandedBehaviour ( )
inlineprotected
4249 {
4250 if (m_ItemBehaviour == 2)
4251 {
4252 return true;
4253 }
4254
4255 return false;
4256 }

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

◆ IsVariableSet()

bool IsVariableSet ( int variable)
inlineprotected

'true' if this variable has ever been changed from default

3461 {
3462 return (variable & m_VariablesMask);
3463 }
int m_VariablesMask
Definition ItemBase.c:26

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

◆ ItemBase()

void ItemBase ( )
inlineprotected
145 {
146 SetEventMask(EntityEvent.INIT); // Enable EOnInit event
148
152
153 if (!GetGame().IsDedicatedServer())
154 {
155 if (HasMuzzle())
156 {
158
160 {
162 }
163 }
164
166 m_ActionsInitialize = false;
167 }
168
169 m_OldLocation = null;
170
171 if (GetGame().IsServer())
172 {
173 m_AdminLog = PluginAdminLog.Cast(GetPlugin(PluginAdminLog));
174 }
175
176 if (ConfigIsExisting("headSelectionsToHide"))
177 {
179 ConfigGetTextArray("headSelectionsToHide",m_HeadHidingSelections);
180 }
181
183 if (ConfigIsExisting("hideSelectionsByinventorySlot"))
184 {
185 m_HideSelectionsBySlot = ConfigGetBool("hideSelectionsByinventorySlot");
186 }
187
188
189
190 m_QuickBarBonus = Math.Max(0, ConfigGetInt("quickBarBonus"));
191
192 m_IsResultOfSplit = false;
193 }
bool HasMuzzle()
Returns true if this item has a muzzle (weapons, suppressors)
Definition ItemBase.c:686
ref TIntArray m_SingleUseActions
Definition ItemBase.c:96
void LoadParticleConfigOnOverheating(int id)
Definition ItemBase.c:449
ref TIntArray m_InteractActions
Definition ItemBase.c:98
PluginAdminLog m_AdminLog
Definition ItemBase.c:128
ref TIntArray m_ContinuousActions
Definition ItemBase.c:97
void InitItemVariables()
Definition ItemBase.c:195
int GetMuzzleID()
Returns global muzzle ID. If not found, then it gets automatically registered.
Definition ItemBase.c:695
void PreLoadSoundAttachmentType()
Attachment Sound Type getting from config file.
Definition ItemBase.c:4284
void LoadParticleConfigOnFire(int id)
Definition ItemBase.c:380
array< int > TIntArray
Definition EnScript.c:687
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:45
static proto float Max(float x, float y)
Returns bigger of two given values.

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

◆ KillAllOverheatingParticles()

void KillAllOverheatingParticles ( )
inlineprotected
642 {
644 {
645 for (int i = m_OverheatingParticles.Count(); i > 0; i--)
646 {
647 int id = i - 1;
649
650 if (OP)
651 {
652 Particle p = OP.GetParticle();
653
654 if (p)
655 {
656 p.Stop();
657 }
658
659 delete OP;
660 }
661 }
662
665 }
666 }
ref array< ref OverheatingParticle > m_OverheatingParticles
Definition ItemBase.c:122
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
2523 {
2524 bool found = false;
2525 string item_name = this.GetType();
2527 GetGame().ConfigGetTextArray("cfgVehicles " + item_name + " itemInfo", item_tag_array);
2528
2529 int array_size = item_tag_array.Count();
2530 for (int i = 0; i < array_size; i++)
2531 {
2532 if (item_tag_array.Get(i) == tag)
2533 {
2534 found = true;
2535 break;
2536 }
2537 }
2538 return found;
2539 }

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

◆ LoadAgents()

bool LoadAgents ( ParamsReadContext ctx,
int version )
inlineprotected
3956 {
3957 if (!ctx.Read(m_AttachedAgents))
3958 return false;
3959 return true;
3960 }

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

◆ LoadParticleConfigOnFire()

void LoadParticleConfigOnFire ( int id)
inlineprotected
381 {
382 if (!m_OnFireEffect)
384
387
388 string config_to_search = "CfgVehicles";
389 string muzzle_owner_config;
390
391 if (!m_OnFireEffect.Contains(id))
392 {
393 if (IsInherited(Weapon))
394 config_to_search = "CfgWeapons";
395
397
398 string config_OnFire_class = muzzle_owner_config + "Particles " + "OnFire ";
399
400 int config_OnFire_subclass_count = GetGame().ConfigGetChildrenCount(config_OnFire_class);
401
403 {
405
406 for (int i = 0; i < config_OnFire_subclass_count; i++)
407 {
408 string particle_class = "";
409 GetGame().ConfigGetChildName(config_OnFire_class, i, particle_class);
412 WPOF_array.Insert(WPOF);
413 }
414
415
416 m_OnFireEffect.Insert(id, WPOF_array);
417 }
418 }
419
420 if (!m_OnBulletCasingEjectEffect.Contains(id))
421 {
422 config_to_search = "CfgWeapons"; // Bullet Eject efect is supported on weapons only.
424
425 string config_OnBulletCasingEject_class = muzzle_owner_config + "Particles " + "OnBulletCasingEject ";
426
428
429 if (config_OnBulletCasingEject_count > 0 && IsInherited(Weapon))
430 {
432
433 for (i = 0; i < config_OnBulletCasingEject_count; i++)
434 {
435 string particle_class2 = "";
439 WPOBE_array.Insert(WPOBE);
440 }
441
442
444 }
445 }
446 }
static ref map< int, ref array< ref WeaponParticlesOnBulletCasingEject > > m_OnBulletCasingEjectEffect
Definition ItemBase.c:110
static ref map< int, ref array< ref WeaponParticlesOnFire > > m_OnFireEffect
Definition ItemBase.c:109

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

◆ LoadParticleConfigOnOverheating()

void LoadParticleConfigOnOverheating ( int id)
inlineprotected
450 {
453
454 if (!m_OnOverheatingEffect.Contains(id))
455 {
456 string config_to_search = "CfgVehicles";
457
458 if (IsInherited(Weapon))
459 config_to_search = "CfgWeapons";
460
461 string muzzle_owner_config = config_to_search + " " + GetType() + " ";
462 string config_OnOverheating_class = muzzle_owner_config + "Particles " + "OnOverheating ";
463
464 if (GetGame().ConfigIsExisting(config_OnOverheating_class))
465 {
466
467 m_ShotsToStartOverheating = GetGame().ConfigGetFloat(config_OnOverheating_class + "shotsToStartOverheating");
468
470 {
471 m_ShotsToStartOverheating = -1; // This prevents futher readings from config for future creations of this item
472 string error = "Error reading config " + GetType() + ">Particles>OnOverheating - Parameter shotsToStartOverheating is configured wrong or is missing! Its value must be 1 or higher!";
473 Error(error);
474 return;
475 }
476
477 m_OverheatingDecayInterval = GetGame().ConfigGetFloat(config_OnOverheating_class + "overheatingDecayInterval");
478 m_MaxOverheatingValue = GetGame().ConfigGetFloat(config_OnOverheating_class + "maxOverheatingValue");
479
480
481
484
485 for (int i = 0; i < config_OnOverheating_subclass_count; i++)
486 {
487 string particle_class = "";
488 GetGame().ConfigGetChildName(config_OnOverheating_class, i, particle_class);
490 int entry_type = GetGame().ConfigGetType(config_OnOverheating_entry);
491
492 if (entry_type == CT_CLASS)
493 {
495 WPOOH_array.Insert(WPOF);
496 }
497 }
498
499
501 }
502 }
503 }
ref map< int, ref array< ref WeaponParticlesOnOverheating > > m_OnOverheatingEffect
Definition ItemBase.c:111

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

◆ LoadVariables()

bool LoadVariables ( ParamsReadContext ctx,
int version = -1 )
inlineprotected
2926 {
2927 int varFlags;
2928 if (version <= 108 && version != -1)
2929 {
2930 //read the flags
2932 {
2933 return false;
2934 }
2935 else
2936 {
2938 //--------------
2940 {
2941 if (!ReadVarsFromCTX(ctx, version))
2942 return false;
2943 }
2944 }
2945 }
2946 else
2947 {
2948 //read the flags
2949 if (!ctx.Read(varFlags))
2950 {
2951 return false;
2952 }
2953 else
2954 {
2955 //--------------
2957 {
2958 if (!ReadVarsFromCTX(ctx, version))
2959 return false;
2960 }
2961 }
2962 }
2963 return true;
2964 }
Definition UtilityClasses.c:10
static ref Param1< int > PARAM1_INT
Definition UtilityClasses.c:11
bool ReadVarsFromCTX(ParamsReadContext ctx, int version=-1)
Definition ItemBase.c:2788
Definition UtilityClasses.c:2
static const int FLOAT
Definition UtilityClasses.c:4

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

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

838 {
839 EntityAI parent = GetHierarchyParent();
840
841 if (parent)
842 {
844 GetInventory().GetCurrentInventoryLocation(inventory_location_to_lock);
845 parent.GetInventory().SetSlotLock(inventory_location_to_lock.GetSlot(), true);
846 }
847 }

◆ MessageToOwnerAction()

void MessageToOwnerAction ( string text)
inlineprotected

Send message to owner player in yellow color.

Возвращает
void
item_stone.MessageToOwnerAction("Some Action Message");
2471 {
2472 PlayerBase player = PlayerBase.Cast(this.GetHierarchyRootPlayer());
2473
2474 if (player)
2475 {
2476 player.MessageAction(text);
2477 }
2478 }

◆ MessageToOwnerFriendly()

void MessageToOwnerFriendly ( string text)
inlineprotected

Send message to owner player in green color.

Возвращает
void
item_stone.MessageToOwnerFriendly("Some Friendly Message");
2489 {
2490 PlayerBase player = PlayerBase.Cast(this.GetHierarchyRootPlayer());
2491
2492 if (player)
2493 {
2494 player.MessageFriendly(text);
2495 }
2496 }

◆ MessageToOwnerImportant()

void MessageToOwnerImportant ( string text)
inlineprotected

Send message to owner player in red color.

Возвращает
void
item_stone.MessageToOwnerImportant("Some Important Message");
2507 {
2508 PlayerBase player = PlayerBase.Cast(this.GetHierarchyRootPlayer());
2509
2510 if (player)
2511 {
2512 player.MessageImportant(text);
2513 }
2514 }

◆ MessageToOwnerStatus()

void MessageToOwnerStatus ( string text)
inlineprotected

Send message to owner player in grey color.

Возвращает
void
item_stone.MessageToOwnerStatus("Some Status Message");
2453 {
2454 PlayerBase player = PlayerBase.Cast(this.GetHierarchyRootPlayer());
2455
2456 if (player)
2457 {
2458 player.MessageStatus(text);
2459 }
2460 }

◆ NameToID()

int NameToID ( string name)
inlineprotected
2607 {
2608 PluginVariables plugin = PluginVariables.Cast(GetPlugin(PluginVariables));
2609 return plugin.GetID(name);
2610 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo

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

◆ OnAction()

override bool OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprotected
2183 {
2184 super.OnAction(action_id, player, ctx);
2185 if (action_id >= EActions.RECIPES_RANGE_START && action_id < EActions.RECIPES_RANGE_END)
2186 {
2187 PluginRecipesManager plugin_recipes_manager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
2188 int idWithoutOffset = action_id - EActions.RECIPES_RANGE_START;
2189 PlayerBase p = PlayerBase.Cast(player);
2190 if (EActions.RECIPES_RANGE_START < 1000)
2191 {
2192 float anim_length = plugin_recipes_manager.GetRecipeLengthInSecs(idWithoutOffset);
2193 float specialty_weight = plugin_recipes_manager.GetRecipeSpecialty(idWithoutOffset);
2194 }
2195 }
2196 #ifndef SERVER
2197 else if (action_id == EActions.WATCH_PLAYER)
2198 {
2199 PluginDeveloper.SetDeveloperItemClientEx(player);
2200 }
2201 #endif
2202 if (GetGame().IsServer())
2203 {
2204 if (action_id >= EActions.DEBUG_ITEM_WATCH_BUTTON_RANGE_START && action_id < EActions.DEBUG_ITEM_WATCH_BUTTON_RANGE_END)
2205 {
2206 int id = action_id - EActions.DEBUG_ITEM_WATCH_BUTTON_RANGE_START;
2207 OnDebugButtonPressServer(id + 1);
2208 }
2209
2210 else if (action_id >= EActions.DEBUG_AGENTS_RANGE_INJECT_START && action_id < EActions.DEBUG_AGENTS_RANGE_INJECT_END)
2211 {
2212 int agent_id = action_id - EActions.DEBUG_AGENTS_RANGE_INJECT_START;
2213 InsertAgent(agent_id,100);
2214 }
2215
2216 else if (action_id >= EActions.DEBUG_AGENTS_RANGE_REMOVE_START && action_id < EActions.DEBUG_AGENTS_RANGE_REMOVE_END)
2217 {
2218 int agent_id2 = action_id - EActions.DEBUG_AGENTS_RANGE_REMOVE_START;
2220 }
2221
2222 else if (action_id == EActions.ADD_QUANTITY)
2223 {
2224 if (IsMagazine())
2225 {
2226 Magazine mag = Magazine.Cast(this);
2227 mag.ServerSetAmmoCount(mag.GetAmmoCount() + mag.GetAmmoMax() * 0.2);
2228 }
2229 else
2230 {
2231 AddQuantity(GetQuantityMax() * 0.2);
2232 }
2233
2234 if (m_EM)
2235 {
2236 m_EM.AddEnergy(m_EM.GetEnergyMax() * 0.2);
2237 }
2238 //PrintVariables();
2239 }
2240
2241 else if (action_id == EActions.REMOVE_QUANTITY) //Quantity -20%
2242 {
2243 if (IsMagazine())
2244 {
2245 Magazine mag2 = Magazine.Cast(this);
2246 mag2.ServerSetAmmoCount(mag2.GetAmmoCount() - mag2.GetAmmoMax() * 0.2);
2247 }
2248 else
2249 {
2250 AddQuantity(- GetQuantityMax() * 0.2);
2251 }
2252 if (m_EM)
2253 {
2254 m_EM.AddEnergy(- m_EM.GetEnergyMax() * 0.2);
2255 }
2256 //PrintVariables();
2257 }
2258
2259 else if (action_id == EActions.SET_QUANTITY_0) //SetMaxQuantity
2260 {
2261 SetQuantity(0);
2262
2263 if (m_EM)
2264 {
2265 m_EM.SetEnergy(0);
2266 }
2267 }
2268
2269 else if (action_id == EActions.SET_MAX_QUANTITY) //SetMaxQuantity
2270 {
2272
2273 if (m_EM)
2274 {
2275 m_EM.SetEnergy(m_EM.GetEnergyMax());
2276 }
2277 }
2278
2279 else if (action_id == EActions.ADD_HEALTH)
2280 {
2281 AddHealth("","",GetMaxHealth("","Health")/5);
2282 }
2283 else if (action_id == EActions.REMOVE_HEALTH)
2284 {
2285 AddHealth("","",-GetMaxHealth("","Health")/5);
2286 }
2287 else if (action_id == EActions.DESTROY_HEALTH)
2288 {
2289 SetHealth01("","",0);
2290 }
2291 else if (action_id == EActions.WATCH_ITEM)
2292 {
2294 mid.RegisterDebugItem(ItemBase.Cast(this), PlayerBase.Cast(player));
2295 #ifdef DEVELOPER
2297 #endif
2298 }
2299
2300 else if (action_id == EActions.ADD_TEMPERATURE)
2301 {
2302 AddTemperature(20);
2303 //PrintVariables();
2304 }
2305
2306 else if (action_id == EActions.REMOVE_TEMPERATURE)
2307 {
2308 AddTemperature(-20);
2309 //PrintVariables();
2310 }
2311
2312 else if (action_id == EActions.ADD_WETNESS)
2313 {
2314 AddWet(GetWetMax()/5);
2315 //PrintVariables();
2316 }
2317
2318 else if (action_id == EActions.REMOVE_WETNESS)
2319 {
2320 AddWet(-GetWetMax()/5);
2321 //PrintVariables();
2322 }
2323
2324 else if (action_id == EActions.LIQUIDTYPE_UP)
2325 {
2326 int curr_type = GetLiquidType();
2328 //AddWet(1);
2329 //PrintVariables();
2330 }
2331
2332 else if (action_id == EActions.LIQUIDTYPE_DOWN)
2333 {
2334 int curr_type2 = GetLiquidType();
2336 }
2337
2338 else if (action_id == EActions.MAKE_SPECIAL)
2339 {
2340 auto debugParams = DebugSpawnParams.WithPlayer(player);
2341 OnDebugSpawnEx(debugParams);
2342 }
2343
2344 else if (action_id == EActions.DELETE)
2345 {
2346 Delete();
2347 }
2348
2349 }
2350
2351
2352 return false;
2353 }
void PluginItemDiagnostic()
Definition PluginItemDiagnostic.c:83
override void AddTemperature(float value)
Definition ItemBase.c:3542
override void InsertAgent(int agent, float count=1)
Definition ItemBase.c:3893
override void RemoveAgent(int agent_id)
Definition ItemBase.c:3874
void SetQuantityMax()
Definition ItemBase.c:3253
override void AddWet(float value)
Definition ItemBase.c:3619

Перекрестные ссылки AddQuantity(), AddTemperature(), 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.

1873 {
1874 // insert code here
1875 }

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

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

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

◆ OnCEUpdate()

override void OnCEUpdate ( )
inlineprotected
4606 {
4607 super.OnCEUpdate();
4608
4609 bool hasParent = false, hasRootAsPlayer = false;
4611
4612 bool wwtu = g_Game.IsWorldWetTempUpdateEnabled();
4613 bool foodDecay = g_Game.IsFoodDecayEnabled();
4614
4615 if (wwtu || foodDecay)
4616 {
4620
4622 {
4624
4625 if (processWetness)
4626 ProcessItemWetness(m_ElapsedSinceLastUpdate, hasParent, hasRootAsPlayer, refParentIB);
4627
4629 ProcessItemTemperature(m_ElapsedSinceLastUpdate, hasParent, hasRootAsPlayer, refParentIB);
4630
4631 if (processDecay)
4632 ProcessDecay(m_ElapsedSinceLastUpdate, hasRootAsPlayer);
4633 }
4634 }
4635 }
void ProcessDecay(float delta, bool hasRootAsPlayer)
Definition ItemBase.c:4575
void ProcessItemWetness(float delta, bool hasParent, bool hasRootAsPlayer, ItemBase refParentIB)
Definition ItemBase.c:4508
bool CanHaveWetness()
Definition ItemBase.c:4593
bool CanProcessDecay()
Definition ItemBase.c:4586
bool CanDecay()
Definition ItemBase.c:4580
void HierarchyCheck(out bool hasParent, out bool hasRootAsPlayer, out ItemBase refParentIB)
Definition ItemBase.c:4558
bool CanHaveTemperature()
Definition ItemBase.c:4599
void ProcessItemTemperature(float delta, bool hasParent, bool hasRootAsPlayer, ItemBase refParentIB)
Definition ItemBase.c:4533

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

◆ OnCombine()

void OnCombine ( ItemBase other_item)
inlineprotected
2112 {
2113 #ifdef SERVER
2114 if (!GetHierarchyRootPlayer() && GetHierarchyParent())
2115 GetHierarchyParent().IncreaseLifetimeUp();
2116 #endif
2117 };

◆ OnCreatePhysics()

override void OnCreatePhysics ( )
inlineprotected
1192 {
1194 }
void RefreshPhysics()

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

◆ OnEndPlacement()

void OnEndPlacement ( )
inlineprotected
973{}

◆ OnEnergyAdded()

override void OnEnergyAdded ( )
inlineprotected
3507 {
3508 super.OnEnergyAdded();
3509
3511 }
void ConvertEnergyToQuantity()
Definition ItemBase.c:3514

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

◆ OnEnergyConsumed()

override void OnEnergyConsumed ( )
inlineprotected
3500 {
3501 super.OnEnergyConsumed();
3502
3504 }

Перекрестные ссылки 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.

3804 {
3806 if (PlayerBase.CastTo(nplayer, player))
3807 {
3808 m_CanPlayImpactSound = true;
3809 //nplayer.OnItemInventoryEnter(this);
3810 nplayer.SetEnableQuickBarEntityShortcut(this,!GetHierarchyParent() || GetHierarchyParent().GetInventory().AreChildrenAccessible());
3811 }
3812 }

Перекрестные ссылки 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.

3817 {
3819 if (PlayerBase.CastTo(nplayer,player))
3820 {
3821 //nplayer.OnItemInventoryExit(this);
3822 nplayer.SetEnableQuickBarEntityShortcut(this,false);
3823
3824 }
3825
3826 //if (!GetGame().IsDedicatedServer())
3827 player.GetHumanInventory().ClearUserReservedLocationForContainer(this);
3828
3829
3830 if (HasEnergyManager())
3831 {
3832 GetCompEM().UpdatePlugState(); // Unplug the el. device if it's necesarry.
3833 }
3834 }

◆ OnItemAttachmentSlotChanged()

override void OnItemAttachmentSlotChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprotected
1197 {
1198
1199 }

◆ OnItemInHandsPlayerSwimStart()

void OnItemInHandsPlayerSwimStart ( PlayerBase player)
protected

◆ OnItemLocationChanged()

override void OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected
1202 {
1203 super.OnItemLocationChanged(old_owner, new_owner);
1204
1205 Man ownerPlayerOld = null;
1206 Man ownerPlayerNew = null;
1207
1208 if (old_owner)
1209 {
1210 if (old_owner.IsMan())
1211 {
1212 ownerPlayerOld = Man.Cast(old_owner);
1213 }
1214 else
1215 {
1216 ownerPlayerOld = Man.Cast(old_owner.GetHierarchyRootPlayer());
1217 }
1218 }
1219
1220 if (new_owner)
1221 {
1222 if (new_owner.IsMan())
1223 {
1224 ownerPlayerNew = Man.Cast(new_owner);
1225 }
1226 else
1227 {
1228 ownerPlayerNew = Man.Cast(new_owner.GetHierarchyRootPlayer());
1229 }
1230 }
1231
1233 {
1234 if (ownerPlayerOld)
1235 {
1237 GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER,subItemsExit);
1238 for (int i = 0; i < subItemsExit.Count(); i++)
1239 {
1241 itemExit.OnInventoryExit(ownerPlayerOld);
1242 }
1243 }
1244
1245 if (ownerPlayerNew)
1246 {
1248 GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER,subItemsEnter);
1249 for (int j = 0; j < subItemsEnter.Count(); j++)
1250 {
1252 itemEnter.OnInventoryEnter(ownerPlayerNew);
1253 }
1254 }
1255 }
1256 else if (ownerPlayerNew != null)
1257 {
1259 if (PlayerBase.CastTo(nplayer, ownerPlayerNew))
1260 {
1262 GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER,subItemsUpdate);
1263 for (int k = 0; k < subItemsUpdate.Count(); k++)
1264 {
1266 itemUpdate.UpdateQuickbarShortcutVisibility(nplayer);
1267 }
1268 }
1269 }
1270 }

◆ OnMovedInsideCargo()

override void OnMovedInsideCargo ( EntityAI container)
inlineprotected
1031 {
1032 super.OnMovedInsideCargo(container);
1033
1034 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(this, {Bolt_Base});
1035 }
Definition AmmunitionPiles.c:91

◆ OnOverheatingDecay()

void OnOverheatingDecay ( )
inlineprotected
549 {
550 if (m_MaxOverheatingValue > 0)
551 m_OverheatingShots -= 1 + m_OverheatingShots / m_MaxOverheatingValue; // The hotter a barrel is, the faster it needs to cool down.
552 else
554
555 if (m_OverheatingShots <= 0)
556 {
557 m_CheckOverheating.Stop();
559 }
560 else
561 {
564
565 m_CheckOverheating.Stop();
566 m_CheckOverheating.Run(m_OverheatingDecayInterval, this, "OnOverheatingDecay");
567 }
568
569 CheckOverheating(this, "", this);
570 }
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
3845 {
3846 if (m_AdminLog)
3847 {
3848 m_AdminLog.OnPlacementComplete(player, this);
3849 }
3850 if (GetGame().IsServer())
3851 {
3852 SetIsDeploySound(true);
3853 }
3854 super.OnPlacementComplete(player, position, orientation);
3855 }
void SetIsDeploySound(bool is_deploy_sound)
Definition ItemBase.c:4339

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

◆ OnPlacementStarted()

override void OnPlacementStarted ( Man player)
inlineprotected
3838 {
3839 super.OnPlacementStarted(player);
3840
3841 SetTakeable(false);
3842 }
override void SetTakeable(bool pState)
Definition ItemBase.c:4272

Перекрестные ссылки 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.

1861 {
1862 SetWeightDirty();
1863 ItemBase parent = ItemBase.Cast(GetHierarchyParent());
1864
1865 if (parent)
1866 {
1867 parent.OnAttachmentQuantityChangedEx(this, delta);
1868 }
1869 }

◆ OnRightClick()

override void OnRightClick ( )
inlineprotected
1922 {
1923 super.OnRightClick();
1924
1925 if (CanBeSplit() && !GetDayZGame().IsLeftCtrlDown() && !GetGame().GetPlayer().GetInventory().HasInventoryReservation(this,null))
1926 {
1927 if (GetGame().IsClient())
1928 {
1930 {
1931 vector m4[4];
1933
1934 EntityAI root = GetHierarchyRoot();
1935
1937 if (!player.GetInventory().FindFirstFreeLocationForNewEntity(GetType(), FindInventoryLocationType.CARGO, dst))
1938 {
1939 if (root)
1940 {
1941 root.GetTransform(m4);
1942 dst.SetGround(this, m4);
1943 }
1944 else
1945 GetInventory().GetCurrentInventoryLocation(dst);
1946 }
1947 else
1948 {
1949 dst.SetCargo(dst.GetParent(), this, dst.GetIdx(), dst.GetRow(), dst.GetCol(), dst.GetFlip());
1950 if (GetGame().GetPlayer().GetInventory().HasInventoryReservation(null, dst))
1951 {
1952 if (root)
1953 {
1954 root.GetTransform(m4);
1955 dst.SetGround(this, m4);
1956 }
1957 else
1958 GetInventory().GetCurrentInventoryLocation(dst);
1959 }
1960 else
1961 {
1962 GetGame().GetPlayer().GetInventory().AddInventoryReservationEx(null, dst, GameInventory.c_InventoryReservationTimeoutShortMS);
1963 }
1964 }
1965
1968 ctx.Write(4);
1969 ItemBase thiz = this; // @NOTE: workaround for correct serialization
1970 ctx.Write(thiz);
1971 dst.WriteToContext(ctx);
1972 ctx.Write(true); // dummy
1973 ctx.Send();
1974 }
1975 }
1976 else if (!GetGame().IsMultiplayer())
1977 {
1979 }
1980 }
1981 }
DayZGame GetDayZGame()
Definition DayZGame.c:3748
override bool CanBeSplit()
Definition ItemBase.c:1528
void SplitItem(PlayerBase player)
Definition ItemBase.c:1824

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

◆ OnRPC()

override void OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
inlineprotected
2543 {
2544 //Debug.Log("OnRPC called");
2545 super.OnRPC(sender, rpc_type,ctx);
2546
2547 //Play soundset for attachment locking (ActionLockAttachment.c)
2548 switch (rpc_type)
2549 {
2550 #ifndef SERVER
2551 case ERPCs.RPC_SOUND_LOCK_ATTACH:
2553
2554 if (!ctx.Read(p))
2555 return;
2556
2557 bool play = p.param1;
2558 string soundSet = p.param2;
2559
2560 if (play)
2561 {
2562 if (m_LockingSound)
2563 {
2564 if (!m_LockingSound.IsSoundPlaying())
2565 {
2567 }
2568 }
2569 else
2570 {
2572 }
2573 }
2574 else
2575 {
2577 }
2578
2579 break;
2580 #endif
2581
2582 }
2583
2584 if (GetWrittenNoteData())
2585 {
2587 }
2588 }
ERPCs
Definition ERPCs.c:2
WrittenNoteData GetWrittenNoteData()
Definition ItemBase.c:4470
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:165
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
2969 {
2970 m_IsStoreLoad = true;
2971
2973 {
2974 m_FixDamageSystemInit = true;
2975 }
2976
2977 if (!super.OnStoreLoad(ctx, version))
2978 {
2979 m_IsStoreLoad = false;
2980 return false;
2981 }
2982
2983 if (version >= 114)
2984 {
2986
2987 if (!ctx.Read(hasQuickBarIndexSaved))
2988 {
2989 m_IsStoreLoad = false;
2990 return false;
2991 }
2992
2994 {
2995 int itmQBIndex;
2996
2997 //Load quickbar item bind
2998 if (!ctx.Read(itmQBIndex))
2999 {
3000 m_IsStoreLoad = false;
3001 return false;
3002 }
3003
3004 PlayerBase parentPlayer = PlayerBase.Cast(GetHierarchyRootPlayer());
3005 if (itmQBIndex != -1 && parentPlayer)
3006 parentPlayer.SetLoadedQuickBarItemBind(this, itmQBIndex);
3007 }
3008 }
3009 else
3010 {
3011 // Backup of how it used to be
3013 int itemQBIndex;
3014 if (version == int.MAX)
3015 {
3016 if (!ctx.Read(itemQBIndex))
3017 {
3018 m_IsStoreLoad = false;
3019 return false;
3020 }
3021 }
3022 else if (Class.CastTo(player, GetHierarchyRootPlayer()))
3023 {
3024 //Load quickbar item bind
3025 if (!ctx.Read(itemQBIndex))
3026 {
3027 m_IsStoreLoad = false;
3028 return false;
3029 }
3030 if (itemQBIndex != -1 && player)
3031 player.SetLoadedQuickBarItemBind(this,itemQBIndex);
3032 }
3033 }
3034
3035 // variable management system
3036 if (!LoadVariables(ctx, version))
3037 {
3038 m_IsStoreLoad = false;
3039 return false;
3040 }
3041
3042 //agent trasmission system
3043 if (!LoadAgents(ctx, version))
3044 {
3045 m_IsStoreLoad = false;
3046 return false;
3047 }
3048 if (version >= 132)
3049 {
3051 if (raib)
3052 {
3053 if (!raib.OnStoreLoad(ctx,version))
3054 {
3055 m_IsStoreLoad = false;
3056 return false;
3057 }
3058 }
3059 }
3060
3061 m_IsStoreLoad = false;
3062 return true;
3063 }
const int MAX
Definition EnConvert.c:27
bool LoadAgents(ParamsReadContext ctx, int version)
Definition ItemBase.c:3955
bool LoadVariables(ParamsReadContext ctx, int version=-1)
Definition ItemBase.c:2925
int GetDamageSystemVersionChange()
Re-sets DamageSystem changes.
Definition ItemBase.c:718
Definition RemotelyActivatedItemBehaviour.c:2

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

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected
3068 {
3069 super.OnStoreSave(ctx);
3071 if (PlayerBase.CastTo(player,GetHierarchyRootPlayer()))
3072 {
3073 ctx.Write(true); // Keep track of if we should actually read this in or not
3074 //Save quickbar item bind
3075 int itemQBIndex = -1;
3076 itemQBIndex = player.FindQuickBarEntityIndex(this);
3077 ctx.Write(itemQBIndex);
3078 }
3079 else
3080 {
3081 ctx.Write(false); // Keep track of if we should actually read this in or not
3082 }
3083
3084 SaveVariables(ctx);// variable management system
3085 SaveAgents(ctx);//agent trasmission system
3086
3088 if (raib)
3089 {
3090 raib.OnStoreSave(ctx);
3091 }
3092 }
void SaveVariables(ParamsWriteContext ctx)
Definition ItemBase.c:2902
void SaveAgents(ParamsWriteContext ctx)
Definition ItemBase.c:3962

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

◆ OnSyncVariables()

void OnSyncVariables ( ParamsReadContext ctx)
inlineprotected
2619 {
2620 //Debug.Log("OnSyncVariables called for item: "+ ToString(this.GetType()),"varSync");
2621 //read the flags
2622 //ref Param1<int> pflags = new Param1<int>(0);
2623 int varFlags;
2624 if (!ctx.Read(varFlags))
2625 return;
2626
2627 //ctx.Read(CachedObjectsParams.PARAM1_INT);
2628
2629 //int varFlags = CachedObjectsParams.PARAM1_INT.param1;
2630 //--------------
2631
2632
2634 {
2636 }
2637 /*
2638 if (varFlags & ItemVariableFlags.STRING)
2639 {
2640 OnSyncStrings(ctx);
2641 }
2642 */
2643 }

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

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
inlineprotected
3132 {
3133 if (m_Initialized)
3134 {
3135 #ifdef PLATFORM_CONSOLE
3136 //bruteforce it is
3137 if (m_CanThisBeSplit)
3138 {
3139 UIScriptedMenu menu = GetGame().GetUIManager().FindMenu(MENU_INVENTORY);
3140 if (menu)
3141 {
3142 menu.Refresh();
3143 }
3144 }
3145 #endif
3146 }
3147
3149 {
3151 }
3152
3154 {
3156 }
3157
3158 if (IsDeploySound())
3159 {
3161 }
3162
3164 {
3165 PlayImpactSound(m_ConfigWeight, m_ImpactSpeed, m_ImpactSoundSurfaceHash);
3166 m_WantPlayImpactSound = false;
3167 }
3168
3170 {
3171 SetWeightDirty();
3173 }
3174 if (m_VarWet != m_VarWetPrev)
3175 {
3178 }
3179
3180 super.OnVariablesSynchronized();
3181 }
bool m_Initialized
Definition UiHintPanel.c:317
void PlayDeploySound()
Definition ItemBase.c:4370
override void OnWetChanged(float newVal, float oldVal)
Definition ItemBase.c:3649
float m_VarWetPrev
Definition ItemBase.c:44
void StopDeployLoopSoundEx()
Definition ItemBase.c:4361
bool IsDeploySound()
Definition ItemBase.c:4344
bool CanPlayDeployLoopSound()
Definition ItemBase.c:4406
void PlayDeployLoopSoundEx()
Definition ItemBase.c:4349
float m_VarQuantityPrev
Definition ItemBase.c:30
Definition DayZGame.c:64
const int MENU_INVENTORY
Definition constants.c:170
proto native bool dBodyIsDynamic(notnull IEntity ent)

Перекрестные ссылки CanPlayDeployLoopSound(), dBodyIsDynamic(), GetGame(), IsDeploySound(), m_CanThisBeSplit, 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
1332 {
1333 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(this, {Bolt_Base});
1334
1335 super.OnWasAttached(parent, slot_id);
1336
1337 if (HasQuantity())
1338 UpdateNetSyncVariableFloat("m_VarQuantity", GetQuantityMin(), m_VarQuantityMax);
1339
1341 }
void PlayAttachSound(string slot_type)
Plays sound on item attach. Be advised, the config structure may slightly change in 1....
Definition ItemBase.c:4412
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
1344 {
1345 super.OnWasDetached(parent, slot_id);
1346
1347 if (HasQuantity())
1348 UpdateNetSyncVariableFloat("m_VarQuantity", GetQuantityMin(), m_VarQuantityMax);
1349 }

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

◆ OnWetChanged()

override void OnWetChanged ( float newVal,
float oldVal )
inlineprotected
3650 {
3651 EWetnessLevel newLevel = GetWetLevelInternal(newVal);
3652 EWetnessLevel oldLevel = GetWetLevelInternal(oldVal);
3653 if (newLevel != oldLevel)
3654 {
3656 }
3657 }
EWetnessLevel
Definition EntityAI.c:2
override void OnWetLevelChanged(EWetnessLevel newLevel, EWetnessLevel oldLevel)
Definition ItemBase.c:3659

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

◆ OnWetLevelChanged()

override void OnWetLevelChanged ( EWetnessLevel newLevel,
EWetnessLevel oldLevel )
inlineprotected
3660 {
3661 SetWeightDirty();
3662 }

◆ Open()

void Open ( )
protected

Implementations only.

◆ PairWithDevice()

bool PairWithDevice ( notnull ItemBase otherDevice)
inlineprotected
4676 {
4677 if (GetGame().IsServer())
4678 {
4681 if (!trg)
4682 {
4684 explosive = this;
4685 }
4686
4687 explosive.PairRemote(trg);
4688 trg.SetControlledDevice(explosive);
4689
4691 trg.SetPersistentPairID(persistentID);
4692 explosive.SetPersistentPairID(persistentID);
4693
4694 return true;
4695 }
4696 return false;
4697 }
Definition RemoteDetonator.c:47
static int GeneratePersistentID()
Definition RemotelyActivatedItemBehaviour.c:81

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

◆ PerformDamageSystemReinit()

void PerformDamageSystemReinit ( )
inlineprotected
4479 {
4481 GetDamageZones(zone_names);
4482 for (int i = 0; i < zone_names.Count(); i++)
4483 {
4484 SetHealthMax(zone_names.Get(i),"Health");
4485 }
4486 SetHealthMax("","Health");
4487 }

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

4413 {
4414 if (!GetGame().IsDedicatedServer())
4415 {
4416 if (ConfigIsExisting("attachSoundSet"))
4417 {
4418 string cfg_path = "";
4419 string soundset = "";
4420 string type_name = GetType();
4421
4424 ConfigGetTextArray("attachSoundSet",cfg_soundset_array);
4425 ConfigGetTextArray("attachSoundSlot",cfg_slot_array);
4426
4427 if (cfg_soundset_array.Count() > 0 && cfg_soundset_array.Count() == cfg_slot_array.Count())
4428 {
4429 for (int i = 0; i < cfg_soundset_array.Count(); i++)
4430 {
4431 if (cfg_slot_array[i] == slot_type)
4432 {
4434 break;
4435 }
4436 }
4437 }
4438
4439 if (soundset != "")
4440 {
4442 sound.SetAutodestroy(true);
4443 }
4444 }
4445 }
4446 }
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
4148 {
4149 int id = muzzle_owner.GetMuzzleID();
4151
4152 if (WPOBE_array)
4153 {
4154 for (int i = 0; i < WPOBE_array.Count(); i++)
4155 {
4157
4158 if (WPOBE)
4159 {
4161 }
4162 }
4163 }
4164 }

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

◆ PlayDeployFinishSound()

void PlayDeployFinishSound ( )
inlineprotected
4383 {
4384 if (!GetGame().IsDedicatedServer() && !m_SoundDeployFinish)
4385 {
4389 else
4390 Debug.Log("dbgSounds | null m_SoundDeployFinish from sound set: " + GetDeployFinishSoundset());
4391 }
4392 }
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Definition EffectSound.c:597
string GetDeployFinishSoundset()
EffectSound m_SoundDeployFinish
Definition ItemBase.c:141

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

◆ PlayDeployLoopSoundEx()

void PlayDeployLoopSoundEx ( )
inlineprotected
4350 {
4351 if (!GetGame().IsDedicatedServer() && !m_DeployLoopSoundEx)
4352 {
4356 else
4357 Debug.Log("dbgSounds | null m_DeployLoopSoundEx from sound set: " + GetLoopDeploySoundset());
4358 }
4359 }
string GetLoopDeploySoundset()

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

◆ PlayDeploySound()

void PlayDeploySound ( )
inlineprotected
4371 {
4372 if (!GetGame().IsDedicatedServer() && !m_SoundDeploy)
4373 {
4375 if (m_SoundDeploy)
4377 else
4378 Debug.Log("dbgSounds | null m_SoundDeploy from sound set: " + GetDeploySoundset());
4379 }
4380 }
EffectSound m_SoundDeploy
Definition ItemBase.c:140
string GetDeploySoundset()

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

◆ PlayDetachSound()

void PlayDetachSound ( string slot_type)
inlineprotected
4449 {
4450 //TODO - evaluate if needed and devise universal config structure if so
4451 }

◆ PlayFireParticles()

static void PlayFireParticles ( ItemBase weapon,
int muzzle_index,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4128 {
4129 int id = muzzle_owner.GetMuzzleID();
4131
4132 if (WPOF_array)
4133 {
4134 for (int i = 0; i < WPOF_array.Count(); i++)
4135 {
4137
4138 if (WPOF)
4139 {
4141 }
4142 }
4143 }
4144 }

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

◆ PlayOverheatingParticles()

static void PlayOverheatingParticles ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4168 {
4169 int id = muzzle_owner.GetMuzzleID();
4170 array<ref WeaponParticlesOnOverheating> WPOOH_array = weapon.m_OnOverheatingEffect.Get(id);
4171
4172 if (WPOOH_array)
4173 {
4174 for (int i = 0; i < WPOOH_array.Count(); i++)
4175 {
4177
4178 if (WPOOH)
4179 {
4181 }
4182 }
4183 }
4184 }

◆ PlayPlaceSound()

void PlayPlaceSound ( )
inlineprotected
4395 {
4396 if (!GetGame().IsDedicatedServer() && !m_SoundPlace)
4397 {
4399 if (m_SoundPlace)
4401 else
4402 Debug.Log("dbgSounds | null m_SoundPlace from sound set: " + GetPlaceSoundset());
4403 }
4404 }
string GetPlaceSoundset()
EffectSound m_SoundPlace
Definition ItemBase.c:139

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

◆ PreLoadSoundAttachmentType()

void PreLoadSoundAttachmentType ( )
inlineprotected

Attachment Sound Type getting from config file.

4285 {
4286 string att_type = "None";
4287
4288 if (ConfigIsExisting("soundAttType"))
4289 {
4290 att_type = ConfigGetString("soundAttType");
4291 }
4292
4294 }

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

◆ ProcessDecay()

void ProcessDecay ( float delta,
bool hasRootAsPlayer )
inlineprotected
4576 {
4577 // this is stub, implemented on Edible_Base
4578 }

◆ ProcessItemTemperature()

void ProcessItemTemperature ( float delta,
bool hasParent,
bool hasRootAsPlayer,
ItemBase refParentIB )
inlineprotected
4534 {
4536 {
4537 if (refParentIB)
4538 {
4539 // cooling of an item inside other
4540 if (GetTemperature() > refParentIB.GetTemperature())
4542 }
4543 else
4544 {
4545 // cooling of an item on ground or inside non-itembase (car, ...)
4547 }
4548 }
4549 }
override bool IsFireplace()
Definition FireplaceBase.c:504
const float TEMPERATURE_RATE_COOLING_INSIDE
Definition constants.c:812

Перекрестные ссылки AddTemperature(), GetTemperature(), GetTemperatureMin(), IsFireplace() и GameConstants::TEMPERATURE_RATE_COOLING_INSIDE.

◆ ProcessItemWetness()

void ProcessItemWetness ( float delta,
bool hasParent,
bool hasRootAsPlayer,
ItemBase refParentIB )
inlineprotected
4509 {
4510 if (!hasRootAsPlayer)
4511 {
4512 if (refParentIB)
4513 {
4514 // parent is wet
4517 // parent has liquid inside
4518 else if ((refParentIB.GetLiquidType() != 0) && (refParentIB.GetQuantity() > 0) && (m_VarWet < m_VarWetMax))
4520 // drying
4521 else if (m_VarWet > m_VarWetMin)
4522 AddWet(-1 * delta * GetDryingIncrement("ground") * 2);
4523 }
4524 else
4525 {
4526 // drying on ground or inside non-itembase (car, ...)
4527 if (m_VarWet > m_VarWetMin)
4528 AddWet(-1 * delta * GetDryingIncrement("ground"));
4529 }
4530 }
4531 }
float GetDryingIncrement(string pIncrementName)
Definition ItemBase.c:3582
const float WETNESS_RATE_WETTING_INSIDE
Definition constants.c:807
const float WETNESS_RATE_WETTING_LIQUID
Definition constants.c:808
const float STATE_SOAKING_WET
Definition constants.c:785

Перекрестные ссылки 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

◆ ReadVarsFromCTX()

bool ReadVarsFromCTX ( ParamsReadContext ctx,
int version = -1 )
inlineprotected
2789 {
2790 int numOfItems;
2791 int intValue;
2792 float value;
2793 if (version <= 108 && version!= -1)
2794 {
2796 return false;
2797
2800
2801 for (int i = 0; i < numOfItems; i++)
2802 {
2804 return false;
2806
2808 }
2809
2811 return true;
2812 }
2813 else if (version <= 116 && version!= -1)
2814 {
2815 if (!ctx.Read(numOfItems))
2816 return false;
2817
2819
2820 for (int j = 0; j < numOfItems; j++)
2821 {
2822 if (!ctx.Read(value))
2823 return false;
2825 }
2826
2828 return true;
2829 }
2830 else
2831 {
2832 int mask;
2833 if (!ctx.Read(mask))
2834 return false;
2835
2836 if (mask & VARIABLE_QUANTITY)
2837 {
2838 if (!ctx.Read(value))
2839 return false;
2840
2841 if (m_IsStoreLoad)
2842 {
2844 }
2845 else
2846 {
2847 SetQuantity(value, true, false, false, false);
2848 }
2849 }
2850 //--------------------------------------------
2852 {
2853 if (!ctx.Read(value))
2854 return false;
2856 }
2857 //--------------------------------------------
2858 if (mask & VARIABLE_WET)
2859 {
2860 if (!ctx.Read(value))
2861 return false;
2862 SetWet(value);
2863 }
2864 //--------------------------------------------
2866 {
2867 if (!ctx.Read(intValue))
2868 return false;
2870 }
2871 //--------------------------------------------
2872 if (mask & VARIABLE_COLOR)
2873 {
2874 if (!ctx.Read(intValue))
2875 return false;
2876
2878 if (!ctx.Read(value))
2879 return false;
2880
2882 if (!ctx.Read(value))
2883 return false;
2884
2886 if (!ctx.Read(value))
2887 return false;
2888
2890 }
2891 //--------------------------------------------
2893 {
2894 if (!ctx.Read(intValue))
2895 return false;
2897 }
2898 }
2899 return true;
2900 }
static ref Param1< float > PARAM1_FLOAT
Definition UtilityClasses.c:13
void DeSerializeNumericalVars(array< float > floats)
Definition ItemBase.c:2685

Перекрестные ссылки CachedObjectsArrays::ARRAY_FLOAT, DeSerializeNumericalVars(), m_ColorComponentA, m_ColorComponentB, m_ColorComponentG, m_ColorComponentR, m_IsStoreLoad, m_StoreLoadedQuantity, CachedObjectsParams::PARAM1_FLOAT, CachedObjectsParams::PARAM1_INT, SetCleanness(), SetLiquidType(), SetQuantity(), SetTemperature(), 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
592 {
595
597 OP.RegisterParticle(p);
598 OP.SetOverheatingLimitMin(min_heat_coef);
599 OP.SetOverheatingLimitMax(max_heat_coef);
600 OP.SetParticleParams(particle_id, parent, local_pos, local_ori);
601
603 }
int particle_id
Definition SmokeSimulation.c:28

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

◆ RemoveAction()

void RemoveAction ( typename actionName )
inlineprotected
363 {
365 ActionBase action = player.GetActionManager().GetAction(actionName);
366 typename ai = action.GetInputType();
368
369 if (action_array)
370 {
371 action_array.RemoveItem(action);
372 }
373 }

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

◆ RemoveAgent()

override void RemoveAgent ( int agent_id)
inlineprotected
3875 {
3877 {
3879 }
3880 }
bool ContainsAgent(int agent_id)
Definition ItemBase.c:3861

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

◆ RemoveAllAgents()

override void RemoveAllAgents ( )
inlineprotected
3884 {
3885 m_AttachedAgents = 0;
3886 }

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

◆ RemoveAllAgentsExcept()

override void RemoveAllAgentsExcept ( int agents_to_keep_mask)
inlineprotected

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

◆ RemoveDebugActionsMask()

static void RemoveDebugActionsMask ( int mask)
inlinestaticprotected
786 {
787 ItemBase.m_DebugActionsMask &= ~mask;
788 }

◆ RemoveItemVariable()

void RemoveItemVariable ( int variable)
inlineprotected

Removes variable from variable mask, making it appear as though the variable has never been changed from default.

3455 {
3457 }

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

◆ RemoveLightSourceItem()

void RemoveLightSourceItem ( )
inlineprotected
4654 {
4656 }

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

◆ Repair()

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

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

◆ SaveAgents()

void SaveAgents ( ParamsWriteContext ctx)
inlineprotected
3963 {
3964
3965 ctx.Write(m_AttachedAgents);
3966 }

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

◆ SaveVariables()

void SaveVariables ( ParamsWriteContext ctx)
inlineprotected
2903 {
2904 //Debug.Log("Saving Item Stage 0 "+ClassName(this)+" " + ToString(this));
2905
2906 //first set the flags
2907
2908 int varFlags = 0;
2909
2910 if (m_VariablesMask)
2912
2913 ctx.Write(varFlags);
2914 //-------------------
2915
2916 //now serialize the variables
2917
2918 //floats
2919 if (m_VariablesMask)
2921 }
void WriteVarsToCTX(ParamsWriteContext ctx)
Definition ItemBase.c:2749

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

◆ SerializeNumericalVars()

void SerializeNumericalVars ( array< float > floats_out)
inlineprotected
2646 {
2647 // the order of serialization must be the same as the order of de-serialization
2649 //--------------------------------------------
2651 {
2652 floats_out.Insert(m_VarQuantity);
2653 }
2654 //--------------------------------------------
2656 {
2658 }
2659 //--------------------------------------------
2661 {
2662 floats_out.Insert(m_VarWet);
2663 }
2664 //--------------------------------------------
2666 {
2668 }
2669 //--------------------------------------------
2671 {
2676 }
2677 //--------------------------------------------
2679 {
2680 floats_out.Insert(m_Cleanness);
2681 }
2682 //--------------------------------------------
2683 }

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

◆ SetActions()

void SetActions ( )
inlineprotected
316 {
320 AddAction(ActionDropItem);
322 }
Definition ActionAttachWithSwich.c:2
Definition ActionTakeItem.c:7
Definition ActionTakeItemToHands.c:2
Definition ActionWorldCraft.c:33
void AddAction(typename actionName)
Definition ItemBase.c:324

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

◆ SetCanBeMovedOverride()

void SetCanBeMovedOverride ( bool setting)
inlineprotected
2440 {
2442 }

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

◆ SetCEBasedQuantity()

void SetCEBasedQuantity ( )
inlineprotected
804 {
805 if (GetEconomyProfile())
806 {
807 float q_max = GetEconomyProfile().GetQuantityMax();
808 if (q_max > 0)
809 {
810 float q_min = GetEconomyProfile().GetQuantityMin();
812
813 if (HasComponent(COMP_TYPE_ENERGY_MANAGER))//more direct access for speed
814 {
815 ComponentEnergyManager comp = GetCompEM();
816 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
817 {
818 //Print("setting EM quantity for " + this + " to " + quantity_randomized);
819 comp.SetEnergy0To1(quantity_randomized);
820 }
821 /*
822 else
823 Print("NOT setting EM quantity for " + this + " to " + quantity_randomized);
824 */
825 }
826 else if (HasQuantity())
827 {
829 //PrintString("<==> Normalized quantity for item: "+ GetType()+", qmin:"+q_min.ToString()+"; qmax:"+q_max.ToString()+";quantity:" +quantity_randomized.ToString());
830 }
831
832 }
833 }
834 }
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()

void SetCleanness ( int value,
bool allow_client = false )
inlineprotected
3706 {
3708 return;
3709
3711
3713
3716 }
bool IsServerCheck(bool allow_client)
Definition ItemBase.c:3670
void SetVariableMask(int variable)
Definition ItemBase.c:3444
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(), IsServerCheck(), m_Cleanness, m_CleannessMax, m_CleannessMin, SetVariableMask() и VARIABLE_CLEANNESS.

◆ SetColor()

void SetColor ( int r,
int g,
int b,
int a )
inlineprotected

◆ SetDebugActionsMask()

static void SetDebugActionsMask ( int mask)
inlinestaticprotected
776 {
777 ItemBase.m_DebugActionsMask = mask;
778 }

◆ SetIsBeingPlaced()

void SetIsBeingPlaced ( bool is_being_placed)
inlineprotected
965 {
967 if (!is_being_placed)
969 SetSynchDirty();
970 }
void OnEndPlacement()
Definition ItemBase.c:973

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

◆ SetIsDeploySound()

void SetIsDeploySound ( bool is_deploy_sound)
inlineprotected
4340 {
4342 }

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

◆ SetIsHologram()

void SetIsHologram ( bool is_hologram)
inlineprotected
991 {
993 SetSynchDirty();
994 }

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

◆ SetIsPlaceSound()

void SetIsPlaceSound ( bool is_place_sound)
inlineprotected
4330 {
4332 }

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

◆ SetLiquidType()

void SetLiquidType ( int value,
bool allow_client = false )
inlineprotected
3777 {
3779 return;
3780
3783 }

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

◆ SetQuantity()

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.

3187 {
3189 return false;
3190
3191 if (!HasQuantity())
3192 return false;
3193
3194 if (IsLiquidContainer() && GetLiquidType() == 0)
3195 {
3196 Debug.LogError("No LiquidType specified, try setting 'varLiquidTypeInit' to a particular liquid type");
3197 return false;
3198 }
3199
3200 float min = GetQuantityMin();
3201 float max = GetQuantityMax();
3202
3203 if (value <= (min + 0.001))
3204 value = min;
3205
3206 if (value == min)
3207 {
3208 if (destroy_config)
3209 {
3210 bool dstr = ConfigGetBool("varQuantityDestroyOnMin");
3211 if (dstr)
3212 {
3214 this.Delete();
3215 return true;
3216 }
3217 }
3218 else if (destroy_forced)
3219 {
3221 this.Delete();
3222 return true;
3223 }
3224 // we get here if destroy_config IS true AND dstr(config destroy param) IS false;
3225 RemoveAllAgents();//we remove all agents when we got to the min value, but the item is not getting deleted
3226 }
3227
3228 float delta = m_VarQuantity;
3230
3231 if (m_StoreLoadedQuantity == float.LOWEST)//any other value means we are setting quantity from storage
3232 {
3234
3235 if (delta)
3236 {
3238 }
3239 }
3240
3242
3243 return false;
3244 }
override void RemoveAllAgents()
Definition ItemBase.c:3883
void OnQuantityChanged(float delta)
Called on server side when this item's quantity is changed. Call super.OnQuantityChanged(); first whe...
Definition ItemBase.c:1860

Перекрестные ссылки Math::Clamp(), GetLiquidType(), GetQuantityMax(), GetQuantityMin(), HasQuantity(), IsLiquidContainer(), IsServerCheck(), Debug::LogError(), LOWEST, m_StoreLoadedQuantity, m_VarQuantity, OnQuantityChanged(), RemoveAllAgents(), SetVariableMask() и VARIABLE_QUANTITY.

◆ SetQuantityMax()

void SetQuantityMax ( )
inlineprotected
3254 {
3255 float max = GetQuantityMax();
3257 }

Перекрестные ссылки 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)

3267 {
3268 float value_clamped = Math.Clamp(value, 0, 1);//just to make sure
3271 }
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.

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

◆ SetQuantityToMinimum()

override void SetQuantityToMinimum ( )
inlineprotected
3260 {
3261 float min = GetQuantityMin();
3263 }

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

◆ SetResultOfSplit()

void SetResultOfSplit ( bool value)
inlineprotected
2057 {
2059 }

◆ SetTakeable()

override void SetTakeable ( bool pState)
inlineprotected
4273 {
4275 SetSynchDirty();
4276 }

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

◆ SetTemperature()

override void SetTemperature ( float value,
bool allow_client = false )
inlineprotected
3527 {
3529 return;
3530
3531 float min = GetTemperatureMin();
3532 float max = GetTemperatureMax();
3533
3535
3537
3540 }

Перекрестные ссылки Math::Clamp(), GetTemperatureMax(), GetTemperatureMin(), IsServerCheck(), m_VarTemperature, SetVariableMask() и VARIABLE_TEMPERATURE.

◆ SetTemperatureMax()

override void SetTemperatureMax ( )
inlineprotected
3548 {
3550 }

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

◆ SetVariableMask()

void SetVariableMask ( int variable)
inlineprotected
3445 {
3447 if (GetGame().IsServer())
3448 {
3449 SetSynchDirty();
3450 }
3451 }

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

◆ SetWet()

override void SetWet ( float value,
bool allow_client = false )
inlineprotected
3601 {
3603 return;
3604
3605 float min = GetWetMin();
3606 float max = GetWetMax();
3607
3608 float previousValue = m_VarWet;
3609
3611
3612 if (previousValue != m_VarWet)
3613 {
3616 }
3617 }

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

◆ SetWetMax()

override void SetWetMax ( )
inlineprotected
3625 {
3627 }

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

◆ SetZoneDamageCEInit()

void SetZoneDamageCEInit ( )
inlineprotected

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

4491 {
4492 float global_health = GetHealth01("","Health");
4494 GetDamageZones(zones);
4495 //set damage of all zones to match global health level
4496 for (int i = 0; i < zones.Count(); i++)
4497 {
4498 SetHealth01(zones.Get(i),"Health",global_health);
4499 }
4500 }

◆ SoundSynchRemote()

void SoundSynchRemote ( )
inlineprotected
4313 {
4314 m_IsSoundSynchRemote = true;
4315
4316 SetSynchDirty();
4317 }

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

◆ SoundSynchRemoteReset()

void SoundSynchRemoteReset ( )
inlineprotected
4306 {
4307 m_IsSoundSynchRemote = false;
4308
4309 SetSynchDirty();
4310 }

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

◆ SplitIntoStackMax()

void SplitIntoStackMax ( EntityAI destination_entity,
int slot_id,
PlayerBase player )
inlineprotected
1560 {
1561 float split_quantity_new;
1563 float quantity = GetQuantity();
1566
1568 {
1569 if (stack_max <= GetQuantity())
1571 else
1573
1574 new_item = ItemBase.Cast(destination_entity.GetInventory().CreateAttachmentEx(this.GetType(), slot_id));
1575 if (new_item)
1576 {
1577 new_item.SetResultOfSplit(true);
1578 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1580 new_item.SetQuantity(split_quantity_new);
1581 }
1582 }
1583 else if (destination_entity && slot_id == -1)
1584 {
1585 if (quantity > stack_max)
1587 else
1589
1590 if (destination_entity.GetInventory().FindFreeLocationFor(this, FindInventoryLocationType.ANY, loc))
1591 {
1592 Object o = destination_entity.GetInventory().LocationCreateEntity(loc, GetType(), ECE_IN_INVENTORY, RF_DEFAULT);
1593 new_item = ItemBase.Cast(o);
1594 }
1595
1596 if (new_item)
1597 {
1598 new_item.SetResultOfSplit(true);
1599 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1601 new_item.SetQuantity(split_quantity_new);
1602 }
1603 }
1604 else
1605 {
1606 if (stack_max != 0)
1607 {
1608 if (stack_max < GetQuantity())
1609 {
1611 }
1612
1613 if (split_quantity_new == 0)
1614 {
1615 if (!GetGame().IsMultiplayer())
1616 player.PhysicalPredictiveDropItem(this);
1617 else
1618 player.ServerDropEntity(this);
1619 return;
1620 }
1621
1622 new_item = ItemBase.Cast(GetGame().CreateObjectEx(GetType(), player.GetWorldPosition(), ECE_PLACE_ON_SURFACE));
1623
1624 if (new_item)
1625 {
1626 new_item.SetResultOfSplit(true);
1627 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1629 new_item.SetQuantity(stack_max);
1630 new_item.PlaceOnSurface();
1631 }
1632 }
1633 }
1634 }
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
override int GetTargetQuantityMax(int attSlotID=-1)
Definition ItemBase.c:3311
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
1719 {
1720 float quantity = GetQuantity();
1721 float split_quantity_new;
1724 {
1726 if (quantity > stackable)
1728 else
1730
1731 new_item = ItemBase.Cast(destination_entity.GetInventory().CreateEntityInCargoEx(this.GetType(), idx, row, col, false));
1732 if (new_item)
1733 {
1734 new_item.SetResultOfSplit(true);
1735 MiscGameplayFunctions.TransferItemProperties(this,new_item);
1737 new_item.SetQuantity(split_quantity_new);
1738 }
1739 }
1740 }

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

◆ SplitIntoStackMaxCargoClient()

void SplitIntoStackMaxCargoClient ( EntityAI destination_entity,
int idx,
int row,
int col )
inlineprotected
1658 {
1659 if (GetGame().IsClient())
1660 {
1662 {
1665 ctx.Write(2);
1666 ItemBase dummy = this; // @NOTE: workaround for correct serialization
1667 ctx.Write(dummy);
1668 ctx.Write(destination_entity);
1669 ctx.Write(true);
1670 ctx.Write(idx);
1671 ctx.Write(row);
1672 ctx.Write(col);
1673 ctx.Send();
1674 }
1675 }
1676 else if (!GetGame().IsMultiplayer())
1677 {
1679 }
1680 }
void SplitIntoStackMaxCargo(EntityAI destination_entity, int idx, int row, int col)
Definition ItemBase.c:1718

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

◆ SplitIntoStackMaxClient()

void SplitIntoStackMaxClient ( EntityAI destination_entity,
int slot_id )
inlineprotected
1537 {
1538 if (GetGame().IsClient())
1539 {
1541 {
1544 ctx.Write(1);
1545 ItemBase i1 = this; // @NOTE: workaround for correct serialization
1546 ctx.Write(i1);
1547 ctx.Write(destination_entity);
1548 ctx.Write(true);
1549 ctx.Write(slot_id);
1550 ctx.Send();
1551 }
1552 }
1553 else if (!GetGame().IsMultiplayer())
1554 {
1556 }
1557 }
void SplitIntoStackMax(EntityAI destination_entity, int slot_id, PlayerBase player)
Definition ItemBase.c:1559

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

◆ SplitIntoStackMaxHands()

void SplitIntoStackMaxHands ( PlayerBase player)
inlineprotected
1767 {
1768 float quantity = GetQuantity();
1769 float split_quantity_new;
1771 if (player)
1772 {
1774 if (quantity > stackable)
1776 else
1778
1779 EntityAI in_hands = player.GetHumanInventory().CreateInHands(this.GetType());
1780 new_item = ItemBase.Cast(in_hands);
1781 if (new_item)
1782 {
1783 new_item.SetResultOfSplit(true);
1784 MiscGameplayFunctions.TransferItemProperties(this,new_item);
1786 new_item.SetQuantity(split_quantity_new);
1787 }
1788 }
1789 }

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

◆ SplitIntoStackMaxHandsClient()

void SplitIntoStackMaxHandsClient ( PlayerBase player)
inlineprotected
1743 {
1744 if (GetGame().IsClient())
1745 {
1747 {
1750 ctx.Write(3);
1751 ItemBase i1 = this; // @NOTE: workaround for correct serialization
1752 ctx.Write(i1);
1754 ctx.Write(destination_entity);
1755 ctx.Write(true);
1756 ctx.Write(0);
1757 ctx.Send();
1758 }
1759 }
1760 else if (!GetGame().IsMultiplayer())
1761 {
1763 }
1764 }
void SplitIntoStackMaxHands(PlayerBase player)
Definition ItemBase.c:1766

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

◆ SplitIntoStackMaxToInventoryLocation()

void SplitIntoStackMaxToInventoryLocation ( notnull InventoryLocation dst)
inlineprotected
1683 {
1685 }
ItemBase SplitIntoStackMaxToInventoryLocationEx(notnull InventoryLocation dst)
Definition ItemBase.c:1687

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

◆ SplitIntoStackMaxToInventoryLocationClient()

void SplitIntoStackMaxToInventoryLocationClient ( notnull InventoryLocation dst)
inlineprotected
1637 {
1638 if (GetGame().IsClient())
1639 {
1641 {
1644 ctx.Write(4);
1645 ItemBase thiz = this; // @NOTE: workaround for correct serialization
1646 ctx.Write(thiz);
1647 dst.WriteToContext(ctx);
1648 ctx.Send();
1649 }
1650 }
1651 else if (!GetGame().IsMultiplayer())
1652 {
1654 }
1655 }
void SplitIntoStackMaxToInventoryLocation(notnull InventoryLocation dst)
Definition ItemBase.c:1682

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

◆ SplitIntoStackMaxToInventoryLocationEx()

ItemBase SplitIntoStackMaxToInventoryLocationEx ( notnull InventoryLocation dst)
inlineprotected
1688 {
1689 float quantity = GetQuantity();
1690 float split_quantity_new;
1692 if (dst.IsValid())
1693 {
1694 int slot_id = dst.GetSlot();
1696
1697 if (quantity > stack_max)
1699 else
1701
1703
1704 if (new_item)
1705 {
1706 new_item.SetResultOfSplit(true);
1707 MiscGameplayFunctions.TransferItemProperties(this,new_item);
1709 new_item.SetQuantity(split_quantity_new);
1710 }
1711
1712 return new_item;
1713 }
1714
1715 return null;
1716 }
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
1825 {
1826 if (!CanBeSplit())
1827 {
1828 return;
1829 }
1830
1831 float quantity = GetQuantity();
1833
1835 bool found = player.GetInventory().FindFirstFreeLocationForNewEntity(GetType(), FindInventoryLocationType.ATTACHMENT, invloc);
1836
1838 new_item = player.CreateCopyOfItemInInventoryOrGroundEx(this, true);
1839
1840 if (new_item)
1841 {
1842 if (new_item.GetQuantityMax() < split_quantity_new)
1843 {
1844 split_quantity_new = new_item.GetQuantityMax();
1845 }
1846 if (found && invloc.IsValid() && invloc.GetType() == InventoryLocationType.ATTACHMENT && split_quantity_new > 1)
1847 {
1848 AddQuantity(-1);
1849 new_item.SetQuantity(1);
1850 }
1851 else
1852 {
1854 new_item.SetQuantity(split_quantity_new);
1855 }
1856 }
1857 }
static proto float Floor(float f)
Returns floor of value.

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

◆ SplitItemToInventoryLocation()

void SplitItemToInventoryLocation ( notnull InventoryLocation dst)
inlineprotected
1792 {
1793 if (!CanBeSplit())
1794 return;
1795
1796 float quantity = GetQuantity();
1797 float split_quantity_new = Math.Floor(quantity * 0.5);
1798
1800
1801 if (new_item)
1802 {
1803 if (new_item.GetQuantityMax() < split_quantity_new)
1804 {
1805 split_quantity_new = new_item.GetQuantityMax();
1806 }
1807
1808 new_item.SetResultOfSplit(true);
1809 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1810
1811 if (dst.IsValid() && dst.GetType() == InventoryLocationType.ATTACHMENT && split_quantity_new > 1)
1812 {
1813 AddQuantity(-1);
1814 new_item.SetQuantity(1);
1815 }
1816 else
1817 {
1819 new_item.SetQuantity(split_quantity_new);
1820 }
1821 }
1822 }

Перекрестные ссылки AddQuantity(), 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
573 {
575 ItemBase.PlayOverheatingParticles(this, ammoType, this, suppressor, "CfgWeapons");
576 }

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

◆ StopDeployLoopSoundEx()

void StopDeployLoopSoundEx ( )
inlineprotected
4362 {
4363 if (!GetGame().IsDedicatedServer())
4364 {
4367 }
4368 }
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
Definition EffectSound.c:885

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

◆ StopItemDynamicPhysics()

void StopItemDynamicPhysics ( )
inlineprotected
4473 {
4474 SetDynamicPhysicsLifeTime(0.01);
4475 m_ItemBeingDroppedPhys = false;
4476 }
bool m_ItemBeingDroppedPhys
Definition ItemBase.c:72

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

◆ StopOverheating()

void StopOverheating ( ItemBase weapon = null,
string ammoType = "",
ItemBase muzzle_owner = null,
ItemBase suppressor = null,
string config_to_search = "" )
inlineprotected
586 {
588 ItemBase.StopOverheatingParticles(weapon, ammoType, muzzle_owner, suppressor, config_to_search);
589 }

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

◆ StopOverheatingParticles()

static void StopOverheatingParticles ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4208 {
4209 int id = muzzle_owner.GetMuzzleID();
4210 array<ref WeaponParticlesOnOverheating> WPOOH_array = weapon.m_OnOverheatingEffect.Get(id);
4211
4212 if (WPOOH_array)
4213 {
4214 for (int i = 0; i < WPOOH_array.Count(); i++)
4215 {
4217
4218 if (WPOOH)
4219 {
4221 }
4222 }
4223 }
4224 }

◆ ToggleDebugActionsMask()

static void ToggleDebugActionsMask ( int mask)
inlinestaticprotected
791 {
793 {
795 }
796 else
797 {
799 }
800 }
static bool HasDebugActionsMask(int mask)
Definition ItemBase.c:770
static void AddDebugActionsMask(int mask)
Definition ItemBase.c:780
static void RemoveDebugActionsMask(int mask)
Definition ItemBase.c:785

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

◆ TransferAgents()

void TransferAgents ( int agents)
inlineprotected

transfer agents from another item

3903 {
3905 }

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

◆ TransferModifiers()

void TransferModifiers ( PlayerBase reciever)
private

appears to be deprecated, legacy code

◆ TransferVariablesFloat()

void TransferVariablesFloat ( array< float > float_vars)
inlineprotected
2595 {
2597 }

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

◆ UnlockFromParent()

void UnlockFromParent ( )
inlineprotected

Unlocks this item from its attachment slot of its parent.

851 {
852 EntityAI parent = GetHierarchyParent();
853
854 if (parent)
855 {
857 GetInventory().GetCurrentInventoryLocation(inventory_location_to_unlock);
858 parent.GetInventory().SetSlotLock(inventory_location_to_unlock.GetSlot(), false);
859 }
860 }

◆ UpdateAllOverheatingParticles()

void UpdateAllOverheatingParticles ( )
inlineprotected
614 {
616 {
618 int count = m_OverheatingParticles.Count();
619
620 for (int i = count; i > 0; --i)
621 {
622 int id = i - 1;
624 Particle p = OP.GetParticle();
625
626 float overheat_min = OP.GetOverheatingLimitMin();
627 float overheat_max = OP.GetOverheatingLimitMax();
628
630 {
631 if (p)
632 {
633 p.Stop();
634 OP.RegisterParticle(null);
635 }
636 }
637 }
638 }
639 }
float GetOverheatingCoef()
Definition ItemBase.c:605

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

◆ UpdateOverheating()

void UpdateOverheating ( ItemBase weapon = null,
string ammoType = "",
ItemBase muzzle_owner = null,
ItemBase suppressor = null,
string config_to_search = "" )
inlineprotected
579 {
581 ItemBase.UpdateOverheatingParticles(this, ammoType, this, suppressor, "CfgWeapons");
583 }
void UpdateAllOverheatingParticles()
Definition ItemBase.c:613
void KillAllOverheatingParticles()
Definition ItemBase.c:641

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

◆ UpdateOverheatingParticles()

static void UpdateOverheatingParticles ( ItemBase weapon,
string ammoType,
ItemBase muzzle_owner,
ItemBase suppressor,
string config_to_search )
inlinestaticprotected
4188 {
4189 int id = muzzle_owner.GetMuzzleID();
4190 array<ref WeaponParticlesOnOverheating> WPOOH_array = weapon.m_OnOverheatingEffect.Get(id);
4191
4192 if (WPOOH_array)
4193 {
4194 for (int i = 0; i < WPOOH_array.Count(); i++)
4195 {
4197
4198 if (WPOOH)
4199 {
4201 }
4202 }
4203 }
4204 }

◆ UpdateQuickbarShortcutVisibility()

void UpdateQuickbarShortcutVisibility ( PlayerBase player)
inlineprotected

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

3797 {
3798 player.SetEnableQuickBarEntityShortcut(this,!GetHierarchyParent() || GetHierarchyParent().GetInventory().AreChildrenAccessible());
3799 }

◆ UsesGlobalDeploy()

bool UsesGlobalDeploy ( )
inlineprotected
283 {
284 return false;
285 }

◆ WriteVarsToCTX()

void WriteVarsToCTX ( ParamsWriteContext ctx)
inlineprotected
2750 {
2751 ctx.Write(m_VariablesMask);
2752
2753 //--------------------------------------------
2755 {
2756 ctx.Write(m_VarQuantity);
2757 }
2758 //--------------------------------------------
2760 {
2761 ctx.Write(m_VarTemperature);
2762 }
2763 //--------------------------------------------
2765 {
2766 ctx.Write(m_VarWet);
2767 }
2768 //--------------------------------------------
2770 {
2771 ctx.Write(m_VarLiquidType);
2772 }
2773 //--------------------------------------------
2775 {
2776 ctx.Write(m_ColorComponentR);
2777 ctx.Write(m_ColorComponentG);
2778 ctx.Write(m_ColorComponentB);
2779 ctx.Write(m_ColorComponentA);
2780 }
2781 //--------------------------------------------
2783 {
2784 ctx.Write(m_Cleanness);
2785 }
2786 }

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

Поля

◆ can_this_be_combined

bool can_this_be_combined = false
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 = false
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 = new array<int>
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_ItemAttachOffset

float m_ItemAttachOffset
private

◆ m_ItemBehaviour

int m_ItemBehaviour = -1
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_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 = 0
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_ThrowItemOnDrop

bool m_ThrowItemOnDrop
private

◆ m_VariablesMask

int m_VariablesMask
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_VarTemperature

float m_VarTemperature
private

◆ m_VarTemperatureInit

float m_VarTemperatureInit
private

◆ m_VarTemperatureMax

float m_VarTemperatureMax
private

◆ m_VarTemperatureMin

float m_VarTemperatureMin
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

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