PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Edible_Base.c File Reference

Data Structures

class  Edible_Base
 

Functions

Edible_Base ItemBase ReplaceEdibleWithNewLambda (EntityAI old_item, string new_item_type, PlayerBase player)
 
void Edible_Base ()
 
override void EEInit ()
 
override void EEDelete (EntityAI parent)
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
void UpdateVisualsEx (bool forced=false)
 
bool Consume (float amount, PlayerBase consumer)
 
void OnConsume (float amount, PlayerBase consumer)
 
int FilterAgents (int agentsIn)
 Filter agents from the item (override on higher implementations)
 
override bool CanBeCooked ()
 
override bool CanBeCookedOnStick ()
 
override float GetTemperatureFreezeTime ()
 
override float GetTemperatureThawTime ()
 
override bool CanItemOverheat ()
 
void Synchronize ()
 
override void OnVariablesSynchronized ()
 
void MakeSoundsOnClient (bool soundstate, CookingMethodType cookingMethod=CookingMethodType.NONE)
 
protected void RefreshAudio ()
 
protected void RemoveAudio ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void AfterStoreLoad ()
 
override FoodStage GetFoodStage ()
 
override bool IsMeat ()
 
override bool IsCorpse ()
 
override bool IsFruit ()
 
override bool IsMushroom ()
 
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 float GetAgentsPerDigest (ItemBase item, string className="", int foodStage=0)
 
static NutritionalProfile GetNutritionalProfile (ItemBase item, string classname="", int food_stage=0)
 
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)
 
void OnFoodStageChange (FoodStageType stageOld, FoodStageType stageNew)
 called on server
 
void HandleFoodStageChangeAgents (FoodStageType stageOld, FoodStageType stageNew)
 removes select agents on foodstage transitions
 
float GetCookingTime ()
 
void SetCookingTime (float time)
 
void ResetCookingTime ()
 
void ReplaceEdibleWithNew (string typeName)
 
int GetConsumptionPenaltyContext ()
 
override void SetActions ()
 
protected void SoundCookingStart (string sound_name)
 
protected void SoundCookingStop ()
 
override bool CanDecay ()
 
override bool CanProcessDecay ()
 
override void ProcessDecay (float delta, bool hasRootAsPlayer)
 
protected void UpdateVaporParticle ()
 
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
override string GetDebugText ()
 
override float GetBaitEffectivity ()
 
float GetDecayTimer ()
 
float GetDecayDelta ()
 
FoodStageType GetLastDecayStage ()
 
void UpdateVisuals ()
 

Variables

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_BOILING_START = "Boiling_SoundSet"
 
const string SOUND_BOILING_DONE = "Boiling_Done_SoundSet"
 
const string SOUND_DRYING_START = "Drying_SoundSet"
 
const string SOUND_DRYING_DONE = "Drying_Done_SoundSet"
 
const string SOUND_BURNING_DONE = "Food_Burning_SoundSet"
 
protected bool m_MakeCookingSounds
 
protected SoundOnVehicle m_SoundCooking
 
protected EffectSound m_SoundEffectCooking
 DEPRECATED.
 
protected string m_SoundPlaying
 
ref FoodStage m_FoodStage
 
protected float m_DecayTimer
 
protected float m_DecayDelta = 0.0
 
protected FoodStageType m_LastDecayStage = FoodStageType.NONE
 
protected ParticleSource m_HotVaporParticle
 
private CookingMethodType m_CookedByMethod
 

Function Documentation

◆ AfterStoreLoad()

override void AfterStoreLoad ( )

◆ CanBeCooked()

override bool CanBeCooked ( )

◆ CanBeCookedOnStick()

override bool CanBeCookedOnStick ( )

◆ CanChangeToNewStage()

bool CanChangeToNewStage ( CookingMethodType  cooking_method)

◆ CanDecay()

override bool CanDecay ( )

◆ CanItemOverheat()

override bool CanItemOverheat ( )

◆ CanProcessDecay()

override bool CanProcessDecay ( )

◆ ChangeFoodStage()

void ChangeFoodStage ( FoodStageType  new_food_stage_type)

◆ Consume()

bool Consume ( float  amount,
PlayerBase  consumer 
)

Referenced by ManBase::Consume().

◆ Edible_Base()

void Edible_Base ( )

◆ EEDelete()

override void EEDelete ( EntityAI  parent)

◆ EEInit()

override void EEInit ( )

◆ EEItemLocationChanged()

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

disable sounds (from cooking)

check for DirectCooking slot name

◆ FilterAgents()

int FilterAgents ( int  agentsIn)

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

◆ GetAgentsPerDigest()

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

◆ GetBaitEffectivity()

override float GetBaitEffectivity ( )

◆ GetConsumptionPenaltyContext()

int GetConsumptionPenaltyContext ( )

◆ GetCookingTime()

float GetCookingTime ( )

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx  outputList)

◆ GetDebugText()

override string GetDebugText ( )

◆ GetDecayDelta()

float GetDecayDelta ( )

◆ GetDecayTimer()

float GetDecayTimer ( )

◆ GetFoodAgents()

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

◆ GetFoodDigestibility()

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

