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

Enumerations

enum  CookingMethodType {
  NONE = 0 , BAKING = 1 , BOILING = 2 , DRYING = 3 ,
  TIME = 4 , COUNT
}
 

Functions

void SetCookingUpdateTime (float val)
 
void ProcessItemToCook (notnull ItemBase pItem, ItemBase cookingEquip, Param2< CookingMethodType, float > pCookingMethod, out Param2< bool, bool > pStateFlags)
 
int CookWithEquipment (ItemBase cooking_equipment, float cooking_time_coef=1)
 
int CookOnStick (Edible_Base item_to_cook, float cook_time_inc)
 
protected int UpdateCookingState (Edible_Base item_to_cook, CookingMethodType cooking_method, ItemBase cooking_equipment, float cooking_time_coef)
 
protected int UpdateCookingStateOnStick (Edible_Base item_to_cook, float cook_time_inc)
 
void SmokeItem (Edible_Base item_to_cook, float cook_time_inc)
 
void TerminateCookingSounds (ItemBase pItem)
 
protected ItemBase GetItemTypeFromCargo (typename item_type, ItemBase cooking_equipment)
 Cooking data.
 
protected Param2< CookingMethodType, floatGetCookingMethodWithTimeOverride (ItemBase cooking_equipment)
 
Edible_Base GetFoodOnStick (ItemBase stick_item)
 
float GetTimeToCook (Edible_Base item_to_cook, CookingMethodType cooking_method)
 
float GetMinTempToCook (Edible_Base item_to_cook, CookingMethodType cooking_method)
 
protected void AddTemperatureToItem (ItemBase cooked_item, ItemBase cooking_equipment, float min_temperature)
 
protected void DecreaseCookedItemQuantity (notnull Edible_Base pItem, float pAmount=0.0)
 
protected CookingMethodType GetCookingMethod (ItemBase cooking_equipment)
 DEPRECATED.
 

Variables

enum CookingMethodType TIME_WITH_SUPPORT_MATERIAL_COEF = 1.0
 
static const float TIME_WITHOUT_SUPPORT_MATERIAL_COEF = 2.0
 time modifier used when not using support material
 
static const float COOKING_FOOD_TIME_INC_VALUE = 2
 time modifier used when using support material
 
static const float COOKING_LARD_DECREASE_COEF = 25
 time increase when cooking a food
 
static const float COOKING_FOOD_QUANTITY_DECREASE_AMOUNT_NONE = 25
 how many units from quantity of lard are remove at each stage
 
static const float COOKING_FOOD_QUANTITY_DECREASE_AMOUNT_LARD = 0
 how many units from quantity of item are removed at each FoodStage change when support material is NOT used
 
static const float DEFAULT_COOKING_TEMPERATURE = 150
 NOT USED.
 
static const float FOOD_MAX_COOKING_TEMPERATURE = 150
 
static const float PARAM_BURN_DAMAGE_COEF = 0.05
 
static const float LIQUID_BOILING_POINT = 150
 
static const float LIQUID_VAPOR_QUANTITY = 2
 
static const float SOLID_OVERHEAT_QUANTITY = 2
 
static const float BURNING_WARNING_THRESHOLD = 0.75
 
 COOKING_EQUIPMENT_POT = Pot
 0..1, validly cooked item will pre-emptively start emitting burning sounds when this close to being burned
 
 COOKING_EQUIPMENT_FRYINGPAN = FryingPan
 
 COOKING_EQUIPMENT_CAULDRON = Cauldron
 
 COOKING_INGREDIENT_LARD = Lard
 
protected float m_UpdateTime = 1
 

Enumeration Type Documentation

◆ CookingMethodType

Enumerator
NONE 
BAKING 
BOILING 
DRYING 
TIME 
COUNT 

Function Documentation

◆ AddTemperatureToItem()

protected void AddTemperatureToItem ( ItemBase  cooked_item,
ItemBase  cooking_equipment,
float  min_temperature 
)

◆ CookOnStick()

int CookOnStick ( Edible_Base  item_to_cook,
float  cook_time_inc 
)

◆ CookWithEquipment()

int CookWithEquipment ( ItemBase  cooking_equipment,
float  cooking_time_coef = 1 
)

◆ DecreaseCookedItemQuantity()

protected void DecreaseCookedItemQuantity ( notnull Edible_Base  pItem,
float  pAmount = 0.0 
)

◆ GetCookingMethod()

◆ GetCookingMethodWithTimeOverride()

protected Param2< CookingMethodType, float > GetCookingMethodWithTimeOverride ( ItemBase  cooking_equipment)

