45 {
48 {
50 UpdateCookingState(item_to_cook, pCookingMethod.param1, cookingEquip, pCookingMethod.param2);
51
52
54 {
55 pStateFlags.param1 |= true;
56 }
58 else if (item_to_cook.
IsFoodBaked() && item_to_cook.Type() != Lard)
59 {
60 pStateFlags.param1 |= true;
61 }
64 {
65 pStateFlags.param2 |= true;
66 }
67 }
68 else
69 {
70
71 if (pItem != cookingEquip)
73
74 int liquidType = pItem.GetLiquidType();
75 bool handleLiquid = pItem.IsLiquidContainer() && liquidType !=
LIQUID_NONE;
76 bool isLiquiBoiling = handleLiquid && pItem.GetTemperature() >= Liquid.GetBoilThreshold(liquidType);
77
78
79 if (pItem.CanItemOverheat())
80 {
81
82 if (pItem.HasQuantity() && pItem.GetQuantityNormalized() > 0)
83 {
84 if (handleLiquid)
85 {
86 if (pItem.IsItemOverheated() || isLiquiBoiling)
88 }
89 else if (pItem.IsItemOverheated())
90 {
92 }
93 }
94 else if (!pItem.IsCookware() && pItem.IsItemOverheated())
95 {
97 }
98 }
99 else
100 {
101 if (!pItem.IsCookware())
103
104 if (isLiquiBoiling)
106 }
107
108
109 if (isLiquiBoiling)
110 pItem.RemoveAllAgentsExcept(
eAgents.HEAVYMETAL);
111 }
112 }
static const float SOLID_OVERHEAT_QUANTITY
static const float PARAM_BURN_DAMAGE_COEF
static const float LIQUID_VAPOR_QUANTITY
int UpdateCookingState(Edible_Base item_to_cook, CookingMethodType cooking_method, ItemBase cooking_equipment, float cooking_time_coef)
void AddTemperatureToItem(ItemBase cooked_item, ItemBase cooking_equipment, float min_temperature)
override bool CanBeCooked()