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

Protected Member Functions

void RefreshAudio ()
 
void RemoveAudio ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void AfterStoreLoad ()
 
FoodStage GetFoodStage ()
 
override bool IsMeat ()
 
override bool IsCorpse ()
 
override bool IsFruit ()
 
override bool IsMushroom ()
 
FoodStageType GetFoodStageType ()
 
bool IsFoodRaw ()
 
bool IsFoodBaked ()
 
bool IsFoodBoiled ()
 
bool IsFoodDried ()
 
bool IsFoodBurned ()
 
bool IsFoodRotten ()
 
void ChangeFoodStage (FoodStageType new_food_stage_type)
 
FoodStageType GetNextFoodStageType (CookingMethodType cooking_method)
 
string GetFoodStageName (FoodStageType food_stage_type)
 
bool CanChangeToNewStage (CookingMethodType cooking_method)
 
void TransferFoodStage (notnull Edible_Base source)
 
float GetCookingTime ()
 
void SetCookingTime (float time)
 
void ReplaceEdibleWithNew (string typeName)
 
override void SetActions ()
 
void SoundCookingStart (string sound_name)
 
void SoundCookingStop ()
 
override bool CanHaveTemperature ()
 
override bool CanDecay ()
 
override bool CanProcessDecay ()
 
override void ProcessDecay (float delta, bool hasRootAsPlayer)
 
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
override string GetDebugText ()
 
float GetDecayTimer ()
 
float GetDecayDelta ()
 
FoodStageType GetLastDecayStage ()
 

Static Protected Member Functions

static float GetFoodTotalVolume (ItemBase item, string classname="", int food_stage=0)
 
static float GetFoodEnergy (ItemBase item, string classname="", int food_stage=0)
 
static float GetFoodWater (ItemBase item, string classname="", int food_stage=0)
 
static float GetFoodNutritionalIndex (ItemBase item, string classname="", int food_stage=0)
 
static float GetFoodToxicity (ItemBase item, string classname="", int food_stage=0)
 
static int GetFoodAgents (ItemBase item, string classname="", int food_stage=0)
 
static float GetFoodDigestibility (ItemBase item, string classname="", int food_stage=0)
 
static NutritionalProfile GetNutritionalProfile (ItemBase item, string classname="", int food_stage=0)
 

Protected Attributes

bool m_MakeCookingSounds
 
SoundOnVehicle m_SoundCooking
 
EffectSound m_SoundEffectCooking
 DEPRECATED.
 
string m_SoundPlaying
 
ref FoodStage m_FoodStage
 
float m_DecayTimer
 
float m_DecayDelta = 0.0
 
FoodStageType m_LastDecayStage = FoodStageType.NONE
 

Private Member Functions

void Edible_Base ()
 
override void EEInit ()
 
override void EEDelete (EntityAI parent)
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
void UpdateVisuals ()
 
bool Consume (float amount, PlayerBase consumer)
 
void OnConsume (float amount, PlayerBase consumer)
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
void Synchronize ()
 
override void OnVariablesSynchronized ()
 
void MakeSoundsOnClient (bool soundstate, CookingMethodType cookingMethod=CookingMethodType.NONE)
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCookedOnStick ()
 
override bool CanBeCooked ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
void BoxCerealCrunchin ()
 
override void SetActions ()
 
void Candycane_Colorbase ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsFruit ()
 
override bool CanDecay ()
 
bool ConditionAttach (EntityAI parent)
 
bool ConditionDetach (EntityAI parent)
 
override void SetActions ()
 
override bool CanBeCookedOnStick ()
 
override bool CanBeCooked ()
 
override bool IsCorpse ()
 
override bool CanDecay ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override void SetActions ()
 
override void OnConsume (float amount, PlayerBase consumer)
 
override bool CanBeCookedOnStick ()
 
override bool CanBeCooked ()
 
override bool IsCorpse ()
 
override bool CanDecay ()
 
override bool CanBeSkinned ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override void InitItemVariables ()
 
override bool CanPutAsAttachment (EntityAI parent)
 
override bool CanDetachAttachment (EntityAI parent)
 
override float GetDisinfectQuantity (int system=0, Param param1=null)
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanPutAsAttachment (EntityAI parent)
 
override bool CanDetachAttachment (EntityAI parent)
 
override void SetActions ()
 
void HumanSteakMeat ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCookedOnStick ()
 
override bool CanBeCooked ()
 
override bool IsCorpse ()
 
override bool CanDecay ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override void SetActions ()
 
override void OnConsume (float amount, PlayerBase consumer)
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCookedOnStick ()
 
override bool CanBeCooked ()
 
override bool IsCorpse ()
 
override bool CanDecay ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsFruit ()
 
override bool CanDecay ()
 
bool ConditionAttach (EntityAI parent)
 
bool ConditionDetach (EntityAI parent)
 
override void SetActions ()
 
override bool CanBeCookedOnStick ()
 
override bool CanBeCooked ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanPutAsAttachment (EntityAI parent)
 
override bool CanDetachAttachment (EntityAI parent)
 
override void SetActions ()
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override bool IsMeat ()
 
override bool CanDecay ()
 
override void SetActions ()
 
override bool CanBeCookedOnStick ()
 
override bool CanBeCooked ()
 
override bool IsMeat ()
 
- 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

const string DIRECT_COOKING_SLOT_NAME = "DirectCooking"
 
const string SOUND_BAKING_START = "Baking_SoundSet"
 
const string SOUND_BAKING_DONE = "Baking_Done_SoundSet"
 
const string SOUND_BURNING_DONE = "Food_Burning_SoundSet"
 
CookingMethodType m_CookedByMethod
 
- 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 Edible_Base.c.

Constructor & Destructor Documentation

◆ Edible_Base()

void Edible_Base::Edible_Base ( )
inlineprivate

Definition at line 20 of file Edible_Base.c.

21 {
22 if (HasFoodStage())
23 {
24 m_FoodStage = new FoodStage(this);
25
26 RegisterNetSyncVariableInt("m_FoodStage.m_FoodStageType", FoodStageType.NONE, FoodStageType.COUNT);
27 RegisterNetSyncVariableInt("m_FoodStage.m_SelectionIndex", 0, 6);
28 RegisterNetSyncVariableInt("m_FoodStage.m_TextureIndex", 0, 6);
29 RegisterNetSyncVariableInt("m_FoodStage.m_MaterialIndex", 0, 6);
30 RegisterNetSyncVariableFloat("m_FoodStage.m_CookingTime", 0, 600, 0);
31
32 m_SoundPlaying = "";
34 RegisterNetSyncVariableInt("m_CookedByMethod", CookingMethodType.NONE, CookingMethodType.COUNT);
35 RegisterNetSyncVariableBool("m_MakeCookingSounds");
36 }
37 }
CookingMethodType
Definition Cooking.c:2
FoodStageType
Definition FoodStage.c:2
bool HasFoodStage()
Definition ItemBase.c:7038
string m_SoundPlaying
Definition Edible_Base.c:12
CookingMethodType m_CookedByMethod
Definition Edible_Base.c:18
ref FoodStage m_FoodStage
Definition Edible_Base.c:13

