Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
edible_base.c File Reference

Go to the source code of this file.

Data Structures

class  Edible_Base

Functions

override void AfterStoreLoad ()
override bool CanBeCooked ()
override bool CanBeCookedOnStick ()
bool CanChangeToNewStage (CookingMethodType cooking_method)
override bool CanDecay ()
override bool CanItemOverheat ()
override bool CanProcessDecay ()
void ChangeFoodStage (FoodStageType new_food_stage_type)
bool Consume (float amount, PlayerBase consumer)
void Edible_Base ()
override void EEDelete (EntityAI parent)
override void EEInit ()
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
int FilterAgents (int agentsIn)
 Filter agents from the item (override on higher implementations).
static float GetAgentsPerDigest (ItemBase item, string className="", int foodStage=0)
override float GetBaitEffectivity ()
int GetConsumptionPenaltyContext ()
float GetCookingTime ()
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
override string GetDebugText ()
float GetDecayDelta ()
float GetDecayTimer ()
static int GetFoodAgents (ItemBase item, string classname="", int food_stage=0)
static float GetFoodDigestibility (ItemBase item, string classname="", int food_stage=0)
static float GetFoodEnergy (ItemBase item, string classname="", int food_stage=0)
static float GetFoodNutritionalIndex (ItemBase item, string classname="", int food_stage=0)
override FoodStage GetFoodStage ()
string GetFoodStageName (FoodStageType food_stage_type)
FoodStageType GetFoodStageType ()
static float GetFoodTotalVolume (ItemBase item, string classname="", int food_stage=0)
static float GetFoodToxicity (ItemBase item, string classname="", int food_stage=0)
static float GetFoodWater (ItemBase item, string classname="", int food_stage=0)
FoodStageType GetLastDecayStage ()
FoodStageType GetNextFoodStageType (CookingMethodType cooking_method)
static NutritionalProfile GetNutritionalProfile (ItemBase item, string classname="", int food_stage=0)
override float GetTemperatureFreezeTime ()
override float GetTemperatureThawTime ()
void HandleFoodStageChangeAgents (FoodStageType stageOld, FoodStageType stageNew)
 removes select agents on foodstage transitions
override bool IsCorpse ()
bool IsFoodBaked ()
bool IsFoodBoiled ()
bool IsFoodBurned ()
bool IsFoodDried ()
bool IsFoodRaw ()
bool IsFoodRotten ()
override bool IsFruit ()
override bool IsMeat ()
override bool IsMushroom ()
void MakeSoundsOnClient (bool soundstate, CookingMethodType cookingMethod=CookingMethodType.NONE)
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
void OnConsume (float amount, PlayerBase consumer)
void OnFoodStageChange (FoodStageType stageOld, FoodStageType stageNew)
 called on server
override bool OnStoreLoad (ParamsReadContext ctx, int version)
override void OnStoreSave (ParamsWriteContext ctx)
override void OnVariablesSynchronized ()
override void ProcessDecay (float delta, bool hasRootAsPlayer)
void RefreshAudio ()
void RemoveAudio ()
void ReplaceEdibleWithNew (string typeName)
Edible_Base ItemBase ReplaceEdibleWithNewLambda (EntityAI old_item, string new_item_type, PlayerBase player)
void ResetCookingTime ()
override void SetActions ()
void SetCookingTime (float time)
void SoundCookingStart (string sound_name)
void SoundCookingStop ()
void Synchronize ()
void TransferFoodStage (notnull Edible_Base source)
void UpdateVaporParticle ()
void UpdateVisuals ()
void UpdateVisualsEx (bool forced=false)

Variables

const string DIRECT_COOKING_SLOT_NAME = "DirectCooking"
CookingMethodType m_CookedByMethod
float m_DecayDelta = 0.0
float m_DecayTimer
ref FoodStage m_FoodStage
ParticleSource m_HotVaporParticle
FoodStageType m_LastDecayStage = FoodStageType.NONE
bool m_MakeCookingSounds
SoundOnVehicle m_SoundCooking
EffectSound m_SoundEffectCooking
 DEPRECATED.
string m_SoundPlaying
const string SOUND_BAKING_DONE = "Baking_Done_SoundSet"
const string SOUND_BAKING_START = "Baking_SoundSet"
const string SOUND_BOILING_DONE = "Boiling_Done_SoundSet"
const string SOUND_BOILING_START = "Boiling_SoundSet"
const string SOUND_BURNING_DONE = "Food_Burning_SoundSet"
const string SOUND_DRYING_DONE = "Drying_Done_SoundSet"
const string SOUND_DRYING_START = "Drying_SoundSet"

