269 {
270 float all_ingredients_health = 0;
271 float all_ingredients_health01 = 0;
272 int value_delta;
274 {
276 all_ingredients_health += ingrd.GetHealth("", "");
277 all_ingredients_health01 += ingrd.GetHealth01("", "");
278 }
279
281 {
283 if (!res)
284 {
285 continue;
286 }
287
288 if (res.IsItemBase())
289 {
291
293
294 if (!resIb.IsMagazine())
295 {
297 {
298 resIb.SetQuantityMax();
299 }
300 else if (value_delta != -1)
301 {
303 }
304 }
305 else
306 {
307 Magazine mgzn = Magazine.Cast(resIb);
309 {
310 mgzn.ServerSetAmmoMax();
311 }
312 else if (value_delta != -1)
313 {
314 mgzn.ServerSetAmmoCount(value_delta);
315 }
316 }
317 }
319 {
321 res.SetHealth("","",value_delta);
322 }
324 {
326 {
329
330 if (ing)
331 {
332 float ing_health01 = ing.GetHealth01("","");
333 res.SetHealth("", "", ing_health01 * res.GetMaxHealth("",""));
335 }
336 }
338 {
340 res.SetHealth("", "", average_health01 * res.GetMaxHealth("",""));
341 }
342 }
343
345 {
347 {
350
351 if (ingr)
352 {
353 MiscGameplayFunctions.TransferItemProperties(ingr, res);
354 MiscGameplayFunctions.TransferInventory(ingr, res, player);
355 }
356 }
357 }
358 }
359 }
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
int m_ResultInheritsHealth[MAXIMUM_RESULTS]
float m_ResultSetQuantity[MAXIMUM_RESULTS]
bool m_ResultSetFullQuantity[MAXIMUM_RESULTS]
float m_ResultSetHealth[MAXIMUM_RESULTS]
const int MAX_NUMBER_OF_INGREDIENTS
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)