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

Protected Member Functions

override void DeferredInit ()
 
void Init ()
 
override void EEInit ()
 
override vector GetUniversalTemperatureSourcePosition ()
 
override void EEDelete (EntityAI parent)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanReleaseAttachment (EntityAI attachment)
 
override bool CanRemoveFromCargo (EntityAI parent)
 
override bool CanPutAsAttachment (EntityAI parent)
 
bool CanBeTakenAsCargo ()
 
override bool IsIgnited ()
 
override bool CanIgniteItem (EntityAI ignite_target=NULL)
 
override bool HasFlammableMaterial ()
 
override bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
bool IsRagDryEnough (ItemBase rag)
 
void UpdateCheckForReceivingUpgrade ()
 
override void OnIgnitedThis (EntityAI fire_source)
 
override void OnSwitchOn ()
 
override void OnSwitchOff ()
 
void SetTorchDecraftResult (string type)
 
bool ConsumeRag ()
 
void ConsumeLard (Lard lard)
 
void Upgrade (ItemBase source)
 
void ConsumeFuelFromBottle (ItemBase vessel)
 
void ConsumeFuelFromGasStation ()
 
void RuinRags ()
 
override void OnInventoryExit (Man player)
 
bool StandUp ()
 
void CalculateQuantity ()
 
bool CanReceiveUpgrade ()
 
void CraftingInit (float quantity)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
bool CanTransformIntoStick ()
 
void TryTransformIntoStick ()
 
override void OnWorkStart ()
 
void StopAllParticles ()
 
Rag GetRag ()
 
void LockRags (bool do_lock)
 
void UpdateLight ()
 
override void OnItemInHandsPlayerSwimStart (PlayerBase player)
 
override void OnWork (float consumed_energy)
 
string GetSoundName ()
 
void UpdateParticle ()
 
override void OnWorkStop ()
 
override int GetMeleeMode ()
 
override int GetMeleeHeavyMode ()
 
override int GetMeleeSprintMode ()
 
override void SetActions ()
 
override void OnAttachmentQuantityChangedEx (ItemBase item, float delta)
 
override bool DisassembleOnLastDetach ()
 
override void OnDebugSpawn ()
 
int GetRagQuantity ()
 
string GetBurningMaterial ()
 
string GetBurntMaterial ()
 
void UpdateMaterial ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
void ApplyResultModifications (ItemBase result)
 

Protected Attributes

ref UniversalTemperatureSource m_UTSource
 
ref UniversalTemperatureSourceSettings m_UTSSettings
 
ref UniversalTemperatureSourceLambdaConstant m_UTSLConstant
 

Private Member Functions

void FlammableBase ()
 
- Private Member Functions inherited from ItemBase
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)
 

Private Attributes

SoundOnVehicle m_LoopSoundEntity
 
Particle m_FireParticle
 
bool m_CanReceiveUpgrade
 
bool m_IsBeingDestructed = false
 
float m_BurnTimePerRagEx
 
float m_BurnTimePerFullLardEx
 
float m_BurnTimePerFullFuelDoseEx
 
float m_MaxConsumableLardQuantityEx
 
float m_MaxConsumableFuelQuantityEx
 
float m_WaterEvaporationByFireIntensityEx = 0.001
 
int m_StartFadeOutOfLightAtQuantityEx = 3
 
int m_RagsUpgradedCount
 
bool m_ConsumeRagFlipFlop
 
vector m_ParticleLocalPos = Vector(0, 0.50, 0)
 
string m_DecraftResult = "WoodenStick"
 
TorchLight m_Light
 
bool m_WasLit
 
- Private Attributes inherited from ItemBase
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
 

Additional Inherited Members

- Static Private Attributes inherited from ItemBase
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
 

Detailed Description

Definition at line 1 of file Torch.c.

Constructor & Destructor Documentation

◆ FlammableBase()

void FlammableBase::FlammableBase ( )
inlineprivate

Definition at line 3 of file Torch.c.

4 {
5 Init();
6 }
void Init()
Definition Torch.c:39

References Init().

Member Function Documentation

◆ ApplyResultModifications()

void FlammableBase::ApplyResultModifications ( ItemBase result)
inlineprotected

Definition at line 798 of file Torch.c.

799 {
800 result.SetQuantity(1);
801 }

Referenced by TryTransformIntoStick().

◆ CalculateQuantity()

void FlammableBase::CalculateQuantity ( )
inlineprotected

Definition at line 393 of file Torch.c.

394 {
395 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
396 SetQuantityNormalized(GetCompEM().GetEnergy0To1());
397 }
void SetQuantityNormalized(float value, bool destroy_config=true, bool destroy_forced=false)
Sets quantity in normalized 0..1 form between the item's Min a Max values as defined by item's config...
Definition ItemBase.c:7918
proto native CGame GetGame()

References GetGame(), and SetQuantityNormalized().

Referenced by ConsumeFuelFromBottle(), ConsumeFuelFromGasStation(), ConsumeLard(), EEItemAttached(), EEItemDetached(), OnAttachmentQuantityChangedEx(), OnDebugSpawn(), OnWork(), OnWorkStop(), and Upgrade().

◆ CanBeIgnitedBy()

override bool FlammableBase::CanBeIgnitedBy ( EntityAI igniter = NULL)
inlineprotected

Definition at line 145 of file Torch.c.