Function Documentation

◆ AfterStoreLoad()

override void AfterStoreLoad ( )
protected

Definition at line 1461 of file edible_base.c.

◆ CanBeCooked()

override bool CanBeCooked ( )
private

Definition at line 1237 of file edible_base.c.

◆ CanBeCookedOnStick()

override bool CanBeCookedOnStick ( )
private

Definition at line 1242 of file edible_base.c.

◆ CanChangeToNewStage()

bool CanChangeToNewStage ( CookingMethodType cooking_method)
protected

Definition at line 1721 of file edible_base.c.

◆ CanDecay()

override bool CanDecay ( )
protected

Definition at line 1838 of file edible_base.c.

◆ CanItemOverheat()

override bool CanItemOverheat ( )
private

Definition at line 1287 of file edible_base.c.

Referenced by Entity::SetTemperatureEx().

◆ CanProcessDecay()

override bool CanProcessDecay ( )
protected

Definition at line 1843 of file edible_base.c.

◆ ChangeFoodStage()

void ChangeFoodStage ( FoodStageType new_food_stage_type)
protected

Definition at line 1706 of file edible_base.c.

◆ Consume()

bool Consume ( float amount,
PlayerBase consumer )
private

Definition at line 1203 of file edible_base.c.

Referenced by ManBase::Consume().

◆ Edible_Base()

void Edible_Base ( )
private

Definition at line 1133 of file edible_base.c.

◆ EEDelete()

override void EEDelete ( EntityAI parent)
private

Definition at line 1156 of file edible_base.c.

◆ EEInit()

override void EEInit ( )
private

Definition at line 1149 of file edible_base.c.

◆ EEItemLocationChanged()

override void EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
private

disable sounds (from cooking)

check for DirectCooking slot name

Definition at line 1166 of file edible_base.c.

◆ FilterAgents()

int FilterAgents ( int agentsIn)
private

Filter agents from the item (override on higher implementations).

if no per FoodStage/Nutrition override is set, remove possible Food Poisoning to prevent double punishment from Bloody Hands

Definition at line 1220 of file edible_base.c.

◆ GetAgentsPerDigest()

float GetAgentsPerDigest ( ItemBase item,
string className = "",
int foodStage = 0 )
staticprotected

Definition at line 1606 of file edible_base.c.

◆ GetBaitEffectivity()

override float GetBaitEffectivity ( )
protected

Definition at line 2147 of file edible_base.c.

◆ GetConsumptionPenaltyContext()

int GetConsumptionPenaltyContext ( )
protected

Definition at line 1800 of file edible_base.c.

◆ GetCookingTime()

float GetCookingTime ( )
protected

Definition at line 1765 of file edible_base.c.

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
protected

Definition at line 2078 of file edible_base.c.

◆ GetDebugText()

override string GetDebugText ( )
protected

Definition at line 2131 of file edible_base.c.

◆ GetDecayDelta()

float GetDecayDelta ( )
protected

Definition at line 2164 of file edible_base.c.

◆ GetDecayTimer()

float GetDecayTimer ( )
protected

Definition at line 2159 of file edible_base.c.

◆ GetFoodAgents()

int GetFoodAgents ( ItemBase item,
string classname = "",
int food_stage = 0 )
staticprotected

Definition at line 1576 of file edible_base.c.

◆ GetFoodDigestibility()

float GetFoodDigestibility ( ItemBase item,
string classname = "",
int food_stage = 0 )
staticprotected

Definition at line 1591 of file edible_base.c.

◆ GetFoodEnergy()

float GetFoodEnergy ( ItemBase item,
string classname = "",
int food_stage = 0 )
staticprotected

Definition at line 1515 of file edible_base.c.

◆ GetFoodNutritionalIndex()

float GetFoodNutritionalIndex ( ItemBase item,
string classname = "",
int food_stage = 0 )
staticprotected

Definition at line 1545 of file edible_base.c.

◆ GetFoodStage()

override FoodStage GetFoodStage ( )
protected

Definition at line 1469 of file edible_base.c.

◆ GetFoodStageName()

string GetFoodStageName ( FoodStageType food_stage_type)
protected

Definition at line 1716 of file edible_base.c.

◆ GetFoodStageType()

