DayZ 1.24
Loading...
Searching...
No Matches
ItemBase Class Reference
Inheritance diagram for ItemBase:
[legend]
Collaboration diagram for ItemBase:
[legend]

Protected Member Functions

void BarbedWire ()
 
void ~BarbedWire ()
 
override void EEInit ()
 
bool IsMounted ()
 
bool GetSlotLockedState ()
 
void SetMountedState (bool is_mounted)
 
void UpdateAttachmentSlot ()
 
void LockAttachmentSlot (bool lock_state)
 
void Synchronize ()
 
override void OnVariablesSynchronized ()
 
void PlayDeployLoopSound ()
 
void StopDeployLoopSound ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void AfterStoreLoad ()
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
override void OnWork (float consumed_energy)
 
override void OnIsPlugged (EntityAI source_device)
 
override void OnIsUnplugged (EntityAI last_energy_source)
 
override void OnInventoryEnter (Man player)
 
void CreateElectrifiedDamageTrigger ()
 
void CreateDamageTrigger ()
 
void DestroyDamageTrigger ()
 
void Spark ()
 
void SoundCut ()
 
void SoundSpark ()
 
void SoundBuzzLoopStart ()
 
void SoundBuzzLoopStop ()
 
void SoundElectricShock ()
 
void SoundCollision ()
 
override void PreAreaDamageActions ()
 
override void PostAreaDamageActions ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
override void SetActions ()
 
void BaseBuildingBase ()
 
override void EEDelete (EntityAI parent)
 
override string GetInvulnerabilityTypeString ()
 
override bool CanObstruct ()
 
override int GetHideIconMask ()
 
void SynchronizeBaseState ()
 
override void OnVariablesSynchronized ()
 
void OnSynchronizedClient ()
 
void RegisterPartForSync (int part_id)
 
void UnregisterPartForSync (int part_id)
 
bool IsPartBuildInSyncData (int part_id)
 
void RegisterActionForSync (int part_id, int action_id)
 
void ResetActionSyncData ()
 
void SetActionFromSyncData ()
 
void SetPartFromSyncData (ConstructionPart part)
 
void SetPartsFromSyncData ()
 
ConstructionPart GetConstructionPartById (int id)
 
bool HasBase ()
 
void SetBaseState (bool has_base)
 
override bool IsDeployable ()
 
bool IsOpened ()
 
ItemBase CreateConstructionKit ()
 
void CreateConstructionKitInHands (notnull PlayerBase player)
 
vector GetKitSpawnPosition ()
 
string GetConstructionKitType ()
 
void DestroyConstructionKit (ItemBase construction_kit)
 
void DestroyConstruction ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void AfterStoreLoad ()
 
void SetPartsAfterStoreLoad ()
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
override void EEOnAfterLoad ()
 
override void EEInit ()
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
void OnSetSlotLock (int slotId, bool locked, bool was_locked)
 
override bool IgnoreOutOfReachCondition ()
 
void OnPartBuiltServer (notnull Man player, string part_name, int action_id)
 
void OnPartBuiltClient (string part_name, int action_id)
 
void OnPartDismantledServer (notnull Man player, string part_name, int action_id)
 
void OnPartDismantledClient (string part_name, int action_id)
 
void OnPartDestroyedServer (Man player, string part_name, int action_id, bool destroyed_by_connected_part=false)
 
void OnPartDestroyedClient (string part_name, int action_id)
 
void InitBaseState ()
 
void InitVisuals ()
 
void UpdateVisuals ()
 
void UpdateAttachmentVisuals (string slot_name, bool is_locked)
 
void UpdatePhysics ()
 
void UpdateAttachmentPhysics (string slot_name, bool is_locked)
 
void UpdateNavmesh ()
 
override bool CanUseConstruction ()
 
override bool CanUseConstructionBuild ()
 
bool IsAttachmentSlotLocked (EntityAI attachment)
 
bool IsAttachmentSlotLocked (string slot_name)
 
void GetAttachmentSlots (EntityAI entity, out array< string > attachment_slots)
 
bool CheckSlotVerticalDistance (int slot_id, PlayerBase player)
 
bool CheckMemoryPointVerticalDistance (float max_dist, string selection, PlayerBase player)
 
bool CheckLevelVerticalDistance (float max_dist, string selection, PlayerBase player)
 
void ConstructionInit ()
 
Construction GetConstruction ()
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
bool HasAttachmentsBesidesBase ()
 
override bool ShowZonesHealth ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanRemoveFromCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool IsFacingPlayer (PlayerBase player, string selection)
 
override bool IsPlayerInside (PlayerBase player, string selection)
 
bool MustBeBuiltFromOutside ()
 Some buildings can only be built from outside.
 
bool IsFacingCamera (string selection)
 
bool PerformRoofCheckForBase (string partName, PlayerBase player, out bool result)
 
bool HasProperDistance (string selection, PlayerBase player)
 
bool CanFoldBaseBuildingObject ()
 
ItemBase FoldBaseBuildingObject ()
 
void CreateAreaDamage (string slot_name, float rotation_angle=0)
 
void CalcDamageAreaRotation (float angle_deg, out vector center, out vector orientation)
 
void DestroyAreaDamage (string slot_name)
 
override bool IsIgnoredByConstruction ()
 
void SoundBuildStart (string part_name)
 
void SoundDismantleStart (string part_name)
 
void SoundDestroyStart (string part_name)
 
string GetBuildSoundByMaterial (string part_name)
 
string GetDismantleSoundByMaterial (string part_name)
 
void CheckForHybridAttachments (EntityAI item, string slot_name)
 
override int GetDamageSystemVersionChange ()
 
override void SetActions ()
 
void DebugCustomState ()
 
array< stringOnDebugSpawnBuildExcludes ()
 Excludes certain parts from being built by OnDebugSpawn, uses Contains to compare.
 
override void OnDebugSpawn ()
 
void FullyBuild ()
 
void BatteryCharger ()
 
override bool IsElectricAppliance ()
 
override void OnWork (float consumed_energy)
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
void UpdateStatusLights ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI player)
 
override void OnOwnSocketTaken (EntityAI device)
 
override void OnOwnSocketReleased (EntityAI device)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanLoadAttachment (EntityAI attachment)
 
void HideAttachedClipsStates ()
 
void RedLightOn ()
 
void GreenLightOn ()
 
void YellowLightOn ()
 
void SwitchLightOn ()
 
void RedLightOff ()
 
void GreenLightOff ()
 
void YellowLightOff ()
 
void SwitchLightOff ()
 
override void OnSwitchOn ()
 
override void OnSwitchOff ()
 
override void OnInventoryExit (Man player)
 
override void OnInventoryEnter (Man player)
 
override void OnVariablesSynchronized ()
 
override void RefreshPhysics ()
 
override void OnPlacementStarted (Man player)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool IsDeployable ()
 
override string GetPlaceSoundset ()
 
override void SetActions ()
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
void RefreshFlameVisual (bool working=false)
 
void SoundBurningStart ()
 
void SoundBurningStop ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanRemoveFromCargo (EntityAI parent)
 
override bool IsIgnited ()
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override void SetActions ()
 
EntityAI GetGasCanister ()
 
bool HasEnoughEnergyForRepair (float pTime)
 
override void OnDebugSpawn ()
 
void KitBase ()
 
void ~KitBase ()
 
override bool IsBasebuildingKit ()
 
override bool HasProxyParts ()
 
override bool CanProxyObstruct ()
 
override void OnVariablesSynchronized ()
 
override void EEInit ()
 
override bool DisassembleOnLastDetach ()
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override void OnEndPlacement ()
 
override void OnPlacementCancelled (Man player)
 
override bool IsDeployable ()
 
override bool CanAssignAttachmentsToQuickbar ()
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
override string GetDeployFinishSoundset ()
 
override void RefreshPhysics ()
 
void UpdateVisuals ()
 
void UpdatePhysics ()
 
void PlayDeployLoopSound ()
 
void StopDeployLoopSound ()
 
void AssembleKit ()
 
void DisassembleKit (ItemBase item)
 
void CreateRope (Rope rope)
 
override void SetActions ()
 
void Paper ()
 
void ~Paper ()
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override WrittenNoteData GetWrittenNoteData ()
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=null)
 
override bool CanIgniteItem (EntityAI ignite_target=null)
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=null)
 
override void SetActions ()
 
void ParticleTest ()
 
override void EEDelete (EntityAI parent)
 
override void OnSwitchOn ()
 
override void OnSwitchOff ()
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
void SoundBurningStart ()
 
void SoundBurningStop ()
 
void SoundTurnOn ()
 
void SoundTurnOff ()
 
override void SetActions ()
 
ItemBase GetCookingEquipment ()
 
void SetCookingEquipment (ItemBase equipment)
 
void ClearCookingEquipment (ItemBase pItem)
 
void DestroyFireplace ()
 
override void EEInit ()
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override void OnSwitchOn ()
 
override void OnSwitchOff ()
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
override void OnWork (float consumed_energy)
 
void CookWithEquipment ()
 
void RefreshFlameVisual (bool working=false, bool hasAttachment=false)
 
void RemoveCookingAudioVisuals ()
 
void SoundBurningStart ()
 
void SoundBurningStop ()
 
void SoundTurnOn ()
 
void SoundTurnOff ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanRemoveFromCargo (EntityAI parent)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanLoadAttachment (EntityAI attachment)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool IsIgnited ()
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override void SetActions ()
 
override void OnDebugSpawn ()
 
void PowerGeneratorBase ()
 
void ~PowerGeneratorBase ()
 
override void EEInit ()
 
override void EOnInit (IEntity other, int extra)
 
override float GetLiquidThroughputCoef ()
 
void StartLoopSound ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI player)
 
bool CanManipulate ()
 
override void OnInitEnergy ()
 
override void OnWorkStart ()
 
override void OnWork (float consumed_energy)
 
override void OnWorkStop ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
void UpdateFuelMeter ()
 
void SetFuel (float fuel_amount)
 
float AddFuel (float available_fuel)
 
bool CanAddFuel (ItemBase container)
 
float GetFuel ()
 
float GetMaxFuel ()
 
bool HasSparkplug ()
 
override void OnVariablesSynchronized ()
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override string GetPlaceSoundset ()
 
override void SetActions ()
 
override void OnDebugSpawn ()
 
override void OnWorkStart ()
 
void StartPeriodicMeasurement ()
 
void PrepareMeasurement ()
 
void DoMeasurement ()
 
void StopPeriodicMeasurement ()
 
override void OnWorkStop ()
 
override void SetActions ()
 
void Spotlight ()
 
void ~Spotlight ()
 
override bool IsElectricAppliance ()
 
override void OnInitEnergy ()
 
override void EOnInit (IEntity other, int extra)
 
override void OnSwitchOn ()
 
override void OnSwitchOff ()
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override void OnIsPlugged (EntityAI source_device)
 
void UpdateAllSelections ()
 
override void OnIsUnplugged (EntityAI last_energy_source)
 
override void OnVariablesSynchronized ()
 
void Fold (bool keep_connected=false)
 
void Unfold ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI player)
 
bool IsFolded ()
 
void SoundTurnOn ()
 
void SoundTurnOff ()
 
override void OnPlacementStarted (Man player)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override void OnPlacementCancelled (Man player)
 
override bool IsDeployable ()
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
void PlayDeployLoopSound ()
 
void StopDeployLoopSound ()
 
override int GetViewIndex ()
 
override void SetActions ()
 
void TentBase ()
 
void ~TentBase ()
 
override string GetInvulnerabilityTypeString ()
 
override bool HasProxyParts ()
 
override bool CanProxyObstructSelf ()
 prevents showing cargo when outside the tent geometry
 
override bool IsItemTent ()
 
override bool CanBeRepairedByCrafting ()
 
override int GetMeleeTargetType ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void RefreshPhysics ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override void OnVariablesSynchronized ()
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
void HideAllAnimationsAndProxyPhysics (bool hide_animations=true, bool hide_physics=true)
 
bool ConditionIntoInventory (EntityAI player)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanPutInCargo (EntityAI parent)
 
bool ConditionOutOfHands (EntityAI player)
 
override bool CanBeRepairedToPristine ()
 
void RefreshAttachements ()
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override int GetViewIndex ()
 
int GetState ()
 
int GetStateLocal ()
 
bool CanBePacked ()
 
bool CanBeManipulated ()
 
bool CanAttach (ItemBase item)
 
override bool IsIgnoredByConstruction ()
 
void Pack (bool update_navmesh, bool init=false)
 
void Pitch (bool update_navmesh, bool init=false)
 
void TryPitch (bool update_navmesh, bool init=false)
 
void UpdateVisuals ()
 
void UpdatePhysics ()
 
void Refresh ()
 
bool CanToggleAnimations (string selection)
 
void ResetToggle ()
 
void ManipulateEntrance ()
 
void ManipulateWindow ()
 
bool IsManipulatedEntrance ()
 
bool IsManipulatedWindow ()
 
void ToggleAnimation (string selection)
 
void HandleCamoNetAttachment (bool hide)
 
void AnimateCamonetToggle (ToggleAnimations toggle)
 
void AnimateCamonetByOpeningSelection (string opening_selection)
 
string GetSoundOpen ()
 
string GetSoundClose ()
 
string GetSoundOpenWindow ()
 
string GetSoundCloseWindow ()
 
void SoundTentOpenPlay ()
 
void SoundTentClosePlay ()
 
void SoundTentOpenWindowPlay ()
 
void SoundTentCloseWindowPlay ()
 
void RegenerateNavmesh ()
 
bool HasClutterCutter ()
 
string GetClutterCutter ()
 
void DestroyClutterCutter ()
 
override bool IsDeployable ()
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
void PlayDeployLoopSound ()
 
void StopDeployLoopSound ()
 
override void SetActions ()
 
void HandleOpeningsVisuals ()
 
void HandleOpeningsPhysics ()
 
override int GetDamageSystemVersionChange ()
 
override bool CanReceiveItemIntoCargo (EntityAI item)
 
override bool CanLoadItemIntoCargo (EntityAI item)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanLoadAttachment (EntityAI attachment)
 
override bool CanBePlaced (Man player, vector position)
 
void SetIsBeingPacked (bool isBeingPacked)
 
void ToolBase ()
 
int GetDisarmRate ()
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 

Protected Attributes

ref array< ref Slotm_Slots
 
int m_SlotFertilityState = 0
 
int m_SlotWateredState = 0
 
int m_MaxWateredStateVal = 0
 
float m_DefaultFertility = 1
 
ref Timer m_CheckRainTimer
 
EffectSound m_DeployLoopSound
 
SoundOnVehicle m_BuzzSoundLoop
 
ref Timer m_SparkEvent
 
ref AreaDamageManager m_AreaDamage
 
bool m_TriggerActive
 
bool m_IsPlaced
 
bool m_IsMounted
 
bool m_LastMountedState
 
const string SOUND_MOUNT = "putDown_BarbedWire_SoundSet"
 
EffectSound m_MountSound
 
EffectSound m_Sound
 
ref map< string, ref AreaDamageManagerm_DamageTriggers
 
ref array< stringm_HybridAttachments
 
ref array< stringm_Mountables
 
const string ATTACHED_CLIPS_STATES [] = {SEL_CLIPS_CAR, SEL_CLIPS_TRUCK}
 
const int ATTACHED_CLIPS_STATES_COUNT = 2
 
int m_BatteryEnergy0To100
 
float m_ChargeEnergyPerSecond
 
ref Timer m_UpdateStatusLightsTimer
 
bool m_BlinkingStatusLightIsOn = false
 
BlowtorchLight m_Light
 
EffectSound m_SoundBurningLoop
 
bool m_DeployedRegularly
 
ref WrittenNoteData m_NoteContents
 
int PARTICLE_PATH
 
Particle m_Particle
 
EffectSound m_SoundTurnOn
 
EffectSound m_SoundTurnOff
 
const string FLAME_BUTANE_ON = "dz\\gear\\cooking\\data\\flame_butane_ca.paa"
 
const string FLAME_BUTANE_OFF = ""
 
 ATTACHMENT_COOKING_POT = Pot
 
 ATTACHMENT_FRYING_PAN = FryingPan
 
 ATTACHMENT_CAULDRON = Cauldron
 
const float PARAM_COOKING_TEMP_THRESHOLD = 100
 
const float PARAM_COOKING_EQUIP_TEMP_INCREASE = 10
 
const float PARAM_COOKING_EQUIP_MAX_TEMP = 250
 
const float PARAM_COOKING_TIME_INC_COEF = 0.5
 
ref UniversalTemperatureSource m_UTSource
 DEPRECATED Attached spark plug item.
 
ref UniversalTemperatureSourceSettings m_UTSSettings
 
ref UniversalTemperatureSourceLambdaConstant m_UTSLConst
 
EffectSound m_EngineLoop
 
EffectSound m_EngineStart
 
EffectSound m_EngineStop
 
ref Timer m_SoundLoopStartTimer
 
Effect m_Smoke
 
ItemBase m_SparkPlug
 
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
 
ref Timer m_Timer
 
int m_State
 
int m_StateLocal = -1
 
bool m_IsEntrance
 
bool m_IsWindow
 
bool m_IsToggle
 
bool m_IsBeingPacked = false
 
int m_OpeningMask = 0
 
int m_OpeningMaskLocal = -1
 
ref map< ref ToggleAnimations, boolm_ToggleAnimations
 
ref array< stringm_ShowAnimationsWhenPitched
 
ref array< stringm_ShowAnimationsWhenPacked
 
Object m_ClutterCutter
 
CamoNet m_CamoNet
 
vector m_HalfExtents
 
int m_MineDisarmRate = 60
 
EntityAI m_Bait
 
bool m_IsActive
 
bool m_IsDeployed
 
bool m_IsInProgress
 
string m_AnimationPhaseSet
 
string m_AnimationPhaseTriggered
 
string m_AnimationPhaseUsed
 
ref array< stringm_PlaceableWaterSurfaceList
 DEPRECATED.
 
bool m_WaterSurfaceForSetup
 
ref multiMap< string, floatm_CatchesPond
 
ref multiMap< string, floatm_CatchesSea
 
ref multiMap< string, floatm_CatchesGroundAnimal
 
ref EffectSound m_DeployLoopSound
 
ref Timer m_PrevTimer
 
bool m_NeedInstalation
 
bool m_BaitNeeded
 
bool m_IsUsable
 

Static Protected Attributes

const string SEL_CLIPS_CAR = "clips_car_battery"
 
const string SEL_CLIPS_TRUCK = "clips_truck_battery"
 
const string SEL_CLIPS_DETACHED = "clips_detached"
 
const string SEL_CLIPS_FOLDED = "clips_folded"
 
const string SEL_SWITCH_ON = "switch_on"
 
const string SEL_SWITCH_OFF = "switch_off"
 
const string SEL_CORD_PLUGGED = "cord_plugged"
 
const string SEL_CORD_FOLDED = "cord_folded"
 
const string SEL_LIGHT_STATE_1 = "light_stand_by"
 
const string SEL_LIGHT_STATE_2 = "light_charging"
 
const string SEL_LIGHT_STATE_3 = "light_charged"
 
const string RED_LIGHT_GLOW = "dz\\gear\\camping\\data\\battery_charger_light_r.rvmat"
 
const string GREEN_LIGHT_GLOW = "dz\\gear\\camping\\data\\battery_charger_light_g.rvmat"
 
const string YELLOW_LIGHT_GLOW = "dz\\gear\\camping\\data\\battery_charger_light_y.rvmat"
 
const string SWITCH_LIGHT_GLOW = "dz\\gear\\camping\\data\\battery_charger_light_switch_on.rvmat"
 
const string DEFAULT_MATERIAL = "dz\\gear\\camping\\data\\battery_charger.rvmat"
 
float m_BlinkingStatusLightInterval = 0.4
 

Private Member Functions

override void SetActions ()
 
override void SetActions ()
 
override void SetActions ()
 
override bool DisplayNameRuinAttach ()
 
override void SetActions ()
 
override void SetActions ()
 
override bool DisplayNameRuinAttach ()
 
override bool ShowZonesHealth ()
 
override void SetActions ()
 
void Clothing_Base ()
 
void ~Clothing_Base ()
 
override bool IsClothing ()
 
float GetItemVisibility ()
 
void UpdateNVGStatus (PlayerBase player, bool attaching=false, bool force_disable=false)
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
bool IsObstructingVoice ()
 Returns if this entity obsructs player's voice.
 
void MutePlayer (PlayerBase player, bool state)
 This items has effect on player's voice.
 
void HandleVoiceEffect (bool enable, PlayerBase player)
 
int GetVoiceEffect ()
 The voice effect this item uses, default is 0 (none)
 
bool IsGasMask ()
 
void GardenBase ()
 
override void OnVariablesSynchronized ()
 
override bool HasProxyParts ()
 
override int GetHideIconMask ()
 
void SetBaseFertility (float value)
 
float GetBaseFertility ()
 
override void EOnInit (IEntity other, int extra)
 
void InitializeSlots ()
 
void SetMaxWaterStateVal ()
 
int GetMaxWaterStateVal ()
 
void UpdateTexturesOnAllSlots ()
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void AfterStoreLoad ()
 
override void EEOnAfterLoad ()
 
void SyncSlots ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
void PrintSlots ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI player)
 
override bool CanRemoveFromHands (EntityAI player)
 
int GetGardenSlotsCount ()
 
bool CanPlantSeed (string selection_component)
 
string ConvertAttSlotToPlantSlot (string attach_slot)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
void PlantSeed (ItemBase seed, string selection_component)
 
void CreatePlant (Slot slot)
 
void Fertilize (PlayerBase player, ItemBase item, float consumed_quantity, string selection_component)
 
bool IsCorrectFertilizer (ItemBase item, string selection_component)
 
bool NeedsFertilization (string selection_component)
 
void SlotWaterStateUpdate (Slot slot)
 
void UpdateSlotTexture (int slot_index)
 
void SetSlotTextureDigged (int slot_index)
 
void SetSlotTextureFertilized (int slot_index, string item_type)
 
void RemoveSlot (int index)
 
void RemoveSlotPlant (Object plant)
 
Slot GetSlotBySelection (string selection_component)
 
int GetSlotIndexBySelection (string selection_component)
 
int GetSlotIndexByAttachmentSlot (string att_slot)
 
int GetSlotIndexByPlant (Object plant)
 
int GetNearestSlotIDByState (vector position, int slot_state)
 
vector GetSlotPosition (int index)
 
void CheckRainStart ()
 
void CheckRainTick ()
 
void WaterAllSlots ()
 
array< ref SlotGetSlots ()
 
Slot GetSlotByIndex (int index)
 
int GetSlotWateredState ()
 
void SetSlotWateredState (int newState)
 
override void SetActions ()
 
void PlantBase ()
 
void ~PlantBase ()
 
void Init (GardenBase garden_base, float fertility, float harvesting_efficiency, float water)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
string GetCropsType ()
 
bool OnStoreLoadCustom (ParamsReadContext ctx, int version)
 
void OnStoreSaveCustom (ParamsWriteContext ctx)
 
void PrintValues ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI player)
 
override bool CanRemoveFromHands (EntityAI player)
 
void ChangeInfestation (bool is_infested)
 
void UpdatePlant ()
 
void GrowthTimerTick ()
 
void InfestationTimerTick ()
 
void SpoiledRemoveTimerTick ()
 
void DeleteDryPlantTick ()
 
void SetSpoiled ()
 
void CheckWater ()
 
void SprayPlant (float consumed_quantity)
 
string StopInfestation (float consumed_quantity)
 
void RemovePlant ()
 
void RemovePlantEx (vector pos)
 
void DestroyPlant ()
 
void Harvest (PlayerBase player)
 
void SetPlantState (int state)
 
int GetPlantState ()
 
int GetPlantStateIndex ()
 
float GetWater ()
 
float GetWaterMax ()
 
bool NeedsWater ()
 
bool NeedsSpraying ()
 
float GetSprayQuantity ()
 
float GetSprayUsage ()
 
void RemoveSlot ()
 
void SetSlot (Slot slot)
 
Slot GetSlot ()
 
GardenBase GetGarden ()
 
bool IsDry ()
 
bool IsGrowing ()
 
bool IsMature ()
 
bool IsSpoiled ()
 
bool HasCrops ()
 
override void SetActions ()
 
override bool CanPutAsAttachment (EntityAI parent)
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 
override void SetActions ()
 
override float GetBandagingEffectivity ()
 
override bool CanBeDisinfected ()
 
override float GetInfectionChance (int system=0, Param param=null)
 
override void OnCombine (ItemBase other_item)
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 
override void SetActions ()
 
void BloodContainerBase ()
 
override bool IsBloodContainer ()
 
void SetBloodTypeVisible (bool visible)
 
bool GetBloodTypeVisible ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
void CableReel ()
 
override bool IsElectricAppliance ()
 
void ForceIntoHandsNow (PlayerBase player)
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI player)
 
override void OnInventoryEnter (Man player)
 
override bool CanRemoveFromHands (EntityAI player)
 
override void OnVariablesSynchronized ()
 
override void OnPlacementStarted (Man player)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override string GetPlaceSoundset ()
 
override void SetActions ()
 
override void SetActions ()
 
void Defibrillator ()
 
void ~Defibrillator ()
 
float GetTimeNeededToCharge ()
 
float GetEnergyNeededToCharge ()
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
void OnIsCharged ()
 
void StopChargedAlarm ()
 
void StopChargingSound ()
 
void StopChargingTimer ()
 
bool IsCharged ()
 
void DischargeServer (PlayerBase victim)
 
void DischargeClient (PlayerBase victim)
 
override void SetActions ()
 
override bool CanMakeGardenplot ()
 
override void SetActions ()
 
override void SetActions ()
 
void Flag_Base ()
 
void ~Flag_Base ()
 
void Synchronize ()
 
override void OnVariablesSynchronized ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void AfterStoreLoad ()
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
override int GetViewIndex ()
 
override void SetActions ()
 
override void OnWorkStart ()
 
override void OnWork (float consumed_energy)
 
override void OnWorkStop ()
 
override void OnInventoryExit (Man player)
 
override void SetActions ()
 
override void OnDebugSpawn ()
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=NULL)
 
override void SetActions ()
 
void ~RestrainingToolLocked ()
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
override void EEKilled (Object killer)
 
override void SetActions ()
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 Override this method and and check if the given item can be ignited. It is not necesarry to check here if the item is not in cargo of something.
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedTargetFailed (EntityAI target_item)
 
override void SetActions ()
 
override bool CanPutAsAttachment (EntityAI parent)
 
override bool CanDetachAttachment (EntityAI parent)
 
override void SetActions ()
 
override bool CanPutAsAttachment (EntityAI parent)
 
override bool CanExplodeInFire ()
 
override void InitItemVariables ()
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedTargetFailed (EntityAI target_item)
 
override void SetActions ()
 
override bool CanExplodeInFire ()
 
override void SetActions ()
 
void MetalWire ()
 
override bool CanPutAsAttachment (EntityAI parent)
 
void UpdateAllSelections ()
 
override void OnInventoryEnter (Man player)
 
override void OnIsPlugged (EntityAI source_device)
 
override void OnIsUnplugged (EntityAI last_energy_source)
 
override void OnOwnSocketTaken (EntityAI device)
 
override void OnOwnSocketReleased (EntityAI device)
 
override void SetActions ()
 
override void SetActions ()
 
override bool IsPeltBase ()
 
override void SetActions ()
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override void OnIgnitedTarget (EntityAI ignited_item)
 
override void OnIgnitedTargetFailed (EntityAI target_item)
 
override void SetActions ()
 
override bool CanMakeGardenplot ()
 
override void SetActions ()
 
void PileOfWoodenPlanks ()
 
void UpdateSelections ()
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
int RemovePlanks (int needed_planks)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanPutInCargo (EntityAI parent)
 
void Pitchfork ()
 
override void SetActions ()
 
override bool CanSwapEntities (EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
 
override bool CanPutAsAttachment (EntityAI parent)
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=null)
 
override bool CanIgniteItem (EntityAI ignite_target=null)
 
override bool CanBeCombined (EntityAI other_item, bool reservation_check=true, bool stack_max_limit=false)
 
override void OnIgnitedThis (EntityAI fire_source)
 
override bool IsThisIgnitionSuccessful (EntityAI item_source=null)
 
override bool CanAssignToQuickbar ()
 
override bool CanBeDisinfected ()
 
override void SetActions ()
 
override float GetBandagingEffectivity ()
 
override float GetInfectionChance (int system=0, Param param=null)
 
override void OnCombine (ItemBase other_item)
 
override bool IsElectricAppliance ()
 
override void OnInitEnergy ()
 
override void OnWorkStart ()
 
override void OnWork (float consumed_energy)
 
override void OnWorkStop ()
 
override void OnSwitchOn ()
 
override void OnSwitchOff ()
 
override void OnVariablesSynchronized ()
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override string GetPlaceSoundset ()
 
override void SetActions ()
 
override bool CanMakeGardenplot ()
 
override void SetActions ()
 
override bool CanExplodeInFire ()
 
override void SetActions ()
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
float GetTemperatureValue (PlayerBase player)
 
override void SetActions ()
 
void TrapSpawnBase ()
 
void ~TrapSpawnBase ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void OnVariablesSynchronized ()
 this event is called all variables are synchronized on client
 
bool IsActive ()
 
bool IsDeployed ()
 
void SetDeployed (bool newState)
 
override bool IsTakeable ()
 
bool IsPlaceableAtPosition (vector position)
 
void SetupTrap ()
 
void SetupTrapPlayer (PlayerBase player, bool set_position=true)
 
void Fold ()
 
void AddDefect ()
 
void StartActivate (PlayerBase player)
 
bool CanBeTaken ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI parent)
 
void SetActive ()
 
void SetInactive ()
 
void SetUsed ()
 
void SpawnCatch ()
 
bool SetCanCatch (out EntityAI bait)
 
void CatchSetQuant (ItemBase catch)
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
bool IsSurfaceWater (vector position)
 
override bool CanDisplayAttachmentSlot (int slot_id)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
void PlayDeployLoopSound ()
 
void StopDeployLoopSound ()
 
override void SetActions ()
 
bool CanPutInInventory (EntityAI player)
 
void AlignCatch (ItemBase obj, string catch_name)
 
bool IsPlaceable ()
 
override bool CanBePlaced (Man player, vector position)
 
override void SetActions ()
 
override void SetActions ()
 
void UndergroundStash ()
 
void PlaceOnGround ()
 
ItemBase GetStashedItem ()
 
override bool CanDisplayCargo ()
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanReleaseCargo (EntityAI cargo)
 
override bool CanReceiveItemIntoHands (EntityAI item_to_hands)
 
override bool CanSaveItemInHands (EntityAI item_in_hands)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool IsInventoryVisible ()
 

Private Attributes

float m_ItemVisibilityModifier
 
float m_SprayUsage
 
float m_InfestationChance
 
int m_GrowthStagesCount
 
int m_CropsCount
 
bool m_HasCrops
 
string m_CropsType
 
float m_PlantMaterialMultiplier
 
int m_PlantState
 
int m_PlantStateIndex
 
float m_CurrentPlantMaterialQuantity
 
bool m_IsInfested
 
float m_SprayQuantity
 
bool m_MarkForDeletion = false
 
int m_DeleteDryPlantTime
 
int m_SpoiledRemoveTime
 
int m_FullMaturityTime
 
int m_SpoilAfterFullMaturityTime
 
int m_StateChangeTime
 
ref Timer m_GrowthTimer = NULL
 
ref Timer m_InfestationTimer = NULL
 
ref Timer m_SpoilAfterFullMaturityTimer = NULL
 
ref Timer m_SpoiledRemoveTimer = NULL
 
ref Timer m_DeleteDryPlantTimer = NULL
 
GardenBase m_GardenBase = NULL
 
ref Slot m_Slot = NULL
 
PluginHorticulture m_ModuleHorticulture
 
const float SPOIL_AFTER_MATURITY_TIME = 14400
 
const string ANIMATION_DEPLOYED = "Deployed"
 
float m_ConstructionKitHealth
 
ref Construction m_Construction
 
bool m_HasBase
 
int m_SyncParts01
 
int m_SyncParts02
 
int m_SyncParts03
 
int m_InteractedPartId
 
int m_PerformedActionId
 
const string SOUND_BUILD_WOOD_LOG = "putDown_WoodLog_SoundSet"
 
const string SOUND_BUILD_WOOD_PLANK = "putDown_WoodPlank_SoundSet"
 
const string SOUND_BUILD_WOOD_STAIRS = "putDown_WoodStairs_SoundSet"
 
const string SOUND_BUILD_METAL = "putDown_MetalPlank_SoundSet"
 
const string SOUND_BUILD_WIRE = "putDown_BarbedWire_SoundSet"
 
const string SOUND_DISMANTLE_WOOD_LOG = "Crash_WoodPlank_SoundSet"
 
const string SOUND_DISMANTLE_WOOD_PLANK = "Crash_WoodPlank_SoundSet"
 
const string SOUND_DISMANTLE_WOOD_STAIRS = "Crash_WoodPlank_SoundSet"
 
const string SOUND_DISMANTLE_METAL = "Crash_MetalPlank_SoundSet"
 
const string SOUND_DISMANTLE_WIRE = "putDown_BarbedWire_SoundSet"
 
bool m_IsBloodTypeVisible = false
 
const string TEXTURE_FLAME = "dz\\gear\\cooking\\data\\flame_butane_ca.paa"
 
const string ANIM_PHASE_FLAME = "FlameHide"
 
const string SOUND_BURNING = "Blowtorch_Loop_SoundSet"
 
bool m_ForceIntoHands
 
bool m_IsCharged = false
 
ref Timer m_ChargingTimer
 
EffectSound m_ChargedAlarm
 
EffectSound m_ChargingSound
 
FlashlightLight m_Light
 
PortableGasLampLight m_Light
 
const string GAS_LIGHT_MATERIAL_ON = "dz\\gear\\cooking\\data\\GasLightOn.rvmat"
 
const string GAS_LIGHT_MATERIAL_OFF = "dz\\data\\data\\default.rvmat"
 
const string SOUND_TURN_ON = "portablegaslamp_turn_on_SoundSet"
 
const string SOUND_TURN_OFF = "portablegaslamp_turn_off_SoundSet"
 
StoveLight m_Light
 
float m_TimeFactor
 
ref Cooking m_CookingProcess
 
ItemBase m_CookingEquipment
 
float m_Fuel
 
int m_FuelPercentage
 
SoundOnVehicle m_SoundLoopEntity
 
bool m_IsFolded
 
bool m_EvaluateDeployment
 
SpotlightLight m_Light
 
const int OPENING_0 = 1
 
const int OPENING_1 = 2
 
const int OPENING_2 = 4
 
const int OPENING_3 = 8
 
const int OPENING_4 = 16
 
const int OPENING_5 = 32
 
const int OPENING_6 = 64
 
const int OPENING_7 = 128
 
const int OPENING_8 = 256
 
const int OPENING_9 = 512
 
const int OPENING_10 = 1024
 
const int OPENING_11 = 2048
 
const int OPENING_12 = 4096
 
const int OPENING_13 = 8192
 
const int OPENING_14 = 16384
 
const int OPENING_15 = 32768
 
const float MAX_PLACEMENT_HEIGHT_DIFF = 1.5
 
int m_InitWaitTime
 
int m_UpdateWaitTime
 
float m_DefectRate
 
bool m_IsFoldable
 
bool m_CanCatch = false
 
float m_MinimalDistanceFromPlayersToCatch
 
float m_BaitCatchProb
 
float m_NoBaitCatchProb
 
float m_FinalCatchProb
 
vector m_PreyPos
 
ItemBase m_Catch
 
ref Timer m_AlignCatchTimer
 
string m_InfoSetup
 

Static Private Attributes

static const string SLOT_TEXTURE_DIGGED_WET_LIME = "dz\\gear\\cultivation\\data\\soil_digged_wet_lime_CO.paa"
 
static const string SLOT_TEXTURE_DIGGED_WET_PLANT = "dz\\gear\\cultivation\\data\\soil_digged_wet_plant_CO.paa"
 
static const string SLOT_MATERIAL_WET = "dz\\gear\\cultivation\\data\\soil_cultivated_wet.rvmat"
 
static const string SLOT_MATERIAL_DRY = "dz\\gear\\cultivation\\data\\soil_cultivated.rvmat"
 
static const string SLOT_MATERIAL_LIMED_WET = "dz\\gear\\cultivation\\data\\soil_cultivated_limed_wet.rvmat"
 
static const string SLOT_MATERIAL_LIMED_DRY = "dz\\gear\\cultivation\\data\\soil_cultivated_limed.rvmat"
 
static const string SLOT_MATERIAL_COMPOST_WET = "dz\\gear\\cultivation\\data\\soil_cultivated_compost_wet.rvmat"
 
static const string SLOT_MATERIAL_COMPOST_DRY = "dz\\gear\\cultivation\\data\\soil_cultivated_compost.rvmat"
 
static const string SLOT_SELECTION_DIGGED_PREFIX = "seedbase_"
 
static const string SLOT_SELECTION_COVERED_PREFIX = "slotCovered_"
 
static const string SLOT_MEMORY_POINT_PREFIX = "slot_"
 
static const string SLOT_SEEDBASE_PREFIX = "seedbase_"
 
static const int CHECK_RAIN_INTERVAL = 15
 
static ref map< string, stringm_map_slots
 
static const int STATE_DRY = 0
 
static const int STATE_GROWING = 1
 
static const int STATE_MATURE = 2
 
static const int STATE_SPOILED = 3
 
static const int SOUNDS_SPARK_COUNT = 4
 
static const int SOUNDS_CUT_COUNT = 3
 
static const int SOUNDS_COLLISION_COUNT = 4
 
static const int SOUNDS_SHOCK_COUNT = 4
 
static const float RANDOM_SPARK_INTERVAL = 5.0
 
static const string m_SoundsSpark [SOUNDS_SPARK_COUNT] = {"electricFenceSpark1", "electricFenceSpark2", "electricFenceSpark3", "electricFenceSpark4"}
 
static const string m_SoundsCut [SOUNDS_CUT_COUNT] = {"barbedFenceCut1", "barbedFenceCut2", "barbedFenceCut3"}
 
static const string m_SoundsCollision [SOUNDS_COLLISION_COUNT] = {"barbedFenceCollision1", "barbedFenceCollision2", "barbedFenceCollision3", "barbedFenceCollision4"}
 
static const string m_SoundsShock [SOUNDS_SHOCK_COUNT] = {"electricFenceShock1", "electricFenceShock2", "electricFenceShock3", "electricFenceShock4"}
 
static const string m_SoundBuzzLoop = "electricFenceBuzzLoop1"
 
static const string SEL_CORD_FOLDED = "cord_folded"
 
static const string SEL_CORD_PLUGGED = "cord_plugged"
 
static const string CHARGING_SOUND = "defibrillator_charge_SoundSet"
 
static const string CHARGED_AND_READY_SOUND = "defibrillator_ready_SoundSet"
 
static const string SHOCK_SOUND = "defibrillator_shock_SoundSet"
 
static float m_ChargeTime = 5
 
static float m_EnergyNeededToCharge = 20
 
static int REFLECTOR_ID = 1
 
static int GLASS_ID = 2
 
static string LIGHT_OFF_GLASS = "dz\\gear\\tools\\data\\flashlight_glass.rvmat"
 
static string LIGHT_OFF_REFLECTOR = "dz\\gear\\tools\\data\\flashlight.rvmat"
 
static string LIGHT_ON_GLASS = "dz\\gear\\tools\\data\\flashlight_glass_on.rvmat"
 
static string LIGHT_ON_REFLECTOR = "dz\\gear\\tools\\data\\flashlight_glass_on.rvmat"
 
static string SEL_WIRE_ROLLED = "rolled"
 
static string SEL_WIRE_PREFIX = "Att_"
 
static string SEL_WIRE_SUFIX = "_plugged"
 
static string SEL_PLUG_SUFIX = "_plug"
 
static float m_FuelTankCapacity
 
static float m_FuelToEnergyRatio
 
static const string START_SOUND = "powerGeneratorTurnOn_SoundSet"
 
static const string LOOP_SOUND = "powerGeneratorLoop_SoundSet"
 
static const string STOP_SOUND = "powerGeneratorTurnOff_SoundSet"
 
static const string SPARKPLUG_ATTACH_SOUND = "sparkplug_attach_SoundSet"
 
static const string SPARKPLUG_DETACH_SOUND = "sparkplug_detach_SoundSet"
 
static vector m_LightLocalPosition
 
static vector m_LightLocalOrientation = "0 0 0"
 
static const string SEL_REFLECTOR_COMP_U = "reflector"
 
static const string SEL_CORD_FOLDED_U = "cord_folded"
 
static const string SEL_CORD_PLUGGED_U = "cord_plugged"
 
static const string SEL_CORD_PLUGGED_F = "spotlight_folded_cord_plugged"
 
static const string SEL_CORD_FOLDED_F = "spotlight_folded_cord_folded"
 
static const string SEL_INVENTORY = "inventory"
 
static const string SEL_PLACING = "placing"
 
static const string SEL_GLASS_F = "glass_folded"
 
static const string SEL_GLASS_U = "glass_unfolded"
 
static const string SEL_REFLECTOR_F = "reflector_folded"
 
static const string SEL_REFLECTOR_U = "reflector_unfolded"
 
static const int ID_GLASS_UNFOLDED = 3
 
static const int ID_REFLECTOR_UNFOLDED = 4
 
static const int ID_GLASS_FOLDED = 5
 
static const int ID_REFLECTOR_FOLDED = 6
 
static const int PACKED = 0
 
static const int PITCHED = 1
 

Detailed Description

Definition at line 696 of file InventoryItem.c.

Constructor & Destructor Documentation

◆ ~Clothing_Base()

void ItemBase::~Clothing_Base ( )
inlineprivate

Definition at line 793 of file InventoryItem.c.

794 {
795 HandleVoiceEffect(false, PlayerBase.Cast(GetHierarchyRootPlayer()));
796 }
void HandleVoiceEffect(bool enable, PlayerBase player)

◆ ~PlantBase()

void ItemBase::~PlantBase ( )
inlineprivate

Definition at line 76 of file PlantBase.c.

77 {
80 }
bool m_MarkForDeletion
Definition PlantBase.c:25
void DestroyPlant()
Definition PlantBase.c:674

◆ ~BarbedWire()

void ItemBase::~BarbedWire ( )
inlineprotected

Definition at line 44 of file BarbedWire.c.

45 {
47 }
EffectSound m_DeployLoopSound
Definition BarbedWire.c:15
Manager class for managing Effect (EffectParticle, EffectSound)
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.

References SEffectManager::DestroyEffect(), and m_DeployLoopSound.

◆ ~Defibrillator()

void ItemBase::~Defibrillator ( )
inlineprivate

Definition at line 23 of file Defibrillator.c.

References SEffectManager::DestroyEffect().

◆ ~Flag_Base()

void ItemBase::~Flag_Base ( )
inlineprivate

Definition at line 11 of file Flag_Base.c.

12 {
13 }

◆ ~RestrainingToolLocked()

void ItemBase::~RestrainingToolLocked ( )
inlineprivate

Definition at line 3 of file HandcuffsLocked.c.

4 {
5 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
6 if (player && player.IsRestrained())
7 player.SetRestrained(false);
8 }

◆ ~KitBase()

void ItemBase::~KitBase ( )
inlineprotected

◆ ~Paper()

void ItemBase::~Paper ( )
inlineprotected

Definition at line 10 of file Paper.c.

10{}

◆ ~PowerGeneratorBase()

void ItemBase::~PowerGeneratorBase ( )
inlineprotected

Definition at line 37 of file PowerGenerator.c.

References SEffectManager::DestroyEffect().

◆ ~Spotlight()

void ItemBase::~Spotlight ( )
inlineprotected

◆ ~TentBase()

void ItemBase::~TentBase ( )
inlineprotected

Definition at line 60 of file TentBase.c.

61 {
62 if (GetGame())
64
66 }
void DestroyClutterCutter()
Definition TentBase.c:755
proto native CGame GetGame()

References SEffectManager::DestroyEffect(), GetGame(), and m_DeployLoopSound.

◆ ~TrapSpawnBase()

void ItemBase::~TrapSpawnBase ( )
inlineprivate

Member Function Documentation

◆ AddDefect()

void ItemBase::AddDefect ( )
inlineprivate

Definition at line 221 of file TrapSpawnBase.c.

222 {
223 if (GetGame().IsServer())
224 DecreaseHealth("", "", m_DefectRate);
225 }
float m_DefectRate

References GetGame(), and m_DefectRate.

◆ AddFuel()

float ItemBase::AddFuel ( float available_fuel)
inlineprotected

Definition at line 260 of file PowerGenerator.c.

261 {
262 if (available_fuel == 0)
263 return 0;
264 GetCompEM().InteractBranch(this);
265 float needed_fuel = GetMaxFuel() - GetFuel();
266
268 {
270 return available_fuel; // Return used fuel amount
271 }
272 else
273 {
275 return needed_fuel;
276 }
277 }
void SetFuel(float fuel_amount)
float GetMaxFuel()
float GetFuel()

References GetFuel(), GetMaxFuel(), and SetFuel().

◆ AfterStoreLoad() [1/4]

override void ItemBase::AfterStoreLoad ( )
inlineprivate

Definition at line 177 of file GardenBase.c.

178 {
179 super.AfterStoreLoad();
180 }

◆ AfterStoreLoad() [2/4]

override void ItemBase::AfterStoreLoad ( )
inlineprotected

Definition at line 186 of file BarbedWire.c.

187 {
188 super.AfterStoreLoad();
189
190 //set mounted state based on locked slot after everything is loaded
192 }
bool GetSlotLockedState()
Definition BarbedWire.c:61
void SetMountedState(bool is_mounted)
Definition BarbedWire.c:74

References GetSlotLockedState(), and SetMountedState().

◆ AfterStoreLoad() [3/4]

override void ItemBase::AfterStoreLoad ( )
inlineprotected

Definition at line 426 of file BaseBuildingBase.c.

427 {
428 super.AfterStoreLoad();
429
432 }
bool m_FixDamageSystemInit
Definition ItemBase.c:4740
void SetPartsAfterStoreLoad()

References m_FixDamageSystemInit, and SetPartsAfterStoreLoad().

◆ AfterStoreLoad() [4/4]

override void ItemBase::AfterStoreLoad ( )
inlineprivate

Definition at line 43 of file Flag_Base.c.

44 {
45 super.AfterStoreLoad();
46
47 //set mounted state based on locked slot after everything is loaded
48 //SetMountedState( GetSlotLockedState() );
49 }

◆ AlignCatch()

void ItemBase::AlignCatch ( ItemBase obj,
string catch_name )
inlineprivate

Definition at line 510 of file TrapSpawnBase.c.

510{ }

◆ AnimateCamonetByOpeningSelection()

void ItemBase::AnimateCamonetByOpeningSelection ( string opening_selection)
inlineprotected

Definition at line 711 of file TentBase.c.

711{};

◆ AnimateCamonetToggle()

void ItemBase::AnimateCamonetToggle ( ToggleAnimations toggle)
inlineprotected

Definition at line 709 of file TentBase.c.

709{};

◆ AssembleKit()

void ItemBase::AssembleKit ( )
inlineprotected

Definition at line 168 of file KitBase.c.

169 {
170 if (!IsHologram())
171 Rope rope = Rope.Cast(GetInventory().CreateAttachment("Rope"));
172 }
override bool IsHologram()
Definition ItemBase.c:5641

References IsHologram().

◆ BarbedWire()

void ItemBase::BarbedWire ( )
inlineprotected

Definition at line 32 of file BarbedWire.c.

33 {
35 m_TriggerActive = false;
36 m_IsPlaced = false;
37
38 //synchronized variables
39 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
40 RegisterNetSyncVariableBool("m_IsDeploySound");
41 RegisterNetSyncVariableBool("m_IsMounted");
42 }
ref Timer m_SparkEvent
Definition BarbedWire.c:19
bool m_IsPlaced
Definition BarbedWire.c:23
bool m_TriggerActive
Definition BarbedWire.c:22
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

References CALL_CATEGORY_SYSTEM.

◆ BaseBuildingBase()

void ItemBase::BaseBuildingBase ( )
inlineprotected

Definition at line 39 of file BaseBuildingBase.c.

40 {
42
43 //synchronized variables
44 RegisterNetSyncVariableInt("m_SyncParts01");
45 RegisterNetSyncVariableInt("m_SyncParts02");
46 RegisterNetSyncVariableInt("m_SyncParts03");
47 RegisterNetSyncVariableInt("m_InteractedPartId");
48 RegisterNetSyncVariableInt("m_PerformedActionId");
49 RegisterNetSyncVariableBool("m_HasBase");
50
51 //Construction init
53
54 if (ConfigIsExisting("hybridAttachments"))
55 {
57 ConfigGetTextArray("hybridAttachments", m_HybridAttachments);
58 }
59 if (ConfigIsExisting("mountables"))
60 {
62 ConfigGetTextArray("mountables", m_Mountables);
63 }
64
65 ProcessInvulnerabilityCheck(GetInvulnerabilityTypeString());
66 }
ref map< string, ref AreaDamageManager > m_DamageTriggers
ref array< string > m_Mountables
override string GetInvulnerabilityTypeString()
ref array< string > m_HybridAttachments
void ConstructionInit()

References ConstructionInit(), GetInvulnerabilityTypeString(), m_DamageTriggers, m_HybridAttachments, and m_Mountables.

◆ BatteryCharger()

void ItemBase::BatteryCharger ( )
inlineprotected

Definition at line 34 of file BatteryCharger.c.

35 {
36 m_ChargeEnergyPerSecond = GetGame().ConfigGetFloat("CfgVehicles " + GetType() + " ChargeEnergyPerSecond");
39 RegisterNetSyncVariableInt("m_BatteryEnergy0To100");
40 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
41 RegisterNetSyncVariableBool("m_IsPlaceSound");
42 }
eBleedingSourceType GetType()
void SwitchLightOff()
ref Timer m_UpdateStatusLightsTimer
float m_ChargeEnergyPerSecond

References CALL_CATEGORY_SYSTEM, GetGame(), GetType(), and SwitchLightOff().

Referenced by VehicleBattery::CanPutAsAttachment().

◆ BloodContainerBase()

void ItemBase::BloodContainerBase ( )
inlineprivate

Definition at line 5 of file BloodContainerBase.c.

6 {
7 RegisterNetSyncVariableBool("m_IsBloodTypeVisible");
8 }

◆ CableReel()

void ItemBase::CableReel ( )
inlineprivate

Definition at line 8 of file CableReel.c.

9 {
10 m_ForceIntoHands = false;
11 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
12 RegisterNetSyncVariableBool("m_IsPlaceSound");
13 }
bool m_ForceIntoHands
Definition CableReel.c:3

◆ CalcDamageAreaRotation()

void ItemBase::CalcDamageAreaRotation ( float angle_deg,
out vector center,
out vector orientation )
inlineprotected

Definition at line 1003 of file BaseBuildingBase.c.

1004 {
1005 if (angle_deg != 0)
1006 {
1007 //orientation
1009
1010 //center
1012 if (MemoryPointExists("rotate_axis"))
1013 rotate_axis = ModelToWorld(GetMemoryPointPos("rotate_axis"));
1016 center[0] = r_center_x;
1017 center[2] = r_center_z;
1018 }
1019 }
Definition EnMath.c:7
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static proto float Sin(float angle)
Returns sinus of angle in radians.
static const float DEG2RAD
Definition EnMath.c:17

References Math::Cos(), Math::DEG2RAD, and Math::Sin().

◆ CanAddFuel()

bool ItemBase::CanAddFuel ( ItemBase container)
inlineprotected

Definition at line 280 of file PowerGenerator.c.

281 {
282 if (container)
283 {
284 // Get the liquid
285 int liquid_type = container.GetLiquidType();
286
287 // Do all checks
288 if (container.GetQuantity() > 0 && GetCompEM().GetEnergy() < GetCompEM().GetEnergyMax() && (liquid_type & LIQUID_GASOLINE))
289 return true;
290 }
291
292 return false;
293 }
float GetEnergy()
Definition ItemBase.c:8140
const int LIQUID_GASOLINE
Definition constants.c:508

References GetEnergy(), and LIQUID_GASOLINE.

◆ CanAssignAttachmentsToQuickbar()

override bool ItemBase::CanAssignAttachmentsToQuickbar ( )
inlineprotected

Definition at line 109 of file KitBase.c.

110 {
111 return false;
112 }

◆ CanAssignToQuickbar()

override bool ItemBase::CanAssignToQuickbar ( )
inlineprivate

Definition at line 62 of file Rag.c.

63 {
64 return (!GetInventory().IsAttachment());
65 }

◆ CanAttach()

bool ItemBase::CanAttach ( ItemBase item)
inlineprotected

Definition at line 453 of file TentBase.c.

454 {
455 if (item.IsKindOf("CamoNet") && GetState() == PITCHED)
456 return true;
457
458 return false;
459 }
static const int PITCHED
Definition TentBase.c:21
int GetState()
Definition TentBase.c:424

References GetState().

◆ CanBeCombined()

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

Definition at line 44 of file Rag.c.

45 {
47 return false;
48
49 return Torch.Cast(other_item.GetHierarchyParent()) == null;//when the other rag is attached to the torch, disallow this action
50 }

Referenced by InventoryItem::CombineItems().

◆ CanBeDisinfected() [1/2]

override bool ItemBase::CanBeDisinfected ( )
inlineprivate

Definition at line 54 of file BandageDressing.c.

55 {
56 return true;
57 }

◆ CanBeDisinfected() [2/2]

override bool ItemBase::CanBeDisinfected ( )
inlineprivate

Definition at line 67 of file Rag.c.

68 {
69 return true;
70 }

◆ CanBeIgnitedBy() [1/5]

override bool ItemBase::CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprivate

Definition at line 11 of file BandageDressing.c.

12 {
13 if (GetHierarchyParent()) return false;
14
15 return true;
16 }

◆ CanBeIgnitedBy() [2/5]

override bool ItemBase::CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprivate

Definition at line 11 of file Bark_ColorBase.c.

12 {
13 if (GetHierarchyParent()) return false;
14
15 return true;
16 }

◆ CanBeIgnitedBy() [3/5]

override bool ItemBase::CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprivate

Definition at line 11 of file GiftWrapPaper.c.

12 {
13 if (GetHierarchyParent()) return false;
14
15 return true;
16 }

◆ CanBeIgnitedBy() [4/5]

override bool ItemBase::CanBeIgnitedBy ( EntityAI igniter = null)
inlineprotected

Definition at line 43 of file Paper.c.

44 {
45 return !GetHierarchyParent();
46 }

◆ CanBeIgnitedBy() [5/5]

override bool ItemBase::CanBeIgnitedBy ( EntityAI igniter = null)
inlineprivate

Definition at line 34 of file Rag.c.

35 {
36 return GetHierarchyParent() == null;
37 }

◆ CanBeManipulated()

bool ItemBase::CanBeManipulated ( )
inlineprotected

Definition at line 445 of file TentBase.c.

446 {
447 if (GetState() == PACKED)
448 return true;
449 else
450 return false;
451 }
static const int PACKED
Definition TentBase.c:20

References GetState().

◆ CanBePacked()

bool ItemBase::CanBePacked ( )
inlineprotected

Definition at line 434 of file TentBase.c.

435 {
436 if (GetState() == PITCHED)
437 {
438 if (GetInventory().GetCargo().GetItemCount() == 0 && GetInventory().AttachmentCount() == 0)
439 return true;
440 }
441
442 return false;
443 }

References GetState().

◆ CanBePlaced() [1/2]

override bool ItemBase::CanBePlaced ( Man player,
vector position )
inlineprotected

Definition at line 917 of file TentBase.c.

918 {
919 vector playerpos = player.GetPosition();
920 float delta1 = playerpos[1] - position[1];
921
923 return false;
924 return true;
925 }
const float MAX_PLACEMENT_HEIGHT_DIFF
Definition TentBase.c:22

Referenced by Hologram::IsPlacementPermitted().

◆ CanBePlaced() [2/2]

override bool ItemBase::CanBePlaced ( Man player,
vector position )
inlineprivate

Definition at line 531 of file TrapSpawnBase.c.

532 {
534 }
bool IsPlaceableAtPosition(vector position)

References TrapSpawnBase::IsPlaceableAtPosition().

◆ CanBeRepairedByCrafting()

override bool ItemBase::CanBeRepairedByCrafting ( )
inlineprotected

Definition at line 89 of file TentBase.c.

90 {
91 return false;
92 }

◆ CanBeRepairedToPristine()

override bool ItemBase::CanBeRepairedToPristine ( )
inlineprotected

Definition at line 300 of file TentBase.c.

301 {
302 return true;
303 }

◆ CanBeTaken()

bool ItemBase::CanBeTaken ( )
inlineprivate

Definition at line 231 of file TrapSpawnBase.c.

232 {
233 if (!IsDeployed() || (GetInventory().AttachmentCount() == 0 && IsDeployed()))
234 return true;
235
236 return false;
237 }
bool IsDeployed()

◆ CanDetachAttachment()

override bool ItemBase::CanDetachAttachment ( EntityAI parent)
inlineprivate

Definition at line 36 of file GardenLime.c.

37 {
38
39 bool is_barrel = false;
40 bool is_opened_barrel = false;
41
42 // is barrel
43 if (parent.IsKindOf("Barrel_ColorBase"))
44 is_barrel = true;
45
46 // is opened barrel
47 if (is_barrel && parent.GetAnimationPhase("Lid") == 1)
48 is_opened_barrel = true;
49
51 return true;
52 return false;
53 }

◆ CanDisplayAttachmentSlot()

override bool ItemBase::CanDisplayAttachmentSlot ( int slot_id)
inlineprivate

Definition at line 423 of file TrapSpawnBase.c.

424 {
425 super.CanDisplayAttachmentSlot(slot_id);
426 return IsDeployed();
427 }

◆ CanDisplayCargo()

override bool ItemBase::CanDisplayCargo ( )
inlineprivate

Definition at line 22 of file UndergroundStash.c.

23 {
24 return false;
25 }

◆ CanExplodeInFire() [1/3]

override bool ItemBase::CanExplodeInFire ( )
inlineprivate

Definition at line 3 of file LargeGasCannister.c.

4 {
5 return true;
6 }

Referenced by InventoryItem::EEKilled().

◆ CanExplodeInFire() [2/3]

override bool ItemBase::CanExplodeInFire ( )
inlineprivate

Definition at line 3 of file MediumGasCannister.c.

4 {
5 return true;
6 }

◆ CanExplodeInFire() [3/3]

override bool ItemBase::CanExplodeInFire ( )
inlineprivate

Definition at line 3 of file SmallGasCannister.c.

4 {
5 return true;
6 }

◆ CanFoldBaseBuildingObject()

bool ItemBase::CanFoldBaseBuildingObject ( )
inlineprotected

Definition at line 943 of file BaseBuildingBase.c.

944 {
945 if (HasBase() || GetInventory().AttachmentCount() > 0)
946 return false;
947
948 return true;
949 }

References HasBase().

◆ CanIgniteItem() [1/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprivate

Definition at line 18 of file BandageDressing.c.

19 {
20 return false;
21 }

◆ CanIgniteItem() [2/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprivate

Definition at line 18 of file Bark_ColorBase.c.

19 {
20 return false;
21 }

◆ CanIgniteItem() [3/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprotected

Definition at line 90 of file Blowtorch.c.

91 {
92 return ignite_target.CanBeIgnitedBy(this);
93 }

◆ CanIgniteItem() [4/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprivate

Definition at line 18 of file GiftWrapPaper.c.

19 {
20 return false;
21 }

◆ CanIgniteItem() [5/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprivate

Override this method and and check if the given item can be ignited. It is not necesarry to check here if the item is not in cargo of something.

Definition at line 4 of file HandDrillKit.c.

5 {
6 return true;
7 }

◆ CanIgniteItem() [6/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprivate

Definition at line 9 of file Matchbox.c.

10 {
12 return true;
13 else
14 return false;
15 }
override float GetQuantity()
Definition ItemBase.c:7995
override float GetWet()
Definition ItemBase.c:8281
const float STATE_DAMP
Definition constants.c:784

References GetQuantity(), GetWet(), and GameConstants::STATE_DAMP.

◆ CanIgniteItem() [7/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = null)
inlineprotected

Definition at line 48 of file Paper.c.

49 {
50 return false;
51 }

◆ CanIgniteItem() [8/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprivate

Definition at line 3 of file PetrolLighter.c.

4 {
5 if (GetQuantity() > 0)
6 return true;
7 else
8 return false;
9 }

References GetQuantity().

◆ CanIgniteItem() [9/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprotected

Definition at line 393 of file PortableGasStove.c.

394 {
395 return GetCompEM().IsWorking();
396 }

◆ CanIgniteItem() [10/10]

override bool ItemBase::CanIgniteItem ( EntityAI ignite_target = null)
inlineprivate

Definition at line 39 of file Rag.c.

40 {
41 return false;
42 }

◆ CanLoadAttachment() [1/3]

override bool ItemBase::CanLoadAttachment ( EntityAI attachment)
inlineprotected

Definition at line 259 of file BatteryCharger.c.

260 {
261 if (!super.CanLoadAttachment(attachment))
262 return false;
263
266
267 // Only one attachment allowed
268 if (GetCompEM().GetPluggedDevice())
269 return false;
270
271 if (ibase.HasEnergyManager() && ibase.GetCompEM().GetPluggedDevicesCount() >= 1) // Make sure nothing is plugged into the battery
272 return false;
273
274 return true;
275 }
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.

References Class::CastTo().

◆ CanLoadAttachment() [2/3]

override bool ItemBase::CanLoadAttachment ( EntityAI attachment)
inlineprotected

Definition at line 341 of file PortableGasStove.c.

342 {
343 int slotId;
344 for (int i = 0; i < attachment.GetInventory().GetSlotIdCount(); i++)
345 {
346 slotId = attachment.GetInventory().GetSlotId(i);
347 if (GetInventory().HasAttachmentSlot(slotId))
348 {
350 EntityAI ent = this;
351 EntityAI parent;
352 while (ent)
353 {
354 if (ent.GetInventory().GetCurrentInventoryLocation(loc) && loc.IsValid())
355 {
356 if (loc.GetType() == InventoryLocationType.CARGO)
357 {
358 parent = ent.GetHierarchyParent();
359 if (parent.GetInventory().HasInventorySlot(slotId))
360 {
361 //Print("CanLoadAttachment | parent " + parent + " matches in slot name: " + InventorySlots.GetSlotName(slotId) + " of " + this);
362 return false;
363 }
364 }
365 }
366
367 ent = ent.GetHierarchyParent();
368 }
369 }
370 }
371
372 return super.CanLoadAttachment(attachment);
373 }
InventoryLocationType
types of Inventory Location
InventoryLocation.

◆ CanLoadAttachment() [3/3]

override bool ItemBase::CanLoadAttachment ( EntityAI attachment)
inlineprotected

Definition at line 909 of file TentBase.c.

910 {
911 if (GetHealthLevel() == GameConstants.STATE_RUINED)
912 return false;
913
914 return super.CanLoadAttachment(attachment);
915 }
const int STATE_RUINED
Definition constants.c:757

References GameConstants::STATE_RUINED.

◆ CanLoadItemIntoCargo()

override bool ItemBase::CanLoadItemIntoCargo ( EntityAI item)
inlineprotected

Definition at line 891 of file TentBase.c.

892 {
893 if (!super.CanLoadItemIntoCargo(item))
894 return false;
895 if (GetHealthLevel() == GameConstants.STATE_RUINED)
896 return false;
897
898 return true;
899 }

References GameConstants::STATE_RUINED.

◆ CanMakeGardenplot() [1/3]

override bool ItemBase::CanMakeGardenplot ( )
inlineprivate

Definition at line 3 of file FieldShovel.c.

4 {
5 return true;
6 }

◆ CanMakeGardenplot() [2/3]

override bool ItemBase::CanMakeGardenplot ( )
inlineprivate

Definition at line 3 of file PickAxe.c.

4 {
5 return true;
6 }

◆ CanMakeGardenplot() [3/3]

override bool ItemBase::CanMakeGardenplot ( )
inlineprivate

Definition at line 3 of file Shovel.c.

4 {
5 return true;
6 }

◆ CanManipulate()

bool ItemBase::CanManipulate ( )
inlineprotected

Definition at line 113 of file PowerGenerator.c.

114 {
115 return GetCompEM().GetPluggedDevicesCount() == 0 && !GetCompEM().IsWorking();
116 }

Referenced by CanPutInCargo(), and CanPutIntoHands().

◆ CanObstruct()

override bool ItemBase::CanObstruct ( )
inlineprotected

Definition at line 82 of file BaseBuildingBase.c.

83 {
84 return true;
85 }

◆ CanPlantSeed()

bool ItemBase::CanPlantSeed ( string selection_component)
inlineprivate

Definition at line 301 of file GardenBase.c.

302 {
304
305 if (slot != NULL && slot.m_State == Slot.STATE_DIGGED)
306 return true;
307 else
308 return false;
309 }
Slot GetSlotBySelection(string selection_component)
Definition GardenBase.c:626

◆ CanProxyObstruct()

override bool ItemBase::CanProxyObstruct ( )
inlineprotected

Definition at line 27 of file KitBase.c.

28 {
29 return false;
30 }

◆ CanProxyObstructSelf()

override bool ItemBase::CanProxyObstructSelf ( )
inlineprotected

prevents showing cargo when outside the tent geometry

Definition at line 79 of file TentBase.c.

80 {
81 return true;
82 }

◆ CanPutAsAttachment() [1/5]

override bool ItemBase::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 5 of file ItemBase.c.

6 {
7 return true;
8 }

◆ CanPutAsAttachment() [2/5]

override bool ItemBase::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 3 of file GardenLime.c.

4 {
5 if (!super.CanPutAsAttachment(parent)) return false;
6 const int SLOTS_ARRAY = 8;
7 bool is_barrel = false;
8 bool is_opened_barrel = false;
9 bool slot_test = true;
10 string slot_names[SLOTS_ARRAY] = { "BerryR", "BerryB", "Plant", "OakBark", "BirchBark", "Nails", "Disinfectant", "Guts" };
11
12
13 // is barrel
14 if (parent.IsKindOf("Barrel_ColorBase"))
15 is_barrel = true;
16
17 // is opened barrel
18 if (is_barrel && parent.GetAnimationPhase("Lid") == 1)
19 is_opened_barrel = true;
20
21 // all of the barrel slots are empty
22 for (int i = 0; i < SLOTS_ARRAY ; i++)
23 {
24 if (parent.FindAttachmentBySlotName(slot_names[i]) != NULL)
25 {
26 slot_test = false;
27 break;
28 }
29 }
30
32 return true;
33 return false;
34 }

◆ CanPutAsAttachment() [3/5]

override bool ItemBase::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 3 of file GrozaGL_LowerReceiver.c.

4 {
5 if (!super.CanPutAsAttachment(parent)) return false;
6 if (parent.FindAttachmentBySlotName("weaponMuzzleAK") == NULL)
7 return true;
8 return true;
9 }

◆ CanPutAsAttachment() [4/5]

override bool ItemBase::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 13 of file MetalWire.c.

14 {
15 if (!super.CanPutAsAttachment(parent))
16 return false;
17
18 if (parent.IsInherited(VehicleBattery))
19 {
20 EntityAI battery_owner = EntityAI.Cast(parent.GetHierarchyParent());
21
22 // Check for Not player as if parent is not player, battery is already attached and should not receive new attachment
23 if (battery_owner && !battery_owner.IsInherited(PlayerBase))
24 return false;
25 }
26
27 return true;
28 }

◆ CanPutAsAttachment() [5/5]

override bool ItemBase::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 15 of file Rag.c.

16 {
17 if (!super.CanPutAsAttachment(parent))
18 return false;
19
20 if (GetQuantity() > 1 && PlayerBase.Cast(parent))
21 return false;
22
23 return true;
24 }

References GetQuantity().

◆ CanPutInCargo() [1/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprivate

Definition at line 278 of file GardenBase.c.

279 {
280 if (!super.CanPutInCargo(parent)) return false;
281 return false;
282 }

◆ CanPutInCargo() [2/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprivate

Definition at line 418 of file PlantBase.c.

419 {
420 return super.CanPutInCargo(parent);
421 }

◆ CanPutInCargo() [3/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 890 of file BaseBuildingBase.c.

891 {
892 return false;
893 }

◆ CanPutInCargo() [4/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 189 of file BatteryCharger.c.

190 {
191 if (!super.CanPutInCargo(parent)) return false;
192 // No "Take" action if the item is connected
193 if (!GetCompEM().IsPlugged() && !GetCompEM().GetPluggedDevice())
194 return true;
195
196 return false;
197 }

◆ CanPutInCargo() [5/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 59 of file Blowtorch.c.

60 {
61 if (!super.CanPutInCargo(parent))
62 return false;
63
64 return !GetCompEM().IsSwitchedOn();
65 }

◆ CanPutInCargo() [6/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprivate

Definition at line 27 of file CableReel.c.

28 {
29 if (!super.CanPutInCargo(parent)) return false;
30 EntityAI owner_EAI = GetHierarchyParent();
31 if (owner_EAI && owner_EAI.IsKindOf("Fence"))
32 return true;
33
34 bool allow_into_inv = !GetCompEM().IsPlugged();
35 return allow_into_inv;
36 }

◆ CanPutInCargo() [7/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprivate

Definition at line 92 of file PileOfWoodenPlanks.c.

93 {
94 // Uncomment this if you want to make it possible to put the pile into V3S Cargo
95 /*
96 if ( parent.IsKindOf("V3S_Cargo") )
97 return true;
98 else
99 return false;
100 */
101
102 return false;
103 }

◆ CanPutInCargo() [8/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 284 of file PortableGasStove.c.

285 {
286 if (!super.CanPutInCargo(parent))
287 return false;
288
289 if (GetCompEM().IsSwitchedOn())
290 return false;
291
292 //can 'parent' be attached to 'this' (->assumed smaller size than 'this')?
293 if (parent)
294 {
295 int slotId;
296 for (int i = 0; i < GetInventory().GetAttachmentSlotsCount(); i++)
297 {
298 slotId = GetInventory().GetAttachmentSlotId(i);
299 if (parent.GetInventory().HasInventorySlot(slotId))
300 {
301 //Print("CanPutInCargo | parent " + parent + " matches in slot name: " + InventorySlots.GetSlotName(slotId) + " of " + this);
302 return false;
303 }
304 }
305 }
306
307 return true;
308 }

◆ CanPutInCargo() [9/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 96 of file PowerGenerator.c.

97 {
98 if (!super.CanPutInCargo(parent))
99 return false;
100
101 return CanManipulate();
102 }
bool CanManipulate()

References CanManipulate().

◆ CanPutInCargo() [10/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 293 of file Spotlight.c.

294 {
295 if (!super.CanPutInCargo(parent))
296 return false;
297
298 return !GetCompEM().IsPlugged();
299 }

◆ CanPutInCargo() [11/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 287 of file TentBase.c.

288 {
289 if (!super.CanPutInCargo(parent))
290 return false;
291
292 return CanBeManipulated();
293 }
bool CanBeManipulated()
Definition TentBase.c:445

◆ CanPutInCargo() [12/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprivate

Definition at line 239 of file TrapSpawnBase.c.

240 {
241 super.CanPutInCargo(parent);
242 return CanBeTaken();
243 }
bool CanBeTaken()

◆ CanPutInCargo() [13/13]

override bool ItemBase::CanPutInCargo ( EntityAI parent)
inlineprivate

Definition at line 27 of file UndergroundStash.c.

28 {
29 return false;
30 }

◆ CanPutInInventory()

bool ItemBase::CanPutInInventory ( EntityAI player)
inlineprivate

Definition at line 508 of file TrapSpawnBase.c.

508{ }

◆ CanPutIntoHands() [1/12]

override bool ItemBase::CanPutIntoHands ( EntityAI parent)
inlineprotected

Definition at line 901 of file BaseBuildingBase.c.

902 {
903 return false;
904 }

◆ CanPutIntoHands() [2/12]

override bool ItemBase::CanPutIntoHands ( EntityAI parent)
inlineprivate

Definition at line 87 of file PileOfWoodenPlanks.c.

88 {
89 return false;
90 }

◆ CanPutIntoHands() [3/12]

override bool ItemBase::CanPutIntoHands ( EntityAI parent)
inlineprotected

Definition at line 376 of file PortableGasStove.c.

377 {
378 if (!super.CanPutIntoHands(parent))
379 return false;
380
381 return !GetCompEM().IsSwitchedOn();
382 }

◆ CanPutIntoHands() [4/12]

override bool ItemBase::CanPutIntoHands ( EntityAI parent)
inlineprotected

Definition at line 279 of file TentBase.c.

280 {
281 if (!super.CanPutIntoHands(parent))
282 return false;
283
284 return CanBeManipulated();
285 }

◆ CanPutIntoHands() [5/12]

override bool ItemBase::CanPutIntoHands ( EntityAI parent)
inlineprivate

Definition at line 245 of file TrapSpawnBase.c.

246 {
247 super.CanPutIntoHands(parent);
248 return CanBeTaken();
249 }

◆ CanPutIntoHands() [6/12]

override bool ItemBase::CanPutIntoHands ( EntityAI parent)
inlineprivate

Definition at line 47 of file UndergroundStash.c.

48 {
49 return false;
50 }

◆ CanPutIntoHands() [7/12]

override bool ItemBase::CanPutIntoHands ( EntityAI player)
inlineprivate

Definition at line 284 of file GardenBase.c.

285 {
286 if (!super.CanPutIntoHands(parent))
287 return false;
288 return false;
289 }

◆ CanPutIntoHands() [8/12]

override bool ItemBase::CanPutIntoHands ( EntityAI player)
inlineprivate

Definition at line 423 of file PlantBase.c.

424 {
425 return super.CanPutIntoHands(parent);
426 }

◆ CanPutIntoHands() [9/12]

override bool ItemBase::CanPutIntoHands ( EntityAI player)
inlineprotected

Definition at line 199 of file BatteryCharger.c.

200 {
201 if (!super.CanPutIntoHands(parent))
202 return false;
203 // No "Take into hands" action if the item is connected
204 if (!GetCompEM().IsPlugged() && !GetCompEM().GetPluggedDevice())
205 return true;
206
207 return false;
208 }

◆ CanPutIntoHands() [10/12]

override bool ItemBase::CanPutIntoHands ( EntityAI player)
inlineprivate

Definition at line 38 of file CableReel.c.

39 {
40 if (!super.CanPutIntoHands(parent))
41 return false;
43 return true;
44 else
45 {
46 EntityAI owner_EAI = GetHierarchyParent();
47 if (owner_EAI && owner_EAI.IsKindOf("Fence"))
48 return true;
49 }
50
51 return true;
52 }

◆ CanPutIntoHands() [11/12]

override bool ItemBase::CanPutIntoHands ( EntityAI player)
inlineprotected

Definition at line 105 of file PowerGenerator.c.

106 {
107 if (!super.CanPutIntoHands(parent))
108 return false;
109 return CanManipulate();
110 }

References CanManipulate().

◆ CanPutIntoHands() [12/12]

override bool ItemBase::CanPutIntoHands ( EntityAI player)
inlineprotected

Definition at line 301 of file Spotlight.c.

302 {
303 if (!super.CanPutIntoHands(parent))
304 return false;
305 // Commented out so Reposition action is possible to execute
306 return true;
307 }

◆ CanReceiveAttachment() [1/5]

override bool ItemBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

Definition at line 865 of file BaseBuildingBase.c.

866 {
867 return super.CanReceiveAttachment(attachment, slotId);
868 }

◆ CanReceiveAttachment() [2/5]

override bool ItemBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

Definition at line 236 of file BatteryCharger.c.

237 {
238 if (!super.CanReceiveAttachment(attachment, slotId))
239 return false;
240
243
244 // No attaching if the charger is in inventory!
245 PlayerBase charger_owner = PlayerBase.Cast(GetHierarchyRootPlayer());
246 if (charger_owner)
247 return false;
248
249 // Only one attachment allowed
250 if (GetCompEM().GetPluggedDevice())
251 return false;
252
253 if (ibase.HasEnergyManager() && ibase.GetCompEM().GetPluggedDevicesCount() >= 1) // Make sure nothing is plugged into the battery
254 return false;
255
256 return true;
257 }

References Class::CastTo().

◆ CanReceiveAttachment() [3/5]

override bool ItemBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

Definition at line 315 of file PortableGasStove.c.

316 {
318 EntityAI ent = this;
319 EntityAI parent;
320 while (ent)
321 {
322 if (ent.GetInventory().GetCurrentInventoryLocation(loc) && loc.IsValid())
323 {
324 if (loc.GetType() == InventoryLocationType.CARGO)
325 {
326 parent = ent.GetHierarchyParent();
327 if (parent && parent.GetInventory().HasInventorySlot(slotId))
328 {
329 //Print("CanReceiveAttachment | parent " + parent + " matches in slot name: " + InventorySlots.GetSlotName(slotId) + " of " + this);
330 return false;
331 }
332 }
333 }
334
335 ent = ent.GetHierarchyParent();
336 }
337
338 return super.CanReceiveAttachment(attachment, slotId);
339 }

◆ CanReceiveAttachment() [4/5]

override bool ItemBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

Definition at line 901 of file TentBase.c.

902 {
903 if (GetHealthLevel() == GameConstants.STATE_RUINED)
904 return false;
905
906 return super.CanReceiveAttachment(attachment, slotId);
907 }

References GameConstants::STATE_RUINED.

◆ CanReceiveAttachment() [5/5]

override bool ItemBase::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprivate

Definition at line 429 of file TrapSpawnBase.c.

430 {
431 super.CanReceiveAttachment(attachment, slotId);
432 return IsDeployed();
433 }

◆ CanReceiveItemIntoCargo()

override bool ItemBase::CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected

Definition at line 883 of file TentBase.c.

884 {
885 if (GetHealthLevel() == GameConstants.STATE_RUINED || m_IsBeingPacked)
886 return false;
887
888 return super.CanReceiveItemIntoCargo(item);
889 }
bool m_IsBeingPacked
Definition TentBase.c:29

References GameConstants::STATE_RUINED.

◆ CanReceiveItemIntoHands()

override bool ItemBase::CanReceiveItemIntoHands ( EntityAI item_to_hands)
inlineprivate

Definition at line 37 of file UndergroundStash.c.

38 {
39 return false;
40 }

◆ CanReleaseCargo()

override bool ItemBase::CanReleaseCargo ( EntityAI cargo)
inlineprivate

Definition at line 32 of file UndergroundStash.c.

33 {
34 return false;
35 }

◆ CanRemoveFromCargo() [1/3]

override bool ItemBase::CanRemoveFromCargo ( EntityAI parent)
inlineprotected

Definition at line 895 of file BaseBuildingBase.c.

896 {
897 return false;
898 }

◆ CanRemoveFromCargo() [2/3]

override bool ItemBase::CanRemoveFromCargo ( EntityAI parent)
inlineprotected

Definition at line 67 of file Blowtorch.c.

68 {
69 return true;
70 }

◆ CanRemoveFromCargo() [3/3]

override bool ItemBase::CanRemoveFromCargo ( EntityAI parent)
inlineprotected

Definition at line 310 of file PortableGasStove.c.

311 {
312 return true;
313 }

◆ CanRemoveFromHands() [1/3]

override bool ItemBase::CanRemoveFromHands ( EntityAI player)
inlineprivate

Definition at line 291 of file GardenBase.c.

292 {
293 return false;
294 }

◆ CanRemoveFromHands() [2/3]

override bool ItemBase::CanRemoveFromHands ( EntityAI player)
inlineprivate

Definition at line 428 of file PlantBase.c.

429 {
430 return false;
431 }

◆ CanRemoveFromHands() [3/3]

override bool ItemBase::CanRemoveFromHands ( EntityAI player)
inlineprivate

Definition at line 73 of file CableReel.c.

74 {
75 return true;
76 }

◆ CanSaveItemInHands()

override bool ItemBase::CanSaveItemInHands ( EntityAI item_in_hands)
inlineprivate

Definition at line 42 of file UndergroundStash.c.

43 {
44 return false;
45 }

◆ CanSwapEntities()

override bool ItemBase::CanSwapEntities ( EntityAI otherItem,
InventoryLocation otherDestination,
InventoryLocation destination )
inlineprivate

Definition at line 3 of file Rag.c.

4 {
5 if (!super.CanSwapEntities(otherItem, otherDestination, destination))
6 return false;
7
8 if (Torch.Cast(GetHierarchyParent()) && otherItem.IsInherited(Rag))
9 return false;
10
11 return true;
12 }

◆ CanToggleAnimations()

bool ItemBase::CanToggleAnimations ( string selection)
inlineprotected

Definition at line 593 of file TentBase.c.

594 {
595 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
596 {
598 string toggle_off = toggle.GetToggleOff();
599 toggle_off.ToLower();
600 string toggle_on = toggle.GetToggleOn();
601 toggle_on.ToLower();
602
603 if (toggle_off == selection || toggle_on == selection)
604 {
605 string zone;
606 DamageSystem.GetDamageZoneFromComponentName(this, selection, zone);
607 return GetHealthLevel(zone) < GameConstants.STATE_RUINED;
608 }
609 }
610
611 return false;
612 }
ref map< ref ToggleAnimations, bool > m_ToggleAnimations
Definition TentBase.c:33

References GameConstants::STATE_RUINED.

◆ CanUseConstruction()

override bool ItemBase::CanUseConstruction ( )
inlineprotected

Definition at line 798 of file BaseBuildingBase.c.

799 {
800 return true;
801 }

◆ CanUseConstructionBuild()

override bool ItemBase::CanUseConstructionBuild ( )
inlineprotected

Definition at line 803 of file BaseBuildingBase.c.

804 {
805 return true;
806 }

◆ CatchSetQuant()

void ItemBase::CatchSetQuant ( ItemBase catch)
inlineprivate

Definition at line 382 of file TrapSpawnBase.c.

383 {
384 if (catch.HasQuantity())
385 {
386 // Random quantity between 50% and 100%
387 float coef = Math.RandomFloatInclusive(0.5, 1.0);
388 float item_quantity = catch.GetQuantityMax() * coef;
390 catch.SetQuantity(item_quantity);
391 }
392 }
bool HasQuantity()
Definition ItemBase.c:7990
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106
static proto float Round(float f)
Returns mathematical round of value.

References HasQuantity(), Math::RandomFloatInclusive(), and Math::Round().

◆ ChangeInfestation()

void ItemBase::ChangeInfestation ( bool is_infested)
inlineprivate

Definition at line 433 of file PlantBase.c.

434 {
436
437 string plant_type = GetType();
439
440 if (m_IsInfested)
441 {
442 if (material.m_InfestedTex != "")
443 SetObjectTexture(0, material.m_InfestedTex);
444 if (material.m_InfestedMat != "")
445 SetObjectMaterial(0, material.m_InfestedMat);
446 }
447 else
448 {
449 if (material.m_HealthyTex != "")
450 SetObjectTexture(0, material.m_HealthyTex);
451 if (material.m_HealthyMat != "")
452 SetObjectMaterial(0, material.m_HealthyMat);
453 }
454 }
bool m_IsInfested
Definition PlantBase.c:23
PluginHorticulture m_ModuleHorticulture
Definition PlantBase.c:42

References GetType().

◆ CheckForHybridAttachments()

void ItemBase::CheckForHybridAttachments ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 1092 of file BaseBuildingBase.c.

1093 {
1094 if (!GetGame().IsMultiplayer() || GetGame().IsServer())
1095 {
1096 //if this is a hybrid attachment, set damage of appropriate damage zone. Zone name must match slot name...WIP
1098 SetHealth(slot_name, "Health", item.GetHealth());
1099 }
1100 }

References GetGame(), and m_HybridAttachments.

◆ CheckLevelVerticalDistance()

bool ItemBase::CheckLevelVerticalDistance ( float max_dist,
string selection,
PlayerBase player )
inlineprotected

Definition at line 844 of file BaseBuildingBase.c.

845 {
846 return true;
847 }

◆ CheckMemoryPointVerticalDistance()

bool ItemBase::CheckMemoryPointVerticalDistance ( float max_dist,
string selection,
PlayerBase player )
inlineprotected

Definition at line 839 of file BaseBuildingBase.c.

840 {
841 return true;
842 }

◆ CheckRainStart()

void ItemBase::CheckRainStart ( )
inlineprivate

Definition at line 732 of file GardenBase.c.

733 {
734 if (!m_CheckRainTimer)
736
737 m_CheckRainTimer.Run(CHECK_RAIN_INTERVAL, this, "CheckRainTick", NULL, true);
738 }
ref Timer m_CheckRainTimer
Definition GardenBase.c:30
static const int CHECK_RAIN_INTERVAL
Definition GardenBase.c:23

References CALL_CATEGORY_SYSTEM.

◆ CheckRainTick()

void ItemBase::CheckRainTick ( )
inlineprivate

Definition at line 740 of file GardenBase.c.

741 {
742 float rain_intensity = GetGame().GetWeather().GetRain().GetActual();
743
745
746 if (rain_intensity > 1 || rain_intensity < 0)
747 wetness = 0; // hackfix for weird values returned by weather system
748
749 if (wetness == 0)
751
753
754 if (rain_intensity > 0)
755 {
757 SetSynchDirty();
758 }
759
760 for (int i = 0; i < slots_count; i++)
761 {
762 if (m_Slots)
763 {
764 Slot slot = m_Slots.Get(i);
765
766 if (slot)
767 slot.GiveWater(wetness * Math.RandomFloat01());
768 }
769 }
770 }
ref array< ref Slot > m_Slots
Definition GardenBase.c:25
void WaterAllSlots()
Definition GardenBase.c:773
int GetGardenSlotsCount()
Definition GardenBase.c:296
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:126

References GetGame(), GardenBase::GetGardenSlotsCount(), and Math::RandomFloat01().

◆ CheckSlotVerticalDistance()

bool ItemBase::CheckSlotVerticalDistance ( int slot_id,
PlayerBase player )
inlineprotected

Definition at line 834 of file BaseBuildingBase.c.

835 {
836 return true;
837 }

◆ CheckWater()

void ItemBase::CheckWater ( )
inlineprivate

Definition at line 582 of file PlantBase.c.

583 {
584 if (!IsMature() && !NeedsWater())
585 {
588
590
591 if (GetGame().IsServer())
592 {
594 m_GrowthTimer.Run(m_StateChangeTime, this, "GrowthTimerTick", NULL, true);
595 }
596 }
597 }
bool NeedsWater()
Definition PlantBase.c:739
ref Timer m_DeleteDryPlantTimer
Definition PlantBase.c:37
int m_StateChangeTime
Definition PlantBase.c:31
ref Timer m_GrowthTimer
Definition PlantBase.c:33
static const int STATE_GROWING
Definition PlantBase.c:5
bool IsMature()
Definition PlantBase.c:816
void SetPlantState(int state)
Definition PlantBase.c:707

References CALL_CATEGORY_SYSTEM, and GetGame().

◆ ClearCookingEquipment()

void ItemBase::ClearCookingEquipment ( ItemBase pItem)
inlineprotected

Definition at line 46 of file PortableGasStove.c.

47 {
49 m_CookingProcess.TerminateCookingSounds(pItem);
50
52 }
ref Cooking m_CookingProcess
void SetCookingEquipment(ItemBase equipment)

References m_CookingProcess, and SetCookingEquipment().

◆ Clothing_Base()

void ItemBase::Clothing_Base ( )
inlineprivate

Definition at line 788 of file InventoryItem.c.

789 {
790 m_ItemVisibilityModifier = ConfigGetFloat("visibilityModifier");
791 }
float m_ItemVisibilityModifier

◆ ConditionIntoInventory()

bool ItemBase::ConditionIntoInventory ( EntityAI player)
inlineprotected

Definition at line 274 of file TentBase.c.

275 {
276 return CanBeManipulated();
277 }

◆ ConditionOutOfHands()

bool ItemBase::ConditionOutOfHands ( EntityAI player)
inlineprotected

Definition at line 295 of file TentBase.c.

296 {
297 return CanBeManipulated();
298 }

◆ ConstructionInit()

void ItemBase::ConstructionInit ( )
inlineprotected

Definition at line 850 of file BaseBuildingBase.c.

851 {
852 if (!m_Construction)
853 m_Construction = new Construction(this);
854
855 GetConstruction().Init();
856 }
void Construction(BaseBuildingBase parent)
Construction GetConstruction()
ref Construction m_Construction

References Construction(), GetConstruction(), and m_Construction.

◆ ConvertAttSlotToPlantSlot()

string ItemBase::ConvertAttSlotToPlantSlot ( string attach_slot)
inlineprivate

Definition at line 312 of file GardenBase.c.

313 {
314 // Give result
315 if (m_map_slots.Contains(attach_slot))
316 {
318 return return_value;
319 }
320
321 return "";
322 }
static ref map< string, string > m_map_slots
Definition GardenBase.c:32

◆ CookWithEquipment()

void ItemBase::CookWithEquipment ( )
inlineprotected

Definition at line 201 of file PortableGasStove.c.

202 {
203 if (m_CookingProcess == null)
205
207 }
float m_TimeFactor
const float PARAM_COOKING_TIME_INC_COEF
ItemBase GetCookingEquipment()

References GetCookingEquipment(), and m_CookingProcess.

◆ CreateAreaDamage()

void ItemBase::CreateAreaDamage ( string slot_name,
float rotation_angle = 0 )
inlineprotected

Definition at line 960 of file BaseBuildingBase.c.

961 {
962 if (GetGame() && GetGame().IsServer())
963 {
964 //destroy area damage if some already exists
966
967 //create new area damage
969 areaDamage.SetDamageComponentType(AreaDamageComponentTypes.HITZONE);
970
971 vector min_max[2];
972 if (MemoryPointExists(slot_name + "_min"))
973 min_max[0] = GetMemoryPointPos(slot_name + "_min");
974 if (MemoryPointExists(slot_name + "_max"))
975 min_max[1] = GetMemoryPointPos(slot_name + "_max");
976
977 //get proper trigger extents (min<max)
978 vector extents[2];
979 GetConstruction().GetTriggerExtents(min_max, extents);
980
981 //get box center
983 center = GetConstruction().GetBoxCenter(min_max);
984 center = ModelToWorld(center);
985
986 //rotate center if needed
989
990 areaDamage.SetExtents(extents[0], extents[1]);
991 areaDamage.SetAreaPosition(center);
992 areaDamage.SetAreaOrientation(orientation);
993 areaDamage.SetLoopInterval(1.0);
994 areaDamage.SetDeferDuration(0.2);
995 areaDamage.SetHitZones({ "Torso", "LeftHand", "LeftLeg", "LeftFoot", "RightHand", "RightLeg", "RightFoot" });
996 areaDamage.SetAmmoName("BarbedWireHit");
997 areaDamage.Spawn();
998
1000 }
1001 }
vector GetOrientation()
void DestroyAreaDamage()
A particular version of the deferred loop used to not damage players inside vehicles.
void CalcDamageAreaRotation(float angle_deg, out vector center, out vector orientation)

References CalcDamageAreaRotation(), DestroyAreaDamage(), GetConstruction(), GetGame(), GetOrientation(), AreaDamageComponentTypes::HITZONE, and m_DamageTriggers.

◆ CreateConstructionKit()

ItemBase ItemBase::CreateConstructionKit ( )
inlineprotected

◆ CreateConstructionKitInHands()

void ItemBase::CreateConstructionKitInHands ( notnull PlayerBase player)
inlineprotected

Definition at line 349 of file BaseBuildingBase.c.

350 {
351 ItemBase construction_kit = ItemBase.Cast(player.GetHumanInventory().CreateInHands(GetConstructionKitType()));
354 }

References BaseBuildingBase::GetConstructionKitType(), and m_ConstructionKitHealth.

◆ CreateDamageTrigger()

void ItemBase::CreateDamageTrigger ( )
inlineprotected

Definition at line 258 of file BarbedWire.c.

259 {
260 m_AreaDamage = new AreaDamageOneTime(this);
261 m_AreaDamage.SetExtents("-1 0 -0.4", "1 0.7 0.4");
262 m_AreaDamage.SetHitZones({"RightLeg", "LeftLeg", "RightFoot", "LeftFoot"});
263 m_AreaDamage.SetAmmoName("BarbedWireHit");
264 m_AreaDamage.Spawn();
265 m_TriggerActive = true;
266 }
ref AreaDamageManager m_AreaDamage
Definition BarbedWire.c:20

References m_AreaDamage.

Referenced by OnPlacementComplete(), and OnWorkStop().

◆ CreateElectrifiedDamageTrigger()

void ItemBase::CreateElectrifiedDamageTrigger ( )
inlineprotected

Definition at line 247 of file BarbedWire.c.

248 {
250 m_AreaDamage.SetExtents("-1 0 -0.4", "1 0.7 0.4");
251 m_AreaDamage.SetLoopInterval(0.3);
252 m_AreaDamage.SetHitZones({"RightLeg", "LeftLeg", "RightFoot", "LeftFoot"});
253 m_AreaDamage.SetAmmoName("BarbedWireHit");
254 m_AreaDamage.Spawn();
255 m_TriggerActive = true;
256 }

References m_AreaDamage.

Referenced by OnPlacementComplete(), and OnWorkStart().

◆ CreatePlant()

void ItemBase::CreatePlant ( Slot slot)
inlineprivate

Definition at line 407 of file GardenBase.c.

408 {
409 if (g_Game.IsServer())
410 {
411 ItemBase seed = slot.GetSeed();
412 seed.UnlockFromParent();
413 GetGame().ObjectDelete(seed);
414
415 PlantBase plant = PlantBase.Cast(GetInventory().CreateAttachmentEx(slot.m_PlantType, slot.GetSlotId()));
416
417 int slot_index = slot.GetSlotIndex();
418 slot.SetPlant(plant);
419 plant.Init(this, slot.GetFertility(), slot.m_HarvestingEfficiency, slot.GetWater());
420 //ShowSelection(SLOT_SELECTION_COVERED_PREFIX + (slot_index + 1).ToStringLen(2));
421
422 plant.LockToParent();
423 }
424 }
DayZGame g_Game
Definition DayZGame.c:3528

References g_Game, and GetGame().

◆ CreateRope()

void ItemBase::CreateRope ( Rope rope)
inlineprotected

Definition at line 176 of file KitBase.c.

177 {
178 if (!rope)
179 return;
180
181 InventoryLocation targetLoc = rope.GetTargetLocation();
182 if (targetLoc && targetLoc.GetType() != InventoryLocationType.GROUND)
183 {
184 MiscGameplayFunctions.TransferItemProperties(this, rope);
185 return;
186 }
187
188 EntityAI newRope = EntityAI.Cast(GetGame().CreateObjectEx(rope.GetType(), GetPosition(), ECE_PLACE_ON_SURFACE));
189
190 if (newRope)
191 MiscGameplayFunctions.TransferItemProperties(this, newRope);
192
193 rope.Delete();
194 }
class JsonUndergroundAreaTriggerData GetPosition

References ECE_PLACE_ON_SURFACE, GetGame(), and GetPosition.

◆ DebugCustomState()

void ItemBase::DebugCustomState ( )
inlineprotected

Definition at line 1121 of file BaseBuildingBase.c.

1122 {
1123 }

◆ Defibrillator()

void ItemBase::Defibrillator ( )
inlineprivate

Definition at line 16 of file Defibrillator.c.

17 {
18 // Read all config parameters
19 //m_ChargeTime = GetTimeNeededToCharge();
21 }
float GetEnergyNeededToCharge()
static float m_EnergyNeededToCharge

References GetEnergyNeededToCharge().

◆ DeleteDryPlantTick()

void ItemBase::DeleteDryPlantTick ( )
inlineprivate

Definition at line 554 of file PlantBase.c.

555 {
556 /*if ( IsDry() )
557 {
558 RemoveSlot();
559 }*/
560 }

◆ DestroyAreaDamage()

void ItemBase::DestroyAreaDamage ( string slot_name)
inlineprotected

Definition at line 1021 of file BaseBuildingBase.c.

1022 {
1023 if (GetGame() && GetGame().IsServer())
1024 {
1027 {
1028 if (areaDamage)
1029 areaDamage.Destroy();
1030
1032 }
1033 }
1034 }

References GetGame(), and m_DamageTriggers.

◆ DestroyClutterCutter()

void ItemBase::DestroyClutterCutter ( )
inlineprotected

Definition at line 755 of file TentBase.c.

756 {
757 if (GetGame().IsMultiplayer() || GetGame().IsServer())
758 {
759 if (m_ClutterCutter)
760 GetGame().ObjectDelete(m_ClutterCutter);
761 }
762 }
Object m_ClutterCutter
Definition TentBase.c:36

References GetGame(), and m_ClutterCutter.

◆ DestroyConstruction()

void ItemBase::DestroyConstruction ( )
inlineprotected

Definition at line 373 of file BaseBuildingBase.c.

374 {
375 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " DestroyConstruction");
376 GetGame().ObjectDelete(this);
377 }
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
static bool IsBaseBuildingLogEnable()
Definition Debug.c:779
override string GetDebugName()

References bsbDebugPrint(), GetDebugName(), GetGame(), and LogManager::IsBaseBuildingLogEnable().

◆ DestroyConstructionKit()

void ItemBase::DestroyConstructionKit ( ItemBase construction_kit)
inlineprotected

Definition at line 366 of file BaseBuildingBase.c.

367 {
369 GetGame().ObjectDelete(construction_kit);
370 }

References GetGame(), and m_ConstructionKitHealth.

◆ DestroyDamageTrigger()

void ItemBase::DestroyDamageTrigger ( )
inlineprotected

Definition at line 268 of file BarbedWire.c.

269 {
270 m_AreaDamage.Destroy();
271 m_TriggerActive = false;
272 }

References m_AreaDamage.

Referenced by OnInventoryEnter(), OnIsUnplugged(), OnItemLocationChanged(), OnWorkStart(), and OnWorkStop().

◆ DestroyFireplace()

void ItemBase::DestroyFireplace ( )
inlineprotected

Definition at line 55 of file PortableGasStove.c.

56 {
57 //delete object
58 GetGame().ObjectDelete(this);
59 }

References GetGame().

◆ DestroyPlant()

void ItemBase::DestroyPlant ( )
inlineprivate

Definition at line 674 of file PlantBase.c.

675 {
676 if (GetGame() && GetGame().IsServer())
677 {
679
680 RemoveSlot();
681 }
682 }
void UnlockFromParent()
Unlocks this item from its attachment slot of its parent.
Definition ItemBase.c:5516
void RemoveSlot()
Definition PlantBase.c:767

References GetGame(), and UnlockFromParent().

◆ DisassembleKit()

void ItemBase::DisassembleKit ( ItemBase item)
inlineprotected

Definition at line 174 of file KitBase.c.

174{}

◆ DisassembleOnLastDetach()

override bool ItemBase::DisassembleOnLastDetach ( )
inlineprotected

Definition at line 61 of file KitBase.c.

62 {
63 return true;
64 }

◆ DischargeClient()

void ItemBase::DischargeClient ( PlayerBase victim)
inlineprivate

Definition at line 138 of file Defibrillator.c.

139 {
141 }
static const string SHOCK_SOUND
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.

References SEffectManager::PlaySoundOnObject().

◆ DischargeServer()

void ItemBase::DischargeServer ( PlayerBase victim)
inlineprivate

Definition at line 112 of file Defibrillator.c.

113 {
114 /*
115 bool has_heart_attack = victim.m_ModifiersManager.IsModifierActive(eModifiers.MDF_HEART_ATTACK);
116
117 if ( has_heart_attack )
118 {
119 victim.m_ModifiersManager.DeactivateModifier ( eModifiers.MDF_HEART_ATTACK );
120 }
121 else
122 {
123 victim.m_ModifiersManager.ActivateModifier ( eModifiers.MDF_HEART_ATTACK );
124 }
125 */
126 /*
127 if (!GetGame().IsMultiplayer() || GetGame().IsClient())
128 {
129 SEffectManager.PlaySoundOnObject(SHOCK_SOUND, this);
130 }*/
131
132 victim.SetPulseType(!victim.GetPulseType());
133 victim.SetHealth("", "Shock", 0);
134
135 GetCompEM().SwitchOff();
136 }

◆ DisplayNameRuinAttach() [1/2]

override bool ItemBase::DisplayNameRuinAttach ( )
inlineprivate

Definition at line 732 of file InventoryItem.c.

733 {
734 return true;
735 }

◆ DisplayNameRuinAttach() [2/2]

override bool ItemBase::DisplayNameRuinAttach ( )
inlineprivate

Definition at line 763 of file InventoryItem.c.

764 {
765 return true;
766 }

◆ DoMeasurement()

void ItemBase::DoMeasurement ( )
inlineprotected

Definition at line 27 of file Raycaster.c.

28 {
29 float dispersion = 80;
30
31 vector from = GetPosition() + (GetMemoryPointPos("beamStart") + ((GetOrientation() + Vector(90, 0, 0)).AnglesToVector() * 0.3));
33 vector to = from + (ori.AnglesToVector()) * 30;
37
38 bool is_collision = DayZPhysics.RaycastRV(from, to, contact_pos, contact_dir, contactComponent, NULL, NULL, GetHierarchyRootPlayer(), false, false, ObjIntersectIFire);
39
40 if (is_collision)
41 {
42 vector hit_normal = contact_dir.VectorToAngles();
43 hit_normal[1] = hit_normal[1] + 90;
44
45 // Generate result
46 Particle p = ParticleManager.GetInstance().PlayInWorld(ParticleList.DEBUG_DOT, contact_pos);
47 p.SetOrientation(hit_normal);
48 }
49 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
Legacy way of using particles in the game.
Definition Particle.c:7
static const int DEBUG_DOT
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].

References ParticleList::DEBUG_DOT, GetOrientation(), GetPosition, ParticleManager(), Math::RandomFloat(), DayZPhysics::RaycastRV(), and Vector().

◆ EEDelete() [1/2]

override void ItemBase::EEDelete ( EntityAI parent)
inlineprotected

Definition at line 68 of file BaseBuildingBase.c.

69 {
70 super.EEDelete(parent);
71
72 foreach (AreaDamageManager areaDamage : m_DamageTriggers)
74
75 }
proto native void Destroy()
Cleans up the Effect, including unregistering if needed.
Definition Effect.c:207

References m_DamageTriggers.

◆ EEDelete() [2/2]

override void ItemBase::EEDelete ( EntityAI parent)
inlineprotected

Definition at line 29 of file ParticleTest.c.

30 {
31 super.EEDelete(parent);
32
33 if (m_Particle && GetGame()) // GetGame() is null when the game is being shut down
34 {
36 GetGame().ObjectDelete(m_Particle);
37 }
38 }
Particle m_Particle
Definition ParticleTest.c:6
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
Definition Particle.c:262

References GetGame(), and Particle::Stop().

◆ EEHealthLevelChanged() [1/2]

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

Definition at line 447 of file BaseBuildingBase.c.

448 {
450 return;
451
452 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
453
454 if (GetGame().IsMultiplayer() && !GetGame().IsServer())
455 return;
456
458 string part_name = zone;
459 part_name.ToLower();
460
462 {
464
465 if (construction_part && construction.IsPartConstructed(part_name))
466 {
467 construction.DestroyPartServer(null, part_name, AT_DESTROY_PART);
468 construction.DestroyConnectedParts(part_name);
469 }
470
471 //barbed wire handling (hack-ish)
472 if (part_name.Contains("barbed"))
473 {
474 BarbedWire barbed_wire = BarbedWire.Cast(FindAttachmentBySlotName(zone));
475 if (barbed_wire)
476 barbed_wire.SetMountedState(false);
477 }
478 }
479 }
const int AT_DESTROY_PART
Definition _constants.c:8
void BarbedWire()
Definition BarbedWire.c:32

References AT_DESTROY_PART, Construction(), GetConstruction(), GetGame(), m_FixDamageSystemInit, and GameConstants::STATE_RUINED.

◆ EEHealthLevelChanged() [2/2]

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

Definition at line 216 of file TentBase.c.

217 {
218 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
219
221 return;
222
223 if (zone == "" && GetState() == PITCHED && newLevel == GameConstants.STATE_RUINED && GetGame().IsServer())
224 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(this, m_HalfExtents);
225
226 if (zone != "Body" && zone != "Inventory" && zone != "")
227 {
229 {
231 DamageSystem.GetComponentNamesFromDamageZone(this, zone, selections);
232 for (int j = 0; j < selections.Count(); j++)
233 {
234 if (selections.Get(j) != "")
235 {
236 RemoveProxyPhysics(selections.Get(j)); //To keep
237 //HideSelection(selections.Get(j)); //To change
239 }
240 }
241 }
243 {
244 if (GetState() == PITCHED)
245 TryPitch(true);
246 }
247 }
248 }
vector m_HalfExtents
Definition TentBase.c:39
void TryPitch(bool update_navmesh, bool init=false)
Definition TentBase.c:515
void AnimateCamonetByOpeningSelection(string opening_selection)
Definition TentBase.c:711

References TentBase::AnimateCamonetByOpeningSelection(), GetGame(), GetState(), m_FixDamageSystemInit, m_HalfExtents, and GameConstants::STATE_RUINED.

◆ EEInit() [1/5]

override void ItemBase::EEInit ( )
inlineprotected

Definition at line 49 of file BarbedWire.c.

50 {
51 super.EEInit();
52
53 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(UpdateAttachmentSlot, 100, false);
54 }
void UpdateAttachmentSlot()
Definition BarbedWire.c:87
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10

References CALL_CATEGORY_GAMEPLAY, and GetGame().

◆ EEInit() [2/5]

override void ItemBase::EEInit ( )
inlineprotected

Definition at line 489 of file BaseBuildingBase.c.

490 {
491 super.EEInit();
492
493 // init visuals and physics
495
496 //debug
497#ifdef DEVELOPER
499#endif
500 }
void DebugCustomState()
void InitBaseState()

References DebugCustomState(), and InitBaseState().

◆ EEInit() [3/5]

override void ItemBase::EEInit ( )
inlineprotected

Definition at line 49 of file KitBase.c.

50 {
51 super.EEInit();
52
53 //set visual on init
56
57 if (GetGame().IsServer())
58 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).Call(AssembleKit);
59 }
void UpdateVisuals()
void AssembleKit()
Definition KitBase.c:168
void UpdatePhysics()

References CALL_CATEGORY_GAMEPLAY, GetGame(), UpdatePhysics(), and UpdateVisuals().

◆ EEInit() [4/5]

override void ItemBase::EEInit ( )
inlineprotected

Definition at line 61 of file PortableGasStove.c.

62 {
63 super.EEInit();
64
65 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
66 {
68 m_UTSSettings.m_ManualUpdate = true;
69 m_UTSSettings.m_TemperatureMin = 0;
70 m_UTSSettings.m_TemperatureMax = 1000;
71 m_UTSSettings.m_RangeFull = 1;
72 m_UTSSettings.m_RangeMax = 2;
73 m_UTSSettings.m_TemperatureCap = 10;
74
77 }
78 }
ref UniversalTemperatureSource m_UTSource
DEPRECATED Attached spark plug item.
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSourceLambdaConstant m_UTSLConst
original Timer deletes m_params which is unwanted

References GetGame(), m_UTSource, and m_UTSSettings.

◆ EEInit() [5/5]

override void ItemBase::EEInit ( )
inlineprotected

Definition at line 42 of file PowerGenerator.c.

43 {
44 super.EEInit();
45
46 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
47 {
49 m_UTSSettings.m_ManualUpdate = true;
50 m_UTSSettings.m_TemperatureMin = 0;
51 m_UTSSettings.m_TemperatureMax = 80;
52 m_UTSSettings.m_RangeFull = 1;
53 m_UTSSettings.m_RangeMax = 2.5;
54 m_UTSSettings.m_TemperatureCap = 8;
55
58 }
59 }
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine

References GetGame(), m_UTSLEngine, m_UTSource, and m_UTSSettings.

◆ EEItemAttached() [1/6]

override void ItemBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprivate

Definition at line 324 of file GardenBase.c.

325 {
326 super.EEItemAttached(item, slot_name);
327
328 string path = string.Format("CfgVehicles %1 Horticulture PlantType", item.GetType());
329 bool IsItemSeed = GetGame().ConfigIsExisting(path); // Is this item a seed?
330
332
333 if (IsItemSeed)
334 {
335 string converted_slot_name;
336
337 vector pos = GetPosition();
339
340 if (index < 10)
342 else
344
346 }
347 else if (g_Game.IsClient())
348 {
350 if (slot)
351 {
352 slot.SetPlant(PlantBase.Cast(item));
353 slot.m_State = Slot.STATE_PLANTED;
354 }
355 }
356 }
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
Slot GetSlotByIndex(int index)
Definition GardenBase.c:788
void PlantSeed(ItemBase seed, string selection_component)
Definition GardenBase.c:380
int GetSlotIndexByAttachmentSlot(string att_slot)
Definition GardenBase.c:669
static const string SLOT_MEMORY_POINT_PREFIX
Definition GardenBase.c:19
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.

References string::Format(), g_Game, GetGame(), GetPosition, InventorySlots::GetSlotIdFromString(), and path.

◆ EEItemAttached() [2/6]

override void ItemBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 502 of file BaseBuildingBase.c.

503 {
504 super.EEItemAttached(item, slot_name);
505
509 }
void CheckForHybridAttachments(EntityAI item, string slot_name)
void UpdateAttachmentPhysics(string slot_name, bool is_locked)

References CheckForHybridAttachments(), UpdateAttachmentPhysics(), and BaseBuildingBase::UpdateVisuals().

◆ EEItemAttached() [3/6]

override void ItemBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 81 of file PortableGasStove.c.

82 {
83 super.EEItemAttached(item, slot_name);
84
85 //cookware
86 switch (item.Type())
87 {
92 RefreshFlameVisual(m_EM.IsSwitchedOn(), true);
93 break;
94 }
95 }
void RefreshFlameVisual(bool working=false)
Definition Blowtorch.c:35

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, and SetCookingEquipment().

◆ EEItemAttached() [4/6]

override void ItemBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 192 of file PowerGenerator.c.

193 {
194 super.EEItemAttached(item, slot_name);
195 GetCompEM().InteractBranch(this);
196
198
199 if (item_IB.IsKindOf("Sparkplug") && IsInitialized())
200 {
201 ShowSelection("sparkplug_installed");
202
203#ifndef SERVER
205 sound.SetAutodestroy(true);
206#endif
207 }
208 }
override bool IsInitialized()
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
static const string SPARKPLUG_ATTACH_SOUND
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.

References GetPosition, IsInitialized(), and SEffectManager::PlaySound().

◆ EEItemAttached() [5/6]

override void ItemBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 336 of file TentBase.c.

337 {
338 super.EEItemAttached(item, slot_name);
339
340 if (item.IsKindOf("CamoNet"))
341 {
342 m_CamoNet = CamoNet.Cast(item);
344 //SetAnimationPhase("Camonet", 0);
345
346 if (!IsKindOf("MediumTent"))
347 AddProxyPhysics("camonet");
348 }
349
350 if (item.IsKindOf("XmasLights"))
351 {
352 SetAnimationPhase("Xlights", 0);
353 SetAnimationPhase("Xlights_glass_r", 0);
354 SetAnimationPhase("Xlights_glass_g", 0);
355 SetAnimationPhase("Xlights_glass_b", 0);
356 SetAnimationPhase("Xlights_glass_y", 0);
357
358 XmasLights xlights = XmasLights.Cast(item);
359 xlights.AttachToObject(this);
360 }
361 }
CamoNet m_CamoNet
Definition TentBase.c:38
void HandleCamoNetAttachment(bool hide)
Definition TentBase.c:704

References TentBase::HandleCamoNetAttachment().

◆ EEItemAttached() [6/6]

override void ItemBase::EEItemAttached ( EntityAI item,
string slot_name )
inlineprivate

Definition at line 435 of file TrapSpawnBase.c.

436 {
437 super.EEItemAttached(item, slot_name);
438
439 // In the case the trap was still deployed, enable "quick re-arm" by attaching
440 if (IsDeployed() && slot_name == "Trap_Bait")
441 SetActive();
442 }
void SetActive()

References SetActive().

◆ EEItemDetached() [1/6]

override void ItemBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprivate

Definition at line 358 of file GardenBase.c.

359 {
360 super.EEItemDetached(item, slot_name);
361
362 slot_name.ToLower();
363
364 string path = string.Format("CfgVehicles %1 Horticulture PlantType", item.GetType());
365 bool IsItemSeed = GetGame().ConfigIsExisting(path); // Is this item a seed?
366
369
370 if (slot)
371 {
372 if (IsItemSeed)
373 slot.SetSeed(NULL);
374
375 slot.SetState(Slot.STATE_DIGGED);
376 }
377 }
string ConvertAttSlotToPlantSlot(string attach_slot)
Definition GardenBase.c:312

References string::Format(), GetGame(), and path.

◆ EEItemDetached() [2/6]

override void ItemBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 511 of file BaseBuildingBase.c.

512 {
513 super.EEItemDetached(item, slot_name);
514
517 }

References UpdateAttachmentPhysics(), and BaseBuildingBase::UpdateVisuals().

◆ EEItemDetached() [3/6]

override void ItemBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 66 of file KitBase.c.

67 {
68 super.EEItemDetached(item, slot_name);
69
70 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
71 if (player && player.IsPlayerDisconnected())
72 return;
73
74 if (item && slot_name == "Rope")
75 {
76 if (GetGame().IsServer() && !m_DeployedRegularly)
77 {
79 Delete();
80 }
81 }
82 }
bool m_DeployedRegularly
Definition KitBase.c:4
void DisassembleKit(ItemBase item)
Definition KitBase.c:174

References KitBase::DisassembleKit(), and GetGame().

◆ EEItemDetached() [4/6]

override void ItemBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 97 of file PortableGasStove.c.

98 {
99 super.EEItemDetached(item, slot_name);
100
101 //cookware
102 switch (item.Type())
103 {
108 //remove cooking equipment reference
110 RefreshFlameVisual(m_EM.IsSwitchedOn(), false);
111 break;
112 }
113 }
void ClearCookingEquipment()
DEPRECATED.
void RemoveCookingAudioVisuals()

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, and ClearCookingEquipment().

◆ EEItemDetached() [5/6]

override void ItemBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 210 of file PowerGenerator.c.

211 {
212 super.EEItemDetached(item, slot_name);
213
214 GetCompEM().InteractBranch(this);
215
217
218 if (item_IB.IsKindOf("Sparkplug"))
219 {
220 HideSelection("sparkplug_installed");
221 GetCompEM().SwitchOff();
222
223#ifndef SERVER
225 sound.SetAutodestroy(true);
226#endif
227 }
228 }
static const string SPARKPLUG_DETACH_SOUND

References GetPosition, and SEffectManager::PlaySound().

◆ EEItemDetached() [6/6]

override void ItemBase::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

Definition at line 363 of file TentBase.c.

364 {
365 super.EEItemDetached(item, slot_name);
366
367 if (item.IsKindOf("CamoNet"))
368 {
369 m_CamoNet = null;
371 //SetAnimationPhase("Camonet", 1);
372
373 if (!IsKindOf("MediumTent"))
374 RemoveProxyPhysics("camonet");
375 }
376
377 if (item.IsKindOf("XmasLights"))
378 {
379 SetAnimationPhase("Xlights", 1);
380 SetAnimationPhase("Xlights_glass_r", 1);
381 SetAnimationPhase("Xlights_glass_g", 1);
382 SetAnimationPhase("Xlights_glass_b", 1);
383 SetAnimationPhase("Xlights_glass_y", 1);
384
385 XmasLights xlights = XmasLights.Cast(item);
386 xlights.DetachFromObject(this);
387 }
388 }

References TentBase::HandleCamoNetAttachment().

◆ EEItemLocationChanged() [1/3]

override void ItemBase::EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprivate

Definition at line 10 of file HandcuffsLocked.c.

11 {
12 super.EEItemLocationChanged(oldLoc, newLoc);
13
14 if (GetGame().IsServer())
15 {
16 if (oldLoc.IsValid() && oldLoc.GetParent())
17 {
18 PlayerBase old_player = PlayerBase.Cast(oldLoc.GetParent().GetHierarchyRootPlayer());
19 if (old_player && old_player.IsRestrained())
20 old_player.SetRestrained(false);
21 }
22 }
23
24 if (newLoc.IsValid())
25 {
26 if (newLoc.GetParent())
27 {
28 PlayerBase player = PlayerBase.Cast(newLoc.GetParent().GetHierarchyRootPlayer());
29
30 if (player)
31 {
32 if (newLoc.GetType() == InventoryLocationType.HANDS)
33 {
34 if (!player.IsRestrained())
35 {
36 player.SetRestrained(true);
37 player.OnItemInHandsChanged();
38 }
39
40 if (player.IsControlledPlayer())
41 player.OnRestrainStart();
42 }
43 }
44 }
45 }
46
47 if (GetGame().IsServer())
48 {
49 if (newLoc.GetType() != InventoryLocationType.HANDS)
50 {
51 if (oldLoc.GetParent())
52 {
53 PlayerBase old_p = PlayerBase.Cast(oldLoc.GetParent().GetHierarchyRootPlayer());
54 if (old_p)
55 {
56 MiscGameplayFunctions.TransformRestrainItem(this, null, old_p, old_p);
57 return;
58 }
59 }
60
61 Delete();
62 }
63 }
64 }

References GetGame().

◆ EEItemLocationChanged() [2/3]

override void ItemBase::EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprivate

Definition at line 62 of file PileOfWoodenPlanks.c.

63 {
64 super.EEItemLocationChanged(oldLoc, newLoc);
66 }
void UpdateSelections()

References UpdateSelections().

◆ EEItemLocationChanged() [3/3]

override void ItemBase::EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprivate

Definition at line 21 of file Switchable_Base.c.

22 {
23 super.EEItemLocationChanged(oldLoc, newLoc);
24
25 if (GetLight())
26 GetLight().UpdateMode();
27 }
ScriptedLightBase GetLight()

References Switchable_Base::GetLight().

◆ EEKilled()

override void ItemBase::EEKilled ( Object killer)
inlineprivate

Definition at line 66 of file HandcuffsLocked.c.

67 {
68 super.EEKilled(killer);
69
71 GetInventory().GetCurrentInventoryLocation(inventoryLocation);
72 if (!inventoryLocation || !inventoryLocation.IsValid())
73 return;
74
75 if (inventoryLocation.GetType() == InventoryLocationType.HANDS)
76 {
78 if (player && player.IsRestrained())
79 {
80 player.SetRestrained(false);
81 MiscGameplayFunctions.TransformRestrainItem(this, null, player, player);
82 }
83 }
84 }

◆ EEOnAfterLoad() [1/2]

override void ItemBase::EEOnAfterLoad ( )
inlineprivate

Definition at line 182 of file GardenBase.c.

183 {
184 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(SyncSlots, 500, false, this);
185 super.EEOnAfterLoad();
186 }
void SyncSlots()
Definition GardenBase.c:188

References CALL_CATEGORY_GAMEPLAY, GetGame(), and SyncSlots().

◆ EEOnAfterLoad() [2/2]

override void ItemBase::EEOnAfterLoad ( )
inlineprotected

Definition at line 481 of file BaseBuildingBase.c.

482 {
484 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(SetPartsAfterStoreLoad, 500, false, this);
485
486 super.EEOnAfterLoad();
487 }

References CALL_CATEGORY_GAMEPLAY, GetGame(), m_FixDamageSystemInit, and SetPartsAfterStoreLoad().

◆ EOnInit() [1/3]

override void ItemBase::EOnInit ( IEntity other,
int extra )
inlineprivate

Definition at line 93 of file GardenBase.c.

94 {
97 }
void CheckRainTick()
Definition GardenBase.c:740
void UpdateTexturesOnAllSlots()
Definition GardenBase.c:133

◆ EOnInit() [2/3]

override void ItemBase::EOnInit ( IEntity other,
int extra )
inlineprotected

Definition at line 61 of file PowerGenerator.c.

62 {
63 if (GetGame().IsServer())
64 {
65 m_FuelPercentage = GetCompEM().GetEnergy0To100();
66 SetSynchDirty();
67 }
68
70 }
void UpdateFuelMeter()
int m_FuelPercentage

References GetGame(), and UpdateFuelMeter().

◆ EOnInit() [3/3]

override void ItemBase::EOnInit ( IEntity other,
int extra )
inlineprotected

Definition at line 78 of file Spotlight.c.

79 {
80 if (!IsHologram())
81 {
83 HideSelection(SEL_CORD_FOLDED_F);
84 }
85 else
86 Unfold();
87 }
void Unfold()
Definition Spotlight.c:260
static const string SEL_CORD_FOLDED_F
Definition Spotlight.c:15
void UpdateAllSelections()
Definition MetalWire.c:30

References IsHologram(), Unfold(), and UpdateAllSelections().

◆ Fertilize()

void ItemBase::Fertilize ( PlayerBase player,
ItemBase item,
float consumed_quantity,
string selection_component )
inlineprivate

Definition at line 426 of file GardenBase.c.

427 {
429
430 if (slot != NULL)
431 {
432 string item_type = item.GetType();
433
434 if (slot.GetFertilityType() == "" || slot.GetFertilityType() == item_type)
435 {
436 slot.SetFertilityType(item_type);
437
438 float add_energy_to_slot = GetGame().ConfigGetFloat(string.Format("cfgVehicles %1 Horticulture AddEnergyToSlot", item_type));
439 slot.m_FertilizerUsage = GetGame().ConfigGetFloat(string.Format("cfgVehicles %1 Horticulture ConsumedQuantity", item_type));
440
441 float coef = Math.Clamp(consumed_quantity / slot.m_FertilizerUsage, 0.0, 1.0);
443
444 slot.m_FertilizerQuantity += consumed_quantity;
445 slot.m_Fertility += add_energy_to_slot;
446
447 if (slot.GetFertilizerQuantity() >= slot.GetFertilizerQuantityMax())
448 {
449 int slot_index = slot.GetSlotIndex();
450
451 if (slot_index > -1)
452 {
454 slot.SetFertilityState(eFertlityState.FERTILIZED);
455 // Set relevant bit
456 m_SlotFertilityState |= slot.GetFertilityState() << slot.GetSlotIndex();
457
458 //TODO Boris: Add soft skill 2.0
459 //PluginExperience module_exp = GetPlugin(PluginExperience);
460 //slot.m_HarvestingEfficiency = module_exp.GetExpParamNumber(player, PluginExperience.EXP_FARMER_FERTILIZATION, "efficiency");
461 }
462 }
463 }
464 else
465 {
466 slot.SetFertilizerQuantity(0);
467 slot.SetFertilityType("");
468 slot.SetFertilityState(eFertlityState.NONE);
469 }
470 SetSynchDirty();
471 }
472 }
eFertlityState
Definition Slot.c:2
int m_SlotFertilityState
Definition GardenBase.c:26
void UpdateSlotTexture(int slot_index)
Definition GardenBase.c:509
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'.

References Math::Clamp(), and GetGame().

◆ Flag_Base()

void ItemBase::Flag_Base ( )
inlineprivate

Definition at line 3 of file Flag_Base.c.

4 {
5 //synchronized variables
6 //RegisterNetSyncVariableBool( "m_IsMounted" );
7 ShowSelection("folded");
8 HideSelection("unfolded");
9 }

◆ Fold() [1/2]

void ItemBase::Fold ( )
inlineprivate

Definition at line 214 of file TrapSpawnBase.c.

215 {
216 if (GetGame().IsServer() && m_IsFoldable == true)
217 SetInactive();
218 }
void SetInactive()
bool m_IsFoldable

References GetGame(), and SetInactive().

Referenced by OnInitEnergy(), OnIsUnplugged(), OnItemLocationChanged(), OnPlacementCancelled(), and OnStoreLoad().

◆ Fold() [2/2]

void ItemBase::Fold ( bool keep_connected = false)
inlineprotected

Definition at line 247 of file Spotlight.c.

248 {
249 m_IsFolded = true;
250 if (!keep_connected)
251 {
252 GetCompEM().SwitchOff();
253 GetCompEM().UnplugThis();
254 }
255
257 SetSynchDirty();
258 }
bool m_IsFolded
Definition Spotlight.c:3

References UpdateAllSelections().

◆ FoldBaseBuildingObject()

ItemBase ItemBase::FoldBaseBuildingObject ( )
inlineprotected

Definition at line 951 of file BaseBuildingBase.c.

952 {
955
956 return item;
957 }
void DestroyConstruction()
ItemBase CreateConstructionKit()

References CreateConstructionKit(), and DestroyConstruction().

◆ ForceIntoHandsNow()

void ItemBase::ForceIntoHandsNow ( PlayerBase player)
inlineprivate

Definition at line 20 of file CableReel.c.

21 {
22 m_ForceIntoHands = true;
23 player.LocalTakeEntityToHands(this); // Local, because ForceIntoHandsNow is executed on both, Client and Server
24 m_ForceIntoHands = false;
25 }

◆ FullyBuild()

void ItemBase::FullyBuild ( )
inlineprotected

Definition at line 1136 of file BaseBuildingBase.c.

1137 {
1139 array<ConstructionPart> parts = GetConstruction().GetConstructionParts().GetValueArray();
1140
1141 Man p;
1142
1143#ifdef SERVER
1145 GetGame().GetWorld().GetPlayerList(players);
1146 if (players.Count())
1147 p = players[0];
1148#else
1149 p = GetGame().GetPlayer();
1150#endif
1151
1152 foreach (ConstructionPart part : parts)
1153 {
1154 bool excluded = false;
1155 string partName = part.GetPartName();
1156 if (excludes)
1157 {
1158 foreach (string exclude : excludes)
1159 {
1160 if (partName.Contains(exclude))
1161 {
1162 excluded = true;
1163 break;
1164 }
1165 }
1166 }
1167
1168 if (!excluded)
1170 }
1171
1172 GetConstruction().UpdateVisuals();
1173 }
const int AT_BUILD_PART
Definition _constants.c:6
void OnPartBuiltServer(notnull Man player, string part_name, int action_id)
array< string > OnDebugSpawnBuildExcludes()
Excludes certain parts from being built by OnDebugSpawn, uses Contains to compare.

References AT_BUILD_PART, GetConstruction(), GetGame(), BaseBuildingBase::OnDebugSpawnBuildExcludes(), and BaseBuildingBase::OnPartBuiltServer().

◆ GardenBase()

void ItemBase::GardenBase ( )
inlineprivate

Definition at line 34 of file GardenBase.c.

35 {
36 RegisterNetSyncVariableInt("m_SlotFertilityState");
37 RegisterNetSyncVariableInt("m_SlotWateredState");
38
40
41 SetEventMask(EntityEvent.INIT); // Enable EOnInit event
42
43 // Prepare m_map_slots
44 for (int i = 1; i <= GetGardenSlotsCount() ; ++i)
45 {
46 // m_map_slots is supposed to be: <input, output>
47 string input = SLOT_SEEDBASE_PREFIX + i.ToString();
49
50 if (i < 10)
51 output = output + "0"; // Example: '1' changes to '01'
52
53 output = output + i.ToString();
54
56 }
57
58 if (GetGame().IsServer())
60
62
64 }
void InitializeSlots()
Definition GardenBase.c:99
void CheckRainStart()
Definition GardenBase.c:732
static const string SLOT_SEEDBASE_PREFIX
Definition GardenBase.c:20
void SetMaxWaterStateVal()
Definition GardenBase.c:118
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:44

References GetGame(), and GardenBase::GetGardenSlotsCount().

◆ GetAttachmentSlots()

void ItemBase::GetAttachmentSlots ( EntityAI entity,
out array< string > attachment_slots )
inlineprotected

Definition at line 827 of file BaseBuildingBase.c.

828 {
829 string config_path = "CfgVehicles" + " " + entity.GetType() + " " + "attachments";
830 if (GetGame().ConfigIsExisting(config_path))
831 GetGame().ConfigGetTextArray(config_path, attachment_slots);
832 }

References GetGame().

◆ GetBandagingEffectivity() [1/2]

override float ItemBase::GetBandagingEffectivity ( )
inlineprivate

Definition at line 49 of file BandageDressing.c.

50 {
51 return 2.0;
52 };

Referenced by ActionBandageSelfCB::CreateActionComponent(), and ActionBandageTargetCB::CreateActionComponent().

◆ GetBandagingEffectivity() [2/2]

override float ItemBase::GetBandagingEffectivity ( )
inlineprivate

Definition at line 98 of file Rag.c.

99 {
100 return 0.5;
101 }

◆ GetBaseFertility()

float ItemBase::GetBaseFertility ( )
inlineprivate

Definition at line 88 of file GardenBase.c.

89 {
90 return m_DefaultFertility;
91 }
float m_DefaultFertility
Definition GardenBase.c:29

◆ GetBloodTypeVisible()

bool ItemBase::GetBloodTypeVisible ( )
inlineprivate

Definition at line 21 of file BloodContainerBase.c.

22 {
24 }
bool m_IsBloodTypeVisible

◆ GetBuildSoundByMaterial()

string ItemBase::GetBuildSoundByMaterial ( string part_name)
inlineprotected

Definition at line 1059 of file BaseBuildingBase.c.

1060 {
1062
1063 switch (material_type)
1064 {
1065 case ConstructionMaterialType.MATERIAL_LOG: return SOUND_BUILD_WOOD_LOG;
1066 case ConstructionMaterialType.MATERIAL_WOOD: return SOUND_BUILD_WOOD_PLANK;
1067 case ConstructionMaterialType.MATERIAL_STAIRS: return SOUND_BUILD_WOOD_STAIRS;
1068 case ConstructionMaterialType.MATERIAL_METAL: return SOUND_BUILD_METAL;
1069 case ConstructionMaterialType.MATERIAL_WIRE: return SOUND_BUILD_WIRE;
1070 }
1071
1072 return "";
1073 }
ConstructionMaterialType
Definition Construction.c:2
const string SOUND_BUILD_WOOD_PLANK
const string SOUND_BUILD_WOOD_STAIRS
const string SOUND_BUILD_WIRE
const string SOUND_BUILD_METAL
const string SOUND_BUILD_WOOD_LOG

References GetConstruction(), SOUND_BUILD_METAL, SOUND_BUILD_WIRE, SOUND_BUILD_WOOD_LOG, SOUND_BUILD_WOOD_PLANK, and SOUND_BUILD_WOOD_STAIRS.

◆ GetClutterCutter()

string ItemBase::GetClutterCutter ( )
inlineprotected

Definition at line 753 of file TentBase.c.

753{};

◆ GetConstruction()

Construction ItemBase::GetConstruction ( )
inlineprotected

Definition at line 858 of file BaseBuildingBase.c.

859 {
860 return m_Construction;
861 }

References m_Construction.

◆ GetConstructionKitType()

string ItemBase::GetConstructionKitType ( )
inlineprotected

Definition at line 361 of file BaseBuildingBase.c.

362 {
363 return "";
364 }

◆ GetConstructionPartById()

ConstructionPart ItemBase::GetConstructionPartById ( int id)
inlineprotected

Definition at line 300 of file BaseBuildingBase.c.

301 {
304
305 for (int i = 0; i < construction_parts.Count(); ++i)
306 {
307 string key = construction_parts.GetKey(i);
309
310 if (value.GetId() == id)
311 return value;
312 }
313
314 return NULL;
315 }

References Construction(), and GetConstruction().

◆ GetCookingEquipment()

ItemBase ItemBase::GetCookingEquipment ( )
inlineprotected

Definition at line 36 of file PortableGasStove.c.

37 {
38 return m_CookingEquipment;
39 }
ItemBase m_CookingEquipment

References m_CookingEquipment.

◆ GetCropsType()

string ItemBase::GetCropsType ( )
inlineprivate

Definition at line 169 of file PlantBase.c.

170 {
171 return m_CropsType;
172 }
string m_CropsType
Definition PlantBase.c:16

◆ GetDamageSystemVersionChange() [1/2]

override int ItemBase::GetDamageSystemVersionChange ( )
inlineprotected

Definition at line 1102 of file BaseBuildingBase.c.

1103 {
1104 return 111;
1105 }

Referenced by InventoryItem::OnStoreLoad().

◆ GetDamageSystemVersionChange() [2/2]

override int ItemBase::GetDamageSystemVersionChange ( )
inlineprotected

Definition at line 878 of file TentBase.c.

879 {
880 return 110;
881 }

◆ GetDeployFinishSoundset()

override string ItemBase::GetDeployFinishSoundset ( )
inlineprotected

Definition at line 125 of file KitBase.c.

126 {
127 return "";
128 }

Referenced by InventoryItem::PlayDeployFinishSound().

◆ GetDeploySoundset() [1/3]

override string ItemBase::GetDeploySoundset ( )
inlineprotected

Definition at line 423 of file BarbedWire.c.

424 {
425 return "placeBarbedWire_SoundSet";
426 }

Referenced by InventoryItem::PlayDeploySound().

◆ GetDeploySoundset() [2/3]

override string ItemBase::GetDeploySoundset ( )
inlineprotected

Definition at line 114 of file KitBase.c.

115 {
116 return "putDown_FenceKit_SoundSet";
117 }

◆ GetDeploySoundset() [3/3]

override string ItemBase::GetDeploySoundset ( )
inlineprotected

Definition at line 372 of file Spotlight.c.

373 {
374 return "placeSpotlight_SoundSet";
375 }

◆ GetDisarmRate()

int ItemBase::GetDisarmRate ( )
inlineprotected

Definition at line 11 of file ToolBase.c.

12 {
13 return m_MineDisarmRate;
14 }
int m_MineDisarmRate
Definition ToolBase.c:4

◆ GetDismantleSoundByMaterial()

string ItemBase::GetDismantleSoundByMaterial ( string part_name)
inlineprotected

Definition at line 1075 of file BaseBuildingBase.c.

1076 {
1078
1079 switch (material_type)
1080 {
1081 case ConstructionMaterialType.MATERIAL_LOG: return SOUND_DISMANTLE_WOOD_LOG;
1082 case ConstructionMaterialType.MATERIAL_WOOD: return SOUND_DISMANTLE_WOOD_PLANK;
1083 case ConstructionMaterialType.MATERIAL_STAIRS: return SOUND_DISMANTLE_WOOD_STAIRS;
1084 case ConstructionMaterialType.MATERIAL_METAL: return SOUND_DISMANTLE_METAL;
1085 case ConstructionMaterialType.MATERIAL_WIRE: return SOUND_DISMANTLE_WIRE;
1086 }
1087
1088 return "";
1089 }
const string SOUND_DISMANTLE_METAL
const string SOUND_DISMANTLE_WOOD_LOG
const string SOUND_DISMANTLE_WOOD_STAIRS
const string SOUND_DISMANTLE_WIRE
const string SOUND_DISMANTLE_WOOD_PLANK

References GetConstruction(), SOUND_DISMANTLE_METAL, SOUND_DISMANTLE_WIRE, SOUND_DISMANTLE_WOOD_LOG, SOUND_DISMANTLE_WOOD_PLANK, and SOUND_DISMANTLE_WOOD_STAIRS.

◆ GetEnergyNeededToCharge()

float ItemBase::GetEnergyNeededToCharge ( )
inlineprivate

Definition at line 35 of file Defibrillator.c.

36 {
37 string cfg_path = "CfgVehicles " + GetType() + " ";
38 return GetGame().ConfigGetFloat(cfg_path + "defibEnergyNeededPerCharge");
39 }

References GetGame(), and GetType().

Referenced by Defibrillator().

◆ GetFuel()

float ItemBase::GetFuel ( )
inlineprotected

Definition at line 296 of file PowerGenerator.c.

297 {
298 return GetCompEM().GetEnergy() / m_FuelToEnergyRatio;
299 }
static float m_FuelToEnergyRatio

References m_FuelToEnergyRatio.

Referenced by AddFuel().

◆ GetGarden()

GardenBase ItemBase::GetGarden ( )
inlineprivate

Definition at line 794 of file PlantBase.c.

795 {
796 return m_GardenBase;
797 }
GardenBase m_GardenBase
Definition PlantBase.c:39

◆ GetGardenSlotsCount()

int ItemBase::GetGardenSlotsCount ( )
inlineprivate

Definition at line 296 of file GardenBase.c.

297 {
298 return 0;
299 }

◆ GetGasCanister()

EntityAI ItemBase::GetGasCanister ( )
inlineprotected

Definition at line 106 of file Blowtorch.c.

107 {
108 if (GetInventory().AttachmentCount() != 0)
109 return GetInventory().GetAttachmentFromIndex(0);
110
111 return null;
112 }

◆ GetHideIconMask() [1/2]

override int ItemBase::GetHideIconMask ( )
inlineprivate

Definition at line 78 of file GardenBase.c.

79 {
80 return EInventoryIconVisibility.HIDE_VICINITY;
81 }

◆ GetHideIconMask() [2/2]

override int ItemBase::GetHideIconMask ( )
inlineprotected

Definition at line 87 of file BaseBuildingBase.c.

88 {
89 return EInventoryIconVisibility.HIDE_VICINITY;
90 }

◆ GetInfectionChance() [1/2]

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

Definition at line 59 of file BandageDressing.c.

60 {
61 if (m_Cleanness == 1)
62 return 0;
63 else
64 return 0.05;
65 }
int m_Cleanness
Definition ItemBase.c:4715

References m_Cleanness.

Referenced by BleedingSourcesManagerBase::RemoveBleedingSource().

◆ GetInfectionChance() [2/2]

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

Definition at line 103 of file Rag.c.

104 {
105 if (m_Cleanness == 1)
106 return 0;
107
108 return 0.15;
109 }

References m_Cleanness.

◆ GetInvulnerabilityTypeString() [1/2]

override string ItemBase::GetInvulnerabilityTypeString ( )
inlineprotected

Definition at line 77 of file BaseBuildingBase.c.

78 {
79 return "disableBaseDamage";
80 }

◆ GetInvulnerabilityTypeString() [2/2]

override string ItemBase::GetInvulnerabilityTypeString ( )
inlineprotected

Definition at line 68 of file TentBase.c.

69 {
70 return "disableContainerDamage";
71 }

◆ GetItemVisibility()

float ItemBase::GetItemVisibility ( )
inlineprivate

Definition at line 803 of file InventoryItem.c.

804 {
806 }

◆ GetKitSpawnPosition()

vector ItemBase::GetKitSpawnPosition ( )
inlineprotected

Definition at line 356 of file BaseBuildingBase.c.

357 {
358 return GetPosition();
359 }

References GetPosition.

◆ GetLiquidThroughputCoef()

override float ItemBase::GetLiquidThroughputCoef ( )
inlineprotected

◆ GetLoopDeploySoundset() [1/3]

override string ItemBase::GetLoopDeploySoundset ( )
inlineprotected

Definition at line 428 of file BarbedWire.c.

429 {
430 return "barbedwire_deploy_SoundSet";
431 }

Referenced by PlayDeployLoopSound(), and InventoryItem::PlayDeployLoopSoundEx().

◆ GetLoopDeploySoundset() [2/3]

override string ItemBase::GetLoopDeploySoundset ( )
inlineprotected

Definition at line 119 of file KitBase.c.

120 {
121 //return "BarbedWire_Deploy_loop_SoundSet";
122 return "Shelter_Site_Build_Loop_SoundSet";
123 }

◆ GetLoopDeploySoundset() [3/3]

override string ItemBase::GetLoopDeploySoundset ( )
inlineprotected

Definition at line 377 of file Spotlight.c.

378 {
379 return "spotlight_deploy_SoundSet";
380 }

◆ GetMaxFuel()

float ItemBase::GetMaxFuel ( )
inlineprotected

Definition at line 302 of file PowerGenerator.c.

303 {
304 return m_FuelTankCapacity;
305 }
static float m_FuelTankCapacity

References m_FuelTankCapacity.

Referenced by AddFuel(), and OnDebugSpawn().

◆ GetMaxWaterStateVal()

int ItemBase::GetMaxWaterStateVal ( )
inlineprivate

Definition at line 128 of file GardenBase.c.

129 {
131 }
int m_MaxWateredStateVal
Definition GardenBase.c:28

◆ GetMeleeTargetType()

override int ItemBase::GetMeleeTargetType ( )
inlineprotected

Definition at line 94 of file TentBase.c.

95 {
96 return EMeleeTargetType.NONALIGNABLE;
97 }
EMeleeTargetType

◆ GetNearestSlotIDByState()

int ItemBase::GetNearestSlotIDByState ( vector position,
int slot_state )
inlineprivate

Definition at line 699 of file GardenBase.c.

700 {
701 float nearest_distance = 1000.0;
702 int nearest_slot_index = -1;
704 for (int i = 0; i < slots_count; i++)
705 {
706 Slot slot = m_Slots.Get(i); // Move this line by a scope higher in this function after debugging
707
710
712 {
713 if (slot != NULL && slot.m_State == slot_state)
714 {
717 }
718 }
719 }
720
721 return nearest_slot_index;
722 }
vector GetSlotPosition(int index)
Definition GardenBase.c:724
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.

References vector::Distance(), and GardenBase::GetGardenSlotsCount().

◆ GetPlaceSoundset() [1/4]

override string ItemBase::GetPlaceSoundset ( )
inlineprotected

Definition at line 421 of file BatteryCharger.c.

422 {
423 return "placeBatteryCharger_SoundSet";
424 }

Referenced by InventoryItem::PlayPlaceSound().

◆ GetPlaceSoundset() [2/4]

override string ItemBase::GetPlaceSoundset ( )
inlineprivate

Definition at line 113 of file CableReel.c.

114 {
115 return "placeCableReel_SoundSet";
116 }

◆ GetPlaceSoundset() [3/4]

override string ItemBase::GetPlaceSoundset ( )
inlineprotected

Definition at line 337 of file PowerGenerator.c.

338 {
339 return "placePowerGenerator_SoundSet";
340 }

◆ GetPlaceSoundset() [4/4]

override string ItemBase::GetPlaceSoundset ( )
inlineprivate

Definition at line 66 of file Refridgerator.c.

67 {
68 return "placeRefridgerator_SoundSet";
69 }

◆ GetPlantState()

int ItemBase::GetPlantState ( )
inlineprivate

Definition at line 713 of file PlantBase.c.

714 {
715 return m_PlantState;
716 }
int m_PlantState
Definition PlantBase.c:19

◆ GetPlantStateIndex()

int ItemBase::GetPlantStateIndex ( )
inlineprivate

Definition at line 718 of file PlantBase.c.

719 {
720 return m_PlantStateIndex;
721 }
int m_PlantStateIndex
Definition PlantBase.c:20

◆ GetSlot()

Slot ItemBase::GetSlot ( )
inlineprivate

Definition at line 789 of file PlantBase.c.

790 {
791 return m_Slot;
792 }
ref Slot m_Slot
Definition PlantBase.c:40

◆ GetSlotByIndex()

Slot ItemBase::GetSlotByIndex ( int index)
inlineprivate

Definition at line 788 of file GardenBase.c.

789 {
790 return m_Slots.Get(index);
791 }

◆ GetSlotBySelection()

Slot ItemBase::GetSlotBySelection ( string selection_component)
inlineprivate

Definition at line 626 of file GardenBase.c.

627 {
629
630 if (slot_index > -1)
631 return m_Slots.Get(slot_index);
632 else
633 return NULL;
634 }
int GetSlotIndexBySelection(string selection_component)
Definition GardenBase.c:637

◆ GetSlotIndexByAttachmentSlot()

int ItemBase::GetSlotIndexByAttachmentSlot ( string att_slot)
inlineprivate

Definition at line 669 of file GardenBase.c.

670 {
671 int slot_index = -1;
672
673 int start = "SeedBase_".Length();
674 int end = att_slot.Length();//start + 2;
675 int len = end - start;
676
677 string num_str = att_slot.Substring(start, len);
678 slot_index = num_str.ToInt();
679
680 return slot_index;
681 }

◆ GetSlotIndexByPlant()

int ItemBase::GetSlotIndexByPlant ( Object plant)
inlineprivate

Definition at line 683 of file GardenBase.c.

684 {
685 if (m_Slots != NULL)
686 {
687 for (int i = 0; i < m_Slots.Count(); i++)
688 {
689 PlantBase found_plant = m_Slots.Get(i).GetPlant();
690
691 if (found_plant == plant)
692 return i;
693 }
694 }
695
696 return -1;
697 }

◆ GetSlotIndexBySelection()

int ItemBase::GetSlotIndexBySelection ( string selection_component)
inlineprivate

Definition at line 637 of file GardenBase.c.

638 {
639 int slot_index = -1;
640
641 if (m_Slots != NULL)
642 {
645
647
648 if (start > -1)
649 {
651 int end = start + 2;
652 int length = selection_component.Length();
653
654 if (length >= end)
655 {
656 int length_add = length - end; // Hack-fix for inconsistent component names in p3d
657 int length_from_end = 2 + length_add;
659 slot_index = num_str.ToInt();
660
662 }
663 }
664 }
665
666 return slot_index;
667 }

References string::Length().

◆ GetSlotLockedState()

bool ItemBase::GetSlotLockedState ( )
inlineprotected

Definition at line 61 of file BarbedWire.c.

62 {
63 BaseBuildingBase base_building = BaseBuildingBase.Cast(GetHierarchyParent());
64 if (base_building)
65 {
67 GetInventory().GetCurrentInventoryLocation(inventory_location);
68 return base_building.GetInventory().GetSlotLock(inventory_location.GetSlot());
69 }
70
71 return false;
72 }

Referenced by AfterStoreLoad(), and IsMounted().

◆ GetSlotPosition()

vector ItemBase::GetSlotPosition ( int index)
inlineprivate

Definition at line 724 of file GardenBase.c.

725 {
727 vector pos = this.GetSelectionPositionMS(memory_point);
728
729 return this.ModelToWorld(pos);
730 }
string ToStringLen(int len)
Integer to string with fixed length, padded with zeroes.
Definition EnConvert.c:59

References ToStringLen().

◆ GetSlots()

array< ref Slot > ItemBase::GetSlots ( )
inlineprivate

Definition at line 783 of file GardenBase.c.

784 {
785 return m_Slots;
786 }

◆ GetSlotWateredState()

int ItemBase::GetSlotWateredState ( )
inlineprivate

Definition at line 793 of file GardenBase.c.

794 {
795 return m_SlotWateredState;
796 }
int m_SlotWateredState
Definition GardenBase.c:27

◆ GetSoundClose()

string ItemBase::GetSoundClose ( )
inlineprotected

Definition at line 715 of file TentBase.c.

715{};

◆ GetSoundCloseWindow()

string ItemBase::GetSoundCloseWindow ( )
inlineprotected

Definition at line 719 of file TentBase.c.

719{};

◆ GetSoundOpen()

string ItemBase::GetSoundOpen ( )
inlineprotected

Definition at line 713 of file TentBase.c.

713{};

◆ GetSoundOpenWindow()

string ItemBase::GetSoundOpenWindow ( )
inlineprotected

Definition at line 717 of file TentBase.c.

717{};

◆ GetSprayQuantity()

float ItemBase::GetSprayQuantity ( )
inlineprivate

Definition at line 757 of file PlantBase.c.

758 {
759 return m_SprayQuantity;
760 }
float m_SprayQuantity
Definition PlantBase.c:24

◆ GetSprayUsage()

float ItemBase::GetSprayUsage ( )
inlineprivate

Definition at line 762 of file PlantBase.c.

763 {
764 return m_SprayUsage;
765 }
float m_SprayUsage
Definition PlantBase.c:9

◆ GetStashedItem()

ItemBase ItemBase::GetStashedItem ( )
inlineprivate

Definition at line 13 of file UndergroundStash.c.

14 {
16 if (GetInventory().GetCargo().GetItemCount() > 0)
17 item = ItemBase.Cast(GetInventory().GetCargo().GetItem(0));
18
19 return item;
20 }
EntityAI GetItem()

References GetItem().

◆ GetState()

int ItemBase::GetState ( )
inlineprotected

Definition at line 424 of file TentBase.c.

425 {
426 return m_State;
427 }
int m_State
Definition TentBase.c:24

References m_State.

◆ GetStateLocal()

int ItemBase::GetStateLocal ( )
inlineprotected

Definition at line 429 of file TentBase.c.

430 {
431 return m_StateLocal;
432 }
int m_StateLocal
Definition TentBase.c:25

◆ GetTemperatureValue()

◆ GetTimeNeededToCharge()

float ItemBase::GetTimeNeededToCharge ( )
inlineprivate

Definition at line 29 of file Defibrillator.c.

30 {
31 string cfg_path = "CfgVehicles " + GetType() + " ";
32 return GetGame().ConfigGetFloat(cfg_path + "defibChargeTime");
33 }

References GetGame(), and GetType().

◆ GetViewIndex() [1/3]

override int ItemBase::GetViewIndex ( )
inlineprivate

Definition at line 88 of file Flag_Base.c.

89 {
90 if (MemoryPointExists("invView2"))
91 {
93 GetInventory().GetCurrentInventoryLocation(il);
94 InventoryLocationType type = il.GetType();
95 switch (type)
96 {
97 case InventoryLocationType.ATTACHMENT:
98 {
99 return 1;
100 }
101 default:
102 {
103 return 0;
104 }
105 }
106 }
107 return 0;
108 }

◆ GetViewIndex() [2/3]

override int ItemBase::GetViewIndex ( )
inlineprotected

Definition at line 400 of file Spotlight.c.

401 {
402 if (MemoryPointExists("invView2") && !m_IsFolded)
403 return 1;
404
405 return 0;
406 }

◆ GetViewIndex() [3/3]

override int ItemBase::GetViewIndex ( )
inlineprotected

Definition at line 390 of file TentBase.c.

391 {
392 if (MemoryPointExists("invView2"))
393 {
395 GetInventory().GetCurrentInventoryLocation(il);
396 InventoryLocationType type = il.GetType();
397
398 if (GetState() == PACKED)
399 {
400 switch (type)
401 {
402 case InventoryLocationType.ATTACHMENT:
403 return 1;
404 default:
405 return 0;
406 }
407 }
408 else
409 {
410 switch (type)
411 {
412 case InventoryLocationType.ATTACHMENT:
413 case InventoryLocationType.GROUND:
414 return 1;
415 default:
416 return 0;
417 }
418 }
419 }
420
421 return 0;
422 }

References GetState().

◆ GetVoiceEffect()

int ItemBase::GetVoiceEffect ( )
inlineprivate

The voice effect this item uses, default is 0 (none)

Definition at line 910 of file InventoryItem.c.

911 {
912 return 0;
913 }

◆ GetWater()

float ItemBase::GetWater ( )
inlineprivate

Definition at line 723 of file PlantBase.c.

724 {
725 if (GetSlot())
726 return GetSlot().GetWater();
727
728 return 0;
729 }
Slot GetSlot()
Definition PlantBase.c:789

◆ GetWaterMax()

float ItemBase::GetWaterMax ( )
inlineprivate

Definition at line 731 of file PlantBase.c.

732 {
733 if (GetSlot())
734 return GetSlot().GetWaterUsage();
735
736 return 0;
737 }

◆ GetWrittenNoteData()

override WrittenNoteData ItemBase::GetWrittenNoteData ( )
inlineprotected

Definition at line 30 of file Paper.c.

31 {
32 return m_NoteContents;
33 }
ref WrittenNoteData m_NoteContents
Definition Paper.c:3

Referenced by InventoryItem::OnRPC(), ActionWritePaper::OnStartClient(), and ActionWritePaper::OnStartServer().

◆ GreenLightOff()

void ItemBase::GreenLightOff ( )
inlineprotected

Definition at line 310 of file BatteryCharger.c.

311 {
312 SetObjectMaterial(2, DEFAULT_MATERIAL);
313 }
const string DEFAULT_MATERIAL

Referenced by UpdateStatusLights().

◆ GreenLightOn()

void ItemBase::GreenLightOn ( )
inlineprotected

Definition at line 293 of file BatteryCharger.c.

294 {
295 SetObjectMaterial(2, GREEN_LIGHT_GLOW);
296 }
const string GREEN_LIGHT_GLOW

Referenced by UpdateStatusLights().

◆ GrowthTimerTick()

void ItemBase::GrowthTimerTick ( )
inlineprivate

Definition at line 489 of file PlantBase.c.

490 {
491 if (IsGrowing())
492 {
494 {
496 UpdatePlant();
497 SetSynchDirty();
498
499 if (m_PlantStateIndex == 0)
500 {
503
506
507 if (GetGame().IsServer())
508 {
511
512 m_InfestationTimer.Run(Math.RandomInt(int_infestation_time_min, int_infestation_time_max), this, "InfestationTimerTick", NULL, false);
513 }
514 }
515
517 {
518 if (m_IsInfested)
519 SetSpoiled();
520 else
522 }
523 }
524 }
525 else if (IsMature())
526 {
527 if (GetGame().IsServer())
528 {
531
532 if (!m_SpoilAfterFullMaturityTimer.IsRunning())
533 m_SpoilAfterFullMaturityTimer.Run(m_SpoilAfterFullMaturityTime, this, "SetSpoiled", NULL, false);
534 }
535 }
536 }
Param3 int
void UpdatePlant()
Definition PlantBase.c:456
void SetSpoiled()
Definition PlantBase.c:562
ref Timer m_SpoilAfterFullMaturityTimer
Definition PlantBase.c:35
int m_SpoilAfterFullMaturityTime
Definition PlantBase.c:30
bool IsGrowing()
Definition PlantBase.c:807
int m_GrowthStagesCount
Definition PlantBase.c:13
static const int STATE_MATURE
Definition PlantBase.c:6
int m_FullMaturityTime
Definition PlantBase.c:29
ref Timer m_InfestationTimer
Definition PlantBase.c:34
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

References CALL_CATEGORY_SYSTEM, GetGame(), and Math::RandomInt().

◆ HandleCamoNetAttachment()

void ItemBase::HandleCamoNetAttachment ( bool hide)
inlineprotected

Definition at line 704 of file TentBase.c.

705 {
706 SetAnimationPhase("CamoNet", hide);
707 }

◆ HandleOpeningsPhysics()

void ItemBase::HandleOpeningsPhysics ( )
inlineprotected

Definition at line 846 of file TentBase.c.

847 {
848 bool is_closed;
849 bool is_ruined;
850 int hplevel;
851 string zone;
852 string component;
854
855 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
856 {
857 toggle = m_ToggleAnimations.GetKey(i);
858 is_closed = m_OpeningMask & toggle.GetOpeningBit();
859 component = toggle.GetToggleOff(); //either one works
860 component.ToLower();
861 DamageSystem.GetDamageZoneFromComponentName(this, component, zone);
862 is_ruined = (GetHealthLevel(zone) == GameConstants.STATE_RUINED);
863
864 //re-adding physics to avoid proxy physics stacking
865 RemoveProxyPhysics(toggle.GetToggleOff());
866 RemoveProxyPhysics(toggle.GetToggleOn());
867
868 if (!is_ruined && GetState() == PITCHED)
869 {
870 if (is_closed)
871 AddProxyPhysics(toggle.GetToggleOn());
872 else
873 AddProxyPhysics(toggle.GetToggleOff());
874 }
875 }
876 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
int m_OpeningMask
Definition TentBase.c:30

References component, GetState(), and GameConstants::STATE_RUINED.

◆ HandleOpeningsVisuals()

void ItemBase::HandleOpeningsVisuals ( )
inlineprotected

Definition at line 813 of file TentBase.c.

814 {
815 bool is_closed;
816 bool is_ruined;
817 string zone;
818 string component;
820
821 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
822 {
823 toggle = m_ToggleAnimations.GetKey(i);
824 is_closed = m_OpeningMask & toggle.GetOpeningBit();
825 component = toggle.GetToggleOff(); //either one works
826 component.ToLower();
827 DamageSystem.GetDamageZoneFromComponentName(this, component, zone);
828 //is_ruined = (GetHealthLevel(zone) == GameConstants.STATE_RUINED);
829
830 if (is_closed)
831 {
832 SetAnimationPhase(toggle.GetToggleOff(), 1);
833 SetAnimationPhase(toggle.GetToggleOn(), is_ruined);
834 m_ToggleAnimations.Set(toggle, false);
835 }
836 else
837 {
838 SetAnimationPhase(toggle.GetToggleOn(), 1);
839 SetAnimationPhase(toggle.GetToggleOff(), is_ruined);
840 m_ToggleAnimations.Set(toggle, true);
841 }
842 //AnimateCamonetToggle(toggle);
843 }
844 }

References component.

◆ HandleVoiceEffect()

void ItemBase::HandleVoiceEffect ( bool enable,
PlayerBase player )
inlineprivate

Definition at line 902 of file InventoryItem.c.

903 {
904 if (IsObstructingVoice() && player)
906 }
void MutePlayer(PlayerBase player, bool state)
This items has effect on player's voice.
bool IsObstructingVoice()
Returns if this entity obsructs player's voice.

◆ Harvest()

void ItemBase::Harvest ( PlayerBase player)
inlineprivate

Definition at line 684 of file PlantBase.c.

685 {
686 //TODO Boris: Add soft skill 2.0
687 //PluginExperience module_exp = GetPlugin(PluginExperience);
688 //float harvesting_efficiency = module_exp.GetExpParamNumber(player, PluginExperience.EXP_FARMER_HARVESTING, "efficiency");
689
690 //m_CropsCount = m_CropsCount * harvesting_efficiency;
691
692 if (!IsSpoiled())
693 {
694 for (int i = 0; i < m_CropsCount; i++)
695 {
696 vector pos = player.GetPosition();
697 ItemBase item = ItemBase.Cast(GetGame().CreateObjectEx(m_CropsType, pos, ECE_PLACE_ON_SURFACE));
698 item.SetQuantity(item.GetQuantityMax());
699 }
700 }
701
702 m_HasCrops = false;
703 SetSynchDirty();
704 UpdatePlant();
705 }
int m_CropsCount
Definition PlantBase.c:14
bool IsSpoiled()
Definition PlantBase.c:824
bool m_HasCrops
Definition PlantBase.c:15

References ECE_PLACE_ON_SURFACE, and GetGame().

◆ HasAttachmentsBesidesBase()

bool ItemBase::HasAttachmentsBesidesBase ( )
inlineprotected

Definition at line 870 of file BaseBuildingBase.c.

871 {
872 int attachment_count = GetInventory().AttachmentCount();
873 if (attachment_count > 0)
874 {
875 if (HasBase() && attachment_count == 1)
876 return false;
877
878 return true;
879 }
880
881 return false;
882 }

References HasBase().

◆ HasBase()

bool ItemBase::HasBase ( )
inlineprotected

Definition at line 319 of file BaseBuildingBase.c.

320 {
321 return m_HasBase;
322 }

References m_HasBase.

◆ HasClutterCutter()

bool ItemBase::HasClutterCutter ( )
inlineprotected

Definition at line 752 of file TentBase.c.

752{};

◆ HasCrops()

bool ItemBase::HasCrops ( )
inlineprivate

Definition at line 832 of file PlantBase.c.

833 {
834 return m_HasCrops;
835 }

◆ HasEnoughEnergyForRepair()

bool ItemBase::HasEnoughEnergyForRepair ( float pTime)
inlineprotected

Definition at line 114 of file Blowtorch.c.

115 {
116 if (GetGasCanister())
117 {
119 if (canisterEM)
120 return canisterEM.GetEnergy() > GetCompEM().GetEnergyUsage() * pTime;
121 }
122
123 return false;
124 }
EntityAI GetGasCanister()
Definition Blowtorch.c:106

◆ HasFlammableMaterial() [1/5]

override bool ItemBase::HasFlammableMaterial ( )
inlineprivate

Definition at line 6 of file BandageDressing.c.

7 {
8 return true;
9 }

◆ HasFlammableMaterial() [2/5]

override bool ItemBase::HasFlammableMaterial ( )
inlineprivate

Definition at line 6 of file Bark_ColorBase.c.

7 {
8 return true;
9 }

◆ HasFlammableMaterial() [3/5]

override bool ItemBase::HasFlammableMaterial ( )
inlineprivate

Definition at line 6 of file GiftWrapPaper.c.

7 {
8 return true;
9 }

◆ HasFlammableMaterial() [4/5]

override bool ItemBase::HasFlammableMaterial ( )
inlineprotected

Definition at line 38 of file Paper.c.

39 {
40 return true;
41 }

◆ HasFlammableMaterial() [5/5]

override bool ItemBase::HasFlammableMaterial ( )
inlineprivate

Definition at line 29 of file Rag.c.

30 {
31 return true;
32 }

◆ HasProperDistance()

bool ItemBase::HasProperDistance ( string selection,
PlayerBase player )
inlineprotected

Definition at line 937 of file BaseBuildingBase.c.

938 {
939 return true;
940 }

◆ HasProxyParts() [1/3]

override bool ItemBase::HasProxyParts ( )
inlineprivate

Definition at line 73 of file GardenBase.c.

74 {
75 return true;
76 }

◆ HasProxyParts() [2/3]

override bool ItemBase::HasProxyParts ( )
inlineprotected

Definition at line 22 of file KitBase.c.

23 {
24 return true;
25 }

◆ HasProxyParts() [3/3]

override bool ItemBase::HasProxyParts ( )
inlineprotected

Definition at line 73 of file TentBase.c.

74 {
75 return true;
76 }

◆ HasSparkplug()

bool ItemBase::HasSparkplug ( )
inlineprotected

Definition at line 308 of file PowerGenerator.c.

309 {
310 int slot = InventorySlots.GetSlotIdFromString("SparkPlug");
311 EntityAI ent = GetInventory().FindAttachment(slot);
312
313 return ent && !ent.IsRuined();
314 }

References InventorySlots::GetSlotIdFromString().

◆ HideAllAnimationsAndProxyPhysics()

void ItemBase::HideAllAnimationsAndProxyPhysics ( bool hide_animations = true,
bool hide_physics = true )
inlineprotected

Definition at line 250 of file TentBase.c.

251 {
252 string cfg_path = "cfgVehicles " + GetType() + " AnimationSources";
253
254 if (GetGame().ConfigIsExisting(cfg_path))
255 {
256 int selections = GetGame().ConfigGetChildrenCount(cfg_path);
258
259 for (int i = 0; i < selections; i++)
260 {
261 string selection_name;
262 GetGame().ConfigGetChildName(cfg_path, i, selection_name);
263 if (hide_animations)
264 SetAnimationPhase(selection_name, 1);
265
267 proxy_selection_name.ToLower();
268 if (hide_physics)
269 RemoveProxyPhysics(proxy_selection_name);
270 }
271 }
272 }

References GetGame(), and GetType().

◆ HideAttachedClipsStates()

void ItemBase::HideAttachedClipsStates ( )
inlineprotected

Definition at line 277 of file BatteryCharger.c.

278 {
279 for (int i = 0; i < ATTACHED_CLIPS_STATES_COUNT; i++)
280 {
281 string selection = ATTACHED_CLIPS_STATES[i];
282 HideSelection(selection);
283 }
284 }
const string ATTACHED_CLIPS_STATES[]
const int ATTACHED_CLIPS_STATES_COUNT

References ATTACHED_CLIPS_STATES_COUNT.

Referenced by OnInventoryEnter(), OnInventoryExit(), OnOwnSocketReleased(), and OnOwnSocketTaken().

◆ IgnoreOutOfReachCondition()

override bool ItemBase::IgnoreOutOfReachCondition ( )
inlineprotected

Definition at line 529 of file BaseBuildingBase.c.

530 {
531 return true;
532 }

◆ InfestationTimerTick()

void ItemBase::InfestationTimerTick ( )
inlineprivate

Definition at line 538 of file PlantBase.c.

539 {
541
543 ChangeInfestation(true);
544 }
void ChangeInfestation(bool is_infested)
Definition PlantBase.c:433
float m_InfestationChance
Definition PlantBase.c:11

References Math::RandomFloat01().

◆ Init()

void ItemBase::Init ( GardenBase garden_base,
float fertility,
float harvesting_efficiency,
float water )
inlineprivate

Definition at line 82 of file PlantBase.c.

83 {
85
87 float divided = /*(float) ((60 * 5) + Math.RandomInt(0, 60 * 1)) / fertility;*/ m_FullMaturityTime;
88
89 //divided = (float)((60 * 30) + Math.RandomInt(0, 60 * 30)) * fertility;
91
94
97
99
100 float rain_intensity = GetGame().GetWeather().GetRain().GetActual();
101 if (rain_intensity > 0.0)
102 CheckWater();
103 else
104 {
105 CheckWater();
106
107 if (NeedsWater())
108 {
110
111 if (GetGame().IsServer())
112 {
114 m_DeleteDryPlantTimer.Run(m_DeleteDryPlantTime, this, "DeleteDryPlantTick", NULL, false);
115 }
116 }
117 }
118 }
void CheckWater()
Definition PlantBase.c:582
static const int STATE_DRY
Definition PlantBase.c:4
int m_DeleteDryPlantTime
Definition PlantBase.c:27
const float SPOIL_AFTER_MATURITY_TIME
Definition PlantBase.c:44
float m_PlantMaterialMultiplier
Definition PlantBase.c:17
static proto float Ceil(float f)
Returns ceil of value.

References CALL_CATEGORY_SYSTEM, Math::Ceil(), GetGame(), and Math::RandomInt().

◆ InitBaseState()

void ItemBase::InitBaseState ( )
inlineprotected

Definition at line 656 of file BaseBuildingBase.c.

657 {
658 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " BaseBuildingBase::InitBaseState ");
659
660 InitVisuals();
661 UpdateNavmesh(); //regenerate navmesh
662 GetConstruction().InitBaseState();
663 }
void UpdateNavmesh()
void InitVisuals()

References bsbDebugPrint(), GetConstruction(), GetDebugName(), InitVisuals(), LogManager::IsBaseBuildingLogEnable(), and UpdateNavmesh().

◆ InitializeSlots()

void ItemBase::InitializeSlots ( )
inlineprivate

Definition at line 99 of file GardenBase.c.

100 {
103
104 for (int i = 0; i < slots_count; i++)
105 {
106 Slot slot = new Slot(GetBaseFertility());
107 slot.SetSlotIndex(i);
108 int i1 = i + 1;
109 string name = "SeedBase_" + i1;
111 slot.SetSlotId(slot_id);
112 slot.SetGarden(this);
113 slot.m_State = Slot.STATE_DIGGED;
114 m_Slots.Insert(slot);
115 }
116 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
float GetBaseFertility()
Definition GardenBase.c:88

References GardenBase::GetGardenSlotsCount(), InventorySlots::GetSlotIdFromString(), and name.

◆ InitItemVariables()

override void ItemBase::InitItemVariables ( )
inlineprivate

Definition at line 3 of file Matchbox.c.

4 {
5 super.InitItemVariables();
7 }
bool can_this_be_combined
Definition ItemBase.c:4741

References can_this_be_combined.

Referenced by InventoryItem::ItemBase().

◆ InitVisuals()

void ItemBase::InitVisuals ( )
inlineprotected

Definition at line 665 of file BaseBuildingBase.c.

666 {
667 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " InitVisuals");
668 //check base
669 if (!HasBase())
670 SetAnimationPhase(ANIMATION_DEPLOYED, 0);
671 else
672 SetAnimationPhase(ANIMATION_DEPLOYED, 1);
673
674 GetConstruction().UpdateVisuals();
675 }
const string ANIMATION_DEPLOYED

References ANIMATION_DEPLOYED, bsbDebugPrint(), GetConstruction(), GetDebugName(), HasBase(), and LogManager::IsBaseBuildingLogEnable().

◆ IsActive()

bool ItemBase::IsActive ( )
inlineprivate

Definition at line 140 of file TrapSpawnBase.c.

141 {
142 return m_IsActive;
143 }
bool m_IsActive

References m_IsActive.

◆ IsAttachmentSlotLocked() [1/2]

bool ItemBase::IsAttachmentSlotLocked ( EntityAI attachment)
inlineprotected

Definition at line 808 of file BaseBuildingBase.c.

809 {
810 if (attachment)
811 {
813 attachment.GetInventory().GetCurrentInventoryLocation(inventory_location);
814
815 return GetInventory().GetSlotLock(inventory_location.GetSlot());
816 }
817
818 return false;
819 }

◆ IsAttachmentSlotLocked() [2/2]

bool ItemBase::IsAttachmentSlotLocked ( string slot_name)
inlineprotected

Definition at line 821 of file BaseBuildingBase.c.

822 {
823 return GetInventory().GetSlotLock(InventorySlots.GetSlotIdFromString(slot_name));
824 }

References InventorySlots::GetSlotIdFromString().

◆ IsBasebuildingKit()

override bool ItemBase::IsBasebuildingKit ( )
inlineprotected

Definition at line 17 of file KitBase.c.

18 {
19 return true;
20 }

Referenced by Hologram::IsFenceOrWatchtowerKit().

◆ IsBloodContainer()

override bool ItemBase::IsBloodContainer ( )
inlineprivate

Definition at line 10 of file BloodContainerBase.c.

11 {
12 return true;
13 }

◆ IsCharged()

bool ItemBase::IsCharged ( )
inlineprivate

Definition at line 107 of file Defibrillator.c.

108 {
109 return m_IsCharged;
110 }
bool m_IsCharged

References m_IsCharged.

◆ IsClothing()

override bool ItemBase::IsClothing ( )
inlineprivate

Definition at line 798 of file InventoryItem.c.

799 {
800 return true;
801 }

Referenced by InventoryItem::EEHitBy().

◆ IsCorrectFertilizer()

bool ItemBase::IsCorrectFertilizer ( ItemBase item,
string selection_component )
inlineprivate

Definition at line 474 of file GardenBase.c.

475 {
477
478 if (slot != NULL)
479 {
480 string item_type = item.GetType();
481
482 if (slot.GetFertilityType() == "" || slot.GetFertilityType() == item_type)
483 return true;
484 }
485
486 return false;
487 }

◆ IsDeployable() [1/5]

override bool ItemBase::IsDeployable ( )
inlineprotected

Definition at line 329 of file BaseBuildingBase.c.

330 {
331 return true;
332 }

◆ IsDeployable() [2/5]

override bool ItemBase::IsDeployable ( )
inlineprotected

Definition at line 416 of file BatteryCharger.c.

417 {
418 return true;
419 }

◆ IsDeployable() [3/5]

override bool ItemBase::IsDeployable ( )
inlineprotected

Definition at line 104 of file KitBase.c.

105 {
106 return true;
107 }

◆ IsDeployable() [4/5]

override bool ItemBase::IsDeployable ( )
inlineprotected

Definition at line 367 of file Spotlight.c.

368 {
369 return true;
370 }

◆ IsDeployable() [5/5]

override bool ItemBase::IsDeployable ( )
inlineprotected

Definition at line 768 of file TentBase.c.

769 {
770 return true;
771 }

◆ IsDeployed()

bool ItemBase::IsDeployed ( )
inlineprivate

Definition at line 145 of file TrapSpawnBase.c.

146 {
147 return m_IsDeployed;
148 }
bool m_IsDeployed

◆ IsDry()

bool ItemBase::IsDry ( )
inlineprivate

Definition at line 799 of file PlantBase.c.

800 {
801 if (GetPlantState() == STATE_DRY)
802 return true;
803 else
804 return false;
805 }
int GetPlantState()
Definition PlantBase.c:713

◆ IsElectricAppliance() [1/4]

override bool ItemBase::IsElectricAppliance ( )
inlineprotected

Definition at line 44 of file BatteryCharger.c.

45 {
46 return true;
47 }

◆ IsElectricAppliance() [2/4]

override bool ItemBase::IsElectricAppliance ( )
inlineprivate

Definition at line 15 of file CableReel.c.

16 {
17 return true;
18 }

◆ IsElectricAppliance() [3/4]

override bool ItemBase::IsElectricAppliance ( )
inlineprivate

Definition at line 5 of file Refridgerator.c.

6 {
7 return true;
8 }

◆ IsElectricAppliance() [4/4]

override bool ItemBase::IsElectricAppliance ( )
inlineprotected

Definition at line 58 of file Spotlight.c.

59 {
60 return true;
61 }

◆ IsFacingCamera()

bool ItemBase::IsFacingCamera ( string selection)
inlineprotected

Definition at line 925 of file BaseBuildingBase.c.

926 {
927 return true;
928 }

◆ IsFacingPlayer()

override bool ItemBase::IsFacingPlayer ( PlayerBase player,
string selection )
inlineprotected

Definition at line 908 of file BaseBuildingBase.c.

909 {
910 return true;
911 }

◆ IsFolded()

bool ItemBase::IsFolded ( )
inlineprotected

Definition at line 309 of file Spotlight.c.

310 {
311 return m_IsFolded;
312 }

References m_IsFolded.

Referenced by UpdateAllSelections().

◆ IsGasMask()

bool ItemBase::IsGasMask ( )
inlineprivate

Definition at line 915 of file InventoryItem.c.

916 {
917 return false;
918 }

◆ IsGrowing()

bool ItemBase::IsGrowing ( )
inlineprivate

Definition at line 807 of file PlantBase.c.

808 {
810 return true;
811 else
812 return false;
813 }

◆ IsIgnited() [1/2]

override bool ItemBase::IsIgnited ( )
inlineprotected

Definition at line 72 of file Blowtorch.c.

73 {
74 return GetCompEM().IsWorking();
75 }

◆ IsIgnited() [2/2]

override bool ItemBase::IsIgnited ( )
inlineprotected

Definition at line 388 of file PortableGasStove.c.

389 {
390 return GetCompEM().IsWorking();
391 }

◆ IsIgnoredByConstruction() [1/2]

override bool ItemBase::IsIgnoredByConstruction ( )
inlineprotected

Definition at line 1036 of file BaseBuildingBase.c.

1037 {
1038 return true;
1039 }

◆ IsIgnoredByConstruction() [2/2]

override bool ItemBase::IsIgnoredByConstruction ( )
inlineprotected

Definition at line 461 of file TentBase.c.

462 {
463 return false;
464 }

◆ IsInventoryVisible()

override bool ItemBase::IsInventoryVisible ( )
inlineprivate

Definition at line 52 of file UndergroundStash.c.

53 {
54 return false;
55 }

◆ IsItemTent()

override bool ItemBase::IsItemTent ( )
inlineprotected

Definition at line 84 of file TentBase.c.

85 {
86 return true;
87 }

Referenced by InventoryItem::EEHitBy().

◆ IsManipulatedEntrance()

bool ItemBase::IsManipulatedEntrance ( )
inlineprotected

Definition at line 631 of file TentBase.c.

632 {
633 return m_IsEntrance;
634 }
bool m_IsEntrance
Definition TentBase.c:26

◆ IsManipulatedWindow()

bool ItemBase::IsManipulatedWindow ( )
inlineprotected

Definition at line 636 of file TentBase.c.

637 {
638 return m_IsWindow;
639 }
bool m_IsWindow
Definition TentBase.c:27

◆ IsMature()

bool ItemBase::IsMature ( )
inlineprivate

Definition at line 816 of file PlantBase.c.

817 {
819 return true;
820 else
821 return false;
822 }

◆ IsMounted()

bool ItemBase::IsMounted ( )
inlineprotected

Definition at line 56 of file BarbedWire.c.

57 {
58 return GetSlotLockedState();
59 }

References GetSlotLockedState().

◆ IsObstructingVoice()

bool ItemBase::IsObstructingVoice ( )
inlineprivate

Returns if this entity obsructs player's voice.

Definition at line 886 of file InventoryItem.c.

887 {
888 return false;
889 }

◆ IsOpened()

bool ItemBase::IsOpened ( )
inlineprotected

Definition at line 334 of file BaseBuildingBase.c.

335 {
336 return false;
337 }

◆ IsPartBuildInSyncData()

bool ItemBase::IsPartBuildInSyncData ( int part_id)
inlineprotected

Definition at line 178 of file BaseBuildingBase.c.

179 {
180 //part_id must starts from index = 1
181 int offset;
182 int mask;
183
184 if (part_id >= 1 && part_id <= 31) //<1,31> (31 parts)
185 {
186 offset = part_id - 1;
187 mask = 1 << offset;
188
189 if ((m_SyncParts01 & mask) > 0)
190 return true;
191 }
192 else if (part_id >= 32 && part_id <= 62) //<32,62> (31 parts)
193 {
194 offset = (part_id % 32);
195 mask = 1 << offset;
196
197 if ((m_SyncParts02 & mask) > 0)
198 return true;
199 }
200 else if (part_id >= 63 && part_id <= 93) //<63,93> (31 parts)
201 {
202 offset = (part_id % 63);
203 mask = 1 << offset;
204
205 if ((m_SyncParts03 & mask) > 0)
206 return true;
207 }
208
209 return false;
210 }

References m_SyncParts01, m_SyncParts02, and m_SyncParts03.

◆ IsPeltBase()

override bool ItemBase::IsPeltBase ( )
inlineprivate

Definition at line 3 of file Pelt_Base.c.

4 {
5 return true;
6 }

◆ IsPlaceable()

bool ItemBase::IsPlaceable ( )
inlineprivate

Definition at line 512 of file TrapSpawnBase.c.

513 {
514 if (GetGame().IsServer())
515 {
516 if (GetHierarchyRootPlayer() != NULL && GetHierarchyRootPlayer().GetHumanInventory().GetEntityInHands() == this)
517 {
518 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
519
520 vector player_pos = player.GetPosition();
521 vector aim_pos = player.GetAimPosition();
522
523 if (vector.DistanceSq(player_pos, aim_pos) <= (1.5 * 1.5))
525 }
526 }
527
528 return false;
529 }
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.

References vector::DistanceSq(), GetGame(), and TrapSpawnBase::IsPlaceableAtPosition().

◆ IsPlaceableAtPosition()

bool ItemBase::IsPlaceableAtPosition ( vector position)
inlineprivate

Definition at line 181 of file TrapSpawnBase.c.

182 {
183 string surface_type;
184 GetGame().SurfaceGetType3D(position[0], position[1], position[2], surface_type);
185
186 // check surface
187 return GetGame().IsSurfaceDigable(surface_type);
188 }

References GetGame().

◆ IsPlayerInside()

override bool ItemBase::IsPlayerInside ( PlayerBase player,
string selection )
inlineprotected

Definition at line 913 of file BaseBuildingBase.c.

914 {
915 return true;
916 }

Referenced by InventoryItem::CanObstruct().

◆ IsSpoiled()

bool ItemBase::IsSpoiled ( )
inlineprivate

Definition at line 824 of file PlantBase.c.

825 {
827 return true;
828 else
829 return false;
830 }
static const int STATE_SPOILED
Definition PlantBase.c:7

◆ IsSurfaceWater()

bool ItemBase::IsSurfaceWater ( vector position)
inlineprivate

Definition at line 414 of file TrapSpawnBase.c.

415 {
416 string surfaceType;
417 GetGame().SurfaceGetType3D(position[0], position[1], position[2], surfaceType);
418
420 }
ref array< string > m_PlaceableWaterSurfaceList
DEPRECATED.
static bool AllowedWaterSurface(float pHeight, string pSurface, array< string > pAllowedSurfaceList)
Definition Surface.c:8

References Surface::AllowedWaterSurface(), and GetGame().

◆ IsTakeable()

override bool ItemBase::IsTakeable ( )
inlineprivate

Definition at line 176 of file TrapSpawnBase.c.

177 {
178 return true;
179 }

◆ IsThisIgnitionSuccessful() [1/5]

override bool ItemBase::IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprivate

Definition at line 32 of file BandageDressing.c.

33 {
34 return Fireplace.CanIgniteEntityAsFireplace(this);
35 }

◆ IsThisIgnitionSuccessful() [2/5]

override bool ItemBase::IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprivate

Definition at line 32 of file Bark_ColorBase.c.

33 {
34 return Fireplace.CanIgniteEntityAsFireplace(this);
35 }

◆ IsThisIgnitionSuccessful() [3/5]

override bool ItemBase::IsThisIgnitionSuccessful ( EntityAI item_source = NULL)
inlineprivate

Definition at line 32 of file GiftWrapPaper.c.

33 {
34 return Fireplace.CanIgniteEntityAsFireplace(this);
35 }

◆ IsThisIgnitionSuccessful() [4/5]

override bool ItemBase::IsThisIgnitionSuccessful ( EntityAI item_source = null)
inlineprotected

Definition at line 60 of file Paper.c.

61 {
62 return Fireplace.CanIgniteEntityAsFireplace(this);
63 }

◆ IsThisIgnitionSuccessful() [5/5]

override bool ItemBase::IsThisIgnitionSuccessful ( EntityAI item_source = null)
inlineprivate

Definition at line 57 of file Rag.c.

58 {
59 return Fireplace.CanIgniteEntityAsFireplace(this);
60 }

◆ KitBase()

void ItemBase::KitBase ( )
inlineprotected

Definition at line 6 of file KitBase.c.

7 {
8 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
9 RegisterNetSyncVariableBool("m_IsDeploySound");
10 }

◆ LockAttachmentSlot()

void ItemBase::LockAttachmentSlot ( bool lock_state)
inlineprotected

Definition at line 102 of file BarbedWire.c.

103 {
104 BaseBuildingBase base_building = BaseBuildingBase.Cast(GetHierarchyParent());
105 if (base_building)
106 {
108 GetInventory().GetCurrentInventoryLocation(inventory_location);
109 base_building.GetInventory().SetSlotLock(inventory_location.GetSlot(), lock_state);
110 //string slot_name = InventorySlots.GetSlotName( inventory_location.GetSlot() );
111 //base_building.UpdateAttachmentVisuals( slot_name, lock_state );
112 //base_building.UpdateAttachmentPhysics( slot_name, lock_state );
113 }
114 }

Referenced by SetMountedState().

◆ ManipulateEntrance()

void ItemBase::ManipulateEntrance ( )
inlineprotected

Definition at line 621 of file TentBase.c.

622 {
623 m_IsEntrance = true;
624 }

◆ ManipulateWindow()

void ItemBase::ManipulateWindow ( )
inlineprotected

Definition at line 626 of file TentBase.c.

627 {
628 m_IsWindow = true;
629 }

◆ MetalWire()

void ItemBase::MetalWire ( )
inlineprivate

◆ MustBeBuiltFromOutside()

bool ItemBase::MustBeBuiltFromOutside ( )
inlineprotected

Some buildings can only be built from outside.

Definition at line 919 of file BaseBuildingBase.c.

920 {
921 return false;
922 }

◆ MutePlayer()

void ItemBase::MutePlayer ( PlayerBase player,
bool state )
inlineprivate

This items has effect on player's voice.

Definition at line 893 of file InventoryItem.c.

894 {
895#ifdef SERVER
896 if (GetGame() && player.GetIdentity() != null)
897 GetGame().SetVoiceEffect(player, GetVoiceEffect(), state);
898#endif
899 }
int GetVoiceEffect()
The voice effect this item uses, default is 0 (none)

References GetGame().

◆ NeedsFertilization()

bool ItemBase::NeedsFertilization ( string selection_component)
inlineprivate

Definition at line 489 of file GardenBase.c.

490 {
492
493 if (slot)
494 {
495 if (slot.GetFertilityState() == eFertlityState.NONE)
496 return true;
497 }
498
499 return false;
500 }

◆ NeedsSpraying()

bool ItemBase::NeedsSpraying ( )
inlineprivate

Definition at line 749 of file PlantBase.c.

750 {
752 return true;
753 else
754 return false;
755 }

◆ NeedsWater()

bool ItemBase::NeedsWater ( )
inlineprivate

Definition at line 739 of file PlantBase.c.

740 {
742
743 if (IsDry() && slotPlant && slotPlant.GetWater() < slotPlant.GetWaterUsage())
744 return true;
745 else
746 return false;
747 }
bool IsDry()
Definition PlantBase.c:799

◆ OnCombine() [1/2]

override void ItemBase::OnCombine ( ItemBase other_item)
inlineprivate

Definition at line 67 of file BandageDressing.c.

68 {
69 super.OnCombine(other_item);
70 if (m_Cleanness == 1 && other_item.m_Cleanness == 0)
71 SetCleanness(0);
72 }
void SetCleanness(int value, bool allow_client=false)
Definition ItemBase.c:8357

References m_Cleanness, and SetCleanness().

Referenced by InventoryItem::CombineItems().

◆ OnCombine() [2/2]

override void ItemBase::OnCombine ( ItemBase other_item)
inlineprivate

Definition at line 111 of file Rag.c.

112 {
113 super.OnCombine(other_item);
114 if (m_Cleanness == 1 && other_item.m_Cleanness == 0)
115 SetCleanness(0);
116 }

References m_Cleanness, and SetCleanness().

◆ OnDebugSpawn() [1/5]

override void ItemBase::OnDebugSpawn ( )
inlineprotected

Definition at line 1131 of file BaseBuildingBase.c.

1132 {
1133 FullyBuild();
1134 }

References FullyBuild().

◆ OnDebugSpawn() [2/5]

override void ItemBase::OnDebugSpawn ( )
inlineprotected

Definition at line 126 of file Blowtorch.c.

127 {
128 GetInventory().CreateInInventory("LargeGasCanister");
129 }

◆ OnDebugSpawn() [3/5]

override void ItemBase::OnDebugSpawn ( )
inlineprivate

Definition at line 81 of file Flashlight.c.

82 {
83 Battery9V.Cast(GetInventory().CreateInInventory("Battery9V"));
84 }

◆ OnDebugSpawn() [4/5]

override void ItemBase::OnDebugSpawn ( )
inlineprotected

Definition at line 408 of file PortableGasStove.c.

409 {
411 if (Class.CastTo(entity, this))
412 {
413 GetInventory().CreateInInventory("LargeGasCanister");
414 GetInventory().CreateInInventory("Pot");
415
416 SpawnEntityOnGroundPos("WaterBottle", entity.GetPosition() + Vector(0.2, 0, 0));
417 }
418 }

References Class::CastTo(), and Vector().

◆ OnDebugSpawn() [5/5]

override void ItemBase::OnDebugSpawn ( )
inlineprotected

Definition at line 354 of file PowerGenerator.c.

355 {
357 if (Class.CastTo(entity, this))
358 entity.GetInventory().CreateInInventory("SparkPlug");
359
361 }

References Class::CastTo(), GetMaxFuel(), and SetFuel().

◆ OnDebugSpawnBuildExcludes()

array< string > ItemBase::OnDebugSpawnBuildExcludes ( )
inlineprotected

Excludes certain parts from being built by OnDebugSpawn, uses Contains to compare.

Definition at line 1126 of file BaseBuildingBase.c.

1127 {
1128 return null;
1129 }

◆ OnEndPlacement()

override void ItemBase::OnEndPlacement ( )
inlineprotected

Definition at line 92 of file KitBase.c.

93 {
96 }
void SoundSynchRemote()
Definition ItemBase.c:8945

References SoundSynchRemote().

Referenced by InventoryItem::SetIsBeingPlaced().

◆ OnIgnitedTarget() [1/8]

override void ItemBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprivate

Definition at line 23 of file BandageDressing.c.

24 {
25 }

◆ OnIgnitedTarget() [2/8]

override void ItemBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprivate

Definition at line 23 of file Bark_ColorBase.c.

24 {
25 }

◆ OnIgnitedTarget() [3/8]

override void ItemBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprotected

Definition at line 77 of file Blowtorch.c.

78 {
79 if (GetGame().IsServer())
80 {
81 if (GetGasCanister())
82 {
84 if (canisterEM)
85 canisterEM.AddEnergy(-1 * (GetCompEM().GetEnergyUsage() * UATimeSpent.FIREPLACE_IGNITE));
86 }
87 }
88 }
const float FIREPLACE_IGNITE

References UATimeSpent::FIREPLACE_IGNITE, and GetGame().

◆ OnIgnitedTarget() [4/8]

override void ItemBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprivate

Definition at line 23 of file GiftWrapPaper.c.

24 {
25 }

◆ OnIgnitedTarget() [5/8]

override void ItemBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprivate

Definition at line 9 of file HandDrillKit.c.

10 {
11 if (GetGame().IsServer())
12 DecreaseHealth(20);
13 }

References GetGame().

◆ OnIgnitedTarget() [6/8]

override void ItemBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprivate

Definition at line 17 of file Matchbox.c.

18 {
19 if (GetGame().IsServer())
20 AddQuantity(-1);
21 }
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:7900

References AddQuantity(), and GetGame().

◆ OnIgnitedTarget() [7/8]

override void ItemBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprotected

Definition at line 53 of file Paper.c.

53{}

◆ OnIgnitedTarget() [8/8]

override void ItemBase::OnIgnitedTarget ( EntityAI ignited_item)
inlineprivate

Definition at line 11 of file PetrolLighter.c.

12 {
13 if (GetGame().IsServer())
14 AddQuantity(-0.5);
15 }

References AddQuantity(), and GetGame().

◆ OnIgnitedTargetFailed() [1/3]

override void ItemBase::OnIgnitedTargetFailed ( EntityAI target_item)
inlineprivate

Definition at line 15 of file HandDrillKit.c.

16 {
17 if (GetGame().IsServer())
18 DecreaseHealth(20);
19 }

References GetGame().

◆ OnIgnitedTargetFailed() [2/3]

override void ItemBase::OnIgnitedTargetFailed ( EntityAI target_item)
inlineprivate

Definition at line 23 of file Matchbox.c.

24 {
25 if (GetGame().IsServer())
26 AddQuantity(-1);
27 }

References AddQuantity(), and GetGame().

◆ OnIgnitedTargetFailed() [3/3]

override void ItemBase::OnIgnitedTargetFailed ( EntityAI target_item)
inlineprivate

Definition at line 17 of file PetrolLighter.c.

18 {
19 if (GetGame().IsServer())
20 AddQuantity(-0.5);
21 }

References AddQuantity(), and GetGame().

◆ OnIgnitedThis() [1/5]

override void ItemBase::OnIgnitedThis ( EntityAI fire_source)
inlineprivate

Definition at line 27 of file BandageDressing.c.

28 {
29 Fireplace.IgniteEntityAsFireplace(this, fire_source);
30 }

◆ OnIgnitedThis() [2/5]

override void ItemBase::OnIgnitedThis ( EntityAI fire_source)
inlineprivate

Definition at line 27 of file Bark_ColorBase.c.

28 {
29 Fireplace.IgniteEntityAsFireplace(this, fire_source);
30 }

◆ OnIgnitedThis() [3/5]

override void ItemBase::OnIgnitedThis ( EntityAI fire_source)
inlineprivate

Definition at line 27 of file GiftWrapPaper.c.

28 {
29 Fireplace.IgniteEntityAsFireplace(this, fire_source);
30 }

◆ OnIgnitedThis() [4/5]

override void ItemBase::OnIgnitedThis ( EntityAI fire_source)
inlineprotected

Definition at line 55 of file Paper.c.

56 {
57 Fireplace.IgniteEntityAsFireplace(this, fire_source);
58 }

◆ OnIgnitedThis() [5/5]

override void ItemBase::OnIgnitedThis ( EntityAI fire_source)
inlineprivate

Definition at line 52 of file Rag.c.

53 {
54 Fireplace.IgniteEntityAsFireplace(this, fire_source);
55 }

◆ OnInitEnergy() [1/3]

override void ItemBase::OnInitEnergy ( )
inlineprotected

Definition at line 123 of file PowerGenerator.c.

124 {
125 m_FuelTankCapacity = GetGame().ConfigGetFloat("CfgVehicles " + GetType() + " fuelTankCapacity");
126 m_FuelToEnergyRatio = GetCompEM().GetEnergyMax() / m_FuelTankCapacity; // Conversion ratio of 1 ml of fuel to X Energy
127
129 }

References GetGame(), GetType(), m_FuelTankCapacity, and UpdateFuelMeter().

◆ OnInitEnergy() [2/3]

override void ItemBase::OnInitEnergy ( )
inlineprivate

Definition at line 10 of file Refridgerator.c.

11 {
13 }
SoundOnVehicle m_SoundLoopEntity

◆ OnInitEnergy() [3/3]

override void ItemBase::OnInitEnergy ( )
inlineprotected

Definition at line 63 of file Spotlight.c.

64 {
65 if (GetCompEM().IsPlugged())
66 {
67 if (!GetHierarchyRoot())
68 Unfold();
69 else
70 Fold(true);
71 }
72 else
73 Fold();
74
76 }
void Fold()

References Fold(), Unfold(), and UpdateAllSelections().

◆ OnInventoryEnter() [1/4]

override void ItemBase::OnInventoryEnter ( Man player)
inlineprotected

Definition at line 234 of file BarbedWire.c.

235 {
236 super.OnInventoryEnter(player);
237 HideSelection("placing");
238 ShowSelection("zbytek");
239 if (m_TriggerActive)
241 GetCompEM().UnplugThis();
242 GetCompEM().UnplugAllDevices();
243 }
void DestroyDamageTrigger()
Definition BarbedWire.c:268

References DestroyDamageTrigger().

◆ OnInventoryEnter() [2/4]

override void ItemBase::OnInventoryEnter ( Man player)
inlineprotected

Definition at line 346 of file BatteryCharger.c.

347 {
348 super.OnInventoryEnter(player);
349
351 HideSelection(SEL_CLIPS_DETACHED);
352 ShowSelection(SEL_CLIPS_FOLDED);
353 }
void HideAttachedClipsStates()
const string SEL_CLIPS_DETACHED
const string SEL_CLIPS_FOLDED

References HideAttachedClipsStates().

◆ OnInventoryEnter() [3/4]

override void ItemBase::OnInventoryEnter ( Man player)
inlineprivate

Definition at line 55 of file CableReel.c.

56 {
57 super.OnInventoryEnter(player);
58
61 if (player_PB.GetItemInHands() == this && GetCompEM().IsPlugged())
62 {
63 //player_PB.TogglePlacingLocal();
64 return;
65 }
66
67 GetCompEM().UnplugAllDevices();
68
69 if (!player_PB.IsPlacingLocal())
70 GetCompEM().UnplugThis();
71 }

References Class::CastTo().

◆ OnInventoryEnter() [4/4]

override void ItemBase::OnInventoryEnter ( Man player)
inlineprivate

Definition at line 68 of file MetalWire.c.

69 {
70 super.OnInventoryEnter(player);
71
74 if (player_PB.GetItemInHands() == this && GetCompEM().IsPlugged())
75 return;
76
77 //Only unplug if we are "powering" something
78 ItemBase powered_device = ItemBase.Cast(GetCompEM().GetPluggedDevice());
80 {
81 GetCompEM().UnplugAllDevices();
82
83 if (!player_PB.IsPlacingLocal())
84 GetCompEM().UnplugThis();
85 }
86 }

References Class::CastTo().

◆ OnInventoryExit() [1/2]

override void ItemBase::OnInventoryExit ( Man player)
inlineprotected

Definition at line 337 of file BatteryCharger.c.

338 {
339 super.OnInventoryExit(player);
340
342 HideSelection(SEL_CLIPS_FOLDED);
343 ShowSelection(SEL_CLIPS_DETACHED);
344 }

References HideAttachedClipsStates().

Referenced by InventoryItem::EEDelete().

◆ OnInventoryExit() [2/2]

override void ItemBase::OnInventoryExit ( Man player)
inlineprivate

Definition at line 58 of file Flashlight.c.

59 {
60 super.OnInventoryExit(player);
61
62 if (GetCompEM().IsWorking())
63 {
64 if (player)
65 {
66 vector ori_rotate = player.GetOrientation();
67 ori_rotate = ori_rotate + Vector(270, 0, 0);
68 SetOrientation(ori_rotate);
69 }
70 }
71 }

References Vector().

◆ OnIsCharged()

void ItemBase::OnIsCharged ( )
inlineprivate

Definition at line 67 of file Defibrillator.c.

68 {
69 if (GetCompEM().IsWorking())
70 {
71 if (!GetGame().IsMultiplayer() || GetGame().IsClient())
72 {
73 //m_ChargedAlarm = PlaySoundLoop(CHARGED_AND_READY_SOUND, 40);
76 }
77 GetCompEM().ResetEnergyUsage();
78 m_IsCharged = true;
79 }
80 }
void SoundStop()
Stops sound.
static const string CHARGED_AND_READY_SOUND

References GetGame(), SEffectManager::PlaySoundOnObject(), and EffectSound::SoundStop().

◆ OnIsPlugged() [1/3]

override void ItemBase::OnIsPlugged ( EntityAI source_device)
inlineprotected

Definition at line 222 of file BarbedWire.c.

223 {
224 SoundCut();
225 }
void SoundCut()
Definition BarbedWire.c:298

References SoundCut().

◆ OnIsPlugged() [2/3]

override void ItemBase::OnIsPlugged ( EntityAI source_device)
inlineprivate

Definition at line 89 of file MetalWire.c.

90 {
92 }

References UpdateAllSelections().

◆ OnIsPlugged() [3/3]

override void ItemBase::OnIsPlugged ( EntityAI source_device)
inlineprotected

Definition at line 153 of file Spotlight.c.

154 {
155 Unfold();
157 }

References Unfold(), and UpdateAllSelections().

◆ OnIsUnplugged() [1/3]

override void ItemBase::OnIsUnplugged ( EntityAI last_energy_source)
inlineprotected

Definition at line 227 of file BarbedWire.c.

228 {
229 if (m_TriggerActive)
231 SoundCut();
232 }

References DestroyDamageTrigger(), and SoundCut().

◆ OnIsUnplugged() [2/3]

override void ItemBase::OnIsUnplugged ( EntityAI last_energy_source)
inlineprivate

Definition at line 95 of file MetalWire.c.

96 {
98 GetCompEM().UnplugAllDevices();
99 }

References UpdateAllSelections().

◆ OnIsUnplugged() [3/3]

override void ItemBase::OnIsUnplugged ( EntityAI last_energy_source)
inlineprotected

Definition at line 227 of file Spotlight.c.

228 {
229 Fold();
231 }

References Fold(), and UpdateAllSelections().

◆ OnItemLocationChanged() [1/6]

override void ItemBase::OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected

Definition at line 386 of file BarbedWire.c.

387 {
388 super.OnItemLocationChanged(old_owner, new_owner);
389
390 if (m_TriggerActive)
391 {
393 m_IsPlaced = false;
394 }
395 }

References DestroyDamageTrigger().

◆ OnItemLocationChanged() [2/6]

override void ItemBase::OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected

Definition at line 84 of file KitBase.c.

85 {
86 super.OnItemLocationChanged(old_owner, new_owner);
87
88 //update visuals after location change
90 }

References UpdatePhysics().

◆ OnItemLocationChanged() [3/6]

override void ItemBase::OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected

Definition at line 186 of file PowerGenerator.c.

187 {
188 super.OnItemLocationChanged(old_owner, new_owner);
190 }

References UpdateFuelMeter().

◆ OnItemLocationChanged() [4/6]

override void ItemBase::OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected

Definition at line 131 of file Spotlight.c.

132 {
133 super.OnItemLocationChanged(old_owner, new_owner);
134
135 //skips folding of currently deployed spotlight
137 {
138 m_EvaluateDeployment = false;
139 if (m_Light)
141
142 Unfold();
143
144 return;
145 }
146
147 // When the item is picked up by a player
149 if (player && player.GetItemInHands() == this)
150 Fold(GetCompEM().IsPlugged());
151 }
override bool IsBeingPlaced()
Definition ItemBase.c:5625
BlowtorchLight m_Light
Definition Blowtorch.c:7
static vector m_LightLocalPosition
Definition Spotlight.c:7
bool m_EvaluateDeployment
Definition Spotlight.c:4
static vector m_LightLocalOrientation
Definition Spotlight.c:8

References Fold(), IsBeingPlaced(), m_Light, and Unfold().

◆ OnItemLocationChanged() [5/6]

override void ItemBase::OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprotected

Definition at line 150 of file TentBase.c.

151 {
152 super.OnItemLocationChanged(old_owner, new_owner);
153
154 if (new_owner || old_owner)
155 {
156 if (GetInventory().CountInventory() == 1) // refuse to pack tent with anything inside
157 Pack(false);
158 }
159 }
void Pack(bool update_navmesh, bool init=false)
Definition TentBase.c:466

◆ OnItemLocationChanged() [6/6]

override void ItemBase::OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
inlineprivate

Definition at line 394 of file TrapSpawnBase.c.

395 {
396 super.OnItemLocationChanged(old_owner, new_owner);
397
398 if (GetGame().IsServer())
399 {
400 // throw trap from vicinity if the trap does not need installation ( action required )
401 if (new_owner == NULL && m_NeedInstalation == false)
402 SetActive();
403 else if (old_owner == NULL && new_owner != NULL)
404 {
405 if (m_IsFoldable)
406 Fold();
407 else
408 SetInactive();
409 }
410 }
411 }
bool m_NeedInstalation

References GetGame(), SetActive(), and SetInactive().

◆ OnOwnSocketReleased() [1/2]

override void ItemBase::OnOwnSocketReleased ( EntityAI device)
inlineprotected

Definition at line 230 of file BatteryCharger.c.

231 {
233 ShowSelection(SEL_CLIPS_DETACHED);
234 }

References HideAttachedClipsStates().

◆ OnOwnSocketReleased() [2/2]

override void ItemBase::OnOwnSocketReleased ( EntityAI device)
inlineprivate

Definition at line 108 of file MetalWire.c.

109 {
111 }

References UpdateAllSelections().

◆ OnOwnSocketTaken() [1/2]

override void ItemBase::OnOwnSocketTaken ( EntityAI device)
inlineprotected

Definition at line 210 of file BatteryCharger.c.

211 {
212 string att_type = device.GetType();
213
214 if (att_type == "CarBattery")
215 {
217 ShowSelection(SEL_CLIPS_CAR);
218 }
219
220 if (att_type == "TruckBattery")
221 {
223 ShowSelection(SEL_CLIPS_TRUCK);
224 }
225
226 HideSelection(SEL_CLIPS_DETACHED);
227 HideSelection(SEL_CLIPS_FOLDED);
228 }
const string SEL_CLIPS_TRUCK
const string SEL_CLIPS_CAR

References HideAttachedClipsStates().

◆ OnOwnSocketTaken() [2/2]

override void ItemBase::OnOwnSocketTaken ( EntityAI device)
inlineprivate

Definition at line 102 of file MetalWire.c.

103 {
105 }

References UpdateAllSelections().

◆ OnPartBuiltClient()

void ItemBase::OnPartBuiltClient ( string part_name,
int action_id )
inlineprotected

Definition at line 569 of file BaseBuildingBase.c.

570 {
571 //play sound
573 }
void SoundBuildStart(string part_name)

References SoundBuildStart().

◆ OnPartBuiltServer()

void ItemBase::OnPartBuiltServer ( notnull Man player,
string part_name,
int action_id )
inlineprotected

Definition at line 536 of file BaseBuildingBase.c.

537 {
539
540 //check base state
541 if (construtionPart.IsBase())
542 {
543 SetBaseState(true);
544
545 //spawn kit
547 }
548
549 //register constructed parts for synchronization
551
552 //register action that was performed on part
554
555 //synchronize
557
558 SetPartFromSyncData(construtionPart); // server part of sync, client will be synced from SetPartsFromSyncData
559
561
562 //update visuals
564
565 //reset action sync data
566 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(ResetActionSyncData, 100, false, this);
567 }
void RegisterPartForSync(int part_id)
void SetPartFromSyncData(ConstructionPart part)
void SetBaseState(bool has_base)
void SynchronizeBaseState()
void RegisterActionForSync(int part_id, int action_id)
void ResetActionSyncData()

References CALL_CATEGORY_GAMEPLAY, CreateConstructionKit(), GetConstruction(), GetGame(), RegisterActionForSync(), RegisterPartForSync(), ResetActionSyncData(), SetBaseState(), SetPartFromSyncData(), SynchronizeBaseState(), UpdateNavmesh(), and BaseBuildingBase::UpdateVisuals().

◆ OnPartDestroyedClient()

void ItemBase::OnPartDestroyedClient ( string part_name,
int action_id )
inlineprotected

Definition at line 649 of file BaseBuildingBase.c.

650 {
651 //play sound
653 }
void SoundDestroyStart(string part_name)

References SoundDestroyStart().

◆ OnPartDestroyedServer()

void ItemBase::OnPartDestroyedServer ( Man player,
string part_name,
int action_id,
bool destroyed_by_connected_part = false )
inlineprotected

Definition at line 616 of file BaseBuildingBase.c.

617 {
618 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " OnPartDestroyedServer " + part_name);
620
621 //register constructed parts for synchronization
623
624 //register action that was performed on part
626
627 //synchronize
629
630 // server part of sync, client will be synced from SetPartsFromSyncData
632
634
635 //update visuals
637
638 //reset action sync data
639 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(ResetActionSyncData, 100, false, this);
640
641 //check base state
642 if (construtionPart.IsBase())
643 {
644 //Destroy construction
645 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(DestroyConstruction, 200, false, this);
646 }
647 }
void UnregisterPartForSync(int part_id)

References bsbDebugPrint(), CALL_CATEGORY_GAMEPLAY, DestroyConstruction(), GetConstruction(), GetDebugName(), GetGame(), LogManager::IsBaseBuildingLogEnable(), RegisterActionForSync(), ResetActionSyncData(), SetPartFromSyncData(), SynchronizeBaseState(), UnregisterPartForSync(), UpdateNavmesh(), and BaseBuildingBase::UpdateVisuals().

◆ OnPartDismantledClient()

void ItemBase::OnPartDismantledClient ( string part_name,
int action_id )
inlineprotected

Definition at line 609 of file BaseBuildingBase.c.

610 {
611 //play sound
613 }
void SoundDismantleStart(string part_name)

References SoundDismantleStart().

◆ OnPartDismantledServer()

void ItemBase::OnPartDismantledServer ( notnull Man player,
string part_name,
int action_id )
inlineprotected

Definition at line 576 of file BaseBuildingBase.c.

577 {
578 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " OnPartDismantledServer " + part_name);
580
581 //register constructed parts for synchronization
583
584 //register action that was performed on part
586
587 //synchronize
589
590 // server part of sync, client will be synced from SetPartsFromSyncData
592
594
595 //update visuals
597
598 //reset action sync data
599 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(ResetActionSyncData, 100, false, this);
600
601 //check base state
602 if (construtionPart.IsBase())
603 {
604 //Destroy construction
605 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(DestroyConstruction, 200, false, this);
606 }
607 }

References bsbDebugPrint(), CALL_CATEGORY_GAMEPLAY, DestroyConstruction(), GetConstruction(), GetDebugName(), GetGame(), LogManager::IsBaseBuildingLogEnable(), RegisterActionForSync(), ResetActionSyncData(), SetPartFromSyncData(), SynchronizeBaseState(), UnregisterPartForSync(), UpdateNavmesh(), and BaseBuildingBase::UpdateVisuals().

◆ OnPlacementCancelled() [1/2]

override void ItemBase::OnPlacementCancelled ( Man player)
inlineprotected

Definition at line 98 of file KitBase.c.

99 {
100 super.OnPlacementCancelled(player);
101 m_DeployedRegularly = false;
102 }

◆ OnPlacementCancelled() [2/2]

override void ItemBase::OnPlacementCancelled ( Man player)
inlineprotected

Definition at line 360 of file Spotlight.c.

361 {
362 super.OnPlacementCancelled(player);
363
364 Fold(true);
365 }

References Fold().

◆ OnPlacementComplete() [1/8]

override void ItemBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected

Definition at line 401 of file BarbedWire.c.

402 {
403 super.OnPlacementComplete(player, position, orientation);
404
405 if (GetGame().IsServer())
406 {
407 ShowAllSelections();
408 HideSelection("zbytek");
409
410 if (!GetHierarchyParent())
411 {
412 if (GetCompEM().IsPlugged() && GetCompEM().IsWorking())
414 else
416 m_IsPlaced = true;
417 }
418
419 SetIsDeploySound(true);
420 }
421 }
void SetIsDeploySound(bool is_deploy_sound)
Definition ItemBase.c:8972
void CreateElectrifiedDamageTrigger()
Definition BarbedWire.c:247
void CreateDamageTrigger()
Definition BarbedWire.c:258

References CreateDamageTrigger(), CreateElectrifiedDamageTrigger(), GetGame(), and SetIsDeploySound().

◆ OnPlacementComplete() [2/8]

override void ItemBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected

Definition at line 409 of file BatteryCharger.c.

410 {
411 super.OnPlacementComplete(player, position, orientation);
412
413 SetIsPlaceSound(true);
414 }
void SetIsPlaceSound(bool is_place_sound)
Definition ItemBase.c:8962

References SetIsPlaceSound().

◆ OnPlacementComplete() [3/8]

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

Definition at line 106 of file CableReel.c.

107 {
108 super.OnPlacementComplete(player, position, orientation);
109
110 SetIsPlaceSound(true);
111 }

References SetIsPlaceSound().

◆ OnPlacementComplete() [4/8]

override void ItemBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected

Definition at line 330 of file PowerGenerator.c.

331 {
332 super.OnPlacementComplete(player, position, orientation);
333
334 SetIsPlaceSound(true);
335 }

References SetIsPlaceSound().

◆ OnPlacementComplete() [5/8]

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

Definition at line 59 of file Refridgerator.c.

60 {
61 super.OnPlacementComplete(player, position, orientation);
62
63 SetIsPlaceSound(true);
64 }

References SetIsPlaceSound().

◆ OnPlacementComplete() [6/8]

override void ItemBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected

Definition at line 349 of file Spotlight.c.

350 {
351 super.OnPlacementComplete(player, position, orientation);
352
353 if (GetGame().IsServer())
354 SetIsDeploySound(true);
355
356 Unfold();
358 }

References GetGame(), SetIsDeploySound(), and Unfold().

◆ OnPlacementComplete() [7/8]

override void ItemBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected

Definition at line 773 of file TentBase.c.

774 {
775 super.OnPlacementComplete(player, position, orientation);
776
777 if (GetGame().IsServer())
778 {
779 TryPitch(true);
780
781 SetIsDeploySound(true);
782 }
783 }

References GetGame(), and SetIsDeploySound().

◆ OnPlacementComplete() [8/8]

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

Definition at line 448 of file TrapSpawnBase.c.

449 {
450 super.OnPlacementComplete(player, position, orientation);
451
452 if (GetGame().IsServer())
453 {
455 float direction[4];
460
461 if (GetInventory().GetCurrentInventoryLocation(source))
462 {
463 destination.SetGroundEx(this, position, direction);
464 if (GetGame().IsMultiplayer())
465 player.ServerTakeToDst(source, destination);
466 else // singleplayer
467 player.GetInventory().TakeToDst(InventoryMode.LOCAL, source, destination);
468 }
469
470 SetupTrapPlayer(PlayerBase.Cast(player), false);
471 SetIsDeploySound(true);
472 SetActive();
473 }
474 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22
void SetupTrapPlayer(PlayerBase player, bool set_position=true)
static proto void MatrixToQuat(vector mat[3], out float d[4])
Converts rotation matrix to quaternion.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.

References GetGame(), Math3D::MatrixToQuat(), SetActive(), SetIsDeploySound(), SetupTrapPlayer(), and Math3D::YawPitchRollMatrix().

◆ OnPlacementStarted() [1/3]

override void ItemBase::OnPlacementStarted ( Man player)
inlineprotected

Definition at line 380 of file BatteryCharger.c.

381 {
382 super.OnPlacementStarted(player);
383
384 SetAnimationPhase(SEL_CLIPS_DETACHED, 0);
385 SetAnimationPhase(SEL_CLIPS_FOLDED, 1);
386 SetAnimationPhase(SEL_SWITCH_ON, 1);
387 SetAnimationPhase(SEL_SWITCH_OFF, 1);
388 SetAnimationPhase(SEL_LIGHT_STATE_1, 1);
389 SetAnimationPhase(SEL_LIGHT_STATE_2, 1);
390 SetAnimationPhase(SEL_LIGHT_STATE_3, 1);
391
397 };
398
400 foreach (string selection : selections)
401 {
402 if (GetGame().IsMultiplayer() && GetGame().IsServer())
403 playerPB.GetHologramServer().SetSelectionToRefresh(selection);
404 else
405 playerPB.GetHologramLocal().SetSelectionToRefresh(selection);
406 }
407 }
const string SEL_SWITCH_OFF
const string SEL_LIGHT_STATE_2
const string SEL_CORD_PLUGGED
const string SEL_LIGHT_STATE_1
const string SEL_SWITCH_ON
const string SEL_LIGHT_STATE_3
const string SEL_CORD_FOLDED

References GetGame(), SEL_CLIPS_DETACHED, SEL_CORD_FOLDED, and SEL_CORD_PLUGGED.

◆ OnPlacementStarted() [2/3]

override void ItemBase::OnPlacementStarted ( Man player)
inlineprivate

Definition at line 90 of file CableReel.c.

91 {
92 super.OnPlacementStarted(player);
93
97 };
98
100 if (GetGame().IsMultiplayer() && GetGame().IsServer())
101 playerPB.GetHologramServer().SetSelectionToRefresh(selections);
102 else if (playerPB.GetHologramLocal())
103 playerPB.GetHologramLocal().SetSelectionToRefresh(selections);
104 }

References GetGame(), and SEL_CORD_PLUGGED.

◆ OnPlacementStarted() [3/3]

override void ItemBase::OnPlacementStarted ( Man player)
inlineprotected

Definition at line 330 of file Spotlight.c.

331 {
332 super.OnPlacementStarted(player);
333
337 };
338
340 foreach (string selection : selections)
341 {
342 if (GetGame().IsMultiplayer() && GetGame().IsServer())
343 playerPB.GetHologramServer().SetSelectionToRefresh(selection);
344 else
345 playerPB.GetHologramLocal().SetSelectionToRefresh(selection);
346 }
347 }
static const string SEL_CORD_PLUGGED_F
Definition Spotlight.c:14

References GetGame(), and SEL_CORD_PLUGGED_F.

◆ OnRPC()

override void ItemBase::OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
inlineprotected

Definition at line 16 of file ToolBase.c.

17 {
18 super.OnRPC(sender, rpc_type, ctx);
19
20 switch (rpc_type)
21 {
22 case PlantType.TREE_HARD:
23 SoundHardTreeFallingPlay();
24 break;
25
26 case PlantType.TREE_SOFT:
27 SoundSoftTreeFallingPlay();
28 break;
29
30 case PlantType.BUSH_HARD:
31 SoundHardBushFallingPlay();
32 break;
33
34 case PlantType.BUSH_SOFT:
35 SoundSoftBushFallingPlay();
36 break;
37 }
38 }

◆ OnSetSlotLock()

void ItemBase::OnSetSlotLock ( int slotId,
bool locked,
bool was_locked )
inlineprotected

Definition at line 519 of file BaseBuildingBase.c.

520 {
522 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("inv: OnSetSlotLock " + GetDebugName(this) + " slot=" + slot_name + " locked=" + locked + " was_locked=" + was_locked);
523
526 }
static proto native owned string GetSlotName(int id)
converts slot_id to string
void UpdateAttachmentVisuals(string slot_name, bool is_locked)

References bsbDebugPrint(), GetDebugName(), InventorySlots::GetSlotName(), LogManager::IsBaseBuildingLogEnable(), UpdateAttachmentPhysics(), and UpdateAttachmentVisuals().

◆ OnStoreLoad() [1/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate

Definition at line 141 of file GardenBase.c.

142 {
143 if (version <= 118)
144 return true;
145
146 if (!super.OnStoreLoad(ctx, version))
147 return false;
148
149 if (version < 102)
150 {
151 float some_value;
152 ctx.Read(some_value); // compatibility check
153 }
154
156
157 for (int i = 0; i < slots_count; i++)
158 {
159 Slot slot = m_Slots.Get(i);
160
161 if (!slot.OnStoreLoadCustom(ctx, version))
162 return false;
163
164 //Slot textures will be updated after store load
165 //UpdateSlotTexture( i );
166 }
167
168 if (version >= 119)
170
171 if (version >= 120)
173
174 return true;
175 }

References GardenBase::GetGardenSlotsCount().

◆ OnStoreLoad() [2/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate

Definition at line 121 of file PlantBase.c.

122 {
123 if (!super.OnStoreLoad(ctx, version))
124 return false;
125
126 //Print("Plant - OnStoreLoad - ");
127
128 GardenBase garden = GardenBase.Cast(GetHierarchyParent());
129 //Print(garden);
130
131 int slot_index = -1;
132 ctx.Read(slot_index);
133
134 //Print(slot_index);
135
136 Slot slot = garden.GetSlotByIndex(slot_index);
137 //Print(slot);
138
139 SetSlot(slot);
140
141 if (!OnStoreLoadCustom(ctx, version))
142 return false;
143
144 return true;
145 }
bool OnStoreLoadCustom(ParamsReadContext ctx, int version)
Definition PlantBase.c:175
void SetSlot(Slot slot)
Definition PlantBase.c:783

◆ OnStoreLoad() [3/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 168 of file BarbedWire.c.

169 {
170 if (!super.OnStoreLoad(ctx, version))
171 return false;
172
173 //--- Barbed wire data ---
174 //is mounted (removed in ver. 105)
175 if (version < 105)
176 {
177 float is_mounted;
178 if (!ctx.Read(is_mounted))
179 return false;
180 }
181 //---
182
183 return true;
184 }

◆ OnStoreLoad() [4/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 392 of file BaseBuildingBase.c.

393 {
394 if (!super.OnStoreLoad(ctx, version))
395 return false;
396
397 //--- Base building data ---
398 //Restore synced parts data
399 if (!ctx.Read(m_SyncParts01))
400 {
401 m_SyncParts01 = 0; //set default
402 return false;
403 }
404 if (!ctx.Read(m_SyncParts02))
405 {
406 m_SyncParts02 = 0; //set default
407 return false;
408 }
409 if (!ctx.Read(m_SyncParts03))
410 {
411 m_SyncParts03 = 0; //set default
412 return false;
413 }
414
415 //has base
416 if (!ctx.Read(m_HasBase))
417 {
418 m_HasBase = false;
419 return false;
420 }
421 //---
422
423 return true;
424 }

References m_HasBase, m_SyncParts01, m_SyncParts02, and m_SyncParts03.

◆ OnStoreLoad() [5/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate

Definition at line 33 of file BloodContainerBase.c.

34 {
35 if (!super.OnStoreLoad(ctx, version))
36 return false;
37
38 bool is_blood_type_visible = false;
41
42 return true;
43 }
void SetBloodTypeVisible(bool visible)

◆ OnStoreLoad() [6/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate

Definition at line 35 of file Flag_Base.c.

36 {
37 if (!super.OnStoreLoad(ctx, version))
38 return false;
39
40 return true;
41 }

◆ OnStoreLoad() [7/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 12 of file Paper.c.

13 {
14 if (!super.OnStoreLoad(ctx, version))
15 return false;
16
17 if (version >= 108 && !ctx.Read(m_NoteContents))
18 return false;
19
20 return true;
21 }

◆ OnStoreLoad() [8/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 275 of file Spotlight.c.

276 {
277 if (!super.OnStoreLoad(ctx, version))
278 return false;
279
280 // Load folded/unfolded state
281 bool b_is_folded = false;
282 if (!ctx.Read(b_is_folded))
283 b_is_folded = true;
284
285 if (b_is_folded)
286 Fold();
287 else
288 Unfold();
289
290 return true;
291 }

References Fold(), and Unfold().

◆ OnStoreLoad() [9/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 107 of file TentBase.c.

108 {
109 if (!super.OnStoreLoad(ctx, version))
110 return false;
111
112 ctx.Read(m_State);
113 if (version >= 110)
114 {
115 if (!ctx.Read(m_OpeningMask))
116 Print("ERROR: no opening mask found! Default openinng settings initialized.");
117 }
118
119 if (m_State == PITCHED)
120 {
121 TryPitch(true);
122
123 if (GetGame().IsServer())
124 {
126 {
128 m_ClutterCutter.SetOrientation(GetOrientation());
129 }
130
132 }
133 }
134 else
135 Pack(true);
136
137 return true;
138 }
string GetClutterCutter()
Definition TentBase.c:753
bool HasClutterCutter()
Definition TentBase.c:752
void RefreshAttachements()
Definition TentBase.c:305
proto void Print(void var)
Prints content of variable to console/log.

References ECE_PLACE_ON_SURFACE, TentBase::GetClutterCutter(), GetGame(), GetOrientation(), GetPosition, TentBase::HasClutterCutter(), m_ClutterCutter, m_State, and Print().

◆ OnStoreLoad() [10/10]

override bool ItemBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate

Definition at line 97 of file TrapSpawnBase.c.

98 {
99 if (!super.OnStoreLoad(ctx, version))
100 return false;
101
102 bool b_is_active = false;
103 if (!ctx.Read(b_is_active))
104 b_is_active = false;
105
106 bool b_is_in_progress = false;
107 if (!ctx.Read(b_is_in_progress))
108 b_is_in_progress = false;
109
110 bool b_is_deployed = false;
111 if (!ctx.Read(b_is_deployed))
112 b_is_deployed = false;
113
114 if (b_is_active)
115 SetActive();
116
119
121
122 return true;
123 }
void SetDeployed(bool newState)
void StartActivate(PlayerBase player)

References SetActive(), and StartActivate().

◆ OnStoreLoadCustom()

bool ItemBase::OnStoreLoadCustom ( ParamsReadContext ctx,
int version )
inlineprivate

Definition at line 175 of file PlantBase.c.

176 {
177 int loadInt;
178 if (!ctx.Read(loadInt))
179 loadInt = 0;
180
182
183 loadInt = 0;
184 if (!ctx.Read(loadInt))
185 loadInt = 5;
186
188
189 loadInt = 0;
190 if (!ctx.Read(loadInt))
191 loadInt = 5;
193
194 loadInt = 0;
195 if (!ctx.Read(loadInt))
196 loadInt = 300;
198
199 loadInt = 0;
200 if (!ctx.Read(loadInt))
201 loadInt = 300;
203
204 loadInt = 0;
205 if (!ctx.Read(loadInt))
206 return false;
208
209 float loadFloat = 0.0;
210 if (!ctx.Read(loadFloat))
211 loadFloat = 0;
213
214 loadInt = 0;
215 if (!ctx.Read(loadInt))
216 return false;
218
219 loadInt = 0;
220 if (!ctx.Read(loadInt))
221 loadInt = 1;
223
224 string loadString = "";
225 if (!ctx.Read(loadString))
226 return false;
228
229 loadFloat = 0.0;
230 if (!ctx.Read(loadFloat))
231 loadFloat = 1;
233
234 loadInt = 0;
235 if (!ctx.Read(loadInt))
236 loadInt = 1;
238
239 loadInt = 0;
240 if (!ctx.Read(loadInt))
241 loadInt = 0;
243
244 loadFloat = 0.0;
245 if (!ctx.Read(loadFloat))
246 loadFloat = 1;
248
249 bool loadBool = false;
250 if (!ctx.Read(loadBool))
251 loadBool = false;
253
254 loadFloat = 0.0;
255 if (!ctx.Read(loadFloat))
256 loadFloat = 0;
258
259
260 loadBool = false;
261 if (ctx.Read(loadBool))
262 {
263 if (loadBool)
264 {
265 if (GetGame().IsServer())
266 {
268 m_GrowthTimer.Run(m_StateChangeTime, this, "GrowthTimerTick", NULL, true);
269 }
270 }
271 }
272 else
273 return false;
274
275 loadFloat = 0.0;
276 if (ctx.Read(loadFloat))
277 {
278 if (loadFloat > 0.0)
279 {
280 if (GetGame().IsServer())
281 {
283 m_InfestationTimer.Run(loadFloat, this, "InfestationTimerTick", NULL, false);
284 }
285 }
286 }
287 else
288 return false;
289
290 loadFloat = 0.0;
291 if (ctx.Read(loadFloat))
292 {
293 if (loadFloat > 0.0)
294 {
295 if (GetGame().IsServer())
296 {
298 m_SpoilAfterFullMaturityTimer.Run(loadFloat, this, "SetSpoiled", NULL, false);
299 }
300 }
301 }
302 else
303 return false;
304
305 loadFloat = 0.0;
306 if (ctx.Read(loadFloat))
307 {
308 if (loadFloat > 0.0)
309 {
310 if (GetGame().IsServer())
311 {
314
315 m_SpoiledRemoveTimer.Run(loadFloat, this, "SpoiledRemoveTimerTick", NULL, false);
316 }
317 }
318 }
319 else
320 return false;
321
322 loadFloat = 0.0;
323 if (ctx.Read(loadFloat))
324 {
325 if (loadFloat > 0.0)
326 {
327 if (GetGame().IsServer())
328 {
330 m_DeleteDryPlantTimer.Run(loadFloat, this, "DeleteDryPlantTick", NULL, false);
331 }
332 }
333 }
334 else
335 return false;
336
337
338 UpdatePlant();
339 return true;
340 }
float m_CurrentPlantMaterialQuantity
Definition PlantBase.c:21
int m_SpoiledRemoveTime
Definition PlantBase.c:28
ref Timer m_SpoiledRemoveTimer
Definition PlantBase.c:36

References CALL_CATEGORY_SYSTEM, and GetGame().

◆ OnStoreSave() [1/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprivate

Definition at line 215 of file GardenBase.c.

216 {
217 super.OnStoreSave(ctx);
218
220
221 for (int i = 0; i < slots_count; i++)
222 {
223 Slot slot = m_Slots.Get(i);
224
225 slot.OnStoreSaveCustom(ctx);
226 }
227
229
230 ctx.Write(m_SlotWateredState);
231 }

References GardenBase::GetGardenSlotsCount().

◆ OnStoreSave() [2/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprivate

Definition at line 147 of file PlantBase.c.

148 {
149 super.OnStoreSave(ctx);
150
151 Slot slot = GetSlot();
152
153 if (slot)
154 {
155 int slot_index = slot.GetSlotIndex();
156 slot.SetPlant(this); // hack
157
158 ctx.Write(slot_index);
159
161 }
162 else
163 {
164 GetGame().ObjectDelete(this); // Plants that exist without a garden must be deleted. Otherwise they might cause problems.
165 Print("Warning! A plant existed without a garden. Therefore it was deleted from the world to prevent issues!");
166 }
167 }
void OnStoreSaveCustom(ParamsWriteContext ctx)
Definition PlantBase.c:342

References GetGame(), and Print().

◆ OnStoreSave() [3/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 163 of file BarbedWire.c.

164 {
165 super.OnStoreSave(ctx);
166 }

◆ OnStoreSave() [4/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 380 of file BaseBuildingBase.c.

381 {
382 super.OnStoreSave(ctx);
383
384 //sync parts 01
385 ctx.Write(m_SyncParts01);
386 ctx.Write(m_SyncParts02);
387 ctx.Write(m_SyncParts03);
388
389 ctx.Write(m_HasBase);
390 }

References m_HasBase, m_SyncParts01, m_SyncParts02, and m_SyncParts03.

◆ OnStoreSave() [5/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprivate

Definition at line 26 of file BloodContainerBase.c.

27 {
28 super.OnStoreSave(ctx);
29
31 }

◆ OnStoreSave() [6/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprivate

Definition at line 30 of file Flag_Base.c.

31 {
32 super.OnStoreSave(ctx);
33 }

◆ OnStoreSave() [7/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 23 of file Paper.c.

24 {
25 super.OnStoreSave(ctx);
26
27 ctx.Write(m_NoteContents);
28 }

◆ OnStoreSave() [8/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 267 of file Spotlight.c.

268 {
269 super.OnStoreSave(ctx);
270
271 // Save folded/unfolded state
272 ctx.Write(m_IsFolded);
273 }

◆ OnStoreSave() [9/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 99 of file TentBase.c.

100 {
101 super.OnStoreSave(ctx);
102
103 ctx.Write(m_State);
104 ctx.Write(m_OpeningMask);
105 }

References m_State.

◆ OnStoreSave() [10/10]

override void ItemBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprivate

Definition at line 86 of file TrapSpawnBase.c.

87 {
88 super.OnStoreSave(ctx);
89
90 ctx.Write(m_IsActive);
91
92 ctx.Write(m_IsInProgress);
93
94 ctx.Write(m_IsDeployed);
95 }
bool m_IsInProgress

References m_IsActive, and m_IsInProgress.

◆ OnStoreSaveCustom()

void ItemBase::OnStoreSaveCustom ( ParamsWriteContext ctx)
inlineprivate

Definition at line 342 of file PlantBase.c.

343 {
344 ctx.Write(m_SprayUsage);
345
347
349
350 ctx.Write(m_FullMaturityTime);
351
353
354 ctx.Write(m_StateChangeTime);
355
357
359
360 ctx.Write(m_CropsCount);
361
362 ctx.Write(m_CropsType);
363
365
366 ctx.Write(m_PlantState);
367
368 ctx.Write(m_PlantStateIndex);
369
371
372 ctx.Write(m_IsInfested);
373
374 ctx.Write(m_SprayQuantity);
375
376 bool saveBool = false;
377 if (m_GrowthTimer != NULL)
378 saveBool = true;
379 ctx.Write(saveBool);
380
381 float saveFloat = 0.0;
383 saveFloat = m_InfestationTimer.GetRemaining();
384 ctx.Write(saveFloat);
385
386 saveFloat = 0.0;
389 ctx.Write(saveFloat);
390
391 saveFloat = 0.0;
393 saveFloat = m_SpoiledRemoveTimer.GetRemaining();
394 ctx.Write(saveFloat);
395
396 saveFloat = 0.0;
398 saveFloat = m_DeleteDryPlantTimer.GetRemaining();
399 ctx.Write(saveFloat);
400 }

◆ OnSwitchOff() [1/5]

override void ItemBase::OnSwitchOff ( )
inlineprotected

Definition at line 330 of file BatteryCharger.c.

331 {
332 HideSelection(SEL_SWITCH_ON);
333 ShowSelection(SEL_SWITCH_OFF);
334 }

◆ OnSwitchOff() [2/5]

override void ItemBase::OnSwitchOff ( )
inlineprotected

Definition at line 26 of file PortableGasLamp.c.

27 {
28 super.OnSwitchOff();
29
30 //sound (client only)
32 }
void SoundTurnOff()

◆ OnSwitchOff() [3/5]

override void ItemBase::OnSwitchOff ( )
inlineprotected

Definition at line 127 of file PortableGasStove.c.

128 {
129 super.OnSwitchOff();
130
131 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
132 m_UTSource.SetDefferedActive(false, 5.0);
133
134 //sound (client only)
135 SoundTurnOff();
137 m_CookingProcess.TerminateCookingSounds(GetCookingEquipment());
138 }

References GetCookingEquipment(), GetGame(), m_CookingProcess, and m_UTSource.

◆ OnSwitchOff() [4/5]

override void ItemBase::OnSwitchOff ( )
inlineprivate

Definition at line 42 of file Refridgerator.c.

43 {
44
45 }

◆ OnSwitchOff() [5/5]

override void ItemBase::OnSwitchOff ( )
inlineprotected

Definition at line 97 of file Spotlight.c.

98 {
99 super.OnSwitchOff();
100
101 SoundTurnOff();
102
103 if (m_Light)
104 {
105 m_Light.FadeOut(0.05);
106 m_Light = null;
107 }
108 }

References m_Light, and SoundTurnOff().

◆ OnSwitchOn() [1/5]

override void ItemBase::OnSwitchOn ( )
inlineprotected

Definition at line 324 of file BatteryCharger.c.

325 {
326 HideSelection(SEL_SWITCH_OFF);
327 ShowSelection(SEL_SWITCH_ON);
328 }

◆ OnSwitchOn() [2/5]

override void ItemBase::OnSwitchOn ( )
inlineprotected

Definition at line 18 of file PortableGasLamp.c.

19 {
20 super.OnSwitchOn();
21
22 //sound (client only)
24 }
void SoundTurnOn()

◆ OnSwitchOn() [3/5]

override void ItemBase::OnSwitchOn ( )
inlineprotected

Definition at line 116 of file PortableGasStove.c.

117 {
118 super.OnSwitchOn();
119
120 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
121 m_UTSource.SetDefferedActive(true, 3.0);
122
123 //sound (client only)
124 SoundTurnOn();
125 }

References GetGame(), and m_UTSource.

◆ OnSwitchOn() [4/5]

override void ItemBase::OnSwitchOn ( )
inlineprivate

Definition at line 37 of file Refridgerator.c.

38 {
39
40 }

◆ OnSwitchOn() [5/5]

override void ItemBase::OnSwitchOn ( )
inlineprotected

Definition at line 90 of file Spotlight.c.

91 {
92 super.OnSwitchOn();
93
95 }

References SoundTurnOn().

◆ OnSynchronizedClient()

void ItemBase::OnSynchronizedClient ( )
inlineprotected

Definition at line 107 of file BaseBuildingBase.c.

108 {
109 //update parts
111
112 //update action on part
114
115 //update visuals (client)
117 }
void SetActionFromSyncData()
void SetPartsFromSyncData()

References SetActionFromSyncData(), SetPartsFromSyncData(), and BaseBuildingBase::UpdateVisuals().

◆ OnVariablesSynchronized() [1/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprivate

Definition at line 66 of file GardenBase.c.

67 {
68 super.OnVariablesSynchronized();
69
70 SyncSlots();
71 }

References SyncSlots().

◆ OnVariablesSynchronized() [2/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprotected

Definition at line 123 of file BarbedWire.c.

124 {
125 super.OnVariablesSynchronized();
126
128 {
129 //Play sound
130 PlaySoundSet(m_MountSound, SOUND_MOUNT, 0.1, 0.1);
131 }
133
134 if (IsDeploySound())
136
139
142 }
bool CanPlayDeployLoopSound()
Definition ItemBase.c:9039
void PlayDeploySound()
Definition ItemBase.c:9003
bool IsDeploySound()
Definition ItemBase.c:8977
bool m_LastMountedState
Definition BarbedWire.c:27
void PlayDeployLoopSound()
Definition BarbedWire.c:144
bool m_IsMounted
Definition BarbedWire.c:26
EffectSound m_MountSound
Definition BarbedWire.c:29
void StopDeployLoopSound()
Definition BarbedWire.c:153
const string SOUND_MOUNT
Definition BarbedWire.c:28

References CanPlayDeployLoopSound(), IsDeploySound(), m_DeployLoopSound, m_IsMounted, PlayDeployLoopSound(), PlayDeploySound(), and StopDeployLoopSound().

◆ OnVariablesSynchronized() [3/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprotected

Definition at line 99 of file BaseBuildingBase.c.

100 {
101 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " OnVariablesSynchronized");
102 super.OnVariablesSynchronized();
103
104 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(OnSynchronizedClient, 100, false);
105 }
void OnSynchronizedClient()

References bsbDebugPrint(), CALL_CATEGORY_GAMEPLAY, GetDebugName(), GetGame(), LogManager::IsBaseBuildingLogEnable(), and OnSynchronizedClient().

◆ OnVariablesSynchronized() [4/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprotected

Definition at line 355 of file BatteryCharger.c.

356 {
357 super.OnVariablesSynchronized();
358
359 if (IsPlaceSound())
361 }
void PlayPlaceSound()
Definition ItemBase.c:9027
bool IsPlaceSound()
Definition ItemBase.c:8967

References IsPlaceSound(), and PlayPlaceSound().

◆ OnVariablesSynchronized() [5/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprivate

Definition at line 78 of file CableReel.c.

79 {
80 super.OnVariablesSynchronized();
81
82 if (IsPlaceSound())
84 }

References IsPlaceSound(), and PlayPlaceSound().

◆ OnVariablesSynchronized() [6/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprivate

Definition at line 22 of file Flag_Base.c.

23 {
24 super.OnVariablesSynchronized();
25
26
27 }

◆ OnVariablesSynchronized() [7/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprotected

◆ OnVariablesSynchronized() [8/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprotected

Definition at line 316 of file PowerGenerator.c.

317 {
318 super.OnVariablesSynchronized();
319
321
322 if (IsPlaceSound())
324 }

References IsPlaceSound(), PlayPlaceSound(), and UpdateFuelMeter().

◆ OnVariablesSynchronized() [9/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprivate

Definition at line 47 of file Refridgerator.c.

48 {
49 super.OnVariablesSynchronized();
50
51 if (IsPlaceSound())
53 }

References IsPlaceSound(), and PlayPlaceSound().

◆ OnVariablesSynchronized() [10/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprotected

Definition at line 233 of file Spotlight.c.

234 {
235 super.OnVariablesSynchronized();
236
237 if (IsDeploySound())
239
242
245 }

References CanPlayDeployLoopSound(), IsDeploySound(), m_DeployLoopSound, PlayDeployLoopSound(), PlayDeploySound(), and StopDeployLoopSound().

◆ OnVariablesSynchronized() [11/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprotected

Definition at line 161 of file TentBase.c.

162 {
163 super.OnVariablesSynchronized();
164
165 if (IsDeploySound())
167 else
168 {
169 if (m_State == PITCHED)
170 {
172 {
173 if (m_IsToggle)
175 else
177 }
179 {
180 if (m_IsToggle)
182 else
184 }
185 }
186 }
187
190
193
194 if (m_State != m_StateLocal)
195 {
196 if (m_State == PACKED)
197 Pack(false);
198 else
199 TryPitch(false);
200
202 }
203
204 if ((m_OpeningMaskLocal != m_OpeningMask)) //opening synchronization for physics recalculation
205 {
208
209 if (m_State == PACKED)
210 {
211 Pack(false); //intentional
212 }
213 }
214 }
bool IsManipulatedWindow()
Definition TentBase.c:636
void HandleOpeningsPhysics()
Definition TentBase.c:846
void SoundTentClosePlay()
Definition TentBase.c:727
bool IsManipulatedEntrance()
Definition TentBase.c:631
void SoundTentOpenPlay()
Definition TentBase.c:721
int m_OpeningMaskLocal
Definition TentBase.c:31
bool m_IsToggle
Definition TentBase.c:28
void SoundTentOpenWindowPlay()
Definition TentBase.c:733
void SoundTentCloseWindowPlay()
Definition TentBase.c:739

References CanPlayDeployLoopSound(), IsDeploySound(), IsSoundSynchRemote(), m_DeployLoopSound, m_State, PlayDeployLoopSound(), PlayDeploySound(), and StopDeployLoopSound().

◆ OnVariablesSynchronized() [12/12]

override void ItemBase::OnVariablesSynchronized ( )
inlineprivate

this event is called all variables are synchronized on client

Definition at line 126 of file TrapSpawnBase.c.

127 {
128 super.OnVariablesSynchronized();
129
130 if (IsDeploySound() && IsDeployed())
132
135
138 }

References CanPlayDeployLoopSound(), IsDeploySound(), m_DeployLoopSound, PlayDeployLoopSound(), PlayDeploySound(), and StopDeployLoopSound().

◆ OnWasAttached() [1/3]

override void ItemBase::OnWasAttached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 870 of file InventoryItem.c.

871 {
872 super.OnWasAttached(parent, slot_id);
873
874 if (slot_id == InventorySlots.HEADGEAR || slot_id == InventorySlots.MASK)
875 HandleVoiceEffect(true, PlayerBase.Cast(GetHierarchyRootPlayer()));
876 }

◆ OnWasAttached() [2/3]

override void ItemBase::OnWasAttached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 67 of file Flag_Base.c.

68 {
69 super.OnWasAttached(parent, slot_id);
70
71 HideSelection("folded");
72 ShowSelection("unfolded");
73 }

◆ OnWasAttached() [3/3]

override void ItemBase::OnWasAttached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 3 of file Switchable_Base.c.

4 {
5 super.OnWasAttached(parent, slot_id);
6
8 if (Class.CastTo(parent_item, parent))
9 parent_item.AddLightSourceItem(this);
10 }

References Class::CastTo().

◆ OnWasDetached() [1/3]

override void ItemBase::OnWasDetached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 878 of file InventoryItem.c.

879 {
880 super.OnWasDetached(parent, slot_id);
881
882 HandleVoiceEffect(false, PlayerBase.Cast(parent));
883 }

◆ OnWasDetached() [2/3]

override void ItemBase::OnWasDetached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 75 of file Flag_Base.c.

76 {
77 super.OnWasDetached(parent, slot_id);
78
79 ShowSelection("folded");
80 HideSelection("unfolded");
81 }

◆ OnWasDetached() [3/3]

override void ItemBase::OnWasDetached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 12 of file Switchable_Base.c.

13 {
14 super.OnWasDetached(parent, slot_id);
15
17 if (Class.CastTo(parent_item, parent))
18 parent_item.RemoveLightSourceItem();
19 }

References Class::CastTo().

◆ OnWork() [1/6]

override void ItemBase::OnWork ( float consumed_energy)
inlineprotected

Definition at line 220 of file BarbedWire.c.

220{}

◆ OnWork() [2/6]

override void ItemBase::OnWork ( float consumed_energy)
inlineprotected

Definition at line 49 of file BatteryCharger.c.

50 {
51 // Charging functionality
52 ItemBase battery = ItemBase.Cast(GetCompEM().GetPluggedDevice());
53
54 if (battery)
55 {
56 if (GetGame().IsServer())
57 {
58 float battery_capacity = battery.GetCompEM().GetEnergyMax();
59
60 if (battery.GetCompEM().GetEnergy() < battery_capacity)
61 {
62 // Heat up the items so players know they are working.
63 this.SetTemperature(60);
64 battery.SetTemperature(60);
65
66 float charger_health = GetHealth("", "");
67 float energy_add = m_ChargeEnergyPerSecond * (consumed_energy / GetCompEM().GetEnergyUsage());
68
69#ifdef DIAG_DEVELOPER
70 if (FeatureTimeAccel.GetFeatureTimeAccelEnabled(ETimeAccelCategories.ENERGY_RECHARGE))
71 {
72 float timeAccel = FeatureTimeAccel.GetFeatureTimeAccelValue();
74 }
75#endif
76
77 if (GetCompEM().ConsumeEnergy(energy_add)) // consumes energy from the power source
78 {
79 // There is enough of energy to use
80 energy_add = energy_add * (0.5 + charger_health * 0.005); // Damaged charger works less efficiently - 50% damage causes 75% efficiency
81 }
82 else
83 {
84 // There is NOT enough of energy to use
85 energy_add = 0;
86 }
87
88 battery.GetCompEM().AddEnergy(energy_add);
89 }
90 else
91 battery.GetCompEM().SetEnergy(battery_capacity);
92 m_BatteryEnergy0To100 = battery.GetCompEM().GetEnergy0To100();
93 SetSynchDirty();
94 }
95 }
96 }
override void SetTemperature(float value, bool allow_client=false)
Definition ItemBase.c:8178
int m_BatteryEnergy0To100

References GetGame(), and SetTemperature().

◆ OnWork() [3/6]

override void ItemBase::OnWork ( float consumed_energy)
inlineprivate

Definition at line 25 of file Flashlight.c.

26 {
27 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // Client side
28 {
29 Battery9V battery = Battery9V.Cast(GetCompEM().GetEnergySource());
30
31 if (battery && m_Light)
32 {
33 float efficiency = battery.GetEfficiency0To1();
34
35 if (efficiency < 1)
36 m_Light.SetIntensity(efficiency, GetCompEM().GetUpdateInterval());
37 else
39 }
40 }
41 }
void SetIntensity(float coef, float time)

References GetGame(), m_Light, and PointLightBase::SetIntensity().

◆ OnWork() [4/6]

override void ItemBase::OnWork ( float consumed_energy)
inlineprotected

damaging of cookware

Definition at line 172 of file PortableGasStove.c.

173 {
174 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
176
177 //manage cooking equipment
179 {
180 if (GetGame() && GetGame().IsServer())
181 {
182 float cook_equip_temp = GetCookingEquipment().GetTemperature();
183
184 //start cooking
186 {
189 }
190
191 //set temperature to cooking equipment
194 GetCookingEquipment().SetTemperature(cook_equip_temp);
196 GetCookingEquipment().DecreaseHealth(GameConstants.FIRE_ATTACHMENT_DAMAGE_PER_SECOND * GetCompEM().GetUpdateInterval(), false);
197 }
198 }
199 }
const float PARAM_COOKING_EQUIP_MAX_TEMP
const float PARAM_COOKING_EQUIP_TEMP_INCREASE
void CookWithEquipment()
const float PARAM_COOKING_TEMP_THRESHOLD
const float FIRE_ATTACHMENT_DAMAGE_PER_SECOND
various damage per second constants
Definition constants.c:727

References Math::Clamp(), CookWithEquipment(), GameConstants::FIRE_ATTACHMENT_DAMAGE_PER_SECOND, GetCookingEquipment(), GetGame(), m_UTSource, m_UTSSettings, PARAM_COOKING_EQUIP_MAX_TEMP, PARAM_COOKING_EQUIP_TEMP_INCREASE, and PARAM_COOKING_TEMP_THRESHOLD.

◆ OnWork() [5/6]

override void ItemBase::OnWork ( float consumed_energy)
inlineprotected

Definition at line 151 of file PowerGenerator.c.

152 {
153 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
155
156 if (GetGame().IsServer())
157 {
158 m_FuelPercentage = GetCompEM().GetEnergy0To100();
159 SetSynchDirty();
160 }
161
163 }

References GetGame(), m_UTSLEngine, m_UTSource, m_UTSSettings, and UpdateFuelMeter().

◆ OnWork() [6/6]

override void ItemBase::OnWork ( float consumed_energy)
inlineprivate

Definition at line 23 of file Refridgerator.c.

24 {
25
26 }

◆ OnWorkStart() [1/11]

override void ItemBase::OnWorkStart ( )
inlineprotected

Definition at line 195 of file BarbedWire.c.

196 {
198 if (m_TriggerActive)
200
201 if (m_IsPlaced)
202 {
203 //TimerRandomSpark();
205 }
206 }
void SoundBuzzLoopStart()
Definition BarbedWire.c:320

References CreateElectrifiedDamageTrigger(), DestroyDamageTrigger(), and SoundBuzzLoopStart().

◆ OnWorkStart() [2/11]

override void ItemBase::OnWorkStart ( )
inlineprotected

Definition at line 98 of file BatteryCharger.c.

99 {
100 if (GetGame().IsClient() || !GetGame().IsMultiplayer())
101 {
103 m_UpdateStatusLightsTimer.Run(m_BlinkingStatusLightInterval / 2, this, "UpdateStatusLights", NULL, true);
104 }
105 }
float m_BlinkingStatusLightInterval
void UpdateStatusLights()

References GetGame(), and UpdateStatusLights().

◆ OnWorkStart() [3/11]

override void ItemBase::OnWorkStart ( )
inlineprotected

Definition at line 11 of file Blowtorch.c.

12 {
13 super.OnWorkStart();
14
15#ifndef SERVER
16 m_Light = BlowtorchLight.Cast(ScriptedLightBase.CreateLight(BlowtorchLight, "0 0 0"));
17 m_Light.AttachOnMemoryPoint(this, "light");
18#endif
19
22 }
void SoundBurningStart()
Definition Blowtorch.c:49

References m_Light.

◆ OnWorkStart() [4/11]

override void ItemBase::OnWorkStart ( )
inlineprivate

Definition at line 41 of file Defibrillator.c.

42 {
43 if (!GetGame().IsDedicatedServer())
45
47 GetCompEM().SetEnergyUsage(energy_needed);
48
49 if (!m_ChargingTimer)
51
52 if (!m_ChargingTimer.IsRunning())
53 m_ChargingTimer.Run(m_ChargeTime, this, "OnIsCharged", NULL, false);
54 }
static const string CHARGING_SOUND
ref Timer m_ChargingTimer
static float m_ChargeTime

References CALL_CATEGORY_GAMEPLAY, GetGame(), m_ChargeTime, and SEffectManager::PlaySoundOnObject().

◆ OnWorkStart() [5/11]

override void ItemBase::OnWorkStart ( )
inlineprivate

Definition at line 13 of file Flashlight.c.

14 {
15 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // Client side
16 {
17 m_Light = FlashlightLight.Cast(ScriptedLightBase.CreateLight(FlashlightLight, "0 0 0", 0.08)); // Position is zero because light is attached on parent immediately.
18 m_Light.AttachOnMemoryPoint(this, "beamStart", "beamEnd");
19 }
20
21 SetObjectMaterial(GLASS_ID, LIGHT_ON_GLASS);
22 SetObjectMaterial(REFLECTOR_ID, LIGHT_ON_REFLECTOR);
23 }
static int GLASS_ID
Definition Flashlight.c:6
static int REFLECTOR_ID
Definition Flashlight.c:5
static string LIGHT_ON_GLASS
Definition Flashlight.c:10
static string LIGHT_ON_REFLECTOR
Definition Flashlight.c:11

References GetGame(), and m_Light.

◆ OnWorkStart() [6/11]

override void ItemBase::OnWorkStart ( )
inlineprotected

Definition at line 34 of file PortableGasLamp.c.

35 {
36 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // client side
37 {
38 m_Light = PortableGasLampLight.Cast(ScriptedLightBase.CreateLight(PortableGasLampLight, "0 0 0"));
39 m_Light.AttachOnMemoryPoint(this, "light");
40 }
41
42 //refresh visual
43 SetObjectMaterial(0, GAS_LIGHT_MATERIAL_ON);
44
45 //sound (client only)
47 }
const string GAS_LIGHT_MATERIAL_ON

References GetGame(), and m_Light.

◆ OnWorkStart() [7/11]

override void ItemBase::OnWorkStart ( )
inlineprotected

Definition at line 140 of file PortableGasStove.c.

141 {
142 super.OnWorkStart();
143
144#ifndef SERVER
145 m_Light = StoveLight.Cast(ScriptedLightBase.CreateLight(StoveLight, "0 0 0"));
146 m_Light.AttachOnMemoryPoint(this, "light");
147#endif
148
149 //refresh visual
151
152 //sound (client only)
154 }

References GetCookingEquipment(), and m_Light.

◆ OnWorkStart() [8/11]

override void ItemBase::OnWorkStart ( )
inlineprotected

Definition at line 132 of file PowerGenerator.c.

133 {
134 if (GetGame().IsClient() || !GetGame().IsMultiplayer())
135 {
136 if (IsInitialized())
137 PlaySoundSet(m_EngineStart, START_SOUND, 0, 0);
138
141
142 if (!m_SoundLoopStartTimer.IsRunning()) // Makes sure the timer is NOT running already
143 m_SoundLoopStartTimer.Run(1.5, this, "StartLoopSound", NULL, false);
144 }
145
146 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
147 m_UTSource.SetDefferedActive(true, 20.0);
148 }
EffectSound m_EngineStart
static const string START_SOUND
ref Timer m_SoundLoopStartTimer

References CALL_CATEGORY_SYSTEM, GetGame(), IsInitialized(), and m_UTSource.

◆ OnWorkStart() [9/11]

override void ItemBase::OnWorkStart ( )
inlineprotected

Definition at line 7 of file Raycaster.c.

8 {
9 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // Client side
11 }
void StartPeriodicMeasurement()
Definition Raycaster.c:13

References GetGame().

◆ OnWorkStart() [10/11]

override void ItemBase::OnWorkStart ( )
inlineprivate

Definition at line 16 of file Refridgerator.c.

17 {
18 // TO DO: Slow down or stop the aging of food inside of the fridge when such functionality is created.
19
20 m_SoundLoopEntity = PlaySoundLoop("powerGeneratorLoop", 50); // using placeholder sound
21 }

◆ OnWorkStart() [11/11]

override void ItemBase::OnWorkStart ( )
inlineprotected

Definition at line 110 of file Spotlight.c.

111 {
112#ifndef SERVER
113 m_Light = SpotlightLight.Cast(ScriptedLightBase.CreateLight(SpotlightLight, "0 0 0"));
115#endif
116
118 }

References m_Light, and UpdateAllSelections().

◆ OnWorkStop() [1/11]

override void ItemBase::OnWorkStop ( )
inlineprotected

Definition at line 208 of file BarbedWire.c.

209 {
211 if (m_TriggerActive)
213
214 if (m_IsPlaced)
216
217 m_SparkEvent.Stop();
218 }
void SoundBuzzLoopStop()
Definition BarbedWire.c:330

References CreateDamageTrigger(), DestroyDamageTrigger(), and SoundBuzzLoopStop().

◆ OnWorkStop() [2/11]

override void ItemBase::OnWorkStop ( )
inlineprotected

Definition at line 107 of file BatteryCharger.c.

108 {
109 if (GetGame().IsClient() || !GetGame().IsMultiplayer())
110 {
113 }
114 }

References GetGame(), and UpdateStatusLights().

◆ OnWorkStop() [3/11]

override void ItemBase::OnWorkStop ( )
inlineprotected

Definition at line 24 of file Blowtorch.c.

25 {
26#ifndef SERVER
27 if (m_Light)
28 m_Light.FadeOut();
29#endif
30
31 RefreshFlameVisual(false);
33 }
void SoundBurningStop()
Definition Blowtorch.c:54

References m_Light.

◆ OnWorkStop() [4/11]

override void ItemBase::OnWorkStop ( )
inlineprivate

Definition at line 56 of file Defibrillator.c.

57 {
58 GetCompEM().SwitchOff();
59 GetCompEM().ResetEnergyUsage();
63
64 m_IsCharged = false;
65 }
void StopChargedAlarm()
void StopChargingSound()
void StopChargingTimer()

References StopChargedAlarm(), StopChargingSound(), and StopChargingTimer().

◆ OnWorkStop() [5/11]

override void ItemBase::OnWorkStop ( )
inlineprivate

Definition at line 43 of file Flashlight.c.

44 {
45 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // Client side
46 {
47 if (m_Light)
48 m_Light.FadeOut();
49
50 m_Light = NULL;
51 }
52
53 SetObjectMaterial(GLASS_ID, LIGHT_OFF_GLASS);
54 SetObjectMaterial(REFLECTOR_ID, LIGHT_OFF_REFLECTOR);
55 }
static string LIGHT_OFF_REFLECTOR
Definition Flashlight.c:9
static string LIGHT_OFF_GLASS
Definition Flashlight.c:8

References GetGame(), and m_Light.

◆ OnWorkStop() [6/11]

override void ItemBase::OnWorkStop ( )
inlineprotected

Definition at line 49 of file PortableGasLamp.c.

50 {
51 if (m_Light)
52 m_Light.FadeOut();
53
54 //refresh visual
55 SetObjectMaterial(0, GAS_LIGHT_MATERIAL_OFF);
56
57 //sound (client only)
59 }
const string GAS_LIGHT_MATERIAL_OFF

References m_Light.

◆ OnWorkStop() [7/11]

override void ItemBase::OnWorkStop ( )
inlineprotected

Definition at line 156 of file PortableGasStove.c.

157 {
158#ifndef SERVER
159 if (m_Light)
160 m_Light.FadeOut();
161#endif
162
163 //refresh visual
164 RefreshFlameVisual(false, false);
165 //stop steam particle
167 //sound (client only)
169 }

References m_Light.

◆ OnWorkStop() [8/11]

override void ItemBase::OnWorkStop ( )
inlineprotected

Definition at line 166 of file PowerGenerator.c.

167 {
168 if (GetGame().IsClient() || !GetGame().IsMultiplayer())
169 {
170 // Sound
171 PlaySoundSet(m_EngineStop, STOP_SOUND, 0, 0);
172 StopSoundSet(m_EngineLoop);
173
174 // particle
176
177 // Fuel meter
179 }
180
181 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
182 m_UTSource.SetDefferedActive(false, 20.0);
183 }
static const string STOP_SOUND
EffectSound m_EngineLoop
EffectSound m_EngineStop

References SEffectManager::DestroyEffect(), GetGame(), m_UTSource, and UpdateFuelMeter().

◆ OnWorkStop() [9/11]

override void ItemBase::OnWorkStop ( )
inlineprotected

Definition at line 57 of file Raycaster.c.

58 {
59 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // Client side
61 }
void StopPeriodicMeasurement()
Definition Raycaster.c:51

References GetGame().

◆ OnWorkStop() [10/11]

override void ItemBase::OnWorkStop ( )
inlineprivate

Definition at line 28 of file Refridgerator.c.

29 {
30 // TO DO: Allow food inside the fridge to start aging again.
31
32 GetGame().ObjectDelete(m_SoundLoopEntity);
34 }

References GetGame().

◆ OnWorkStop() [11/11]

override void ItemBase::OnWorkStop ( )
inlineprotected

Definition at line 120 of file Spotlight.c.

121 {
122#ifndef SERVER
123 if (m_Light)
124 m_Light.FadeOut();
125#endif
126
128 }

References m_Light, and UpdateAllSelections().

◆ Pack()

void ItemBase::Pack ( bool update_navmesh,
bool init = false )
inlineprotected

Definition at line 466 of file TentBase.c.

467 {
469
470 m_State = PACKED;
474
475 Refresh();
476
477 GetInventory().LockInventory(HIDE_INV_FROM_SCRIPT);
478
479 if (update_navmesh)
481
483
484 if (GetGame().IsServer() && !IsHologram())
485 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(this, m_HalfExtents);
486
487 SetSynchDirty();
488
489 if ((!GetGame().IsDedicatedServer()) && !init)
490 GetOnViewIndexChanged().Invoke();
491 }
enum MagnumStableStateID init
void Refresh()
Definition TentBase.c:587
void HideAllAnimationsAndProxyPhysics(bool hide_animations=true, bool hide_physics=true)
Definition TentBase.c:250
void RegenerateNavmesh()
Definition TentBase.c:745

References GetGame(), init, IsHologram(), m_HalfExtents, m_State, and Refresh().

◆ Paper()

void ItemBase::Paper ( )
inlineprotected

Definition at line 5 of file Paper.c.

◆ ParticleTest()

void ItemBase::ParticleTest ( )
inlineprotected

Definition at line 9 of file ParticleTest.c.

10 {
11 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // Client side
12 {
14
15
16 // Enter particle ID to play when ParticleTest spawns
18
19 // Alternatively, uncomment the second line and enter particle filename without *.ptc suffix instead. Example: "menu_engine_fire"
20 string particle_filename = "menu_engine_fire";
21 //PARTICLE_PATH = ParticleList.GetParticleID( path + particle_filename );
22
23
24 m_Particle = ParticleManager.GetInstance().PlayOnObject(PARTICLE_PATH, this, GetPosition());
25 }
26 }
int PARTICLE_PATH
Definition ParticleTest.c:5
static string GetPathToParticles()
Returns base path to all particles.

References ParticleList::DEBUG_DOT, GetGame(), ParticleList::GetPathToParticles(), GetPosition, ParticleManager(), and path.

◆ PerformRoofCheckForBase()

bool ItemBase::PerformRoofCheckForBase ( string partName,
PlayerBase player,
out bool result )
inlineprotected

Definition at line 931 of file BaseBuildingBase.c.

932 {
933 return false;
934 }

◆ PileOfWoodenPlanks()

void ItemBase::PileOfWoodenPlanks ( )
inlineprivate

Definition at line 3 of file PileOfWoodenPlanks.c.

4 {
5 if (GetGame().IsServer())
6 SetAllowDamage(false);
7 }

References GetGame().

◆ Pitch()

void ItemBase::Pitch ( bool update_navmesh,
bool init = false )
inlineprotected

Definition at line 493 of file TentBase.c.

494 {
496
501
502 Refresh();
503
504 GetInventory().UnlockInventory(HIDE_INV_FROM_SCRIPT);
505
506 if (update_navmesh)
508
509 SetSynchDirty();
510
511 if ((!GetGame().IsDedicatedServer()) && !init)
512 GetOnViewIndexChanged().Invoke();
513 }

References GetGame(), init, m_State, and Refresh().

◆ Pitchfork()

void ItemBase::Pitchfork ( )
inlineprivate

Definition at line 3 of file Pitchfork.c.

4 {
5 }

◆ PlaceOnGround()

void ItemBase::PlaceOnGround ( )
inlineprivate

Definition at line 5 of file UndergroundStash.c.

6 {
7 vector pos = GetPosition();
8 pos[1] = GetGame().SurfaceRoadY(pos[0], pos[2]);
9 pos[1] = pos[1] + 0.22;
10 SetPosition(pos);
11 }
proto native void SetPosition(vector position)
Set the world position of the Effect.
Definition Effect.c:420

References GetGame(), GetPosition, and SetPosition().

◆ PlantBase()

void ItemBase::PlantBase ( )
inlineprivate

Definition at line 46 of file PlantBase.c.

47 {
48 m_ModuleHorticulture = PluginHorticulture.Cast(GetPlugin(PluginHorticulture));
49
50 m_SprayUsage = 5;
51 m_DeleteDryPlantTime = (60 * 10) + Math.RandomInt(0, 60 * 2);
52 m_SpoiledRemoveTime = (60 * 20) + Math.RandomInt(0, 60 * 5);
53
54 //Must be between 0 and 1
55 m_InfestationChance = 0.2; // Temporarily disabled until its fixed. Infestation is not visualy persistent over server restarts and m_SpoiledRemoveTimer crashes when it's meant to delete the plant.
56
57 string plant_type = this.GetType();
58 m_GrowthStagesCount = GetGame().ConfigGetInt("cfgVehicles " + plant_type + " Horticulture GrowthStagesCount");
59 m_CropsCount = GetGame().ConfigGetInt("cfgVehicles " + plant_type + " Horticulture CropsCount");
60 GetGame().ConfigGetText("cfgVehicles " + plant_type + " Horticulture CropsType", m_CropsType);
61
64 m_IsInfested = false;
65 m_SprayQuantity = 0.0;
66 m_HasCrops = true;
67
68 SetTakeable(false);
69
70
71 RegisterNetSyncVariableBool("m_HasCrops");
72 RegisterNetSyncVariableInt("m_PlantState");
73 RegisterNetSyncVariableInt("m_PlantStateIndex");
74 }
override void SetTakeable(bool pState)
Definition ItemBase.c:8905
PluginBase GetPlugin(typename plugin_type)

References GetGame(), GetPlugin(), GetType(), Math::RandomInt(), and SetTakeable().

◆ PlantSeed()

void ItemBase::PlantSeed ( ItemBase seed,
string selection_component )
inlineprivate

Definition at line 380 of file GardenBase.c.

381 {
383
384 if (slot_index != -1)
385 {
386 PluginHorticulture module_horticulture = PluginHorticulture.Cast(GetPlugin(PluginHorticulture));
387 string plant_type = module_horticulture.GetPlantType(seed);
388
389 Slot slot = m_Slots.Get(slot_index);
390 slot.SetState(Slot.STATE_PLANTED);
391 slot.m_PlantType = plant_type;
392 slot.SetSeed(seed);
393
394 if (!slot.NeedsWater())
395 {
396 seed.LockToParent();
397 //Take some small amount of time before making a plant out of seeds
401 growthTimer.Run(0.1, this, "CreatePlant", createPlantParam, false); //Use a const for timer delay
402 }
403 }
404 }
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12

References CALL_CATEGORY_SYSTEM, and GetPlugin().

◆ PlayDeployLoopSound() [1/5]

void ItemBase::PlayDeployLoopSound ( )
inlineprotected

Definition at line 144 of file BarbedWire.c.

145 {
146 if (!GetGame().IsDedicatedServer())
147 {
150 }
151 }
bool IsSoundPlaying()
Get whether EffectSound is currently playing.
override string GetLoopDeploySoundset()
Definition BarbedWire.c:428

References GetGame(), GetLoopDeploySoundset(), GetPosition, m_DeployLoopSound, and SEffectManager::PlaySound().

Referenced by OnVariablesSynchronized().

◆ PlayDeployLoopSound() [2/5]

void ItemBase::PlayDeployLoopSound ( )
inlineprotected

◆ PlayDeployLoopSound() [3/5]

void ItemBase::PlayDeployLoopSound ( )
inlineprotected

Definition at line 382 of file Spotlight.c.

383 {
384 if (!GetGame().IsDedicatedServer() && !m_DeployLoopSound)
385 {
388 }
389 }
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.

References GetGame(), GetLoopDeploySoundset(), GetPosition, m_DeployLoopSound, and SEffectManager::PlaySound().

◆ PlayDeployLoopSound() [4/5]

void ItemBase::PlayDeployLoopSound ( )
inlineprotected

◆ PlayDeployLoopSound() [5/5]

void ItemBase::PlayDeployLoopSound ( )
inlineprivate

◆ PostAreaDamageActions()

override void ItemBase::PostAreaDamageActions ( )
inlineprotected

Definition at line 377 of file BarbedWire.c.

378 {
379 //dmg to barbed wire here
380 MiscGameplayFunctions.DealAbsoluteDmg(this, 1000);
381 }

◆ PowerGeneratorBase()

void ItemBase::PowerGeneratorBase ( )
inlineprotected

Definition at line 27 of file PowerGenerator.c.

28 {
29 SetEventMask(EntityEvent.INIT); // Enable EOnInit event
30
32 RegisterNetSyncVariableInt("m_FuelPercentage");
33 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
34 RegisterNetSyncVariableBool("m_IsPlaceSound");
35 }

◆ PreAreaDamageActions()

override void ItemBase::PreAreaDamageActions ( )
inlineprotected

Definition at line 367 of file BarbedWire.c.

368 {
369 if (GetCompEM().IsPlugged() && GetCompEM().IsSwitchedOn())
370 {
371 Spark();
373 }
375 }
void SoundElectricShock()
Definition BarbedWire.c:343
void SoundCollision()
Definition BarbedWire.c:354
void Spark()
Definition BarbedWire.c:289

References SoundCollision(), SoundElectricShock(), and Spark().

◆ PrepareMeasurement()

void ItemBase::PrepareMeasurement ( )
inlineprotected

Definition at line 21 of file Raycaster.c.

22 {
25 }
void DoMeasurement()
Definition Raycaster.c:27

◆ PrintSlots()

void ItemBase::PrintSlots ( )
inlineprivate

Definition at line 233 of file GardenBase.c.

234 {
235 Debug.Log("PRINT ALL SLOTS FROM...");
236 Debug.Log("" + this);
237 int slots = GetInventory().GetAttachmentSlotsCount();
238 Debug.Log("Nb Slots : " + slots);
239
240 for (int i = 0; i < slots ; i++)
241 {
242 Slot slot = m_Slots.Get(i);
243 Debug.Log("i : " + i);
244 Debug.Log("Slot : " + slot);
245
246 float slot_fertility = slot.GetFertility();
247 float slot_fertility_usage = slot.GetFertilityMax();
248 string slot_fertility_type = slot.GetFertilityType();
249 float slot_water = slot.GetWater();
250 float slot_water_usage = slot.GetWaterUsage();
251 ItemBase slot_seed = slot.GetSeed();
252 ItemBase slot_plant = slot.GetPlant();
253 float slot_state = slot.GetState();
254 float slot_slot_Index = slot.GetSlotIndex();
255 float slot_slot_ID = slot.GetSlotId();
256 int slot_wateredState = slot.GetWateredState();
257 int slot_FertilityState = slot.GetFertilityState();
258
259 Debug.Log("Fertility : " + slot_fertility);
260 Debug.Log("Fertility Usage : " + slot_fertility_usage);
261 Debug.Log("Fertility Type : " + slot_fertility_type);
262 Debug.Log("Fertility State : " + slot_FertilityState);
263 Debug.Log("Water : " + slot_water);
264 Debug.Log("Water Usage : " + slot_water_usage);
265 Debug.Log("Watered State : " + slot_wateredState);
266 Debug.Log("Seed : " + slot_seed);
267 Debug.Log("Plant : " + slot_plant);
268 Debug.Log("State : " + slot_state);
269 Debug.Log("Slot Index : " + slot_slot_Index);
270 Debug.Log("Slot ID : " + slot_slot_ID);
271 Debug.Log("///////////////////////////");
272 }
273
274 Debug.Log("END OF ALL SLOTS FOR...");
275 Debug.Log("" + this);
276 }
Definition Debug.c:14
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:133

References Debug::Log().

◆ PrintValues()

void ItemBase::PrintValues ( )
inlineprivate

Definition at line 402 of file PlantBase.c.

403 {
404 Print("PRINT ALL VALUES OF PLANT...");
405 Print(this);
406
413 Print(m_Slot);
415 Print("----------------------------------------------------------");
416 }

References Print().

◆ RedLightOff()

void ItemBase::RedLightOff ( )
inlineprotected

Definition at line 306 of file BatteryCharger.c.

307 {
308 SetObjectMaterial(0, DEFAULT_MATERIAL);
309 }

Referenced by UpdateStatusLights().

◆ RedLightOn()

void ItemBase::RedLightOn ( )
inlineprotected

Definition at line 289 of file BatteryCharger.c.

290 {
291 SetObjectMaterial(0, RED_LIGHT_GLOW);
292 }
const string RED_LIGHT_GLOW

Referenced by UpdateStatusLights().

◆ Refresh()

void ItemBase::Refresh ( )
inlineprotected

Definition at line 587 of file TentBase.c.

588 {
589 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).Call(UpdateVisuals);
591 }

References CALL_CATEGORY_GAMEPLAY, GetGame(), UpdatePhysics(), and UpdateVisuals().

◆ RefreshAttachements()

void ItemBase::RefreshAttachements ( )
inlineprotected

Definition at line 305 of file TentBase.c.

306 {
307 int slot_id_camo;
308 int slot_id_xlights;
310
312 m_CamoNet = CamoNet.Cast(GetInventory().FindAttachment(slot_id_camo));
313
315 eai_xlights = GetInventory().FindAttachment(slot_id_xlights);
316
317 if (m_CamoNet)
318 {
320 //SetAnimationPhase("Camonet", 0);
321
322 if (!IsKindOf("MediumTent"))
323 AddProxyPhysics("camonet");
324 }
325
326 if (eai_xlights)
327 {
328 SetAnimationPhase("Xlights", 0);
329 SetAnimationPhase("Xlights_glass_r", 0);
330 SetAnimationPhase("Xlights_glass_g", 0);
331 SetAnimationPhase("Xlights_glass_b", 0);
332 SetAnimationPhase("Xlights_glass_y", 0);
333 }
334 }

References InventorySlots::GetSlotIdFromString(), and TentBase::HandleCamoNetAttachment().

◆ RefreshFlameVisual() [1/2]

void ItemBase::RefreshFlameVisual ( bool working = false)
inlineprotected

Definition at line 35 of file Blowtorch.c.

36 {
37 if (working)
38 {
39 SetObjectTexture(0, TEXTURE_FLAME);
40 SetAnimationPhase(ANIM_PHASE_FLAME, 0.0);
41 }
42 else
43 {
44 SetObjectTexture(0, "");
45 SetAnimationPhase(ANIM_PHASE_FLAME, 1.0);
46 }
47 }
const string ANIM_PHASE_FLAME
Definition Blowtorch.c:4
const string TEXTURE_FLAME
Definition Blowtorch.c:3

◆ RefreshFlameVisual() [2/2]

void ItemBase::RefreshFlameVisual ( bool working = false,
bool hasAttachment = false )
inlineprotected

full size flame selection

shrinked flame selection

Definition at line 209 of file PortableGasStove.c.

210 {
211 if (!working)
212 {
213 SetObjectTexture(0, FLAME_BUTANE_OFF);
214 SetObjectTexture(1, FLAME_BUTANE_OFF);
215
216 return;
217 }
218
219 if (!hasAttachment)
220 {
222 SetObjectTexture(0, FLAME_BUTANE_ON);
223 SetObjectTexture(1, FLAME_BUTANE_OFF);
224 }
225 else
226 {
228 SetObjectTexture(0, FLAME_BUTANE_OFF);
229 SetObjectTexture(1, FLAME_BUTANE_ON);
230 }
231 }
const string FLAME_BUTANE_OFF
const string FLAME_BUTANE_ON

◆ RefreshPhysics() [1/3]

override void ItemBase::RefreshPhysics ( )
inlineprotected

Definition at line 363 of file BatteryCharger.c.

364 {
365 super.RefreshPhysics();
366
367 if (GetAttachmentByType(CarBattery))
368 {
369 RemoveProxyPhysics("battery");
370 AddProxyPhysics("battery");
371 }
372 else
373 RemoveProxyPhysics("battery");
374 }

Referenced by InventoryItem::OnCreatePhysics().

◆ RefreshPhysics() [2/3]

override void ItemBase::RefreshPhysics ( )
inlineprotected

Definition at line 130 of file KitBase.c.

131 {
132 super.RefreshPhysics();
133
135 }

References UpdatePhysics().

◆ RefreshPhysics() [3/3]

override void ItemBase::RefreshPhysics ( )
inlineprotected

Definition at line 140 of file TentBase.c.

141 {
142 super.RefreshPhysics();
143
144 if (m_State == PITCHED)
145 TryPitch(false, true);
146 else
147 Pack(false, true);
148 }

References m_State.

◆ RegenerateNavmesh()

void ItemBase::RegenerateNavmesh ( )
inlineprotected

Definition at line 745 of file TentBase.c.

746 {
747 SetAffectPathgraph(true, false);
748
749 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, this);
750 }

References CALL_CATEGORY_SYSTEM, and GetGame().

◆ RegisterActionForSync()

void ItemBase::RegisterActionForSync ( int part_id,
int action_id )
inlineprotected

Definition at line 212 of file BaseBuildingBase.c.

References m_InteractedPartId, and m_PerformedActionId.

◆ RegisterPartForSync()

void ItemBase::RegisterPartForSync ( int part_id)
inlineprotected

Definition at line 120 of file BaseBuildingBase.c.

121 {
122 //part_id must starts from index = 1
123 int offset;
124 int mask;
125
126 if (part_id >= 1 && part_id <= 31) //<1,31> (31 parts)
127 {
128 offset = part_id - 1;
129 mask = 1 << offset;
130
132 }
133 else if (part_id >= 32 && part_id <= 62) //<32,62> (31 parts)
134 {
135 offset = (part_id % 32);
136 mask = 1 << offset;
137
139 }
140 else if (part_id >= 63 && part_id <= 93) //<63,93> (31 parts)
141 {
142 offset = (part_id % 63);
143 mask = 1 << offset;
144
146 }
147 }

References m_SyncParts01, m_SyncParts02, and m_SyncParts03.

◆ RemoveCookingAudioVisuals()

void ItemBase::RemoveCookingAudioVisuals ( )
inlineprotected

Definition at line 237 of file PortableGasStove.c.

238 {
240 if (cookEquipment)
241 {
242 switch (cookEquipment.Type())
243 {
247 cookingPot.RemoveAudioVisualsOnClient();
248 break;
250 FryingPan fryingPan = FryingPan.Cast(cookEquipment);
251 fryingPan.RemoveAudioVisualsOnClient();
252 break;
253 }
254 }
255 }

References ATTACHMENT_CAULDRON, ATTACHMENT_COOKING_POT, ATTACHMENT_FRYING_PAN, and GetCookingEquipment().

◆ RemovePlanks()

int ItemBase::RemovePlanks ( int needed_planks)
inlineprivate

Definition at line 70 of file PileOfWoodenPlanks.c.

71 {
72 // Make sure to not give more long planks than we have available
76
77 // Remove long planks from this object
78 AddQuantity(-available_planks, true); // Autodelete enabled
79
80 // Visual feedback
82
83 // Return the number of removed long planks
84 return available_planks;
85 }

References AddQuantity(), GetQuantity(), and UpdateSelections().

◆ RemovePlant()

void ItemBase::RemovePlant ( )
inlineprivate

Definition at line 641 of file PlantBase.c.

642 {
643 if (GetGame() && GetGame().IsServer())
644 {
646
648 {
649 vector pos = GetPosition();
650 ItemBase item = ItemBase.Cast(GetGame().CreateObjectEx("PlantMaterial", pos, ECE_PLACE_ON_SURFACE));
651 item.SetQuantity(m_CurrentPlantMaterialQuantity * 1000.0);
652 }
653
654 RemoveSlot();
655 }
656 }

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and UnlockFromParent().

◆ RemovePlantEx()

void ItemBase::RemovePlantEx ( vector pos)
inlineprivate

Definition at line 658 of file PlantBase.c.

659 {
660 if (GetGame() && GetGame().IsServer())
661 {
663
665 {
666 ItemBase item = ItemBase.Cast(GetGame().CreateObjectEx("PlantMaterial", pos, ECE_PLACE_ON_SURFACE));
667 item.SetQuantity(m_CurrentPlantMaterialQuantity * 1000.0);
668 }
669
670 RemoveSlot();
671 }
672 }

References ECE_PLACE_ON_SURFACE, GetGame(), and UnlockFromParent().

◆ RemoveSlot() [1/2]

void ItemBase::RemoveSlot ( )
inlineprivate

Definition at line 767 of file PlantBase.c.

768 {
769 GardenBase garden = GardenBase.Cast(GetHierarchyParent());
770
771 if (garden)
772 {
774 {
777 }
778
779 garden.RemoveSlotPlant(this);
780 }
781 }

◆ RemoveSlot() [2/2]

void ItemBase::RemoveSlot ( int index)
inlineprivate

Definition at line 589 of file GardenBase.c.

590 {
591 if (m_Slots != NULL)
592 {
593 Slot slot = m_Slots.Get(index);
594 PlantBase plant = slot.GetPlant();
595
596 if (plant)
597 {
598 plant.UnlockFromParent();
599 plant.m_MarkForDeletion = true;
600 GetGame().ObjectDelete(plant);
601 }
602
603 slot.Init(GetBaseFertility());
604
605 // Clear relevant bit
606 slot.SetFertilityState(eFertlityState.NONE);
607 m_SlotFertilityState &= ~(1 << slot.GetSlotIndex());
608
609 slot.SetWateredState(eWateredState.DRY);
610 m_SlotWateredState &= ~(1 << slot.GetSlotIndex());
611
612 SetSynchDirty();
613
614 HideSelection(SLOT_SELECTION_COVERED_PREFIX + (index + 1).ToStringLen(2));
616 }
617 }
static const string SLOT_SELECTION_COVERED_PREFIX
Definition GardenBase.c:18

References GetGame(), and ToStringLen().

◆ RemoveSlotPlant()

void ItemBase::RemoveSlotPlant ( Object plant)
inlineprivate

Definition at line 619 of file GardenBase.c.

620 {
622 if (index >= 0)
624 }
int GetSlotIndexByPlant(Object plant)
Definition GardenBase.c:683

◆ ResetActionSyncData()

void ItemBase::ResetActionSyncData ( )
inlineprotected

Definition at line 218 of file BaseBuildingBase.c.

219 {
220 //reset data
223 }

References m_InteractedPartId, and m_PerformedActionId.

◆ ResetToggle()

void ItemBase::ResetToggle ( )
inlineprotected

Definition at line 614 of file TentBase.c.

615 {
616 m_IsEntrance = false;
617 m_IsWindow = false;
618 m_IsToggle = false;
619 }

◆ SetActionFromSyncData()

void ItemBase::SetActionFromSyncData ( )
inlineprotected

Definition at line 225 of file BaseBuildingBase.c.

226 {
228 {
231
232 switch (build_action_id)
233 {
237 }
238 }
239 }
const int AT_DISMANTLE_PART
Definition _constants.c:7
void OnPartDestroyedClient(string part_name, int action_id)
void OnPartDismantledClient(string part_name, int action_id)
void OnPartBuiltClient(string part_name, int action_id)
ConstructionPart GetConstructionPartById(int id)

References AT_BUILD_PART, AT_DESTROY_PART, AT_DISMANTLE_PART, GetConstructionPartById(), m_InteractedPartId, m_PerformedActionId, OnPartBuiltClient(), OnPartDestroyedClient(), and OnPartDismantledClient().

◆ SetActions() [1/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 698 of file InventoryItem.c.

699 {
700 super.SetActions();
701
702 AddAction(ActionAttach);
703 }
void AddAction(typename actionName)

References AddAction().

Referenced by InventoryItem::InitializeActions().

◆ SetActions() [2/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 708 of file InventoryItem.c.

709 {
710 super.SetActions();
711
712 AddAction(ActionAttach);
713 }

References AddAction().

◆ SetActions() [3/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 720 of file InventoryItem.c.

721 {
722 super.SetActions();
723
725 }

References AddAction().

◆ SetActions() [4/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 737 of file InventoryItem.c.

738 {
739 super.SetActions();
740
743 }
void ActionDetach()

References ActionDetach(), and AddAction().

◆ SetActions() [5/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 752 of file InventoryItem.c.

753 {
754 super.SetActions();
755
757 AddAction(ActionAttach);
758 }

References ActionDetach(), and AddAction().

◆ SetActions() [6/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 773 of file InventoryItem.c.

774 {
775 super.SetActions();
776
779 }

References ActionDetach(), and AddAction().

◆ SetActions() [7/49]

override void ItemBase::SetActions ( )
inlineprivate

◆ SetActions() [8/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 837 of file PlantBase.c.

838 {
839 super.SetActions();
840
843 }

References AddAction().

◆ SetActions() [9/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 37 of file BandageDressing.c.

38 {
39 super.SetActions();
40
45 AddAction(ActionAttach);
47 }
ActionBandageSelfCB ActionContinuousBaseCB ActionBandageSelf()
ActionBandageTargetCB ActionContinuousBaseCB ActionBandageTarget()

References ActionBandageSelf(), ActionBandageTarget(), ActionDetach(), and AddAction().

◆ SetActions() [10/49]

override void ItemBase::SetActions ( )
inlineprotected

◆ SetActions() [11/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 37 of file Bark_ColorBase.c.

38 {
39 super.SetActions();
40
43 AddAction(ActionAttach);
45 }

References ActionDetach(), and AddAction().

◆ SetActions() [12/49]

override void ItemBase::SetActions ( )
inlineprotected

Definition at line 1107 of file BaseBuildingBase.c.

1108 {
1109 super.SetActions();
1110
1112 //AddAction(ActionTakeHybridAttachment);
1113 //AddAction(ActionTakeHybridAttachmentToHands);
1116 }
void RemoveAction(typename actionName)

References AddAction(), and RemoveAction().

◆ SetActions() [13/49]

◆ SetActions() [14/49]

override void ItemBase::SetActions ( )
inlineprotected

Definition at line 95 of file Blowtorch.c.

96 {
97 super.SetActions();
98
104 }
ActionLightItemOnFireWithBlowtorchCB ActionLightItemOnFireCB ActionLightItemOnFireWithBlowtorch()
ActionRepairCarChassisWithBlowtorchCB ActionRepairCarChassisCB ActionRepairCarChassisWithBlowtorch()
ActionRepairCarEngineWithBlowtorchCB ActionRepairCarEngineCB ActionRepairCarEngineWithBlowtorch()
ActionRepairCarPartWithBlowtorchCB ActionRepairCarPartCB ActionRepairCarPartWithBlowtorch()
ActionRepairItemWithBlowtorchCB ActionContinuousBaseCB ActionRepairItemWithBlowtorch()

References ActionLightItemOnFireWithBlowtorch(), ActionRepairCarChassisWithBlowtorch(), ActionRepairCarEngineWithBlowtorch(), ActionRepairCarPartWithBlowtorch(), ActionRepairItemWithBlowtorch(), and AddAction().

◆ SetActions() [15/49]

◆ SetActions() [16/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 3 of file CamoNet.c.

References AddAction().

◆ SetActions() [17/49]

◆ SetActions() [18/49]

◆ SetActions() [19/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 3 of file Firewood.c.

References ActionDetach(), and AddAction().

◆ SetActions() [20/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 110 of file Flag_Base.c.

111 {
112 super.SetActions();
113
114 AddAction(ActionAttach);
115 }

References AddAction().

◆ SetActions() [21/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 73 of file Flashlight.c.

References AddAction().

◆ SetActions() [22/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 37 of file GiftWrapPaper.c.

References ActionDetach(), and AddAction().

◆ SetActions() [23/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 86 of file HandcuffsLocked.c.

References AddAction().

◆ SetActions() [24/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 21 of file HandDrillKit.c.

22 {
23 super.SetActions();
24
26 }
ActionLightItemOnFireCB ActionContinuousBaseCB ActionLightItemOnFire()

References ActionLightItemOnFire(), and AddAction().

◆ SetActions() [25/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 55 of file GardenLime.c.

56 {
57 super.SetActions();
58
59 //AddAction(ActionClapBearTrapWithThisItem);
61 }

References AddAction().

◆ SetActions() [26/49]

override void ItemBase::SetActions ( )
inlineprotected

Definition at line 196 of file KitBase.c.

197 {
198 super.SetActions();
199
201 AddAction(ActionDeployObject);
202 }

References AddAction().

◆ SetActions() [27/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 29 of file Matchbox.c.

30 {
31 super.SetActions();
32
34 }

References ActionLightItemOnFire(), and AddAction().

◆ SetActions() [28/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 3 of file MetalPlate.c.

References AddAction().

◆ SetActions() [29/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 113 of file MetalWire.c.

114 {
115 super.SetActions();
116
120 AddAction(ActionAttach);
121 }

References AddAction().

◆ SetActions() [30/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 3 of file Nail.c.

4 {
5 super.SetActions();
6
8 }

References AddAction().

◆ SetActions() [31/49]

override void ItemBase::SetActions ( )
inlineprotected

Definition at line 65 of file Paper.c.

66 {
67 super.SetActions();
68
71 AddAction(ActionAttach);
73 }

References ActionDetach(), and AddAction().

◆ SetActions() [32/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 8 of file Pelt_Base.c.

9 {
10 super.SetActions();
11
12 AddAction(ActionAttach);
14 }

References ActionDetach(), and AddAction().

◆ SetActions() [33/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 29 of file PetrolLighter.c.

30 {
31 super.SetActions();
32
34 }

References ActionLightItemOnFire(), and AddAction().

◆ SetActions() [34/49]

◆ SetActions() [35/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 7 of file Pitchfork.c.

8 {
9 super.SetActions();
11 }

References AddAction().

◆ SetActions() [36/49]

override void ItemBase::SetActions ( )
inlineprotected

◆ SetActions() [37/49]

override void ItemBase::SetActions ( )
inlineprotected

Definition at line 398 of file PortableGasStove.c.

References ActionLightItemOnFire(), and AddAction().

◆ SetActions() [38/49]

◆ SetActions() [39/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 73 of file Rag.c.

References ActionBandageSelf(), ActionBandageTarget(), ActionCraftArmband(), ActionDetach(), and AddAction().

◆ SetActions() [40/49]

override void ItemBase::SetActions ( )
inlineprotected

Definition at line 63 of file Raycaster.c.

References AddAction().

◆ SetActions() [41/49]

◆ SetActions() [42/49]

◆ SetActions() [43/49]

◆ SetActions() [44/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 3 of file Stone.c.

4 {
5 super.SetActions();
6
7 AddAction(ActionAttach);
10 }

References ActionDetach(), and AddAction().

◆ SetActions() [45/49]

override void ItemBase::SetActions ( )
inlineprotected

Definition at line 803 of file TentBase.c.

804 {
805 super.SetActions();
806
810 AddAction(ActionDeployObject);
811 }
ActionPackTentCB ActionContinuousBaseCB ActionPackTent()

References ActionPackTent(), and AddAction().

◆ SetActions() [46/49]

◆ SetActions() [47/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 495 of file TrapSpawnBase.c.

496 {
497 super.SetActions();
498
501 }
ActionActivateTrapCB ActionContinuousBaseCB ActionActivateTrap()

References ActionActivateTrap(), and AddAction().

◆ SetActions() [48/49]

override void ItemBase::SetActions ( )
inlineprivate

Definition at line 3 of file WoodenLog.c.

References AddAction().

◆ SetActions() [49/49]

◆ SetActive()

void ItemBase::SetActive ( )
inlineprivate

Definition at line 252 of file TrapSpawnBase.c.

253 {
254 if (GetGame().IsServer() && !IsActive())
255 {
256 m_IsActive = true;
257
259 {
260 SetAnimationPhase(m_AnimationPhaseSet, 1);
261 SetAnimationPhase(m_AnimationPhaseTriggered, 0);
262 SetAnimationPhase(m_AnimationPhaseUsed, 1);
263 }
264
265 // When activated we start timer for catch check
267 m_Timer.Run(m_InitWaitTime, this, "SpawnCatch");
268
269 SetSynchDirty();
270 }
271 }
string m_AnimationPhaseTriggered
int m_InitWaitTime
ref Timer m_Timer
Definition Raycaster.c:5
bool IsActive()
string m_AnimationPhaseSet
string m_AnimationPhaseUsed

References CALL_CATEGORY_GAMEPLAY, GetGame(), IsActive(), m_AnimationPhaseSet, m_AnimationPhaseTriggered, m_InitWaitTime, m_IsActive, and m_Timer.

◆ SetBaseFertility()

void ItemBase::SetBaseFertility ( float value)
inlineprivate

Definition at line 83 of file GardenBase.c.

84 {
86 }

◆ SetBaseState()

void ItemBase::SetBaseState ( bool has_base)
inlineprotected

Definition at line 324 of file BaseBuildingBase.c.

325 {
327 }

References m_HasBase.

◆ SetBloodTypeVisible()

void ItemBase::SetBloodTypeVisible ( bool visible)
inlineprivate

Definition at line 15 of file BloodContainerBase.c.

16 {
18 SetSynchDirty();
19 }

◆ SetCanCatch()

bool ItemBase::SetCanCatch ( out EntityAI bait)
inlineprivate

Definition at line 361 of file TrapSpawnBase.c.

362 {
363 int slotIdx = InventorySlots.GetSlotIdFromString("Trap_Bait");
364 bait = GetInventory().FindAttachment(slotIdx);
365
366 if (bait)
367 {
369 if (edibleBait)
370 {
371 if (!edibleBait.GetFoodStage().IsFoodBurned() && !edibleBait.GetFoodStage().IsFoodRotten())
372 return true;
373 else
374 return false; // We have invalid bait, no catch
375 }
376 }
377 // We are allowed to catch with no bait
378 return true;
379 }

References InventorySlots::GetSlotIdFromString().

◆ SetCookingEquipment()

void ItemBase::SetCookingEquipment ( ItemBase equipment)
inlineprotected

Definition at line 41 of file PortableGasStove.c.

42 {
44 }

References m_CookingEquipment.

◆ SetDeployed()

void ItemBase::SetDeployed ( bool newState)
inlineprivate

Definition at line 150 of file TrapSpawnBase.c.

151 {
153
154 if (newState == true)
155 {
157 {
158 SetAnimationPhase(m_AnimationPhaseSet, 1);
159 SetAnimationPhase(m_AnimationPhaseTriggered, 0);
160 SetAnimationPhase(m_AnimationPhaseUsed, 1);
161 }
162 }
163 else
164 {
166 {
167 SetAnimationPhase(m_AnimationPhaseSet, 0);
168 SetAnimationPhase(m_AnimationPhaseTriggered, 1);
169 SetAnimationPhase(m_AnimationPhaseUsed, 1);
170 }
171 }
172
173 SetSynchDirty();
174 }

References m_AnimationPhaseSet, and m_AnimationPhaseTriggered.

◆ SetFuel()

void ItemBase::SetFuel ( float fuel_amount)
inlineprotected

Definition at line 241 of file PowerGenerator.c.

242 {
243 if (m_FuelTankCapacity > 0)
244 {
245 m_FuelToEnergyRatio = GetCompEM().GetEnergyMax() / m_FuelTankCapacity;
246 GetCompEM().SetEnergy(fuel_amount * m_FuelToEnergyRatio);
247 m_FuelPercentage = GetCompEM().GetEnergy0To100();
248 SetSynchDirty();
250 }
251 else
252 {
253 string error = string.Format("ERROR! Item %1 has fuel tank with 0 capacity! Add parameter 'fuelTankCapacity' to its config and set it to more than 0!", this.GetType());
254 DPrint(error);
255 }
256 }
proto void DPrint(string var)
Prints content of variable to console/log. Should be used for critical messages so it will appear in ...

References DPrint(), GetType(), m_FuelTankCapacity, and UpdateFuelMeter().

Referenced by AddFuel(), and OnDebugSpawn().

◆ SetInactive()

void ItemBase::SetInactive ( )
inlineprivate

Definition at line 273 of file TrapSpawnBase.c.

274 {
275 if (GetGame().IsServer())
276 {
277 // We stop timers as the trap is no longer active, then update visuals
278 m_IsActive = false;
279 if (m_Timer)
280 m_Timer.Stop();
281
282 SetDeployed(false);
283
284 SetSynchDirty();
285 }
286 }

References GetGame(), m_IsActive, and m_Timer.

◆ SetIsBeingPacked()

void ItemBase::SetIsBeingPacked ( bool isBeingPacked)
inlineprotected

Definition at line 927 of file TentBase.c.

928 {
930 SetSynchDirty();
931 }

◆ SetMaxWaterStateVal()

void ItemBase::SetMaxWaterStateVal ( )
inlineprivate

Definition at line 118 of file GardenBase.c.

119 {
120 int state = 0;
121
122 for (int i = 0; i < m_Slots.Count(); i++)
123 state += 1 * Math.Pow(2, i);
124
126 }
static proto float Pow(float v, float power)
Return power of v ^ power.

References Math::Pow().

◆ SetMountedState()

void ItemBase::SetMountedState ( bool is_mounted)
inlineprotected

Definition at line 74 of file BarbedWire.c.

75 {
76 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " SetMountedState mounted=" + is_mounted);
77
78 //lock slot
82
83 //synchronize
85 }
void Synchronize()
Definition BarbedWire.c:117
void LockAttachmentSlot(bool lock_state)
Definition BarbedWire.c:102

References bsbDebugPrint(), GetDebugName(), LogManager::IsBaseBuildingLogEnable(), LockAttachmentSlot(), SetTakeable(), and Synchronize().

Referenced by AfterStoreLoad().

◆ SetPartFromSyncData()

void ItemBase::SetPartFromSyncData ( ConstructionPart part)
inlineprotected

Definition at line 242 of file BaseBuildingBase.c.

243 {
244 string key = part.m_PartName;
245 bool is_base = part.IsBase();
247 bsbDebugSpam("[bsb] " + GetDebugName(this) + " SetPartFromSyncData try to sync: built=" + is_part_built_sync + " key=" + key + " part=" + part.GetPartName() + " part_built=" + part.IsBuilt());
249 {
250 if (!part.IsBuilt())
251 {
252 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " SetPartsFromSyncData +++ " + key);
253 GetConstruction().AddToConstructedParts(key);
254 GetConstruction().ShowConstructionPartPhysics(part.GetPartName());
255
256 if (is_base)
257 {
259 RemoveProxyPhysics(ANIMATION_DEPLOYED);
260 }
261 }
262 }
263 else
264 {
265 if (part.IsBuilt())
266 {
267 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " SetPartsFromSyncData --- " + key);
268 GetConstruction().RemoveFromConstructedParts(key);
269 GetConstruction().HideConstructionPartPhysics(part.GetPartName());
270
271 if (is_base)
272 {
274 AddProxyPhysics(ANIMATION_DEPLOYED);
275 }
276 }
277 }
278
279 //check slot lock for material attachments
280 GetConstruction().SetLockOnAttachedMaterials(part.GetPartName(), part.IsBuilt()); //failsafe for corrupted sync/storage data
281 }
void bsbDebugSpam(string s)
bool IsPartBuildInSyncData(int part_id)

References ANIMATION_DEPLOYED, bsbDebugPrint(), bsbDebugSpam(), GetConstruction(), GetDebugName(), LogManager::IsBaseBuildingLogEnable(), and IsPartBuildInSyncData().

◆ SetPartsAfterStoreLoad()

void ItemBase::SetPartsAfterStoreLoad ( )
inlineprotected

Definition at line 434 of file BaseBuildingBase.c.

435 {
436 //update server data
438
439 //set base state
440 ConstructionPart construction_part = GetConstruction().GetBaseConstructionPart();
442
443 //synchronize after load
445 }

References GetConstruction(), SetBaseState(), SetPartsFromSyncData(), and SynchronizeBaseState().

◆ SetPartsFromSyncData()

void ItemBase::SetPartsFromSyncData ( )
inlineprotected

Definition at line 284 of file BaseBuildingBase.c.

285 {
288
289 for (int i = 0; i < construction_parts.Count(); ++i)
290 {
291 string key = construction_parts.GetKey(i);
294 }
295
296 //regenerate navmesh
298 }

References Construction(), GetConstruction(), SetPartFromSyncData(), and UpdateNavmesh().

◆ SetPlantState()

void ItemBase::SetPlantState ( int state)
inlineprivate

Definition at line 707 of file PlantBase.c.

708 {
710 SetSynchDirty();
711 }

◆ SetSlot()

void ItemBase::SetSlot ( Slot slot)
inlineprivate

Definition at line 783 of file PlantBase.c.

784 {
785 if (slot)
786 m_Slot = slot;
787 }

◆ SetSlotTextureDigged()

void ItemBase::SetSlotTextureDigged ( int slot_index)
inlineprivate

Definition at line 531 of file GardenBase.c.

532 {
533 TStringArray textures = GetHiddenSelectionsTextures();
534
536
537 ShowSelection(str_digged);
538 string texture = textures.Get(0);
539 SetObjectTexture(slot_index, texture);
540
541 Slot slot = m_Slots.Get(slot_index);
542
543 if (slot.GetWateredState() == 0)
544 {
545 // Set dry material
546 SetObjectMaterial(slot_index, SLOT_MATERIAL_DRY);
547 }
548 else
549 {
550 // Set wet material
551 SetObjectMaterial(slot_index, SLOT_MATERIAL_WET);
552 }
553 }
static const string SLOT_MATERIAL_DRY
Definition GardenBase.c:9
static const string SLOT_MATERIAL_WET
Definition GardenBase.c:8
static const string SLOT_SELECTION_DIGGED_PREFIX
Definition GardenBase.c:17

References ToStringLen().

◆ SetSlotTextureFertilized()

void ItemBase::SetSlotTextureFertilized ( int slot_index,
string item_type )
inlineprivate

Definition at line 555 of file GardenBase.c.

556 {
557 TStringArray textures = GetHiddenSelectionsTextures();
558
559 int tex_id = GetGame().ConfigGetInt(string.Format("cfgVehicles %1 Horticulture TexId", item_type));
560
562
563 ShowSelection(str_show);
564 SetObjectTexture(slot_index, textures.Get(tex_id));
565
566 Slot slot = m_Slots.Get(slot_index);
567
568 int slot_index_offset = 0;
569
570 // Set material according to dry / wet states
571 if (slot.GetWateredState() == 0)
572 {
573 // Set dry material for garden lime
574 if (slot.GetFertilityType() == "GardenLime")
576 else if (slot.GetFertilityType() == "PlantMaterial")
578 }
579 else
580 {
581 // Set dry material for compost
582 if (slot.GetFertilityType() == "GardenLime")
584 else if (slot.GetFertilityType() == "PlantMaterial")
586 }
587 }
static const string SLOT_MATERIAL_COMPOST_DRY
Definition GardenBase.c:14
static const string SLOT_MATERIAL_COMPOST_WET
Definition GardenBase.c:13
static const string SLOT_MATERIAL_LIMED_DRY
Definition GardenBase.c:12
static const string SLOT_MATERIAL_LIMED_WET
Definition GardenBase.c:11

References GetGame(), and ToStringLen().

◆ SetSlotWateredState()

void ItemBase::SetSlotWateredState ( int newState)
inlineprivate

Definition at line 798 of file GardenBase.c.

799 {
801 }

◆ SetSpoiled()

void ItemBase::SetSpoiled ( )
inlineprivate

Definition at line 562 of file PlantBase.c.

563 {
564 if (IsSpoiled() == false)
565 {
568 UpdatePlant();
569 SetSynchDirty();
570
571 if (GetGame().IsServer())
572 {
575
576 if (!m_SpoiledRemoveTimer.IsRunning())
577 m_SpoiledRemoveTimer.Run(m_SpoiledRemoveTime, this, "SpoiledRemoveTimerTick", NULL, false);
578 }
579 }
580 }

References CALL_CATEGORY_SYSTEM, and GetGame().

◆ SetupTrap()

void ItemBase::SetupTrap ( )
inlineprivate

Definition at line 190 of file TrapSpawnBase.c.

191 {
192 if (GetGame().IsServer())
193 {
194 if (GetHierarchyRootPlayer() && GetHierarchyRootPlayer().CanDropEntity(this))
195 SetupTrapPlayer(PlayerBase.Cast(GetHierarchyRootPlayer()));
196 }
197 }

References GetGame(), and SetupTrapPlayer().

◆ SetupTrapPlayer()

void ItemBase::SetupTrapPlayer ( PlayerBase player,
bool set_position = true )
inlineprivate

Definition at line 199 of file TrapSpawnBase.c.

200 {
201 if (GetGame().IsServer())
202 {
203 if (set_position)
204 {
205 vector trapPos = player.GetPosition() + (player.GetDirection() * 0.5);
206 trapPos[1] = GetGame().SurfaceRoadY(trapPos[0], trapPos[2]);
208 }
209
210 SetDeployed(true);
211 }
212 }

References GetGame(), and SetPosition().

◆ SetUsed()

void ItemBase::SetUsed ( )
inlineprivate

Definition at line 288 of file TrapSpawnBase.c.

289 {
290 if (GetGame().IsServer())
291 {
292 // We updated state, visuals and stop timers
293 m_IsActive = false;
294 m_IsDeployed = false;
295 if (m_Timer)
296 m_Timer.Stop();
297
299 {
300 SetAnimationPhase(m_AnimationPhaseSet, 1);
301 SetAnimationPhase(m_AnimationPhaseTriggered, 1);
302 SetAnimationPhase(m_AnimationPhaseUsed, 0);
303 }
304
305 SetSynchDirty();
306 }
307 }

References GetGame(), m_AnimationPhaseSet, m_AnimationPhaseTriggered, m_IsActive, and m_Timer.

◆ ShowZonesHealth() [1/2]

override bool ItemBase::ShowZonesHealth ( )
inlineprivate

Definition at line 768 of file InventoryItem.c.

769 {
770 return true;
771 }

◆ ShowZonesHealth() [2/2]

override bool ItemBase::ShowZonesHealth ( )
inlineprotected

Definition at line 884 of file BaseBuildingBase.c.

885 {
886 return true;
887 }

◆ SlotWaterStateUpdate()

void ItemBase::SlotWaterStateUpdate ( Slot slot)
inlineprivate

Definition at line 502 of file GardenBase.c.

503 {
504 // Set relevant bit
505 m_SlotWateredState |= slot.GetWateredState() << slot.GetSlotIndex();
506 SetSynchDirty();
507 }

◆ SoundBuildStart()

void ItemBase::SoundBuildStart ( string part_name)
inlineprotected

Definition at line 1044 of file BaseBuildingBase.c.

1045 {
1046 PlaySoundSet(m_Sound, GetBuildSoundByMaterial(part_name), 0.1, 0.1);
1047 }
string GetBuildSoundByMaterial(string part_name)
EffectSound m_Sound

References GetBuildSoundByMaterial(), and m_Sound.

◆ SoundBurningStart() [1/3]

void ItemBase::SoundBurningStart ( )
inlineprotected

Definition at line 49 of file Blowtorch.c.

50 {
51 PlaySoundSetLoop(m_SoundBurningLoop, SOUND_BURNING, 0.1, 0.0);
52 }
const string SOUND_BURNING
Definition Blowtorch.c:5
EffectSound m_SoundBurningLoop
Definition Blowtorch.c:9

◆ SoundBurningStart() [2/3]

void ItemBase::SoundBurningStart ( )
inlineprotected

Definition at line 64 of file PortableGasLamp.c.

65 {
66 PlaySoundSetLoop(m_SoundBurningLoop, SOUND_BURNING, 0.1, 0.3);
67 }

◆ SoundBurningStart() [3/3]

void ItemBase::SoundBurningStart ( )
inlineprotected

Definition at line 260 of file PortableGasStove.c.

261 {
262 PlaySoundSetLoop(m_SoundBurningLoop, SOUND_BURNING, 0.1, 0.3);
263 }

◆ SoundBurningStop() [1/3]

void ItemBase::SoundBurningStop ( )
inlineprotected

Definition at line 54 of file Blowtorch.c.

55 {
56 StopSoundSet(m_SoundBurningLoop);
57 }

◆ SoundBurningStop() [2/3]

void ItemBase::SoundBurningStop ( )
inlineprotected

Definition at line 69 of file PortableGasLamp.c.

70 {
71 StopSoundSet(m_SoundBurningLoop);
72 }

◆ SoundBurningStop() [3/3]

void ItemBase::SoundBurningStop ( )
inlineprotected

Definition at line 265 of file PortableGasStove.c.

266 {
267 StopSoundSet(m_SoundBurningLoop);
268 }

◆ SoundBuzzLoopStart()

void ItemBase::SoundBuzzLoopStart ( )
inlineprotected

Definition at line 320 of file BarbedWire.c.

321 {
322 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // client side
323 {
324 if (!m_BuzzSoundLoop)
325 m_BuzzSoundLoop = PlaySoundLoop(m_SoundBuzzLoop, 50);
326 }
327 }
static const string m_SoundBuzzLoop
Definition BarbedWire.c:14
SoundOnVehicle m_BuzzSoundLoop
Definition BarbedWire.c:17

References GetGame().

Referenced by OnWorkStart().

◆ SoundBuzzLoopStop()

void ItemBase::SoundBuzzLoopStop ( )
inlineprotected

Definition at line 330 of file BarbedWire.c.

331 {
332 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // client side
333 {
334 if (m_BuzzSoundLoop)
335 {
336 GetGame().ObjectDelete(m_BuzzSoundLoop);
338 }
339 }
340 }

References GetGame().

Referenced by OnWorkStop().

◆ SoundCollision()

void ItemBase::SoundCollision ( )
inlineprotected

Definition at line 354 of file BarbedWire.c.

355 {
356 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // client side
357 {
361 }
362 }
void PlaySound()
static const int SOUNDS_COLLISION_COUNT
Definition BarbedWire.c:6
static const string m_SoundsCollision[SOUNDS_COLLISION_COUNT]
Definition BarbedWire.c:12

References GetGame(), PlaySound(), and Math::RandomInt().

Referenced by PreAreaDamageActions().

◆ SoundCut()

void ItemBase::SoundCut ( )
inlineprotected

Definition at line 298 of file BarbedWire.c.

299 {
300 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // client side
301 {
305 }
306 }
static const string m_SoundsCut[SOUNDS_CUT_COUNT]
Definition BarbedWire.c:11
static const int SOUNDS_CUT_COUNT
Definition BarbedWire.c:5

References GetGame(), PlaySound(), and Math::RandomInt().

Referenced by OnIsPlugged(), and OnIsUnplugged().

◆ SoundDestroyStart()

void ItemBase::SoundDestroyStart ( string part_name)
inlineprotected

Definition at line 1054 of file BaseBuildingBase.c.

1055 {
1056 PlaySoundSet(m_Sound, GetDismantleSoundByMaterial(part_name), 0.1, 0.1);
1057 }
string GetDismantleSoundByMaterial(string part_name)

References GetDismantleSoundByMaterial(), and m_Sound.

◆ SoundDismantleStart()

void ItemBase::SoundDismantleStart ( string part_name)
inlineprotected

Definition at line 1049 of file BaseBuildingBase.c.

1050 {
1051 PlaySoundSet(m_Sound, GetDismantleSoundByMaterial(part_name), 0.1, 0.1);
1052 }

References GetDismantleSoundByMaterial(), and m_Sound.

◆ SoundElectricShock()

void ItemBase::SoundElectricShock ( )
inlineprotected

Definition at line 343 of file BarbedWire.c.

344 {
345 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // client side
346 {
350 }
351 }
static const string m_SoundsShock[SOUNDS_SHOCK_COUNT]
Definition BarbedWire.c:13
static const int SOUNDS_SHOCK_COUNT
Definition BarbedWire.c:7

References GetGame(), PlaySound(), and Math::RandomInt().

Referenced by PreAreaDamageActions().

◆ SoundSpark()

void ItemBase::SoundSpark ( )
inlineprotected

Definition at line 309 of file BarbedWire.c.

310 {
311 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // client side
312 {
316 }
317 }
static const int SOUNDS_SPARK_COUNT
Definition BarbedWire.c:4
static const string m_SoundsSpark[SOUNDS_SPARK_COUNT]
Definition BarbedWire.c:10

References GetGame(), PlaySound(), and Math::RandomInt().

Referenced by Spark().

◆ SoundTentClosePlay()

void ItemBase::SoundTentClosePlay ( )
inlineprotected

Definition at line 727 of file TentBase.c.

728 {
730 sound.SetAutodestroy(true);
731 }
string GetSoundClose()
Definition TentBase.c:715

References GetPosition, TentBase::GetSoundClose(), and SEffectManager::PlaySound().

◆ SoundTentCloseWindowPlay()

void ItemBase::SoundTentCloseWindowPlay ( )
inlineprotected

Definition at line 739 of file TentBase.c.

740 {
742 sound.SetAutodestroy(true);
743 }
string GetSoundCloseWindow()
Definition TentBase.c:719

References GetPosition, TentBase::GetSoundCloseWindow(), and SEffectManager::PlaySound().

◆ SoundTentOpenPlay()

void ItemBase::SoundTentOpenPlay ( )
inlineprotected

Definition at line 721 of file TentBase.c.

722 {
724 sound.SetAutodestroy(true);
725 }
string GetSoundOpen()
Definition TentBase.c:713

References GetPosition, TentBase::GetSoundOpen(), and SEffectManager::PlaySound().

◆ SoundTentOpenWindowPlay()

void ItemBase::SoundTentOpenWindowPlay ( )
inlineprotected

Definition at line 733 of file TentBase.c.

734 {
736 sound.SetAutodestroy(true);
737 }
string GetSoundOpenWindow()
Definition TentBase.c:717

References GetPosition, TentBase::GetSoundOpenWindow(), and SEffectManager::PlaySound().

◆ SoundTurnOff() [1/3]

void ItemBase::SoundTurnOff ( )
inlineprotected

Definition at line 79 of file PortableGasLamp.c.

80 {
81 PlaySoundSet(m_SoundTurnOff, SOUND_TURN_OFF, 0.1, 0.1);
82 }
EffectSound m_SoundTurnOff
const string SOUND_TURN_OFF

Referenced by OnSwitchOff().

◆ SoundTurnOff() [2/3]

void ItemBase::SoundTurnOff ( )
inlineprotected

Definition at line 275 of file PortableGasStove.c.

276 {
277 PlaySoundSet(m_SoundTurnOff, SOUND_TURN_OFF, 0.1, 0.1);
278 }

◆ SoundTurnOff() [3/3]

void ItemBase::SoundTurnOff ( )
inlineprotected

Definition at line 322 of file Spotlight.c.

323 {
324 PlaySoundSet(m_SoundTurnOff, SOUND_TURN_OFF, 0, 0);
325 }

◆ SoundTurnOn() [1/3]

void ItemBase::SoundTurnOn ( )
inlineprotected

Definition at line 74 of file PortableGasLamp.c.

75 {
76 PlaySoundSet(m_SoundTurnOn, SOUND_TURN_ON, 0.1, 0.1);
77 }
EffectSound m_SoundTurnOn
const string SOUND_TURN_ON

Referenced by OnSwitchOn().

◆ SoundTurnOn() [2/3]

void ItemBase::SoundTurnOn ( )
inlineprotected

Definition at line 270 of file PortableGasStove.c.

271 {
272 PlaySoundSet(m_SoundTurnOn, SOUND_TURN_ON, 0.1, 0.1);
273 }

◆ SoundTurnOn() [3/3]

void ItemBase::SoundTurnOn ( )
inlineprotected

Definition at line 317 of file Spotlight.c.

318 {
319 PlaySoundSet(m_SoundTurnOn, SOUND_TURN_ON, 0, 0);
320 }

◆ Spark()

void ItemBase::Spark ( )
inlineprotected

Definition at line 289 of file BarbedWire.c.

290 {
291 ParticleManager.GetInstance().PlayOnObject(ParticleList.BARBED_WIRE_SPARKS, this);
292 SoundSpark();
293 }
void SoundSpark()
Definition BarbedWire.c:309
static const int BARBED_WIRE_SPARKS

References ParticleList::BARBED_WIRE_SPARKS, ParticleManager(), and SoundSpark().

Referenced by PreAreaDamageActions().

◆ SpawnCatch()

void ItemBase::SpawnCatch ( )
inlineprivate

Definition at line 310 of file TrapSpawnBase.c.

311 {
312 // Only server side, let's make sure
313 if (GetGame().IsClient())
314 return;
315
316 // If we can't get CEApi we won't be able to test proximity
317 if (!GetCEApi())
318 return;
319
320 int i;
321 m_Bait = null;
322
323 // We check if we have bait and can catch
325
326 SetIsDeploySound(false);
327 SetSynchDirty();
328
329 // We check the distance from players through CEApi if that check is enabled
331 {
333 {
334 m_CanCatch = false;
335
336 // We could not catch yet, let's retest until we can
337 if (m_Timer)
338 m_Timer.Stop();
339
341 m_Timer.Run(m_UpdateWaitTime, this, "SpawnCatch");
342
343 return; // No need to go further, let's just wait for next check
344 }
345 }
346
347 // We get the probability to catch depending on bait presence
348 if (m_Bait)
350 else
352
353 // We get the position of prey when it will spawn
355 if (MemoryPointExists("Prey_Position"))
356 m_PreyPos = ModelToWorld(GetMemoryPointPos("Prey_Position"));
357 }
proto native bool AvoidPlayer(vector vPos, float fDistance)
Check if there is a player within a radius.
proto native CEApi GetCEApi()
Get the CE API.
float m_NoBaitCatchProb
bool SetCanCatch(out EntityAI bait)
float m_MinimalDistanceFromPlayersToCatch
float m_FinalCatchProb
int m_UpdateWaitTime
vector m_PreyPos
EntityAI m_Bait
float m_BaitCatchProb
bool m_CanCatch

References AvoidPlayer(), CALL_CATEGORY_GAMEPLAY, GetCEApi(), GetGame(), GetPosition, m_Timer, and SetIsDeploySound().

◆ SpoiledRemoveTimerTick()

void ItemBase::SpoiledRemoveTimerTick ( )
inlineprivate

Definition at line 546 of file PlantBase.c.

547 {
548 if (m_GrowthTimer != NULL)
549 m_GrowthTimer.Stop();
550
551 RemoveSlot();
552 }

◆ Spotlight()

void ItemBase::Spotlight ( )
inlineprotected

Definition at line 43 of file Spotlight.c.

44 {
46
47 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
48 RegisterNetSyncVariableBool("m_IsDeploySound");
49 RegisterNetSyncVariableBool("m_IsFolded");
50 }

◆ SprayPlant()

void ItemBase::SprayPlant ( float consumed_quantity)
inlineprivate

Definition at line 600 of file PlantBase.c.

601 {
602 //Rework this to have something smooth
604
605 if (!NeedsSpraying())
606 {
608 m_InfestationTimer.Stop();
609
610 m_IsInfested = false;
612
613 ChangeInfestation(false);
614 UpdatePlant();
615 }
616 }
bool NeedsSpraying()
Definition PlantBase.c:749

◆ StartActivate()

void ItemBase::StartActivate ( PlayerBase player)
inlineprivate

Definition at line 227 of file TrapSpawnBase.c.

227{ }

◆ StartLoopSound()

void ItemBase::StartLoopSound ( )
inlineprotected

Definition at line 78 of file PowerGenerator.c.

79 {
80 if (GetGame().IsClient() || !GetGame().IsMultiplayer())
81 {
82 if (GetCompEM().IsWorking())
83 {
84 PlaySoundSetLoop(m_EngineLoop, LOOP_SOUND, 0, 0);
85
86 // Particle
87 vector local_pos = "0.3 0.21 0.4";
88 vector local_ori = "270 0 0";
91 }
92 }
93 }
static const string LOOP_SOUND
static int PlayOnObject(notnull Effect eff, Object obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_relative_to_world=false)
Play an Effect.

References GetGame(), and SEffectManager::PlayOnObject().

◆ StartPeriodicMeasurement()

void ItemBase::StartPeriodicMeasurement ( )
inlineprotected

Definition at line 13 of file Raycaster.c.

14 {
15 if (!m_Timer)
16 m_Timer = new Timer;
17
18 m_Timer.Run(0.01, this, "PrepareMeasurement", null, true);
19 }

References m_Timer.

◆ StopChargedAlarm()

void ItemBase::StopChargedAlarm ( )
inlineprivate

Definition at line 82 of file Defibrillator.c.

83 {
85 {
86 //GetGame().ObjectDelete(m_ChargedAlarm);
89 }
90 }

References EffectSound::SoundStop().

Referenced by OnWorkStop().

◆ StopChargingSound()

void ItemBase::StopChargingSound ( )
inlineprivate

Definition at line 92 of file Defibrillator.c.

93 {
96 }

References EffectSound::SoundStop().

Referenced by OnWorkStop().

◆ StopChargingTimer()

void ItemBase::StopChargingTimer ( )
inlineprivate

Definition at line 98 of file Defibrillator.c.

99 {
100 if (m_ChargingTimer)
101 {
102 m_ChargingTimer.Stop();
104 }
105 }

Referenced by OnWorkStop().

◆ StopDeployLoopSound() [1/5]

void ItemBase::StopDeployLoopSound ( )
inlineprotected

Definition at line 153 of file BarbedWire.c.

154 {
155 if (!GetGame().IsDedicatedServer())
156 {
159 }
160 }
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.

References GetGame(), and m_DeployLoopSound.

Referenced by OnVariablesSynchronized().

◆ StopDeployLoopSound() [2/5]

void ItemBase::StopDeployLoopSound ( )
inlineprotected

Definition at line 159 of file KitBase.c.

160 {
161 if (!GetGame().IsDedicatedServer())
162 {
165 }
166 }

References GetGame(), and m_DeployLoopSound.

◆ StopDeployLoopSound() [3/5]

void ItemBase::StopDeployLoopSound ( )
inlineprotected

Definition at line 391 of file Spotlight.c.

392 {
393 if (!GetGame().IsDedicatedServer())
394 {
397 }
398 }

References GetGame(), and m_DeployLoopSound.

◆ StopDeployLoopSound() [4/5]

void ItemBase::StopDeployLoopSound ( )
inlineprotected

Definition at line 794 of file TentBase.c.

795 {
796 if (!GetGame().IsDedicatedServer())
797 {
800 }
801 }

References GetGame(), and m_DeployLoopSound.

◆ StopDeployLoopSound() [5/5]

void ItemBase::StopDeployLoopSound ( )
inlineprivate

Definition at line 485 of file TrapSpawnBase.c.

486 {
487 if (!GetGame().IsDedicatedServer())
488 {
491 }
492 }

References GetGame(), and m_DeployLoopSound.

◆ StopInfestation()

string ItemBase::StopInfestation ( float consumed_quantity)
inlineprivate

Definition at line 619 of file PlantBase.c.

620 {
622
623 if (!NeedsSpraying())
624 {
626 m_InfestationTimer.Stop();
627
628 m_IsInfested = false;
630
631 ChangeInfestation(false);
632 UpdatePlant();
633
634 return "I've sprayed the plant a bit. Now it is enough spayed.";
635 }
636 else
637 return "I've sprayed the plant a bit.";
638 }

◆ StopPeriodicMeasurement()

void ItemBase::StopPeriodicMeasurement ( )
inlineprotected

Definition at line 51 of file Raycaster.c.

52 {
53 if (m_Timer)
54 m_Timer.Stop();
55 }

References m_Timer.

◆ SwitchLightOff()

void ItemBase::SwitchLightOff ( )
inlineprotected

Definition at line 318 of file BatteryCharger.c.

319 {
320 SetObjectMaterial(3, DEFAULT_MATERIAL);
321 }

Referenced by BatteryCharger(), and UpdateStatusLights().

◆ SwitchLightOn()

void ItemBase::SwitchLightOn ( )
inlineprotected

Definition at line 301 of file BatteryCharger.c.

302 {
303 SetObjectMaterial(3, SWITCH_LIGHT_GLOW);
304 }
const string SWITCH_LIGHT_GLOW

Referenced by UpdateStatusLights().

◆ Synchronize() [1/2]

void ItemBase::Synchronize ( )
inlineprotected

Definition at line 117 of file BarbedWire.c.

118 {
119 if (GetGame().IsServer())
120 SetSynchDirty();
121 }

References GetGame().

Referenced by SetMountedState().

◆ Synchronize() [2/2]

void ItemBase::Synchronize ( )
inlineprivate

Definition at line 16 of file Flag_Base.c.

17 {
18 if (GetGame().IsServer())
19 SetSynchDirty();
20 }

References GetGame().

◆ SynchronizeBaseState()

void ItemBase::SynchronizeBaseState ( )
inlineprotected

Definition at line 93 of file BaseBuildingBase.c.

94 {
95 if (GetGame().IsServer())
96 SetSynchDirty();
97 }

References GetGame().

◆ SyncSlots()

void ItemBase::SyncSlots ( )
inlineprivate

Definition at line 188 of file GardenBase.c.

189 {
190 for (int i = 0; i < GetGardenSlotsCount(); i++)
191 {
192 // Read relevant bit
194 m_Slots[i].SetFertilityState(fertilityState);
195
196 int wateredState = (m_SlotWateredState >> i) & 1;
197 m_Slots[i].SetWateredState(wateredState);
198
199 if (fertilityState == eFertlityState.NONE)
200 {
201 m_Slots[i].SetFertilityType("");
202 m_Slots[i].SetFertilizerQuantity(0);
203 }
204
205 if (wateredState == eWateredState.DRY)
206 m_Slots[i].SetWater(0);
207
209 }
210
211 if (GetGame().IsServer())
212 SetSynchDirty();
213 }

References GetGame(), and GardenBase::GetGardenSlotsCount().

◆ TentBase()

void ItemBase::TentBase ( )
inlineprotected

Definition at line 41 of file TentBase.c.

42 {
46
48 RegisterNetSyncVariableInt("m_State");
49 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
50 RegisterNetSyncVariableBool("m_IsEntrance");
51 RegisterNetSyncVariableBool("m_IsWindow");
52 RegisterNetSyncVariableBool("m_IsToggle");
53 RegisterNetSyncVariableBool("m_IsDeploySound");
54 RegisterNetSyncVariableInt("m_OpeningMask");
55 RegisterNetSyncVariableBool("m_IsBeingPacked");
56
57 ProcessInvulnerabilityCheck(GetInvulnerabilityTypeString());
58 }
ref array< string > m_ShowAnimationsWhenPacked
Definition TentBase.c:35
ref array< string > m_ShowAnimationsWhenPitched
Definition TentBase.c:34
static const vector Zero
Definition EnConvert.c:110

References GetInvulnerabilityTypeString(), m_HalfExtents, and vector::Zero.

◆ ToggleAnimation()

void ItemBase::ToggleAnimation ( string selection)
inlineprotected

Definition at line 642 of file TentBase.c.

643 {
644 if (m_State == PACKED)
645 return;
646
647 bool is_closed;
648 ResetToggle();
649
650 for (int i = 0; i < m_ToggleAnimations.Count(); i++)
651 {
653
654 string toggle_off = toggle.GetToggleOff();
655 toggle_off.ToLower();
656 string toggle_on = toggle.GetToggleOn();
657 toggle_on.ToLower();
658
659 if (toggle_off == selection || toggle_on == selection)
660 {
661 is_closed = m_OpeningMask & toggle.GetOpeningBit();
662 if (is_closed)
663 {
664 SetAnimationPhase(toggle.GetToggleOff(), 0);
665 AddProxyPhysics(toggle.GetToggleOff());
666 SetAnimationPhase(toggle.GetToggleOn(), 1);
667 RemoveProxyPhysics(toggle.GetToggleOn());
668 m_ToggleAnimations.Set(toggle, false);
669 m_IsToggle = true;
670 m_OpeningMask &= ~toggle.GetOpeningBit();
671
672 if (selection.Contains("window"))
674
675 if (selection.Contains("entrance") || selection.Contains("door"))
677
679 }
680 else
681 {
682 SetAnimationPhase(toggle.GetToggleOff(), 1);
683 RemoveProxyPhysics(toggle.GetToggleOff());
684 SetAnimationPhase(toggle.GetToggleOn(), 0);
685 AddProxyPhysics(toggle.GetToggleOn());
686 m_ToggleAnimations.Set(toggle, true);
687 m_IsToggle = false;
688 m_OpeningMask |= toggle.GetOpeningBit();
689
690 if (selection.Contains("window"))
692
693 if (selection.Contains("entrance") || selection.Contains("door"))
695
697 }
698 }
699 }
700 SetSynchDirty();
702 }
void ResetToggle()
Definition TentBase.c:614
void ManipulateEntrance()
Definition TentBase.c:621
void AnimateCamonetToggle(ToggleAnimations toggle)
Definition TentBase.c:709
void ManipulateWindow()
Definition TentBase.c:626
bool Contains(string sample)
Returns true if sample is substring of string.
Definition EnString.c:286

References TentBase::AnimateCamonetToggle(), string::Contains(), m_State, and SoundSynchRemote().

◆ ToolBase()

void ItemBase::ToolBase ( )
inlineprotected

Definition at line 6 of file ToolBase.c.

7 {
8
9 }

◆ TrapSpawnBase()

void ItemBase::TrapSpawnBase ( )
inlineprivate

Definition at line 50 of file TrapSpawnBase.c.

51 {
52 m_DefectRate = 10; //Added damage after trap activation
54 m_InitWaitTime = 10;
55 m_NeedInstalation = true;
56 m_BaitNeeded = true;
57 m_IsFoldable = false;
59
60 m_BaitCatchProb = 95;
62
66
70
74
75 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
76 RegisterNetSyncVariableBool("m_IsDeploySound");
77 RegisterNetSyncVariableBool("m_IsActive");
78 RegisterNetSyncVariableBool("m_IsDeployed");
79 }
bool m_BaitNeeded
ref multiMap< string, float > m_CatchesGroundAnimal
ref multiMap< string, float > m_CatchesSea
ref multiMap< string, float > m_CatchesPond
const string FRESH
fake
const string SEA

References UAWaterType::FRESH, m_AnimationPhaseSet, m_AnimationPhaseTriggered, m_DefectRate, m_InitWaitTime, and UAWaterType::SEA.

◆ TryPitch()

void ItemBase::TryPitch ( bool update_navmesh,
bool init = false )
inlineprotected

Definition at line 515 of file TentBase.c.

516 {
517 if (GetHierarchyRootPlayer())
518 {
519 if (GetGame().IsDedicatedServer())
521
522 return;
523 }
524
526 }
void Pitch(bool update_navmesh, bool init=false)
Definition TentBase.c:493

References GetGame(), and init.

◆ UndergroundStash()

void ItemBase::UndergroundStash ( )
inlineprivate

Definition at line 3 of file UndergroundStash.c.

3{}

◆ Unfold()

void ItemBase::Unfold ( )
inlineprotected

Definition at line 260 of file Spotlight.c.

261 {
262 m_IsFolded = false;
264 SetSynchDirty();
265 }

References UpdateAllSelections().

Referenced by EOnInit(), OnInitEnergy(), OnIsPlugged(), OnItemLocationChanged(), OnPlacementComplete(), and OnStoreLoad().

◆ UnregisterPartForSync()

void ItemBase::UnregisterPartForSync ( int part_id)
inlineprotected

Definition at line 149 of file BaseBuildingBase.c.

150 {
151 //part_id must starts from index = 1
152 int offset;
153 int mask;
154
155 if (part_id >= 1 && part_id <= 31) //<1,31> (31 parts)
156 {
157 offset = part_id - 1;
158 mask = 1 << offset;
159
161 }
162 else if (part_id >= 32 && part_id <= 62) //<32,62> (31 parts)
163 {
164 offset = (part_id % 32);
165 mask = 1 << offset;
166
168 }
169 else if (part_id >= 63 && part_id <= 93) //<63,93> (31 parts)
170 {
171 offset = (part_id % 63);
172 mask = 1 << offset;
173
175 }
176 }

References m_SyncParts01, m_SyncParts02, and m_SyncParts03.

◆ UpdateAllSelections() [1/2]

void ItemBase::UpdateAllSelections ( )
inlineprivate

Definition at line 30 of file MetalWire.c.

31 {
32 HideAllSelections();
33 EntityAI energy_source = GetCompEM().GetEnergySource();
34
35 if (energy_source)
36 {
37 string ES_model = energy_source.GetModelName();
38 EntityAI powered_device = GetCompEM().GetPluggedDevice();
39
41 {
42 // Show metal wire selection
44 ShowSelection(selection_wire);
45
46 // Show plug selection
48 selection_plug.ToLower();
49 ShowSelection(selection_plug);
50
51 // Set plug's texture
52 int selection_index = GetHiddenSelectionIndex(selection_plug);
53 string texture_path = powered_device.GetCompEM().GetCordTextureFile();
54 SetObjectTexture(selection_index, texture_path);
55 }
56 else
57 {
58 // Show metal wire selection
60 ShowSelection(selection_wire2);
61 }
62 }
63 else
64 ShowSelection(SEL_WIRE_ROLLED);
65 }
static string SEL_WIRE_ROLLED
Definition MetalWire.c:3
static string SEL_PLUG_SUFIX
Definition MetalWire.c:6
static string SEL_WIRE_PREFIX
Definition MetalWire.c:4
static string SEL_WIRE_SUFIX
Definition MetalWire.c:5

References SEL_PLUG_SUFIX, and SEL_WIRE_SUFIX.

Referenced by EOnInit(), Fold(), OnInitEnergy(), OnIsPlugged(), OnIsUnplugged(), OnOwnSocketReleased(), OnOwnSocketTaken(), OnWorkStart(), OnWorkStop(), and Unfold().

◆ UpdateAllSelections() [2/2]

void ItemBase::UpdateAllSelections ( )
inlineprotected

Definition at line 159 of file Spotlight.c.

160 {
161 bool isPlugged = GetCompEM().IsPlugged();
162 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
163 bool isInHands = player && player.GetItemInHands() == this;
164 HideAllSelections();
165
166 m_LightLocalPosition = GetSelectionPositionLS("beamStart");
167
168 if (IsFolded() || isInHands)
169 {
170 HideSelection(SEL_REFLECTOR_COMP_U);
171
172 ShowSelection(SEL_INVENTORY);
173 ShowSelection(SEL_GLASS_F);
174 ShowSelection(SEL_REFLECTOR_F);
175
176 if (isPlugged)
177 ShowSelection(SEL_CORD_PLUGGED_F);
178 else
179 ShowSelection(SEL_CORD_FOLDED_F);
180
181 if (!IsHologram())
182 {
183 if (GetCompEM().IsWorking())
184 {
185 SetObjectMaterial(ID_GLASS_UNFOLDED, LIGHT_ON_GLASS);
186 SetObjectMaterial(ID_REFLECTOR_UNFOLDED, LIGHT_ON_REFLECTOR);
187 SetObjectMaterial(ID_GLASS_FOLDED, LIGHT_ON_GLASS);
188 SetObjectMaterial(ID_REFLECTOR_FOLDED, LIGHT_ON_REFLECTOR);
189 }
190 else
191 {
192 SetObjectMaterial(ID_GLASS_UNFOLDED, LIGHT_OFF_GLASS);
193 SetObjectMaterial(ID_REFLECTOR_UNFOLDED, LIGHT_OFF_REFLECTOR);
194 SetObjectMaterial(ID_GLASS_FOLDED, LIGHT_OFF_GLASS);
195 SetObjectMaterial(ID_REFLECTOR_FOLDED, LIGHT_OFF_REFLECTOR);
196 }
197 }
198 }
199 else
200 {
201 ShowSelection(SEL_PLACING);
202 ShowSelection(SEL_REFLECTOR_U);
203 ShowSelection(SEL_GLASS_U);
204 ShowSelection(SEL_REFLECTOR_COMP_U);
205
206 if (isPlugged)
207 ShowSelection(SEL_CORD_PLUGGED_U);
208 else
209 ShowSelection(SEL_CORD_FOLDED_U);
210
211 if (!IsHologram())
212 {
213 if (GetCompEM().IsWorking())
214 {
215 SetObjectMaterial(ID_GLASS_UNFOLDED, LIGHT_ON_GLASS);
216 SetObjectMaterial(ID_REFLECTOR_UNFOLDED, LIGHT_ON_REFLECTOR);
217 }
218 else
219 {
220 SetObjectMaterial(ID_GLASS_UNFOLDED, LIGHT_OFF_GLASS);
221 SetObjectMaterial(ID_REFLECTOR_UNFOLDED, LIGHT_OFF_REFLECTOR);
222 }
223 }
224 }
225 }
static const int ID_REFLECTOR_FOLDED
Definition Spotlight.c:27
static const string SEL_REFLECTOR_COMP_U
Definition Spotlight.c:11
static const string SEL_CORD_PLUGGED_U
Definition Spotlight.c:13
static const string SEL_GLASS_F
Definition Spotlight.c:19
static const int ID_REFLECTOR_UNFOLDED
Definition Spotlight.c:25
static const string SEL_PLACING
Definition Spotlight.c:18
static const string SEL_GLASS_U
Definition Spotlight.c:20
static const int ID_GLASS_UNFOLDED
Definition Spotlight.c:24
static const string SEL_REFLECTOR_U
Definition Spotlight.c:22
bool IsFolded()
Definition Spotlight.c:309
static const string SEL_REFLECTOR_F
Definition Spotlight.c:21
static const int ID_GLASS_FOLDED
Definition Spotlight.c:26
static const string SEL_INVENTORY
Definition Spotlight.c:17
static const string SEL_CORD_FOLDED_U
Definition Spotlight.c:12

References IsFolded(), and IsHologram().

◆ UpdateAttachmentPhysics()

void ItemBase::UpdateAttachmentPhysics ( string slot_name,
bool is_locked )
inlineprotected

Definition at line 762 of file BaseBuildingBase.c.

763 {
764 //checks for invalid appends; hotfix
765 if (!m_Mountables || m_Mountables.Find(slot_name) == -1)
766 return;
767 //----------------------------------
768 string slot_name_mounted = slot_name + "_Mounted";
769 EntityAI attachment = FindAttachmentBySlotName(slot_name);
770
771 //remove proxy physics
772 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " Removing ATT SLOT=" + slot_name + " RM / RM");
773 RemoveProxyPhysics(slot_name_mounted);
774 RemoveProxyPhysics(slot_name);
775
776 if (attachment)
777 {
778 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " Adding ATT=" + Object.GetDebugName(attachment));
779 if (is_locked)
780 {
781 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " RM / RM");
782 AddProxyPhysics(slot_name_mounted);
783 }
784 else
785 {
786 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " ADD");
787 AddProxyPhysics(slot_name);
788 }
789 }
790 }

References bsbDebugPrint(), GetDebugName(), LogManager::IsBaseBuildingLogEnable(), and m_Mountables.

◆ UpdateAttachmentSlot()

void ItemBase::UpdateAttachmentSlot ( )
inlineprotected

Definition at line 87 of file BarbedWire.c.

88 {
89 BaseBuildingBase base_building = BaseBuildingBase.Cast(GetHierarchyParent());
90 if (base_building)
91 {
93 GetInventory().GetCurrentInventoryLocation(inventory_location);
94 bool is_mounted = base_building.GetInventory().GetSlotLock(inventory_location.GetSlot());
96
97 base_building.UpdateAttachmentVisuals(slot_name, is_mounted);
98 base_building.UpdateAttachmentPhysics(slot_name, is_mounted);
99 }
100 }

References InventorySlots::GetSlotName().

◆ UpdateAttachmentVisuals()

void ItemBase::UpdateAttachmentVisuals ( string slot_name,
bool is_locked )
inlineprotected

Definition at line 694 of file BaseBuildingBase.c.

695 {
696 string slotNameMounted = slot_name + "_Mounted";
697 EntityAI attachment = FindAttachmentBySlotName(slot_name);
698
699 if (attachment)
700 {
702 if (barbedWire && barbedWire.IsMounted())
704 else
706
707 if (is_locked)
708 {
709 SetAnimationPhase(slotNameMounted, 0);
710 SetAnimationPhase(slot_name, 1);
711 }
712 else
713 {
714 SetAnimationPhase(slotNameMounted, 1);
715 SetAnimationPhase(slot_name, 0);
716 }
717 }
718 else
719 {
720 SetAnimationPhase(slotNameMounted, 1);
721 SetAnimationPhase(slot_name, 1);
722
724 }
725 }
void CreateAreaDamage()

References CreateAreaDamage(), and DestroyAreaDamage().

◆ UpdateFuelMeter()

void ItemBase::UpdateFuelMeter ( )
inlineprotected

Definition at line 234 of file PowerGenerator.c.

235 {
236 if (GetGame().IsClient() || !GetGame().IsMultiplayer())
237 SetAnimationPhase("dial_fuel", m_FuelPercentage * 0.01);
238 }

References GetGame().

Referenced by EOnInit(), OnInitEnergy(), OnItemLocationChanged(), OnVariablesSynchronized(), OnWork(), OnWorkStop(), and SetFuel().

◆ UpdateNavmesh()

void ItemBase::UpdateNavmesh ( )
inlineprotected

Definition at line 792 of file BaseBuildingBase.c.

793 {
794 SetAffectPathgraph(true, false);
795 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, this);
796 }

References CALL_CATEGORY_SYSTEM, and GetGame().

◆ UpdateNVGStatus()

void ItemBase::UpdateNVGStatus ( PlayerBase player,
bool attaching = false,
bool force_disable = false )
inlineprivate

Definition at line 808 of file InventoryItem.c.

809 {
810 NVGoggles NVGAttachment;
811 NVGAttachment = NVGoggles.Cast(FindAttachmentBySlotName("NVG"));
812 bool has_nvg_slot;
813 for (int i = 0; i < GetInventory().GetAttachmentSlotsCount(); i++)
814 {
815 has_nvg_slot = GetInventory().GetAttachmentSlotId(i) == InventorySlots.GetSlotIdFromString("NVG");
816 if (has_nvg_slot)
817 break;
818 }
819
820 if (player && has_nvg_slot)
821 {
822 if (NVGAttachment)
823 {
824 NVGAttachment.LoweredCheck();
825
826 if (attaching && NVGAttachment.m_Strap && NVGAttachment.m_IsLowered)
827 {
828 NVGAttachment.SetPlayer(player);
829 player.SetNVGLowered(true);
830
831 if (player.IsControlledPlayer())
832 {
833 if (NVGAttachment.IsWorking())
834 {
835 player.AddActiveNV(NVTypes.NV_GOGGLES);
836 //player.RemoveActiveNV(NVTypes.NV_GOGGLES_OFF);
837 }
838 else
839 {
840 //player.AddActiveNV(NVTypes.NV_GOGGLES_OFF);
841 player.RemoveActiveNV(NVTypes.NV_GOGGLES);
842 }
843 }
844 }
845 else
846 {
847 NVGAttachment.SetPlayer(null);
848 player.SetNVGLowered(false);
849
850 if (player.IsControlledPlayer())
851 {
852 player.RemoveActiveNV(NVTypes.NV_GOGGLES);
853 //player.RemoveActiveNV(NVTypes.NV_GOGGLES_OFF);
854 }
855 }
856 }
857 else if (player.IsNVGWorking() && force_disable)
858 {
859 player.SetNVGLowered(false);
860
861 if (player.IsControlledPlayer())
862 {
863 player.RemoveActiveNV(NVTypes.NV_GOGGLES);
864 //player.RemoveActiveNV(NVTypes.NV_GOGGLES_OFF);
865 }
866 }
867 }
868 }

References InventorySlots::GetSlotIdFromString().

◆ UpdatePhysics() [1/3]

void ItemBase::UpdatePhysics ( )
inlineprotected

Definition at line 728 of file BaseBuildingBase.c.

729 {
731 bsbDebugPrint("[bsb] " + GetDebugName(this) + " BaseBuildingBase::UpdatePhysics");
732
735
737 bsbDebugPrint("[bsb] " + GetDebugName(this) + " att_cnt=" + attachmentSlots.Count());
738
739 foreach (string slotName : attachmentSlots)
741
742 //check base
743 if (!HasBase())
744 {
746 bsbDebugPrint("[bsb] " + GetDebugName(this) + ANIMATION_DEPLOYED + " ADD");
747
748 AddProxyPhysics(ANIMATION_DEPLOYED);
749 }
750 else
751 {
753 bsbDebugPrint("[bsb] " + GetDebugName(this) + ANIMATION_DEPLOYED + " RM");
754
755 RemoveProxyPhysics(ANIMATION_DEPLOYED);
756 }
757
758 GetConstruction().UpdatePhysics();
760 }
PlayerSpawnPreset slotName
bool IsAttachmentSlotLocked(EntityAI attachment)
void GetAttachmentSlots(EntityAI entity, out array< string > attachment_slots)

References ANIMATION_DEPLOYED, bsbDebugPrint(), GetAttachmentSlots(), GetConstruction(), GetDebugName(), HasBase(), IsAttachmentSlotLocked(), LogManager::IsBaseBuildingLogEnable(), slotName, UpdateAttachmentPhysics(), and UpdateNavmesh().

◆ UpdatePhysics() [2/3]

void ItemBase::UpdatePhysics ( )
inlineprotected

Definition at line 144 of file KitBase.c.

145 {
146 AddProxyPhysics("Inventory");
147 RemoveProxyPhysics("Placing");
148 }

◆ UpdatePhysics() [3/3]

void ItemBase::UpdatePhysics ( )
inlineprotected

Definition at line 555 of file TentBase.c.

556 {
558 string animation_name;
559
560 if (GetState() == PITCHED)
561 {
562 for (int i = 0; i < m_ShowAnimationsWhenPitched.Count(); i++)
563 {
565
567 proxy_selection_name.ToLower();
568 AddProxyPhysics(proxy_selection_name);
569 }
570
572 }
573 else
574 {
575 for (int j = 0; j < m_ShowAnimationsWhenPacked.Count(); j++)
576 {
578
580 proxy_selection_name.ToLower();
581 AddProxyPhysics(proxy_selection_name);
582 }
583 }
584 }

References CALL_CATEGORY_SYSTEM, GetGame(), and GetState().

◆ UpdatePlant()

void ItemBase::UpdatePlant ( )
inlineprivate

Definition at line 456 of file PlantBase.c.

457 {
458 if (m_PlantStateIndex > 0)
459 {
460 string plant_state_index = m_PlantStateIndex.ToStringLen(2);
462
463 // HIDING PREVIOUS PLANT STATE AND SHOWING THE CURRENT ONE
464 ShowSelection("plantStage_" + plant_state_index); // SHOW!
465 HideSelection("plantStage_" + prev_plant_state_index); // HIDE!
466
467 // HIDING PREVIOUS CROPS STATE AND SHOWING THE CURRENT ONE
468
469 if (HasCrops())
470 {
471 ShowSelection("plantStage_" + plant_state_index + "_crops"); // SHOW!
472 HideSelection("plantStage_" + prev_plant_state_index + "_crops"); // HIDE!
473 }
474 else
475 {
476 HideSelection("plantStage_" + plant_state_index + "_crops"); // HIDE!
477 HideSelection("plantStage_" + prev_plant_state_index + "_crops"); // HIDE!
478 }
479
480 // HIDING PREVIOUS SHADOW STATE AND SHOWING THE CURRENT ONE
481 ShowSelection("plantStage_" + plant_state_index + "_shadow"); // SHOW!
482 HideSelection("plantStage_" + prev_plant_state_index + "_shadow"); // HIDE!
483 }
484
487 }
bool HasCrops()
Definition PlantBase.c:832

References ToStringLen().

◆ UpdateSelections()

void ItemBase::UpdateSelections ( )
inlineprivate

Definition at line 10 of file PileOfWoodenPlanks.c.

11 {
12 RemoveProxyPhysics("stage_1");
13 RemoveProxyPhysics("stage_2");
14 RemoveProxyPhysics("stage_3");
15
16 // Show/Hide selections according to the current quantity
17 if (this)
18 {
19 float quantity = GetQuantity();
21
22 if (quantity > GetQuantityMax() * 0.66)
23 {
24 // Show 3/3 amount of planks
25 ShowSelection("stage_3");
26 HideSelection("stage_2");
27 HideSelection("stage_1");
28
29 AddProxyPhysics("stage_3");
30 }
31
32 if (quantity > quantity_max * 0.33 && quantity <= quantity_max * 0.66)
33 {
34 // Show 2/3 amount of planks
35 HideSelection("stage_3");
36 ShowSelection("stage_2");
37 HideSelection("stage_1");
38
39 AddProxyPhysics("stage_2");
40 }
41
42 if (quantity > 0 && quantity <= quantity_max * 0.33)
43 {
44 // Show 1/3 amount of planks
45 HideSelection("stage_3");
46 HideSelection("stage_2");
47 ShowSelection("stage_1");
48
49 AddProxyPhysics("stage_1");
50 }
51
52 if (quantity == 0)
53 {
54 // Show 0 planks. Object should be deleted now.
55 HideSelection("stage_3");
56 HideSelection("stage_2");
57 HideSelection("stage_1");
58 }
59 }
60 }
override int GetQuantityMax()
Definition ItemBase.c:7941

References GetQuantity(), and GetQuantityMax().

Referenced by EEItemLocationChanged(), and RemovePlanks().

◆ UpdateSlotTexture()

void ItemBase::UpdateSlotTexture ( int slot_index)
inlineprivate

Definition at line 509 of file GardenBase.c.

510 {
511 // TO DO: Fix DAYZ-30633 here!
512 Slot slot = m_Slots.Get(slot_index);
513
514 // Show / Hide selections according to DIGGED or COVERED states.
515
516 if (slot.IsDigged() || slot.IsPlanted())
517 {
520
521 HideSelection(str_hide);
522 ShowSelection(str_show);
523 }
524
525 if (slot.GetFertilityType() != "")
526 SetSlotTextureFertilized(slot_index, slot.GetFertilityType());
527 else
529 }
void SetSlotTextureDigged(int slot_index)
Definition GardenBase.c:531
void SetSlotTextureFertilized(int slot_index, string item_type)
Definition GardenBase.c:555

References ToStringLen().

◆ UpdateStatusLights()

void ItemBase::UpdateStatusLights ( )
inlineprotected

Definition at line 116 of file BatteryCharger.c.

117 {
118 if (GetGame().IsClient() || !GetGame().IsMultiplayer())
119 {
120 if (GetCompEM().IsWorking())
121 {
123 ItemBase battery = ItemBase.Cast(GetCompEM().GetPluggedDevice());
124
125 if (battery)
126 {
127 RedLightOff();
128
129 if (m_BatteryEnergy0To100 <= 33)
130 {
131 // Less than 1/3 charged, yellow status light must repeatedly blink
132
135 else
137
139 }
140 else if (m_BatteryEnergy0To100 > 33 && m_BatteryEnergy0To100 <= 66)
141 {
142 // Less than 2/3 charged, yellow status light must glow
143
145 }
146 else if (m_BatteryEnergy0To100 > 66 && m_BatteryEnergy0To100 < 100)
147 {
148 // Less than 3/3 charged, yellow status light must glow, green light must blink
149
151
153 GreenLightOn();
154 else
156
158 }
159 else if (m_BatteryEnergy0To100 >= 100)
160 {
161 // Fully charged, green light must glow
163 GreenLightOn();
164 }
165 }
166 else
167 {
169 RedLightOn();
170 else
171 RedLightOff();
172
174
177 }
178 }
179 else
180 {
183 RedLightOff();
185 }
186 }
187 }
void GreenLightOn()
void GreenLightOff()
bool m_BlinkingStatusLightIsOn
void RedLightOff()
void YellowLightOn()
void SwitchLightOn()
void RedLightOn()
void YellowLightOff()

References GetGame(), GreenLightOff(), GreenLightOn(), m_BlinkingStatusLightIsOn, RedLightOff(), RedLightOn(), SwitchLightOff(), SwitchLightOn(), YellowLightOff(), and YellowLightOn().

Referenced by OnWorkStart(), and OnWorkStop().

◆ UpdateTexturesOnAllSlots()

void ItemBase::UpdateTexturesOnAllSlots ( )
inlineprivate

Definition at line 133 of file GardenBase.c.

134 {
136
137 for (int i = 0; i < slots_count; i++)
139 }

References GardenBase::GetGardenSlotsCount().

◆ UpdateVisuals() [1/3]

void ItemBase::UpdateVisuals ( )
inlineprotected

Definition at line 677 of file BaseBuildingBase.c.

678 {
680
682 foreach (string slotName : attachmentSlots)
684
685 //check base
686 if (!HasBase())
687 SetAnimationPhase(ANIMATION_DEPLOYED, 0);
688 else
689 SetAnimationPhase(ANIMATION_DEPLOYED, 1);
690
691 GetConstruction().UpdateVisuals();
692 }

References ANIMATION_DEPLOYED, GetAttachmentSlots(), GetConstruction(), HasBase(), IsAttachmentSlotLocked(), slotName, and UpdateAttachmentVisuals().

◆ UpdateVisuals() [2/3]

void ItemBase::UpdateVisuals ( )
inlineprotected

Definition at line 138 of file KitBase.c.

139 {
140 SetAnimationPhase("Inventory", 0);
141 SetAnimationPhase("Placing", 1);
142 }

◆ UpdateVisuals() [3/3]

void ItemBase::UpdateVisuals ( )
inlineprotected

Definition at line 528 of file TentBase.c.

529 {
531 string animation_name;
532
533 if (GetState() == PITCHED)
534 {
535 for (int i = 0; i < m_ShowAnimationsWhenPitched.Count(); i++)
536 {
538
539 SetAnimationPhase(animation_name, 0);
540 }
541
543 }
544 else
545 {
546 for (int j = 0; j < m_ShowAnimationsWhenPacked.Count(); j++)
547 {
549
550 SetAnimationPhase(animation_name, 0);
551 }
552 }
553 }
void HandleOpeningsVisuals()
Definition TentBase.c:813

References GetState().

◆ WaterAllSlots()

void ItemBase::WaterAllSlots ( )
inlineprivate

Definition at line 773 of file GardenBase.c.

774 {
775 int state = 0;
776
777 for (int i = 0; i < m_Slots.Count(); i++)
778 state += 1 * Math.Pow(2, i);
779
781 }
void SetSlotWateredState(int newState)
Definition GardenBase.c:798

References Math::Pow().

◆ YellowLightOff()

void ItemBase::YellowLightOff ( )
inlineprotected

Definition at line 314 of file BatteryCharger.c.

315 {
316 SetObjectMaterial(1, DEFAULT_MATERIAL);
317 }

Referenced by UpdateStatusLights().

◆ YellowLightOn()

void ItemBase::YellowLightOn ( )
inlineprotected

Definition at line 297 of file BatteryCharger.c.

298 {
299 SetObjectMaterial(1, YELLOW_LIGHT_GLOW);
300 }
const string YELLOW_LIGHT_GLOW

Referenced by UpdateStatusLights().

Member Data Documentation

◆ ANIM_PHASE_FLAME

const string ItemBase::ANIM_PHASE_FLAME = "FlameHide"
private

Definition at line 4 of file Blowtorch.c.

◆ ANIMATION_DEPLOYED

const string ItemBase::ANIMATION_DEPLOYED = "Deployed"
private

Definition at line 4 of file BaseBuildingBase.c.

◆ ATTACHED_CLIPS_STATES

const string ItemBase::ATTACHED_CLIPS_STATES[] = {SEL_CLIPS_CAR, SEL_CLIPS_TRUCK}
protected

Definition at line 23 of file BatteryCharger.c.

23{SEL_CLIPS_CAR, SEL_CLIPS_TRUCK}; // TO DO: If it's required by design, add helicopter battery here and register its selection names.

◆ ATTACHED_CLIPS_STATES_COUNT

const int ItemBase::ATTACHED_CLIPS_STATES_COUNT = 2
protected

Definition at line 24 of file BatteryCharger.c.

Referenced by HideAttachedClipsStates().

◆ ATTACHMENT_CAULDRON

ItemBase::ATTACHMENT_CAULDRON = Cauldron
protected

Definition at line 9 of file PortableGasStove.c.

◆ ATTACHMENT_COOKING_POT

ItemBase::ATTACHMENT_COOKING_POT = Pot
protected

Definition at line 7 of file PortableGasStove.c.

◆ ATTACHMENT_FRYING_PAN

ItemBase::ATTACHMENT_FRYING_PAN = FryingPan
protected

Definition at line 8 of file PortableGasStove.c.

◆ CHARGED_AND_READY_SOUND

const string ItemBase::CHARGED_AND_READY_SOUND = "defibrillator_ready_SoundSet"
staticprivate

Definition at line 4 of file Defibrillator.c.

◆ CHARGING_SOUND

const string ItemBase::CHARGING_SOUND = "defibrillator_charge_SoundSet"
staticprivate

Definition at line 3 of file Defibrillator.c.

◆ CHECK_RAIN_INTERVAL

const int ItemBase::CHECK_RAIN_INTERVAL = 15
staticprivate

Definition at line 23 of file GardenBase.c.

◆ DEFAULT_MATERIAL

const string ItemBase::DEFAULT_MATERIAL = "dz\\gear\\camping\\data\\battery_charger.rvmat"
staticprotected

Definition at line 21 of file BatteryCharger.c.

◆ FLAME_BUTANE_OFF

const string ItemBase::FLAME_BUTANE_OFF = ""
protected

Definition at line 6 of file PortableGasStove.c.

◆ FLAME_BUTANE_ON

const string ItemBase::FLAME_BUTANE_ON = "dz\\gear\\cooking\\data\\flame_butane_ca.paa"
protected

Definition at line 5 of file PortableGasStove.c.

◆ GAS_LIGHT_MATERIAL_OFF

const string ItemBase::GAS_LIGHT_MATERIAL_OFF = "dz\\data\\data\\default.rvmat"
private

Definition at line 6 of file PortableGasLamp.c.

◆ GAS_LIGHT_MATERIAL_ON

const string ItemBase::GAS_LIGHT_MATERIAL_ON = "dz\\gear\\cooking\\data\\GasLightOn.rvmat"
private

Definition at line 5 of file PortableGasLamp.c.

◆ GLASS_ID

int ItemBase::GLASS_ID = 2
staticprivate

Definition at line 6 of file Flashlight.c.

◆ GREEN_LIGHT_GLOW

const string ItemBase::GREEN_LIGHT_GLOW = "dz\\gear\\camping\\data\\battery_charger_light_g.rvmat"
staticprotected

Definition at line 18 of file BatteryCharger.c.

◆ ID_GLASS_FOLDED

const int ItemBase::ID_GLASS_FOLDED = 5
staticprivate

Definition at line 26 of file Spotlight.c.

◆ ID_GLASS_UNFOLDED

const int ItemBase::ID_GLASS_UNFOLDED = 3
staticprivate

Definition at line 24 of file Spotlight.c.

◆ ID_REFLECTOR_FOLDED

const int ItemBase::ID_REFLECTOR_FOLDED = 6
staticprivate

Definition at line 27 of file Spotlight.c.

◆ ID_REFLECTOR_UNFOLDED

const int ItemBase::ID_REFLECTOR_UNFOLDED = 4
staticprivate

Definition at line 25 of file Spotlight.c.

◆ LIGHT_OFF_GLASS

static string ItemBase::LIGHT_OFF_GLASS = "dz\\gear\\tools\\data\\flashlight_glass.rvmat"
staticprivate

Definition at line 8 of file Flashlight.c.

◆ LIGHT_OFF_REFLECTOR

static string ItemBase::LIGHT_OFF_REFLECTOR = "dz\\gear\\tools\\data\\flashlight.rvmat"
staticprivate

Definition at line 9 of file Flashlight.c.

◆ LIGHT_ON_GLASS

static string ItemBase::LIGHT_ON_GLASS = "dz\\gear\\tools\\data\\flashlight_glass_on.rvmat"
staticprivate

Definition at line 10 of file Flashlight.c.

◆ LIGHT_ON_REFLECTOR

static string ItemBase::LIGHT_ON_REFLECTOR = "dz\\gear\\tools\\data\\flashlight_glass_on.rvmat"
staticprivate

Definition at line 11 of file Flashlight.c.

◆ LOOP_SOUND

const string ItemBase::LOOP_SOUND = "powerGeneratorLoop_SoundSet"
staticprivate

Definition at line 9 of file PowerGenerator.c.

◆ m_AlignCatchTimer

ref Timer ItemBase::m_AlignCatchTimer
private

Definition at line 46 of file TrapSpawnBase.c.

◆ m_AnimationPhaseSet

string ItemBase::m_AnimationPhaseSet
protected

Definition at line 24 of file TrapSpawnBase.c.

◆ m_AnimationPhaseTriggered

string ItemBase::m_AnimationPhaseTriggered
protected

Definition at line 25 of file TrapSpawnBase.c.

◆ m_AnimationPhaseUsed

string ItemBase::m_AnimationPhaseUsed
protected

Definition at line 26 of file TrapSpawnBase.c.

◆ m_AreaDamage

ref AreaDamageManager ItemBase::m_AreaDamage
protected

Definition at line 20 of file BarbedWire.c.

◆ m_Bait

EntityAI ItemBase::m_Bait
protected

Definition at line 16 of file TrapSpawnBase.c.

◆ m_BaitCatchProb

float ItemBase::m_BaitCatchProb
private

Definition at line 10 of file TrapSpawnBase.c.

◆ m_BaitNeeded

bool ItemBase::m_BaitNeeded
protected

Definition at line 43 of file TrapSpawnBase.c.

◆ m_BatteryEnergy0To100

int ItemBase::m_BatteryEnergy0To100
protected

Definition at line 27 of file BatteryCharger.c.

◆ m_BlinkingStatusLightInterval

float ItemBase::m_BlinkingStatusLightInterval = 0.4
staticprotected

Definition at line 30 of file BatteryCharger.c.

◆ m_BlinkingStatusLightIsOn

bool ItemBase::m_BlinkingStatusLightIsOn = false
protected

Definition at line 32 of file BatteryCharger.c.

Referenced by UpdateStatusLights().

◆ m_BuzzSoundLoop

SoundOnVehicle ItemBase::m_BuzzSoundLoop
protected

Definition at line 17 of file BarbedWire.c.

◆ m_CamoNet

CamoNet ItemBase::m_CamoNet
protected

Definition at line 38 of file TentBase.c.

◆ m_CanCatch

bool ItemBase::m_CanCatch = false
private

Definition at line 7 of file TrapSpawnBase.c.

◆ m_Catch

ItemBase ItemBase::m_Catch
private

Definition at line 45 of file TrapSpawnBase.c.

◆ m_CatchesGroundAnimal

ref multiMap<string, float> ItemBase::m_CatchesGroundAnimal
protected

Definition at line 34 of file TrapSpawnBase.c.

◆ m_CatchesPond

ref multiMap<string, float> ItemBase::m_CatchesPond
protected

Definition at line 32 of file TrapSpawnBase.c.

◆ m_CatchesSea

ref multiMap<string, float> ItemBase::m_CatchesSea
protected

Definition at line 33 of file TrapSpawnBase.c.

◆ m_ChargedAlarm

EffectSound ItemBase::m_ChargedAlarm
private

Definition at line 13 of file Defibrillator.c.

◆ m_ChargeEnergyPerSecond

float ItemBase::m_ChargeEnergyPerSecond
protected

Definition at line 28 of file BatteryCharger.c.

◆ m_ChargeTime

float ItemBase::m_ChargeTime = 5
staticprivate

Definition at line 9 of file Defibrillator.c.

Referenced by OnWorkStart().

◆ m_ChargingSound

EffectSound ItemBase::m_ChargingSound
private

Definition at line 14 of file Defibrillator.c.

◆ m_ChargingTimer

ref Timer ItemBase::m_ChargingTimer
private

Definition at line 12 of file Defibrillator.c.

◆ m_CheckRainTimer

ref Timer ItemBase::m_CheckRainTimer
protected

Definition at line 30 of file GardenBase.c.

◆ m_ClutterCutter

Object ItemBase::m_ClutterCutter
protected

Definition at line 36 of file TentBase.c.

◆ m_Construction

ref Construction ItemBase::m_Construction
private

Definition at line 8 of file BaseBuildingBase.c.

◆ m_ConstructionKitHealth

float ItemBase::m_ConstructionKitHealth
private

Definition at line 6 of file BaseBuildingBase.c.

◆ m_CookingEquipment

ItemBase ItemBase::m_CookingEquipment
private

Definition at line 20 of file PortableGasStove.c.

◆ m_CookingProcess

ref Cooking ItemBase::m_CookingProcess
private

Definition at line 19 of file PortableGasStove.c.

◆ m_CropsCount

int ItemBase::m_CropsCount
private

Definition at line 14 of file PlantBase.c.

◆ m_CropsType

string ItemBase::m_CropsType
private

Definition at line 16 of file PlantBase.c.

◆ m_CurrentPlantMaterialQuantity

float ItemBase::m_CurrentPlantMaterialQuantity
private

Definition at line 21 of file PlantBase.c.

◆ m_DamageTriggers

ref map<string, ref AreaDamageManager> ItemBase::m_DamageTriggers
protected

Definition at line 34 of file BaseBuildingBase.c.

◆ m_DefaultFertility

float ItemBase::m_DefaultFertility = 1
protected

Definition at line 29 of file GardenBase.c.

◆ m_DefectRate

float ItemBase::m_DefectRate
private

Definition at line 5 of file TrapSpawnBase.c.

◆ m_DeleteDryPlantTime

int ItemBase::m_DeleteDryPlantTime
private

Definition at line 27 of file PlantBase.c.

◆ m_DeleteDryPlantTimer

ref Timer ItemBase::m_DeleteDryPlantTimer = NULL
private

Definition at line 37 of file PlantBase.c.

◆ m_DeployedRegularly

bool ItemBase::m_DeployedRegularly
protected

Definition at line 4 of file KitBase.c.

◆ m_DeployLoopSound [1/2]

EffectSound ItemBase::m_DeployLoopSound
protected

Definition at line 15 of file BarbedWire.c.

◆ m_DeployLoopSound [2/2]

ref EffectSound ItemBase::m_DeployLoopSound
protected

Definition at line 36 of file TrapSpawnBase.c.

◆ m_EnergyNeededToCharge

float ItemBase::m_EnergyNeededToCharge = 20
staticprivate

Definition at line 10 of file Defibrillator.c.

◆ m_EngineLoop

EffectSound ItemBase::m_EngineLoop
protected

Definition at line 14 of file PowerGenerator.c.

◆ m_EngineStart

EffectSound ItemBase::m_EngineStart
protected

Definition at line 15 of file PowerGenerator.c.

◆ m_EngineStop

EffectSound ItemBase::m_EngineStop
protected

Definition at line 16 of file PowerGenerator.c.

◆ m_EvaluateDeployment

bool ItemBase::m_EvaluateDeployment
private

Definition at line 4 of file Spotlight.c.

◆ m_FinalCatchProb

float ItemBase::m_FinalCatchProb
private

Definition at line 12 of file TrapSpawnBase.c.

◆ m_ForceIntoHands

bool ItemBase::m_ForceIntoHands
private

Definition at line 3 of file CableReel.c.

◆ m_Fuel

float ItemBase::m_Fuel
private

Definition at line 3 of file PowerGenerator.c.

◆ m_FuelPercentage

int ItemBase::m_FuelPercentage
private

Definition at line 6 of file PowerGenerator.c.

◆ m_FuelTankCapacity

float ItemBase::m_FuelTankCapacity
staticprivate

Definition at line 4 of file PowerGenerator.c.

Referenced by GetMaxFuel(), OnInitEnergy(), and SetFuel().

◆ m_FuelToEnergyRatio

float ItemBase::m_FuelToEnergyRatio
staticprivate

Definition at line 5 of file PowerGenerator.c.

Referenced by GetFuel().

◆ m_FullMaturityTime

int ItemBase::m_FullMaturityTime
private

Definition at line 29 of file PlantBase.c.

◆ m_GardenBase

GardenBase ItemBase::m_GardenBase = NULL
private

Definition at line 39 of file PlantBase.c.

◆ m_GrowthStagesCount

int ItemBase::m_GrowthStagesCount
private

Definition at line 13 of file PlantBase.c.

◆ m_GrowthTimer

ref Timer ItemBase::m_GrowthTimer = NULL
private

Definition at line 33 of file PlantBase.c.

◆ m_HalfExtents

vector ItemBase::m_HalfExtents
protected

Definition at line 39 of file TentBase.c.

◆ m_HasBase

bool ItemBase::m_HasBase
private

Definition at line 10 of file BaseBuildingBase.c.

◆ m_HasCrops

bool ItemBase::m_HasCrops
private

Definition at line 15 of file PlantBase.c.

◆ m_HybridAttachments

ref array<string> ItemBase::m_HybridAttachments
protected

Definition at line 35 of file BaseBuildingBase.c.

◆ m_InfestationChance

float ItemBase::m_InfestationChance
private

Definition at line 11 of file PlantBase.c.

◆ m_InfestationTimer

ref Timer ItemBase::m_InfestationTimer = NULL
private

Definition at line 34 of file PlantBase.c.

◆ m_InfoSetup

string ItemBase::m_InfoSetup
private

Definition at line 47 of file TrapSpawnBase.c.

◆ m_InitWaitTime

int ItemBase::m_InitWaitTime
private

Definition at line 3 of file TrapSpawnBase.c.

◆ m_InteractedPartId

int ItemBase::m_InteractedPartId
private

Definition at line 15 of file BaseBuildingBase.c.

◆ m_IsActive

bool ItemBase::m_IsActive
protected

Definition at line 18 of file TrapSpawnBase.c.

◆ m_IsBeingPacked

bool ItemBase::m_IsBeingPacked = false
protected

Definition at line 29 of file TentBase.c.

◆ m_IsBloodTypeVisible

bool ItemBase::m_IsBloodTypeVisible = false
private

Definition at line 3 of file BloodContainerBase.c.

◆ m_IsCharged

bool ItemBase::m_IsCharged = false
private

Definition at line 7 of file Defibrillator.c.

Referenced by IsCharged().

◆ m_IsDeployed

bool ItemBase::m_IsDeployed
protected

Definition at line 19 of file TrapSpawnBase.c.

◆ m_IsEntrance

bool ItemBase::m_IsEntrance
protected

Definition at line 26 of file TentBase.c.

◆ m_IsFoldable

bool ItemBase::m_IsFoldable
private

Definition at line 6 of file TrapSpawnBase.c.

◆ m_IsFolded

bool ItemBase::m_IsFolded
private

Definition at line 3 of file Spotlight.c.

Referenced by IsFolded().

◆ m_IsInfested

bool ItemBase::m_IsInfested
private

Definition at line 23 of file PlantBase.c.

◆ m_IsInProgress

bool ItemBase::m_IsInProgress
protected

Definition at line 20 of file TrapSpawnBase.c.

◆ m_IsMounted

bool ItemBase::m_IsMounted
protected

Definition at line 26 of file BarbedWire.c.

Referenced by OnVariablesSynchronized().

◆ m_IsPlaced

bool ItemBase::m_IsPlaced
protected

Definition at line 23 of file BarbedWire.c.

◆ m_IsToggle

bool ItemBase::m_IsToggle
protected

Definition at line 28 of file TentBase.c.

◆ m_IsUsable

bool ItemBase::m_IsUsable
protected

Definition at line 44 of file TrapSpawnBase.c.

◆ m_IsWindow

bool ItemBase::m_IsWindow
protected

Definition at line 27 of file TentBase.c.

◆ m_ItemVisibilityModifier

float ItemBase::m_ItemVisibilityModifier
private

Definition at line 786 of file InventoryItem.c.

◆ m_LastMountedState

bool ItemBase::m_LastMountedState
protected

Definition at line 27 of file BarbedWire.c.

◆ m_Light [1/5]

BlowtorchLight ItemBase::m_Light
protected

Definition at line 7 of file Blowtorch.c.

◆ m_Light [2/5]

FlashlightLight ItemBase::m_Light
private

Definition at line 3 of file Flashlight.c.

◆ m_Light [3/5]

PortableGasLampLight ItemBase::m_Light
private

Definition at line 3 of file PortableGasLamp.c.

◆ m_Light [4/5]

StoveLight ItemBase::m_Light
private

Definition at line 3 of file PortableGasStove.c.

◆ m_Light [5/5]

SpotlightLight ItemBase::m_Light
private

Definition at line 5 of file Spotlight.c.

◆ m_LightLocalOrientation

vector ItemBase::m_LightLocalOrientation = "0 0 0"
staticprivate

Definition at line 8 of file Spotlight.c.

◆ m_LightLocalPosition

vector ItemBase::m_LightLocalPosition
staticprivate

Definition at line 7 of file Spotlight.c.

◆ m_map_slots

ref map<string, string> ItemBase::m_map_slots
staticprivate

Definition at line 32 of file GardenBase.c.

◆ m_MarkForDeletion

bool ItemBase::m_MarkForDeletion = false
private

Definition at line 25 of file PlantBase.c.

◆ m_MaxWateredStateVal

int ItemBase::m_MaxWateredStateVal = 0
protected

Definition at line 28 of file GardenBase.c.

◆ m_MineDisarmRate

int ItemBase::m_MineDisarmRate = 60
protected

Definition at line 4 of file ToolBase.c.

◆ m_MinimalDistanceFromPlayersToCatch

float ItemBase::m_MinimalDistanceFromPlayersToCatch
private

Definition at line 8 of file TrapSpawnBase.c.

◆ m_ModuleHorticulture

PluginHorticulture ItemBase::m_ModuleHorticulture
private

Definition at line 42 of file PlantBase.c.

◆ m_Mountables

ref array<string> ItemBase::m_Mountables
protected

Definition at line 36 of file BaseBuildingBase.c.

◆ m_MountSound

EffectSound ItemBase::m_MountSound
protected

Definition at line 29 of file BarbedWire.c.

◆ m_NeedInstalation

bool ItemBase::m_NeedInstalation
protected

Definition at line 42 of file TrapSpawnBase.c.

◆ m_NoBaitCatchProb

float ItemBase::m_NoBaitCatchProb
private

Definition at line 11 of file TrapSpawnBase.c.

◆ m_NoteContents

ref WrittenNoteData ItemBase::m_NoteContents
protected

Definition at line 3 of file Paper.c.

◆ m_OpeningMask

int ItemBase::m_OpeningMask = 0
protected

Definition at line 30 of file TentBase.c.

◆ m_OpeningMaskLocal

int ItemBase::m_OpeningMaskLocal = -1
protected

Definition at line 31 of file TentBase.c.

◆ m_Particle

Particle ItemBase::m_Particle
protected

Definition at line 6 of file ParticleTest.c.

◆ m_PerformedActionId

int ItemBase::m_PerformedActionId
private

Definition at line 16 of file BaseBuildingBase.c.

◆ m_PlaceableWaterSurfaceList

ref array<string> ItemBase::m_PlaceableWaterSurfaceList
protected

DEPRECATED.

Definition at line 29 of file TrapSpawnBase.c.

◆ m_PlantMaterialMultiplier

float ItemBase::m_PlantMaterialMultiplier
private

Definition at line 17 of file PlantBase.c.

◆ m_PlantState

int ItemBase::m_PlantState
private

Definition at line 19 of file PlantBase.c.

◆ m_PlantStateIndex

int ItemBase::m_PlantStateIndex
private

Definition at line 20 of file PlantBase.c.

◆ m_PrevTimer

ref Timer ItemBase::m_PrevTimer
protected

Definition at line 41 of file TrapSpawnBase.c.

◆ m_PreyPos

vector ItemBase::m_PreyPos
private

Definition at line 14 of file TrapSpawnBase.c.

◆ m_ShowAnimationsWhenPacked

ref array<string> ItemBase::m_ShowAnimationsWhenPacked
protected

Definition at line 35 of file TentBase.c.

◆ m_ShowAnimationsWhenPitched

ref array<string> ItemBase::m_ShowAnimationsWhenPitched
protected

Definition at line 34 of file TentBase.c.

◆ m_Slot

ref Slot ItemBase::m_Slot = NULL
private

Definition at line 40 of file PlantBase.c.

◆ m_SlotFertilityState

int ItemBase::m_SlotFertilityState = 0
protected

Definition at line 26 of file GardenBase.c.

◆ m_Slots

ref array<ref Slot> ItemBase::m_Slots
protected

Definition at line 25 of file GardenBase.c.

◆ m_SlotWateredState

int ItemBase::m_SlotWateredState = 0
protected

Definition at line 27 of file GardenBase.c.

◆ m_Smoke

Effect ItemBase::m_Smoke
protected

Definition at line 18 of file PowerGenerator.c.

◆ m_Sound

EffectSound ItemBase::m_Sound
protected

Definition at line 32 of file BaseBuildingBase.c.

◆ m_SoundBurningLoop

EffectSound ItemBase::m_SoundBurningLoop
protected

Definition at line 9 of file Blowtorch.c.

◆ m_SoundBuzzLoop

const string ItemBase::m_SoundBuzzLoop = "electricFenceBuzzLoop1"
staticprivate

Definition at line 14 of file BarbedWire.c.

◆ m_SoundLoopEntity

SoundOnVehicle ItemBase::m_SoundLoopEntity
private

Definition at line 3 of file Refridgerator.c.

◆ m_SoundLoopStartTimer

ref Timer ItemBase::m_SoundLoopStartTimer
protected

Definition at line 17 of file PowerGenerator.c.

◆ m_SoundsCollision

const string ItemBase::m_SoundsCollision[SOUNDS_COLLISION_COUNT] = {"barbedFenceCollision1", "barbedFenceCollision2", "barbedFenceCollision3", "barbedFenceCollision4"}
staticprivate

Definition at line 12 of file BarbedWire.c.

12{"barbedFenceCollision1", "barbedFenceCollision2", "barbedFenceCollision3", "barbedFenceCollision4"};

◆ m_SoundsCut

const string ItemBase::m_SoundsCut[SOUNDS_CUT_COUNT] = {"barbedFenceCut1", "barbedFenceCut2", "barbedFenceCut3"}
staticprivate

Definition at line 11 of file BarbedWire.c.

11{"barbedFenceCut1", "barbedFenceCut2", "barbedFenceCut3"};

◆ m_SoundsShock

const string ItemBase::m_SoundsShock[SOUNDS_SHOCK_COUNT] = {"electricFenceShock1", "electricFenceShock2", "electricFenceShock3", "electricFenceShock4"}
staticprivate

Definition at line 13 of file BarbedWire.c.

13{"electricFenceShock1", "electricFenceShock2", "electricFenceShock3", "electricFenceShock4"};

◆ m_SoundsSpark

const string ItemBase::m_SoundsSpark[SOUNDS_SPARK_COUNT] = {"electricFenceSpark1", "electricFenceSpark2", "electricFenceSpark3", "electricFenceSpark4"}
staticprivate

Definition at line 10 of file BarbedWire.c.

10{"electricFenceSpark1", "electricFenceSpark2", "electricFenceSpark3", "electricFenceSpark4"};

◆ m_SoundTurnOff

EffectSound ItemBase::m_SoundTurnOff
protected

Definition at line 15 of file PortableGasLamp.c.

◆ m_SoundTurnOn

EffectSound ItemBase::m_SoundTurnOn
protected

Definition at line 14 of file PortableGasLamp.c.

◆ m_SparkEvent

ref Timer ItemBase::m_SparkEvent
protected

Definition at line 19 of file BarbedWire.c.

◆ m_SparkPlug

ItemBase ItemBase::m_SparkPlug
protected

Definition at line 20 of file PowerGenerator.c.

◆ m_SpoilAfterFullMaturityTime

int ItemBase::m_SpoilAfterFullMaturityTime
private

Definition at line 30 of file PlantBase.c.

◆ m_SpoilAfterFullMaturityTimer

ref Timer ItemBase::m_SpoilAfterFullMaturityTimer = NULL
private

Definition at line 35 of file PlantBase.c.

◆ m_SpoiledRemoveTime

int ItemBase::m_SpoiledRemoveTime
private

Definition at line 28 of file PlantBase.c.

◆ m_SpoiledRemoveTimer

ref Timer ItemBase::m_SpoiledRemoveTimer = NULL
private

Definition at line 36 of file PlantBase.c.

◆ m_SprayQuantity

float ItemBase::m_SprayQuantity
private

Definition at line 24 of file PlantBase.c.

◆ m_SprayUsage

float ItemBase::m_SprayUsage
private

Definition at line 9 of file PlantBase.c.

◆ m_State

int ItemBase::m_State
protected

Definition at line 24 of file TentBase.c.

◆ m_StateChangeTime

int ItemBase::m_StateChangeTime
private

Definition at line 31 of file PlantBase.c.

◆ m_StateLocal

int ItemBase::m_StateLocal = -1
protected

Definition at line 25 of file TentBase.c.

◆ m_SyncParts01

int ItemBase::m_SyncParts01
private

Definition at line 12 of file BaseBuildingBase.c.

◆ m_SyncParts02

int ItemBase::m_SyncParts02
private

Definition at line 13 of file BaseBuildingBase.c.

◆ m_SyncParts03

int ItemBase::m_SyncParts03
private

Definition at line 14 of file BaseBuildingBase.c.

◆ m_TimeFactor

float ItemBase::m_TimeFactor
private

Definition at line 17 of file PortableGasStove.c.

◆ m_Timer

ref Timer ItemBase::m_Timer
protected

Definition at line 5 of file Raycaster.c.

◆ m_ToggleAnimations

ref map< ref ToggleAnimations, bool> ItemBase::m_ToggleAnimations
protected

Definition at line 33 of file TentBase.c.

◆ m_TriggerActive

bool ItemBase::m_TriggerActive
protected

Definition at line 22 of file BarbedWire.c.

◆ m_UpdateStatusLightsTimer

ref Timer ItemBase::m_UpdateStatusLightsTimer
protected

Definition at line 31 of file BatteryCharger.c.

◆ m_UpdateWaitTime

int ItemBase::m_UpdateWaitTime
private

Definition at line 4 of file TrapSpawnBase.c.

◆ m_UTSLConst

ref UniversalTemperatureSourceLambdaConstant ItemBase::m_UTSLConst
protected

Definition at line 33 of file PortableGasStove.c.

◆ m_UTSLEngine

ref UniversalTemperatureSourceLambdaEngine ItemBase::m_UTSLEngine
protected

Definition at line 24 of file PowerGenerator.c.

◆ m_UTSource

ref UniversalTemperatureSource ItemBase::m_UTSource
protected

DEPRECATED Attached spark plug item.

Definition at line 31 of file PortableGasStove.c.

◆ m_UTSSettings

ref UniversalTemperatureSourceSettings ItemBase::m_UTSSettings
protected

Definition at line 32 of file PortableGasStove.c.

◆ m_WaterSurfaceForSetup

bool ItemBase::m_WaterSurfaceForSetup
protected

Definition at line 31 of file TrapSpawnBase.c.

◆ MAX_PLACEMENT_HEIGHT_DIFF

const float ItemBase::MAX_PLACEMENT_HEIGHT_DIFF = 1.5
private

Definition at line 22 of file TentBase.c.

◆ OPENING_0

const int ItemBase::OPENING_0 = 1
private

Definition at line 3 of file TentBase.c.

◆ OPENING_1

const int ItemBase::OPENING_1 = 2
private

Definition at line 4 of file TentBase.c.

◆ OPENING_10

const int ItemBase::OPENING_10 = 1024
private

Definition at line 13 of file TentBase.c.

◆ OPENING_11

const int ItemBase::OPENING_11 = 2048
private

Definition at line 14 of file TentBase.c.

◆ OPENING_12

const int ItemBase::OPENING_12 = 4096
private

Definition at line 15 of file TentBase.c.

◆ OPENING_13

const int ItemBase::OPENING_13 = 8192
private

Definition at line 16 of file TentBase.c.

◆ OPENING_14

const int ItemBase::OPENING_14 = 16384
private

Definition at line 17 of file TentBase.c.

◆ OPENING_15

const int ItemBase::OPENING_15 = 32768
private

Definition at line 18 of file TentBase.c.

◆ OPENING_2

const int ItemBase::OPENING_2 = 4
private

Definition at line 5 of file TentBase.c.

◆ OPENING_3

const int ItemBase::OPENING_3 = 8
private

Definition at line 6 of file TentBase.c.

◆ OPENING_4

const int ItemBase::OPENING_4 = 16
private

Definition at line 7 of file TentBase.c.

◆ OPENING_5

const int ItemBase::OPENING_5 = 32
private

Definition at line 8 of file TentBase.c.

◆ OPENING_6

const int ItemBase::OPENING_6 = 64
private

Definition at line 9 of file TentBase.c.

◆ OPENING_7

const int ItemBase::OPENING_7 = 128
private

Definition at line 10 of file TentBase.c.

◆ OPENING_8

const int ItemBase::OPENING_8 = 256
private

Definition at line 11 of file TentBase.c.

◆ OPENING_9

const int ItemBase::OPENING_9 = 512
private

Definition at line 12 of file TentBase.c.

◆ PACKED

const int ItemBase::PACKED = 0
staticprivate

Definition at line 20 of file TentBase.c.

◆ PARAM_COOKING_EQUIP_MAX_TEMP

const float ItemBase::PARAM_COOKING_EQUIP_MAX_TEMP = 250
protected

Definition at line 14 of file PortableGasStove.c.

◆ PARAM_COOKING_EQUIP_TEMP_INCREASE

const float ItemBase::PARAM_COOKING_EQUIP_TEMP_INCREASE = 10
protected

Definition at line 13 of file PortableGasStove.c.

◆ PARAM_COOKING_TEMP_THRESHOLD

const float ItemBase::PARAM_COOKING_TEMP_THRESHOLD = 100
protected

Definition at line 12 of file PortableGasStove.c.

◆ PARAM_COOKING_TIME_INC_COEF

const float ItemBase::PARAM_COOKING_TIME_INC_COEF = 0.5
protected

Definition at line 15 of file PortableGasStove.c.

◆ PARTICLE_PATH

int ItemBase::PARTICLE_PATH
protected

Definition at line 5 of file ParticleTest.c.

◆ PITCHED

const int ItemBase::PITCHED = 1
staticprivate

Definition at line 21 of file TentBase.c.

◆ RANDOM_SPARK_INTERVAL

const float ItemBase::RANDOM_SPARK_INTERVAL = 5.0
staticprivate

Definition at line 8 of file BarbedWire.c.

◆ RED_LIGHT_GLOW

const string ItemBase::RED_LIGHT_GLOW = "dz\\gear\\camping\\data\\battery_charger_light_r.rvmat"
staticprotected

Definition at line 17 of file BatteryCharger.c.

◆ REFLECTOR_ID

int ItemBase::REFLECTOR_ID = 1
staticprivate

Definition at line 5 of file Flashlight.c.

◆ SEL_CLIPS_CAR

const string ItemBase::SEL_CLIPS_CAR = "clips_car_battery"
staticprotected

Definition at line 4 of file BatteryCharger.c.

◆ SEL_CLIPS_DETACHED

const string ItemBase::SEL_CLIPS_DETACHED = "clips_detached"
staticprotected

Definition at line 6 of file BatteryCharger.c.

Referenced by OnPlacementStarted().

◆ SEL_CLIPS_FOLDED

const string ItemBase::SEL_CLIPS_FOLDED = "clips_folded"
staticprotected

Definition at line 7 of file BatteryCharger.c.

◆ SEL_CLIPS_TRUCK

const string ItemBase::SEL_CLIPS_TRUCK = "clips_truck_battery"
staticprotected

Definition at line 5 of file BatteryCharger.c.

◆ SEL_CORD_FOLDED [1/2]

const string ItemBase::SEL_CORD_FOLDED = "cord_folded"
staticprotected

Definition at line 11 of file BatteryCharger.c.

Referenced by Hologram::CorrectMaterialPathName(), and OnPlacementStarted().

◆ SEL_CORD_FOLDED [2/2]

const string ItemBase::SEL_CORD_FOLDED = "cord_folded"
staticprivate

Definition at line 5 of file CableReel.c.

◆ SEL_CORD_FOLDED_F

const string ItemBase::SEL_CORD_FOLDED_F = "spotlight_folded_cord_folded"
staticprivate

Definition at line 15 of file Spotlight.c.

◆ SEL_CORD_FOLDED_U

const string ItemBase::SEL_CORD_FOLDED_U = "cord_folded"
staticprivate

Definition at line 12 of file Spotlight.c.

◆ SEL_CORD_PLUGGED [1/2]

const string ItemBase::SEL_CORD_PLUGGED = "cord_plugged"
staticprotected

Definition at line 10 of file BatteryCharger.c.

Referenced by Hologram::CorrectMaterialPathName(), and OnPlacementStarted().

◆ SEL_CORD_PLUGGED [2/2]

const string ItemBase::SEL_CORD_PLUGGED = "cord_plugged"
staticprivate

Definition at line 6 of file CableReel.c.

◆ SEL_CORD_PLUGGED_F

const string ItemBase::SEL_CORD_PLUGGED_F = "spotlight_folded_cord_plugged"
staticprivate

Definition at line 14 of file Spotlight.c.

Referenced by OnPlacementStarted().

◆ SEL_CORD_PLUGGED_U

const string ItemBase::SEL_CORD_PLUGGED_U = "cord_plugged"
staticprivate

Definition at line 13 of file Spotlight.c.

◆ SEL_GLASS_F

const string ItemBase::SEL_GLASS_F = "glass_folded"
staticprivate

Definition at line 19 of file Spotlight.c.

◆ SEL_GLASS_U

const string ItemBase::SEL_GLASS_U = "glass_unfolded"
staticprivate

Definition at line 20 of file Spotlight.c.

◆ SEL_INVENTORY

const string ItemBase::SEL_INVENTORY = "inventory"
staticprivate

Definition at line 17 of file Spotlight.c.

◆ SEL_LIGHT_STATE_1

const string ItemBase::SEL_LIGHT_STATE_1 = "light_stand_by"
staticprotected

Definition at line 12 of file BatteryCharger.c.

◆ SEL_LIGHT_STATE_2

const string ItemBase::SEL_LIGHT_STATE_2 = "light_charging"
staticprotected

Definition at line 13 of file BatteryCharger.c.

◆ SEL_LIGHT_STATE_3

const string ItemBase::SEL_LIGHT_STATE_3 = "light_charged"
staticprotected

Definition at line 14 of file BatteryCharger.c.

◆ SEL_PLACING

const string ItemBase::SEL_PLACING = "placing"
staticprivate

Definition at line 18 of file Spotlight.c.

◆ SEL_PLUG_SUFIX

string ItemBase::SEL_PLUG_SUFIX = "_plug"
staticprivate

Definition at line 6 of file MetalWire.c.

Referenced by UpdateAllSelections().

◆ SEL_REFLECTOR_COMP_U

const string ItemBase::SEL_REFLECTOR_COMP_U = "reflector"
staticprivate

Definition at line 11 of file Spotlight.c.

◆ SEL_REFLECTOR_F

const string ItemBase::SEL_REFLECTOR_F = "reflector_folded"
staticprivate

Definition at line 21 of file Spotlight.c.

◆ SEL_REFLECTOR_U

const string ItemBase::SEL_REFLECTOR_U = "reflector_unfolded"
staticprivate

Definition at line 22 of file Spotlight.c.

◆ SEL_SWITCH_OFF

const string ItemBase::SEL_SWITCH_OFF = "switch_off"
staticprotected

Definition at line 9 of file BatteryCharger.c.

◆ SEL_SWITCH_ON

const string ItemBase::SEL_SWITCH_ON = "switch_on"
staticprotected

Definition at line 8 of file BatteryCharger.c.

◆ SEL_WIRE_PREFIX

string ItemBase::SEL_WIRE_PREFIX = "Att_"
staticprivate

Definition at line 4 of file MetalWire.c.

◆ SEL_WIRE_ROLLED

string ItemBase::SEL_WIRE_ROLLED = "rolled"
staticprivate

Definition at line 3 of file MetalWire.c.

◆ SEL_WIRE_SUFIX

string ItemBase::SEL_WIRE_SUFIX = "_plugged"
staticprivate

Definition at line 5 of file MetalWire.c.

Referenced by UpdateAllSelections().

◆ SHOCK_SOUND

const string ItemBase::SHOCK_SOUND = "defibrillator_shock_SoundSet"
staticprivate

Definition at line 5 of file Defibrillator.c.

◆ SLOT_MATERIAL_COMPOST_DRY

const string ItemBase::SLOT_MATERIAL_COMPOST_DRY = "dz\\gear\\cultivation\\data\\soil_cultivated_compost.rvmat"
staticprivate

Definition at line 14 of file GardenBase.c.

◆ SLOT_MATERIAL_COMPOST_WET

const string ItemBase::SLOT_MATERIAL_COMPOST_WET = "dz\\gear\\cultivation\\data\\soil_cultivated_compost_wet.rvmat"
staticprivate

Definition at line 13 of file GardenBase.c.

◆ SLOT_MATERIAL_DRY

const string ItemBase::SLOT_MATERIAL_DRY = "dz\\gear\\cultivation\\data\\soil_cultivated.rvmat"
staticprivate

Definition at line 9 of file GardenBase.c.

◆ SLOT_MATERIAL_LIMED_DRY

const string ItemBase::SLOT_MATERIAL_LIMED_DRY = "dz\\gear\\cultivation\\data\\soil_cultivated_limed.rvmat"
staticprivate

Definition at line 12 of file GardenBase.c.

◆ SLOT_MATERIAL_LIMED_WET

const string ItemBase::SLOT_MATERIAL_LIMED_WET = "dz\\gear\\cultivation\\data\\soil_cultivated_limed_wet.rvmat"
staticprivate

Definition at line 11 of file GardenBase.c.

◆ SLOT_MATERIAL_WET

const string ItemBase::SLOT_MATERIAL_WET = "dz\\gear\\cultivation\\data\\soil_cultivated_wet.rvmat"
staticprivate

Definition at line 8 of file GardenBase.c.

◆ SLOT_MEMORY_POINT_PREFIX

const string ItemBase::SLOT_MEMORY_POINT_PREFIX = "slot_"
staticprivate

Definition at line 19 of file GardenBase.c.

◆ SLOT_SEEDBASE_PREFIX

const string ItemBase::SLOT_SEEDBASE_PREFIX = "seedbase_"
staticprivate

Definition at line 20 of file GardenBase.c.

◆ SLOT_SELECTION_COVERED_PREFIX

const string ItemBase::SLOT_SELECTION_COVERED_PREFIX = "slotCovered_"
staticprivate

Definition at line 18 of file GardenBase.c.

◆ SLOT_SELECTION_DIGGED_PREFIX

const string ItemBase::SLOT_SELECTION_DIGGED_PREFIX = "seedbase_"
staticprivate

Definition at line 17 of file GardenBase.c.

◆ SLOT_TEXTURE_DIGGED_WET_LIME

const string ItemBase::SLOT_TEXTURE_DIGGED_WET_LIME = "dz\\gear\\cultivation\\data\\soil_digged_wet_lime_CO.paa"
staticprivate

Definition at line 4 of file GardenBase.c.

◆ SLOT_TEXTURE_DIGGED_WET_PLANT

const string ItemBase::SLOT_TEXTURE_DIGGED_WET_PLANT = "dz\\gear\\cultivation\\data\\soil_digged_wet_plant_CO.paa"
staticprivate

Definition at line 5 of file GardenBase.c.

◆ SOUND_BUILD_METAL

const string ItemBase::SOUND_BUILD_METAL = "putDown_MetalPlank_SoundSet"
private

Definition at line 23 of file BaseBuildingBase.c.

◆ SOUND_BUILD_WIRE

const string ItemBase::SOUND_BUILD_WIRE = "putDown_BarbedWire_SoundSet"
private

Definition at line 24 of file BaseBuildingBase.c.

◆ SOUND_BUILD_WOOD_LOG

const string ItemBase::SOUND_BUILD_WOOD_LOG = "putDown_WoodLog_SoundSet"
private

Definition at line 20 of file BaseBuildingBase.c.

◆ SOUND_BUILD_WOOD_PLANK

const string ItemBase::SOUND_BUILD_WOOD_PLANK = "putDown_WoodPlank_SoundSet"
private

Definition at line 21 of file BaseBuildingBase.c.

◆ SOUND_BUILD_WOOD_STAIRS

const string ItemBase::SOUND_BUILD_WOOD_STAIRS = "putDown_WoodStairs_SoundSet"
private

Definition at line 22 of file BaseBuildingBase.c.

◆ SOUND_BURNING

const string ItemBase::SOUND_BURNING = "Blowtorch_Loop_SoundSet"
private

Definition at line 5 of file Blowtorch.c.

◆ SOUND_DISMANTLE_METAL

const string ItemBase::SOUND_DISMANTLE_METAL = "Crash_MetalPlank_SoundSet"
private

Definition at line 29 of file BaseBuildingBase.c.

◆ SOUND_DISMANTLE_WIRE

const string ItemBase::SOUND_DISMANTLE_WIRE = "putDown_BarbedWire_SoundSet"
private

Definition at line 30 of file BaseBuildingBase.c.

◆ SOUND_DISMANTLE_WOOD_LOG

const string ItemBase::SOUND_DISMANTLE_WOOD_LOG = "Crash_WoodPlank_SoundSet"
private

Definition at line 26 of file BaseBuildingBase.c.

◆ SOUND_DISMANTLE_WOOD_PLANK

const string ItemBase::SOUND_DISMANTLE_WOOD_PLANK = "Crash_WoodPlank_SoundSet"
private

Definition at line 27 of file BaseBuildingBase.c.

◆ SOUND_DISMANTLE_WOOD_STAIRS

const string ItemBase::SOUND_DISMANTLE_WOOD_STAIRS = "Crash_WoodPlank_SoundSet"
private

Definition at line 28 of file BaseBuildingBase.c.

◆ SOUND_MOUNT

const string ItemBase::SOUND_MOUNT = "putDown_BarbedWire_SoundSet"
protected

Definition at line 28 of file BarbedWire.c.

◆ SOUND_TURN_OFF

const string ItemBase::SOUND_TURN_OFF = "portablegaslamp_turn_off_SoundSet"
private

Definition at line 11 of file PortableGasLamp.c.

◆ SOUND_TURN_ON

const string ItemBase::SOUND_TURN_ON = "portablegaslamp_turn_on_SoundSet"
private

Definition at line 10 of file PortableGasLamp.c.

◆ SOUNDS_COLLISION_COUNT

const int ItemBase::SOUNDS_COLLISION_COUNT = 4
staticprivate

Definition at line 6 of file BarbedWire.c.

◆ SOUNDS_CUT_COUNT

const int ItemBase::SOUNDS_CUT_COUNT = 3
staticprivate

Definition at line 5 of file BarbedWire.c.

◆ SOUNDS_SHOCK_COUNT

const int ItemBase::SOUNDS_SHOCK_COUNT = 4
staticprivate

Definition at line 7 of file BarbedWire.c.

◆ SOUNDS_SPARK_COUNT

const int ItemBase::SOUNDS_SPARK_COUNT = 4
staticprivate

Definition at line 4 of file BarbedWire.c.

◆ SPARKPLUG_ATTACH_SOUND

const string ItemBase::SPARKPLUG_ATTACH_SOUND = "sparkplug_attach_SoundSet"
staticprivate

Definition at line 11 of file PowerGenerator.c.

◆ SPARKPLUG_DETACH_SOUND

const string ItemBase::SPARKPLUG_DETACH_SOUND = "sparkplug_detach_SoundSet"
staticprivate

Definition at line 12 of file PowerGenerator.c.

◆ SPOIL_AFTER_MATURITY_TIME

const float ItemBase::SPOIL_AFTER_MATURITY_TIME = 14400
private

Definition at line 44 of file PlantBase.c.

◆ START_SOUND

const string ItemBase::START_SOUND = "powerGeneratorTurnOn_SoundSet"
staticprivate

Definition at line 8 of file PowerGenerator.c.

◆ STATE_DRY

const int ItemBase::STATE_DRY = 0
staticprivate

Definition at line 4 of file PlantBase.c.

◆ STATE_GROWING

const int ItemBase::STATE_GROWING = 1
staticprivate

Definition at line 5 of file PlantBase.c.

◆ STATE_MATURE

const int ItemBase::STATE_MATURE = 2
staticprivate

Definition at line 6 of file PlantBase.c.

◆ STATE_SPOILED

const int ItemBase::STATE_SPOILED = 3
staticprivate

Definition at line 7 of file PlantBase.c.

◆ STOP_SOUND

const string ItemBase::STOP_SOUND = "powerGeneratorTurnOff_SoundSet"
staticprivate

Definition at line 10 of file PowerGenerator.c.

◆ SWITCH_LIGHT_GLOW

const string ItemBase::SWITCH_LIGHT_GLOW = "dz\\gear\\camping\\data\\battery_charger_light_switch_on.rvmat"
staticprotected

Definition at line 20 of file BatteryCharger.c.

◆ TEXTURE_FLAME

const string ItemBase::TEXTURE_FLAME = "dz\\gear\\cooking\\data\\flame_butane_ca.paa"
private

Definition at line 3 of file Blowtorch.c.

◆ YELLOW_LIGHT_GLOW

const string ItemBase::YELLOW_LIGHT_GLOW = "dz\\gear\\camping\\data\\battery_charger_light_y.rvmat"
staticprotected

Definition at line 19 of file BatteryCharger.c.


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