From 79c25b860e59819d9293f984f913c2e1a8474d09 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Wed, 5 Feb 2025 20:08:44 -0500 Subject: [PATCH] emergency fix to could-not-read errors --- mods/aChefsDream.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index acf75e57..e2a40c66 100644 --- a/mods/aChefsDream.js +++ b/mods/aChefsDream.js @@ -8032,11 +8032,13 @@ elements.fruit_slush.stateLowColorMultiplier = 1.2; elements.juice_ice.stateHighColorMultiplier = 0.83333333333; elements.juice_ice.stateHigh = "fruit_slush" elements.juice_ice.tempHigh = -20 -elements[iceelem].stateHigh = "fruit_slush" -elements[iceelem].tempHigh = -20 +if(elements[iceelem]) { + elements[iceelem].stateHigh = "fruit_slush" + elements[iceelem].tempHigh = -20 +} // fruit milk with milk -elements.fruit_milk.reactions.milk = { chance:1, func: function(pixel1, pixel2){ +elements.fruit_milk.reactions ??= {}; elements.fruit_milk.reactions.milk = { chance:1, func: function(pixel1, pixel2){ let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); if (((newrgb.r + newrgb.g + newrgb.b) / 3) < 230) { changePixel(pixel1,"fruit_milk")