FoodStageType GetFoodStageType ( )
protected

Definition at line 1639 of file edible_base.c.

◆ GetFoodTotalVolume()

float GetFoodTotalVolume ( ItemBase item,
string classname = "",
int food_stage = 0 )
staticprotected

Definition at line 1499 of file edible_base.c.

◆ GetFoodToxicity()

float GetFoodToxicity ( ItemBase item,
string classname = "",
int food_stage = 0 )
staticprotected

Definition at line 1561 of file edible_base.c.

◆ GetFoodWater()

float GetFoodWater ( ItemBase item,
string classname = "",
int food_stage = 0 )
staticprotected

Definition at line 1530 of file edible_base.c.

◆ GetLastDecayStage()

FoodStageType GetLastDecayStage ( )
protected

Definition at line 2169 of file edible_base.c.

◆ GetNextFoodStageType()

FoodStageType GetNextFoodStageType ( CookingMethodType cooking_method)
protected

Definition at line 1711 of file edible_base.c.

◆ GetNutritionalProfile()

NutritionalProfile GetNutritionalProfile ( ItemBase item,
string classname = "",
int food_stage = 0 )
staticprotected

Definition at line 1621 of file edible_base.c.

◆ GetTemperatureFreezeTime()

override float GetTemperatureFreezeTime ( )
private

Definition at line 1247 of file edible_base.c.

◆ GetTemperatureThawTime()

override float GetTemperatureThawTime ( )
private

Definition at line 1267 of file edible_base.c.

◆ HandleFoodStageChangeAgents()

void HandleFoodStageChangeAgents ( FoodStageType stageOld,
FoodStageType stageNew )
protected

removes select agents on foodstage transitions

Definition at line 1745 of file edible_base.c.

◆ IsCorpse()

override bool IsCorpse ( )
protected

Definition at line 1480 of file edible_base.c.

Referenced by IEntity::IsFood(), and Entity::UseConfigInitTemperature().

◆ IsFoodBaked()

bool IsFoodBaked ( )
protected

Definition at line 1655 of file edible_base.c.

◆ IsFoodBoiled()

bool IsFoodBoiled ( )
protected

Definition at line 1665 of file edible_base.c.

◆ IsFoodBurned()

bool IsFoodBurned ( )
protected

Definition at line 1685 of file edible_base.c.

◆ IsFoodDried()

bool IsFoodDried ( )
protected

Definition at line 1675 of file edible_base.c.

◆ IsFoodRaw()

bool IsFoodRaw ( )
protected

Definition at line 1645 of file edible_base.c.

◆ IsFoodRotten()

bool IsFoodRotten ( )
protected

Definition at line 1695 of file edible_base.c.

◆ IsFruit()

override bool IsFruit ( )
protected

Definition at line 1485 of file edible_base.c.

Referenced by IEntity::IsFood().

◆ IsMeat()

override bool IsMeat ( )
protected

Definition at line 1475 of file edible_base.c.

Referenced by IEntity::IsFood().

◆ IsMushroom()

override bool IsMushroom ( )
protected

Definition at line 1490 of file edible_base.c.

Referenced by IEntity::IsFood().

◆ MakeSoundsOnClient()

void MakeSoundsOnClient ( bool soundstate,
CookingMethodType cookingMethod = CookingMethodType.NONE )
private

Definition at line 1323 of file edible_base.c.

◆ OnAction()

override bool OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
protected

Definition at line 2091 of file edible_base.c.

◆ OnConsume()

void OnConsume ( float amount,
PlayerBase consumer )
private

Definition at line 1211 of file edible_base.c.

◆ OnFoodStageChange()

void OnFoodStageChange ( FoodStageType stageOld,
FoodStageType stageNew )
protected

called on server

Definition at line 1738 of file edible_base.c.

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext ctx,
int version )
protected

Definition at line 1430 of file edible_base.c.

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
protected

Definition at line 1416 of file edible_base.c.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
private

Definition at line 1300 of file edible_base.c.

◆ ProcessDecay()

override void ProcessDecay ( float delta,
bool hasRootAsPlayer )
protected

Definition at line 1848 of file edible_base.c.

◆ RefreshAudio()

void RefreshAudio ( )
protected

Definition at line 1331 of file edible_base.c.

◆ RemoveAudio()

void RemoveAudio ( )
protected

Definition at line 1407 of file edible_base.c.

◆ ReplaceEdibleWithNew()