146 {
147 if (!GetCompEM().CheckWetness())
148 return false;
149
150 ItemBase rag = GetRag();
151
152 if (rag && GetCompEM().GetEnergy() < GetCompEM().GetEnergyUsage() * GetCompEM().GetUpdateInterval())
153 {
154 if (IsRagDryEnough(rag))
155 return false;
156 }
157
158 if (!GetCompEM().CanWork())
159 return false;
160
161 if (GetCompEM().GetEnergy() < 3)
162 return false;
163
164 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
165 if (player)
166 {
167 if (this != player.GetItemInHands())//we are in player's inventory, but not in his hands
168 return false;
169 }
170
171 return true;
172 }
float GetEnergy()
Definition ItemBase.c:8140
bool IsRagDryEnough(ItemBase rag)
Definition Torch.c:174
Rag GetRag()
Definition Torch.c:505

References GetEnergy(), GetRag(), and IsRagDryEnough().

◆ CanBeTakenAsCargo()

bool FlammableBase::CanBeTakenAsCargo ( )
inlineprotected

Definition at line 123 of file Torch.c.

124 {
125 // Don't let players burn their pockets!
126 return !GetCompEM().IsWorking();
127 }

Referenced by CanPutInCargo(), and CanRemoveFromCargo().

◆ CanIgniteItem()

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

Definition at line 134 of file Torch.c.

135 {
136 return GetCompEM().IsWorking();
137 }

◆ CanPutAsAttachment()

override bool FlammableBase::CanPutAsAttachment ( EntityAI parent)
inlineprotected

Definition at line 118 of file Torch.c.

119 {
120 return !GetCompEM().IsWorking();
121 }

◆ CanPutInCargo()

override bool FlammableBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 100 of file Torch.c.

101 {
102 if (!super.CanPutInCargo(parent)) return false;
103 return CanBeTakenAsCargo();
104 }
bool CanBeTakenAsCargo()
Definition Torch.c:123

References CanBeTakenAsCargo().

◆ CanReceiveAttachment()

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

Definition at line 91 of file Torch.c.

92 {
93 ItemBase att = ItemBase.Cast(GetInventory().FindAttachment(slotId));
94 if (att && att.IsFullQuantity())
95 return false;
96
97 return super.CanReceiveAttachment(attachment, slotId);
98 }

◆ CanReceiveUpgrade()

bool FlammableBase::CanReceiveUpgrade ( )
inlineprotected

Definition at line 399 of file Torch.c.

400 {
401 return m_CanReceiveUpgrade;
402 }
bool m_CanReceiveUpgrade
Definition Torch.c:10

References m_CanReceiveUpgrade.

◆ CanReleaseAttachment()

override bool FlammableBase::CanReleaseAttachment ( EntityAI attachment)
inlineprotected

Definition at line 106 of file Torch.c.

107 {
108 if (!super.CanReleaseAttachment(attachment))
109 return false;
110 return !GetCompEM().IsWorking();
111 }

◆ CanRemoveFromCargo()

override bool FlammableBase::CanRemoveFromCargo ( EntityAI parent)
inlineprotected

Definition at line 113 of file Torch.c.

114 {
115 return CanBeTakenAsCargo();
116 }

References CanBeTakenAsCargo().

◆ CanTransformIntoStick()

bool FlammableBase::CanTransformIntoStick ( )
inlineprotected

Definition at line 440 of file Torch.c.

441 {
442 if ((GetGame().IsServer() || !GetGame().IsMultiplayer()) && !IsIgnited() && !GetRag() && !IsSetForDeletion())
443 return true;
444 else
445 return false;
446 }
override bool IsIgnited()
Definition Torch.c:129

References GetGame(), GetRag(), and IsIgnited().

Referenced by TryTransformIntoStick().

◆ ConsumeFuelFromBottle()

void FlammableBase::ConsumeFuelFromBottle ( ItemBase vessel)
inlineprotected

Definition at line 302 of file Torch.c.

303 {
304 if (vessel)
305 {
306 float vessel_quant = vessel.GetQuantity();
307
309
312
314
316 float add_energy_coef = 1;
317
318 float energy_limit = GetCompEM().GetEnergyMax() - GetCompEM().GetEnergy();
319
321 {
325 }
326
327 GetCompEM().AddEnergy(add_energy);
328 vessel.AddQuantity(-available_vessel_quant);
329
331
333 }
334 }
float m_MaxConsumableFuelQuantityEx
Definition Torch.c:17
void UpdateCheckForReceivingUpgrade()
Definition Torch.c:181
float m_BurnTimePerFullFuelDoseEx
Definition Torch.c:15
void CalculateQuantity()
Definition Torch.c:393

References CalculateQuantity(), m_BurnTimePerFullFuelDoseEx, m_MaxConsumableFuelQuantityEx, and UpdateCheckForReceivingUpgrade().

◆ ConsumeFuelFromGasStation()

void FlammableBase::ConsumeFuelFromGasStation ( )
inlineprotected

Definition at line 336 of file Torch.c.

337 {
339 float add_energy_coef = 1;
340
341 float energy_limit = GetCompEM().GetEnergyMax() - GetCompEM().GetEnergy();
342
344 {
347 }
348
349 GetCompEM().AddEnergy(add_energy);
352 }

References CalculateQuantity(), m_BurnTimePerFullFuelDoseEx, and UpdateCheckForReceivingUpgrade().

◆ ConsumeLard()

