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

Go to the source code of this file.

Enumerations

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

Functions

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

Variables

static const float BURNING_WARNING_THRESHOLD = 0.75
 COOKING_EQUIPMENT_CAULDRON = Cauldron
 COOKING_EQUIPMENT_FRYINGPAN = FryingPan
 COOKING_EQUIPMENT_POT = Pot
 0..1, validly cooked item will pre-emptively start emitting burning sounds when this close to being burned
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 COOKING_FOOD_QUANTITY_DECREASE_AMOUNT_NONE = 25
 how many units from quantity of lard are remove at each stage
static const float COOKING_FOOD_TIME_INC_VALUE = 2
 time modifier used when using support material
 COOKING_INGREDIENT_LARD = Lard
static const float COOKING_LARD_DECREASE_COEF = 25
 time increase when cooking a food
static const float DEFAULT_COOKING_TEMPERATURE = 150
 NOT USED.
static const float FOOD_MAX_COOKING_TEMPERATURE = 150
static const float LIQUID_BOILING_POINT = 150
static const float LIQUID_VAPOR_QUANTITY = 2
float m_UpdateTime = 1
static const float PARAM_BURN_DAMAGE_COEF = 0.05
static const float SOLID_OVERHEAT_QUANTITY = 2
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

Enumeration Type Documentation

◆ CookingMethodType

Enumerator
NONE 
BAKING 
BOILING 
DRYING 
TIME 
COUNT 

Definition at line 1 of file cooking.c.

Function Documentation

◆ AddTemperatureToItem()

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

◆ CookOnStick()

int CookOnStick ( Edible_Base item_to_cook,
float cook_time_inc )
protected

Definition at line 184 of file cooking.c.

References Edible_Base::CanBeCookedOnStick(), and UpdateCookingStateOnStick().

◆ CookWithEquipment()

int CookWithEquipment ( ItemBase cooking_equipment,
float cooking_time_coef = 1 )
protected

◆ DecreaseCookedItemQuantity()

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

Definition at line 519 of file cooking.c.

References Math::Clamp(), and g_Game.

Referenced by UpdateCookingState(), and UpdateCookingStateOnStick().

◆ GetCookingMethod()

CookingMethodType GetCookingMethod ( ItemBase cooking_equipment)
protected

◆ GetCookingMethodWithTimeOverride()

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

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

Definition at line 430 of file cooking.c.

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)
protected

Definition at line 466 of file cooking.c.

◆ GetItemTypeFromCargo()

ItemBase GetItemTypeFromCargo ( typename item_type ,
ItemBase cooking_equipment )
protected

Cooking data.

Definition at line 410 of file cooking.c.

References CargoBase::GetItem(), and CargoBase::GetItemCount().

Referenced by GetCookingMethod(), GetCookingMethodWithTimeOverride(), and UpdateCookingState().

◆ GetMinTempToCook()

float GetMinTempToCook ( Edible_Base item_to_cook,
CookingMethodType cooking_method )
protected

Definition at line 479 of file cooking.c.

References Edible_Base::GetNextFoodStageType().

◆ GetTimeToCook()

float GetTimeToCook ( Edible_Base item_to_cook,
CookingMethodType cooking_method )
protected

Definition at line 473 of file cooking.c.

References Edible_Base::GetNextFoodStageType().

◆ ProcessItemToCook()

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

◆ SetCookingUpdateTime()

void SetCookingUpdateTime ( float val)
protected

Definition at line 39 of file cooking.c.

References m_UpdateTime.

◆ SmokeItem()

◆ TerminateCookingSounds()

void TerminateCookingSounds ( ItemBase pItem)
protected

◆ UpdateCookingState()

◆ UpdateCookingStateOnStick()

Variable Documentation

◆ BURNING_WARNING_THRESHOLD

const float BURNING_WARNING_THRESHOLD = 0.75
static

Definition at line 30 of file cooking.c.

◆ COOKING_EQUIPMENT_CAULDRON

COOKING_EQUIPMENT_CAULDRON = Cauldron

Definition at line 34 of file cooking.c.

Referenced by GetCookingMethod().

◆ COOKING_EQUIPMENT_FRYINGPAN

COOKING_EQUIPMENT_FRYINGPAN = FryingPan

Definition at line 33 of file cooking.c.

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

Definition at line 32 of file cooking.c.

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

Definition at line 20 of file cooking.c.

◆ 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

Definition at line 19 of file cooking.c.

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

Definition at line 17 of file cooking.c.

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

Definition at line 18 of file cooking.c.

Referenced by UpdateCookingState().

◆ DEFAULT_COOKING_TEMPERATURE

const float DEFAULT_COOKING_TEMPERATURE = 150
static

NOT USED.

Definition at line 22 of file cooking.c.

Referenced by AddTemperatureToItem().

◆ FOOD_MAX_COOKING_TEMPERATURE

const float FOOD_MAX_COOKING_TEMPERATURE = 150
static

Definition at line 23 of file cooking.c.

◆ LIQUID_BOILING_POINT

const float LIQUID_BOILING_POINT = 150
static

Definition at line 26 of file cooking.c.

◆ LIQUID_VAPOR_QUANTITY

const float LIQUID_VAPOR_QUANTITY = 2
static

Definition at line 27 of file cooking.c.

Referenced by ProcessItemToCook().

◆ m_UpdateTime

float m_UpdateTime = 1
protected

Definition at line 37 of file cooking.c.

Referenced by AddTemperatureToItem(), and SetCookingUpdateTime().

◆ PARAM_BURN_DAMAGE_COEF

const float PARAM_BURN_DAMAGE_COEF = 0.05
static

Definition at line 24 of file cooking.c.

Referenced by AddDamageToItemByFireEx(), and ProcessItemToCook().

◆ SOLID_OVERHEAT_QUANTITY

const float SOLID_OVERHEAT_QUANTITY = 2
static

Definition at line 28 of file cooking.c.

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

Definition at line 15 of file cooking.c.

Referenced by GetCookingMethodWithTimeOverride().