when cooking in gasoline, jump to drying state(will be burnt then)

References COOKING_INGREDIENT_LARD, GetItemTypeFromCargo(), LIQUID_GASOLINE, TIME_WITH_SUPPORT_MATERIAL_COEF, and TIME_WITHOUT_SUPPORT_MATERIAL_COEF.

Referenced by CookWithEquipment().

◆ GetFoodOnStick()

Edible_Base GetFoodOnStick ( ItemBase  stick_item)

◆ GetItemTypeFromCargo()

protected ItemBase GetItemTypeFromCargo ( typename item_type  ,
ItemBase  cooking_equipment 
)

◆ GetMinTempToCook()

float GetMinTempToCook ( Edible_Base  item_to_cook,
CookingMethodType  cooking_method 
)

◆ GetTimeToCook()

float GetTimeToCook ( Edible_Base  item_to_cook,
CookingMethodType  cooking_method 
)

◆ ProcessItemToCook()

void ProcessItemToCook ( notnull ItemBase  pItem,
ItemBase  cookingEquip,
Param2< CookingMethodType, float pCookingMethod,
out Param2< bool, bool pStateFlags 
)

◆ SetCookingUpdateTime()

void SetCookingUpdateTime ( float  val)

References m_UpdateTime.

◆ SmokeItem()

◆ TerminateCookingSounds()

void TerminateCookingSounds ( ItemBase  pItem)

◆ UpdateCookingState()

◆ UpdateCookingStateOnStick()

Variable Documentation

◆ BURNING_WARNING_THRESHOLD

const float BURNING_WARNING_THRESHOLD = 0.75
static

◆ COOKING_EQUIPMENT_CAULDRON

COOKING_EQUIPMENT_CAULDRON = Cauldron

Referenced by GetCookingMethod().

◆ COOKING_EQUIPMENT_FRYINGPAN

COOKING_EQUIPMENT_FRYINGPAN = FryingPan

Referenced by GetCookingMethod().

◆ COOKING_EQUIPMENT_POT

COOKING_EQUIPMENT_POT = Pot

0..1, validly cooked item will pre-emptively start emitting burning sounds when this close to being burned

Referenced by GetCookingMethod().

◆ COOKING_FOOD_QUANTITY_DECREASE_AMOUNT_LARD

const float COOKING_FOOD_QUANTITY_DECREASE_AMOUNT_LARD = 0
static

how many units from quantity of item are removed at each FoodStage change when support material is NOT used

◆ COOKING_FOOD_QUANTITY_DECREASE_AMOUNT_NONE

const float COOKING_FOOD_QUANTITY_DECREASE_AMOUNT_NONE = 25
static

how many units from quantity of lard are remove at each stage

Referenced by UpdateCookingState(), and UpdateCookingStateOnStick().

◆ COOKING_FOOD_TIME_INC_VALUE

const float COOKING_FOOD_TIME_INC_VALUE = 2
static

time modifier used when using support material

Referenced by UpdateCookingState().

◆ COOKING_INGREDIENT_LARD

COOKING_INGREDIENT_LARD = Lard

◆ COOKING_LARD_DECREASE_COEF

const float COOKING_LARD_DECREASE_COEF = 25
static

time increase when cooking a food

Referenced by UpdateCookingState().

◆ DEFAULT_COOKING_TEMPERATURE

const float DEFAULT_COOKING_TEMPERATURE = 150
static

NOT USED.

Referenced by AddTemperatureToItem().

◆ FOOD_MAX_COOKING_TEMPERATURE

const float FOOD_MAX_COOKING_TEMPERATURE = 150
static

◆ LIQUID_BOILING_POINT

const float LIQUID_BOILING_POINT = 150
static

◆ LIQUID_VAPOR_QUANTITY

const float LIQUID_VAPOR_QUANTITY = 2
static

Referenced by ProcessItemToCook().

◆ m_UpdateTime

protected float m_UpdateTime = 1

◆ PARAM_BURN_DAMAGE_COEF

const float PARAM_BURN_DAMAGE_COEF = 0.05
static

◆ SOLID_OVERHEAT_QUANTITY

const float SOLID_OVERHEAT_QUANTITY = 2
static

Referenced by ProcessItemToCook().

◆ TIME_WITH_SUPPORT_MATERIAL_COEF

enum CookingMethodType TIME_WITH_SUPPORT_MATERIAL_COEF = 1.0

◆ TIME_WITHOUT_SUPPORT_MATERIAL_COEF

const float TIME_WITHOUT_SUPPORT_MATERIAL_COEF = 2.0
static

time modifier used when not using support material

Referenced by GetCookingMethodWithTimeOverride().