void FlammableBase::ConsumeLard ( Lard lard)
inlineprotected

Definition at line 238 of file Torch.c.

239 {
240 if (lard)
241 {
242 float lard_quant = lard.GetQuantity();
243
245
248
250
252 float add_energy_coef = 1;
253
254 float energy_limit = GetCompEM().GetEnergyMax() - GetCompEM().GetEnergy();
255
257 {
261 }
262
263 GetCompEM().AddEnergy(add_energy);
264 lard.AddQuantity(-available_lard_quant);
265
267
269 }
270 }
float m_BurnTimePerFullLardEx
Definition Torch.c:14
float m_MaxConsumableLardQuantityEx
Definition Torch.c:16

References CalculateQuantity(), m_BurnTimePerFullLardEx, m_MaxConsumableLardQuantityEx, and UpdateCheckForReceivingUpgrade().

◆ ConsumeRag()

bool FlammableBase::ConsumeRag ( )
inlineprotected

Definition at line 218 of file Torch.c.

219 {
220 ItemBase rag = GetRag();
221
222 if (rag)
223 {
224 if (rag.GetQuantity() <= 1)
225 {
226 LockRags(false); // Unlock attachment slot before deletion. Otherwise it will get stuck locked and unusable.
227 }
228
229 rag.AddQuantity(-1);
230 rag.SetHealth(0);
231 //GetCompEM().AddEnergy( m_BurnTimePerRagEx );
232 return true;
233 }
234
235 return false;
236 }
void LockRags(bool do_lock)
Definition Torch.c:510

References GetRag(), and LockRags().

Referenced by OnIgnitedThis(), and OnWork().

◆ CraftingInit()

void FlammableBase::CraftingInit ( float quantity)
inlineprotected

Definition at line 404 of file Torch.c.

405 {
406 GetCompEM().SetEnergy(m_BurnTimePerRagEx * quantity);
407 m_CanReceiveUpgrade = true;
408 SetSynchDirty();
409 }
float m_BurnTimePerRagEx
Definition Torch.c:13

References m_BurnTimePerRagEx, and m_CanReceiveUpgrade.

Referenced by OnDebugSpawn().

◆ DeferredInit()

override void FlammableBase::DeferredInit ( )
inlineprotected

Definition at line 33 of file Torch.c.

34 {
36 LockRags(true);
37 }
int m_RagsUpgradedCount
Definition Torch.c:21

References LockRags(), and m_RagsUpgradedCount.

◆ DisassembleOnLastDetach()

override bool FlammableBase::DisassembleOnLastDetach ( )
inlineprotected

Definition at line 731 of file Torch.c.

732 {
733 return true;
734 }

◆ EEDelete()

override void FlammableBase::EEDelete ( EntityAI parent)
inlineprotected

Definition at line 82 of file Torch.c.

83 {
84 super.EEDelete(parent);
85 if (m_LoopSoundEntity != NULL && GetGame() != NULL)
86 GetGame().ObjectDelete(m_LoopSoundEntity);
87
89 }
SoundOnVehicle m_LoopSoundEntity
Definition Torch.c:8
void StopAllParticles()
Definition Torch.c:499

References GetGame(), m_LoopSoundEntity, and StopAllParticles().

◆ EEInit()

override void FlammableBase::EEInit ( )
inlineprotected

Definition at line 53 of file Torch.c.

54 {
55 super.EEInit();
56
57 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
58 {
60 m_UTSSettings.m_Updateable = true;
61 m_UTSSettings.m_UpdateInterval = 1;
62 m_UTSSettings.m_TemperatureMin = 0;
63 m_UTSSettings.m_TemperatureMax = 300;
64 m_UTSSettings.m_RangeFull = 0.5;
65 m_UTSSettings.m_RangeMax = 1;
66 m_UTSSettings.m_TemperatureCap = 5;
67
70 }
71
72 }
ref UniversalTemperatureSource m_UTSource
Definition Torch.c:29
ref UniversalTemperatureSourceLambdaConstant m_UTSLConstant
Definition Torch.c:31
ref UniversalTemperatureSourceSettings m_UTSSettings
Definition Torch.c:30
original Timer deletes m_params which is unwanted

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

◆ EEItemAttached()

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

Definition at line 412 of file Torch.c.

413 {
414 super.EEItemAttached(item, slot_name);
417 }

References CalculateQuantity(), and UpdateCheckForReceivingUpgrade().

◆ EEItemDetached()

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

Definition at line 420 of file Torch.c.

421 {
422 super.EEItemDetached(item, slot_name);
423
425 {
426 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
427 {
428 EntityAI rags = EntityAI.Cast(GetGame().CreateObjectEx(item.GetType(), GetPosition(), ECE_PLACE_ON_SURFACE));
429 if (rags)
430 MiscGameplayFunctions.TransferItemProperties(item, rags);
431 }
432 return;
433 }
434
437 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(TryTransformIntoStick, 100);
438 }
const int ECE_PLACE_ON_SURFACE
class JsonUndergroundAreaTriggerData GetPosition
bool m_IsBeingDestructed
Definition Torch.c:11
void TryTransformIntoStick()
Definition Torch.c:448
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

References CalculateQuantity(), CALL_CATEGORY_SYSTEM, ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, m_IsBeingDestructed, TryTransformIntoStick(), and UpdateCheckForReceivingUpgrade().

◆ GetBurningMaterial()

