From ee1dc36a7cadffa6ee44bf8b1de14800e945e5db Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:29:45 +0800 Subject: [PATCH] A Chef's Dream 1.4 --- mods/aChefsDream.js | 605 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 598 insertions(+), 7 deletions(-) diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index e026916d..800c9e8a 100644 --- a/mods/aChefsDream.js +++ b/mods/aChefsDream.js @@ -2,7 +2,7 @@ Created by SquareScreamYT and RealerRaddler Thanks to Alice, nousernamefound and Fioushemastor for helping :) -v1.3.2 +v1.4 Changelog (v1.0) - added chickens @@ -170,6 +170,28 @@ Changelog (v1.3.2) - added turnips - added turnip seeds and leaves - added turnip juice + + + +Changelog (v1.4) + - added baking powder + - added corn starch + - added maple syrup + - added pancakes + - added pancake mix + - added pancake batter + - added normal pancakes + - added crispy pancakes + - added burnt pancakes + - added strawberries + - added strawberries + - added strawberry seeds, stem, and leaves + - added strawberry juice + - added whipped cream + - chicken eggs no longer hatch under 20 degrees + - added ginger + - added ginger juice + - added ginger rhizomes, pseudostems and leaves */ /* @@ -262,16 +284,22 @@ elements.chicken_egg = { color: ["#e0d3ab","#d9cdb5"], behavior: [ "XX|XX|XX", - "XX|FX%5 AND CH:chick%0.1|XX", + "XX|FX%5|XX", "M2%30|M1|M2%30", ], + tick: function(pixel) { + if (Math.random() < 0.1 && pixel.temp > 20) { + changePixel(pixel,"chick") + } + doDefaults(pixel); + }, category: "food", state: "solid", - temp: 30, + temp: 20, tempLow: -18, stateLow: "frozen_chicken_egg", breakInto: ["yolk"], - tempHigh: 500, + tempHigh: 400, stateHigh: ["calcium", "ash"], burn:50, burnTime:450, @@ -1700,7 +1728,7 @@ elements.grape = { stateHigh: ["steam","sugar"], category: "food", state: "solid", - density: 1154, + density: 825, breakInto: "grape_juice", ignoreAir: true, isFood: true @@ -2013,7 +2041,6 @@ elements.coconut_milk = { reactions: { "melted_chocolate": { elem1:"chocolate_milk", elem2:null }, "chocolate": { elem1:"chocolate_milk", elem2:"melted_chocolate", chance:0.05 }, - "coffee_ground": { elem1:"chocolate_milk", chance:0.05 }, "juice": { elem1:"fruit_milk", elem2:null, chance:0.05 }, "soda": { elem1:"pilk", elem2:null, chance:0.1 }, "yolk": { elem1:"eggnog", elem2:null, chance:0.1 }, @@ -2529,7 +2556,7 @@ elements.turnip_leaves = { } elements.turnip = { color: ["#945bb3","#a05cbd","#a053b8","#b364c4"], - behavior: behaviors.STURDYPOWDER, + behavior: behaviors.POWDER, category:"food", tempHigh: 100, stateHigh: ["steam"], @@ -2557,3 +2584,567 @@ elements.turnip_juice = { hidden: true, temp: 30, }; + +elements.corn = { + color: ["#f8d223","#d6ba2a","#f7f5ba","#dbd281","#cdb12d"], + tick: function(pixel) { + if (pixel.temp >= 180) { + changePixel(pixel,"popcorn"); + if (isEmpty(pixel.x,pixel.y-1)) { + tryMove(pixel,pixel.x,pixel.y-1); + if (isEmpty(pixel.x-1,pixel.y)) { createPixel("pop",pixel.x-1,pixel.y) } + if (isEmpty(pixel.x+1,pixel.y)) { createPixel("pop",pixel.x+1,pixel.y) } + if (isEmpty(pixel.x,pixel.y-1)) { createPixel("pop",pixel.x,pixel.y-1) } + if (isEmpty(pixel.x,pixel.y+1)) { createPixel("pop",pixel.x,pixel.y+1) } + } + } + doDefaults(pixel) + }, + category: "food", + burn: 10, + burnTime: 200, + breakInto: "corn_starch", + breakIntoColor: ["#ffe9a8","#ffecb3","#ffe28a"], + state: "solid", + density: 721, + seed: "corn_seed", + isFood: true, + movable: false, +} + +elements.corn_starch = { + color: ["#fcf2e1","#f2e7d3","#fcf3de"], + behavior: behaviors.POWDER, + reactions: { + "water": { elem1: "dough", elem2: null }, + "salt_water": { elem1: "dough", elem2: null }, + "sugar_water": { elem1: "dough", elem2: null }, + "seltzer": { elem1: "dough", elem2: null }, + "pool_water": { elem1: "dough", elem2: null }, + "juice": { elem1: "dough", elem2: null }, + "yolk": { elem1: "batter", elem2: null }, + "yogurt": { elem1: "batter", elem2: null }, + "honey": { elem1:"gingerbread", elem2:null }, + "molasses": { elem1:"gingerbread", elem2:null }, + "sap": { elem1:"gingerbread", elem2:null }, + "caramel": { elem1:"gingerbread", elem2:null }, + "broth": { elem1:"dough", elem2:null }, + "soda": { elem1:"dough", elem2:null }, + "tea": { elem1:"dough", elem2:null }, + "blood": { elem1:"dough", elem2:null }, + "infection": { elem1:"dough", elem2:null }, + "antibody": { elem1:"dough", elem2:null }, + "milk": { elem1:"dough", elem2:null }, + "cream": { elem1:"dough", elem2:null }, + "melted_butter": { elem1:"sauce", elem2:null, color1:"#DF8D32" }, + }, + category: "food", + tempHigh: 400, + stateHigh: "fire", + burn:40, + burnTime:25, + state: "solid", + density: 600, + isFood: true +} + +elements.baking_powder = { + color: "#fffaf0", + behavior: behaviors.POWDER, + category: "food", + state: "solid", + burn: 40, + tempHigh: 400, + stateHigh: ["salt","carbon_dioxide"], + burnTime: 25, + density: 600, + isFood: true, + reactions: { + "flour": { elem1: "pancake_mix", elem2: null, color1: "#e8b77b"}, + }, +}; + +if (!elements.baking_soda.reactions) elements.baking_soda.reactions = {}; +elements.baking_soda.reactions.neutral_acid = { elem1: "baking_powder", elem2: null } + +elements.pancake_mix = { + color: ["#f2e9c7","#f7ebbe"], + behavior: behaviors.POWDER, + reactions: { + "water": { elem1: "pancake_batter", elem2: null }, + }, + category: "food", + tempHigh: 400, + stateHigh: "fire", + burn:40, + burnTime:25, + state: "solid", + density: 600, + isFood: true +}, + +elements.pancake_batter = { + color: "#e6da9e", + behavior: behaviors.LIQUID, + category: "food", + tempHigh: 70, + stateHigh: "pancake", + stateHighColorMultiplier: 0.9, + burn:40, + burnTime:25, + burnInto:"ash", + state: "liquid", + viscosity: 10000, + density: 1001, + hidden: true, + isFood: true +} +elements.sap = { + color: ["#b67f18","#c86305","#cf7a19","#e4ae3a"], + behavior: behaviors.LIQUID, + reactions: { + "dead_bug": { elem1:"amber", elem2:null, chance:0.1 }, + "ant": { elem1:"amber", elem2:null, chance:0.1 }, + "fly": { elem1:"amber", elem2:null, chance:0.1 }, + "flea": { elem1:"amber", elem2:null, chance:0.1 }, + "termite": { elem1:"amber", elem2:null, chance:0.1 }, + "worm": { elem1:"amber", elem2:null, chance:0.1 }, + "bee": { elem1:"amber", elem2:null, chance:0.1 }, + "firefly": { elem1:"amber", elem2:null, chance:0.1 }, + "stinkbug": { elem1:"amber", elem2:null, chance:0.1 }, + "slug": { elem1:"amber", elem2:null, chance:0.1 }, + "snail": { elem1:"amber", elem2:null, chance:0.1 }, + }, + tempHigh: 104, + stateHigh: ["maple_syrup","maple_syrup","maple_syrup","sap"], + tempLow: 0, + stateLowName: "amber", + category:"liquids", + state: "liquid", + viscosity: 15, + density: 1400 +} +elements.maple_syrup = { + color: ["#fabb34","#facc34","#fabb34"], + behavior: behaviors.LIQUID, + tempHigh: 170, + stateHigh: ["sugar","smoke","smoke"], + tempLow: 0, + category:"liquids", + state: "liquid", + viscosity: 15, + hidden: true, + density: 1400 +} +elements.pancake = { + color: "#e0d080", + behavior: behaviors.STURDYPOWDER, + tempHigh: 95, + stateHigh: "crispy_pancake", + category: "food", + burn: 10, + burnTime: 400, + burnInto: ["smoke","smoke","smoke","ash"], + breakInto: "crumb", + state: "solid", + density: 233.96, + hidden: true, + isFood: true +} +elements.crispy_pancake = { + color: "#c7a34a", + behavior: behaviors.STURDYPOWDER, + tempHigh: 150, + stateHigh: "burnt_pancake", + category: "food", + burn: 10, + burnTime: 400, + burnInto: ["smoke","smoke","smoke","ash"], + breakInto: "crumb", + state: "solid", + density: 233.96, + hidden: true, + isFood: true +} +elements.burnt_pancake = { + color: "#332709", + behavior: behaviors.STURDYPOWDER, + tempHigh: 550, + stateHigh: "ash", + category: "food", + burn: 10, + burnTime: 400, + burnInto: ["smoke","smoke","smoke","ash"], + breakInto: "crumb", + state: "solid", + density: 233.96, + hidden: true, + isFood: true +} +elements.strawberry_seed = { + color: "#7a7133", + behavior: behaviors.STURDYPOWDER, + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "mercury": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "stench": { elem2:null, chance:0.25 }, + }, + tick: function(pixel) { + if (isEmpty(pixel.x,pixel.y+1)) { + movePixel(pixel,pixel.x,pixel.y+1); + } + else { + if (Math.random() < 0.02 && pixel.temp < 100) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + changePixel(pixel,"strawberry_stem"); + } + } + } + pixel.age++; + } + doDefaults(pixel); + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:15, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + cooldown: defaultCooldown +} +elements.strawberry_stem = { + color: "#419c2f", + behavior: [ + "CR:strawberry_stem,strawberry_leaves,strawberry_leaves,strawberry_leaves,strawberry_leaves%3|CR:strawberry_stem,strawberry_leaves,strawberry_leaves,strawberry_leaves,strawberry_leaves%3|CR:strawberry_stem,strawberry_leaves,strawberry_leaves,strawberry_leaves,strawberry_leaves%3", + "CR:strawberry_stem,strawberry_leaves,strawberry_leaves,strawberry_leaves,strawberry_leaves%3|XX|CR:strawberry_stem,strawberry_leaves,strawberry_leaves,strawberry_leaves,strawberry_leaves%3", + "XX|M1|XX", + ], + tick: function(pixel) { + if (isEmpty(pixel.x,pixel.y+1)) { + movePixel(pixel,pixel.x,pixel.y+1); + } + else { + if (Math.random() < 0.02 && pixel.age > 50 && pixel.temp < 100) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + changePixel(dirtPixel,"root"); + } + } + } + pixel.age++; + } + doDefaults(pixel); + }, + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "mercury": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "stench": { elem2:null, chance:0.25 }, + }, + properties: { + "age":0 + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:15, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, +} +elements.strawberry_leaves = { + color: "#4bad37", + behavior: [ + "XX|CR:strawberry%2|XX", + "CR:strawberry%2|XX|CR:strawberry%2", + "M2|M1|M2", + ], + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "mercury": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "stench": { elem2:null, chance:0.25 }, + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:15, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050 +} +elements.strawberry = { + color: "#f04b3c", + behavior: [ + "XX|ST:strawberry_stem,strawberry_leaves|XX", + "ST:strawberry_stem,strawberry_leaves|XX|ST:strawberry_stem,strawberry_leaves", + "M2|M1|M2", + ], + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "mercury": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "stench": { elem2:null, chance:0.25 }, + }, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + burn:15, + burnTime:60, + burnInto: "dead_plant", + breakInto: "strawberry_juice", + state: "solid", + density: 1050 +} +elements.strawberry_juice = { + color: "#e03a3a", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, + tempLow: 0 +}; + +elements.cream = { + color: "#f7f7f7", + behavior: behaviors.LIQUID, + onMix: function(cream1, cream2) { + if ((shiftDown && Math.random() < 0.01) || (elements[cream2.element].id === elements.cream.id && Math.random() < 0.1)) { + changePixel(cream1,"whipped_cream") + } + }, + reactions: { + "dirt": { elem1: null, elem2: "mud" }, + "sand": { elem1: null, elem2: "wet_sand" }, + "clay_soil": { elem1: null, elem2: "clay" }, + "melted_chocolate": { color1:"#664934", elem2:null }, + "chocolate": { color1:"#664934", elem2:"melted_chocolate", chance:0.05 }, + "juice": { elem1:"fruit_milk", elem2:null, chance:0.05 }, + "soda": { elem1:"pilk", elem2:null, chance:0.1 }, + "yolk": { elem1:"#eggnog", elem2:null, chance:0.1 }, + "caramel": { color1:"#C8B39A", chance:0.05 }, + "sugar": { elem2:null, chance:0.005}, + }, + viscosity: 1.5, + tempHigh: 1000, + stateHigh: ["smoke","smoke","smoke","steam","steam","calcium"], + tempLow: 0, + stateLow: "ice_cream", + stateLowColorMultiplier: 0.97, + category: "liquids", + hidden: true, + isFood: true, + state: "liquid", + density: 959.97, +} +elements.whipped_cream = { + color: "#fafafa", + behavior: behaviors.LIQUID, + reactions: { + "dirt": { elem1: null, elem2: "mud" }, + "sand": { elem1: null, elem2: "wet_sand" }, + "clay_soil": { elem1: null, elem2: "clay" }, + "melted_chocolate": { color1:"#664934", elem2:null }, + "chocolate": { color1:"#664934", elem2:"melted_chocolate", chance:0.05 }, + "juice": { elem1:"fruit_milk", elem2:null, chance:0.05 }, + "soda": { elem1:"pilk", elem2:null, chance:0.1 }, + "yolk": { elem1:"#eggnog", elem2:null, chance:0.1 }, + "caramel": { color1:"#C8B39A", chance:0.05 }, + "sugar": { elem2:null, chance:0.005}, + }, + viscosity: 1.5, + tempHigh: 1000, + stateHigh: ["smoke","smoke","smoke","steam","steam","calcium"], + tempLow: 0, + stateLow: "ice_cream", + stateLowColorMultiplier: 0.97, + category: "food", + hidden: true, + isFood: true, + state: "liquid", + density: 959.97, + viscosity: 2500000 +} + +elements.ginger = { + color: ["#b88f30","#d6a73a"], + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "M2 AND CH:dirt,mud,sand,wet_sand,clay_soil,clay,mycelium,grass,color_sand>ginger,fiber%0.5|M1 AND CH:dirt,mud,sand,wet_sand,clay_soil,clay,mycelium,grass,color_sand>ginger,fiber,fiber%0.5|M2 AND CH:dirt,mud,sand,wet_sand,clay_soil,clay,mycelium,grass,color_sand>ginger,fiber%0.5", + ], + reactions: { + "flour": { elem1:"gingerbread", elem2:null }, + "bread": { elem1:"gingerbread", elem2:null }, + }, + tempHigh: 275, + stateHigh: "dirt", + tempLow: -50, + stateLow: "fiber", + burn: 20, + burnTime: 60, + burnInto: "dirt", + breakInto: "ginger_juice", + category: "food", + state: "solid", + density: 1250, + conduct: 0.1, + hidden: true +} + +elements.ginger_rhizome = { + color: "#c7ad58", + tick: function(pixel) { + if (isEmpty(pixel.x,pixel.y+1)) { + movePixel(pixel,pixel.x,pixel.y+1); + } + else { + if (Math.random() < 0.02 && pixel.age > 50 && pixel.temp < 100) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + changePixel(dirtPixel,"ginger"); + } + } + if (isEmpty(pixel.x,pixel.y-1)) { + movePixel(pixel,pixel.x,pixel.y-1); + createPixel("ginger_pseudostem",pixel.x,pixel.y+1); + } + if (isEmpty(pixel.x+1,pixel.y) && Math.random() < 0.2) { + createPixel("ginger_leaves",pixel.x+1,pixel.y); + } + if (isEmpty(pixel.x-1,pixel.y) && Math.random() < 0.2) { + createPixel("ginger_leaves",pixel.x-1,pixel.y); + } + } + else if (pixel.age > 250) { + changePixel(pixel,"ginger_leaves"); + } + pixel.age++; + } + doDefaults(pixel); + }, + properties: { + "age":0 + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + breakInto: "ginger_juice", + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|FX%10|XX", + "XX|M1|XX", + ], + reactions: { + "flour": { elem1:"gingerbread", elem2:null }, + "bread": { elem1:"gingerbread", elem2:null }, + }, +}; + +elements.ginger_pseudostem = { + color: "#69a82d", + behavior: behaviors.STURDYPOWDER, + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "mercury": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "stench": { elem2:null, chance:0.25 }, + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:15, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050 +} +elements.ginger_leaves = { + color: "#52bd31", + behavior: behaviors.WALL, + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "mercury": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "stench": { elem2:null, chance:0.25 }, + "carbon_dioxide": { elem2:"oxygen", chance:0.25 }, + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:15, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050 +} +elements.ginger_juice = { + color: "#ccc056", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, + tempLow: 0, + reactions: { + "flour": { elem1:"gingerbread", elem2:null }, + "bread": { elem1:"gingerbread", elem2:null }, + }, +};