References HasFoodStage(), m_CookedByMethod, m_FoodStage, and m_SoundPlaying.

Member Function Documentation

◆ AfterStoreLoad()

override void Edible_Base::AfterStoreLoad ( )
inlineprotected

Definition at line 214 of file Edible_Base.c.

215 {
216 super.AfterStoreLoad();
217
218 Synchronize();
219 }
void Synchronize()

References Synchronize().

◆ BoxCerealCrunchin()

void Edible_Base::BoxCerealCrunchin ( )
inlineprivate

Definition at line 3 of file BoxCerealCrunchin.c.

4 {
5 }

◆ CanBeCooked() [1/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 93 of file Edible_Base.c.

94 {
95 return false;
96 }

◆ CanBeCooked() [2/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file BearSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [3/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 8 of file Bitterlings.c.

9 {
10 return true;
11 }

◆ CanBeCooked() [4/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file BoarSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [5/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file CaninaBerry.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [6/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 8 of file Carp.c.

9 {
10 return false;
11 }

◆ CanBeCooked() [7/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file CarpFilletMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [8/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 8 of file Chicken_ColorBase.c.

9 {
10 return false;
11 }

◆ CanBeCooked() [9/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file ChickenBreastMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [10/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file CowSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [11/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file DeerSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [12/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file FoxSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [13/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file GoatSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [14/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 8 of file HumanSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCooked() [15/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file Lard.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [16/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 8 of file Mackerel.c.

9 {
10 return false;
11 }

◆ CanBeCooked() [17/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file MackerelFilletMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [18/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file MouflonSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [19/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file PigSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [20/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 8 of file Rabbit.c.

9 {
10 return false;
11 }

◆ CanBeCooked() [21/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file RabbitLegMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [22/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file SambucusBerry.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [23/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 8 of file Sardines.c.

9 {
10 return true;
11 }

◆ CanBeCooked() [24/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file SheepSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [25/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 3 of file WolfSteakMeat.c.

4 {
5 return true;
6 }

◆ CanBeCooked() [26/26]

override bool Edible_Base::CanBeCooked ( )
inlineprivate

Definition at line 8 of file Worm.c.

9 {
10 return false;
11 }

◆ CanBeCookedOnStick() [1/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 98 of file Edible_Base.c.

99 {
100 return false;
101 }

◆ CanBeCookedOnStick() [2/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file BearSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [3/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 3 of file Bitterlings.c.

4 {
5 return true;
6 }

◆ CanBeCookedOnStick() [4/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file BoarSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [5/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file CaninaBerry.c.

9 {
10 return false;
11 }

◆ CanBeCookedOnStick() [6/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 3 of file Carp.c.

4 {
5 return false;
6 }

◆ CanBeCookedOnStick() [7/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file CarpFilletMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [8/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 3 of file Chicken_ColorBase.c.

4 {
5 return false;
6 }

◆ CanBeCookedOnStick() [9/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file ChickenBreastMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [10/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file CowSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [11/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file DeerSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [12/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file FoxSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [13/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file GoatSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [14/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 13 of file HumanSteakMeat.c.

14 {
15 return true;
16 }

◆ CanBeCookedOnStick() [15/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file Lard.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [16/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 3 of file Mackerel.c.

4 {
5 return false;
6 }

◆ CanBeCookedOnStick() [17/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file MackerelFilletMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [18/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file MouflonSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [19/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file PigSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [20/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 3 of file Rabbit.c.

4 {
5 return false;
6 }

◆ CanBeCookedOnStick() [21/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file RabbitLegMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [22/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file SambucusBerry.c.

9 {
10 return false;
11 }

◆ CanBeCookedOnStick() [23/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 3 of file Sardines.c.

4 {
5 return true;
6 }

◆ CanBeCookedOnStick() [24/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file SheepSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [25/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 8 of file WolfSteakMeat.c.

9 {
10 return true;
11 }

◆ CanBeCookedOnStick() [26/26]

override bool Edible_Base::CanBeCookedOnStick ( )
inlineprivate

Definition at line 3 of file Worm.c.

4 {
5 return false;
6 }

◆ CanBeSkinned()

override bool Edible_Base::CanBeSkinned ( )
inlineprivate

Definition at line 23 of file Chicken_ColorBase.c.

24 {
25 if (GetHealthLevel() == GameConstants.STATE_RUINED)
26 return false;
27
28 return true;
29 }
const int STATE_RUINED
Definition constants.c:757

References GameConstants::STATE_RUINED.

◆ CanChangeToNewStage()

bool Edible_Base::CanChangeToNewStage ( CookingMethodType cooking_method)
inlineprotected

Definition at line 409 of file Edible_Base.c.

410 {
411 return GetFoodStage().CanChangeToNewStage(cooking_method);
412 }
FoodStage GetFoodStage()

References GetFoodStage().

Referenced by ProcessDecay().

◆ CanDecay() [1/25]

override bool Edible_Base::CanDecay ( )
inlineprotected

Definition at line 493 of file Edible_Base.c.

494 {
495 return false;
496 }

◆ CanDecay() [2/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file BearSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [3/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file Bitterlings.c.

19 {
20 return true;
21 }

◆ CanDecay() [4/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file BoarSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [5/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file CaninaBerry.c.

19 {
20 return true;
21 }

◆ CanDecay() [6/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file Carp.c.

19 {
20 return true;
21 }

◆ CanDecay() [7/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file CarpFilletMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [8/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file Chicken_ColorBase.c.

19 {
20 return true;
21 }

◆ CanDecay() [9/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file ChickenBreastMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [10/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file CowSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [11/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file DeerSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [12/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file FoxSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [13/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file GoatSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [14/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 23 of file HumanSteakMeat.c.

24 {
25 return true;
26 }

◆ CanDecay() [15/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file Lard.c.

19 {
20 return true;
21 }

◆ CanDecay() [16/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file Mackerel.c.

19 {
20 return true;
21 }

◆ CanDecay() [17/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file MackerelFilletMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [18/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file MouflonSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [19/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file PigSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [20/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file Rabbit.c.

19 {
20 return true;
21 }

◆ CanDecay() [21/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file RabbitLegMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [22/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file SambucusBerry.c.

19 {
20 return true;
21 }

◆ CanDecay() [23/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file Sardines.c.

19 {
20 return true;
21 }

◆ CanDecay() [24/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file SheepSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDecay() [25/25]

override bool Edible_Base::CanDecay ( )
inlineprivate

Definition at line 18 of file WolfSteakMeat.c.

19 {
20 return true;
21 }

◆ CanDetachAttachment() [1/3]

override bool Edible_Base::CanDetachAttachment ( EntityAI parent)
inlineprivate

Definition at line 43 of file DisinfectantSpray.c.

44 {
45
46 bool is_barrel = false;
47 bool is_opened_barrel = false;
48
49 // is barrel
50 if (parent.IsKindOf("Barrel_ColorBase"))
51 is_barrel = true;
52
53 // is opened barrel
54 if (is_barrel && parent.GetAnimationPhase("Lid") == 1)
55 is_opened_barrel = true;
56
58 return true;
59 return false;
60 }

◆ CanDetachAttachment() [2/3]

override bool Edible_Base::CanDetachAttachment ( EntityAI parent)
inlineprivate

Definition at line 36 of file Guts.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 }

◆ CanDetachAttachment() [3/3]

override bool Edible_Base::CanDetachAttachment ( EntityAI parent)
inlineprivate

Definition at line 36 of file SmallGuts.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 }

◆ Candycane_Colorbase()

void Edible_Base::Candycane_Colorbase ( )
inlineprivate

Definition at line 3 of file Candycane_Colorbase.c.

4 {
5 }

◆ CanHaveTemperature()

override bool Edible_Base::CanHaveTemperature ( )
inlineprotected

Definition at line 488 of file Edible_Base.c.

489 {
490 return true;
491 }

◆ CanProcessDecay()

override bool Edible_Base::CanProcessDecay ( )
inlineprotected

Definition at line 498 of file Edible_Base.c.

499 {
500 return (GetFoodStageType() != FoodStageType.ROTTEN);
501 }
FoodStageType GetFoodStageType()

References GetFoodStageType().

◆ CanPutAsAttachment() [1/3]

override bool Edible_Base::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 10 of file DisinfectantSpray.c.

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

◆ CanPutAsAttachment() [2/3]

override bool Edible_Base::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 3 of file Guts.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", "Nails", "OakBark", "BirchBark", "Lime", "Disinfectant" };
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/3]

override bool Edible_Base::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 3 of file SmallGuts.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", "Nails", "OakBark", "BirchBark", "Lime", "Disinfectant" };
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 }

◆ ChangeFoodStage()

◆ ConditionAttach() [1/2]

bool Edible_Base::ConditionAttach ( EntityAI parent)
inlineprivate

Definition at line 23 of file CaninaBerry.c.

24 {
25 //if Barrel_ColorBase
26 if (parent.IsInherited(Barrel_ColorBase))
27 {
29
30 if (barrel.IsOpen() && !barrel.FindAttachmentBySlotName("Nails") && !barrel.FindAttachmentBySlotName("OakBark") && !barrel.FindAttachmentBySlotName("BirchBark") && !barrel.FindAttachmentBySlotName("Lime") && !barrel.FindAttachmentBySlotName("Disinfectant") && !barrel.FindAttachmentBySlotName("Guts"))
31 return true;
32 }
33
34 return false;
35 }

◆ ConditionAttach() [2/2]

bool Edible_Base::ConditionAttach ( EntityAI parent)
inlineprivate

Definition at line 23 of file SambucusBerry.c.

24 {
25 //if Barrel_ColorBase
26 if (parent.IsInherited(Barrel_ColorBase))
27 {
29
30 if (barrel.IsOpen() && !barrel.FindAttachmentBySlotName("Nails") && !barrel.FindAttachmentBySlotName("OakBark") && !barrel.FindAttachmentBySlotName("BirchBark") && !barrel.FindAttachmentBySlotName("Lime") && !barrel.FindAttachmentBySlotName("Disinfectant") && !barrel.FindAttachmentBySlotName("Guts"))
31 return true;
32 }
33
34 return false;
35 }

◆ ConditionDetach() [1/2]

bool Edible_Base::ConditionDetach ( EntityAI parent)
inlineprivate

Definition at line 37 of file CaninaBerry.c.

38 {
39 //if Barrel_ColorBase
40 if (parent.IsInherited(Barrel_ColorBase))
41 {
43
44 if (!barrel.IsOpen())
45 return false;
46 }
47
48 return true;
49 }

◆ ConditionDetach() [2/2]

bool Edible_Base::ConditionDetach ( EntityAI parent)
inlineprivate

Definition at line 37 of file SambucusBerry.c.

38 {
39 //if Barrel_ColorBase
40 if (parent.IsInherited(Barrel_ColorBase))
41 {
43
44 if (!barrel.IsOpen())
45 return false;
46 }
47
48 return true;
49 }

◆ Consume()

bool Edible_Base::Consume ( float amount,
PlayerBase consumer )
inlineprivate

Definition at line 82 of file Edible_Base.c.

83 {
84 AddQuantity(-amount, false, false);
85 OnConsume(amount, consumer);
86
87 return true;
88 }
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
void OnConsume(float amount, PlayerBase consumer)

References AddQuantity(), and OnConsume().

◆ EEDelete()

override void Edible_Base::EEDelete ( EntityAI parent)
inlineprivate

Definition at line 46 of file Edible_Base.c.

47 {
48 super.EEDelete(parent);
49
51 }
void RemoveAudio()

References RemoveAudio().

◆ EEInit()

override void Edible_Base::EEInit ( )
inlineprivate

Definition at line 39 of file Edible_Base.c.

40 {
41 super.EEInit();
42
44 }
void UpdateVisuals()
Definition Edible_Base.c:76

References UpdateVisuals().

◆ EEItemLocationChanged()

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

disable sounds (from cooking)

check for DirectCooking slot name

Definition at line 53 of file Edible_Base.c.

54 {
55 super.EEItemLocationChanged(oldLoc, newLoc);
56
58 if (oldLoc.GetType() == InventoryLocationType.ATTACHMENT || oldLoc.GetType() == InventoryLocationType.CARGO)
59 {
60 switch (oldLoc.GetParent().GetType())
61 {
62 case "FryingPan":
63 case "Pot":
64 case "Cauldron":
65 case "SharpWoodenStick":
66 MakeSoundsOnClient(false);
67 break;
68 }
69
71 if (oldLoc.GetSlot() > -1 && InventorySlots.GetSlotName(oldLoc.GetSlot()).Contains(DIRECT_COOKING_SLOT_NAME))
72 MakeSoundsOnClient(false);
73 }
74 }
InventoryLocationType
types of Inventory Location
void MakeSoundsOnClient(bool soundstate, CookingMethodType cookingMethod=CookingMethodType.NONE)
const string DIRECT_COOKING_SLOT_NAME
Definition Edible_Base.c:3
provides access to slot configuration
static proto native owned string GetSlotName(int id)
converts slot_id to string

References DIRECT_COOKING_SLOT_NAME, InventorySlots::GetSlotName(), and MakeSoundsOnClient().

◆ GetCookingTime()

float Edible_Base::GetCookingTime ( )
inlineprotected

Definition at line 429 of file Edible_Base.c.

430 {
431 return GetFoodStage().GetCookingTime();
432 }

References GetFoodStage().

◆ GetDebugActions()

override void Edible_Base::GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprotected

Definition at line 681 of file Edible_Base.c.

682 {
683 super.GetDebugActions(outputList);
684
685 if (HasFoodStage())
686 {
687 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.FOOD_STAGE_PREV, "Food Stage Prev", FadeColors.WHITE));
688 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.FOOD_STAGE_NEXT, "Food Stage Next", FadeColors.WHITE));
689 }
690 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
const int SAT_DEBUG_ACTION
Definition constants.c:424

References HasFoodStage(), and SAT_DEBUG_ACTION.

◆ GetDebugText()

override string Edible_Base::GetDebugText ( )
inlineprotected

Definition at line 718 of file Edible_Base.c.

719 {
720 string debug_output;
721
722 debug_output = super.GetDebugText();
723
724 debug_output += "m_CookedByMethod:" + m_CookedByMethod + "\n";
725 debug_output += "m_MakeCookingSounds:" + m_MakeCookingSounds + "\n";
726
727 return debug_output;
728 }
bool m_MakeCookingSounds
Definition Edible_Base.c:9

References m_CookedByMethod, and m_MakeCookingSounds.

◆ GetDecayDelta()

float Edible_Base::GetDecayDelta ( )
inlineprotected

Definition at line 739 of file Edible_Base.c.

740 {
741 return m_DecayDelta;
742 }
float m_DecayDelta
Definition Edible_Base.c:15

References m_DecayDelta.

◆ GetDecayTimer()

float Edible_Base::GetDecayTimer ( )
inlineprotected

Definition at line 734 of file Edible_Base.c.

735 {
736 return m_DecayTimer;
737 }
float m_DecayTimer
Definition Edible_Base.c:14

References m_DecayTimer.

◆ GetDisinfectQuantity()

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

Definition at line 62 of file DisinfectantSpray.c.

63 {
64 return (GetQuantityMax() * 0.15);
65 }
override int GetQuantityMax()
Definition ItemBase.c:7941

References GetQuantityMax().

◆ GetFoodAgents()

static int Edible_Base::GetFoodAgents ( ItemBase item,
string classname = "",
int food_stage = 0 )
inlinestaticprotected

Definition at line 309 of file Edible_Base.c.

310 {
312 if (food_item && food_item.GetFoodStage())
313 return FoodStage.GetAgents(food_item.GetFoodStage());
314 else if (classname != "" && food_stage)
315 return FoodStage.GetAgents(null, food_stage, classname);
316 string class_path = string.Format("cfgVehicles %1 Nutrition", classname);
317 return GetGame().ConfigGetInt(class_path + " agents");
318 }
proto native CGame GetGame()

References GetGame().

Referenced by GetNutritionalProfile().

◆ GetFoodDigestibility()

static float Edible_Base::GetFoodDigestibility ( ItemBase item,
string classname = "",
int food_stage = 0 )
inlinestaticprotected

Definition at line 320 of file Edible_Base.c.

321 {
323 if (food_item && food_item.GetFoodStage())
324 return FoodStage.GetDigestibility(food_item.GetFoodStage());
325 else if (classname != "" && food_stage)
326 return FoodStage.GetDigestibility(null, food_stage, classname);
327 string class_path = string.Format("cfgVehicles %1 Nutrition", classname);
328 return GetGame().ConfigGetInt(class_path + " digestibility");
329 }

References GetGame().

Referenced by GetNutritionalProfile().

◆ GetFoodEnergy()

static float Edible_Base::GetFoodEnergy ( ItemBase item,
string classname = "",
int food_stage = 0 )
inlinestaticprotected

Definition at line 264 of file Edible_Base.c.

265 {
267 if (food_item && food_item.GetFoodStage())
268 return FoodStage.GetEnergy(food_item.GetFoodStage());
269 else if (classname != "" && food_stage)
270 return FoodStage.GetEnergy(null, food_stage, classname);
271 string class_path = string.Format("cfgVehicles %1 Nutrition", classname);
272 return GetGame().ConfigGetFloat(class_path + " energy");
273 }

References GetGame().

Referenced by GetNutritionalProfile().

◆ GetFoodNutritionalIndex()

static float Edible_Base::GetFoodNutritionalIndex ( ItemBase item,
string classname = "",
int food_stage = 0 )
inlinestaticprotected

Definition at line 286 of file Edible_Base.c.

287 {
289 if (food_item && food_item.GetFoodStage())
290 return FoodStage.GetNutritionalIndex(food_item.GetFoodStage());
291 else if (classname != "" && food_stage)
292 return FoodStage.GetNutritionalIndex(null, food_stage, classname);
293 string class_path = string.Format("cfgVehicles %1 Nutrition", classname);
294 return GetGame().ConfigGetFloat(class_path + " nutritionalIndex");
295
296 }

References GetGame().

Referenced by GetNutritionalProfile().

◆ GetFoodStage()

◆ GetFoodStageName()

string Edible_Base::GetFoodStageName ( FoodStageType food_stage_type)
inlineprotected

Definition at line 404 of file Edible_Base.c.

405 {
406 return GetFoodStage().GetFoodStageName(food_stage_type);
407 }

References GetFoodStage().

◆ GetFoodStageType()

FoodStageType Edible_Base::GetFoodStageType ( )
inlineprotected

Definition at line 339 of file Edible_Base.c.

340 {
341 return GetFoodStage().GetFoodStageType();
342 }

References GetFoodStage().

Referenced by CanProcessDecay(), OnAction(), ProcessDecay(), and RefreshAudio().

◆ GetFoodTotalVolume()

static float Edible_Base::GetFoodTotalVolume ( ItemBase item,
string classname = "",
int food_stage = 0 )
inlinestaticprotected

Definition at line 252 of file Edible_Base.c.

253 {
255 if (food_item && food_item.GetFoodStage())
256 return FoodStage.GetFullnessIndex(food_item.GetFoodStage());
257 else if (classname != "" && food_stage)
258 return FoodStage.GetFullnessIndex(null, food_stage, classname);
259 string class_path = string.Format("cfgVehicles %1 Nutrition", classname);
260 return GetGame().ConfigGetFloat(class_path + " fullnessIndex");
261
262 }

References GetGame().

Referenced by GetNutritionalProfile().

◆ GetFoodToxicity()

static float Edible_Base::GetFoodToxicity ( ItemBase item,
string classname = "",
int food_stage = 0 )
inlinestaticprotected

Definition at line 298 of file Edible_Base.c.

299 {
301 if (food_item && food_item.GetFoodStage())
302 return FoodStage.GetToxicity(food_item.GetFoodStage());
303 else if (classname != "" && food_stage)
304 return FoodStage.GetToxicity(null, food_stage, classname);
305 string class_path = string.Format("cfgVehicles %1 Nutrition", classname);
306 return GetGame().ConfigGetFloat(class_path + " toxicity");
307 }

References GetGame().

Referenced by GetNutritionalProfile().

◆ GetFoodWater()

static float Edible_Base::GetFoodWater ( ItemBase item,
string classname = "",
int food_stage = 0 )
inlinestaticprotected

Definition at line 275 of file Edible_Base.c.

276 {
278 if (food_item && food_item.GetFoodStage())
279 return FoodStage.GetWater(food_item.GetFoodStage());
280 else if (classname != "" && food_stage)
281 return FoodStage.GetWater(null, food_stage, classname);
282 string class_path = string.Format("cfgVehicles %1 Nutrition", classname);
283 return GetGame().ConfigGetFloat(class_path + " water");
284 }

References GetGame().

Referenced by GetNutritionalProfile().

◆ GetLastDecayStage()

FoodStageType Edible_Base::GetLastDecayStage ( )
inlineprotected

Definition at line 744 of file Edible_Base.c.

745 {
746 return m_LastDecayStage;
747 }
FoodStageType m_LastDecayStage
Definition Edible_Base.c:16

References m_LastDecayStage.

◆ GetNextFoodStageType()

FoodStageType Edible_Base::GetNextFoodStageType ( CookingMethodType cooking_method)
inlineprotected

Definition at line 399 of file Edible_Base.c.

400 {
401 return GetFoodStage().GetNextFoodStageType(cooking_method);
402 }

References GetFoodStage().

Referenced by RefreshAudio().

◆ GetNutritionalProfile()

static NutritionalProfile Edible_Base::GetNutritionalProfile ( ItemBase item,
string classname = "",
int food_stage = 0 )
inlinestaticprotected

Definition at line 331 of file Edible_Base.c.

332 {
334 }
static float GetFoodTotalVolume(ItemBase item, string classname="", int food_stage=0)
static float GetFoodEnergy(ItemBase item, string classname="", int food_stage=0)
static float GetFoodDigestibility(ItemBase item, string classname="", int food_stage=0)
static float GetFoodToxicity(ItemBase item, string classname="", int food_stage=0)
static float GetFoodNutritionalIndex(ItemBase item, string classname="", int food_stage=0)
static int GetFoodAgents(ItemBase item, string classname="", int food_stage=0)
static float GetFoodWater(ItemBase item, string classname="", int food_stage=0)

References GetFoodAgents(), GetFoodDigestibility(), GetFoodEnergy(), GetFoodNutritionalIndex(), GetFoodTotalVolume(), GetFoodToxicity(), and GetFoodWater().

Referenced by AddToStomach().

◆ HumanSteakMeat()

void Edible_Base::HumanSteakMeat ( )
inlineprivate

Definition at line 3 of file HumanSteakMeat.c.

4 {
5 InsertAgent(eAgents.BRAIN, 1);
6 }
eAgents
Definition EAgents.c:3
override void InsertAgent(int agent, float count=1)
Definition ItemBase.c:8539

References InsertAgent().

◆ InitItemVariables()

override void Edible_Base::InitItemVariables ( )
inlineprivate

Definition at line 4 of file DisinfectantSpray.c.

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

References can_this_be_combined.

◆ IsCorpse() [1/5]

override bool Edible_Base::IsCorpse ( )
inlineprotected

Definition at line 233 of file Edible_Base.c.

234 {
235 return false;
236 }

Referenced by ProcessDecay().

◆ IsCorpse() [2/5]

override bool Edible_Base::IsCorpse ( )
inlineprivate

Definition at line 13 of file Carp.c.

14 {
15 return true;
16 }

◆ IsCorpse() [3/5]

override bool Edible_Base::IsCorpse ( )
inlineprivate

Definition at line 13 of file Chicken_ColorBase.c.

14 {
15 return true;
16 }

◆ IsCorpse() [4/5]

override bool Edible_Base::IsCorpse ( )
inlineprivate

Definition at line 13 of file Mackerel.c.

14 {
15 return true;
16 }

◆ IsCorpse() [5/5]

override bool Edible_Base::IsCorpse ( )
inlineprivate

Definition at line 13 of file Rabbit.c.

14 {
15 return true;
16 }

◆ IsFoodBaked()

bool Edible_Base::IsFoodBaked ( )
inlineprotected

Definition at line 353 of file Edible_Base.c.

354 {
355 if (GetFoodStage())
356 return GetFoodStage().IsFoodBaked();
357
358 return false;
359 }

References GetFoodStage().

◆ IsFoodBoiled()

bool Edible_Base::IsFoodBoiled ( )
inlineprotected

Definition at line 361 of file Edible_Base.c.

362 {
363 if (GetFoodStage())
364 return GetFoodStage().IsFoodBoiled();
365
366 return false;
367 }

References GetFoodStage().

◆ IsFoodBurned()

bool Edible_Base::IsFoodBurned ( )
inlineprotected

Definition at line 377 of file Edible_Base.c.

378 {
379 if (GetFoodStage())
380 return GetFoodStage().IsFoodBurned();
381
382 return false;
383 }

References GetFoodStage().

◆ IsFoodDried()

bool Edible_Base::IsFoodDried ( )
inlineprotected

Definition at line 369 of file Edible_Base.c.

370 {
371 if (GetFoodStage())
372 return GetFoodStage().IsFoodDried();
373
374 return false;
375 }

References GetFoodStage().

◆ IsFoodRaw()

bool Edible_Base::IsFoodRaw ( )
inlineprotected

Definition at line 345 of file Edible_Base.c.

346 {
347 if (GetFoodStage())
348 return GetFoodStage().IsFoodRaw();
349
350 return false;
351 }

References GetFoodStage().

◆ IsFoodRotten()

bool Edible_Base::IsFoodRotten ( )
inlineprotected

Definition at line 385 of file Edible_Base.c.

386 {
387 if (GetFoodStage())
388 return GetFoodStage().IsFoodRotten();
389
390 return false;
391 }

References GetFoodStage().

◆ IsFruit() [1/3]

override bool Edible_Base::IsFruit ( )
inlineprotected

Definition at line 238 of file Edible_Base.c.

239 {
240 return false;
241 }

Referenced by ProcessDecay().

◆ IsFruit() [2/3]

override bool Edible_Base::IsFruit ( )
inlineprivate

Definition at line 13 of file CaninaBerry.c.

14 {
15 return true;
16 }

◆ IsFruit() [3/3]

override bool Edible_Base::IsFruit ( )
inlineprivate

Definition at line 13 of file SambucusBerry.c.

14 {
15 return true;
16 }

◆ IsMeat() [1/20]

override bool Edible_Base::IsMeat ( )
inlineprotected

Definition at line 228 of file Edible_Base.c.

229 {
230 return false;
231 }

Referenced by CAContinuousTimeCooking::Execute(), and ProcessDecay().

◆ IsMeat() [2/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file BearSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [3/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file Bitterlings.c.

14 {
15 return true;
16 }

◆ IsMeat() [4/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file BoarSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [5/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file CarpFilletMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [6/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file ChickenBreastMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [7/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file CowSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [8/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file DeerSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [9/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file FoxSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [10/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file GoatSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [11/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 18 of file HumanSteakMeat.c.

19 {
20 return true;
21 }

◆ IsMeat() [12/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file Lard.c.

14 {
15 return true;
16 }

◆ IsMeat() [13/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file MackerelFilletMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [14/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file MouflonSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [15/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file PigSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [16/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file RabbitLegMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [17/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file Sardines.c.

14 {
15 return true;
16 }

◆ IsMeat() [18/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file SheepSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [19/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file WolfSteakMeat.c.

14 {
15 return true;
16 }

◆ IsMeat() [20/20]

override bool Edible_Base::IsMeat ( )
inlineprivate

Definition at line 13 of file Worm.c.

14 {
15 return true;
16 }

◆ IsMushroom()

override bool Edible_Base::IsMushroom ( )
inlineprotected

Definition at line 243 of file Edible_Base.c.

244 {
245 return false;
246 }

Referenced by ProcessDecay().

◆ MakeSoundsOnClient()

void Edible_Base::MakeSoundsOnClient ( bool soundstate,
CookingMethodType cookingMethod = CookingMethodType.NONE )
inlineprivate

Definition at line 130 of file Edible_Base.c.

References m_CookedByMethod, m_MakeCookingSounds, and Synchronize().

Referenced by EEItemLocationChanged().

◆ OnAction()

override bool Edible_Base::OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprotected

Definition at line 692 of file Edible_Base.c.

693 {
694 super.OnAction(action_id, player, ctx);
695
696 if (GetGame().IsServer())
697 {
698 if (action_id == EActions.FOOD_STAGE_PREV)
699 {
701 if (food_stage_prev <= 0)
702 food_stage_prev = FoodStageType.COUNT - 1;
704 return true;
705 }
706 else if (action_id == EActions.FOOD_STAGE_NEXT)
707 {
709 if (food_stage_next >= FoodStageType.COUNT)
712 return true;
713 }
714 }
715 return false;
716 }
void ChangeFoodStage(FoodStageType new_food_stage_type)

References ChangeFoodStage(), GetFoodStageType(), and GetGame().

◆ OnConsume() [1/3]

void Edible_Base::OnConsume ( float amount,
PlayerBase consumer )
private

Referenced by Consume().

◆ OnConsume() [2/3]

override void Edible_Base::OnConsume ( float amount,
PlayerBase consumer )
inlineprivate

Definition at line 11 of file CharcoalTablets.c.

12 {
13 if (!consumer.GetModifiersManager().IsModifierActive(eModifiers.MDF_CHARCOAL))
14 consumer.GetModifiersManager().ActivateModifier(eModifiers.MDF_CHARCOAL);
15
16 }
eModifiers
Definition eModifiers.c:2

◆ OnConsume() [3/3]

override void Edible_Base::OnConsume ( float amount,
PlayerBase consumer )
inlineprivate

Definition at line 11 of file PainkillerTablets.c.

12 {
13 if (consumer.GetModifiersManager().IsModifierActive(eModifiers.MDF_PAINKILLERS)) // effectively resets the timer
14 consumer.GetModifiersManager().DeactivateModifier(eModifiers.MDF_PAINKILLERS, false);
15
16 consumer.GetModifiersManager().ActivateModifier(eModifiers.MDF_PAINKILLERS);
17 }

◆ OnStoreLoad()

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

Definition at line 186 of file Edible_Base.c.

187 {
188 if (!super.OnStoreLoad(ctx, version))
189 return false;
190
191 if (GetFoodStage())
192 {
193 if (!GetFoodStage().OnStoreLoad(ctx, version))
194 return false;
195 }
196
197 if (version >= 115)
198 {
199 if (!ctx.Read(m_DecayTimer))
200 {
201 m_DecayTimer = 0.0;
202 return false;
203 }
204 if (!ctx.Read(m_LastDecayStage))
205 {
207 return false;
208 }
209 }
210
211 return true;
212 }
override bool OnStoreLoad(ParamsReadContext ctx, int version)

References GetFoodStage(), m_DecayTimer, m_LastDecayStage, and OnStoreLoad().

Referenced by OnStoreLoad().

◆ OnStoreSave()

override void Edible_Base::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 174 of file Edible_Base.c.

175 {
176 super.OnStoreSave(ctx);
177
178 if (GetFoodStage())
179 GetFoodStage().OnStoreSave(ctx);
180
181 // food decay
182 ctx.Write(m_DecayTimer);
183 ctx.Write(m_LastDecayStage);
184 }

References GetFoodStage(), m_DecayTimer, and m_LastDecayStage.

◆ OnVariablesSynchronized()

override void Edible_Base::OnVariablesSynchronized ( )
inlineprivate

Definition at line 114 of file Edible_Base.c.

115 {
116 super.OnVariablesSynchronized();
117
119
120 //update audio
122 RefreshAudio();
123 else
124 RemoveAudio();
125 }
void RefreshAudio()

References m_MakeCookingSounds, RefreshAudio(), RemoveAudio(), and UpdateVisuals().

◆ ProcessDecay()

override void Edible_Base::ProcessDecay ( float delta,
bool hasRootAsPlayer )
inlineprotected

Definition at line 503 of file Edible_Base.c.

504 {
505 delta *= DayZGame.Cast(GetGame()).GetFoodDecayModifier();
506 m_DecayDelta += (1 + (1 - GetHealth01("", "")));
507 if (hasRootAsPlayer)
509
510 /*Print( "-------------------------" );
511 Print( this );
512 Print( m_DecayTimer );
513 Print( m_DecayDelta );
514 Print( m_LastDecayStage );*/
515
516 if (IsFruit() || IsMushroom())
517 {
518 // fruit, vegetables and mushrooms
520 {
521 switch (GetFoodStageType())
522 {
523 case FoodStageType.RAW:
526 break;
527
528 case FoodStageType.BOILED:
531 break;
532
533 case FoodStageType.BAKED:
536 break;
537
538 case FoodStageType.DRIED:
539 case FoodStageType.BURNED:
540 case FoodStageType.ROTTEN:
541 default:
542 m_DecayTimer = -1;
544 return;
545 }
546
547 //m_DecayTimer = m_DecayTimer / 1000.0;
548 }
549
551
552 if (m_DecayTimer <= 0)
553 {
555 {
556 // switch to decayed stage
557 if ((m_LastDecayStage == FoodStageType.BOILED) || (m_LastDecayStage == FoodStageType.BAKED))
560 {
561 int rng = Math.RandomIntInclusive(0, 100);
564 else
565 {
568 else
570 }
571 }
572 }
573 }
574
575 }
576 else if (IsMeat())
577 {
578 // meat
580 {
581 switch (GetFoodStageType())
582 {
583 case FoodStageType.RAW:
586 break;
587
588 case FoodStageType.BOILED:
591 break;
592
593 case FoodStageType.BAKED:
596 break;
597
598 case FoodStageType.DRIED:
601 break;
602
603 case FoodStageType.BURNED:
604 case FoodStageType.ROTTEN:
605 default:
606 m_DecayTimer = -1;
608 return;
609 }
610 }
611
613
614 if (m_DecayTimer <= 0)
615 {
617 {
618 // switch to decayed stage
621 }
622 }
623 }
624 else if (IsCorpse())
625 {
626 // corpse
628 {
629 switch (GetFoodStageType())
630 {
631 case FoodStageType.RAW:
634 break;
635
636 case FoodStageType.BURNED:
637 case FoodStageType.ROTTEN:
638 default:
639 m_DecayTimer = -1;
641 return;
642 }
643 }
644
646
647 if (m_DecayTimer <= 0)
648 {
650 {
651 // switch to decayed stage
654 }
655 }
656 }
657 else
658 {
659 // opened cans
661
662 if ((m_DecayTimer <= 0) && (m_LastDecayStage == FoodStageType.NONE))
663 {
666 //m_DecayTimer = m_DecayTimer / 1000.0;
667 }
668 else
669 {
670 if (m_DecayTimer <= 0)
671 {
672 InsertAgent(eAgents.FOOD_POISON, 1);
673 m_DecayTimer = -1;
674 }
675 }
676 }
677
678 m_DecayDelta = 0.0;
679 }
override bool IsMushroom()
override bool IsFruit()
override bool IsCorpse()
override bool IsMeat()
bool CanChangeToNewStage(CookingMethodType cooking_method)
Definition EnMath.c:7
const float DECAY_FOOD_BAKED_FRVG
Definition constants.c:894
const float DECAY_FOOD_CAN_OPEN
Definition constants.c:896
const float DECAY_FOOD_RAW_FRVG
Definition constants.c:890
const int DECAY_TIMER_RANDOM_PERCENTAGE
Definition constants.c:898
const int DECAY_FOOD_FRVG_DRIED_CHANCE
Definition constants.c:897
const float DECAY_FOOD_RAW_MEAT
Definition constants.c:888
const float DECAY_FOOD_BAKED_MEAT
Definition constants.c:893
const float DECAY_FOOD_BOILED_MEAT
Definition constants.c:891
const float DECAY_FOOD_BOILED_FRVG
Definition constants.c:892
const float DECAY_FOOD_DRIED_MEAT
Definition constants.c:895
const float DECAY_FOOD_RAW_CORPSE
Definition constants.c:889
const float DECAY_RATE_ON_PLAYER
Definition constants.c:899
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:126
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

References CanChangeToNewStage(), ChangeFoodStage(), GameConstants::DECAY_FOOD_BAKED_FRVG, GameConstants::DECAY_FOOD_BAKED_MEAT, GameConstants::DECAY_FOOD_BOILED_FRVG, GameConstants::DECAY_FOOD_BOILED_MEAT, GameConstants::DECAY_FOOD_CAN_OPEN, GameConstants::DECAY_FOOD_DRIED_MEAT, GameConstants::DECAY_FOOD_FRVG_DRIED_CHANCE, GameConstants::DECAY_FOOD_RAW_CORPSE, GameConstants::DECAY_FOOD_RAW_FRVG, GameConstants::DECAY_FOOD_RAW_MEAT, GameConstants::DECAY_RATE_ON_PLAYER, GameConstants::DECAY_TIMER_RANDOM_PERCENTAGE, GetFoodStageType(), GetGame(), InsertAgent(), IsCorpse(), IsFruit(), IsMeat(), IsMushroom(), m_DecayDelta, m_DecayTimer, m_LastDecayStage, Math::RandomFloat01(), and Math::RandomIntInclusive().

◆ RefreshAudio()

void Edible_Base::RefreshAudio ( )
inlineprotected

Definition at line 138 of file Edible_Base.c.

139 {
140 string soundName = "";
141
143
144 switch (GetFoodStageType())
145 {
146 case FoodStageType.RAW:
148 if (nextFoodState == FoodStageType.BOILED)
149 soundName = "";
150 break;
151 case FoodStageType.BAKED:
153 break;
154 case FoodStageType.BURNED:
156 break;
157 default:
158 soundName = "";
159 break;
160 }
161
163 }
FoodStageType GetNextFoodStageType(CookingMethodType cooking_method)
const string SOUND_BAKING_DONE
Definition Edible_Base.c:6
void SoundCookingStart(string sound_name)
const string SOUND_BAKING_START
Definition Edible_Base.c:5
const string SOUND_BURNING_DONE
Definition Edible_Base.c:7

References GetFoodStageType(), GetNextFoodStageType(), m_CookedByMethod, SOUND_BAKING_DONE, SOUND_BAKING_START, SOUND_BURNING_DONE, and SoundCookingStart().

Referenced by OnVariablesSynchronized().

◆ RemoveAudio()

void Edible_Base::RemoveAudio ( )
inlineprotected

Definition at line 165 of file Edible_Base.c.

166 {
167 m_MakeCookingSounds = false;
169 }
void SoundCookingStop()

References m_MakeCookingSounds, and SoundCookingStop().

Referenced by EEDelete(), and OnVariablesSynchronized().

◆ ReplaceEdibleWithNew()

void Edible_Base::ReplaceEdibleWithNew ( string typeName)
inlineprotected

Definition at line 443 of file Edible_Base.c.

444 {
445 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
446 if (player)
447 {
449 player.ServerReplaceItemInHandsWithNew(lambda);
450 }
451 else
452 Error("ReplaceEdibleWithNew - cannot use edible without player");
453 }
Edible_Base ItemBase ReplaceEdibleWithNewLambda(EntityAI old_item, string new_item_type, PlayerBase player)
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

References Error(), and ReplaceEdibleWithNewLambda().

Referenced by BakedBeansCan::Open(), PeachesCan::Open(), SardinesCan::Open(), SpaghettiCan::Open(), TacticalBaconCan::Open(), TunaCan::Open(), DogFoodCan::Open(), CatFoodCan::Open(), PorkCan::Open(), Lunchmeat::Open(), UnknownFoodCan::Open(), Pajka::Open(), Pate::Open(), and BrisketSpread::Open().

◆ SetActions() [1/28]

override void Edible_Base::SetActions ( )
inlineprotected

Definition at line 455 of file Edible_Base.c.

456 {
457 super.SetActions();
458
459 AddAction(ActionAttach);
461 }
void ActionDetach()
void AddAction(typename actionName)

References ActionDetach(), and AddAction().

◆ SetActions() [2/28]

override void Edible_Base::SetActions ( )
inlineprivate

◆ SetActions() [3/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file Bitterlings.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29 }

References AddAction().

◆ SetActions() [4/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file BoarSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [5/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 7 of file BoxCerealCrunchin.c.

8 {
9 super.SetActions();
10
11 AddAction(ActionForceFeed);
13 }

References AddAction().

◆ SetActions() [6/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 7 of file Candycane_Colorbase.c.

8 {
9 super.SetActions();
10
12 AddAction(ActionForceFeed);
13 }

References AddAction().

◆ SetActions() [7/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 51 of file CaninaBerry.c.

52 {
53 super.SetActions();
54
55 AddAction(ActionForceFeed);
57 }

References AddAction().

◆ SetActions() [8/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file CarpFilletMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [9/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 3 of file CharcoalTablets.c.

4 {
5 super.SetActions();
6
7 AddAction(ActionForceConsumeSingle);
9 }

References AddAction().

◆ SetActions() [10/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file ChickenBreastMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [11/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file CowSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [12/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file DeerSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [13/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 67 of file DisinfectantSpray.c.

68 {
69 super.SetActions();
70
75 //AddAction(ActionForceDrinkDisinfectant);
76 //AddAction(ActionDrinkDisinfectant);
77
78
79 }
void ActionDisinfectSelf()

References ActionDisinfectSelf(), and AddAction().

◆ SetActions() [14/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file FoxSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [15/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file GoatSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [16/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 55 of file Guts.c.

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

References AddAction().

◆ SetActions() [17/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 28 of file HumanSteakMeat.c.

29 {
30 super.SetActions();
31
32 AddAction(ActionForceFeed);
34
37 }

References AddAction().

◆ SetActions() [18/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file Lard.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [19/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file MackerelFilletMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [20/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file MouflonSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [21/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 3 of file PainkillerTablets.c.

4 {
5 super.SetActions();
6
7 AddAction(ActionForceConsumeSingle);
9 }

References AddAction().

◆ SetActions() [22/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file PigSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [23/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file RabbitLegMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [24/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 51 of file SambucusBerry.c.

52 {
53 super.SetActions();
54
55 AddAction(ActionForceFeed);
57 }

References AddAction().

◆ SetActions() [25/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file Sardines.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29 }

References AddAction().

◆ SetActions() [26/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file SheepSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetActions() [27/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 55 of file SmallGuts.c.

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

References AddAction().

◆ SetActions() [28/28]

override void Edible_Base::SetActions ( )
inlineprivate

Definition at line 23 of file WolfSteakMeat.c.

24 {
25 super.SetActions();
26
27 AddAction(ActionForceFeed);
29
32 }

References AddAction().

◆ SetCookingTime()

void Edible_Base::SetCookingTime ( float time)
inlineprotected

Definition at line 434 of file Edible_Base.c.

435 {
436 GetFoodStage().SetCookingTime(time);
437
438 //synchronize when calling on server
439 Synchronize();
440 }

References GetFoodStage(), and Synchronize().

◆ SoundCookingStart()

void Edible_Base::SoundCookingStart ( string sound_name)
inlineprotected

Definition at line 463 of file Edible_Base.c.

464 {
465#ifndef SERVER
467 {
469
472 }
473#endif
474 }
class JsonUndergroundAreaTriggerData GetPosition
EffectSound m_SoundEffectCooking
DEPRECATED.
Definition Edible_Base.c:11
Manager class for managing Effect (EffectParticle, EffectSound)
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, m_SoundEffectCooking, m_SoundPlaying, SEffectManager::PlaySound(), and SoundCookingStop().

Referenced by RefreshAudio().

◆ SoundCookingStop()

void Edible_Base::SoundCookingStop ( )
inlineprotected

Definition at line 476 of file Edible_Base.c.

477 {
478#ifndef SERVER
480 {
483 m_SoundPlaying = "";
484 }
485#endif
486 }
override void Stop()
Stops sound.

References m_SoundEffectCooking, m_SoundPlaying, and EffectSound::Stop().

Referenced by RemoveAudio(), and SoundCookingStart().

◆ Synchronize()

void Edible_Base::Synchronize ( )
inlineprivate

Definition at line 106 of file Edible_Base.c.

107 {
108 SetSynchDirty();
109
110 if (GetGame().IsMultiplayer())
112 }

References GetGame(), and UpdateVisuals().

Referenced by AfterStoreLoad(), MakeSoundsOnClient(), and SetCookingTime().

◆ TransferFoodStage()

void Edible_Base::TransferFoodStage ( notnull Edible_Base source)
inlineprotected

Definition at line 415 of file Edible_Base.c.

416 {
417 if (!source.HasFoodStage())
418 return;
419 m_LastDecayStage = source.GetLastDecayStage();
420 ChangeFoodStage(source.GetFoodStage().GetFoodStageType());
421 m_DecayTimer = source.GetDecayTimer();
422 m_DecayDelta = source.GetDecayDelta();
423 }

References ChangeFoodStage(), m_DecayDelta, m_DecayTimer, and m_LastDecayStage.

◆ UpdateVisuals()

void Edible_Base::UpdateVisuals ( )
inlineprivate

Definition at line 76 of file Edible_Base.c.

77 {
78 if (GetFoodStage())
79 GetFoodStage().UpdateVisuals();
80 }

References GetFoodStage().

Referenced by EEInit(), OnVariablesSynchronized(), and Synchronize().

Member Data Documentation

◆ DIRECT_COOKING_SLOT_NAME

const string Edible_Base::DIRECT_COOKING_SLOT_NAME = "DirectCooking"
private

Definition at line 3 of file Edible_Base.c.

Referenced by EEItemLocationChanged().

◆ m_CookedByMethod

CookingMethodType Edible_Base::m_CookedByMethod
private

Definition at line 18 of file Edible_Base.c.

Referenced by Edible_Base(), GetDebugText(), MakeSoundsOnClient(), and RefreshAudio().

◆ m_DecayDelta

float Edible_Base::m_DecayDelta = 0.0
protected

Definition at line 15 of file Edible_Base.c.

Referenced by GetDecayDelta(), ProcessDecay(), and TransferFoodStage().

◆ m_DecayTimer

float Edible_Base::m_DecayTimer
protected

◆ m_FoodStage

ref FoodStage Edible_Base::m_FoodStage
protected

Definition at line 13 of file Edible_Base.c.

Referenced by Edible_Base(), and GetFoodStage().

◆ m_LastDecayStage

FoodStageType Edible_Base::m_LastDecayStage = FoodStageType.NONE
protected

◆ m_MakeCookingSounds

bool Edible_Base::m_MakeCookingSounds
protected

◆ m_SoundCooking

SoundOnVehicle Edible_Base::m_SoundCooking
protected

Definition at line 10 of file Edible_Base.c.

◆ m_SoundEffectCooking

EffectSound Edible_Base::m_SoundEffectCooking
protected

DEPRECATED.

Definition at line 11 of file Edible_Base.c.

Referenced by SoundCookingStart(), and SoundCookingStop().

◆ m_SoundPlaying

string Edible_Base::m_SoundPlaying
protected

Definition at line 12 of file Edible_Base.c.

Referenced by Edible_Base(), SoundCookingStart(), and SoundCookingStop().

◆ SOUND_BAKING_DONE

const string Edible_Base::SOUND_BAKING_DONE = "Baking_Done_SoundSet"
private

Definition at line 6 of file Edible_Base.c.

Referenced by RefreshAudio().

◆ SOUND_BAKING_START

const string Edible_Base::SOUND_BAKING_START = "Baking_SoundSet"
private

Definition at line 5 of file Edible_Base.c.

Referenced by RefreshAudio().

◆ SOUND_BURNING_DONE

const string Edible_Base::SOUND_BURNING_DONE = "Food_Burning_SoundSet"
private

Definition at line 7 of file Edible_Base.c.

Referenced by RefreshAudio().


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