string FlammableBase::GetBurningMaterial ( )
inlineprotected

Definition at line 750 of file Torch.c.

751 {
752 return "";
753 }

Referenced by UpdateMaterial().

◆ GetBurntMaterial()

string FlammableBase::GetBurntMaterial ( )
inlineprotected

Definition at line 755 of file Torch.c.

756 {
757 return "";
758 }

Referenced by UpdateMaterial().

◆ GetMeleeHeavyMode()

override int FlammableBase::GetMeleeHeavyMode ( )
inlineprotected

Definition at line 696 of file Torch.c.

697 {
698 if (GetCompEM().IsWorking())
699 return 4; // ???
700 else
701 return 1; // ???
702 }

◆ GetMeleeMode()

override int FlammableBase::GetMeleeMode ( )
inlineprotected

Definition at line 688 of file Torch.c.

689 {
690 if (GetCompEM().IsWorking())
691 return 3; // ???
692 else
693 return 0; // ???
694 }

◆ GetMeleeSprintMode()

override int FlammableBase::GetMeleeSprintMode ( )
inlineprotected

Definition at line 704 of file Torch.c.

705 {
706 if (GetCompEM().IsWorking())
707 return 5; // ???
708 else
709 return 2; // ???
710 }

◆ GetRag()

Rag FlammableBase::GetRag ( )
inlineprotected

Definition at line 505 of file Torch.c.

506 {
507 return Rag.Cast(GetAttachmentByType(Rag));
508 }

Referenced by CanBeIgnitedBy(), CanTransformIntoStick(), ConsumeRag(), GetRagQuantity(), LockRags(), OnWork(), OnWorkStop(), RuinRags(), and Upgrade().

◆ GetRagQuantity()

int FlammableBase::GetRagQuantity ( )
inlineprotected

Definition at line 743 of file Torch.c.

744 {
745 if (GetRag())
746 return Math.Round(GetRag().GetQuantity());
747 return 0;
748 }
override float GetQuantity()
Definition ItemBase.c:7995
Definition EnMath.c:7
static proto float Round(float f)
Returns mathematical round of value.

References GetQuantity(), GetRag(), and Math::Round().

Referenced by OnDebugSpawn(), OnWork(), OnWorkStop(), UpdateCheckForReceivingUpgrade(), and Upgrade().

◆ GetSoundName()

string FlammableBase::GetSoundName ( )
inlineprotected

Definition at line 615 of file Torch.c.

616 {
617 return "torchLoop";
618 }

Referenced by OnWork().

◆ GetUniversalTemperatureSourcePosition()

override vector FlammableBase::GetUniversalTemperatureSourcePosition ( )
inlineprotected

Definition at line 74 of file Torch.c.

75 {
76 if (GetHierarchyRoot())
77 return GetHierarchyRoot().GetPosition();
78
79 return super.GetPosition();
80 }

◆ HasFlammableMaterial()

override bool FlammableBase::HasFlammableMaterial ( )
inlineprotected

Definition at line 139 of file Torch.c.

140 {
141 return true;
142 }

◆ Init()

void FlammableBase::Init ( )
inlineprotected

Definition at line 39 of file Torch.c.

40 {
42 {
43 string cfg_path = "CfgVehicles " + GetType();
44 m_BurnTimePerRagEx = GetGame().ConfigGetFloat(cfg_path + " burnTimePerRag");
45 m_BurnTimePerFullLardEx = GetGame().ConfigGetFloat(cfg_path + " burnTimePerFullLardDose");
46 m_BurnTimePerFullFuelDoseEx = GetGame().ConfigGetFloat(cfg_path + " burnTimePerFullFuelDose");
47 m_MaxConsumableLardQuantityEx = GetGame().ConfigGetFloat(cfg_path + " maxConsumableLardDose");
48 m_MaxConsumableFuelQuantityEx = GetGame().ConfigGetFloat(cfg_path + " maxConsumableFuelDose");
49 }
50 RegisterNetSyncVariableBool("m_CanReceiveUpgrade");
51 }
eBleedingSourceType GetType()

References GetGame(), GetType(), m_BurnTimePerFullFuelDoseEx, m_BurnTimePerFullLardEx, m_BurnTimePerRagEx, m_MaxConsumableFuelQuantityEx, and m_MaxConsumableLardQuantityEx.

Referenced by FlammableBase().

◆ IsIgnited()

override bool FlammableBase::IsIgnited ( )
inlineprotected

Definition at line 129 of file Torch.c.

130 {
131 return GetCompEM().IsWorking();
132 }

Referenced by BroomBase::CanTransformIntoStick(), and CanTransformIntoStick().

◆ IsRagDryEnough()

bool FlammableBase::IsRagDryEnough ( ItemBase rag)
inlineprotected

Definition at line 174 of file Torch.c.

175 {
176 float wetness = rag.GetWet();
177 bool is_dry_enough = wetness <= 1 - GetCompEM().GetWetnessExposure();
178 return is_dry_enough;
179 }

Referenced by CanBeIgnitedBy().

◆ LockRags()

void FlammableBase::LockRags ( bool do_lock)
inlineprotected

Definition at line 510 of file Torch.c.

511 {
512 ItemBase rag = GetRag();
513 if (rag)
514 {
515 if (do_lock)
516 rag.LockToParent();
517 else if (!m_RagsUpgradedCount)
518 rag.UnlockFromParent();
519 }
520 }

