Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
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 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. More...
 
protected CookingMethodType GetCookingMethod (ItemBase cooking_equipment)
 DEPREACTED. More...
 
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)
 

Variables

enum CookingMethodType TIME_WITH_SUPPORT_MATERIAL_COEF = 1.0
 
 COOKING_EQUIPMENT_POT = Pot
 
 COOKING_EQUIPMENT_FRYINGPAN = FryingPan
 
 COOKING_EQUIPMENT_CAULDRON = Cauldron
 
 COOKING_INGREDIENT_LARD = Lard
 

Enumeration Type Documentation

◆ CookingMethodType

Enumerator
NONE 
BAKING 
BOILING 
DRYING 
TIME 
COUNT 

Definition at line 1 of file cooking.c.

Function Documentation

◆ AddTemperatureToItem()

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

Definition at line 506 of file cooking.c.

◆ CookOnStick()

int CookOnStick ( Edible_Base  item_to_cook,
float  cook_time_inc 
)

Definition at line 153 of file cooking.c.

◆ CookWithEquipment()

int CookWithEquipment ( ItemBase  cooking_equipment,
float  cooking_time_coef = 1 
)

cooking time coef override

Definition at line 78 of file cooking.c.

◆ DecreaseCookedItemQuantity()

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

Definition at line 534 of file cooking.c.

◆ GetCookingMethod()

protected CookingMethodType GetCookingMethod ( ItemBase  cooking_equipment)

DEPREACTED.

Definition at line 410 of file cooking.c.

◆ GetCookingMethodWithTimeOverride()

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

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

Definition at line 440 of file cooking.c.

◆ GetFoodOnStick()

Edible_Base GetFoodOnStick ( ItemBase  stick_item)

Definition at line 486 of file cooking.c.

◆ GetItemTypeFromCargo()

protected ItemBase GetItemTypeFromCargo ( typename item_type  ,
ItemBase  cooking_equipment 
)

Cooking data.

Definition at line 389 of file cooking.c.

◆ GetMinTempToCook()

float GetMinTempToCook ( Edible_Base  item_to_cook,
CookingMethodType  cooking_method 
)

Definition at line 499 of file cooking.c.

◆ GetTimeToCook()

float GetTimeToCook ( Edible_Base  item_to_cook,
CookingMethodType  cooking_method 
)

Definition at line 493 of file cooking.c.

◆ ProcessItemToCook()

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

state flags are in order: is_done, is_burned

enable cooking SoundEvent

update food

check for done state from baking (exclude Lard from baked items)

check for burned state

Definition at line 34 of file cooking.c.

◆ SmokeItem()

void SmokeItem ( Edible_Base  item_to_cook,
float  cook_time_inc 
)

Definition at line 324 of file cooking.c.

◆ TerminateCookingSounds()

void TerminateCookingSounds ( ItemBase  pItem)

Definition at line 357 of file cooking.c.

◆ UpdateCookingState()

protected int UpdateCookingState ( Edible_Base  item_to_cook,
CookingMethodType  cooking_method,
ItemBase  cooking_equipment,
float  cooking_time_coef 
)

Change food stage

Remove all modifiers

any foodstage without lard

any foodstage without lard

Definition at line 165 of file cooking.c.

◆ UpdateCookingStateOnStick()

protected int UpdateCookingStateOnStick ( Edible_Base  item_to_cook,
float  cook_time_inc 
)

Definition at line 255 of file cooking.c.

Variable Documentation

◆ COOKING_EQUIPMENT_CAULDRON

COOKING_EQUIPMENT_CAULDRON = Cauldron

Definition at line 31 of file cooking.c.

◆ COOKING_EQUIPMENT_FRYINGPAN

COOKING_EQUIPMENT_FRYINGPAN = FryingPan

Definition at line 30 of file cooking.c.

◆ COOKING_EQUIPMENT_POT

COOKING_EQUIPMENT_POT = Pot

Definition at line 29 of file cooking.c.

◆ COOKING_INGREDIENT_LARD

COOKING_INGREDIENT_LARD = Lard

Definition at line 32 of file cooking.c.

◆ TIME_WITH_SUPPORT_MATERIAL_COEF

enum CookingMethodType TIME_WITH_SUPPORT_MATERIAL_COEF = 1.0