197 {
198
199 float food_temperature = item_to_cook.GetTemperature();
200
201
202
204
205 float food_min_temp = 0;
206 float food_time_to_cook = 0;
207
208
210 {
212 next_stage_cooking_properties = FoodStage.GetAllCookingPropertiesForStage(new_stage_type, null, item_to_cook.GetType());
213
214 food_min_temp = next_stage_cooking_properties.Get(eCookingPropertyIndices.MIN_TEMP);
215 food_time_to_cook = next_stage_cooking_properties.Get(eCookingPropertyIndices.COOK_TIME);
216 }
217
218
220
221
222 if (item_to_cook.IsItemOverheated())
224
225
226 if (food_min_temp > 0 && food_temperature >= food_min_temp)
227 {
230
233
234
236 {
239 {
241
242 if (cooking_equipment && cooking_equipment != item_to_cook)
243 {
245 {
247 if (lard)
248 {
249
251 lardQuantity =
Math.
Clamp(lardQuantity, 0, lard.GetQuantityMax());
253 }
254 else
255 {
258 }
259 }
260 }
261 else
262 {
265 }
266 }
267
268
270
271 return 1;
272 }
273 }
274 else
275 {
277 }
278
279 return 0;
280 }
static const float COOKING_FOOD_TIME_INC_VALUE
time modifier used when using support material
static const float COOKING_LARD_DECREASE_COEF
time increase when cooking a food
static const float COOKING_FOOD_QUANTITY_DECREASE_AMOUNT_NONE
how many units from quantity of lard are remove at each stage
void DecreaseCookedItemQuantity(notnull Edible_Base pItem, float pAmount=0.0)
void AddTemperatureToItem(ItemBase cooked_item, ItemBase cooking_equipment, float min_temperature)
ItemBase GetItemTypeFromCargo(typename item_type, ItemBase cooking_equipment)
Cooking data.
void MakeSoundsOnClient(bool soundstate, CookingMethodType cookingMethod=CookingMethodType.NONE)
FoodStageType GetFoodStageType()
FoodStageType GetNextFoodStageType(CookingMethodType cooking_method)
void SetCookingTime(float time)
void ChangeFoodStage(FoodStageType new_food_stage_type)
bool CanChangeToNewStage(CookingMethodType cooking_method)
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.