References GetRag(), and m_RagsUpgradedCount.

Referenced by ConsumeRag(), DeferredInit(), OnWorkStart(), OnWorkStop(), and Upgrade().

◆ OnAttachmentQuantityChangedEx()

override void FlammableBase::OnAttachmentQuantityChangedEx ( ItemBase item,
float delta )
inlineprotected

Definition at line 719 of file Torch.c.

720 {
721 super.OnAttachmentQuantityChangedEx(item, delta);
722 if (delta > 0)
723 {
724 GetCompEM().AddEnergy(m_BurnTimePerRagEx * delta);
727 }
728 }

References CalculateQuantity(), m_BurnTimePerRagEx, and UpdateCheckForReceivingUpgrade().

◆ OnDebugSpawn()

override void FlammableBase::OnDebugSpawn ( )
inlineprotected

Definition at line 736 of file Torch.c.

737 {
738 GetInventory().CreateAttachment("Rag");
741 }
void CraftingInit(float quantity)
Definition Torch.c:404
int GetRagQuantity()
Definition Torch.c:743

References CalculateQuantity(), CraftingInit(), and GetRagQuantity().

◆ OnIgnitedThis()

override void FlammableBase::OnIgnitedThis ( EntityAI fire_source)
inlineprotected

Definition at line 190 of file Torch.c.

191 {
192 if (!GetCompEM().HasEnoughStoredEnergy())
193 ConsumeRag();
194
195 GetCompEM().SwitchOn();
196 }
bool ConsumeRag()
Definition Torch.c:218

References ConsumeRag().

Referenced by BroomBase::OnAction().

◆ OnInventoryExit()

override void FlammableBase::OnInventoryExit ( Man player)
inlineprotected

Definition at line 365 of file Torch.c.

366 {
367 super.OnInventoryExit(player);
368
369 StandUp();
370 }
bool StandUp()
Definition Torch.c:373

References StandUp().

◆ OnItemInHandsPlayerSwimStart()

override void FlammableBase::OnItemInHandsPlayerSwimStart ( PlayerBase player)
inlineprotected

Definition at line 561 of file Torch.c.

562 {
563 GetCompEM().SwitchOff();
564 }

◆ OnStoreLoad()

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

Definition at line 785 of file Torch.c.

786 {
787 if (!super.OnStoreLoad(ctx, version))
788 return false;
789 if (version >= 130)
790 {
791 if (!ctx.Read(m_WasLit))
792 return false;
793 }
795 return true;
796 }
bool m_WasLit
Definition Torch.c:27
void UpdateMaterial()
Definition Torch.c:760

References m_WasLit, and UpdateMaterial().

◆ OnStoreSave()

override void FlammableBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 778 of file Torch.c.

779 {
780 super.OnStoreSave(ctx);
781 ctx.Write(m_WasLit);
782 }

References m_WasLit.

◆ OnSwitchOff()

override void FlammableBase::OnSwitchOff ( )
inlineprotected

Definition at line 207 of file Torch.c.

208 {
209 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
210 m_UTSource.SetActive(false);
211 }

References GetGame(), and m_UTSource.

◆ OnSwitchOn()

override void FlammableBase::OnSwitchOn ( )
inlineprotected

Definition at line 198 of file Torch.c.

199 {
200 if (!GetCompEM().HasEnoughStoredEnergy())
201 GetCompEM().SwitchOff();
202
203 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
204 m_UTSource.SetActive(true);
205 }

References GetGame(), and m_UTSource.

◆ OnWork()

override void FlammableBase::OnWork ( float consumed_energy)
inlineprotected

Definition at line 567 of file Torch.c.

568 {
570 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
571 {
572 if (GetCompEM().GetEnergy() < ((GetRagQuantity() + m_RagsUpgradedCount) - 1) * m_BurnTimePerRagEx)
573 {
574 if (m_RagsUpgradedCount == 0) //always burn rag
575 ConsumeRag();
576 else if (m_ConsumeRagFlipFlop)//burn rag
577 {
578 ConsumeRag();
580 }
581 else//burn lard/fuel
582 {
585 }
586 }
587 if (GetRag() && GetCompEM().GetEnergy() == 0 && GetRagQuantity() > 0)
588 GetRag().SetQuantity(0);
589 RuinRags();
590
592
594
595 AddWet(-m_WaterEvaporationByFireIntensityEx * GetCompEM().GetUpdateInterval());
596
597 Rag rag = GetRag();
598
599 if (rag)
600 rag.AddWet(-m_WaterEvaporationByFireIntensityEx * GetCompEM().GetUpdateInterval());
601 }
602
603 if (!m_LoopSoundEntity && GetGame() && (!GetGame().IsDedicatedServer()))
604 m_LoopSoundEntity = PlaySoundLoop(GetSoundName(), 50);
605
606 // Effect scaling by fuel
607 if (!GetGame().IsDedicatedServer())
608 {
609 UpdateLight();
611 }
612 }
override void AddWet(float value)
Definition ItemBase.c:8271
void UpdateLight()
Definition Torch.c:522
void RuinRags()
Definition Torch.c:354
bool m_ConsumeRagFlipFlop
Definition Torch.c:22
float m_WaterEvaporationByFireIntensityEx
Definition Torch.c:18
void UpdateParticle()
Definition Torch.c:620
string GetSoundName()
Definition Torch.c:615