void ReplaceEdibleWithNew ( string typeName)
protected

Definition at line 1788 of file edible_base.c.

◆ ReplaceEdibleWithNewLambda()

Edible_Base ItemBase ReplaceEdibleWithNewLambda ( EntityAI old_item,
string new_item_type,
PlayerBase player )

Definition at line 1 of file edible_base.c.

References Edible_Base::Edible_Base().

Referenced by Edible_Base::ReplaceEdibleWithNew().

◆ ResetCookingTime()

void ResetCookingTime ( )
protected

Definition at line 1778 of file edible_base.c.

◆ SetActions()

override void SetActions ( )
protected

Definition at line 1805 of file edible_base.c.

◆ SetCookingTime()

void SetCookingTime ( float time)
protected

Definition at line 1770 of file edible_base.c.

◆ SoundCookingStart()

void SoundCookingStart ( string sound_name)
protected

Definition at line 1813 of file edible_base.c.

Referenced by RefreshAudioVisuals().

◆ SoundCookingStop()

void SoundCookingStop ( )
protected

Definition at line 1826 of file edible_base.c.

Referenced by RemoveAudioVisuals().

◆ Synchronize()

void Synchronize ( )
private

Definition at line 1295 of file edible_base.c.

◆ TransferFoodStage()

void TransferFoodStage ( notnull Edible_Base source)
protected

Definition at line 1727 of file edible_base.c.

◆ UpdateVaporParticle()

void UpdateVaporParticle ( )
protected

Definition at line 2038 of file edible_base.c.

◆ UpdateVisuals()

void UpdateVisuals ( )
protected

Definition at line 2210 of file edible_base.c.

◆ UpdateVisualsEx()

void UpdateVisualsEx ( bool forced = false)
private

Definition at line 1197 of file edible_base.c.

Variable Documentation

◆ DIRECT_COOKING_SLOT_NAME

const string DIRECT_COOKING_SLOT_NAME = "DirectCooking"

Definition at line 1111 of file edible_base.c.

◆ m_CookedByMethod

CookingMethodType m_CookedByMethod
private

Definition at line 1131 of file edible_base.c.

◆ m_DecayDelta

float m_DecayDelta = 0.0
protected

Definition at line 1127 of file edible_base.c.

◆ m_DecayTimer

float m_DecayTimer
protected

Definition at line 1126 of file edible_base.c.

◆ m_FoodStage

ref FoodStage m_FoodStage
protected

Definition at line 1125 of file edible_base.c.

◆ m_HotVaporParticle

ParticleSource m_HotVaporParticle
protected

Definition at line 1129 of file edible_base.c.

◆ m_LastDecayStage

FoodStageType m_LastDecayStage = FoodStageType.NONE
protected

Definition at line 1128 of file edible_base.c.

◆ m_MakeCookingSounds

bool m_MakeCookingSounds
protected

Definition at line 1121 of file edible_base.c.

◆ m_SoundCooking

SoundOnVehicle m_SoundCooking
protected

Definition at line 1122 of file edible_base.c.

◆ m_SoundEffectCooking

EffectSound m_SoundEffectCooking
protected

DEPRECATED.

Definition at line 1123 of file edible_base.c.

◆ m_SoundPlaying

string m_SoundPlaying
protected

Definition at line 1124 of file edible_base.c.

◆ SOUND_BAKING_DONE

const string SOUND_BAKING_DONE = "Baking_Done_SoundSet"

Definition at line 1114 of file edible_base.c.

◆ SOUND_BAKING_START

const string SOUND_BAKING_START = "Baking_SoundSet"

Definition at line 1113 of file edible_base.c.

◆ SOUND_BOILING_DONE

const string SOUND_BOILING_DONE = "Boiling_Done_SoundSet"

Definition at line 1116 of file edible_base.c.

◆ SOUND_BOILING_START

const string SOUND_BOILING_START = "Boiling_SoundSet"

Definition at line 1115 of file edible_base.c.

◆ SOUND_BURNING_DONE

const string SOUND_BURNING_DONE = "Food_Burning_SoundSet"

Definition at line 1119 of file edible_base.c.

◆ SOUND_DRYING_DONE

const string SOUND_DRYING_DONE = "Drying_Done_SoundSet"

Definition at line 1118 of file edible_base.c.

◆ SOUND_DRYING_START

const string SOUND_DRYING_START = "Drying_SoundSet"

Definition at line 1117 of file edible_base.c.