From fc98eac748bb67283242747af41c0fb02b52fb72 Mon Sep 17 00:00:00 2001 From: Izzy <148395323+rottenEgghead@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:54:35 -0500 Subject: [PATCH 01/28] Create weAllScreamFor.js Creation of weAllScreamFor.js mod --- mods/weAllScreamFor.js | 218 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 mods/weAllScreamFor.js diff --git a/mods/weAllScreamFor.js b/mods/weAllScreamFor.js new file mode 100644 index 00000000..f96b4e8c --- /dev/null +++ b/mods/weAllScreamFor.js @@ -0,0 +1,218 @@ +/* +A Sandboxels mod dedicated to creating yummy ice cream creations! My first Sandboxels mod. +Made by rottenEgghead @ https://github.com/rottenEgghead + +Current elements: Waffle cone, Strawberry, Sprinkles, Chocolate chips, Oreos, M&Ms, Cherries, Banana, Coconut (shavings/water) +Current renamed elements: Chocolate -> Chocolate bar, Nut -> Peanut +Current tools: Freeze + +** v.1.0 ** +N/A +*/ + +var mainCat = "food"; +var smallDensity = 233.95; +var foodTempHigh = 176; +var defChance = 0.05; + +if (!elements.ice_cream.reactions) { elements.ice_cream.reaction = {}; }; +elements.ice_cream.temp = -15; +elements.ice_cream.reactions = { + "strawberry": { color1: ["#f5dad7", "#ffbfbf", "#f7a3a3"], chance: defChance }, + "gingerbread": { color1: ["#f0cbad", "#dec4af"], chance: defChance }, + "coffee": { color1: [], chance: defChance }, + "crumb": { color1: ["#f0cbad", "#dec4af"], chance: defChance }, + "oreo_crumb": { color1: ["#e8e2e1", "#666161", "#8a8888"], chance: defChance }, + "oreo": { color1: ["#e8e2e1", "#666161", "#8a8888"], chance: defChance }, + "mnms": { color1: ["#ebe6e6", "#ebe6e6", "#ffd9d9", "#fffcd9", "#ddffd9", "#d9d9ff"], chance: defChance }, + "nut_butter": { color1: ["#f0ece9", "#f5cd98", "#cfaf84"], chance: defChance }, + "melted_chocolate": { color1: ["#785E4C", "#8c664c", "#b37449"], chance: defChance }, +}; + +elements.chocolate.name = "Chocolate Bar"; +elements.chocolate.behavior = behaviors.WALL; +elements.chocolate.breakInto = "chocolate_chips"; + +elements.coffee.tempLow = -15; +elements.coffee.hidden = false; + +elements.nut.name = "Peanut"; +elements.nut_butter.name = "Peanut Butter"; +elements.nut_meat.name = "Peanut Meat"; +elements.nut_milk.name = "Peanut Milk"; + + + +/* Tools */ +elements.freeze = { + color: ["#BCE7FF", "#65C7FF", "#BCE7FF", "#65C7FF", "#BCE7FF", "#65C7FF"], + tool: function (pixel) { + if (!shiftDown) { + pixel.temp -= 0.5; + pixelTempCheck(pixel); + } else { + pixel.temp -= 1; + pixelTempCheck(pixel); + } + }, + category: "energy", + excludeRandom: true, +}; + + + +/* Elements */ +elements.strawberry = { + color: "#e63e57", + behavior: behaviors.POWDER, + category: "food", + state: "solid", + hidden: false, + isFood: true, + + breakInto: "juice", + breakIntoColor: "#db4f64", + stateHigh: ["steam", "sugar"], + density: 1154, +}; +elements.banana = { + color: ["#F5D273", "#FFE093"], + behavior: behaviors.STURDYPOWDER, + category: mainCat, + state: "solid", + hidden: false, + isFood: true, + + tempHigh: 142, + density: 876, +}; +elements.coconut = { + color: ["#503733", "#402926"], + behavior: behaviors.WALL, + category: mainCat, + state: "solid", + hidden: false, + isFood: true, + + tempLow: 0, + burnInto: "steam", + breakInto: ["coconut_shavings", "coconut_water", "coconut_water"], + density: 352, +}; +elements.coconut_shavings = { + color: ["#E7E1DF", "#F5F1F0"], + behavior: behaviors.POWDER, + category: mainCat, + state: "solid", + hidden: false, + isFood: true, + + tempLow: 0, + burnInto: "steam", + density: 233, +}; +elements.coconut_water = { + color: "#D7E0DF", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + hidden: true, + isFood: true, + + tempLow: 0, + burnInto: "steam", + density: 1000, +}; +elements.waffle_cone = { + color: ["#d49d66", "#bf8449"], + behavior: behaviors.WALL, + category: mainCat, + state: "solid", + hidden: false, + isFood: true, + + tempHigh: foodTempHigh, + burn: 30, + burnTime: 200, + burnInto: ["smoke", "smoke", "smoke", "ash"], + breakInto: "crumb", + breakIntoColor: "#d49d66", + density: smallDensity, +}; +elements.sprinkles = { + color: ["#eb726a", "#ebca6a", "#88eb6a", "#6aaceb", "#eb6ade"], + behavior: behaviors.POWDER, + category: mainCat, + state: "solid", + hidden: false, + isFood: true, + + tempHigh: foodTempHigh, + stateHigh: "caramel", + density: smallDensity, +}; +elements.chocolate_chips = { + color: "#382a20", + behavior: behaviors.POWDER, + category: mainCat, + state: "solid", + hidden: true, + isFood: true, + + tempHigh: 31, + stateHigh: "melted_chocolate", + density: 1325, +}; +elements.oreo = { + color: "#302c2b", + behavior: behaviors.STURDYPOWDER, + category: mainCat, + state: "solid", + hidden: false, + isFood: true, + + tempHigh: foodTempHigh, + stateHigh: "caramel", + breakInto: "oreo_crumb", + density: smallDensity, +}; +elements.oreo_crumb = { + color: "#302c2b", + behavior: behaviors.POWDER, + category: mainCat, + state: "solid", + hidden: true, + isFood: true, + + tempHigh: foodTempHigh, + stateHigh: "caramel", + density: smallDensity, +}; +elements.mnms = { + name: "M&Ms", + color: ["#f71f14", "#f2d622", "#2279f2", "#45f222", "#5e3f32"], + behavior: behaviors.POWDER, + category: mainCat, + state: "solid", + hidden: false, + isFood: true, + + tempHigh: 31, + stateHigh: "melted_chocolate", + density: 1325, +}; +elements.cherry = { + name: "Cherries", + color: "#ab261d", + behavior: behaviors.WALL, + category: mainCat, + state: "solid", + hidden: false, + isFood: true, + + tempHigh: 256, + stateHigh: ["steam", "sugar"], + density: 1154, + breakInto: "jelly", + breakIntoColor: ["#8c142a", "#800a20"], +}; From d38a4bf634fa25f59c03cd9a59e3fb6e946bfb26 Mon Sep 17 00:00:00 2001 From: stefanblox <155691462+stefanblox@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:06:44 -0300 Subject: [PATCH 02/28] sbmixup the elements i make up in mix up, i add them in this mod --- mods/sbmixup.js | 653 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 653 insertions(+) create mode 100644 mods/sbmixup.js diff --git a/mods/sbmixup.js b/mods/sbmixup.js new file mode 100644 index 00000000..976cc7e5 --- /dev/null +++ b/mods/sbmixup.js @@ -0,0 +1,653 @@ +elements.air = { + color: "#c1d4d3", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + state: "liquid", + reactions: { + "ocean": {elem2: "oceanair"}, + "idk": {elem2: "idk_air"}, + "life": {elem2: "airlife"}, + "wate_r": {elem2: "waterair"}, + "fired_earth": {elem2: "airfired_earth"}, + "go_drink_water": {elem2: "air_in_the_water"}, + "voi_d": {elem2: "black_hole"}, + } +}; + +elements.earth = { + color: "#4f2720", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + state: "liquid", + reactions: { + "life": {elem2: "idk"}, + "waterfired_fired_earth": {elem2: "earth_waterfired_fired_earth"}, + } +}; + +elements.fir_e = { + color: "#ff2600", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + state: "liquid", + reactions: { + "earth": {elem2: "fired_earth"}, + "fired_earth": {elem2: "fired_fired_earth"}, + "ocean": {elem2: "oceanfire"}, + } +}; + +elements.life = { + color: "#61db40", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + state: "liquid", + reactions: { + "idk": {elem2: "boredom"}, + "life": {elem2: "life"}, + "idk_idk_fired_fired_earth": {elem2: "life_idk_idk_fired_fired_earth"}, + "waterair_void": {elem2: "did_it_disappear"}, + } +} + +elements.wate_r = { + color: "#037bfc", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + state: "liquid", + reactions: { + "wate_r": {elem2: "ocean"}, + "ocean": {elem2: "water_in_the_ocean"}, + "boredom": {elem2: "go_drink_water"}, + "fir_e": {elem2: "watergirl_and_fireboy"}, + } +}; + +elements.ocean = { + hidden: true, + color: "#206685", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + state: "liquid", + reactions: { + "airlife": {elem2: "oceanairlife"}, + "nothing_water": {elem2: "no_ocean"}, + "waterfired_fired_earth": {elem2: "waterfired_fired_earthocean"} + } +} + +elements.voi_d = { + color: "#000000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + state: "liquid", + reactions: { + "waterair": {elem2: "waterair_void"}, + "nothing_water": {elem2: "it_disappeared"}, + "oceanair": {elem2: "i_think_it_also_disappeared"}, + "fired_earth": {elem2: "its_gone"}, + } +}; + +elements.idk = { + color: "#FFFFFF", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + state: "liquid", + hidden: true, + reactions: { + "air": {elem2: "idk_air"}, + "life": {elem2: "boredom"}, + "fired_fired_earth": {elem2: "idk_fired_fired_earth"}, + "voi_d": {elem2: "nothing"}, + "idk_fired_fired_earth": {elem2: "idk_idk_fired_fired_earth"}, + "wate_r": {elem2: "nothing_water"}, + "fir_e": {elem2: "idk_fire"}, + "idk_idk_fired_fired_bored_earth": {elem2: "idk_idk_idk_fired_fired_bored_earth"}, + } +}; + +elements.fired_earth = { + color: ["#ff3700", "#4d2115"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "airlife": {elem2: "airlife_fired_earth"}, + "watergirl_and_fireboy": {elem2: "earth_guy"}, + "oceanair": {elem2: "fired_earth_oceanair"}, + } +}; + +elements.fired_fired_earth = { + color: ["#ff3700", "#ff3700", "#4d2115"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "boredom": {elem2: "i_always_like_to_play_with_fire"}, + "airlife": {elem2: "poop_on_the_plane"}, + } +}; + +elements.oceanair = { + color: ["#a7bcc4", "#2b87ff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.idk_air = { + color: ["#FFFFFF", "#9fb5b3"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.airlife = { + color: ["#47c451", "#a7bcc4"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "waterair": {elem2: "avatar"} + } +}; + +elements.boredom = { + color: "#303631", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "idk_idk_fired_fired_earth": {elem2: "idk_idk_fired_fired_bored_earth"} + } +}; + +elements.waterair = { + color: ["#9fb5b3", "#1b90de"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "watergirl_and_fireboy": {elem2: "avatar_guys"}, + } +}; + +elements.idk_fired_fired_earth = { + color: ["#FFFFFF", "#ff3700", "#ff3700", "#4d2115"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.nothing = { + color: "#000000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.dus_t = { + color: "#707070", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.watergirl_and_fireboy = { + color: ["#29a9ff", "#ff3c00"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.idk_idk_fired_fired_earth = { + color: ["#FFFFFF", "#FFFFFF", "#ff3700", "#ff3700", "#4d2115"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.waterfired_fired_earth = { + color: ["#007396", "#cc5b1f", "#ff4000", "#3b1c12"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.nothing_water = { + color: ["#000000", "#0088ff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.waterair_void = { + color: ["#0088ff", "#a9b9c7", "#1c1c1c"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "go_drink_water": {elem2: "theres_no_water"}, + } +}; + +elements.water_in_the_ocean = { + color: ["#0088ff", "#206aab"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.idk_fire = { + color: ["#FFFFFF", "#ff3300"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.go_drink_water = { + color: "#bfbfbf", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.life_idk_idk_fired_fired_earth = { + color: ["#5bd642", "#FFFFFF", "#FFFFFF", "#ff3c00", "#ff3c00", "#3d1e14"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.airfired_earth = { + color: ["#c2ccd1", "#ff3300", "#40190f"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.earth_waterfired_fired_earth = { + color: ["#40190f", "#00bbff", "#ff2a00", "#ff2a00", "#471c13"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.oceanairlife = { + color: ["#1f84a3", "#afbfc4", "#53cf40"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.i_always_like_to_play_with_fire = { + color: "#FFFFFF", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.airlife_fired_earth = { + color: "#cf4042", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.idk_idk_fired_fired_bored_earth = { + color: ["#FFFFFF", "#FFFFFF", "#ff2600", "#ff2600", "#2e2a29", "#52241c"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.avatar = { + color: "#fcae6a", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.it_disappeared = { + color: "#000000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.avatar_guys = { + color: ["#fcae6a", "#87674a", "#6e4a2b"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.i_think_it_also_disappeared = { + color: "#000000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.did_it_disappear = { + color: "#1c1c1c", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.no_ocean = { + color: "#22779c", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.poop_on_the_plane = { + color: "#361c14", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.earthguy = { + color: ["#4d2f26", "#ffab5c"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.idk_idk_idk_fired_fired_bored_earth = { + color: ["#FFFFFF", "#FFFFFF", "#FFFFFF", "#ff3c00", "#ff3c00", "#242424", "#422922"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.theres_no_water = { + color: "#00bfff", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.fired_earth_oceanair = { + color: ["#ff3700", "#4d2d24", "#2085b0", "#a7bdc7"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.waterfired_fired_earthocean = { + color: ["#00b3ff", "#ff3700", "#ff3700", "#4a241a", "#1a97ad"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.oceanfire = { + color: ["#1a97ad", "#ff3c00"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.air_in_the_water = { + color: ["#aebcbf", "#00a2ff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.its_gone = { + color: "#f4f4f4", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; + +elements.black_hole = { + color: "#000000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid" +}; \ No newline at end of file From e96dcb1ab6deaad6f75b76834b26b411d42af840 Mon Sep 17 00:00:00 2001 From: Jayd-Rubies <155784127+Jayd-Rubies@users.noreply.github.com> Date: Tue, 23 Jan 2024 23:31:01 -0500 Subject: [PATCH 03/28] Add files via upload --- mods/weapons.js | 88 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 mods/weapons.js diff --git a/mods/weapons.js b/mods/weapons.js new file mode 100644 index 00000000..dfb8ed94 --- /dev/null +++ b/mods/weapons.js @@ -0,0 +1,88 @@ +elements.tsar_bomba = { + color: "#524C41", + behavior: [ + "XX|EX:150>plasma|XX", + "XX|XX|XX", + "M2|M1 AND EX:150>plasma|M2", + ], + category: "weapons", + state: "solid", + density: 1300, + excludeRandom: true, + cooldown: defaultCooldown +}, +elements.little_boy = { + color: "#F5F5DC", + behavior: [ + "XX|EX:20>plasma|XX", + "XX|XX|XX", + "M2|M1 AND EX:70>plasma,plasma,plasma,plasma,radiation,fallout|M2", + ], + category: "weapons", + state: "solid", + density: 500, + excludeRandom: true, + cooldown: defaultCooldown +}, +elements.fat_man = { + color: ["#ffff00","#000000"], + behavior: [ + "XX|EX:28>plasma|XX", + "XX|XX|XX", + "M2|M1 AND EX:98>plasma,plasma,plasma,plasma,radiation,fallout|M2", + ], + category: "weapons", + state: "solid", + density: 1000, + excludeRandom: true, + cooldown: defaultCooldown +}, + elements.self_propelled_bomb = { + color: "#71797E", + tick: function(pixel) { + if ((pixel.temp > 1000 || pixel.charge) && !pixel.burning) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } + if (pixel.burning) { + if (!tryMove(pixel, pixel.x, pixel.y-1)) { + // tryMove again to the top left or top right + tryMove(pixel, pixel.x+(Math.random() < 0.5 ? -1 : 1), pixel.y-1); + } + if (pixelTicks-pixel.burnStart > 50 && Math.random() < 0.1) { + explodeAt(pixel.x, pixel.y, 10, "bomb"); + } + } + else { + if (!tryMove(pixel, pixel.x, pixel.y+1)) { + // tryMove again to the bottom left or bottom right + tryMove(pixel, pixel.x+(Math.random() < 0.5 ? -1 : 1), pixel.y+1); + } + } + doDefaults(pixel); + }, + burn: 90, + burnTime: 100, + density: 2000, + conduct: 1, + state: "solid", + category: "weapons" +}, +elements.left_missile = { + color: "#4c4e42", + behavior: [ + "XX|EX:10|XX", + "CR:left_missile AND EX:10|CH:fire|EX:10", + "M2|M1 AND EX:10|M2", + ], + category:"weapons", +}, +elements.right_missile = { + color: "#4c4e42", + behavior: [ + "XX|EX:10|XX", + "EX:10|CH:fire|EX:10 AND CR:right_missile", + "M2|M1 AND EX:10|M2", + ], + category:"weapons", +}; \ No newline at end of file From 6b9e731116a8baa7fe410760ba04bacf2d6e39b8 Mon Sep 17 00:00:00 2001 From: ACaracalCat <115324965+ACaracalCat@users.noreply.github.com> Date: Tue, 23 Jan 2024 22:52:49 -0600 Subject: [PATCH 04/28] Create FoodFoodFood.js --- mods/FoodFoodFood.js | 114 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 mods/FoodFoodFood.js diff --git a/mods/FoodFoodFood.js b/mods/FoodFoodFood.js new file mode 100644 index 00000000..9a1b7ad2 --- /dev/null +++ b/mods/FoodFoodFood.js @@ -0,0 +1,114 @@ +/* + +Food Food Food! Adds more food to Sandboxels. +Created by sugima. + +Sandboxels Plus v1 + +Changelog - 1/25/24 - v1 + - Made the mod :| + - Added Blueberries + - Added Lemons + - Added Rice + - Added Fried Rice + - Added Waffle + - Added Waffle Cone + - Added Chocolate Ice Cream + - Added Soup + - Added Coca Cola + - Added Flavor Formula + +*/ + +elements.blueberry = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#464196","#2E2B64"], + breakInto: "juice", + breakIntoColor: "#1F1C42", + reactions: {}, +}; +elements.lemon = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#f0e79d","#e3d24a"], + breakInto: "juice", + breakIntoColor: "#f1e9a6", + reactions: {}, +}; +elements.rice = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: "#ffffff", + tempHigh: 65, + stateHigh: "friedrice", + reactions: {}, +}; +elements.fried_rice = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#ff9c5e","#cf6c30"], + reactions: {}, +}; +elements.waffle = { + behavior: behaviors.WALL, + category: "food", + state: "solid", + color: ["#e3a976","#b3855d"], + reactions: {}, +}; +elements.waffle = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: ["#e3a976","#b3855d"], + tempHigh: 100, + stateHigh: "wafflecone", + reactions: {}, +}; +elements.waffle_cone = { + behavior: behaviors.WALL, + category: "food", + state: "solid", + color: ["#cc8e58","#b58051"], + reactions: {}, +}; +elements.chocolate_ice_cream = { + behavior: behaviors.POWDER, + category: "food", + state: "solid", + color: "#4d2f1c", + reactions: {}, +}; +elements.soup = { + behavior: behaviors.LIQUID, + category: "food", + state: "liquid", + color: "#c48818", + reactions: {}, +}; +elements.coca_cola = { + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + color: "#241711", + reactions: {}, +}; +elements.flavor_formula = { + behavior: behaviors.POWDER, + category: "liquids", + state: "solid", + color: ["#ff0000","#ff6400", "#ffff00", "#04ff00", "#00fff7", "#0400ff", "#b700ff", "#ff0099"], + reactions: {}, +}; +if (!elements.flour.reactions) { elements.flour.reactions = {} } +if (!elements.sugar.reactions) { elements.sugar.reactions = {} } +elements.flour.reactions.sugar = { "elem1":"waffle", "elem2": "waffle"}; +if (!elements.ice_cream.reactions) { elements.ice_cream.reactions = {} } +elements.ice_cream.reactions.chocolate = { "elem1":"chocolateicecream", "elem2": "chocolateicecream"}; +if (!elements.sugar_water.reactions) { elements.sugar_water.reactions = {} } +elements.sugar_water.reactions.flavor_formula = { "elem1":"coca_cola", "elem2": "coca_cola"}; From d9d72e39c973f84d6b73ad0dc897ea43a87c4c9b Mon Sep 17 00:00:00 2001 From: stefanblox <155691462+stefanblox@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:35:14 -0300 Subject: [PATCH 05/28] sbmixup 1.1 fixed reactions and added a whole new bunch of elements --- mods/sbmixup.js | 910 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 848 insertions(+), 62 deletions(-) diff --git a/mods/sbmixup.js b/mods/sbmixup.js index 976cc7e5..6d1938fd 100644 --- a/mods/sbmixup.js +++ b/mods/sbmixup.js @@ -8,13 +8,14 @@ elements.air = { category: "sbmixup", state: "liquid", reactions: { - "ocean": {elem2: "oceanair"}, - "idk": {elem2: "idk_air"}, - "life": {elem2: "airlife"}, - "wate_r": {elem2: "waterair"}, - "fired_earth": {elem2: "airfired_earth"}, - "go_drink_water": {elem2: "air_in_the_water"}, - "voi_d": {elem2: "black_hole"}, + "ocean": {elem2: "oceanair"}, + "idk": {elem2: "idk_air"}, + "wate_r": {elem2: "waterair"}, + "earth": {elem2: "dus_t"}, + "fired_earth": {elem2: "airfired_earth"}, + "waterfired_fired_earth": {elem2: "waterfired_fired_earthocean"}, + "go_drink_water": {elem2: "air_in_the_water"}, + "dusty_waterfired_fired_earthocean": {elem2: "polluted_waterfired_fired_earthocean"}, } }; @@ -28,8 +29,10 @@ elements.earth = { category: "sbmixup", state: "liquid", reactions: { - "life": {elem2: "idk"}, - "waterfired_fired_earth": {elem2: "earth_waterfired_fired_earth"}, + "waterfired_fired_earth": {elem2: "earth_waterfired_fired_earth"}, + "airfired_earth": {elem2: "airfired_earth_earth"}, + "no_ocean": {elem2: "only_earth"}, + "idk_idk_idk_fired_fired_bored_earth": {elem2: "idk_idk_idk_fired_fired_bored_earth"}, } }; @@ -43,9 +46,12 @@ elements.fir_e = { category: "sbmixup", state: "liquid", reactions: { - "earth": {elem2: "fired_earth"}, - "fired_earth": {elem2: "fired_fired_earth"}, - "ocean": {elem2: "oceanfire"}, + "earth": {elem2: "fired_earth"}, + "fired_earth": {elem2: "fired_fired_earth"}, + "airlife_fired_earth": {elem2: "airlife_fired_fired_earth"}, + "waterfired_fired_earth": {elem2: "waterfiredfired_fired_fired_earth_earth"}, + "airlife": {elem2: "bir_d"}, + "waterfired_fired_earth": {elem2: "fired_waterfired_fired_earth"}, } }; @@ -59,10 +65,12 @@ elements.life = { category: "sbmixup", state: "liquid", reactions: { - "idk": {elem2: "boredom"}, - "life": {elem2: "life"}, - "idk_idk_fired_fired_earth": {elem2: "life_idk_idk_fired_fired_earth"}, - "waterair_void": {elem2: "did_it_disappear"}, + "earth": {elem2: "idk"}, + "air": {elem2: "airlife"}, + "idk_idk_fired_fired_earth": {elem2: "life_idk_idk_fired_fired_earth"}, + "waterair_void": {elem2: "did_it_disappear"}, + "i_think_it_also_disappeared": {elem2: "backrooms"}, + "its_gone": {elem2: "death"}, } } @@ -76,10 +84,14 @@ elements.wate_r = { category: "sbmixup", state: "liquid", reactions: { - "wate_r": {elem2: "ocean"}, - "ocean": {elem2: "water_in_the_ocean"}, - "boredom": {elem2: "go_drink_water"}, - "fir_e": {elem2: "watergirl_and_fireboy"}, + "wate_r": {elem2: "ocean"}, + "fir_e": {elem2: "watergirl_and_fireboy"}, + "fired_fired_earth": {elem2: "waterfired_fired_earth"}, + "idk": {elem2: "nothing_water"}, + "ocean": {elem2: "water_in_the_ocean"}, + "boredom": {elem2: "go_drink_water"}, + "fired_fired_earth": {elem2: "i_always_like_to_play_with_fire"}, + "earth": {elem2: "aquaman"}, } }; @@ -94,9 +106,14 @@ elements.ocean = { category: "sbmixup", state: "liquid", reactions: { - "airlife": {elem2: "oceanairlife"}, - "nothing_water": {elem2: "no_ocean"}, - "waterfired_fired_earth": {elem2: "waterfired_fired_earthocean"} + "airlife": {elem2: "oceanairlife"}, + "nothing_water": {elem2: "no_ocean"}, + "fire": {elem2: "oceanfire"}, + "ocean": {elem2: "infinite_water_lifehack"}, + "idk_air": {elem2: "a"}, + "waterair": {elem2: "ocean_waterair"}, + "idk_fired_fired_earth": {elem2: "something"}, + "oceanairlife": {elem2: "oceanoceanairlife"}, } } @@ -110,10 +127,12 @@ elements.voi_d = { category: "sbmixup", state: "liquid", reactions: { - "waterair": {elem2: "waterair_void"}, - "nothing_water": {elem2: "it_disappeared"}, - "oceanair": {elem2: "i_think_it_also_disappeared"}, - "fired_earth": {elem2: "its_gone"}, + "waterair": {elem2: "waterair_void"}, + "nothing_water": {elem2: "it_disappeared"}, + "oceanair": {elem2: "i_think_it_also_disappeared"}, + "fired_earth": {elem2: "its_gone"}, + "air": {elem2: "black_hole"}, + "airfired_earth": {elem2: "also_gone"}, } }; @@ -128,14 +147,13 @@ elements.idk = { state: "liquid", hidden: true, reactions: { - "air": {elem2: "idk_air"}, - "life": {elem2: "boredom"}, - "fired_fired_earth": {elem2: "idk_fired_fired_earth"}, - "voi_d": {elem2: "nothing"}, - "idk_fired_fired_earth": {elem2: "idk_idk_fired_fired_earth"}, - "wate_r": {elem2: "nothing_water"}, - "fir_e": {elem2: "idk_fire"}, - "idk_idk_fired_fired_bored_earth": {elem2: "idk_idk_idk_fired_fired_bored_earth"}, + "life": {elem2: "boredom"}, + "fired_fired_earth": {elem2: "idk_fired_fired_earth"}, + "voi_d": {elem2: "nothing"}, + "idk_fired_fired_earth": {elem2: "idk_idk_fired_fired_earth"}, + "fir_e": {elem2: "idk_fire"}, + "idk_idk_fired_fired_bored_earth": {elem2: "idk_idk_idk_fired_fired_bored_earth"}, + "im_playing_this_in_discord": {elem2: "nothing_at_all"}, } }; @@ -150,9 +168,10 @@ elements.fired_earth = { hidden: true, state: "liquid", reactions: { - "airlife": {elem2: "airlife_fired_earth"}, - "watergirl_and_fireboy": {elem2: "earth_guy"}, - "oceanair": {elem2: "fired_earth_oceanair"}, + "watergirl_and_fireboy": {elem2: "earthguy"}, + "oceanair": {elem2: "fired_earth_oceanair"}, + "fired_earth": {elem2: "even_more_fired_earth"}, + "airlife_fired_earth": {elem2: "airlife_even_more_fired_earth"}, } }; @@ -167,8 +186,8 @@ elements.fired_fired_earth = { hidden: true, state: "liquid", reactions: { - "boredom": {elem2: "i_always_like_to_play_with_fire"}, - "airlife": {elem2: "poop_on_the_plane"}, + "oceanairlife": {elem2: "fired_fired_earthoceanairlife"}, + "waterair": {elem2: "we_put_out_the_fire"}, } }; @@ -181,7 +200,10 @@ elements.oceanair = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "waterfired_fired_earth": {elem2: "i_keep_reading_watermelon_instead_of_waterfired"}, + } }; elements.idk_air = { @@ -193,7 +215,11 @@ elements.idk_air = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "airlife": {elem2: "idk_airlife"}, + "did_it_disappear": {elem2: "my_name_is_air"} + } }; elements.airlife = { @@ -207,7 +233,9 @@ elements.airlife = { hidden: true, state: "liquid", reactions: { - "waterair": {elem2: "avatar"} + "fired_earth": {elem2: "airlife_fired_earth"}, + "waterair": {elem2: "avatar"}, + "fired_fired_earth": {elem2: "poop_on_the_plane"} } }; @@ -222,7 +250,10 @@ elements.boredom = { hidden: true, state: "liquid", reactions: { - "idk_idk_fired_fired_earth": {elem2: "idk_idk_fired_fired_bored_earth"} + "idk_idk_fired_fired_earth": {elem2: "idk_idk_fired_fired_bored_earth"}, + "nothing": {elem2: "im_playing_this_in_discord"}, + "infinite_water_lifehack": {elem2: "minutes_craft"}, + "we_put_out_the_fire": {elem2: "firefighter"}, } }; @@ -237,7 +268,7 @@ elements.waterair = { hidden: true, state: "liquid", reactions: { - "watergirl_and_fireboy": {elem2: "avatar_guys"}, + "watergirl_and_fireboy": {elem2: "avatar_guys"}, } }; @@ -274,7 +305,12 @@ elements.dus_t = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "waterfired_fired_earthocean": {elem2: "dusty_waterfired_fired_earthocean"}, + "waterair": {elem2: "dusty_waterair"}, + "airlife": {elem2: "dusty_airlife"}, + } }; elements.watergirl_and_fireboy = { @@ -310,7 +346,7 @@ elements.waterfired_fired_earth = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", }; elements.nothing_water = { @@ -322,7 +358,12 @@ elements.nothing_water = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "go_drink_water": {elem2: "still_no_water"}, + "it_disappeared": {elem2: "or_did_it"}, + "fired_earth": {elem2: "theres_no_water_but_theres_fired_earth"}, + } }; elements.waterair_void = { @@ -336,7 +377,8 @@ elements.waterair_void = { hidden: true, state: "liquid", reactions: { - "go_drink_water": {elem2: "theres_no_water"}, + "water_in_the_ocean": {elem2: "waterphobia"}, + "drink_water_in_a_plane": {elem2: "uhm_there_is_no_water_in_the_plane"}, } }; @@ -361,7 +403,11 @@ elements.idk_fire = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "watergirl_and_fireboy": {elem2: "whos_that"}, + "it_disappeared": {elem2: "maybe"}, + } }; elements.go_drink_water = { @@ -373,7 +419,12 @@ elements.go_drink_water = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "waterair_void": {elem2: "theres_no_water"}, + "idk_airlife": {elem2: "drink_water_in_a_plane"}, + "oceanair_life": {elem2: "go_drink_oceanairlife"}, + } }; elements.life_idk_idk_fired_fired_earth = { @@ -385,7 +436,10 @@ elements.life_idk_idk_fired_fired_earth = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "dusty_waterfired_fired_earthocean": {elem2: "dusty_life_idk_idk_waterfired_fired_fired_fired_earthearthocean"}, + } }; elements.airfired_earth = { @@ -421,7 +475,10 @@ elements.oceanairlife = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "waterfired_fired_earth": {elem2: "waterfired_oceanairlife_fired_earth"}, + } }; elements.i_always_like_to_play_with_fire = { @@ -433,7 +490,10 @@ elements.i_always_like_to_play_with_fire = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "waterfiredfired_fired_fired_fired_earth_earth": {elem2: "ok_this_is_getting_ridiculous"} + } }; elements.airlife_fired_earth = { @@ -445,7 +505,10 @@ elements.airlife_fired_earth = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "only_fired_earth_and_air": {elem2: "theres_more"}, + } }; elements.idk_idk_fired_fired_bored_earth = { @@ -469,7 +532,10 @@ elements.avatar = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "avatar_guys": {elem2: "clone"}, + } }; elements.it_disappeared = { @@ -529,7 +595,11 @@ elements.no_ocean = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "oceanair": {elem2: "is_there_an_ocean"}, + "fired_earth_oceanair": {elem2: "only_fired_earth_and_air"}, + } }; elements.poop_on_the_plane = { @@ -541,7 +611,10 @@ elements.poop_on_the_plane = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "waterfired_fired_earth": {elem2: "what_the_fuck"}, + } }; elements.earthguy = { @@ -553,7 +626,10 @@ elements.earthguy = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "i_always_like_to_play_with_fire": {elem2: "erm_actually_hes_fireguy"}, + } }; elements.idk_idk_idk_fired_fired_bored_earth = { @@ -589,7 +665,10 @@ elements.fired_earth_oceanair = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "airlife_fired_earth": {elem2: "fired_earth_oceanair_airlife_fired_earth"}, + } }; elements.waterfired_fired_earthocean = { @@ -613,7 +692,10 @@ elements.oceanfire = { ], category: "sbmixup", hidden: true, - state: "liquid" + state: "liquid", + reactions: { + "fired_earth_oceanair_airlife_fired_earth": {elem2: "oceanfired_fired_earth_oceanairlife_fired_earth"}, + } }; elements.air_in_the_water = { @@ -650,4 +732,708 @@ elements.black_hole = { category: "sbmixup", hidden: true, state: "liquid" -}; \ No newline at end of file +}; + +// ver 2 + +elements.idk_airlife = { + color: ["#ffffff", "#b4c3cc", "#41c73a"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "fired_earth": {elem2: "idk_airlife_fired_earth"}, + } +}; + +elements.dusty_waterfired_fired_earthocean = { + color: ["#b3b3b3", "#0099ff", "#ff4800", "#4a281b", "#1c7894"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.infinite_water_lifehack = { + color: "#0095ff", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.aquaman = { + color: ["#ffbe4f", "#cf6e06", "#21cf06"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.fired_fired_earthoceanairlife = { + color: ["#ff4400", "#ff4400", "#47271b", "#22679c", "#91a4b3", "#5fc736"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.fired_earth_oceanair_airlife_fired_earth = { + color: ["#ff4d00", "#5c3929", "#1e5d87", "#9ba9b3", "#9ba9b3", "#46d136", "#ff4000", "#42c240"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.what_the_fuck = { + color: ["#7700ff", "#ff0000", "#ffff00"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.airlife_fired_fired_earth = { + color: ["#c1cdd9", "#ff4d00", "#ff4d00", "#5c3a2c"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.polluted_waterfired_fired_earthocean = { + color: ["#5f6e45", "#007bff", "#ff5100", "#ff5100", "#402519", "#25617a"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.a = { + color: "#8400ff", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "it_disappeared": {elem2: "no_vowel"} + } +}; + +elements.is_there_an_ocean = { + color: ["#ffffff", "#21578a"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.even_more_fired_earth = { + color: ["#ff3300", "#301812", "#ff3300", "#301812"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.we_put_out_the_fire = { + color: "#211c1b", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.my_name_is_air = { + color: ["#2a242e", "#c9d6d6"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.whos_that = { + color: ["#000000", "#ffffff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.dusty_waterair = { + color: ["#4d4d4d", "#008cff", "#afbbc4"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.maybe = { + color: ["#ffffff", "#000000"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.airfired_earth_earth = { + color: ["#bac3cc", "#ff3c00", "#472b20", "#472b20"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "idk_idk_idk_fired_fired_bored_earth": {elem2: "no"}, + } +}; + +elements.drink_water_in_a_plane = { + color: ["#ffffff", "#0095ff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.backrooms = { + color: ["#b39040", "#8a7a57", "#7a5c1b"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "no_ocean": {elem2: "level_7"}, + "fired_earth": {elem2: "level_101"}, + } +}; + +elements.airlife_even_more_fired_earth = { + color: ["#bcd0d1", "#4fc437", "#000000", "#ff3300", "#40221b"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.i_keep_reading_watermelon_instead_of_waterfired = { + color: "#ffffff", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.clone = { + color: ["#ffb700", "#dbcd02", "#d1ca62"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", + reactions: { + "waterfired_fired_earth": {elem2: "two_waterfired_fired_earth"}, + "infinite_water_lifehack": {elem2: "two_infinite_water_lifehack"}, + } +}; + +elements.waterfiredfired_fired_fired_earth_earth = { + color: ["#0091ff", "#ff4d00", "#ff4d00", "#ff4d00", "#ff4d00", "#422b21", "#422b21"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.only_fired_earth_and_air = { + color: ["#000000", "#ff4d00", "#42291e", "#a9bfc2"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.im_playing_this_in_discord = { + color: "#bfbf82", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.only_earth = { + color: "#42291e", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.two_waterfired_fired_earth = { + color: ["#ffffff", "#00a6ff", "#ff4d00", "#ff4d00", "#3d2920"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.minutes_craft = { + name: "5MinutesCraft", + color: ["#ffffff", "#fff000"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.ocean_waterair = { + color: ["#1e6d7d", "#0080ff", "#a9b5c2"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.something = { + color: "#877e91", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.no_wowel = { + color: "#c300ff", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.dusty_life_idk_idk_waterfired_fired_fired_fired_earthearthocean = { + color: ["#787878", "#48c742", "#ffffff", "#ffffff", "#006eff", "#ff3c00", "#ff3c00", "#ff3c00", "#ff3c00", "#45281f", "#45281f", "#204885"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.bir_d = { + color: "#82603c", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.still_no_water = { + color: ["#000000", "#007bff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.level7 = { + color: ["#9c894e", "#007bff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.ok_this_is_getting_ridiculous = { + color: "#170a00", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.fired_waterfired_fired_earth = { + color: ["#ff5500", "#0099ff", "#ff5100", "#ff5100", "#38231a"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.oceanfired_fired_earth_oceanairlife_fired_earth = { + color: ["#265375", "#ff3c00", "#ff3c00", "#573226", "#24478a", "#abbcc7", "#3bba32", "#ff4000", "#5c3629"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.level101 = { + color: ["#947f48", "#33572c"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.oceanoceanairlife = { + color: ["#264d7a", "#264d7a", "#c1c9d4", "#4dc742"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.waterfired_oceanairlife_fired_earth = { + color: ["#007bff", "#ff3c00", "#254785", "#9aa4b5", "#46b837", "#ff5100", "#593829"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.also_gone = { + color: "#000000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.waterphobia = { + color: ["#000000", "#0091ff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.two_infinite_water_lifehack = { + color: ["#ffffff", "#0091ff"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.no = { + color: "#000000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.uhm_there_is_no_water_in_the_plane = { + color: ["#000000", "#0091ff", "#d9d9d9"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.death = { + color: "#1a1818", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.dusty_airlife = { + color: ["#6e6e6e", "#bec7cf", "#57bf34"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.go_drink_oceanairlife = { + color: ["#ffffff", "#245280", "#bec6cf", "#43bf37"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.firefighter = { + color: "#c95c40", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.erm_actually_hes_fireguy = { + color: ["#ffffff", "#c9ae40", "#c95c40"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.nothing_at_all = { + color: "#000000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.or_did_it = { + color: "#21201a", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.idk_airlife_fired_earth = { + color: ["#ffffff", "#bbc4c9", "#55c23a", "#ff3700", "#59382e"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.theres_no_water_but_theres_fired_earth = { + color: ["#ffffff", "#00a2ff", "#000000", "#ff2f00", "#4f2a21"], + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; + +elements.theres_more = { + color: "#1a0000", + behavior: [ + "SW%33|SW%33|SW%33", + "M2|XX|M2", + "M1|M1|M1", + ], + category: "sbmixup", + hidden: true, + state: "liquid", +}; From 417c17622ee18e45742e321959a44b28e9f23e85 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername Date: Wed, 24 Jan 2024 12:51:15 -0500 Subject: [PATCH 06/28] logic mod + fixes --- mods/logicgates.js | 291 ++++++++++++++++++++++++++++++++++++++++++ mods/nousersthings.js | 4 +- 2 files changed, 294 insertions(+), 1 deletion(-) create mode 100644 mods/logicgates.js diff --git a/mods/logicgates.js b/mods/logicgates.js new file mode 100644 index 00000000..50fd527c --- /dev/null +++ b/mods/logicgates.js @@ -0,0 +1,291 @@ +elements.output = { + color: "#601616", + category: "logic", + state: "solid", + behavior: behaviors.WALL, + conduct: 1, + tick: function(pixel){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true) && pixel.charged) { + if (pixelMap[x][y].element == "logic_wire" && pixelMap[x][y].lstate == 0){ + if (pixelMap[x][y].lastUpdate == pixelTicks){ + pixelMap[x][y].lstate = 2 + pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#ffe49c") + } else { + pixelMap[x][y].lstate = 1 + } + } + } + } + } +} +elements.logic_wire = { + color: "#3d4d2c", + behavior: behaviors.WALL, + state: "solid", + category: "logic", + tick: function (pixel){ // -2 uncharge spread -1 uncharge buffer 0 uncharged 1 charge buffer 2 charge spread + pixel.lastUpdate = pixelTicks + if (!pixel.lstate){ + pixel.lstate = 0 + } + if (pixel.lstate == 0){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if (pixelMap[x][y].element == "output" && pixelMap[x][y].charge == 1){ + pixel.lstate == 2; + pixel.color = pixelColorPick(pixel, "#ffe49c"); + } + } + } + } + if (pixel.lstate == 2){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if (pixelMap[x][y].element == "logic_wire" && pixelMap[x][y].lstate == 0){ + if (pixelMap[x][y].lastUpdate == pixelTicks){ + pixelMap[x][y].lstate = 2 + pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#ffe49c") + } else { + pixelMap[x][y].lstate = 1 + } + } else if (pixelMap[x][y].element == "output" && pixelMap[x][y].charged == 0){ + pixel.lstate = -2 + pixel.color = pixelColorPick(pixel, "#3d4d2c") + } + } + } + } + if (pixel.lstate == 1){ + pixel.lstate = 2 + pixel.color = pixelColorPick(pixel, "#ffe49c"); + } + if (pixel.lstate == -2){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if (pixelMap[x][y].element == "logic_wire" && (pixelMap[x][y].lstate == 1 || pixelMap[x][y].lstate == 2)){ + if (pixelMap[x][y].lastUpdate == pixelTicks){ + pixelMap[x][y].lstate = -2 + pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#3d4d2c") + } else { + pixelMap[x][y].lstate = -1 + } + } + } + } + pixel.lstate = 0 + } + if (pixel.lstate == -1){ + pixel.lstate = -2 + pixel.color = pixelColorPick(pixel, "#3d4d2c"); + } + } +} +function countNeighbors(){ + var results = { + "charged": 0, + "uncharged": 0, + } + for (var i = 0; i < squareCoords.length; i++) { + var coord = squareCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y, true)) { + var otherPixel = pixelMap[x][y]; + if (otherPixel.element == "logic_wire"){ + if (otherPixel.lstate){ + results.charged = results.charged + 1; + } else { + results.uncharged = results.uncharged + 1; + } + } + } + } + return results; +} +function chargeOutputs(){ + for (var i = 0; i < squareCoords.length; i++) { + var coord = squareCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y, true)) { + var otherPixel = pixelMap[x][y]; + if (otherPixel.element == "output"){ + otherPixel.charged = 1; + } + } + } +} +function unchargeOutputs(){ + for (var i = 0; i < squareCoords.length; i++) { + var coord = squareCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y, true)) { + var otherPixel = pixelMap[x][y]; + if (otherPixel.element == "output"){ + otherPixel.charged = 0; + } + } + } +} +elements.not_gate = { + color: "#4a1b18", + category: "logic", + state: "solid", + behavior: behaviors.WALL, + tick: function(pixel){ + var countNeighborsResult = countNeighbors() + if (countNeighborsResult.charged == 0){ + chargeOutputs(); + } else { + unchargeOutputs(); + } + } +} +elements.and_gate = { + color: "#184a23", + category: "logic", + state: "solid", + behavior: behaviors.WALL, + tick: function(pixel){ + var countNeighborsResult = countNeighbors() + if (countNeighborsResult.uncharged == 0){ + chargeOutputs(); + } else { + unchargeOutputs(); + } + } +} +elements.xor_gate = { + color: "#30184a", + category: "logic", + state: "solid", + behavior: behaviors.WALL, + tick: function(pixel){ + var countNeighborsResult = countNeighbors() + if (countNeighborsResult.charged == 1){ + chargeOutputs(); + } else { + unchargeOutputs(); + } + } +} +elements.or_gate = { + color: "#4a4018", + category: "logic", + state: "solid", + behavior: behaviors.WALL, + tick: function(pixel){ + var countNeighborsResult = countNeighbors() + if (countNeighborsResult.charged >= 1){ + chargeOutputs(); + } else { + unchargeOutputs(); + } + } +} +elements.E2L_lever = { + color: "#b2ba75", + behavior: behaviors.WALL, + state: "solid", + category: "logic", + tick: function(pixel){ + if (pixel.start === pixelTicks){ + pixel.cooldown = 0; + pixel.toggleMode = 1; + } + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if ((pixelMap[x][y].charge || pixelMap[x][y].chargeCD) && pixel.cooldown == 0){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if (pixelMap[x][y].element == "logic_wire"){ + if (pixel.toggleMode == 1){ + pixelMap[x][y].lstate = 2 + pixelMap[x][y].color = pixelColorPick(pixel, "#ffe49c"); + } else { + pixelMap[x][y].lstate = -2 + pixelMap[x][y].color = pixelColorPick(pixel, "#3d4d2c"); + } + } + } + } + pixel.cooldown = 15 + if (pixel.toggleMode){ + pixel.toggleMode = 0; + } else { + pixel.toggleMode = 1; + } + } + } + } + if (pixel.cooldown){ + pixel.cooldown = pixel.cooldown - 1 + } + } +} +elements.E2L_button = { + color: "#b2ba75", + behavior: behaviors.WALL, + state: "solid", + category: "logic", + tick: function(pixel){ + if (pixel.start === pixelTicks){ + pixel.cooldown = 0; + pixel.toggleMode = 1; + } + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if ((pixelMap[x][y].charge || pixelMap[x][y].chargeCD) && pixel.cooldown == 0){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if (pixelMap[x][y].element == "logic_wire"){ + if (pixel.toggleMode == 1){ + pixelMap[x][y].lstate = 2 + pixelMap[x][y].color = pixelColorPick(pixel, "#ffe49c"); + } else { + pixelMap[x][y].lstate = -2 + pixelMap[x][y].color = pixelColorPick(pixel, "#3d4d2c"); + } + } + } + } + pixel.cooldown = 5 + if (pixel.toggleMode){ + pixel.toggleMode = 0; + } else { + pixel.toggleMode = 1; + } + } + } + } + if (pixel.cooldown){ + pixel.cooldown = pixel.cooldown - 1 + } + } +} \ No newline at end of file diff --git a/mods/nousersthings.js b/mods/nousersthings.js index fda04d62..5fc77088 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -1527,6 +1527,8 @@ elements.invisiblewall = { } }, category: "solids", + movable: false, + noMix: true, }, elements.bismuth = { color: ["#818181","#989898","#b0b0b0","#c9c9c9"], @@ -2013,7 +2015,7 @@ elements.element_filler = { onSelect: function() { var answer6 = prompt("Please input the desired element of this filler. It will not work if you do multiple filter types while paused.",(elemfillerVar||undefined)); if (!answer6) { return } - elemfillerVar = answer6; + elemfillerVar = mostSimilarElement(answer6); }, tick: function(pixel){ var neighbors = 0; From 341c25fee8167dc0096a45e479ddb3ecf1f244d9 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername Date: Wed, 24 Jan 2024 13:32:08 -0500 Subject: [PATCH 07/28] me when t he logic again --- mods/logicgates.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/mods/logicgates.js b/mods/logicgates.js index 50fd527c..0eca9be3 100644 --- a/mods/logicgates.js +++ b/mods/logicgates.js @@ -288,4 +288,46 @@ elements.E2L_button = { pixel.cooldown = pixel.cooldown - 1 } } +} +elements.L2E_constant = { + color: "#b2ba75", + behavior: behaviors.WALL, + state: "solid", + category: "logic", + tick: function(pixel){ + var foundOn = false; + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if (pixelMap[x][y].element == "logic_wire" && pixelMap[x][y].lstate){ + foundOn = true; + } + } + } + if (foundOn){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if (elements[pixelMap[x][y].element].conduct){ + pixelMap[x][y].charge = 1 + } + } + } + } else { + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = adjacentCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y,true)) { + if (elements[pixelMap[x][y].element].conduct){ + pixelMap[x][y].charge = 0 + } + } + } + } + } } \ No newline at end of file From 3098dcba7dc7184ce72408e8e38865feac4c11d1 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername Date: Wed, 24 Jan 2024 14:22:47 -0500 Subject: [PATCH 08/28] the logical wifi --- mods/logicgates.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/mods/logicgates.js b/mods/logicgates.js index 0eca9be3..1f2f83d9 100644 --- a/mods/logicgates.js +++ b/mods/logicgates.js @@ -330,4 +330,63 @@ elements.L2E_constant = { } } } +} +var transmitterVar = 0; +elements.logic_transmitter = { + onSelect: function() { + var answertransmitter = prompt("Please input the desired element of this filter. It will not work if you do multiple filter types while paused.",(transmitterVar||undefined)); + if (!answertransmitter) { return } + transmitterVar = answertransmitter; + }, + color: "#c26994", + state: "solid", + behavior: behaviors.WALL, + category: "logic", + tick: function(pixel){ + var neighborResult = countNeighbors(); + if (pixel.start === pixelTicks){ + pixel.channel = transmitterVar; + } + var receivers = currentPixels.filter(function(pixelToCheck) { + return ( + pixelToCheck !== pixel && //should work if this pixel is the same as the other one by reference + pixelToCheck.element == "logic_receiver" && + pixelToCheck.channel == pixel.channel + ); + }).map(pixel => [pixel.x,pixel.y]); + for(var i in receivers) { + i = parseInt(i); + var wifiCoords = receivers[i]; + var newPixel = pixelMap[wifiCoords[0]]?.[wifiCoords[1]]; + if(newPixel) { + if (neighborResult.charged){ + for(var j in adjacentCoords) { + j = parseInt(j); + var pixelAdjacentToWifi = pixelMap[newPixel.x+adjacentCoords[j][0]]?.[newPixel.y+adjacentCoords[j][1]]; + if(pixelAdjacentToWifi && pixelAdjacentToWifi.element == "logic_wire") { pixelAdjacentToWifi.lstate = 2 }; + }; + } else { + for(var j in adjacentCoords) { + j = parseInt(j); + var pixelAdjacentToWifi = pixelMap[newPixel.x+adjacentCoords[j][0]]?.[newPixel.y+adjacentCoords[j][1]]; + if(pixelAdjacentToWifi && pixelAdjacentToWifi.element == "logic_wire") { pixelAdjacentToWifi.lstate = -2 }; + }; + } + } + }; + } +} +elements.logic_receiver = { + onSelect: function() { + var answertransmitter = prompt("Please input the desired element of this filter. It will not work if you do multiple filter types while paused.",(transmitterVar||undefined)); + if (!answertransmitter) { return } + transmitterVar = answertransmitter; + }, + color: "#69c2ba", + behavior: behaviors.WALL, + state: "solid", + category: "logic", + tick: function(pixel){ + if (pixel.start === pixelTicks){pixel.channel = transmitterVar} + } } \ No newline at end of file From 6eeec2f3c8c6978db488b6871fa21829c627df4d Mon Sep 17 00:00:00 2001 From: JustAGenericUsername Date: Wed, 24 Jan 2024 14:33:56 -0500 Subject: [PATCH 09/28] logical fix --- mods/logicgates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/logicgates.js b/mods/logicgates.js index 1f2f83d9..3d545a45 100644 --- a/mods/logicgates.js +++ b/mods/logicgates.js @@ -301,7 +301,7 @@ elements.L2E_constant = { var x = pixel.x+coord[0]; var y = pixel.y+coord[1]; if (!isEmpty(x,y,true)) { - if (pixelMap[x][y].element == "logic_wire" && pixelMap[x][y].lstate){ + if (pixelMap[x][y].element == "logic_wire" && pixelMap[x][y].lstate > 0){ foundOn = true; } } From 6b9fc806ab4c19900b928887d2bf3b609a01b056 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername Date: Wed, 24 Jan 2024 14:41:50 -0500 Subject: [PATCH 10/28] hhhhhhhhhhhhhhhhhhhhhh --- mods/logicgates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/logicgates.js b/mods/logicgates.js index 3d545a45..c3002c58 100644 --- a/mods/logicgates.js +++ b/mods/logicgates.js @@ -105,7 +105,7 @@ function countNeighbors(){ if (!isEmpty(x,y, true)) { var otherPixel = pixelMap[x][y]; if (otherPixel.element == "logic_wire"){ - if (otherPixel.lstate){ + if (otherPixel.lstate > 0){ results.charged = results.charged + 1; } else { results.uncharged = results.uncharged + 1; From 50c1b4a128e841e634a88e5c959128fa04cd5299 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Wed, 24 Jan 2024 19:26:50 -0500 Subject: [PATCH 11/28] Update mod-list.html --- mod-list.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod-list.html b/mod-list.html index d0c8854f..3cc4c843 100644 --- a/mod-list.html +++ b/mod-list.html @@ -181,6 +181,7 @@ conveyance.jsConveyors, operated with and without electricityMelecie flipflop.jsToggleable switches; ExplanationFlix gameOfLife.jsConway's Game of Life on a screenggod +logicgates.jsAdds predictable electricity and logic gatesnousernamefound note_block.jsAdds musical Note BlocksAlice nousersthings.jsDestroyable machines, pipe variants, filters, and morenousernamefound portal.jsAdds portals that can teleport pixelsAlice @@ -197,6 +198,7 @@ liquid_void.jsAdds a liquid variant of VoidAlice more_breaking.jsAllows for breaking more elements in explosionsAlice rays.jsAdds more Ray typesAlice +weapons.jsAdds some extra weaponsJayd-Rubies Food & Cooking aChefsDream.jsAdds more food and animalsSquareScreamYT and RealerRaddler @@ -207,6 +209,7 @@ morefoodsmod.jsAdds more foodsClide4 pizzasstuff.jsNew animals, foods, and plants_ilikepizza_ sbstuff.jsAdds many foodsStefan Blox +weAllScreamFor.jsAdds ice cream toppingsrottenEgghead Life & Nature aChefsDream.jsAdds more food and animalsSquareScreamYT and RealerRaddler @@ -226,6 +229,7 @@ mobs.jsAdds Creepers, Zombies, and SkeletonsAlice nocancer.jsRemoves cancer from the game one tick after it is createdmollthecoder nocancer2.jsRemoves cancer from the game altogether. May be incompatible with other mods that spawn cancermollthecoder +nograssgrow.jsPrevents Grass from growingmollthecoder obsidian.jsAdds ObsidianJayd pizzasstuff.jsNew animals, foods, and plants_ilikepizza_ primordial_birthpool.jsA cross between Primordial Soup and Birthpool. Requires F&MAlice @@ -252,10 +256,11 @@ musicalfruit.jsHumans get gas from eating Beansmollthecoder random_elems.jsCurated randomly generated elementsAlice random_liquids.jsRandomly generates liquids on game loadAlice +sbmixup.jsAdds silly elements from a Mix-Up! gameStefan Blox +star_wars.jsAdds various items from Star Wars by DisneySeaPickle754 sus.jsAdds an Among Us crewmateNv7 triggerable_random_powders.jsAdds powders with different abilities, such as heating and coolingAlice troll.jsAdds various dumb elements that iterate randomly on the entire screenAlice -star_wars.jsAdds various items from Star Wars by DisneySeaPickle754 Visual Effects acid_and_shapes.jsWeird visual effects. Enable in SettingsAlice From e87dfbf3681343d5da0f230f30374a6b6975451f Mon Sep 17 00:00:00 2001 From: Jayd-Rubies <155784127+Jayd-Rubies@users.noreply.github.com> Date: Wed, 24 Jan 2024 21:08:01 -0500 Subject: [PATCH 12/28] weapons.js update add cluster munitions --- mods/weapons.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mods/weapons.js b/mods/weapons.js index dfb8ed94..88f77107 100644 --- a/mods/weapons.js +++ b/mods/weapons.js @@ -85,4 +85,15 @@ elements.right_missile = { "M2|M1 AND EX:10|M2", ], category:"weapons", +}, + elements.cluster_munition = { + color: "#444444", + behavior: [ + "XX|EX:10>smoke,smoke,smoke,smoke,bomb,bomb|XX", + "XX|XX|XX", + "M2|M1 AND EX:10>smoke,smoke,smoke,smoke,bomb,cluster_munition|M2", + ], + category: "weapons", + state: "solid", + density: 1300, }; \ No newline at end of file From cf63da81bbebbb9c147aff01c64c2f8f1107073c Mon Sep 17 00:00:00 2001 From: JustAGenericUsername Date: Wed, 24 Jan 2024 21:08:23 -0500 Subject: [PATCH 13/28] gate --- mods/logicgates.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/mods/logicgates.js b/mods/logicgates.js index c3002c58..13d1b5e2 100644 --- a/mods/logicgates.js +++ b/mods/logicgates.js @@ -197,6 +197,48 @@ elements.or_gate = { } } } +elements.nand_gate = { + color: "#eb4034", + category: "logic", + state: "solid", + behavior: behaviors.WALL, + tick: function(pixel){ + var countNeighborsResult = countNeighbors() + if (countNeighborsResult.uncharged){ + chargeOutputs(); + } else { + unchargeOutputs(); + } + } +} +elements.nor_gate = { + color: "#eb8c34", + category: "logic", + state: "solid", + behavior: behaviors.WALL, + tick: function(pixel){ + var countNeighborsResult = countNeighbors() + if (!countNeighborsResult.charged){ + chargeOutputs(); + } else { + unchargeOutputs(); + } + } +} +elements.nxor_gate = { + color: "#ebd834", + category: "logic", + state: "solid", + behavior: behaviors.WALL, + tick: function(pixel){ + var countNeighborsResult = countNeighbors() + if (!(countNeighborsResult.charged == 1)){ + chargeOutputs(); + } else { + unchargeOutputs(); + } + } +} elements.E2L_lever = { color: "#b2ba75", behavior: behaviors.WALL, From 69cf2a5e6361521a1496b6d565c60308ad117c40 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:35:57 -0500 Subject: [PATCH 14/28] new helper functions and super-spicy elements wall bomb, grand torch, holy fire, god slayer fire also brimstone slag --- mods/a_mod_by_alice.js | 340 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 332 insertions(+), 8 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index b86c810f..1be8f54e 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -26,7 +26,7 @@ try { return Object.keys(object).find(key => object[key] === value); }; - //R.N.G. + //RNG //Random integer from 0 to n function randomIntegerFromZeroToValue(value) { @@ -47,6 +47,11 @@ try { return array[randomIndex]; }; + //Random 1 or -1 + function randomSign() { + return Math.random() < 0.5 ? 1 : -1 + }; + //Random integer from m to n function randomIntegerBetweenTwoValues(min,max) { if(min > max) { @@ -1322,6 +1327,12 @@ try { }; //Pixels + + function tryMoveAndReturnBlockingPixel(pixel,nx,ny,leaveBehind,force) { + if(outOfBounds(nx,ny)) { return false }; + if(isEmpty(nx,ny,false)) { return tryMove(pixel,nx,ny,leaveBehind,force) }; + return pixelMap[nx][ny] + }; function exposedToAir(pixel) { return (isEmpty(pixel.x+1,pixel.y) || isEmpty(pixel.x-1,pixel.y) || isEmpty(pixel.x,pixel.y+1) || isEmpty(pixel.x,pixel.y-1)); @@ -1845,6 +1856,32 @@ try { return true; }; + //Melt pixel + function meltPixel(pixel,changetemp=true) { + var info = elements[pixel.element]; + var result = info.stateHigh; + if (!result) { + return false + }; + if(result instanceof Array) { + result = result.filter(elementExists); + if(result.length == 0) { + return false; + }; + } else { + if(!(elementExists(result))) { + return false; + }; + }; + + while(result instanceof Array) { + result = randomChoice(result); + }; + + changePixel(pixel,result,changetemp); + return true; + }; + //Logic function xor(c1,c2) { @@ -3465,6 +3502,9 @@ color1 and color2 spread through striped paint like dye does with itself. col if(typeof(beforeFunction) === "function") { beforeFunction(pixel,x,y,radius,fire,smoke,power,damage); }; + if(!pixel || pixel.del || typeof(pixel) == "undefined" || isEmpty(coords[i].x,coords[x].y)) { + continue + }; if (info.hardness) { // lower damage depending on hardness(0-1) if (info.hardness < 1) { damage = damage * ((1 - info.hardness)*10); @@ -3948,6 +3988,145 @@ color1 and color2 spread through striped paint like dye does with itself. col stain: 0.075, }; + elements.holy_fire = { + color: ["#FFFF96","#FFBF49","#CE743B"], //placeholder + tick: function(pixel) { + + var moveResult = tryMoveAndReturnBlockingPixel(pixel,pixel.x + randomSign(),pixel.y - 1); + var blockingPixels = []; + var secondMoveResult = null; + + if(typeof(moveResult) == "object" && !(elements[pixel.element].ignore.concat(pixel.element).includes(moveResult.element))) { + blockingPixels.push(moveResult) + }; + + //if move1Result = true then nothing else happens + + if(moveResult !== true) { + var coords = randomChoice([[-1,0],[0,1],[1,0]]).map(offsetPair => addArraysInPairs(offsetPair,[pixel.x,pixel.y])); + secondMoveResult = tryMoveAndReturnBlockingPixel(pixel,...coords); + + if(typeof(secondMoveResult) == "object" && !(elements[pixel.element].ignore.concat(pixel.element).includes(secondMoveResult.element))) { + blockingPixels.push(secondMoveResult) + }; + }; + + if(blockingPixels.length > 0) { + blockingPixels.forEach(function(pixel) { + var blessRxn = elements.bless.reactions[pixel.element]; + if(typeof(blessRxn) == "object") { + var elem2 = blessRxn.elem2; + if(elem2 !== null) { + while(Array.isArray(elem2)) { elem2 = randomChoice(elem2) }; + changePixel(pixel,elem2) + } + }; + var value = Math.random(); + if(value < 0.01) { + if(pixel.burnInto) { + finishBurn(pixel) + } else { + changePixel(pixel,randomChoice(["ash","ash","light"])) + } + } else if(value < 0.20) { + pixel.burning = true; + pixel.burnStart ??= pixelTicks; + } else if(value < 0.205) { + changePixel(pixel,randomChoice(["ash","ash","light"])) + } else { + pixel.temp += 10; pixelTempCheck(pixel) + }; + return + }) + }; + + doDefaults(pixel); + }, + temp:6000, + tempLow:1000, + stateLow: ["bless","fire"], + category: "energy", + burning: true, + fireElement: ["bless","plasma"], + ignore: ["ash","light","bless","plasma","wall"], + state: "gas", + density: 0.08, + ignoreAir: true + }; + + elements.god_slayer_fire = { + color: ["#FFBACE","#FC6DCA","#9954B0"], + tick: function(pixel) { + + var moveResult = tryMoveAndReturnBlockingPixel(pixel,pixel.x + randomSign(),pixel.y - 1); + var blockingPixels = []; + var secondMoveResult = null; + + if(typeof(moveResult) == "object" && !(elements[pixel.element].ignore.concat(pixel.element).includes(moveResult.element))) { + blockingPixels.push(moveResult) + }; + + //if move1Result = true then nothing else happens + + if(moveResult !== true) { + var coords = randomChoice([[-1,0],[0,1],[1,0]]).map(offsetPair => addArraysInPairs(offsetPair,[pixel.x,pixel.y])); + secondMoveResult = tryMoveAndReturnBlockingPixel(pixel,...coords); + + if(typeof(secondMoveResult) == "object" && !(elements[pixel.element].ignore.concat(pixel.element).includes(secondMoveResult.element))) { + blockingPixels.push(secondMoveResult) + }; + }; + + if(blockingPixels.length > 0) { + blockingPixels.forEach(function(pixel) { + var value = Math.random(); + var randomDefaultResult = randomChoice(["ash","slag","plasma"]); + var oldTemp = pixel.temp; + if(value < 0.03) { + if(pixel.stateHigh) { + meltPixel(pixel); + } + } else if(value < 0.06) { + if(pixel.burnInto) { + finishBurn(pixel); + } else { + changePixel(pixel,randomDefaultResult) + } + } else if(value < 0.09) { + if(pixel.breakInto) { + breakPixel(pixel); + } else { + changePixel(pixel,randomDefaultResult) + } + } else if(value < 0.24) { + pixel.burning = true; + pixel.burnStart ??= pixelTicks; + } else if(value < 0.245) { + changePixel(pixel,randomDefaultResult) + } else { + pixel.temp += 25; pixelTempCheck(pixel) + }; + if(pixel) { + pixel.temp = Math.max(oldTemp,pixel.temp) + }; + return + }) + }; + + doDefaults(pixel); + }, + temp:10000, + tempLow:1500, + stateLow: ["explosion","fire","fire","fire","fire","fire","fire","fire"], + category: "energy", + ignore: ["ash","slag","wall","plasma"], + burning: true, + fireElement: ["plasma"], + state: "gas", + density: 0.07, + ignoreAir: true + }; + elements.cold_torch = { "color": "#4394d6", "behavior": [ @@ -3977,6 +4156,47 @@ color1 and color2 spread through striped paint like dye does with itself. col "stateHigh": "wood", }; + elements.grand_torch = { + "color": "#FFBF2F", + "tick": function(pixel) { + var coords = circleCoords(pixel.x,pixel.y,2).concat([[-1,-2],[1,-2],[-1,2],[1,2],[-2,-1],[2,-1],[-2,1],[2,1],[-1,-3],[0,-3],[1,-3],[0,-4],[0,-5]].map( + function(offsets) { + return {x: offsets[0]+pixel.x, y: offsets[1]+pixel.y} + } + )); + for(var i = 0; i < coords.length; i++) { + var coordPair = coords[i]; + if(outOfBounds(coordPair.x,coordPair.y)) { continue }; + if(coordPair.x == pixel.x && coordPair.y == pixel.y) { continue }; + if(!(isEmpty(coordPair.x,coordPair.y))) { continue }; + var newPixel = tryCreatePixelReturn("fire",coordPair.x,coordPair.y); + if(typeof(newPixel) == "object") { + newPixel.temp = 1500 + } + }; + }, + "reactions": { + "water": { "elem1": "torch", chance: 0.01 }, + "sugar_water": { "elem1": "torch", chance: 0.01 }, + "salt_water": { "elem1": "torch", chance: 0.01 }, + "seltzer": { "elem1": "torch", chance: 0.01 }, + "dirty_water": { "elem1": "torch", chance: 0.01 }, + "pool_water": { "elem1": "torch", chance: 0.01 }, + "steam": { "elem1": "wood", chance: 0.01 }, + "smog": { "elem1": "wood", chance: 0.01 }, + "rain_cloud": { "elem1": "wood", chance: 0.01 }, + "cloud": { "elem1": "wood", chance: 0.01 }, + "snow_cloud": { "elem1": "wood", chance: 0.01 }, + "hail_cloud": { "elem1": "wood", chance: 0.01 }, + "black_damp": { "elem1": "wood", chance: 0.02 } + }, + "temp": 1500, + "category": "special", + "breakInto": "charcoal", + "tempLow": 900, + "stateLow": "torch", + }; + elements.plasma_torch = { "color": "#86579c", "tick": function(pixel) { @@ -4126,7 +4346,7 @@ color1 and color2 spread through striped paint like dye does with itself. col burn: 300, burnTime: 500, temp: airTemp, - }, + }; elements.hypernapalm = { name: "h y p e r n a p a l m", //HYPERNAPALM @@ -4146,7 +4366,7 @@ color1 and color2 spread through striped paint like dye does with itself. col burnTempChange: 30, burn: 300, burnTime: 500, - }, + }; elements.cold_napalm = { color: "#3e87e0", @@ -4164,7 +4384,7 @@ color1 and color2 spread through striped paint like dye does with itself. col fireElement: "cold_fire", burnTempChange: -1, burnInto: "cold_fire", - } + }; elements.rad_napalm = { color: "#cdf760", @@ -4183,8 +4403,8 @@ color1 and color2 spread through striped paint like dye does with itself. col fireElement: "rad_fire", temp: airTemp, burnInto: "rad_fire", - }, - + }; + runAfterLoad(function() { if(eLists.spout) { eLists.spout.push("cold_torch"); @@ -7690,6 +7910,56 @@ color1 and color2 spread through striped paint like dye does with itself. col hardness: 0.7, } + elements.brimstone_slag = { + color: ["#745B57","#534D4A","#463F53","#51113E","#6D283B","#BC4949","#EA9B4E"], + properties: { + needsOffset: true + }, + colorPattern: [ + "FGGFGFGGF", + "FFGFGFFGG", + "DEEDEEDEE", + "DEDEEEEED", + "BDCBACDCB", + "BCADCDDBB", + "ABBCAABCC" + ], + colorKey: { + "A": "#745B57", + "B": "#534D4A", + "C": "#463F53", + "D": "#51113E", + "E": "#6D283B", + "F": "#BC4949", + "G": "#EA9B4E", + }, + behavior: behaviors.POWDER, + hardness: 0.5, + enableOffsetsOnTextureColors: true, + breakInto: ["slag","sulfur"], + tempHigh: 1780, + state: "solid", + category: "solids", + tick: function(pixel) { + if(pixel.needsOffset) { + var offset = (elements[pixel.element].maxColorOffset ?? 15); + offset = randomIntegerFromZeroToValue(offset) * (Math.random() < 0.5 ? -1 : 1); + pixel.color = convertColorFormats(pixel.color,"json"); + for(var k in pixel.color) { pixel.color[k] += offset }; + pixel.color = convertColorFormats(pixel.color,"rgb"); + delete pixel.needsOffset; + return + } + } + }; + + elements.molten_slag ??= {}; + elements.molten_slag.reactions ??= {}; + + elements.molten_slag.reactions.sulfur = elements.molten_slag.reactions.molten_sulfur = elements.molten_slag.reactions.sulfur_gas = elements.molten_sulfur.reactions.slag = elements.sulfur.reactions.molten_slag = { elem1: "brimstone_slag", elem2: null }; + + elements.slag.tempHigh = 1780; + var temp = "firesea,lektre,concoction,mistake,unstable_mistake,toxic_mistake".split(","); for(var i = 0; i < temp.length; i++) { temp[i].state = "liquid"; @@ -7716,7 +7986,7 @@ color1 and color2 spread through striped paint like dye does with itself. col var oY = adjacentCoords[i][1]; var fX = pX+oX; var fY = pY+oY; - if(!isEmpty(fX,fY,true)) { + if(!isEmpty(fX,fY,true)) { //7989 yay soshi! var checkPixel = pixelMap[fX][fY]; var otherElement = elements[checkPixel.element]; if (typeof(otherElement.cutInto) !== "undefined") { @@ -7986,7 +8256,7 @@ color1 and color2 spread through striped paint like dye does with itself. col var baseJSON = convertColorFormats(baseColor,"json"); var dyeJSON = convertColorFormats(dyeColor,"json"); var dyedColor = multiplyColors(dyeJSON,baseJSON,"json"); - //70% multiplied //7989 yay soshi! + //70% multiplied var semiDyedColor = averageColorObjects(dyedColor,baseJSON,0.7); //35% dye color, 65% result var finalColor = averageColorObjects(semiDyedColor,dyeJSON,0.65); @@ -34891,6 +35161,58 @@ Make sure to save your command in a file if you want to add this preset again.` pixel.temp += (800 * ((1 + (7 * damage)) ** 2) * ((power ** 2) * 1.5)); }; + //explodeAtPlus(x,y,radius,fire="fire",smoke="smoke",beforeFunction=null,afterFunction=null,changeTemp=true) { + //beforeFunction(pixel,x,y,radius,fire,smoke,power,damage) + function wallBombBeforeFunction(pixel,x,y,radius,fire,smoke,power,damage) { + var hardness = (elements[pixel.element].hardness ?? 0) / 2; + damage = damage * ((1 - hardness)*10); + //console.log(damage); + if(damage > 0.25) { + pixel.breakInto ? breakPixel(pixel) : deletePixel(pixel.x,pixel.y) + }; + return + }; + + elements.wall_bomb = { + color: "#af8f8f", + tick: function(pixel) { + doDefaults(pixel); + if(!isEmpty(pixel.x,pixel.y-1,true)) { //[0][1] EX (ignore bounds) + var newPixel = pixelMap[pixel.x][pixel.y-1]; + var newElement = newPixel.element; + var newInfo = elements[newElement]; + if(newInfo.state !== "gas" && newElement !== pixel.element) { + explodeAtPlus(pixel.x,pixel.y,10,"fire","smoke",wallBombBeforeFunction,null,false); + if(pixel) { deletePixel(pixel.x,pixel.y) }; + return + }; + }; + if(!isEmpty(pixel.x,pixel.y+1,true)) { //[2][1] EX (don't ignore bounds, non-bound case) + var newPixel = pixelMap[pixel.x][pixel.y+1]; + var newElement = newPixel.element; + var newInfo = elements[newElement]; + if(newInfo.state !== "gas" && newElement !== pixel.element) { + explodeAtPlus(pixel.x,pixel.y,10,"fire","smoke",wallBombBeforeFunction,null,false); + if(pixel) { deletePixel(pixel.x,pixel.y) }; + return + }; + }; + if(outOfBounds(pixel.x,pixel.y+1)) { //[2][1] EX (don't ignore bounds, bound case) + explodeAtPlus(pixel.x,pixel.y,10,"fire","smoke",wallBombBeforeFunction,null,false); + if(pixel) { deletePixel(pixel.x,pixel.y) }; + return + }; + if(!tryMove(pixel,pixel.x,pixel.y+1)) { //behaviors.POWDER + Math.random() < 0.5 ? tryMove(pixel,pixel.x-1,pixel.y+1) : tryMove(pixel,pixel.x+1,pixel.y+1); + }; + }, + category: "weapons", + state: "solid", + density: 3000, + excludeRandom: true, + }; + + function empCharge(pixel,x,y,radius,fire,smoke,power,damage) { var info = elements[pixel.element]; if(info.conduct) { @@ -35713,6 +36035,8 @@ Make sure to save your command in a file if you want to add this preset again.` excludeRandom: true, hardness: 0.3, }; + + //Wall bomb elements.electric_cluster_bomb = { color: "#ffffff", From 90e39e51abd5ddd82db316ec0b20d57faf1f5bee Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Thu, 25 Jan 2024 00:07:59 -0500 Subject: [PATCH 15/28] grand plasma torch --- mods/a_mod_by_alice.js | 135 ++++++++++++++++++++++++++++++++--------- 1 file changed, 105 insertions(+), 30 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 1be8f54e..654afffe 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -4045,8 +4045,11 @@ color1 and color2 spread through striped paint like dye does with itself. col temp:6000, tempLow:1000, stateLow: ["bless","fire"], + burnInto: ["bless","fire"], category: "energy", burning: true, + burnTime: 500, + burnTempChange: 8, fireElement: ["bless","plasma"], ignore: ["ash","light","bless","plasma","wall"], state: "gas", @@ -4054,6 +4057,20 @@ color1 and color2 spread through striped paint like dye does with itself. col ignoreAir: true }; + elements.plasma_explosion = { + color: ["#c78fff","#ea8fff","#be8fff"], + tick: function(pixel) { + explodeAtPlus(pixel.x,pixel.y,10,"plasma","fire"); + return + }, + temp: 6500, + category: "energy", + state: "gas", + density: 1000, + excludeRandom: true, + noMix: true + }; + elements.god_slayer_fire = { color: ["#FFBACE","#FC6DCA","#9954B0"], tick: function(pixel) { @@ -4117,10 +4134,13 @@ color1 and color2 spread through striped paint like dye does with itself. col }, temp:10000, tempLow:1500, - stateLow: ["explosion","fire","fire","fire","fire","fire","fire","fire"], + stateLow: ["plasma_explosion","plasma","plasma","plasma","plasma","plasma","plasma","plasma"], + burnInto: ["plasma_explosion","plasma","plasma","plasma","plasma","plasma","plasma","plasma"], category: "energy", ignore: ["ash","slag","wall","plasma"], burning: true, + burnTime: 500, + burnTempChange: 10, fireElement: ["plasma"], state: "gas", density: 0.07, @@ -4156,6 +4176,8 @@ color1 and color2 spread through striped paint like dye does with itself. col "stateHigh": "wood", }; + var GTDR = { "elem1": "torch", chance: 0.01 }; //grand torch degradation reaction + elements.grand_torch = { "color": "#FFBF2F", "tick": function(pixel) { @@ -4171,31 +4193,41 @@ color1 and color2 spread through striped paint like dye does with itself. col if(!(isEmpty(coordPair.x,coordPair.y))) { continue }; var newPixel = tryCreatePixelReturn("fire",coordPair.x,coordPair.y); if(typeof(newPixel) == "object") { - newPixel.temp = 1500 + newPixel.temp = pixel.temp } }; }, "reactions": { - "water": { "elem1": "torch", chance: 0.01 }, - "sugar_water": { "elem1": "torch", chance: 0.01 }, - "salt_water": { "elem1": "torch", chance: 0.01 }, - "seltzer": { "elem1": "torch", chance: 0.01 }, - "dirty_water": { "elem1": "torch", chance: 0.01 }, - "pool_water": { "elem1": "torch", chance: 0.01 }, - "steam": { "elem1": "wood", chance: 0.01 }, - "smog": { "elem1": "wood", chance: 0.01 }, - "rain_cloud": { "elem1": "wood", chance: 0.01 }, - "cloud": { "elem1": "wood", chance: 0.01 }, - "snow_cloud": { "elem1": "wood", chance: 0.01 }, - "hail_cloud": { "elem1": "wood", chance: 0.01 }, - "black_damp": { "elem1": "wood", chance: 0.02 } + "water": GTDR, + "sugar_water": GTDR, + "salt_water": GTDR, + "seltzer": GTDR, + "dirty_water": GTDR, + "pool_water": GTDR, + "steam": GTDR, + "smog": GTDR, + "rain_cloud": GTDR, + "cloud": GTDR, + "snow_cloud": GTDR, + "hail_cloud": GTDR, + "black_damp": { "elem1": "wood", chance: 0.02 }, + "magic": { "elem1": ["grand_torch","grand_torch","grand_plasma_torch"], "elem2": null, changeTemp: true } }, "temp": 1500, "category": "special", "breakInto": "charcoal", - "tempLow": 900, + "tempHigh": 6000, + "stateHigh": "grand_plasma_torch", + "tempLow": 1000, "stateLow": "torch", }; + + elements.torch.reactions ??= {}; + elements.torch.reactions.magic = { elem1: ["torch","torch","grand_torch"], elem2: null, changeTemp: true }; + elements.torch.tempHigh = 1500; + elements.torch.stateHigh = "grand_torch"; + + var PTDR = { "elem1": "wood", chance: 0.003 }; elements.plasma_torch = { "color": "#86579c", @@ -4252,25 +4284,68 @@ color1 and color2 spread through striped paint like dye does with itself. col } }, "reactions": { - "water": { "elem1": "wood" }, - "sugar_water": { "elem1": "wood" }, - "salt_water": { "elem1": "wood" }, - "seltzer": { "elem1": "wood" }, - "dirty_water": { "elem1": "wood" }, - "pool_water": { "elem1": "wood" }, - "steam": { "elem1": "wood" }, - "smog": { "elem1": "wood" }, - "rain_cloud": { "elem1": "wood" }, - "cloud": { "elem1": "wood" }, - "snow_cloud": { "elem1": "wood" }, - "hail_cloud": { "elem1": "wood" }, - "black_damp": { "elem1": "wood" } + "water": PTDR, + "sugar_water": PTDR, + "salt_water": PTDR, + "seltzer": PTDR, + "dirty_water": PTDR, + "pool_water": PTDR, + "steam": PTDR, + "smog": PTDR, + "rain_cloud": PTDR, + "cloud": PTDR, + "snow_cloud": PTDR, + "hail_cloud": PTDR, + "black_damp": { "elem1": "wood", change: 0.02 } }, "temp": 7000, "category": "special", "breakInto": "charcoal", "tempLow": 4999, - "stateLow": "torch", + "stateLow": "grand_torch", + }; + + var GrPTDR = { "elem1": "plasma_torch", chance: 0.001 }; //grand plasma torch degradation reaction + + elements.grand_plasma_torch = { + "color": "#b92eff", + "tick": function(pixel) { + var coords = circleCoords(pixel.x,pixel.y,4).concat([[4,4],[4,4],[3,3],[3,3],[1,1],[-1,-1],[-3,-3],[-4,-4],[-4,-4],[-3,-3],[-1,-1],[1,1],[0,0],[0,0],[0,0],[0,0],[1,1],[1,1],[2,2],[-1,-1],[-1,-1],[-2,-2]].map( //ae = filterCurrentPixels(function(pixel) { return pixel.element == "ivory_growth_crystal" }).map(px => [130-px.x,67-px.y]) + function(offsets) { + return {x: offsets[0]+pixel.x, y: offsets[1]+pixel.y} + } + )); + for(var i = 0; i < coords.length; i++) { + var coordPair = coords[i]; + if(outOfBounds(coordPair.x,coordPair.y)) { continue }; + if(coordPair.x == pixel.x && coordPair.y == pixel.y) { continue }; + if(!(isEmpty(coordPair.x,coordPair.y))) { continue }; + var newPixel = tryCreatePixelReturn("plasma",coordPair.x,coordPair.y); + if(typeof(newPixel) == "object") { + newPixel.temp = pixel.temp + } + }; + }, + "reactions": { + "water": GrPTDR, + "sugar_water": GrPTDR, + "salt_water": GrPTDR, + "seltzer": GrPTDR, + "dirty_water": GrPTDR, + "pool_water": GrPTDR, + "steam": GrPTDR, + "smog": GrPTDR, + "rain_cloud": GrPTDR, + "cloud": GrPTDR, + "snow_cloud": GrPTDR, + "hail_cloud": GrPTDR, + "black_damp": { "elem1": "wood", chance: 0.02 }, + }, + "temp": 8500, + "category": "special", + "breakInto": "charcoal", + "tempLow": 6000, + "stateLow": "plasma_torch", }; elements.rad_torch = { From f191459c63c5c355739a75f84b9431cce3b6adfd Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Thu, 25 Jan 2024 00:13:09 -0500 Subject: [PATCH 16/28] varfix --- mods/a_mod_by_alice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 654afffe..fe3cae55 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -3502,7 +3502,7 @@ color1 and color2 spread through striped paint like dye does with itself. col if(typeof(beforeFunction) === "function") { beforeFunction(pixel,x,y,radius,fire,smoke,power,damage); }; - if(!pixel || pixel.del || typeof(pixel) == "undefined" || isEmpty(coords[i].x,coords[x].y)) { + if(!pixel || pixel.del || typeof(pixel) == "undefined" || isEmpty(coords[i].x,coords[i].y)) { continue }; if (info.hardness) { // lower damage depending on hardness(0-1) @@ -38940,7 +38940,7 @@ Make sure to save your command in a file if you want to add this preset again.` case "bomb": var number = prompt(`Enter a bomb number (default: 1) 1 corresponds to radius 10, 2 corresponds to radius 15, etc.`); - isNaN(parseFloat(number)) ? number = 0 : number = parseFloat(number); + isNaN(parseFloat(number)) ? number = 1 : number = parseFloat(number); amount += generateBomb(elements,true,number).length; break; default: From 267f61f28b8c36db037518b0c164a6a4b366681f Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Thu, 25 Jan 2024 00:14:53 -0500 Subject: [PATCH 17/28] hands --- mods/a_mod_by_alice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index fe3cae55..33cd5ea6 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -4137,7 +4137,7 @@ color1 and color2 spread through striped paint like dye does with itself. col stateLow: ["plasma_explosion","plasma","plasma","plasma","plasma","plasma","plasma","plasma"], burnInto: ["plasma_explosion","plasma","plasma","plasma","plasma","plasma","plasma","plasma"], category: "energy", - ignore: ["ash","slag","wall","plasma"], + ignore: ["ash","slag","wall","plasma","fire","smoke"], burning: true, burnTime: 500, burnTempChange: 10, From 80d9687470d8c6f3061c8f6f0e3ac7bcbb69716e Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:59:32 -0500 Subject: [PATCH 18/28] Bugge fixes --- mods/a_mod_by_alice.js | 175 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 169 insertions(+), 6 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 33cd5ea6..1d5bb23e 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -2389,8 +2389,9 @@ color1 and color2 spread through striped paint like dye does with itself. col oldChangePixel = changePixel; changePixel = function(pixel,element,changetemp=true) { if(typeof(elements[element]) == "undefined") { + if(typeof(element) == "undefined" || element == "undefined") { return false }; if(doLog) { console.error(`Something tried to change a pixel of ${pixel.element} at (${pixel.x},${pixel.y}) to nonexistent element "${element}"`) }; - return false; + return false }; oldChangePixel(pixel,element,changetemp); }; @@ -4056,6 +4057,9 @@ color1 and color2 spread through striped paint like dye does with itself. col density: 0.08, ignoreAir: true }; + + elements.bless.ignore ??= []; + elements.bless.ignore.push("holy_fire"); elements.plasma_explosion = { color: ["#c78fff","#ea8fff","#be8fff"], @@ -7982,7 +7986,7 @@ color1 and color2 spread through striped paint like dye does with itself. col color: ["#000000", "#000000", "#000000", "#000000", "#000000", "#000000", "#000000", "#FF0000", "#FF7F00", "#FFFF00", "#00FF00", "#007FFF", "#0000FF", "#7F00FF"], density: 1250, breakInto: ["metal_scrap", "glass_shard"], - hardness: 0.7, + hardness: 0.7, //7989 yay soshi! } elements.brimstone_slag = { @@ -8061,7 +8065,7 @@ color1 and color2 spread through striped paint like dye does with itself. col var oY = adjacentCoords[i][1]; var fX = pX+oX; var fY = pY+oY; - if(!isEmpty(fX,fY,true)) { //7989 yay soshi! + if(!isEmpty(fX,fY,true)) { var checkPixel = pixelMap[fX][fY]; var otherElement = elements[checkPixel.element]; if (typeof(otherElement.cutInto) !== "undefined") { @@ -29312,15 +29316,16 @@ Make sure to save your command in a file if you want to add this preset again.` if(Array.isArray(breakIntoElement)) { breakIntoElement = breakIntoElement[Math.floor(Math.random() * breakIntoElement.length)] }; - if(typeof(breakIntoElement) === "undefined" || breakIntoElement === null) { + if(breakIntoElement === null) { deletePixel(pixel.x,pixel.y); return true; }; + if(typeof(breakIntoElement) === "undefined") { return false }; changePixel(pixel,breakIntoElement,changetemp) return true; }; - defaultHardness = 0; + defaultHardness = 0.3; function arrowAltTb(pixel,breakChanceMultiplier,changetemp=false,defaultBreakIntoDust=false) { var info = elements[pixel.element]; @@ -35224,7 +35229,7 @@ Make sure to save your command in a file if you want to add this preset again.` }; createPixel(newfire,x,y); //add fire var firePixel = pixelMap[x][y]; - firePixel.temp = Math.max(elements[newfire].temp,firePixel.temp); + firePixel.temp = Math.max(elements[newfire].temp ?? 0,elements.fire.temp,firePixel.temp ?? 0); firePixel.burning = true; }; }; @@ -35287,6 +35292,164 @@ Make sure to save your command in a file if you want to add this preset again.` excludeRandom: true, }; + elements.tsunami = { + color: ["#2449d1","#4b6adb","#8093d9"], + behavior: behaviors.WALL, + properties: { + active: true, + }, + tick: function(pixel) { + //Iteration initial checks + if(!pixel) { + return; + }; + if(!pixel.active) { + deletePixel(pixel.x,pixel.y); + }; + + //Initial property-setting + var pixelIsOnLeft = (pixel.x < (width/2)); + pixel.fromX ??= pixelIsOnLeft ? 1 : width - 1; + pixel.direction ??= pixelIsOnLeft ? 1 : -1; + + var floorHeight = pixel.y + 1; + while(isEmpty(pixel.x,floorHeight,false)) { + floorHeight++ + }; + pixel.floorHeight ??= floorHeight; + + //Actual doer code + var newX = pixel.fromX + pixel.direction; + + if(outOfBounds(newX,1)) { + pixel.active = false; + return + }; + + var bottomY = (pixel.floorHeight + 3); //extend 4 pixels below + var topY = bottomY - 13; //topY < bottomY because in this game +Y is *downward* + for(var i = bottomY; i >= topY; i--) { + var waterToDo = randomChoice(["salt_water","dirty_water"]); + var fc = {x: newX, y: i}; + if(outOfBounds(fc.x,fc.y)) {continue}; + if(isEmpty(fc.x,fc.y,false)) { + //fill with water + createPixel(waterToDo,fc.x,fc.y) + } else { + var newPixel = pixelMap[fc.x]?.[fc.y]; + if(!newPixel) { continue }; + //break + tryBreak(newPixel,true,true); + if(!newPixel) { continue }; + //water reaction steal + if(elements[newPixel.element].reactions?.water) { + var waterRxn = elements[newPixel.element].reactions.water; + var elem2 = waterRxn.elem2; + while(Array.isArray(elem2)) { + elem2 = randomChoice(elem2) + }; + if(elem2 !== null) { + changePixel(newPixel,elem2,true) + } + }; + if(!newPixel) { continue }; + //add velocity; + newPixel.vx ??= 0; + newPixel.vy ??= 0; + newPixel.vx += (pixel.direction * 6) + newPixel.vy += 3; + }; + }; + pixel.fromX += pixel.direction + }, + state: "solid", + category: "special", + density: elements.water.density + }; + + elements.lava_tsunami = { + color: ["#ff370a","#e84a23","#e67740"], + behavior: behaviors.WALL, + properties: { + active: true, + }, + tick: function(pixel) { + //Iteration initial checks + if(!pixel) { + return; + }; + if(!pixel.active) { + deletePixel(pixel.x,pixel.y); + }; + + //Initial property-setting + var pixelIsOnLeft = (pixel.x < (width/2)); + pixel.fromX ??= pixelIsOnLeft ? 1 : width - 1; + pixel.direction ??= pixelIsOnLeft ? 1 : -1; + + var floorHeight = pixel.y + 1; + while(isEmpty(pixel.x,floorHeight,false)) { + floorHeight++ + }; + pixel.floorHeight ??= floorHeight; + + //Actual doer code + var newX = pixel.fromX + pixel.direction; + + if(outOfBounds(newX,1)) { + pixel.active = false; + return + }; + + var bottomY = (pixel.floorHeight + 3); //extend 4 pixels below + var topY = bottomY - 13; //topY < bottomY because in this game +Y is *downward* + for(var i = bottomY; i >= topY; i--) { + var fc = {x: newX, y: i}; + if(outOfBounds(fc.x,fc.y)) {continue}; + if(isEmpty(fc.x,fc.y,false)) { + //fill with lava + createPixelReturn("magma",fc.x,fc.y).temp = 1400; + } else { + var newPixel = pixelMap[fc.x]?.[fc.y]; + if(!newPixel) { continue }; + var data = elements[newPixel.element]; + //break + for(var j = 0; j < 3; j++) { + tryBreak(newPixel,true,j == 0); + if(!newPixel) { break } + }; + //water reaction steal + if(data.reactions?.magma) { + var magmaRxn = data.reactions.magma; + var elem2 = magmaRxn.elem2; + while(Array.isArray(elem2)) { + elem2 = randomChoice(elem2) + }; + if(elem2 !== null) { + changePixel(newPixel,elem2,true) + } + }; + if(!newPixel) { continue }; + newPixel.temp = Math.max(newPixel.temp,1400); pixelTempCheck(newPixel); + if(!newPixel) { continue }; + if(newPixel.element == "fire") { changePixelReturn(newPixel,"magma",true).temp = 1400 }; + if(data.burn) { newPixel.burning = true; newPixel.burnStart = pixelTicks }; + if(Math.random() < 0.1 && newPixel.burnInto) { finishBurn(newPixel) }; + if(newPixel.element == "fire") { changePixelReturn(newPixel,"magma",true).temp = 1400 }; + if(!newPixel) { continue }; + //add velocity; + newPixel.vx ??= 0; + newPixel.vy ??= 0; + newPixel.vx += (pixel.direction * 6) + newPixel.vy += 3; + }; + }; + pixel.fromX += pixel.direction + }, + state: "solid", + category: "special", + density: elements.magma.density + }; function empCharge(pixel,x,y,radius,fire,smoke,power,damage) { var info = elements[pixel.element]; From da322a53e2cc140142fd434bc839a609a9ed9a80 Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:41:18 +0800 Subject: [PATCH 19/28] A Chef's Dream v1.3! --- mods/aChefsDream.js | 695 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 683 insertions(+), 12 deletions(-) diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index 6269b075..a87f7415 100644 --- a/mods/aChefsDream.js +++ b/mods/aChefsDream.js @@ -127,6 +127,36 @@ Changelog (v1.2) - added cream of tartar - added wine - added corn syrup + + + +Changelog (v1.3) + - added shrimp + - added coconuts + - added coconut stems + - added coconut leaves + - added coconut tree tops + - added coconut milk and coconut juice + - added cut coconuts + - salmon and tuna meats no longer melt + - added knife description + - added lemons and related stuff + - lemons + - lemon wood + - lemon branches + - lemon leaves + - lemon juice + - made by smashing lemons + - lemon seeds + - lemon slices + - made by cutting lemons + - lemon zest + - byproduct of cutting lemons + - lemon marmalade can now be made by mixing lemon slices or lemon zest with sugar + - added carrots + - added carrot seeds and leaves + - added carrot juice + - added dry icing */ /* @@ -150,6 +180,8 @@ elements.knife = { changePixel(pixel, cutInto) }, category:"tools", + canPlace: false, + desc: "Use on pixels to cut them, if possible." } elements.chicken = { @@ -912,13 +944,25 @@ elements.icing_sugar = { elements.icing = { color: "#fefefb", - behavior: behaviors.STURDYPOWDER, + behavior: behaviors.LIQUID, onMix: function(icing_sugar1, icing_sugar2) { if ((shiftDown && Math.random() < 0.2) || (elements[icing_sugar2.element].id === elements.icing_sugar.id && Math.random() < 0.25)) { changePixel(icing_sugar1,"icing") } }, - viscosity: 1.5, + tempHigh: 45, + stateHigh: ["dry_icing"], + stateLowColorMultiplier: 0.97, + category: "food", + isFood: true, + state: "solid", + density: 959.97, + viscosity: 9000, +}; + +elements.dry_icing = { + color: "#fffefa", + behavior: behaviors.STURDYPOWDER, tempHigh: 1000, stateHigh: ["smoke","smoke","smoke","steam","steam","calcium"], stateLowColorMultiplier: 0.97, @@ -926,6 +970,7 @@ elements.icing = { isFood: true, state: "solid", density: 959.97, + viscosity: 9000, }; elements.cream.reactions.baked_batter = {elem2: "cake" } @@ -1370,18 +1415,18 @@ elements.smoked_salmon = { state: "solid", temp:55, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } -elements.steaned_salmon = { +elements.steamed_salmon = { color: ["#BB7B4B", "#B07B54"], behavior: behaviors.STURDYPOWDER, category: "food", state: "solid", temp:60, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1392,7 +1437,7 @@ elements.boiled_salmon = { state: "solid", temp:70, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1403,7 +1448,7 @@ elements.fried_salmon = { state: "solid", temp:70, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1443,7 +1488,7 @@ elements.smoked_tuna = { state: "solid", temp:55, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1454,7 +1499,7 @@ elements.steamed_tuna = { state: "solid", temp:60, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1465,7 +1510,7 @@ elements.boiled_tuna = { state: "solid", temp:70, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1476,7 +1521,7 @@ elements.fried_tuna = { state: "solid", temp:70, tempHigh: 600, - stageHigh: ["ash", "smoke"], + stateHigh: ["ash", "smoke"], isFood: true, } @@ -1655,6 +1700,7 @@ elements.grape_juice = { "clay_soil": { elem1: null, elem2: "clay" }, "seltzer": { elem1: "soda", elem2: "foam" }, "carbon_dioxide": { elem1: "soda", elem2: "foam" }, + "milk": { elem1: "fruit_milk", elem2: "fruit_milk" }, "yeast": { elem1: ["wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","wine","cream_of_tartar"], elem2: null, chance:80 }, }, tempHigh: 160, @@ -1665,6 +1711,7 @@ elements.grape_juice = { state: "liquid", density: 1054, stain: 0.05, + hidden: true, isFood: true }; @@ -1677,6 +1724,7 @@ elements.cream_of_tartar = { stateHigh: "caramel", density: 1500, isFood: true, + hidden: true, reaction: { "sugar_water": {elem2: "corn_syrup", elem1: null, tempMin: 110} } @@ -1690,7 +1738,9 @@ elements.wine = { tempHigh: 100, stateHigh: "steam", isFood: true, - density: 1200, + density: 1000, + hidden: true, + tempLow: 0 } elements.corn_syrup = { @@ -1701,5 +1751,626 @@ elements.corn_syrup = { tempHigh: 100, stateHigh: "caramel", isFood: true, + hidden: true, viscosity: 10000 } + +elements.shrimp = { + color: ["#EE5422", "#E9683C", "#F3583F", "#EDA270"], + behavior: [ + "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14|M2%7.5 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14", + "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14|FX%20|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14", + "M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%15|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%15", + ], + category: "life", + state: "solid", + reactions: { + "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, + "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL }, + "fly": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL }, + "firefly": { elem2:null, chance:0.6, func:behaviors.FEEDPIXEL }, + "worm": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, + "tadpole": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, + "oxygen": { elem2:"carbon_dioxide", chance:0.5 }, + "dead_bug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL }, + "broth": { elem2:"water", chance:0.2, func:behaviors.FEEDPIXEL }, + "slug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL }, + "herb": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "lettuce": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "dead_plant": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "lichen": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL }, + "yeast": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "yogurt": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "tea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL }, + "meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "rotten_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "cooked_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "yolk": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "cell": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }, + "crumb": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL }, + }, +} + + +elements.coconut_seed = { + color: "#7a603d", + tick: function(pixel) { + if (Math.random() < 0.1 && 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"); + } + } + if (isEmpty(pixel.x,pixel.y-1) && pixel.height < 7) { + movePixel(pixel,pixel.x,pixel.y-1); + createPixel(Math.random() > 0.5 ? "coconut_stem" : "coconut_stem",pixel.x,pixel.y+1); + + pixel.height++ + } + } + else if (pixel.age > 150 && pixel.height > 6 && Math.random() < 0.1) { + changePixel(pixel,"coconut_tree_top"); + } + pixel.age++; + doDefaults(pixel); + }, + properties: { + "age":0, + "height": 0 + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1|XX", + ], +}; + +elements.coconut_stem = { + color: "#8f6c3f", + behavior: behaviors.WALL, + tempHigh: 400, + stateHigh: ["ember","charcoal","fire","fire","fire"], + category: "solids", + burn: 5, + burnTime: 300, + burnInto: ["ember","charcoal","fire"], + state: "solid", + hardness: 0.15, + breakInto: "sawdust", + breakIntoColor: ["#dba66e","#cc8a64"], + hidden: true +} +elements.coconut_tree_top = { + color: "#8f6c3f", + behavior: behaviors.WALL, + tempHigh: 400, + stateHigh: ["ember","charcoal","fire","fire","fire"], + category: "solids", + burn: 5, + burnTime: 300, + burnInto: ["ember","charcoal","fire"], + state: "solid", + hardness: 0.15, + breakInto: "sawdust", + breakIntoColor: ["#dba66e","#cc8a64"], + properties:{ + "leftleaves": 0, + "rightleaves": 0, + }, + hidden: true, + tick: function(pixel) { + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.rightleaves == 0) { + if (isEmpty(pixel.x+1,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x+1,pixel.y); + + pixel.rightleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.rightleaves == 1) { + if (isEmpty(pixel.x+2,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x+2,pixel.y); + + pixel.rightleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.rightleaves == 2) { + if (isEmpty(pixel.x+3,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x+3,pixel.y); + + pixel.rightleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.rightleaves == 3) { + if (isEmpty(pixel.x+4,pixel.y+1)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x+4,pixel.y+1); + + pixel.rightleaves++ + } + } + + + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.leftleaves == 0) { + if (isEmpty(pixel.x-1,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x-1,pixel.y); + + pixel.leftleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.leftleaves == 1) { + if (isEmpty(pixel.x-2,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x-2,pixel.y); + + pixel.leftleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.leftleaves == 2) { + if (isEmpty(pixel.x-3,pixel.y)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x-3,pixel.y); + + pixel.leftleaves++ + } + } + if (Math.random() < 0.1 && pixel.age > 50 && pixel.temp < 100 && pixel.leftleaves == 3) { + if (isEmpty(pixel.x-4,pixel.y+1)) { + createPixel(Math.random() > 0.5 ? "coconut_leaves" : "coconut_leaves",pixel.x-4,pixel.y+1); + + pixel.leftleaves++ + } + } + + + if (Math.random() < 0.1 && pixel.age > 70 && pixel.temp < 100 && pixel.leftleaves > 0 && pixel.rightleaves > 0) { + if (isEmpty(pixel.x+1,pixel.y+1)) { + createPixel(Math.random() > 0.5 ? "coconut" : "coconut",pixel.x+1,pixel.y+1); + } + } + if (Math.random() < 0.1 && pixel.age > 70 && pixel.temp < 100 && pixel.leftleaves > 0 && pixel.rightleaves > 0) { + if (isEmpty(pixel.x-1,pixel.y+1)) { + createPixel(Math.random() > 0.5 ? "coconut" : "coconut",pixel.x-1,pixel.y+1); + } + } + pixel.age++; + doDefaults(pixel); +}, +} +elements.coconut_leaves = { + color: ["#569923","#5ea12b"], + 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 } + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + hidden: true +} +elements.coconut = { + color: "#6e4621", + behavior: [ + "ST:coconut_tree_top|ST:coconut_leaves|ST:coconut_tree_top", + "ST:coconut_stem|XX|ST:coconut_stem", + "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 } + }, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "coconut_milk", + cutInto: ["cut_coconut"], + state: "solid", + density: 1050, +} + +elements.coconut_milk = { + color: "#fffcf2", + behavior: behaviors.LIQUID, + 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 }, + "dirt": { elem1: null, elem2: "mud" }, + "sand": { elem1: null, elem2: "wet_sand" }, + "clay_soil": { elem1: null, elem2: "clay" }, + "caramel": { color1:"#C8B39A", elem2:null, chance:0.05 }, + "sugar": { elem2:null, chance:0.005}, + }, + tempLow: 0, + stateLow: "ice_cream", + stateLowColorMultiplier: [0.97,0.93,0.87], + tempHigh: 93, + stateHigh: "yogurt", + viscosity: 1.5, + category: "liquids", + state: "liquid", + density: 1036.86, + isFood: true +} + +elements.tea.reactions.coconut_milk = { elem2:null, color1:"#ad8955", chance:0.005} +elements.coffee.reactions.coconut_milk = { elem2:"foam", color1:"#856545", chance:0.005} + +elements.cut_coconut = { + color: "#fff2cf", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "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 } + }, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "coconut_juice", + state: "solid", + density: 1050, + hidden: true, +} + +elements.coconut_juice = { + color: "#e9ebe4", + behavior: behaviors.LIQUID, + reactions: { + "dirt": { elem1: null, elem2: "mud" }, + "sand": { elem1: null, elem2: "wet_sand" }, + "clay_soil": { elem1: null, elem2: "clay" }, + "caramel": { color1:"#C8B39A", elem2:null, chance:0.05 }, + }, + tempLow: 0, + tempHigh: 93, + stateHigh: ["sugar","steam"], + viscosity: 1.5, + category: "liquids", + state: "liquid", + density: 1036.86, + hidden: true, + isFood: true +} + +elements.lemon_wood = { + color: "#786531", + behavior: behaviors.WALL, + tempHigh: 400, + stateHigh: ["ember","charcoal","fire","fire","fire"], + category: "solids", + burn: 5, + burnTime: 300, + burnInto: ["ember","charcoal","fire"], + state: "solid", + hardness: 0.15, + breakInto: "sawdust", + breakIntoColor: ["#dba66e","#cc8a64"], +} +elements.lemon_branch = { + color: "#786531", + behavior: [ + "CR:lemon_leaves,lemon_branch%2|CR:lemon_leaves,lemon_leaves,lemon_leaves,lemon_branch%2|CR:lemon_leaves,lemon_branch%2", + "XX|XX|XX", + "XX|XX|XX", + ], + tempHigh: 100, + stateHigh: "lemon_wood", + tempLow: -30, + stateLow: "lemon_wood", + category: "life", + burn: 40, + burnTime: 50, + burnInto: ["sap","ember","charcoal"], + hidden: true, + state: "solid", + density: 1500, + hardness: 0.15, + breakInto: ["sap","sawdust"], + hidden: true, +} +elements.lemon_leaves = { + color: ["#42b336","#46a83b"], + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|CR:lemon%0.15|XX", + ], + 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} + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + seed: "lemon_seed", + hidden: true +} +elements.lemon = { + color: ["#dbd937","#e0dd28"], + behavior: behaviors.POWDER, + 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 }, + "sugar": { elem1:"marmalade", elem2:null, color1:"#e0bf2b", chance:0.35 } + }, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "lemon_juice", + state: "solid", + density: 1050, + isFood: true, + cutInto: ["lemon_zest","lemon_slice","lemon_slice","lemon_slice","lemon_slice"], +} + +elements.lemon_juice = { + color: "#e0d358", + 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, + hidden: true, + tempLow: 0 +}; + +elements.lemon_zest = { + color: "#dbc535", + behavior: behaviors.POWDER, + category:"food", + tempHigh: 100, + stateHigh: ["sugar","steam"], + burn:65, + burnTime:60, + burnInto: "dead_plant", + state: "solid", + density: 1050, + hidden: true, + reactions: { + "sugar": { elem1:"marmalade", elem2:null, color1:"#e0bf2b", chance:0.35 } + }, +} + +elements.lemon_slice = { + color: "#ebe431", + behavior: behaviors.STURDYPOWDER, + category:"food", + tempHigh: 100, + stateHigh: ["sugar","steam"], + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "lemon_juice", + state: "solid", + density: 1050, + hidden: true, + reactions: { + "sugar": { elem1:"marmalade", elem2:null, color1:"#e0bf2b", chance:0.35 } + }, +} + +elements.lemon_seed = { + color: "#854610", + 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"); + } + } + if (isEmpty(pixel.x,pixel.y-1)) { + movePixel(pixel,pixel.x,pixel.y-1); + createPixel(Math.random() > 0.5 ? "lemon_wood" : "lemon_branch",pixel.x,pixel.y+1); + } + } + else if (pixel.age > 1000) { + changePixel(pixel,"lemon_wood"); + } + 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, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|FX%10|XX", + "XX|M1|XX", + ], +}; + + +elements.carrot_seed = { + color: "#b08d35", + tick: function(pixel) { + if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel == 0) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var randomNumber1 = Math.round(Math.random()) + pixel.growthpixel = pixel.growthpixel+randomNumber1 + 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") { + deletePixel(pixel.x,pixel.y+1); + movePixel(pixel,pixel.x,pixel.y+1); + createPixel("carrot_leaves",pixel.x,pixel.y-1); + pixel.growthpixel++; + } + } + + } + if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel > 0 && pixel.growthpixel < 4) { + 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") { + deletePixel(pixel.x,pixel.y+1); + movePixel(pixel,pixel.x,pixel.y+1); + createPixel("carrot",pixel.x,pixel.y-1); + pixel.growthpixel++; + } + } + + } + if (!isEmpty(pixel.x,pixel.y+1) && Math.random() > 0.95 && isEmpty(pixel.x-1,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-1) && pixel.leafgrown == false) { + createPixel("carrot_leaves",pixel.x-1,pixel.y-1); + createPixel("carrot_leaves",pixel.x+1,pixel.y-1); + pixel.leafgrown++ + } + else if (pixel.age > 150 && pixel.growthpixel == 4 && Math.random() < 0.1) { + changePixel(pixel,"carrot"); + } + pixel.age++; + doDefaults(pixel); + }, + properties: { + "age":0, + "growthpixel": 0, + "leafgrown": false + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1|XX", + ], +}; +elements.carrot_leaves = { + color: ["#61cc3d","#58c234"], + 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} + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + seed: "carrot_seed", + hidden: true +} +elements.carrot = { + color: "#e39919", + behavior: behaviors.STURDYPOWDER, + category:"food", + tempHigh: 100, + stateHigh: ["steam"], + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "carrot_juice", + state: "solid", + density: 1050, + hidden: true, +} + +elements.carrot_juice = { + color: "#f5a742", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + tempLow: 0, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, +}; From fec4ac7b754b9f558cc31145d978d8b2c46da12b Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:42:39 +0800 Subject: [PATCH 20/28] Update Changelog! --- mods/aChefsDream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index a87f7415..fe4bb621 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.1 +v1.3 Changelog (v1.0) - added chickens From dc831edc5777ee728a43bc28ddc12cc404aeda5d Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Thu, 25 Jan 2024 18:02:08 +0800 Subject: [PATCH 21/28] A Chef's Dream v1.3.1! --- mods/aChefsDream.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index fe4bb621..7d9ea2c2 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 +v1.1 Changelog (v1.0) - added chickens @@ -157,6 +157,11 @@ Changelog (v1.3) - added carrot seeds and leaves - added carrot juice - added dry icing + + + +Changelog (v1.3.1) + - added lemonade */ /* @@ -2173,6 +2178,26 @@ elements.lemon_juice = { hidden: true, temp: 30, hidden: true, + tempLow: 0, + reactions: { + "sugar": {elem1:"lemonade", elem2: "null", chance:0.35} + } +}; + +elements.lemonade = { + color: "#fff378", + 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, + hidden: true, tempLow: 0 }; From 48d5271a54b6fd591eef844d055560882c6a39b9 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:27:11 -0500 Subject: [PATCH 22/28] i forgot clone area, stainless steel, dyes... --- mods/a_mod_by_alice.js | 204 +++++++++++++++++++++++++++++++++++------ 1 file changed, 178 insertions(+), 26 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 1d5bb23e..bedefec0 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -1151,7 +1151,7 @@ try { }; } - function changeSaturation(color,saturationChange,operationType="add",outputType="rgb",arrayType=null) { + function changeSaturation(color,saturationChange,operationType="add",outputType="rgb",arrayType=null,doRounding=true) { color = normalizeColorToHslObject(color,arrayType); //only {h,s,l} should exist now @@ -1194,14 +1194,14 @@ try { throw new Error("Operation must be \"add\", \"subtract\", \"multiply\", \"divide\", \"set\", \"min\", or \"max\""); }; - color.h = Math.round(color.h % 360); - color.s = Math.round(bound(color.s,0,100)); - color.l = Math.round(bound(color.l,0,100)); + color.h = doRounding ? Math.round(color.h % 360) : color.h % 360; + color.s = doRounding ? Math.round(bound(color.s,0,100)) : color.s,0,100; + color.l = doRounding ? Math.round(bound(color.l,0,100)) : color.l,0,100; return convertHslObjects(color,outputType) }; - function changeLuminance(color,luminanceChange,operationType="add",outputType="rgb",arrayType=null) { + function changeLuminance(color,luminanceChange,operationType="add",outputType="rgb",arrayType=null,doRounding=true) { color = normalizeColorToHslObject(color,arrayType); //only {h,s,l} should exist now @@ -1244,14 +1244,14 @@ try { throw new Error("Operation must be \"add\", \"subtract\", \"multiply\", \"divide\", \"set\", \"min\", or \"max\""); }; - color.h = Math.round(color.h % 360); - color.s = Math.round(bound(color.s,0,100)); - color.l = Math.round(bound(color.l,0,100)); + color.h = doRounding ? Math.round(color.h % 360) : color.h % 360; + color.s = doRounding ? Math.round(bound(color.s,0,100)) : color.s,0,100; + color.l = doRounding ? Math.round(bound(color.l,0,100)) : color.l,0,100; return convertHslObjects(color,outputType); }; - function changeHue(color,hueChange,operationType="add",outputType="rgb",arrayType=null) { + function changeHue(color,hueChange,operationType="add",outputType="rgb",arrayType=null,doRounding=true) { color = normalizeColorToHslObject(color,arrayType); //only {h,s,l} should exist now @@ -1294,9 +1294,9 @@ try { throw new Error("Operation must be \"add\", \"subtract\", \"multiply\", \"divide\", \"set\", \"min\", or \"max\""); }; - color.h = Math.round(color.h % 360); - color.s = Math.round(bound(color.s,0,100)); - color.l = Math.round(bound(color.l,0,100)); + color.h = doRounding ? Math.round(color.h % 360) : color.h % 360; + color.s = doRounding ? Math.round(bound(color.s,0,100)) : color.s,0,100; + color.l = doRounding ? Math.round(bound(color.l,0,100)) : color.l,0,100; return convertHslObjects(color,outputType); }; @@ -1738,6 +1738,69 @@ try { return returnPixel ? newPixel : true }; + function cloneArea(topLeftX,topLeftY,bottomRightX,bottomRightY,newTopLeftX,newTopLeftY,oldPixelHandling_PreClear1_OnlyReplace2_Ignore3=1,errorOnOutOfBounds=false) { + var results = {"created": 0, "replaced": 0, "deleted": 0, "skipped": 0, "skipped_OOB": 0}; + for(var x = topLeftX; x <= bottomRightX; x++) { + for(var y = topLeftY; y <= bottomRightY; y++) { + var relativeOffsetX = x - topLeftX; + var relativeOffsetY = y - topLeftY; + var newCoords = {"x": newTopLeftX+relativeOffsetX, "y": newTopLeftY+relativeOffsetY}; + var oldCoords = {"x": x, "y": y}; + var oldCoordsOOB = outOfBounds(oldCoords.x,oldCoords.y); + var newCoordsOOB = outOfBounds(newCoords.x,newCoords.y); + if(oldCoordsOOB || newCoordsOOB) { + if(errorOnOutOfBounds) { + var message; + if(oldCoordsOOB && !newCoordsOOB) { + message = "cloneArea: Source is or extends outside of the canvas." + } else if(!oldCoordsOOB && newCoordsOOB) { + message = "cloneArea: Destination is or extends outside of the canvas." + } else if(oldCoordsOOB && newCoordsOOB) { + message = "cloneArea: Source and destination are or extend outside of the canvas." + } else { + message = "cloneArea: ??? (Something has gone wrong with the OOB handling code.)" + }; + throw new Error(message) + } else { + results.skipped_OOB++; + continue + } + }; + if(isEmpty(newCoords.x,newCoords.y)) { + //Empty destination, full source + if(!(isEmpty(oldCoords.x,oldCoords.y))) { + clonePixel(pixelMap[oldCoords.x][oldCoords.y],newCoords.x,newCoords.y); + results.created++; + } + } else { + //Full destination, empty source + if(isEmpty(oldCoords.x,oldCoords.y)) { + //Delete the blocking pixel only if pre-clearing + if(oldPixelHandling_PreClear1_OnlyReplace2_Ignore3 == 1) { + deletePixel(newCoords.x,newCoords.y); + results.deleted++ + } else { + results.skipped++ + } + } + //Full destination, full source + else { + //Delete the blocking pixel if not ignoring (as for the above case, pre-clearing is not ignoring) + if(oldPixelHandling_PreClear1_OnlyReplace2_Ignore3 !== 3) { + deletePixel(newCoords.x,newCoords.y); + //Place the cloned pixel + clonePixel(pixelMap[oldCoords.x][oldCoords.y],newCoords.x,newCoords.y) + results.replaced++; + } else { + results.skipped++ + }; + } + } + } + }; + return results + }; + function getEmptyVonNeumannNeighbors(pixel) { var neighbors = []; var x = pixel.x; @@ -4804,9 +4867,12 @@ color1 and color2 spread through striped paint like dye does with itself. col })} // shuffle the pixels if not paused*/ for (var i = 0; i < newCurrentPixels.length; i++) { pixel = newCurrentPixels[i]; + if(typeof(elements[pixel.element]) == "undefined") { continue }; + if(typeof(pixel) == "undefined") { continue }; //if (pixelMap[pixel.x][pixel.y] == undefined || currentPixels.indexOf(pixel) == -1) {continue} if (pixel.del) {continue} if (!paused || forceTick) { + if(typeof(elements[pixel.element]) == "undefined") { continue }; doVelocity(pixel); if (elements[pixel.element].tick) { // Run tick function if it exists elements[pixel.element].tick(pixel); @@ -5272,6 +5338,7 @@ color1 and color2 spread through striped paint like dye does with itself. col // Reactions newPixel = pixelMap[nx][ny]; var newInfo = elements[newPixel.element]; + if(typeof(newInfo) == "undefined") { return false }; var returnVal = false; if(newInfo.onTryMoveInto !== undefined) { newInfo.onTryMoveInto(newPixel,pixel); @@ -6206,6 +6273,24 @@ color1 and color2 spread through striped paint like dye does with itself. col conduct: 0.48, }, + elements.stainless_steel = { + color: "#7d8181", + behavior: behaviors.WALL, + reactions: { + "pool_water": { elem1:"rust", chance:0.0009 }, + "salt_water": { elem1:"rust", chance:0.0003 }, + "salt": { elem1:"rust", chance:0.0003 }, + "acid": { elem1:"rust" } + }, + tempHigh: 1455.5, + category: "solids", + density: 7930, + conduct: 0.42, + hardness: 0.85 + }; + + elements.steel.reactions.acid = { elem1:"rust" }; + elements.molten_tungsten = { density: 17600, temp: 3500, @@ -6257,11 +6342,10 @@ color1 and color2 spread through striped paint like dye does with itself. col hidden: true, }, - elements.molten_steel = { - reactions: { - "molten_tungsten": { "elem1":"molten_tungstensteel", "elem2":"molten_tungstensteel" } - } - } + elements.molten_steel ??= {}; + elements.molten_steel.reactions ??= {}; + elements.molten_steel.reactions.molten_tungsten = { "elem1":"molten_tungstensteel", "elem2":"molten_tungstensteel" }; + elements.molten_steel.reactions.molten_chromium = { "elem1":"molten_stainless_steel", "elem2":["molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_stainless_steel"] }; elements.unrealistically_flammable_substance_bomb = { name: "unrealistically flammable bomb", @@ -7902,7 +7986,7 @@ color1 and color2 spread through striped paint like dye does with itself. col } } } else { - if(!settings.bg || settings.bg == "#fffff0") { + if(!settings.bg || settings.bg == "#fffff0") { //7989 yay soshi! pixel.color = "rgb(255,255,247)" } else { pixel.color = "rgb(255,255,240)" @@ -7986,7 +8070,7 @@ color1 and color2 spread through striped paint like dye does with itself. col color: ["#000000", "#000000", "#000000", "#000000", "#000000", "#000000", "#000000", "#FF0000", "#FF7F00", "#FFFF00", "#00FF00", "#007FFF", "#0000FF", "#7F00FF"], density: 1250, breakInto: ["metal_scrap", "glass_shard"], - hardness: 0.7, //7989 yay soshi! + hardness: 0.7, } elements.brimstone_slag = { @@ -8090,6 +8174,46 @@ color1 and color2 spread through striped paint like dye does with itself. col }, }; + function newLegacyFnmDye(colorName,hexColor) { + if(!(hexColor.startsWith("#"))) { hexColor = "#" + hexColor }; + colorName = colorName.toLowerCase(); + var key = `${colorName}_dye`; + var name = `${colorName.replaceAll("_"," ")} dye`; + var pixelColor = changeLuminance(hexColor,0.73333333333333,"multiply","hex",null,false); + + elements[key] = { + "name": name, + "color": pixelColor, + "state": "solid", + "behavior": [ + "XX|XX|XX", + `CC:${hexColor}|CC:${pixelColor}|CC:${hexColor}`, + `M2 AND CC:${hexColor}|M1 AND CC:${hexColor}|M2 AND CC:${hexColor}` + ], + "density": 100, + "category": "dyes" + }; + eLists.DYE.push(key); + elements.concoction.reactions[key] = { "elem1": "mistake", "elem2": null }; + return elements[key] + }; + + var dyeColors = [ + ["rose", "#FF0067"], + ["orange", "#FF7F00"], + ["pink", "#FF7FFF"], + ["purple", "#C700CF"], + ["burgundy", "#9F005F"], + ["peach", "#ffbf7f"], + ["mint", "#4df0a9"], + ["gray", "#7F7F7F"], + ["white", "#FFFFFF"], + ["sky_blue", "#99d1f2"] + ]; + + for(var i = 0; i < dyeColors.length; i++) { + newLegacyFnmDye(dyeColors[i][0],dyeColors[i][1]) + }; //ASSORTED RAINBOW VARIANTS ## @@ -11740,7 +11864,7 @@ color1 and color2 spread through striped paint like dye does with itself. col var elemsAbove = []; var pX = pixel.x; var pY = pixel.y; for(var counter = pY - 1; counter > 0; counter--) { - console.log(pX,pY); + //console.log(pX,pY); if(isEmpty(pX,counter,true)) { break }; @@ -11755,7 +11879,7 @@ color1 and color2 spread through striped paint like dye does with itself. col return } else { pixel.target = elemsAbove - console.log(pixel.target); + //console.log(pixel.target); pixel.charge = 0; } }; @@ -22674,7 +22798,7 @@ Pixel size (rendering only): (Use if the save looks cut o elements.water.reactions[particulateName] = { "elem1": suspensionName, "elem2": [particulateName,particulateName,particulateName,suspensionName], - chance: 0.01 + chance: 0.001 }; //Sediment suspension @@ -29110,9 +29234,6 @@ Make sure to save your command in a file if you want to add this preset again.` elements.portal_out = { color: "#2222ee", - properties: { - channel: 0 - }, insulate: true, tick: function(pixel) { pixel._channel = Math.floor(pixel.temp / 100); @@ -44647,7 +44768,36 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa //console.log(currentElement); }); - //END ## + //MISCELLANEOUS CHANGES ## + + eLists.PIPE = ['pipe', 'destroyable_pipe', 'e_pipe', 'destroyable_e_pipe', 'channel_pipe', 'destroyable_channel_pipe', 'bridge_pipe']; + + elements.pipe_stage_shifter = { + tool: function(pixel) { + if(!(eLists.PIPE.includes(pixel.element))) { return false }; + if(typeof(pixel.stage) == "undefined" || !(pixel.stage) || pixel.stage < 2) { return false }; + switch (pixel.stage) { + case 2: pixel.stage = 3; break; + case 3: pixel.stage = 4; break; + case 4: pixel.stage = 2; break; + default: pixel.stage = (((Math.max(2,Math.floor(pixel.stage)) - 2) % 3) + 2); + }; + switch (pixel.stage) { + case 2: newColor = "#003600"; break; + case 3: newColor = "#360000"; break; + case 4: newColor = "#000036"; break; + }; + pixel.color = pixelColorPick(pixel,newColor); + }, + category: "tools", + color: ["#003600","#360000","#000036"], + density: elements.steel.density, + hardness: elements.steel.hardness, + tempHigh: elements.steel.tempHigh, + stateHigh: "molten_steel", + state: "solid", + behavior: behaviors.POWDER + }; var notActuallyMovable = ["pipe","e_pipe","steel","vivite"]; @@ -44664,6 +44814,8 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa behavior: behaviors.WALL, maxColorOffset: 0 }; + + //END ## } catch (error) { alert(`Load failed (try reloading)\nError: ${error.stack}`); console.error(error) From 8fa263e014cde918023d7d42d71213dbb033209b Mon Sep 17 00:00:00 2001 From: JustAGenericUsername Date: Thu, 25 Jan 2024 20:56:22 -0500 Subject: [PATCH 23/28] the toolening --- mods/logicgates.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mods/logicgates.js b/mods/logicgates.js index 13d1b5e2..5b989a41 100644 --- a/mods/logicgates.js +++ b/mods/logicgates.js @@ -389,6 +389,7 @@ elements.logic_transmitter = { if (pixel.start === pixelTicks){ pixel.channel = transmitterVar; } + pixel.clone = pixel.channel; var receivers = currentPixels.filter(function(pixelToCheck) { return ( pixelToCheck !== pixel && //should work if this pixel is the same as the other one by reference @@ -430,5 +431,22 @@ elements.logic_receiver = { category: "logic", tick: function(pixel){ if (pixel.start === pixelTicks){pixel.channel = transmitterVar} + pixel.clone = pixel.channel; } +} +elements.logic_shock = { + color: elements.shock.color, + category: "tools", + tool: function(pixel){ + if (pixel.element == "logic_wire"){pixel.lstate = 2; pixel.color = pixelColorPick(pixel, "#ffe49c")} + }, + excludeRandom: true, +} +elements.logic_unshock = { + color: elements.uncharge.color, + category: "tools", + tool: function(pixel){ + if (pixel.element == "logic_wire"){pixel.lstate = -2; pixel.color = pixelColorPick(pixel, "#3d4d2c")} + }, + excludeRandom: true, } \ No newline at end of file From b89b0ccd097a30ffb49898b3196a2df5f9c92ccf Mon Sep 17 00:00:00 2001 From: stefanblox <155691462+stefanblox@users.noreply.github.com> Date: Thu, 25 Jan 2024 23:19:29 -0300 Subject: [PATCH 24/28] sbstuff 2.5 this is fuckmod, go use sbmixup.js instead --- mods/sbstuff.js | 215 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 210 insertions(+), 5 deletions(-) diff --git a/mods/sbstuff.js b/mods/sbstuff.js index cb05c5bd..596e6999 100644 --- a/mods/sbstuff.js +++ b/mods/sbstuff.js @@ -66,7 +66,7 @@ elements.maple_syrup = { tempHigh: 500, stateHigh: "steam", color: "#9c6000", - behavior: behaviors.LIQUID, + behavior: behaviors.CRAWLER, category: "liquids", state: "liquid", }; @@ -362,6 +362,15 @@ elements.coca_cola = { state: "liquid", }; +elements.pepsi = { + tempHigh: 500, + stateHigh: "steam", + color: "#2b1717", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", +}; + elements.piss = { tempHigh: 500, stateHigh: "steam", @@ -1409,7 +1418,7 @@ elements.silver_coin = { state: "solid", }; -elements.max_graphics_in_roblox = { +elements.uraniumaniumaniumaniumanium_popcornicecream_plutoniumeptunium_238239 = { color: "#238fe8", behavior: [ "XX|XX|XX", @@ -1425,7 +1434,199 @@ elements.max_graphics_in_roblox = { excludeRandom: true, maxSize: 1, noMix: true, - desc: "ok now ACTUALLY use it at your own risk IM NOT KIDDING! THIS CAN FUCKING CRASH YOUR GAME" + desc: "ok now ACTUALLY use it at your own risk IM NOT KIDDING! THIS CAN FUCKING CRASH YOUR GAME", + excludeRandom: true, +}; + +elements.coffee_milk = { + tempHigh: 300, + stateHigh: "steam", + color: "#5c4c42", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", +}; + +elements.mentos = { + tempHigh: 500, + stateHigh: "ash", + color: "#d0cbd6", + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "liquid" +}; + +elements.oreo = { + tempHigh: 300, + stateHigh: "steam", + color: ["#211e1e","#fff6f5"], + singleColor: true, + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "liquid" +}; + +elements.uranium_238 = { + tempHigh: 1200, + stateHigh: "molten_uranium", + color: ["#0f400b", "#30522d", "#4d6b4a", "#6f8f6d"], + behavior: [ + "XX|CR:radiation%1|XX", + "CR:radiation%1|CH:lead%0.001|CR:radiation%1", + "M2|M1|M2", + ], + category: "powders", + state: "liquid", + density: 19100, + hardness: 0.6, + conduct: 0.235, + excludeRandom: true, + reactions: { + "neutron": {elem1: "uranium_239",}, + } +}; + +elements.uranium_239 = { + tempHigh: 1300, + stateHigh: "molten_uranium", + color: ["#153816", "#135e14", "#379138", "#567556", "#7bb37b"], + behavior: [ + "XX|CR:radiation%2|XX", + "CR:radiation%2|CH:lead%0.002|CR:radiation%2", + "M2|M1|M2", + ], + category: "powders", + state: "liquid", + hidden: true, + density: 19100, + hardness: 0.6, + conduct: 0.235, + excludeRandom: true, + reactions: { + "electron": {elem1: "neptunium_239"} + } +}; + +elements.neptunium_239 = { + tempHigh: 1500, + stateHigh: "molten_uranium", + color: ["#082e19", "#173b27", "#354a3f", "#4c635a", "#344a41"], + behavior: [ + "XX|CR:radiation%3|XX", + "CR:radiation%3|CH:lead%0.003|CR:radiation%3", + "M2|M1|M2", + ], + category: "powders", + state: "liquid", + hidden: true, + density: 20000, + hardness: 0.7, + conduct: 0.3, + excludeRandom: true, + reactions: { + "electron": {elem1: "plutonium"}, + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.1 } + } +}; + +elements.plutonium = { + tempHigh: 2000, + stateHigh: "molten_uranium", + color: ["#0a4a17", "#194d23", "#263b2a", "#475449"], + behavior: [ + "XX|CR:radiation%4|XX", + "CR:radiation%4|CH:lead%0.004|CR:radiation%4", + "M2|M1|M2", + ], + category: "powders", + state: "liquid", + hidden: true, + density: 22000, + hardness: 0.8, + conduct: 0.4, + excludeRandom: true, + reactions: { + "neutron": { elem1:"n_explosion", tempMin:500, chance:0.2 }, + "electron": { elem1:"n_explosion", tempMin:500, chance:0.00000000000000000000001 } + } +}; + +elements.electron = { + color: "#c99d16", + behavior: behaviors.BOUNCY, + reactions: { + "uranium": { temp2:100 }, + }, + temp: 35, + category: "energy", + state: "gas", + density: 0.00002, + ignoreAir: true +}; + +elements.sned = { + color: "#dfe0d9", + behavior: [ + "XX|XX AND CR:sned%1|XX", + "M2 AND CR:sned%1|XX|M2 AND CR:sned%1", + "M1|M1 AND CH:sned%1|M1", + ], + category: "joke", + state: "liquid", + excludeRandom: true +}; + +elements.uranium_tea = { + temp: 60, + tempHigh: 400, + stateHigh: "molten_uranium", + color: ["#0f8b15", "#316624", "#59864b", "#502e0f"], + behavior: behaviors.RADLIQUID, + category: "liquids", + state: "liquid" +}; + +elements.powerlaser = { + color: ["#ed0ca9","#ff2b95"], + tick: function(pixel) { + var x = pixel.x; + for (var y = pixel.y; y < height; y++) { + if (outOfBounds(x, y)) { + break; + } + if (isEmpty(x, y)) { + if (Math.random() > 0.05) { continue } + createPixel("flash", x, y); + pixelMap[x][y].color = "#b80ced"; + pixelMap[x][y].temp = 1001000; + } + else { + if (elements[pixelMap[x][y].element].isGas) { continue } + if (elements[pixelMap[x][y].element].id === elements.heat_ray.id) { break } + pixelMap[x][y].temp += 901000; + pixelTempCheck(pixelMap[x][y]); + break; + } + } + deletePixel(pixel.x, pixel.y); + }, + temp: 1000000, + category: "energy", + state: "gas", + excludeRandom: true, + noMix: true +}; + +elements.magma_bomb = { + temp: 100, + color: "#b83109", + behavior: [ + "XX|EX:6>magma|XX", + "XX|XX|XX", + "M2|M1 AND EX:6>magma|M2" + ], + category: "weapons", + state: "liquid" }; elements.incinerate.category = "tools", @@ -1463,13 +1664,17 @@ if (!elements.water.reactions) elements.water.reactions = {}; elements.water.reactions.cocaine = { elem1: "solid_water", elem2: null } if (!elements.paper.reactions) elements.paper.reactions = {}; -elements.paper.reactions.bless = { elem1: "robux", elem2: null, chance: 0.001 } +elements.paper.reactions.bless = { elem1: "robux", elem2: null, chance: 0.0000001 } if (!elements.uranium.reactions) elements.uranium.reactions = {}; elements.uranium.reactions.ice_cream = {elem1: "uranium_ice_cream", elem2: null}, -elements.uranium.reactions.cream = {elem1: "uranium_ice_cream", elem2: null} +elements.uranium.reactions.cream = {elem1: "uranium_ice_cream", elem2: null}, +elements.uranium.reactions.tea = {elem1: "uranium_tea", elem2: null} if (!elements.dough.reactions) elements.dough.reactions = {}; elements.dough.reactions.yolk = {elem1: null, elem2: "spaghetti", tempMin: 25} +if (!elements.coffee.reactions) elements.coffee.reactions = {}; +elements.coffee.reactions.milk = {elem1: null, elem2: "coffee_milk",} + elements.silver.breakInto = "silver_coin" From 62281e744464c804e67584c4f2a64eb8634fa7a8 Mon Sep 17 00:00:00 2001 From: Jayd-Rubies <155784127+Jayd-Rubies@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:42:15 -0500 Subject: [PATCH 25/28] Weapons.js missile optimization --- mods/weapons.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mods/weapons.js b/mods/weapons.js index 88f77107..04ed8a20 100644 --- a/mods/weapons.js +++ b/mods/weapons.js @@ -25,7 +25,7 @@ elements.little_boy = { cooldown: defaultCooldown }, elements.fat_man = { - color: ["#ffff00","#000000"], + color: ["#ffff00","#333333"], behavior: [ "XX|EX:28>plasma|XX", "XX|XX|XX", @@ -69,20 +69,20 @@ elements.fat_man = { category: "weapons" }, elements.left_missile = { - color: "#4c4e42", + color: "#4c4e42", behavior: [ - "XX|EX:10|XX", - "CR:left_missile AND EX:10|CH:fire|EX:10", - "M2|M1 AND EX:10|M2", + "M2|EX:10|XX", + "M1 AND EX:10|XX|EX:10", + "M2|EX:10|XX", ], category:"weapons", }, elements.right_missile = { - color: "#4c4e42", + color: "#4c4e42", behavior: [ - "XX|EX:10|XX", - "EX:10|CH:fire|EX:10 AND CR:right_missile", - "M2|M1 AND EX:10|M2", + "XX|EX:10|M2", + "EX:10|XX|M1 AND EX:10", + "XX|EX:10|M2", ], category:"weapons", }, From a241758ed2fe26da250cd79ad4fcd3a19f043035 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:38:54 -0500 Subject: [PATCH 26/28] make vivite pyrophoric --- mods/a_mod_by_alice.js | 198 +++++++++++++++++++++++++++++++++-------- 1 file changed, 162 insertions(+), 36 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index bedefec0..fec50ee1 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -3875,8 +3875,41 @@ color1 and color2 spread through striped paint like dye does with itself. col //No changeTemp for fire=>smoke elements.fire.tick = function(pixel){ - behaviors.UL_UR_OPTIMIZED(pixel); - if (!pixel.del && settings.burn===0 && (pixelTicks-pixel.start > 70) && Math.random() < 0.1 ) { changePixel(pixel,"smoke",false) } + if (pixel.start === pixelTicks) {return} + if (pixel.charge && elements[pixel.element].behaviorOn) { + pixelTick(pixel) + } + var move1Spots = [ + [pixel.x, pixel.y-1], + [pixel.x+1, pixel.y-1], + [pixel.x-1, pixel.y-1], + ] + var moved = false; + for (var i = 0; i < move1Spots.length; i++) { + var coords = move1Spots[Math.floor(Math.random()*move1Spots.length)]; + coords = {x: coords[0], y: coords[1]}; + if(!isEmpty(coords.x,coords.y,true) && pixelMap[coords.x]?.[coords.y]?.element == pixel.element && pixelMap[coords.x][coords.y].temp < pixel.temp) { + swapPixels(pixel,pixelMap[coords.x][coords.y]); + moved = true; break + } else { + if (tryMove(pixel, coords.x, coords.y)) { moved = true; break; } + else { move1Spots.splice(move1Spots.indexOf(coords), 1);} + } + } + if (!moved && !pixel.del) { + var move2Spots = [ + [pixel.x, pixel.y+1], + [pixel.x+1, pixel.y], + [pixel.x-1, pixel.y], + ] + for (var i = 0; i < move2Spots.length; i++) { + var coords = move2Spots[Math.floor(Math.random()*move2Spots.length)]; + if (tryMove(pixel, coords[0], coords[1])) { break; } + else { move2Spots.splice(move2Spots.indexOf(coords), 1); } + } + } + if (!pixel.del) { doDefaults(pixel); } + if (!pixel.del && settings.burn===0 && (pixelTicks-pixel.start > 70) && Math.random() < 0.1 ) { changePixel(pixel,"smoke",false) }; }; //New elements @@ -6827,7 +6860,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -1; j < 2; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6854,7 +6887,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -3; j < 4; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6882,7 +6915,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6910,7 +6943,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6938,7 +6971,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6966,7 +6999,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -6994,7 +7027,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7022,7 +7055,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7050,7 +7083,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7078,7 +7111,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7106,7 +7139,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = (-1*squadius); j < (squadius+1); j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -7136,9 +7169,9 @@ color1 and color2 spread through striped paint like dye does with itself. col if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { if(pixel.uwu < 8) { - pixel.uwu += 1 + pixel.uwu++ } else { - pixel.owo += 1 + pixel.owo++ } } } @@ -8207,6 +8240,8 @@ color1 and color2 spread through striped paint like dye does with itself. col ["peach", "#ffbf7f"], ["mint", "#4df0a9"], ["gray", "#7F7F7F"], + ["lime", "#7FFF00"], + ["black", "#000000"], ["white", "#FFFFFF"], ["sky_blue", "#99d1f2"] ]; @@ -8215,6 +8250,62 @@ color1 and color2 spread through striped paint like dye does with itself. col newLegacyFnmDye(dyeColors[i][0],dyeColors[i][1]) }; + eLists.LED = ["led_r","led_g","led_b"]; + + function newLED(abbrev,hexColor,baseColorOverrideHex=null) { + if(!(hexColor.startsWith("#"))) { hexColor = "#" + hexColor }; + if(baseColorOverrideHex && !(baseColorOverrideHex.startsWith("#"))) { baseColorOverrideHex = "#" + baseColorOverrideHex }; + abbrev = abbrev.toLowerCase(); + var key = `led_${abbrev}`; + var pixelColor = baseColorOverrideHex ?? changeLuminance(hexColor,0x66/0xff,"multiply","hex",null,false); + + elements[key] = { + behavior: behaviors.WALL, + reactions: { + "light": {"charge1":1}, + "liquid_light": {"charge1":1}, + }, + color: pixelColor, + colorOn: hexColor, + category: "machines", + tempHigh: 1500, + stateHigh: ["molten_glass","molten_glass","molten_glass","molten_gallium"], + conduct: 1, + breakInto: "glass_shard" + }; + + eLists.LED.push(key) + }; + + var ledColors = [ + ["c", "#00FFFF"], //cyan + ["y", "#FFFF00"], //yellow + ["m", "#FF00FF"], //magenta (cursed) + ["p", "#AB00C2"], //purple (cursed) + ["v", "#7700FF"], //violet + ["w", "#FFFFFF"], //white (cursed) + ["gy", "#7F7F7F"], //gray (more cursed) + ["bl", "#000000", "#2b2b2b"], //black (super cursed) + ["o", "#FF7F00"], //orange + ["a", "#FFBF00"], //amber + ["l", "#7FFF00"], //lime + ["rs", "#FF0067"], //rose (cursed) + ["pk", "#FF7FFF"], //pink (cursed) + ["bg", "#9F005F"], //burgundy (cursed) + ["pc", "#ffbf7f"], //peach + ["mg", "#4df0a9"], //mint green + ["sb", "#99d1f2"] //sky blue (cursed) + ]; + + for(var i = 0; i < ledColors.length; i++) { + newLED(...ledColors[i]); + }; + + for(var i = 0; i < eLists.LED.length; i++) { + var key = eLists.LED[i]; + elements.malware.reactions[key] = { elem2:eLists.LED, chance:0.01 } + }; + //ASSORTED RAINBOW VARIANTS ## elements.concoction.reactions.diorite_gravel = { @@ -10275,7 +10366,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -1; j < 2; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == "msmine") { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -10627,7 +10718,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -1; j < 2; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1; + pixel.uwu++; }; }; }; @@ -10719,7 +10810,7 @@ color1 and color2 spread through striped paint like dye does with itself. col for (let j = -1; j < 2; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1; + pixel.uwu++; }; }; }; @@ -15537,9 +15628,14 @@ Pixel size (rendering only): (Use if the save looks cut o viscosity: 3**4, } - elements.redstone_dust.tempHigh = 2500 + elements.redstone_dust.tempHigh = 2500; - elements.redstone_dust.stateHigh = "destabilized_redstone" + elements.redstone_dust.stateHigh = "destabilized_redstone"; + + elements.redstone_dust.conduct = 0.9; + + elements.redstone_dust.colorOn = ["#FF2424","#FF0000","#FF1200"]; + elements.redstone_dust.color = ["#7f0000","#5f0000","#5f0500"]; elements.destabilized_redstone = { color: ["#9e0303", "#98061a", "#b80704", "#c4020c", "#f70008", "#9e0303", "#98061a", "#b80704", "#e3020a", "#8c0303", "#8c0303"], @@ -16770,9 +16866,10 @@ Pixel size (rendering only): (Use if the save looks cut o "fire": { elem2: null } }, tick: function(pixel) { - backgroundColor = hexToRGB(settings.bg); - pixel.rgbValue = "rgb("+backgroundColor.r+","+backgroundColor.g+","+backgroundColor.b+")"; - pixel.color = pixel.rgbValue; + /*var baseColor = settings.bg instanceof Array ? averageRgbPrefixedColorArray(settings.bg.map(x => convertColorFormats(x,"rgb"))) : convertColorFormats(settings.bg,"rgb"); + baseColor = convertColorFormats(baseColor,"json"); + pixel.color = "rgba(" + Object.values(baseColor).join(",") + ",0)"*/ + pixel.color = "rgba(0,0,0,0)" }, hardness: 0.6, category: "gases", @@ -19295,9 +19392,12 @@ Pixel size (rendering only): (Use if the save looks cut o if(isNaN(pixel.temp)) { pixel.temp = 20 }; if(Math.random() < 0.013 && exposedToAir(pixel)) { changePixel(pixel,"vivite_oxide",false); - pixel.temp += 0.1; + pixel.temp += 4; }; }, + burnTime: 160, + burnTempChange: 10.65, + burnInto: "vivite_oxide_powder", noResistance: true, reactions: { "ice": { elem1: "vivite_oxide", elem2: null, temp1: 0.2 }, @@ -19327,10 +19427,23 @@ Pixel size (rendering only): (Use if the save looks cut o behavior: behaviors.POWDER, tick: function(pixel) { if(Math.random() < 0.027 && exposedToAir(pixel)) { - changePixel(pixel,"vivite_oxide_powder",false); - pixel.temp += 0.1; + if(getEmptyMooreNeighbors(pixel).length > 4) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } else { + pixel.temp += 18; + changePixel(pixel,getStateAtTemp("vivite_oxide_powder",pixel.temp),false); + }; + + if(pixel.burning && ((pixel.temp + (2 * elements[pixel.element].burnTempChange)) > elements[pixel.element].tempHigh)) { + changePixel(pixel,elements[pixel.element].burnInto,false); + pixel.temp += 213; + }; }; }, + burnTime: 8, + burnTempChange: 213, + burnInto: "vivite_oxide_powder", reactions: { "ice": { elem1: "vivite_oxide_powder", elem2: null, temp1: 0.2 }, "water": { elem1: "vivite_oxide_powder", elem2: null, temp1: 0.2 }, @@ -19345,7 +19458,7 @@ Pixel size (rendering only): (Use if the save looks cut o "salt_ice": { elem1: "vivite_oxide_powder", elem2: "salt" } }, noResistance: true, - tempHigh: 938, + tempHigh: 1725, stateHigh: "molten_vivite", category: "solids", state: "solid", @@ -19382,7 +19495,7 @@ Pixel size (rendering only): (Use if the save looks cut o return false; }; - if(elements[newElement].noViviteSlag) { //Excluded + if(elements[newElement].noViviteSlag || elements[pixel.element].ignore?.includes(newPixel.element)) { //Excluded return false; }; @@ -19399,12 +19512,13 @@ Pixel size (rendering only): (Use if the save looks cut o color: ["#f7a6e5", "#fa70d1", "#f0bbf2"], colorOn: ["#ff63ac", "#ff21bd", "#e81af0"], fireColor: ["#ff66ba", "#ff85ef", "#ff99f7"], + ignore: ["wall","heejinite","jinsoulite","haseulite","molten_heejinite","molten_jinsoulite","molten_haseulite","yvesite","molten_yvesite"], tick: function(pixel) { var info = elements[pixel.element]; if(Math.random() < 0.022 && exposedToAir(pixel)) { changePixel(pixel,pixel.temp > 7315.27 ? "molten_vivite_oxide" : "vivite_oxide_powder",false) - pixel.temp += 0.1; + pixel.temp += 18; }; if(Math.random() < 0.025) { @@ -19448,10 +19562,13 @@ Pixel size (rendering only): (Use if the save looks cut o }, density: 8212, state: "liquid", + burnTime: 160, + burnTempChange: 10.65, + burnInto: "vivite_oxide_powder", hardness: 0.88, viscosity: 10000, breakInto: "vivite_gas", - temp: 1100, + temp: 2000, tempHigh: 2256, stateHigh: "vivite_gas", tempLow: 938, @@ -19582,13 +19699,22 @@ Pixel size (rendering only): (Use if the save looks cut o fireColor: ["#ff66ba", "#ff85ef", "#ff99f7"], tick: function(pixel) { if(Math.random() < 0.032 && exposedToAir(pixel)) { - changePixel(pixel,pixel.temp > 15500 ? "vivite_oxide_gas" : pixel.temp > 7315.27 ? "molten_vivite_oxide" : "vivite_oxide_powder",false); + if(getEmptyMooreNeighbors(pixel).length > 4) { + pixel.burning = true; + pixel.burnStart = pixelTicks; + } else { + pixel.temp += 18; + changePixel(pixel,pixel.temp > 15500 ? "vivite_oxide_gas" : pixel.temp > 7315.27 ? "molten_vivite_oxide" : "vivite_oxide_powder",false); + }; }; }, behavior: behaviors.GAS, state: "gas", tempLow: 2256, stateLow: "molten_vivite", + burnTime: 8, + burnTempChange: 213, + burnInto: "vivite_oxide_powder", density: 18.02, temp: 3300, hardness: 1, @@ -26059,7 +26185,7 @@ Pixel size (rendering only): (Use if the save looks cut o }; for(var i in adjacentCoords) { if(Math.random() < 0.005) { - pixel.temp+=1; + pixel.temp++; var newCoords = [ pixel.x+adjacentCoords[i][0], pixel.y+adjacentCoords[i][1] @@ -40922,7 +41048,7 @@ Make sure to save your command in a file if you want to add this preset again.` for (var i = 1; i < width; i++) { for (var j = 1; j < height; j++) { if (!isEmpty(i,j)) { - pixelMap[i][j].temp += 1 + pixelMap[i][j].temp++ } } } @@ -41001,7 +41127,7 @@ Make sure to save your command in a file if you want to add this preset again.` for (let j = -8; j < 9; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -41038,7 +41164,7 @@ Make sure to save your command in a file if you want to add this preset again.` for (let j = -8; j < 9; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } @@ -41074,7 +41200,7 @@ Make sure to save your command in a file if you want to add this preset again.` for (let j = -8; j < 9; j++) { if (!isEmpty(pixel.x+j,pixel.y+i) && !outOfBounds(pixel.x+j,pixel.y+i)) { if (pixelMap[pixel.x+j][pixel.y+i].element == pixel.element) { - pixel.uwu += 1 + pixel.uwu++ } } } From d39b255f7cb6be824407eaf2ade0d897e23190af Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Fri, 26 Jan 2024 22:23:39 -0500 Subject: [PATCH 27/28] Update mod-list.html --- mod-list.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod-list.html b/mod-list.html index 3cc4c843..b45f0a0b 100644 --- a/mod-list.html +++ b/mod-list.html @@ -230,13 +230,13 @@ nocancer.jsRemoves cancer from the game one tick after it is createdmollthecoder nocancer2.jsRemoves cancer from the game altogether. May be incompatible with other mods that spawn cancermollthecoder nograssgrow.jsPrevents Grass from growingmollthecoder -obsidian.jsAdds ObsidianJayd pizzasstuff.jsNew animals, foods, and plants_ilikepizza_ primordial_birthpool.jsA cross between Primordial Soup and Birthpool. Requires F&MAlice spring.jsMany nature elements, like sakura trees, butterflies, beehives, and moreR74n the_ground_og.jsSimplified and more stable version of the_ground.jsAlice the_ground.jsAdds several rock types, worldgen settings, and gemstonesAlice toothpaste.jsTeeth and pasteAlice +volcanic_expansion.jsAdds Obsidian, Pumice, and Andesite rocksJayd Fun & Games allliquids.jsMade all elements liquidsAlex @@ -271,6 +271,9 @@ rainbow_tests.jsAdds variants of the rainbow element with different mathsAlice Shroomboxels.jsA variant of acid_and_shapes.js that uses a different trigonometric functionAlice +Compilations +a_mod_by_alice.jsA mod combining most of Alice’s mods, and some other thingsAlice + Technical Libraries & Tests a_bundle_of_tests.jsSeveral test functionsAlice betterMenuScreens.jsLibrary for mods to create their own menusggod From 43da5258c342229063e4c8eff44c55a7e5e7d266 Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Sat, 27 Jan 2024 12:13:25 +0800 Subject: [PATCH 28/28] A Chef's Dream 1.3.2! --- mods/aChefsDream.js | 172 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 165 insertions(+), 7 deletions(-) diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index 7d9ea2c2..e026916d 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.1 +v1.3.2 Changelog (v1.0) - added chickens @@ -162,6 +162,14 @@ Changelog (v1.3) Changelog (v1.3.1) - added lemonade + + + +Changelog (v1.3.2) + - added apple cider vinegar + - added turnips + - added turnip seeds and leaves + - added turnip juice */ /* @@ -894,7 +902,8 @@ elements.apple_juice = { hidden: true, temp: 30, reactions: { - "sugar": { elem1:"apple_jam", elem2:null, chance:0.35 } + "sugar": { elem1:"apple_jam", elem2:null, chance:0.35 }, + "yeast": { elem1:"apple_cider_vinegar", elem2:null, chance:0.35 } }, tempLow: 0 }; @@ -942,7 +951,6 @@ elements.icing_sugar = { viscosity: 1.5, category: "food", state: "solid", - hidden: true, density: 1036.86, isFood: true }; @@ -963,6 +971,7 @@ elements.icing = { state: "solid", density: 959.97, viscosity: 9000, + hidden: true }; elements.dry_icing = { @@ -976,6 +985,7 @@ elements.dry_icing = { state: "solid", density: 959.97, viscosity: 9000, + hidden: true }; elements.cream.reactions.baked_batter = {elem2: "cake" } @@ -1135,7 +1145,7 @@ elements.orange_slice = { burn:65, burnTime:60, burnInto: "dead_plant", - breakInto: "apple_juice", + breakInto: "orange_juice", state: "solid", density: 1050, hidden: true, @@ -1715,7 +1725,6 @@ elements.grape_juice = { category: "liquids", state: "liquid", density: 1054, - stain: 0.05, hidden: true, isFood: true }; @@ -2299,7 +2308,6 @@ elements.carrot_seed = { pixel.growthpixel++; } } - } if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel > 0 && pixel.growthpixel < 4) { if (!outOfBounds(pixel.x,pixel.y+1)) { @@ -2311,13 +2319,14 @@ elements.carrot_seed = { pixel.growthpixel++; } } - } if (!isEmpty(pixel.x,pixel.y+1) && Math.random() > 0.95 && isEmpty(pixel.x-1,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-1) && pixel.leafgrown == false) { + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { createPixel("carrot_leaves",pixel.x-1,pixel.y-1); createPixel("carrot_leaves",pixel.x+1,pixel.y-1); pixel.leafgrown++ } + } else if (pixel.age > 150 && pixel.growthpixel == 4 && Math.random() < 0.1) { changePixel(pixel,"carrot"); } @@ -2399,3 +2408,152 @@ elements.carrot_juice = { hidden: true, temp: 30, }; + +elements.apple_cider_vinegar = { + color: "#fffe75", + 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.turnip_seed = { + color: "#994828", + tick: function(pixel) { + if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel == 0) { + 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") { + deletePixel(pixel.x,pixel.y+1); + movePixel(pixel,pixel.x,pixel.y+1); + createPixel("turnip_leaves",pixel.x,pixel.y-1); + pixel.growthpixel++; + } + } + + } + if (pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel > 0 && pixel.growthpixel < 3) { + if (!outOfBounds(pixel.x-1,pixel.y)) { + var pixelleft = pixelMap[pixel.x-1][pixel.y]; + if (pixelleft.element === "dirt" || pixelleft.element === "mud" || pixelleft.element === "sand" || pixelleft.element === "wet_sand" || pixelleft.element === "clay_soil" || pixelleft.element === "mycelium") { + deletePixel(pixel.x-1,pixel.y); + createPixel("turnip",pixel.x-1,pixel.y); + } + } + if (!outOfBounds(pixel.x+1,pixel.y)) { + var pixelright = pixelMap[pixel.x+1][pixel.y]; + if (pixelright.element === "dirt" || pixelright.element === "mud" || pixelright.element === "sand" || pixelright.element === "wet_sand" || pixelright.element === "clay_soil" || pixelright.element === "mycelium") { + deletePixel(pixel.x+1,pixel.y); + createPixel("turnip",pixel.x+1,pixel.y); + } + } + } + if (Math.random() < 0.1 && pixel.age > 100 && pixel.temp < 100 && pixel.leafgrown == true && pixel.growthpixel > 0 && pixel.growthpixel < 3) { + 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") { + deletePixel(pixel.x,pixel.y+1); + movePixel(pixel,pixel.x,pixel.y+1); + createPixel("turnip",pixel.x,pixel.y-1); + pixel.growthpixel++; + } + } + + } + if (!isEmpty(pixel.x,pixel.y+1) && Math.random() > 0.95 && isEmpty(pixel.x-1,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-1) && pixel.leafgrown == false) { + 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") { + createPixel("turnip_leaves",pixel.x-1,pixel.y-1); + createPixel("turnip_leaves",pixel.x+1,pixel.y-1); + pixel.leafgrown++ + } + } + else if (pixel.age > 150 && pixel.growthpixel == 3 && Math.random() < 0.1) { + changePixel(pixel,"turnip"); + } + pixel.age++; + doDefaults(pixel); + }, + properties: { + "age":0, + "growthpixel": 0, + "leafgrown": false + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1|XX", + ], +}; +elements.turnip_leaves = { + color: ["#399431","#3b8c34"], + 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} + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + seed: "turnip_seed", + hidden: true +} +elements.turnip = { + color: ["#945bb3","#a05cbd","#a053b8","#b364c4"], + behavior: behaviors.STURDYPOWDER, + category:"food", + tempHigh: 100, + stateHigh: ["steam"], + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "turnip_juice", + state: "solid", + density: 1050, + hidden: true, +} + +elements.turnip_juice = { + color: "#700f5d", + behavior: behaviors.LIQUID, + category: "liquids", + tempHigh: 100, + stateHigh: ["steam","sugar"], + burn: 70, + tempLow: 0, + burnTime: 300, + burnInto: ["steam", "smoke"], + state: "liquid", + density: 825, + hidden: true, + temp: 30, +};