References AddWet(), CalculateQuantity(), ConsumeRag(), GetEnergy(), GetGame(), GetRag(), GetRagQuantity(), GetSoundName(), m_BurnTimePerRagEx, m_ConsumeRagFlipFlop, m_LoopSoundEntity, m_RagsUpgradedCount, m_WaterEvaporationByFireIntensityEx, RuinRags(), UpdateCheckForReceivingUpgrade(), UpdateLight(), UpdateMaterial(), and UpdateParticle().

◆ OnWorkStart()

override void FlammableBase::OnWorkStart ( )
inlineprotected

Definition at line 492 of file Torch.c.

493 {
494 m_WasLit = true;
495 LockRags(true);
497 }

References LockRags(), m_WasLit, and UpdateMaterial().

◆ OnWorkStop()

override void FlammableBase::OnWorkStop ( )
inlineprotected

Definition at line 654 of file Torch.c.

655 {
657 if (m_Light)
658 m_Light.FadeOut();
659
660 if (m_LoopSoundEntity && GetGame() && (!GetGame().IsDedicatedServer()))
661 {
662 GetGame().ObjectDelete(m_LoopSoundEntity);
664 }
665
666 if (m_FireParticle)
667 {
670 }
671
674
675 LockRags(false);
676
677 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
678 {
679 if (GetRag() && GetCompEM().GetEnergy() == 0 && GetRagQuantity() > 0)
680 GetRag().SetQuantity(0);
681 }
682
684 }
TorchLight m_Light
Definition Torch.c:26
Particle m_FireParticle
Definition Torch.c:9
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
Definition Particle.c:262

References CalculateQuantity(), GetEnergy(), GetGame(), GetRag(), GetRagQuantity(), LockRags(), m_FireParticle, m_Light, m_LoopSoundEntity, Particle::Stop(), TryTransformIntoStick(), UpdateCheckForReceivingUpgrade(), and UpdateMaterial().

◆ RuinRags()

void FlammableBase::RuinRags ( )
inlineprotected

Definition at line 354 of file Torch.c.

355 {
356 ItemBase rag = GetRag();
357
358 if (rag)
359 {
360 rag.SetHealth(1); //does not actually ruin rags, combining would be impossible
361 }
362 }

References GetRag().

Referenced by OnWork(), and Upgrade().

◆ SetActions()

override void FlammableBase::SetActions ( )
inlineprotected

Definition at line 712 of file Torch.c.

713 {
714 super.SetActions();
715
717 }
ActionLightItemOnFireCB ActionContinuousBaseCB ActionLightItemOnFire()
void AddAction(typename actionName)

References ActionLightItemOnFire(), and AddAction().

◆ SetTorchDecraftResult()

void FlammableBase::SetTorchDecraftResult ( string type)
inlineprotected

Definition at line 213 of file Torch.c.

214 {
215 m_DecraftResult = type; //not persistent for the moment
216 }
string m_DecraftResult
Definition Torch.c:25

References m_DecraftResult.

◆ StandUp()

bool FlammableBase::StandUp ( )
inlineprotected

Definition at line 373 of file Torch.c.

374 {
375 string surface_type;
377 GetGame().SurfaceGetType(position[0], position[2], surface_type);
378 bool is_surface_soft = GetGame().IsSurfaceDigable(surface_type);
379
380 if (is_surface_soft && !IsRuined())
381 {
382 vector ori_rotate = "0 0 0";
383 ori_rotate[0] = Math.RandomFloat(0, 360);
384 ori_rotate[1] = Math.RandomFloat(0, 10);
385 SetOrientation(ori_rotate);
386
387 return true; // I am standing up
388 }
389
390 return false; // I am NOT standing up
391 }
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].

References GetGame(), GetPosition, and Math::RandomFloat().

Referenced by OnInventoryExit().

◆ StopAllParticles()

void FlammableBase::StopAllParticles ( )
inlineprotected

Definition at line 499 of file Torch.c.

500 {
501 if (m_FireParticle)
503 }

References m_FireParticle, and Particle::Stop().

Referenced by EEDelete(), and TryTransformIntoStick().

◆ TryTransformIntoStick()

void FlammableBase::TryTransformIntoStick ( )
inlineprotected

Definition at line 448 of file Torch.c.

449 {
450 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
451 if (m_IsBeingDestructed || (player && player.IsPlayerDisconnected()))
452 return;
453
455 {
456 m_IsBeingDestructed = true;
457 if (player)
458 {
459 // Transform object into wooden stick
461
463 player.ServerReplaceItemInHandsWithNew(lambda);
464 }
465 else
466 {
467 // Create wooden stick and delete Torch
468 vector pos = GetPosition();
470
471 if (GetType() == "WoodenStick")
472 ori = ori + Vector(0, 90, 0);
473
474 ItemBase stick = ItemBase.Cast(GetGame().CreateObjectEx(m_DecraftResult, pos, ECE_PLACE_ON_SURFACE));
476 stick.SetPosition(pos);
477 stick.PlaceOnSurface();
478
479 if (stick.GetType() == "LongWoodenStick")
480 {
481 pos = stick.GetPosition() + Vector(0, -0.3, 0);
482 stick.SetPosition(pos);
483 }
484
485 stick.SetOrientation(ori);
486 GetGame().ObjectDelete(this);
487 }
488 }
489 }
vector GetOrientation()
void ApplyResultModifications(ItemBase result)
Definition Torch.c:798
bool CanTransformIntoStick()
Definition Torch.c:440
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