◆ GetFoodEnergy()

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

◆ GetFoodNutritionalIndex()

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

◆ GetFoodStage()

override FoodStage GetFoodStage ( )

◆ GetFoodStageName()

string GetFoodStageName ( FoodStageType  food_stage_type)

◆ GetFoodStageType()

FoodStageType GetFoodStageType ( )

◆ GetFoodTotalVolume()

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

◆ GetFoodToxicity()

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

◆ GetFoodWater()

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

◆ GetLastDecayStage()

FoodStageType GetLastDecayStage ( )

◆ GetNextFoodStageType()

FoodStageType GetNextFoodStageType ( CookingMethodType  cooking_method)

◆ GetNutritionalProfile()

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

◆ GetTemperatureFreezeTime()

override float GetTemperatureFreezeTime ( )

◆ GetTemperatureThawTime()

override float GetTemperatureThawTime ( )

◆ HandleFoodStageChangeAgents()

void HandleFoodStageChangeAgents ( FoodStageType  stageOld,
FoodStageType  stageNew 
)

removes select agents on foodstage transitions

◆ IsCorpse()

override bool IsCorpse ( )

◆ IsFoodBaked()

bool IsFoodBaked ( )

◆ IsFoodBoiled()

bool IsFoodBoiled ( )

◆ IsFoodBurned()

bool IsFoodBurned ( )

◆ IsFoodDried()

bool IsFoodDried ( )

◆ IsFoodRaw()

bool IsFoodRaw ( )

◆ IsFoodRotten()

bool IsFoodRotten ( )

◆ IsFruit()

override bool IsFruit ( )

Referenced by IEntity::IsFood().

◆ IsMeat()

override bool IsMeat ( )

Referenced by IEntity::IsFood().

◆ IsMushroom()

override bool IsMushroom ( )

Referenced by IEntity::IsFood().

◆ MakeSoundsOnClient()

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

◆ OnAction()

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

◆ OnConsume()

void OnConsume ( float  amount,
PlayerBase  consumer 
)

◆ OnFoodStageChange()

void OnFoodStageChange ( FoodStageType  stageOld,
FoodStageType  stageNew 
)

called on server

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext  ctx,
int  version 
)

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext  ctx)

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )

◆ ProcessDecay()

override void ProcessDecay ( float  delta,
bool  hasRootAsPlayer 
)

◆ RefreshAudio()

protected void RefreshAudio ( )

◆ RemoveAudio()

protected void RemoveAudio ( )

◆ ReplaceEdibleWithNew()

void ReplaceEdibleWithNew ( string  typeName)

◆ ReplaceEdibleWithNewLambda()

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

◆ ResetCookingTime()

void ResetCookingTime ( )

◆ SetActions()

override void SetActions ( )

◆ SetCookingTime()

void SetCookingTime ( float  time)

◆ SoundCookingStart()

protected void SoundCookingStart ( string  sound_name)

Referenced by RefreshAudioVisuals().

◆ SoundCookingStop()

protected void SoundCookingStop ( )

Referenced by RemoveAudioVisuals().

◆ Synchronize()

void Synchronize ( )

◆ TransferFoodStage()

void TransferFoodStage ( notnull Edible_Base  source)

◆ UpdateVaporParticle()

protected void UpdateVaporParticle ( )

◆ UpdateVisuals()

void UpdateVisuals ( )

◆ UpdateVisualsEx()

void UpdateVisualsEx ( bool  forced = false)

Variable Documentation

◆ DIRECT_COOKING_SLOT_NAME

const string DIRECT_COOKING_SLOT_NAME = "DirectCooking"

◆ m_CookedByMethod

private CookingMethodType m_CookedByMethod

◆ m_DecayDelta

protected float m_DecayDelta = 0.0

◆ m_DecayTimer

protected float m_DecayTimer

◆ m_FoodStage

ref FoodStage m_FoodStage

◆ m_HotVaporParticle

protected ParticleSource m_HotVaporParticle

◆ m_LastDecayStage

protected FoodStageType m_LastDecayStage = FoodStageType.NONE

◆ m_MakeCookingSounds

protected bool m_MakeCookingSounds

◆ m_SoundCooking

protected SoundOnVehicle m_SoundCooking

◆ m_SoundEffectCooking

protected EffectSound m_SoundEffectCooking

DEPRECATED.

◆ m_SoundPlaying

protected string m_SoundPlaying

◆ SOUND_BAKING_DONE

const string SOUND_BAKING_DONE = "Baking_Done_SoundSet"

◆ SOUND_BAKING_START

const string SOUND_BAKING_START = "Baking_SoundSet"

◆ SOUND_BOILING_DONE

const string SOUND_BOILING_DONE = "Boiling_Done_SoundSet"

◆ SOUND_BOILING_START

const string SOUND_BOILING_START = "Boiling_SoundSet"

◆ SOUND_BURNING_DONE

const string SOUND_BURNING_DONE = "Food_Burning_SoundSet"

◆ SOUND_DRYING_DONE

const string SOUND_DRYING_DONE = "Drying_Done_SoundSet"

◆ SOUND_DRYING_START

const string SOUND_DRYING_START = "Drying_SoundSet"