From aab544d30b1008fcf75c2e8b80bca26588510c53 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:20:06 -0400 Subject: [PATCH 01/11] Update devsnacks.js --- mods/devsnacks.js | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/mods/devsnacks.js b/mods/devsnacks.js index f1cde22f..562c31ff 100644 --- a/mods/devsnacks.js +++ b/mods/devsnacks.js @@ -73,4 +73,37 @@ elements.tea_powder = { isFood: true, hidden: true } -elements.water.reactions.tea_powder = { elem1:"tea", chance:0.0002 } \ No newline at end of file +elements.water.reactions.tea_powder = { elem1:"tea", chance:0.0002 } + +elements.pumpkin.breakInto = ["pumpkin_seed","pumpkin_mash","pumpkin_mash","pumpkin_mash",null]; + +elements.pumpkin_mash = { + color: ["#DF7E06","#eba100"], + behavior: behaviors.STURDYPOWDER, + tempHigh: 125, + stateHigh: ["pumpkin_spice","pumpkin_spice",null], + category: "food", + state: "solid", + density: 490.3, + isFood: true, + hidden: true, +} + +elements.pumpkin_seed.tempHigh = 125; +elements.pumpkin_seed.stateHigh = ["pumpkin_spice","pumpkin_spice",null]; + +elements.pumpkin_spice = { + color: "#8d4f03", + grain: 1.5, + behavior: behaviors.POWDER, + tempHigh: 400, + stateHigh: ["smoke","smoke","smoke","smoke","ash"], + category: "food", + state: "solid", + density: 490.3, + isFood: true, + hidden: true, +} + +elements.coffee.reactions.pumpkin_spice = { elem2:null, color1:"#6A2F03", chance:0.005 }; +elements.coffee.reactions.pumpkin_mash = { elem2:null, color1:"#6A2F03", chance:0.005 }; \ No newline at end of file From eb366140767cba0368cb9657853c938abc63cf11 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:36:04 -0400 Subject: [PATCH 02/11] Update devsnacks.js --- mods/devsnacks.js | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/mods/devsnacks.js b/mods/devsnacks.js index 562c31ff..e63e7a54 100644 --- a/mods/devsnacks.js +++ b/mods/devsnacks.js @@ -83,7 +83,7 @@ elements.pumpkin_mash = { tempHigh: 125, stateHigh: ["pumpkin_spice","pumpkin_spice",null], category: "food", - state: "solid", + state: "liquid", density: 490.3, isFood: true, hidden: true, @@ -106,4 +106,31 @@ elements.pumpkin_spice = { } elements.coffee.reactions.pumpkin_spice = { elem2:null, color1:"#6A2F03", chance:0.005 }; -elements.coffee.reactions.pumpkin_mash = { elem2:null, color1:"#6A2F03", chance:0.005 }; \ No newline at end of file +elements.coffee.reactions.pumpkin_mash = { elem2:null, color1:"#6A2F03", chance:0.005 }; + +elements.apple = { + color: ["#b22424","#f5c517","#66b447"], + grain: 2, + behavior: behaviors.POWDER, + // singleColor: true, + category: "food", + state: "solid", + density: 750, + isFood: true, + breakInto: "juice", + tempHigh: 175, + stateHigh: ["applesauce",null] +} + +elements.applesauce = { + color: "#E7C45A", + behavior: behaviors.LIQUID, + viscosity: 50000, + tempHigh: 400, + stateHigh: "smoke", + category: "food", + state: "liquid", + density: 750, + isFood: true, + hidden: true, +} \ No newline at end of file From 1a6aee23f0eefd572a24b68f5276ea2c8327180b Mon Sep 17 00:00:00 2001 From: sq <> Date: Wed, 8 Oct 2025 17:06:23 +0800 Subject: [PATCH 03/11] sugar spice and everything nice --- mods/aChefsDream2.js | 145 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) diff --git a/mods/aChefsDream2.js b/mods/aChefsDream2.js index 4a089e68..31fc4cfa 100644 --- a/mods/aChefsDream2.js +++ b/mods/aChefsDream2.js @@ -3,7 +3,7 @@ // https://github.com/SquareScreamYT/ // https://youtube.com/@sqec -version = "v2.1.0" +version = "v2.1.1" runAfterLoad(function() { console.log("Current aChefsDream version: "+version) @@ -595,4 +595,147 @@ elements.pistachio_powder = { hidden: true } +elements.pumpkin_mash = { + color: ["#f59c2f", "#efa810", "#e38f1a"], + behavior: behaviors.STURDYPOWDER, + tempHigh: 125, + stateHigh: ["pumpkin_spice","pumpkin_spice","smoke"], + category: "food", + state: "liquid", + density: 500, + isFood: true, + hidden: true, +} + +elements.pumpkin.breakInto = ["pumpkin_seed", "pumpkin_mash", "pumpkin_mash", "pumpkin_mash", "pumpkin_mash", null]; + +elements.pumpkin_spice = { + color: ["#95570b", "#ba7f36"], + behavior: behaviors.POWDER, + tempHigh: 400, + stateHigh: ["smoke","smoke","smoke","smoke","ash"], + category: "food", + state: "solid", + density: 500, + isFood: true, + hidden: true, +} + +elements.cinnamon_powder.reactions.nutmeg_powder = { elem1: "pumpkin_spice", elem2: null, chance: 0.5 }; + +elements.coffee.reactions.pumpkin_mash = { elem2: null, color1: "#7e3c09", chance: 0.005 }; +elements.coffee.reactions.pumpkin_spice = { elem2: null, color1: "#7e3c09", chance: 0.005 }; + +elements.nutmeg_tree = { + color: "#6B4226", + behavior: behaviors.WALL, + tempHigh: 400, + stateHigh: ["ember", "charcoal", "fire"], + category: "solids", + burn: 5, + burnTime: 300, + burnInto: ["ember", "charcoal", "fire"], + state: "solid", + hardness: 0.2, + breakInto: "sawdust", + hidden: true +}; + +elements.nutmeg_branch = { + color: "#5c3b23", + behavior: [ + "CR:nutmeg_leaves,nutmeg_branch%2|CR:nutmeg_leaves,nutmeg_branch%2|CR:nutmeg_leaves,nutmeg_branch%2", + "XX|XX|XX", + "XX|XX|XX", + ], + tempHigh: 100, + stateHigh: "nutmeg_tree", + tempLow: -30, + stateLow: "nutmeg_tree", + category: "life", + burn: 30, + burnTime: 60, + burnInto: ["sap", "ember"], + hidden: true, + state: "solid", + density: 1400, + breakInto: ["sap", "sawdust"] +}; + +elements.nutmeg_leaves = { + color: ["#4b7d3d", "#558c40"], + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|CR:nutmeg_fruit%0.1|XX", + ], + reactions: { + "vinegar": { elem1: "dead_plant", chance: 0.035 }, + "baking_soda": { elem1: "dead_plant", chance: 0.01 }, + "bleach": { elem1: "dead_plant", chance: 0.05 }, + "alcohol": { elem1: "dead_plant", chance: 0.035 }, + }, + category: "life", + tempHigh: 90, + stateHigh: "dead_plant", + tempLow: -1.5, + stateLow: "frozen_plant", + burn: 60, + burnTime: 60, + burnInto: "dead_plant", + state: "solid", + density: 1050, + hidden: true +}; + +elements.nutmeg_fruit = { + color: ["#c0a25d", "#ddb86c"], + behavior: behaviors.POWDER, + category: "food", + tempHigh: 100, + stateHigh: "dead_plant", + burn: 60, + burnTime: 60, + cutInto: ["mace", "nutmeg", "nutmeg"], + breakInto: ["mace", "nutmeg", "nutmeg"], + state: "solid", + density: 1050 +}; + +elements.mace = { + color: ["#e04e1b", "#cc3614"], + behavior: behaviors.POWDER, + category: "food", + tempHigh: 250, + stateHigh: ["ash", "smoke"], + isFood: true, + state: "solid", + density: 900, + hidden: false +}; + +elements.nutmeg = { + color: ["#8b5a2b", "#A0522D"], + behavior: behaviors.POWDER, + category: "food", + tempHigh: 250, + stateHigh: ["ash", "smoke"], + isFood: true, + state: "solid", + density: 1000, + breakInto: "nutmeg_powder", +}; + +elements.nutmeg_powder = { + color: "#C58940", + behavior: behaviors.POWDER, + category: "food", + tempHigh: 250, + stateHigh: ["ash", "smoke"], + isFood: true, + state: "solid", + density: 950, + hidden: false +}; + },true) \ No newline at end of file From 9b8c49bc428286557f7884cc3a6ae440317d97bf Mon Sep 17 00:00:00 2001 From: 3pm-on-github Date: Wed, 8 Oct 2025 14:58:26 +0200 Subject: [PATCH 04/11] let's take a look... --- mods/3pms_mod.js | 133 +++++++++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 61 deletions(-) diff --git a/mods/3pms_mod.js b/mods/3pms_mod.js index 4e39d814..622d42db 100644 --- a/mods/3pms_mod.js +++ b/mods/3pms_mod.js @@ -1,43 +1,37 @@ -// mod moment -// also made by 3pm +// made by 3pm -// starting the initiation -version = "0.0.1" -subversion = "0.0.12" -versionname = "Gullible On The Ceilling" +version = "0.0.2" +subversion = "0.0.21" +versionname = "Let's take a look..." console.log("3pms_mod.js " + version + " \"" + versionname + "\"") console.log("3pms_mod.js | Initiating...") // bypassing the tps limit -// nvm this is useless -// whatever im keeping it -setTimeout(() => { - const tpsbutton = document.getElementById("tpsButton"); - tpsbutton.onclick = () => { - var tpsprompt = prompt( - "Enter the new simulation Ticks Per Second (TPS). This is how many updates per second the simulation will run.\n\n" + - "The default is 30.\n\nThe current TPS is " + tps + ".\n\nNOTE: 3pms_mod.js removes the TPS limit.\n" + - "Any TPS higher than 1000 isn\'t recommended.\n\n" - ); - - var newtps = parseInt(tpsprompt); - if (tpsprompt !== null) { - if (isNaN(newtps) || newtps == "") { - alert("You did not enter a valid TPS."); - } else { - tps = parseInt(newtps); - if (isNaN(tps) || tps <= 0) { - alert("You did not enter a valid TPS."); - tps = 30; +function tpsPrompt() { + promptInput("Enter the new simulation Ticks Per Second (TPS). This is how many updates per second the simulation will run.\n\nThe default is 30.\n\nThe current TPS is " + tps + ".\n\nNOTE: 3pms_mod.js removes the TPS limit.\nAny TPS higher than 1000 isn't recommended.\n\n", + (r) => { + var newtps = parseInt(r); + if (r !== null) { + if (isNaN(newtps) || newtps == "") logMessage("You did not enter a valid TPS."); + else { + newtps = parseInt(newtps); + if (isNaN(newtps) || newtps <= 0) { + logMessage("You did not enter a valid TPS."); + } + else { + tps = newtps; + delete currentSaveData.oldTps; + } + } + resetInterval(tps); } - } - resetInterval(tps); - } - focusGame(); - }; -}, 1000); + focusGame(); + }, + "Change TPS" + ) +} // more settings @@ -60,7 +54,7 @@ setTimeout(() => { `); - const menuText = document.getElementsByClassName("menuText")[6] + const menuText = document.getElementsByClassName("menuText")[9] const newButton = document.createElement("button") newButton.innerText = "More Settings" newButton.className = "settingsButton" @@ -73,7 +67,7 @@ setTimeout(() => { // elements -elements.calcium_oxide = { // most of this is taken off calcium +elements.calcium_oxide = { color: ["#544E45","#6A635E","#6E6A61","#756F62","#918A7B"], tick: function(pixel) { behaviors.POWDER(pixel); @@ -95,39 +89,56 @@ elements.calcium_oxide = { // most of this is taken off calcium fireColor: "#ff6b21" } -elements.eeraser = { // finally integrating it after over a year +elements.eeraser = { color: "#FFFF00", - behavior: behaviors.WALL, - behaviorON: [ - "DL|DL|DL", - "DL|DL|DL", + behaviorOn: [ + "DL|XX|DL", + "DL|XX|DL", "DL|DL|DL", ], + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|XX|XX" + ], + conduct: 0.5, category: "machines", - insulate: elements.wire.insulate, - conduct: elements.wire.conduct, - noMix: elements.wire.noMix + state: "solid", }; -// stopping the initiation +// tools +elements.replace_all_of_element = { + color: ["#ff3030", "#800000"], + name: "replace all of element", + onSelect: async function() { + promptInput( + "Enter the element to be replaced.", + (r) => { + if (r in elements) { + elements.replace_all_of_element.tool = function(pixel) { + elementbefore = pixel.element + for (var i = 0; i <= width; i++) { + for (var j = 0; j <= height; j++) { + if (!isEmpty(i,j,true)) { + if(pixelMap[i][j].element == elementbefore) { + changePixel(pixelMap[i][j], r) + } + } + } + } + } + } else { + logMessage("You did not enter an existing element."); + } + }, + "3pms_mod.js" + ); + }, + category: "tools", +}; + + setTimeout(() => { console.log("3pms_mod.js | Initiated. Thank you.") -}, 1000); - - - - - - - - - - - - - - - - -const thing=document.createElement("p");thing.innerText="MY NAME πŸ“› IS DAVID πŸ‘¨β€πŸŽ€ DAD πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘§ I ℹ️ WANT SOME ICE πŸ§ŠπŸ‡¦πŸ‡Ά CREAM 🧴🧴 DAVID πŸ‘¨β€πŸŽ€ THAT IS MY NAME πŸ“› DAVID πŸ‘¨β€πŸŽ€πŸ‘¨β€πŸŽ€ I ℹ️ WANT ANOTHER WHERE ❔❓ IS MY BALL 🏈🏈 I’M RUNNING πŸƒβ€β™‚οΈπŸƒβ€β™€οΈ OUT ON πŸ”› THE ROAD 🚧 THERE IS A πŸ…°οΈ CAR πŸš”πŸš– AND IT IS GOING TO HIT πŸ‘Š ME πŸ–πŸ™‹β€β™€οΈ HEEEEEEEEELP HELP πŸ’ MEEEEEEE HEEEEEEEEEEEEEEEEELP\n\nthanks for using 3pms_mod.js :3";document.body.appendChild(thing) \ No newline at end of file +}, 1000); \ No newline at end of file From 561c158e5d505da2bb860ccbecafe8a7b9b6e7bf Mon Sep 17 00:00:00 2001 From: 3pm-on-github Date: Wed, 8 Oct 2025 15:07:59 +0200 Subject: [PATCH 05/11] the humble mod-list change --- mod-list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mod-list.html b/mod-list.html index 78200bde..98b60f42 100644 --- a/mod-list.html +++ b/mod-list.html @@ -351,6 +351,7 @@ volcanic_expansion.jsObsidian, Pumice, and Andesite rocksJayd Fun & Games +3pms_mod.jsAdds random stuff and tools3pm 10kelements.jsCustomizable amount of randomly generated elementsnousernamefound all_around_fillers.jsDirectional Filler variantsidk73248 allliquids.jsMade all elements liquidsAdora From 8f6fdbb10fe31f8284e44603b44771fc3059f031 Mon Sep 17 00:00:00 2001 From: PogDog <121242106+P0gDog@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:01:15 +0000 Subject: [PATCH 06/11] Added my mods so far to mod list (Industry and sensitive) --- mod-list.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod-list.html b/mod-list.html index 0c6543bd..d29479be 100644 --- a/mod-list.html +++ b/mod-list.html @@ -280,6 +280,7 @@ waterspout.jsRe-adds the old Water Spoutmollthecoder WhisperingTheory.jsMany more variants of heater and coolerkaeud wifi_draw.jsDraws connections between WiFi in wifi.js and logicgates.jsRedBirdly +industry.jsAdds conveyors and emittors for most energy typespogdog Weapons aircrafts.jsAircrafts and aircraft partsJayd @@ -398,6 +399,8 @@ triggerable_random_powders.jsPowders with different abilities, such as heating and coolingAlice troll.jsVarious dumb elements that iterate randomly on the entire screenAlice WhisperingTheory.jsPowder and gas variant of heater and coolerkaeud +sensitive.jsMakes all elements sensitive to airpogdog + Visual Effects acid_and_shapes.jsWeird visual effects enabled in settingsAlice From 7c5fac598006c4bb109b03fc48dc1fac6a80d14b Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Thu, 9 Oct 2025 16:19:59 -0400 Subject: [PATCH 07/11] Update mod-list.html --- mod-list.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod-list.html b/mod-list.html index 1a44d3b3..d66c98aa 100644 --- a/mod-list.html +++ b/mod-list.html @@ -263,6 +263,7 @@ gameOfLife.jsConway's Game of Life on a screenggod heatshield.jsHeatshields, makes Plasma coolerTaterbob human_friendly_design.jsPipes, Portals, Drag, and Mix don't kill humansNekonico +industry.jsConveyors and emitters for most energy typespogdog logicgates.jsPredictable electricity and logic gatesnousernamefound note_block_advanced.jsEdit of Alice's note_block.js, adds different blocks with different frequenciesCharsonBurensen note_block.jsMusical Note BlocksAlice @@ -281,8 +282,7 @@ video.jsVideo playerggod waterspout.jsRe-adds the old Water Spoutmollthecoder WhisperingTheory.jsMany more variants of heater and coolerkaeud -wifi_draw.jsDraws connections between WiFi in wifi.js and logicgates.jsRedBirdly -industry.jsAdds conveyors and emittors for most energy typespogdog +wifi_draw.jsConnections between WiFi in wifi.js and logicgates.jsRedBirdly Weapons aircrafts.jsAircrafts and aircraft partsJayd @@ -398,6 +398,7 @@ random_liquids.jsRandomly generates liquids on game loadAlice sbmixup.jsSilly elements from a Mix-Up! gamestefanblox scp.jsCreatures and items from the SCP WikiNekonico +sensitive.jsMakes all elements sensitive to airpogdog sports_beta.jsSeveral sports itemsBluBun5193 star_wars.jsVarious items from Star Wars by DisneySeaPickle754 sus.jsAmong Us crewmateNv7 @@ -405,7 +406,6 @@ triggerable_random_powders.jsPowders with different abilities, such as heating and coolingAlice troll.jsVarious dumb elements that iterate randomly on the entire screenAlice WhisperingTheory.jsPowder and gas variant of heater and coolerkaeud -sensitive.jsMakes all elements sensitive to airpogdog Visual Effects From 58c12d10676c13c1d153b85032af482d3f232dd8 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sat, 11 Oct 2025 13:00:18 -0400 Subject: [PATCH 08/11] Update devsnacks.js --- mods/devsnacks.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/mods/devsnacks.js b/mods/devsnacks.js index e63e7a54..20734dc8 100644 --- a/mods/devsnacks.js +++ b/mods/devsnacks.js @@ -133,4 +133,28 @@ elements.applesauce = { density: 750, isFood: true, hidden: true, -} \ No newline at end of file +} + +if (!elements.mayo.reactions) elements.mayo.reactions = {}; +elements.mayo.reactions.ketchup = { elem1:"mayochup", elem2:"mayochup" } + +elements.mayochup = { + color: "#FDCC94", + behavior: behaviors.LIQUID, + reactions: { + "rust": { elem2:"iron", chance:0.005 }, + "oxidized_copper": { elem2:"copper", chance:0.005 }, + "baking_soda": { "elem1":"carbon_dioxide", elem2:"foam", chance:0.005, attr2:{"foam":3} }, + "glue": { elem2:null, chance:0.005 }, + "oil": { elem2:null, chance:0.005 }, + "sap": { elem2:null, chance:0.005 } + }, + viscosity: 26745.5, + tempHigh: 180.3, + stateHigh: ["carbon_dioxide","methane","steam","salt","sugar","steam","carbon_dioxide","methane"], + category:"liquids", + state: "liquid", + density: 1072.5, + isFood: true, + hidden: true +}; \ No newline at end of file From 1cf69119a49f5e57d444eaaf46e42608baff2a2a Mon Sep 17 00:00:00 2001 From: Alexthetransfem <124483815+theenchantedsword@users.noreply.github.com> Date: Sat, 11 Oct 2025 22:09:08 -0500 Subject: [PATCH 09/11] Update morechemistry.js Adds support for solubility.js --- mods/morechemistry.js | 146 ++++++++++++++++++++---------------------- 1 file changed, 69 insertions(+), 77 deletions(-) diff --git a/mods/morechemistry.js b/mods/morechemistry.js index eb628940..5008b2e5 100644 --- a/mods/morechemistry.js +++ b/mods/morechemistry.js @@ -1,97 +1,78 @@ /* -*Version 2.2.0 +*Version 2.2.1 */ dependOn("orchidslibrary.js", ()=>{ elements.cloner.keyInput = "str:clone", elements.ecloner.keyInput = "str:clone", elements.slow_cloner.keyInput = "str:clone", elements.floating_cloner.keyInput = "str:clone"; let xDown = false; - elements.copper_sulfate = { - behavior: behaviors.POWDER, - color: ["#4391fd","#004cfe"], - reactions: { - ant: {"elem2": "dead_bug"}, - fly: {"elem2": "dead_bug"}, - firefly: {"elem2": "dead_bug"}, - stink_bug: {"elem2": "dead_bug"}, - bee: {"elem2": "dead_bug"}, - termite: {"elem2": "dead_bug"}, - spider: {"elem2": "dead_bug"}, - plant: {"elem2": "dead_plant"}, - grass: {"elem2": "dead_plant"}, - algae: {"elem2": null}, - kelp: {"elem2": "water"}, - coral: {"elem2": "water"}, - mushroom_cap: {"elem2": null}, - mushroom_stalk: {"elem2": null}, - mushroom_gill: {"elem2": null}, - mushroom_spore: {"elem2": null}, - zinc: {"stain2": "#2A1210"}, - fire: {"elem1": null,"elem2": "poison_gas","chance": 0.1}, - sugar: {"elem1": "oxidized_copper","elem2": null,"color1": ["#CB3D3D","#A6292B","#6E1B1B"]}, - magnesium: {elem1: "copper", elem2: "epsom_salt"}, - wood: {stain2: "#043023"}, - }, - tempHigh: 110, - fireColor: [ - "#91d106", - "#feff97", - "#248e01" - ], - state: "solid", - density: 3600, - hidden: true, - category: "powders", - id: 509, - movable: true, - properties: { - anhydrous: false - }, - tick: function(pixel){ - if(pixelTicks-pixel.start == 2 && xDown){ - pixel.anhydrous = true; - let rgb = {r: 235, g: 247, b: 250}; + elements.copper_sulfate.reactions = { + ant: {"elem2": "dead_bug"}, + fly: {"elem2": "dead_bug"}, + firefly: {"elem2": "dead_bug"}, + stink_bug: {"elem2": "dead_bug"}, + bee: {"elem2": "dead_bug"}, + termite: {"elem2": "dead_bug"}, + spider: {"elem2": "dead_bug"}, + plant: {"elem2": "dead_plant"}, + grass: {"elem2": "dead_plant"}, + algae: {"elem2": null}, + kelp: {"elem2": "water"}, + coral: {"elem2": "water"}, + mushroom_cap: {"elem2": null}, + mushroom_stalk: {"elem2": null}, + mushroom_gill: {"elem2": null}, + mushroom_spore: {"elem2": null}, + zinc: {"stain2": "#2A1210"}, + fire: {"elem1": null,"elem2": "poison_gas","chance": 0.1}, + sugar: {"elem1": "oxidized_copper","elem2": null,"color1": ["#CB3D3D","#A6292B","#6E1B1B"]}, + magnesium: {elem1: "copper", elem2: "epsom_salt"}, + wood: {stain2: "#043023"}, + } + elements.copper_sulfate.tick = function(pixel){ + if(pixelTicks-pixel.start == 2 && xDown){ + pixel.anhydrous = true; + let rgb = {r: 235, g: 247, b: 250}; + let num = 6 - (Math.round(Math.random()*12)); + for(let key in rgb){ + rgb[key] += num; + } + pixel.color = `rgb(${rgb.r},${rgb.g},${rgb.b})`; + } + let multi = (pixel.temp-70)/100; + multi = (multi < 0) ? 0 : ((multi > 1) ? 1 : multi); + if(Math.random() < 0.05*multi){ + pixel.anhydrous = true; + let rgb = {r: 235, g: 247, b: 250}; + let num = 6 - (Math.round(Math.random()*12)); + for(let key in rgb){ + rgb[key] += num; + } + pixel.color = `rgb(${rgb.r},${rgb.g},${rgb.b})`; + } + if(pixel.anhydrous){ + let neighbors = []; + for(let coords of squareCoords){ + let x = pixel.x+coords[0], y = pixel.y+coords[1]; + neighbors[neighbors.length] = (isEmpty(x,y) && !outOfBounds(x,y)) ? "air" : (!outOfBounds(x,y)) ? pixelMap[x][y].element : undefined; + } + if(neighbors.includes("air") && pixel.temp < 50 && Math.random() < 0.00035){ + pixel.anhydrous = false; + let rgb = (Math.random() > 0.5) ? {r: 67, g: 145, b: 253} : {r: 0, g: 76, b: 254}; let num = 6 - (Math.round(Math.random()*12)); for(let key in rgb){ rgb[key] += num; } pixel.color = `rgb(${rgb.r},${rgb.g},${rgb.b})`; - } - let multi = (pixel.temp-70)/100; - multi = (multi < 0) ? 0 : ((multi > 1) ? 1 : multi); - if(Math.random() < 0.05*multi){ - pixel.anhydrous = true; - let rgb = {r: 235, g: 247, b: 250}; + + } else if (neighbors.includes("steam") || neighbors.includes("water") || neighbors.includes("salt_water") || neighbors.includes("sugar_water") || neighbors.includes("dirty_water") || neighbors.includes("seltzer") || neighbors.includes("pool_water") || neighbors.includes("slush")){ + pixel.anhydrous = false; + let rgb = (Math.random() > 0.5) ? {r: 67, g: 145, b: 253} : {r: 0, g: 76, b: 254}; let num = 6 - (Math.round(Math.random()*12)); for(let key in rgb){ rgb[key] += num; } pixel.color = `rgb(${rgb.r},${rgb.g},${rgb.b})`; } - if(pixel.anhydrous){ - let neighbors = []; - for(let coords of squareCoords){ - let x = pixel.x+coords[0], y = pixel.y+coords[1]; - neighbors[neighbors.length] = (isEmpty(x,y) && !outOfBounds(x,y)) ? "air" : (!outOfBounds(x,y)) ? pixelMap[x][y].element : undefined; - } - if(neighbors.includes("air") && pixel.temp < 50 && Math.random() < 0.00035){ - pixel.anhydrous = false; - let rgb = (Math.random() > 0.5) ? {r: 67, g: 145, b: 253} : {r: 0, g: 76, b: 254}; - let num = 6 - (Math.round(Math.random()*12)); - for(let key in rgb){ - rgb[key] += num; - } - pixel.color = `rgb(${rgb.r},${rgb.g},${rgb.b})`; - - } else if (neighbors.includes("steam") || neighbors.includes("water") || neighbors.includes("salt_water") || neighbors.includes("sugar_water") || neighbors.includes("dirty_water") || neighbors.includes("seltzer") || neighbors.includes("pool_water") || neighbors.includes("slush")){ - pixel.anhydrous = false; - let rgb = (Math.random() > 0.5) ? {r: 67, g: 145, b: 253} : {r: 0, g: 76, b: 254}; - let num = 6 - (Math.round(Math.random()*12)); - for(let key in rgb){ - rgb[key] += num; - } - pixel.color = `rgb(${rgb.r},${rgb.g},${rgb.b})`; - } - } } } elements.water.ignore = ["copper_sulphate"], elements.steam.ignore = ["copper_sulphate"], elements.pool_water.ignore = ["copper_sulphate", 'pool_ice'], elements.salt_water.ignore = ["copper_sulphate", 'salt_ice'], elements.sugar_water.ignore = ["copper_sulphate", 'sugar_ice'], elements.seltzer.ignore = ["copper_sulphate", 'seltzer_ice'], @@ -806,6 +787,7 @@ dependOn("orchidslibrary.js", ()=>{ category: "salts", state: "solid", density: 3900, + solubility: {water: 3.5}, reactions: { potassium: {elem1: "gold_coin", elem2: "potassium_salt", func: function(pixel){for(let coords of squareCoords){let x=pixel.x+coords[0],y=pixel.y+coords[1]; if(isEmpty(x,y) && !outOfBounds(x,y) && Math.random()<0.25){createPixel("hydrogen", x, y);}}}, color1: ["#574000", "#705200", "#634900", "#755600"]}, sodium: {elem1: "gold_coin", elem2: "salt", func: function(pixel){for(let coords of squareCoords){let x=pixel.x+coords[0],y=pixel.y+coords[1]; if(isEmpty(x,y) && !outOfBounds(x,y) && Math.random()<0.25){createPixel("hydrogen", x, y);}}}, color1: ["#574000", "#705200", "#634900", "#755600"]}, @@ -823,6 +805,7 @@ dependOn("orchidslibrary.js", ()=>{ state: "solid", color: ["#f2f2f2", "#f5f5f5", "#ebebeb", "#e6e6e6"], density: 2320, + solubility: {water: 0.543, color: ["#7a9ff0", "#7aa4ff", "#729bf2", "#6f9cfc"]}, reactions: { baking_soda: {elem1: "magnesium_carbonate", elem2: "salt"}, lye: {elem1: "magnesium_hydroxide", elem2: "salt"}, @@ -852,6 +835,7 @@ dependOn("orchidslibrary.js", ()=>{ behavior: behaviors.POWDER, state: "solid", color: ["#f2f2f2", "#f5f5f5", "#ebebeb", "#e6e6e6"], + solubility: {water: 0.745, color: ["#7a9ff0", "#7aa4ff", "#729bf2", "#6f9cfc"]}, reactions: { baking_soda: {elem1: "limestone", elem2: "salt"}, lye: {elem1: "slaked_lime", elem2: "salt"}, @@ -941,6 +925,7 @@ dependOn("orchidslibrary.js", ()=>{ state: "solid", color: ["#ffffff", "#fcfcfc", "#ffffff", "#ededed"], density: 2470, + solubility: {water: 0.8, color: ["#7a9ff0", "#7aa4ff", "#729bf2", "#6f9cfc"]}, reactions: { water: {elem1: "gallium", elem2: "acid"}, steam: {elem1: "gallium", elem2: "acid_gas"}, @@ -972,6 +957,7 @@ dependOn("orchidslibrary.js", ()=>{ density: 2480, tempHigh: 630, stateHigh: ["chlorine", "aluminum"], + solubility: {water: 0.458, color: ["#7a9ff0", "#7aa4ff", "#729bf2", "#6f9cfc"]}, } elements.acid.reactions.aluminum = {elem1: "hydrogen", elem2: "aluminum_chloride"}; elements.acid.reactions.purple_gold = {elem1: ["aluminum_chloride", "aluminum_chloride", "hydrogen"], elem2: "gold"}; @@ -1079,6 +1065,7 @@ dependOn("orchidslibrary.js", ()=>{ state: "solid", category: "salts", alias: "Mg(CH₃COO)β‚‚", + solubility: {water: 0.53, color: ["#7a9ff0", "#7aa4ff", "#729bf2", "#6f9cfc"]}, reactions: { acid: {elem1: "magnesium_chloride", elem2: "vinegar"}, baking_soda: {elem1: "magnesium_carbonate", elem2: "sodium_acetate"}, @@ -1095,6 +1082,7 @@ dependOn("orchidslibrary.js", ()=>{ state: "solid", category: "salts", alias: "Ca(CH₃COO)β‚‚", + solubility: {water: 0.347, color: ["#7a9ff0", "#7aa4ff", "#729bf2", "#6f9cfc"]}, reactions: { acid: {elem1: "calcium_chloride", elem2: "vinegar"}, baking_soda: {elem1: "limestone", elem2: "sodium_acetate"}, @@ -1113,6 +1101,7 @@ dependOn("orchidslibrary.js", ()=>{ state: "solid", category: "salts", alias: "CH₃COOK", + solubility: {water: 2.55, color: ["#7a9ff0", "#7aa4ff", "#729bf2", "#6f9cfc"]}, reactions: { acid: {elem1: "potassium_salt", elem2: "vinegar"}, baking_soda: {elem1: "caustic_potash", elem2: "sodium_acetate"}, @@ -1128,6 +1117,7 @@ dependOn("orchidslibrary.js", ()=>{ state: "solid", category: "salts", alias: "Cu(CH₃COO)β‚‚", + solubility: {water: 0.072}, reactions: { sodium: {elem1: "copper", elem2: "sodium_acetate"}, potassium: {elem1: "copper", elem2: "potassium_acetate"}, @@ -1148,6 +1138,7 @@ dependOn("orchidslibrary.js", ()=>{ state: "solid", category: "salts", alias: "CuClβ‚‚", + solubility: {water: 0.743}, reactions: { sodium: {elem1: "copper", elem2: "sodium_acetate"}, potassium: {elem1: "copper", elem2: "potassium_acetate"}, @@ -1265,6 +1256,7 @@ dependOn("orchidslibrary.js", ()=>{ alias: "Hβ‚‚PtCl₆", tempHigh: 500, stateHigh: ["acid_gas", "chlorine", "platinum", "platinum"], + solubility: {water: 1, }, reactions: { sodium: {elem1: "salt", elem2: "platinum", color2: ["#404040", "#525252", "#454545", "#2e2e2e", "#262626"]}, potassium: {elem1: "potassium_salt", elem2: "platinum", color2: ["#404040", "#525252", "#454545", "#2e2e2e", "#262626"]}, From 63266938901374aef480915c90b77c343383f64f Mon Sep 17 00:00:00 2001 From: Alexthetransfem <124483815+theenchantedsword@users.noreply.github.com> Date: Sat, 11 Oct 2025 22:10:12 -0500 Subject: [PATCH 10/11] Create solubility.js First release of solubility.js --- mods/solubility.js | 286 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 mods/solubility.js diff --git a/mods/solubility.js b/mods/solubility.js new file mode 100644 index 00000000..28e8fc0e --- /dev/null +++ b/mods/solubility.js @@ -0,0 +1,286 @@ +/* +* Version 1.0.0 +*/ + +dependOn("orchidslibrary.js", ()=>{ + elements.water.reactions.salt = undefined; + elements.water.reactions.sugar = undefined; + elements.water.properties = {capacity: 100, elemsDissolved: {}}; + elements.salt.solubility = {water: 0.36, color: ["#7ca3f7", "#7798e0", "#89abf5", "#96b8ff"]}; + elements.sugar.solubility = {water: 2, visc: 850, color: ["#9bb0de", "#a8bbe3", "#a2b8e8", "#a7b7d9"]}; + elements.lye.solubility = {water: 1.09, color: ["#7ca3f7", "#7798e0", "#89abf5", "#96b8ff"]}; + elements.caustic_potash.solubility = {water: 1.1, color: ["#7ca3f7", "#7798e0", "#89abf5", "#96b8ff"]}; + elements.potassium_salt.solubility = {water: 0.3397, color: ["#7ca3f7", "#7798e0", "#89abf5", "#96b8ff"]}; + elements.borax.solubility = {water: 0.041, color: ["#658ce0", "#7299ed", "#7597e0", "#78a1fa"]}; + elements.epsom_salt.solubility = {water: 0.351, color: ["#658ce0", "#7299ed", "#7597e0", "#78a1fa"]}; + elements.sodium_acetate.solubility = {water: 1.233, color: ["#7ca3f7", "#7798e0", "#89abf5", "#96b8ff"]}; + elements.baking_soda.solubility = {water: 0.097, color: ["#7ca3f7", "#7798e0", "#89abf5", "#96b8ff"]}; + elements.copper_sulfate.solubility = {water: 0.32, color: ["#4a68f0", "#3358ff", "#2948d6", "#2146ed"]}; + elements.lye.reactions.water = undefined; + elements.soap.reactions.water = undefined; + elements.ash.solubility = {water: 1.1, func: function(p1, p2){ + if(p1.elemsDissolved.caustic_potash != undefined){ + p1.elemsDissolved.caustic_potash += p1.elemsDissolved.ash; + p1.elemsDissolved.ash = 0; + } else { + p1.elemsDissolved.caustic_potash = p1.elemsDissolved.ash; + p1.elemsDissolved.ash = 0; + } + if(p2.dissolved >= 100){ + changePixel(p2, getItem(["limestone", "quicklime", "charcoal", "dust", "dust"])); + p2.dissolved = undefined; + } + }}; + elements.water.reactions.ash = undefined; + function getItem(obj){ + let res; + if(Array.isArray(obj)){ + res = obj[Math.round(Math.random()*obj.length)]; + while(res == null){ + res = obj[Math.round(Math.random()*obj.length)]; + } + } else { + res = obj; + } + return res; + } + function aqueousReaction(p1, p2){ + for(let elem in p1.elemsDissolved){ + if(elements[elem].reactions != null && p2.element != "water" && elements[elem].reactions[p2.element] != undefined){ + + let r = elements[elem].reactions[p2.element]; + if(r.tempMin && !((p1.temp >= r.tempMin) && (p2.temp >= r.tempMin))){ + return false; + } + if(r.tempMax && !((p1.temp <= r.tempMax) && (p2.temp <= r.tempMax))){ + return false; + } + if(r.charged && !(p1.charge || p2.charge)){ + return false; + } + let c = (r.chance != undefined) ? r.chance : 1; + c = c*((p1.elemsDissolved[elem]/100)/elements[elem].solubility.water); + if(Math.random() > c){ + return false; + } + if(r.aqFunc){ + r.aqFunc(p1, p2); + } + if(r.elem1 != undefined){ + let e = getItem(r.elem1); + if(elements[e].solubility != undefined && elements[e].solubility.water != undefined){ + p1.elemsDissolved[e] = p1.elemsDissolved[elem]; + p1.elemsDissolved[elem] = undefined; + } else { + if(e === null){ + deletePixel(p1.x, p1.y); + } else { + changePixel(p1, e); + } + } + } + if(r.elem2 != undefined){ + changePixel(p2, getItem(r.elem2)); + } + if(r.charge1){ + p1.charge = r.charge1; + } + if(r.charge2){ + p2.charge = r.charge2; + } + if(r.stain1){ + stainPixel(p1,r.stain1,0.05); + } + if(r.stain2){ + stainPixel(p2,r.stain2,0.05); + } + } else if (p2.element == "water"){ + for(let e2 in p2.elemsDissolved){ + if(elements[elem].reactions != undefined && elements[elem].reactions[e2] != undefined){ + let r = elements[elem].reactions[e2]; + if(r.tempMin && !((p1.temp >= r.tempMin) && (p2.temp >= r.tempMin))){ + return false; + } + if(r.tempMax && !((p1.temp <= r.tempMax) && (p2.temp <= r.tempMax))){ + return false; + } + if(r.charged && !(p1.charge || p2.charge)){ + return false; + } + let c = (r.chance != undefined) ? r.chance : 1; + c = c*((p1.elemsDissolved[elem]/100)/elements[elem].solubility.water); + if(Math.random() > c){ + return false; + } + if(r.aqFunc){ + r.aqFunc(p1, p2); + } + if(r.elem1 != undefined){ + let e = getItem(r.elem1); + if(elements[e].solubility != undefined && elements[e].solubility.water != undefined){ + p1.elemsDissolved[e] = p1.elemsDissolved[elem]; + p1.elemsDissolved[elem] = undefined; + } else { + if(e === null){ + deletePixel(p1.x, p1.y); + } else { + changePixel(p1, e); + } + } + } + if(r.elem2 != undefined){ + let e = getItem(r.elem2); + if(elements[e].solubility != undefined && elements[e].solubility.water != undefined){ + p2.elemsDissolved[e] = p1.elemsDissolved[elem]; + p2.elemsDissolved[elem] = undefined; + } else { + if(e === null){ + deletePixel(p2.x, p2.y); + } else { + changePixel(p2, e); + } + } + } + if(r.charge1){ + p1.charge = r.charge1; + } + if(r.charge2){ + p2.charge = r.charge2; + } + if(r.stain1){ + stainPixel(p1,r.stain1,0.05); + } + if(r.stain2){ + stainPixel(p2,r.stain2,0.05); + } + } + } + } + } + } + function updateColor(pixel){ + let c = pixel.oColor; + for(let element in pixel.elemsDissolved){ + //if(elements[element].solubility.color != undefined){ + let color = (elements[element].solubility.color != undefined) ? getItem(elements[element].solubility.color) : getItem(elements[element].color); + /*if(Array.isArray(elements[element].solubility.color)){ + color = elements[element].solubility.color[Math.round(Math.random()*elements[element].solubility.color.length)]; + while(color == undefined){ + color = elements[element].solubility.color[Math.round(Math.random()*elements[element].solubility.color.length)]; + } + } else { + color = elements[element].solubility.color; + }*/ + if(color.startsWith("#")){ + color = hexToRGB(color); + } else if(color.startsWith("rgb(")){ + color = getRGB(color); + } + c = interpolateRgb(getRGB(c), color, ((pixel.elemsDissolved[element]/100)/elements[element].solubility.water) || 0.01); + //console.log(rgb, color, getRGB(pixel.oColor), ((pixel.elemsDissolved[elem]/100)/elements[elem].solubility.water)); + + } + pixel.color = c; + //} + } + function solventTick(pixel) { + if(pixel.start = pixelTicks+5){ + pixel.oColor = pixel.color; + } + pixel.capacity = (1+((pixel.temp-20)/80))*100; + for(let coords of adjacentCoords){ + let x = pixel.x+coords[0], y = pixel.y+coords[1]; + let p2 = getPixel(x,y); + let total = 0; + for(let elem in pixel.elemsDissolved){ + total += pixel.capacity*((pixel.elemsDissolved[elem]/100)/elements[elem].solubility.water); + } + if(p2 != null){ + aqueousReaction(pixel, p2); + } + if(p2 != null && total < pixel.capacity){ + if(elements[p2.element].solubility != null && elements[p2.element].solubility[pixel.element] != null){ + let solubilityObj = elements[p2.element].solubility; + p2.dissolved = (p2.dissolved == undefined) ? elements[p2.element].solubility[pixel.element] : p2.dissolved+elements[p2.element].solubility[pixel.element]; + + if(pixel.elemsDissolved[p2.element] == undefined){ + pixel.elemsDissolved[p2.element] = elements[p2.element].solubility[pixel.element]; + } else { + pixel.elemsDissolved[p2.element] += elements[p2.element].solubility[pixel.element]; + } + updateColor(pixel, p2.element); + if(solubilityObj.func != undefined){ + solubilityObj.func(pixel, p2); + } + if(p2.dissolved >= 100){ + deletePixel(p2.x, p2.y); + } + } + } else if(total > (pixel.capacity+20) && p2 == null) { + let solArr = [], elemArr = []; + for(let elem in pixel.elemsDissolved){ + elemArr.push(elem); + solArr.push(elements[elem].solubility[pixel.element]); + } + let index = solArr.indexOf(Math.min(...solArr)); + if(isEmpty(x,y) && !outOfBounds(x,y)){ + createPixel(elemArr[index], x, y); + let max = (pixel.elemsDissolved[elemArr[index]] > (total-pixel.capacity)) ? total-pixel.capacity : pixel.elemsDissolved[elemArr[index]]; + pixelMap[x][y].dissolved = 100-max; + updateColor(pixel); + pixel.elemsDissolved[elemArr[index]] -= max; + } + } + else if (p2 != null && p2.element == "water"){ + for(let elem in pixel.elemsDissolved){ + if(p2.elemsDissolved[elem] == undefined) {p2.elemsDissolved[elem] = 0;}; + if(p2.elemsDissolved[elem] > pixel.elemsDissolved[elem] && pixel.elemsDissolved[elem]/100 < elements[elem].solubility[pixel.element]){ + p2.elemsDissolved[elem]--; + pixel.elemsDissolved[elem]++; + updateColor(pixel); + updateColor(p2); + } else if (p2.elemsDissolved[elem] < pixel.elemsDissolved[elem] && p2.elemsDissolved[elem]/100 < elements[elem].solubility[pixel.element]) { + p2.elemsDissolved[elem]++; + pixel.elemsDissolved[elem]--; + updateColor(pixel); + updateColor(p2); + } + } + } + } + if(pixel.temp >= elements[pixel.element].solventTempHigh){ + let elem = null; + let num = Math.random(); + if(elem === null){ + for(let e in pixel.elemsDissolved){ + if(num <= ((pixel.elemsDissolved[e]/100)/elements[e].solubility.water)){ + elem = e; + } + } + } + elem = (elem == null) ? "steam" : elem; + changePixel(pixel, elem); + pixel.dissolvedElems = {}; + } + } + behaviors.SOLVENT = function(pixel){ + let visc = 0; + for(let elem in pixel.elemsDissolved){ + if(elements[elem].solubility.visc != undefined){ + visc += ((pixel.elemsDissolved[elem]/100)/elements[elem].solubility[pixel.element])*elements[elem].solubility.visc; + } + } + if(elements[pixel.element].viscosity != undefined){ + visc = visc*(elements[pixel.element].viscosity/1000); + } + let chance = 1-(visc/1000); + let dir = (Math.random() Date: Sat, 11 Oct 2025 22:15:31 -0500 Subject: [PATCH 11/11] Update mod-list.html Added solubility.js under science and chemistry --- mod-list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mod-list.html b/mod-list.html index d66c98aa..d9ed8b19 100644 --- a/mod-list.html +++ b/mod-list.html @@ -243,6 +243,7 @@ radioactive.jsRadioactive elements on the periodic table [WIP]kaeud random_rocks.jsRandomly generates rocks on game loadAlice roseyiede.jsSeveral variants of a substance called roseyiedeAlice +solubility.jsAdds solubility and a simple-to-use format for other mods to use with itOrchid some_tf_liquids.jsVarious liquids from the Thermal Foundation Minecraft modAlice stickystuff.jsSlime, Honey, and others can stick to other elementsSuss the_ground.jsSeveral rocks, worldgen types, and gemstonesAlice