References ApplyResultModifications(), CanTransformIntoStick(), ECE_PLACE_ON_SURFACE, GetGame(), GetOrientation(), GetPosition, GetType(), m_DecraftResult, m_IsBeingDestructed, StopAllParticles(), and Vector().

Referenced by EEItemDetached(), and OnWorkStop().

◆ UpdateCheckForReceivingUpgrade()

void FlammableBase::UpdateCheckForReceivingUpgrade ( )
inlineprotected

Definition at line 181 of file Torch.c.

182 {
183 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
184 {
186 SetSynchDirty();
187 }
188 }

References GetGame(), GetRagQuantity(), m_BurnTimePerRagEx, m_CanReceiveUpgrade, and m_RagsUpgradedCount.

Referenced by ConsumeFuelFromBottle(), ConsumeFuelFromGasStation(), ConsumeLard(), EEItemAttached(), EEItemDetached(), OnAttachmentQuantityChangedEx(), OnWork(), OnWorkStop(), and Upgrade().

◆ UpdateLight()

void FlammableBase::UpdateLight ( )
inlineprotected

Definition at line 522 of file Torch.c.

523 {
524 if (!m_Light)
525 {
526 m_Light = TorchLight.Cast(ScriptedLightBase.CreateLight(TorchLight, Vector(0, 0, 0), 1));
527 m_Light.AttachOnObject(this, m_ParticleLocalPos + Vector(0, 0.2, 0));
528 }
529
530 if (m_FireParticle)
531 {
533
534 if (direct_particle && direct_particle != m_Light.GetAttachmentParent())
535 m_Light.AttachOnObject(direct_particle, Vector(0, 0.2, 0));
536 }
537
538 float update_interval = GetCompEM().GetUpdateInterval();
539
541 {
544
547
550
551 m_Light.FadeBrightnessTo(m_Light.m_TorchBrightness * brightness_coef, update_interval);
552 m_Light.FadeRadiusTo(m_Light.m_TorchRadius * radius_coef, update_interval);
553 }
554 else
555 {
556 m_Light.FadeBrightnessTo(m_Light.m_TorchBrightness, update_interval);
557 m_Light.FadeRadiusTo(m_Light.m_TorchRadius, update_interval);
558 }
559 }
vector m_ParticleLocalPos
Definition Torch.c:23
int m_StartFadeOutOfLightAtQuantityEx
Definition Torch.c:19
Object GetDirectParticleEffect()
Returns direct particle effect entity which is usually handled by this class 'Particle' if there is o...
Definition Particle.c:302

References Particle::GetDirectParticleEffect(), GetQuantity(), m_FireParticle, m_Light, m_ParticleLocalPos, m_StartFadeOutOfLightAtQuantityEx, and Vector().

Referenced by OnWork().

◆ UpdateMaterial()

void FlammableBase::UpdateMaterial ( )
inlineprotected

Definition at line 760 of file Torch.c.

761 {
762 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
763 {
764 if (GetCompEM().IsWorking())
765 {
766 if (GetBurningMaterial())
767 SetObjectMaterial(0, GetBurningMaterial());
768 }
769 else if (m_WasLit)
770 {
771 if (GetBurntMaterial())
772 SetObjectMaterial(0, GetBurntMaterial());
773 }
774 }
775 }
string GetBurningMaterial()
Definition Torch.c:750
string GetBurntMaterial()
Definition Torch.c:755

References GetBurningMaterial(), GetBurntMaterial(), GetGame(), and m_WasLit.

Referenced by OnStoreLoad(), OnWork(), OnWorkStart(), and OnWorkStop().

◆ UpdateParticle()

void FlammableBase::UpdateParticle ( )
inlineprotected

Definition at line 620 of file Torch.c.

621 {
622 if (GetQuantity() < 40)
623 {
624 if (!m_FireParticle)
625 m_FireParticle = ParticleManager.GetInstance().PlayOnObject(ParticleList.TORCH_T1, this, m_ParticleLocalPos);
626
627 float scale = GetQuantity() / 40;
628
629 if (scale > 1)
630 scale = 1;
631
632 if (scale < 0.25)
633 scale = 0.25;
634
638 }
639 else
640 {
642 {
643 // Executes once when fire particle starts or changes
644
645 if (m_FireParticle)
647
648 m_FireParticle = ParticleManager.GetInstance().PlayOnObject(ParticleList.TORCH_T2, this, m_ParticleLocalPos);
649 }
650 }
651
652 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
void ScaleParticleParamFromOriginal(int parameter_id, float coef)
Scales the given parameter on all emitors relatively to their ORIGINAL value.
Definition Particle.c:646
int GetParticleID()
Gets particle id.
Definition Particle.c:292
static const int TORCH_T2
static const int TORCH_T1
EmitorParam
Definition EnVisual.c:114

References Particle::GetParticleID(), GetQuantity(), m_FireParticle, m_ParticleLocalPos, ParticleManager(), Particle::ScaleParticleParamFromOriginal(), Particle::Stop(), ParticleList::TORCH_T1, and ParticleList::TORCH_T2.

Referenced by OnWork().

◆ Upgrade()

void FlammableBase::Upgrade ( ItemBase source)
inlineprotected

Definition at line 272 of file Torch.c.

273 {
274 if (!GetRag())
275 return;
276 RuinRags();
277 LockRags(true);
278 float torchCurrentEnergy = GetCompEM().GetEnergy();
279 float sourceQuantity = 100000;//for upgrade from environment(gas pump)
280
281 if (source)
282 sourceQuantity = source.GetQuantity();
283
285 //float maxUpgradeCapacity = GetRagQuantity() * m_BurnTimePerRagEx;
287 //float freeUpgradeCapacity = maxUpgradeCapacity - currentlyUpgraded;
293 GetCompEM().AddEnergy(upgradeQuantity);
294 m_ConsumeRagFlipFlop = 0;//consume fuel first
295 if (source)
296 source.AddQuantity(-upgradeQuantity);
299 }
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Min(float x, float y)
Returns smaller of two given values.
static proto float Ceil(float f)
Returns ceil of value.

References CalculateQuantity(), Math::Ceil(), GetRag(), GetRagQuantity(), LockRags(), m_BurnTimePerRagEx, m_ConsumeRagFlipFlop, m_RagsUpgradedCount, Math::Max(), Math::Min(), RuinRags(), and UpdateCheckForReceivingUpgrade().

Member Data Documentation

◆ m_BurnTimePerFullFuelDoseEx

float FlammableBase::m_BurnTimePerFullFuelDoseEx
private

Definition at line 15 of file Torch.c.

Referenced by ConsumeFuelFromBottle(), ConsumeFuelFromGasStation(), and Init().

◆ m_BurnTimePerFullLardEx

float FlammableBase::m_BurnTimePerFullLardEx
private

Definition at line 14 of file Torch.c.

Referenced by ConsumeLard(), and Init().

◆ m_BurnTimePerRagEx

float FlammableBase::m_BurnTimePerRagEx
private

◆ m_CanReceiveUpgrade

bool FlammableBase::m_CanReceiveUpgrade
private

Definition at line 10 of file Torch.c.

Referenced by CanReceiveUpgrade(), CraftingInit(), and UpdateCheckForReceivingUpgrade().

◆ m_ConsumeRagFlipFlop

bool FlammableBase::m_ConsumeRagFlipFlop
private

Definition at line 22 of file Torch.c.

Referenced by OnWork(), and Upgrade().

◆ m_DecraftResult

string FlammableBase::m_DecraftResult = "WoodenStick"
private

Definition at line 25 of file Torch.c.

Referenced by BroomBase::Init(), SetTorchDecraftResult(), and TryTransformIntoStick().

◆ m_FireParticle

Particle FlammableBase::m_FireParticle
private

◆ m_IsBeingDestructed

bool FlammableBase::m_IsBeingDestructed = false
private

Definition at line 11 of file Torch.c.

Referenced by EEItemDetached(), and TryTransformIntoStick().

◆ m_Light

TorchLight FlammableBase::m_Light
private

Definition at line 26 of file Torch.c.

Referenced by OnWorkStop(), and UpdateLight().

◆ m_LoopSoundEntity

SoundOnVehicle FlammableBase::m_LoopSoundEntity
private

Definition at line 8 of file Torch.c.

Referenced by EEDelete(), OnWork(), and OnWorkStop().

◆ m_MaxConsumableFuelQuantityEx

float FlammableBase::m_MaxConsumableFuelQuantityEx
private

Definition at line 17 of file Torch.c.

Referenced by ConsumeFuelFromBottle(), and Init().

◆ m_MaxConsumableLardQuantityEx

float FlammableBase::m_MaxConsumableLardQuantityEx
private

Definition at line 16 of file Torch.c.

Referenced by ConsumeLard(), and Init().

◆ m_ParticleLocalPos

vector FlammableBase::m_ParticleLocalPos = Vector(0, 0.50, 0)
private

Definition at line 23 of file Torch.c.

Referenced by BroomBase::Init(), UpdateLight(), BroomBase::UpdateParticle(), and UpdateParticle().

◆ m_RagsUpgradedCount

int FlammableBase::m_RagsUpgradedCount
private

Definition at line 21 of file Torch.c.

Referenced by DeferredInit(), LockRags(), OnWork(), UpdateCheckForReceivingUpgrade(), and Upgrade().

◆ m_StartFadeOutOfLightAtQuantityEx

int FlammableBase::m_StartFadeOutOfLightAtQuantityEx = 3
private

Definition at line 19 of file Torch.c.

Referenced by UpdateLight().

◆ m_UTSLConstant

ref UniversalTemperatureSourceLambdaConstant FlammableBase::m_UTSLConstant
protected

Definition at line 31 of file Torch.c.

Referenced by EEInit().

◆ m_UTSource

ref UniversalTemperatureSource FlammableBase::m_UTSource
protected

Definition at line 29 of file Torch.c.

Referenced by EEInit(), OnSwitchOff(), and OnSwitchOn().

◆ m_UTSSettings

ref UniversalTemperatureSourceSettings FlammableBase::m_UTSSettings
protected

Definition at line 30 of file Torch.c.

Referenced by EEInit().

◆ m_WasLit

bool FlammableBase::m_WasLit
private

Definition at line 27 of file Torch.c.

Referenced by OnStoreLoad(), OnStoreSave(), OnWorkStart(), and UpdateMaterial().

◆ m_WaterEvaporationByFireIntensityEx

float FlammableBase::m_WaterEvaporationByFireIntensityEx = 0.001
private

Definition at line 18 of file Torch.c.

Referenced by OnWork().


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