From b03c90ecbf91e62f649e97c3b63f3ea15d39df33 Mon Sep 17 00:00:00 2001 From: PumpkinPriest <104536541+PumpkinPriest@users.noreply.github.com> Date: Sun, 4 Jun 2023 09:28:38 -0400 Subject: [PATCH 001/110] Update random_things.js --- mods/random_things.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/random_things.js b/mods/random_things.js index 6c7755ee..4fe9c1f0 100644 --- a/mods/random_things.js +++ b/mods/random_things.js @@ -3,7 +3,7 @@ elements.legendary_energy = { color: "#13d649", behavior: [ "XX|XX|XX", - "XX|EX:90>plasma,plasma,plasma,plasma,radon,radon,radon,radon,radon,radon,molten_iron,molten_uranium,molten_lead AND CH:light|XX", + "XX|EX:80>plasma,plasma,plasma,plasma,radon,radon,radon,radon,radon,radon,molten_iron,molten_uranium,molten_lead AND CH:light|XX", "XX|XX|XX", ], temp: 99999999700, From 706b2934486cc049e10e5808415b635b01f5996a Mon Sep 17 00:00:00 2001 From: PumpkinPriest <104536541+PumpkinPriest@users.noreply.github.com> Date: Sun, 4 Jun 2023 11:23:12 -0400 Subject: [PATCH 002/110] Update random_things.js --- mods/random_things.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/random_things.js b/mods/random_things.js index 4fe9c1f0..4c37e214 100644 --- a/mods/random_things.js +++ b/mods/random_things.js @@ -3,7 +3,7 @@ elements.legendary_energy = { color: "#13d649", behavior: [ "XX|XX|XX", - "XX|EX:80>plasma,plasma,plasma,plasma,radon,radon,radon,radon,radon,radon,molten_iron,molten_uranium,molten_lead AND CH:light|XX", + "XX|EX:90>plasma,plasma,plasma,plasma,radon,radon,radon,radon,radon,radon,molten_iron,molten_uranium,legendary_energy AND CH:light|XX", "XX|XX|XX", ], temp: 99999999700, From a463d2a0e3d86c4e4170928caa21136e24ec2ff5 Mon Sep 17 00:00:00 2001 From: PumpkinPriest <104536541+PumpkinPriest@users.noreply.github.com> Date: Sun, 4 Jun 2023 11:24:42 -0400 Subject: [PATCH 003/110] Update random_things.js --- mods/random_things.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/random_things.js b/mods/random_things.js index 4c37e214..6c7755ee 100644 --- a/mods/random_things.js +++ b/mods/random_things.js @@ -3,7 +3,7 @@ elements.legendary_energy = { color: "#13d649", behavior: [ "XX|XX|XX", - "XX|EX:90>plasma,plasma,plasma,plasma,radon,radon,radon,radon,radon,radon,molten_iron,molten_uranium,legendary_energy AND CH:light|XX", + "XX|EX:90>plasma,plasma,plasma,plasma,radon,radon,radon,radon,radon,radon,molten_iron,molten_uranium,molten_lead AND CH:light|XX", "XX|XX|XX", ], temp: 99999999700, From a312af501f34b8d06a023f86ce8b4586207bdf5f Mon Sep 17 00:00:00 2001 From: PumpkinPriest <104536541+PumpkinPriest@users.noreply.github.com> Date: Sun, 4 Jun 2023 11:29:11 -0400 Subject: [PATCH 004/110] random_things.js --- mods/random_things.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/random_things.js b/mods/random_things.js index 6c7755ee..4c37e214 100644 --- a/mods/random_things.js +++ b/mods/random_things.js @@ -3,7 +3,7 @@ elements.legendary_energy = { color: "#13d649", behavior: [ "XX|XX|XX", - "XX|EX:90>plasma,plasma,plasma,plasma,radon,radon,radon,radon,radon,radon,molten_iron,molten_uranium,molten_lead AND CH:light|XX", + "XX|EX:90>plasma,plasma,plasma,plasma,radon,radon,radon,radon,radon,radon,molten_iron,molten_uranium,legendary_energy AND CH:light|XX", "XX|XX|XX", ], temp: 99999999700, From 6e4d9d1103d2631c55ad5828ce303099a81a04b3 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:07:38 -0500 Subject: [PATCH 005/110] Update mod-list.html --- mod-list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mod-list.html b/mod-list.html index 7c636f54..f922d884 100644 --- a/mod-list.html +++ b/mod-list.html @@ -163,6 +163,7 @@ clone_liquid.jsAdds a liquid form of clonerAlice conveyance.jsConveyors, operated with and without electricityMelecie flipflop.jsToggleable switches; ExplanationFlix +gameOfLife.jsConway's Game of Life on a screenggod note_block.jsAdds musical Note BlocksAlice portal.jsAdds portals that can teleport pixelsAlice pushers.jsAdds pixels that push elements away from themAlice From 871f80403a3040f8da8b2ab1d0b5c7749b353510 Mon Sep 17 00:00:00 2001 From: feeshmaster <125420779+feeshmaster@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:36:04 -0600 Subject: [PATCH 006/110] Create debugRework.js --- mods/debugRework.js | 169 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 mods/debugRework.js diff --git a/mods/debugRework.js b/mods/debugRework.js new file mode 100644 index 00000000..5350917f --- /dev/null +++ b/mods/debugRework.js @@ -0,0 +1,169 @@ +let cssForDebug = ` +#debugParent { + display: none; +} + +#debugXButton { + position: absolute; + right: 0px; + top: 0px; + font-size: 2em; + background-color: rgb(100, 33, 33); + padding:5px; + text-align:center; + border: 1px solid #ffffff; + z-index: 12; +} +#debugXButton:hover { + background-color: rgb(200, 33, 33); +} + +#debugMenuTitle { + position: absolute; + left: 175px; + font-size: 1.5em; + text-decoration: underline; + color: white; +} +#debugStats { + margin-top: 5px; + line-height: 1.5em; + color: white; +} + +#debugLiveButton { + position: absolute; + left: 0px; + top: 0px; + font-size: 2em; + background-color: rgb(100, 33, 33); + padding:5px; + text-align:center; + border: 1px solid #ffffff; + z-index: 12; +} + + + +#debugLiveButton.live { + background-color: #24fc03; +} + +#debugLiveButton.live:hover { + background-color: #50ff36; +} + +#debugStatList { + position: absolute; + border: 1px solid #ffffff; + left: 50%; + top: 5%; + transform: translate(-50%, 0%); + width: 95%; + height: 50%; + max-width: 700px; + padding: 10px; + background-color: rgb(31, 31, 31); + overflow-x: hidden; + z-index: 10; +} +`, + head = document.head || document.getElementsByTagName('head')[0], + style = document.createElement('style'); + +head.appendChild(style); + +style.type = 'text/css'; +if (style.styleSheet) { + style.styleSheet.cssText = cssForDebug; +} else { + style.appendChild(document.createTextNode(cssForDebug)); +}; +let debugMenu = document.createElement("div"); +debugMenu.innerHTML = ` + ` +document.getElementById("gameDiv").appendChild(debugMenu); +var statChangeInterval; +let live = false; +let openedByClick = true; +let debugToggle = false; +var output; +var targetedPixel; +elements.debug = { + color: ["#b150d4", "#d1b74f"], + tool: function(pixel) { + startDebugUi(pixel); + }, + maxSize: 1, + category: "tools" +} + +function startDebugUi(pixel) { + if (debugToggle) return; + targetedPixel = pixel; + mouseIsDown = false; + shiftDown = false; + output = targetedPixel.element.toUpperCase() + " at x" + targetedPixel.x + ", y" + targetedPixel.y + ", tick: " + pixelTicks + `
`; + for (let i in targetedPixel) { + if (i !== "x" && i !== "y" && i !== "element") { + output += " " + i + ": " + targetedPixel[i] + `
`; + } + } + statChangeInterval = setInterval(statChange, 1000/tps); + document.getElementById("debugParent").style.display = "block"; + document.getElementById("debugStats").innerHTML = output; + debugToggle = true; + + setTimeout(() => { + openedByClick = false; + document.addEventListener('click', clickHandler); + }, 0); +}; + +function closeDebugUi() { + if (!debugToggle) return; + openedByClick = true; + document.getElementById("debugParent").style.display = "none"; + debugToggle = false; + document.removeEventListener('click', clickHandler); + clearInterval(statChangeInterval); +} + +function clickHandler(event) { + const modParent = document.getElementById("debugParent"); + + if (event.target !== modParent && !modParent.contains(event.target)) { + closeDebugUi(); + } +} + +function startDebugLive() { + live = !live; + + document.getElementById("debugLiveButton").classList.toggle("live"); + +} +function statChange() { + if (live == true) { + output = targetedPixel.element.toUpperCase() + " at x" + targetedPixel.x + ", y" + targetedPixel.y + ", tick" + pixelTicks + `
`; + for (let i in targetedPixel) { + if (i !== "x" && i !== "y" && i !== "element") { + output += " " + i + ": " + targetedPixel[i] + `
`; + } + } + document.getElementById("debugStats").innerHTML = output; + } +} + From 507ec784e90691f032b47fc5b99400333901e8b6 Mon Sep 17 00:00:00 2001 From: feeshmaster <125420779+feeshmaster@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:44:01 -0600 Subject: [PATCH 007/110] Update debugRework.js --- mods/debugRework.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/debugRework.js b/mods/debugRework.js index 5350917f..52ea5606 100644 --- a/mods/debugRework.js +++ b/mods/debugRework.js @@ -157,7 +157,7 @@ function startDebugLive() { } function statChange() { if (live == true) { - output = targetedPixel.element.toUpperCase() + " at x" + targetedPixel.x + ", y" + targetedPixel.y + ", tick" + pixelTicks + `
`; + output = targetedPixel.element.toUpperCase() + " at x" + targetedPixel.x + ", y" + targetedPixel.y + ", tick: " + pixelTicks + `
`; for (let i in targetedPixel) { if (i !== "x" && i !== "y" && i !== "element") { output += " " + i + ": " + targetedPixel[i] + `
`; From 1b828c04501d1e4cf9afafad7e2bd4ab80295137 Mon Sep 17 00:00:00 2001 From: feeshmaster <125420779+feeshmaster@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:01:50 -0600 Subject: [PATCH 008/110] Update debugRework.js --- mods/debugRework.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/debugRework.js b/mods/debugRework.js index 52ea5606..ca437ff2 100644 --- a/mods/debugRework.js +++ b/mods/debugRework.js @@ -129,7 +129,7 @@ function startDebugUi(pixel) { setTimeout(() => { openedByClick = false; document.addEventListener('click', clickHandler); - }, 0); + }, 1000); }; function closeDebugUi() { From 7d7356a515e83e552b6e95e5ce060fb7cba82ec5 Mon Sep 17 00:00:00 2001 From: Cerulean <123337485+ceruleanminecraft@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:40:57 -0600 Subject: [PATCH 009/110] Create coffee.js Version 1.0 of the coffee mod - a mod all about coffee! :) --- mods/coffee.js | 228 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 mods/coffee.js diff --git a/mods/coffee.js b/mods/coffee.js new file mode 100644 index 00000000..f097fc49 --- /dev/null +++ b/mods/coffee.js @@ -0,0 +1,228 @@ +// Coffee Mod - Since coffee has been confirmed for a future update, I wanted to see what it might be like :) +// Created by Cerulean - special thanks to ggod :D +// If you have any suggestions for the mod, please leave a dm at @playblooket on discord (me) +// I'm not a pro modder, don't expect much lololol +// Version 1.0 // Last update - Nov 22 + +elements.coffee = { + color: "#22120d", + behavior: behaviors.LIQUID, + temp: 75, + category: "food", + viscosity: 27, + tempHigh: 200, + stateHigh: ["steam", "fragrance"], + tempLow: 4, + stateLow: "iced_coffee", + state: "liquid", + density: 308 +}; + +elements.iced_coffee = { + color: "#271f1c", + behavior: behaviors.LIQUID, + temp: -5, + category: "food", + viscosity: 35, + state: "liquid", + tempHigh: 10, + stateHigh: "coffee", + tempLow: -20, + stateLow: ["ice", "ground_coffee_bean"], + density: 308 +}; + +elements.latte = { + color: "#92817b", + behavior: behaviors.LIQUID, + temp: 75, + category: "food", + viscosity: 20, + tempHigh: 200, + stateHigh: ["steam", "fragrance"], + tempLow: 4, + stateLow: "iced_latte", + state: "liquid", + density: 822 +}; + +elements.iced_latte = { + color: "#271f1c", + behavior: behaviors.LIQUID, + temp: -5, + category: "food", + viscosity: 35, + state: "liquid", + tempHigh: 10, + stateHigh: "latte", + tempLow: -20, + stateLow: ["ice", "ground_coffee_bean", "creamer"], + density: 822 +}; + +elements.creamer = { + color: "#efe8e4", + behavior: behaviors.LIQUID, + category: "food", + viscosity: 5, + state: "liquid", + tempLow: -25, + stateLow: "ice_cream", + tempHigh: 150, + stateHigh: ["steam", "oil", "sugar"], + density: 500 +}; + +elements.coffee_bean = { + color: "#552717", + behavior: behaviors.POWDER, + category: "food", + viscosity: 1, + state: "solid", + tempLow: -20, + stateLow: "frozen_coffee_bean", + tempHigh: 200, + stateHigh: "roasted_coffee_bean", + breakInto: ["coffee_grounds", "ground_coffee_bean"], + density: 500 +}; + +elements.coffee_grounds = { + color: "#34160b", + behavior: behaviors.POWDER, + category: "powders", + viscosity: 1, + state: "solid", + tempHigh: 1200, + stateHigh: "molten_dirt", + tempLow: -50, + stateLow: "permafrost", + density: 550 +}; + +elements.ground_coffee_bean = { + color: "#552717", + behavior: behaviors.POWDER, + category: "food", + viscosity: 1, + state: "solid", + tempHigh: 200, + stateHigh: "roasted_ground_coffee_bean", + tempLow: -20, + stateLow: "frozen_coffee_bean", + density: 450 +}; + +elements.frozen_coffee_bean = { + color: "#5d4037", + behavior: behaviors.POWDER, + temp: -25 + category: "food", + viscosity: 1, + state: "solid", + tempHigh: -10, + stateHigh: "coffee_bean", + density: 550 +}; + +elements.frozen_ground_coffee_bean = { + color: "#533328", + behavior: behaviors.POWDER, + temp: -25 + category: "food", + viscosity: 1, + state: "solid", + tempLow: -10, + stateLow: "ground_coffee_bean", + density: 600 +}; + +elements.roasted_ground_coffee_bean = { + color: "#803e29", + behavior: behaviors.POWDER, + temp: 150 + category: "food", + viscosity: 1, + state: "solid", + tempHigh: 350, + stateHigh: "ash", + tempLow: -20, + stateLow: "frozen_ground_coffee_bean", + density: 350 +}; + +elements.roasted_coffee_bean = { + color: "#9e5842", + behavior: behaviors.POWDER, + category: "food", + viscosity: 1, + state: "solid", + tempLow: -20, + stateLow: "frozen_coffee_bean", + tempHigh: 300, + stateHigh: "ash", + breakInto: ["coffee_grounds", "roasted_ground_coffee_bean"] + density: 400 +}; + +elements.toffee = { + color: "#bf8d5f", + behavior: behaviors.POWDER, + category: "food", + viscosity: 1, + state: "solid", + tempHigh: 186, + stateHigh: "sugar", + breakInto: ["sugar", "h_bomb"] + density: 1000 +}; + +elements.espresso = { + color: "#170701", + behavior: behaviors.LIQUID, + temp: 75, + category: "food", + viscosity: 27, + tempHigh: 200, + stateHigh: ["steam", "fragrance"], + tempLow: 4, + stateLow: "iced_espresso", + state: "liquid", + density: 700 +}; + +elements.iced_espresso = { + color: "#2a1a12", + behavior: behaviors.LIQUID, + temp: -5, + category: "food", + viscosity: 35, + state: "liquid", + tempHigh: 10, + stateHigh: "espresso", + tempLow: -20, + stateLow: ["ice", "roasted_ground_coffee_bean"], + density: 700 +}; + +elements.cacaoffee = { + color: "#33180b", + behavior: behaviors.LIQUID, + temp: 75, + category: "food", + viscosity: 27, + tempHigh: 200, + stateHigh: ["steam", "melted_chocolate"], + tempLow: 4, + stateLow: ["chocolate", "iced_coffee"], + state: "liquid", + density: 308 +}; + +elements.milk.reactions.coffee = { "elem1":"latte"}; +elements.creamer.reactions.coffee = { "elem1":"latte"}; +elements.milk.reactions.ground_coffee_bean = { "elem1":"latte"}; +elements.creamer.reactions.roasted_ground_coffee_bean = { "elem1":"espresso"}; +elements.water.reactions.ground_coffee_bean = { "elem1":"coffee"}; +elements.water.reactions.coffee_grounds = { "elem1":"mud"}; +elements.chocolate.reactions.coffee = { "elem1":"latte"}; From 4bb3b2c9ed12f963ed12ccb27f2b94cb43c0ac05 Mon Sep 17 00:00:00 2001 From: feeshmaster <125420779+feeshmaster@users.noreply.github.com> Date: Sat, 25 Nov 2023 20:32:07 -0600 Subject: [PATCH 010/110] Update pixelResizeTool.js --- mods/pixelResizeTool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/pixelResizeTool.js b/mods/pixelResizeTool.js index 5f35bb2c..beccf27c 100644 --- a/mods/pixelResizeTool.js +++ b/mods/pixelResizeTool.js @@ -3,7 +3,7 @@ pixelResizeButton.onclick = function(pixel) { let canvas_width = document.getElementById("game").width; let canvas_height = document.getElementById("game").height; let pixelSizeNeeded = prompt("How big should pixels be?"); - if (!pixelSizeNeeded) { return } + if (!pixelSizeNeeded || isNAN(pixelSizeNeeded)) { alert('number is invalid!'); return; } resizeCanvas(canvas_height,canvas_width, parseFloat(pixelSizeNeeded), true); }; pixelResizeButton.textContent = "Resize"; From 4d295cb22adf31c04798d0296b49cf769d36b64d Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Sun, 26 Nov 2023 15:00:56 -0500 Subject: [PATCH 011/110] Add files via upload --- mods/nouserscaesium.js | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 mods/nouserscaesium.js diff --git a/mods/nouserscaesium.js b/mods/nouserscaesium.js new file mode 100644 index 00000000..74dbcb12 --- /dev/null +++ b/mods/nouserscaesium.js @@ -0,0 +1,47 @@ +elements.caesium = { +color: ["#917921", "#ebcb59", "#a48b2d", "#d6b84c"], +behavior: behaviors.SOLID, +category: "solids", +state: "solid", +tempHigh: 28.44, +stateHigh: "molten_caesium", +density: 1873, +reactions: { + "water": { "elem1":"pop", "elem2":"hydrogen" }, + "sugar_water": { "elem1":"pop", "elem2":"hydrogen" }, + "dirty_water": { "elem1":"pop", "elem2":"hydrogen" }, + "pool_water": { "elem1":"pop", "elem2":"hydrogen" }, + "salt_water": { "elem1":"pop", "elem2":"hydrogen" }, + "seltzer": { "elem1":"pop", "elem2":"hydrogen" }, + } +}; +elements.molten_caesium = { + color: ["#735c0a", "#a68e37", "#7e6715", "#9b832e"], + behavior: behaviors.LIQUID, + category: "states", + state: "liquid", + tempLow: 27.44, + stateLow: "caesium", + tempHigh: 671, + stateHigh: "caesium_vapor", + density: 1843, + temp: 29, + reactions: { + "water": { "elem1":"pop", "elem2":"hydrogen" }, + "sugar_water": { "elem1":"pop", "elem2":"hydrogen" }, + "dirty_water": { "elem1":"pop", "elem2":"hydrogen" }, + "pool_water": { "elem1":"pop", "elem2":"hydrogen" }, + "salt_water": { "elem1":"pop", "elem2":"hydrogen" }, + "seltzer": { "elem1":"pop", "elem2":"hydrogen" }, + } +}; +elements.caesium_vapor = { + color: ["#d89e77", "#cd9064", "#af6f34", "#a26320"], + behavior: behaviors.GAS, + category: "states", + state: "gas", + tempLow: 660, + stateLow: "molten_caesium", + density: 1.7, + temp: 700 +} \ No newline at end of file From 9534ecaeced3fc102ba9c5e346e9ec86939da1a8 Mon Sep 17 00:00:00 2001 From: lllllllllwith10ls <38187754+lllllllllwith10ls@users.noreply.github.com> Date: Sun, 26 Nov 2023 14:42:12 -0600 Subject: [PATCH 012/110] mixture.js and chem.js is free from the dependency hell --- mods/chem.js | 22 +- mods/mixture.js | 716 +++++++++++++++++++++++++++++++++++++++ mods/runAfterAutogen2.js | 6 +- 3 files changed, 727 insertions(+), 17 deletions(-) create mode 100644 mods/mixture.js diff --git a/mods/chem.js b/mods/chem.js index ed95088f..520af9f2 100644 --- a/mods/chem.js +++ b/mods/chem.js @@ -16,10 +16,6 @@ function whenAvailable(names, callback) { } }, interval); } -var runAfterAutogenMod = "mods/runAfterAutogen2.js"; -if(enabledMods.includes(runAfterAutogenMod)){ -whenAvailable(["runAfterAutogen"], function() { - elements.fluorine = { color: "#FFFFBF", @@ -1854,8 +1850,9 @@ elements.molten_potassium = { elements.potassium_gas = { color: "#5e6fdb" }; +elements.molten_salt = {}; +elements.molten_potassium_salt = {}; -runAfterAutogen(function() { elements.molten_salt.reactions = {}; elements.molten_salt.reactions.aluminum = { elem1:["sodium","chlorine"], charged:true, chance:0.0025 }; elements.molten_salt.reactions.zinc = { elem1:["sodium","chlorine"], charged:true, chance:0.015 }; @@ -1883,13 +1880,14 @@ runAfterAutogen(function() { elements.molten_potassium_salt.reactions.silver = { elem1:["potassium","chlorine"], charged:true, chance:0.0075 }; elements.molten_potassium_salt.reactions.gold = { elem1:["potassium","chlorine"], charged:true, chance:0.0075 }; elements.molten_potassium_salt.conduct = 0.7; - delete elements.molten_potassium_salt.burn; - delete elements.molten_potassium.burn; + elements.molten_potassium_salt.burn = 0; + elements.molten_potassium.burn = 0; //Hall–Heroult process + elements.molten_cryolite_solution = {}; elements.molten_cryolite_solution.reactions = {}; elements.molten_cryolite_solution.reactions.charcoal = { elem1:"molten_aluminum", elem2:"carbon_dioxide" }; -}); + elements.niter = { color: "#f0efcc", @@ -2654,10 +2652,4 @@ elements.bless.reactions["liquid_sulfur_dioxide"] = {elem2: "oxygen"}; elements.bless.reactions["sulfur_dioxide_ice"] = {elem2: "oxygen"}; elements.bless.reactions["hydrogen_sulfide"] = {elem2: "hydrogen"}; elements.bless.reactions["liquid_hydrogen_sulfide"] = {elem2: "hydrogen"}; -elements.bless.reactions["rocket_fuel"] = {elem2: null}; -}); -} else { - if(!enabledMods.includes(runAfterAutogenMod)) { enabledMods.unshift(runAfterAutogenMod) }; - localStorage.setItem("enabledMods", JSON.stringify(enabledMods)); - alert(`The "${runAfterAutogenMod}" is required and have been automatically inserted (reload for this to take effect).`); -}; \ No newline at end of file +elements.bless.reactions["rocket_fuel"] = {elem2: null}; \ No newline at end of file diff --git a/mods/mixture.js b/mods/mixture.js new file mode 100644 index 00000000..eada089f --- /dev/null +++ b/mods/mixture.js @@ -0,0 +1,716 @@ +/* WARNING: not finished */ + + + +function whenAvailable(names, callback) { + var interval = 10; // ms + window.setTimeout(function() { + let bool = true; + for(let i = 0; i < names.length; i++) + { + if(!window[names[i]]) + { + bool = false; + } + } + if (bool) { + callback(); + } else { + whenAvailable(names, callback); + } + }, interval); +} +var runAfterAutogenMod = "mods/runAfterAutogen2.js"; + +function getName(elementList) +{ + let name = elementList.join(); + if(nameList[name]) + { + name = nameList[name]; + } + else + { + elementList = elementList.filter(function(item, pos, self) { + return self.indexOf(item) == pos; + }); + + let name = elementList.join(); + } + return name; +} + +function makeColors(elementList) +{ + let colors = []; + for(let i = 0; i < predefinedColors.length; i++) + { + if(predefinedColors[i][1].every(val => elementList.includes(val) + && predefinedColors[i][1].filter(el => el === val).length + <= + elementList.filter(el => el === val).length + )) + { + color = predefinedColors[i][0]; + if(color instanceof Array) + { + color = color.map((c) => "rgb("+hexToRGB(c).r+","+hexToRGB(c).g+","+hexToRGB(c).b+")"); + colors.push(color); + } + else + { + colors.push(["rgb("+hexToRGB(color).r+","+hexToRGB(color).g+","+hexToRGB(color).b+")"]); + } + for(let j = 0; j < predefinedColors[i][1].length; j++) + { + let index = elementList.indexOf(predefinedColors[i][1][j]); + if (index > -1) { // only splice array when item is found + elementList.splice(index, 1); // 2nd parameter means remove one item only + } + } + } + } + colors = colors.concat(elementList.map((c) => elements[c].color instanceof Array ? elements[c].color : [elements[c].color])); + return colors; +} + +function mixture(elementList) +{ + elementList.sort(); + + let name = getName(elementList); + + + if(!elements[name]) + { + elements[name] = true; + let minTempHigh = Infinity; + let stateHigh = null; + let indexStateHigh = -1; + + let maxTempLow = -Infinity; + let stateLow = null; + let indexStateLow = -1; + + + for(let i = 0; i < elementList.length; i++) + { + if(elements[elementList[i]]) + { + if(typeof elements[elementList[i]].tempHigh === "number" && elements[elementList[i]].stateHigh) + { + if(elements[elementList[i]].tempHigh < minTempHigh) + { + minTempHigh = elements[elementList[i]].tempHigh; + indexStateHigh = i; + stateHigh = elements[elementList[i]].stateHigh; + } + } + + if(typeof elements[elementList[i]].tempLow === "number" && elements[elementList[i]].stateLow) + { + if(elements[elementList[i]].tempLow > maxTempLow) + { + maxTempLow = elements[elementList[i]].tempLow; + indexStateLow = i; + stateLow = elements[elementList[i]].stateLow; + } + } + } + } + let elementList2 = elementList.slice(); + let elementHigh = null; + let gasesOk = gasOk(elementList); + if(indexStateHigh >= 0 && gasesOk) + { + if(stateHigh instanceof Array) + { + elementHigh = []; + for(let i = 0; i < stateHigh.length; i++) + { + elementList2[indexStateHigh] = stateHigh[i]; + if(isValidMixture(elementList2)) + { + elementHigh.push(mixture(elementList2)); + } + } + } + else + { + elementList2[indexStateHigh] = stateHigh; + if(isValidMixture(elementList2)) + { + elementHigh = mixture(elementList2); + } + else + { + minTempHigh = Infinity; + elementHigh = null; + } + } + } + + let elementList3 = elementList.slice(); + let elementLow = null; + if(indexStateLow >= 0 && gasesOk) + { + if(stateLow instanceof Array) + { + elementLow = []; + for(let i = 0; i < stateLow.length; i++) + { + elementList3[indexStateLow] = stateLow[i]; + if(isValidMixture(elementList3)) + { + elementLow.push(mixture(elementList3)); + } + } + } + else + { + elementList3[indexStateLow] = stateLow; + if(isValidMixture(elementList3)) + { + elementLow = mixture(elementList3); + } + else + { + maxTempLow = -Infinity; + elementLow = null; + } + } + } + + if(elementHigh instanceof Array && elementHigh.length === 0) + { + minTempHigh = Infinity; + elementHigh = null; + } + if(elementLow instanceof Array && elementLow.length === 0) + { + maxTempLow = -Infinity; + elementLow = null; + } + + let colors = makeColors(elementList.slice()); + let colors2 = []; + let maxLength = Math.max(...(colors.map((c) => c.length))); + + for(let i = 0; i < maxLength; i++) + { + let colors3 = []; + for(let j = 0; j < colors.length; j++) + { + colors3.push(toObject(colors[j][i%colors[j].length])); + } + colors2.push(averageRGB(colors3)); + } + let temp = airTemp; + if(maxTempLow < airTemp && minTempHigh > airTemp) + { + + } + else if(maxTempLow > -Infinity && minTempHigh < Infinity) + { + temp = (maxTempLow + minTempHigh)/2; + } + else if(maxTempLow > -Infinity) + { + temp = maxTempLow+20; + } + else if(minTempHigh < Infinity) + { + temp = Math.max(minTempHigh-20,absoluteZero); + } + + let movable = !elementList.some((c) => !elements[c].movable); + + let density = elementList.map((c) => elements[c].density ? elements[c].density : 0).reduce((a,b)=>a+b)/elementList.length; + let stain = elementList.map((c) => elements[c].stain ? elements[c].stain : 0).reduce((a,b)=>a+b)/elementList.length; + + if(elementList.some((c) => c.includes("molten")) || elementList.some((c) => c.includes("magma"))) + { + movable = true; + } + + let states = elementList.map((c) => elements[c].state); + if(!gasesOk) + { + state = "gas"; + density = 0; + } + else if(!movable) + { + state = "solid"; + } + else if(states.includes("liquid")) + { + state = "liquid"; + } + else + { + state = "solid"; + } + + elements[name] = { + color: colors2.length == 1 ? colors2[0] : colors2, + colorObject: colors2.length == 1 ? toObject(colors2[0]) :colors2.map((c) => toObject(c)), + tick: function(pixel) { + checkReactions(pixel, elements[pixel.element].mixture); + mixtureBehavior(pixel, elements[pixel.element].mixture); + doDefaults(pixel); + }, + tempHigh: minTempHigh, + stateHigh: elementHigh, + tempLow: maxTempLow, + stateLow: elementLow, + temp: temp, + category: "mixture", + mixture: elementList, + movable: movable, + density: density, + state: state, + stain: stain, + reactions: {}, + }; + + elementCount++; + elements[name].hidden = true; + hiddenCount++; + elements[name].id = nextid++; + document.getElementById("extraInfo").innerHTML = "

There are " + elementCount + " elements, including " + hiddenCount + " hidden ones.

©2021-" + new Date().getFullYear() + ". All Rights Reserved. R74n

"; //update extra info counts (and the copyright year, due to the method used) + } + else if(!elements[name].mixture) + { + elements[name].mixture = elementList; + let tick = elements[name].tick; + if(!elements[name].reactions) + { + elements[name].reactions = {}; + } + elements[name].tick = function(pixel) { + checkReactions(pixel, elements[pixel.element].mixture); + if(typeof tick === "function") + { + tick(pixel); + } + } + } + return name; +} + +function checkReactions(pixel, elementList) +{ + for (let i = -1; i <= 1; i++) + { + for (let j = -1; j <= 1; j++) + { + if (!(i === 0 && j === 0) && !isEmpty(pixel.x+i,pixel.y+j,true) + && !elements[pixel.element].reactions[pixelMap[pixel.x+i][pixel.y+j].element]) + { + let otherElement = pixelMap[pixel.x+i][pixel.y+j].element; + let otherList = [otherElement]; + if(elements[otherElement].mixture) + { + otherList = elements[otherElement].mixture; + } + let list = elements[pixel.element]; + if(compatableMix(elements[pixel.element].mixture,otherList)) + { + elements[pixel.element].reactions[otherElement] = {elem1: mixture(elements[pixel.element].mixture.concat(otherList)),elem2:null};; + } + else + { + elements[pixel.element].reactions[otherElement] = {}; + } + } + } + } +} + +function mixtureBehavior(pixel, elementList) +{ + let gasesOk = gasOk(elementList); + let gases = elementList.filter((c) => elements[c].state === "gas"); + if(!gasesOk) + { + let neighbors = [ [-1,0], [1,0], [0,-1], [0,1] ] + let randomNeighbor = neighbors[Math.floor(Math.random() * neighbors.length)] + let randomGas = gases[Math.floor(Math.random() * gases.length)] + let rnx = randomNeighbor[0]; + let rny = randomNeighbor[1]; + if(isEmpty(pixel.x+rnx, pixel.y+rny, false)) { + let index = elementList.indexOf(randomGas); + if (index > -1) { + createPixel(randomGas, pixel.x+rnx, pixel.y+rny); + currentPixels[currentPixels.length-1].temp = pixel.temp; + changePixel(pixel, mixture(elementList.slice(0, index).concat(elementList.slice(index+1)))); + return; + } + } + behaviors.GAS(pixel); + return; + } + let states = elementList.map((c) => elements[c].state); + if(elementList.some((c) => c.includes("molten")) || elementList.some((c) => c.includes("magma"))) + { + pixelTick(pixel,behaviors.MOLTEN); + } + else if(!elements[pixel.element].movable) + { + return; + } + else if(states.includes("liquid")) + { + if(elementList.includes("carbon_dioxide")) + { + pixelTick(pixel,elements.soda.behavior); + } + else + { + behaviors.LIQUID(pixel); + } + } + else + { + behaviors.POWDER(pixel); + } +} + +function toObject(color) +{ + color = color.match(/\d+/g); + return { + r: parseInt(color[0]), + g: parseInt(color[1]), + b: parseInt(color[2]) + }; +} + +function averageRGB2(colors) +{ + return toObject(averageRGB(colors.map((d) => (toObject(d))))); +} + +function averageRGB(rgblist) { + var r = 0; + var g = 0; + var b = 0; + for (var i = 0; i < rgblist.length; i++) { + var rgb = rgblist[i]; + r += parseInt(rgb.r); + g += parseInt(rgb.g); + b += parseInt(rgb.b); + } + r = Math.floor(r/rgblist.length); + g = Math.floor(g/rgblist.length); + b = Math.floor(b/rgblist.length); + return "rgb("+r+","+g+","+b+")"; +} + + +function blendColors(colorA, colorB, amount = 0.5) { + const [rA, gA, bA] = colorA.match(/\w\w/g).map((c) => parseInt(c, 16)); + const [rB, gB, bB] = colorB.match(/\w\w/g).map((c) => parseInt(c, 16)); + const r = Math.round(rA + (rB - rA) * amount).toString(16).padStart(2, '0'); + const g = Math.round(gA + (gB - gA) * amount).toString(16).padStart(2, '0'); + const b = Math.round(bA + (bB - bA) * amount).toString(16).padStart(2, '0'); + return '#' + r + g + b; +} + +let mixtureGroups = []; + +function compatableMix(list1,list2) +{ + if(!gasOk(list1.concat(list2))) + { + return false; + } + for(let i = 0; i < mixtureGroups.length; i++) + { + if(list1.concat(list2).every(val => mixtureGroups[i].includes(val) + && list1.concat(list2).filter(el => el === val).length + <= + mixtureGroups[i].filter(el => el === val).length + )) + { + return true; + } + } + return false; +} + +function mixture2(elementList) +{ + mixtureGroups.push(elementList); + for(let i = 0; i < elementList.length; i++) + { + for(let j = i+1; j < elementList.length; j++) + { + if(compatableMix([elementList[i]],[elementList[j]])) + { + if(!elements[elementList[i]].reactions) + { + elements[elementList[i]].reactions = {}; + } + elements[elementList[i]].reactions[elementList[j]] = {elem1: mixture([elementList[i],elementList[j]]),elem2:null}; + } + } + } + mixture3(elementList,[],0); +} + +function mixture3(elementList, list, n) +{ + if(list.length > 0) + { + mixture(list); + } + if(n < elementList.length) + { + mixture3(elementList,list,n+1); + if(compatableMix(list,[elementList[n]])) + { + mixture3(elementList,list.concat([elementList[n]]),n+1); + } + } +} + + +//exceptions to releasing gas +function gasOk(elementList) +{ + let gases = elementList.filter((c) => elements[c].state === "gas"); + if(elementList.includes("water") || elementList.includes("ice")) + { + gases = gases.filter((c) => c !== "carbon_dioxide"); + } + return gases.length <= 0; +} + +//exceptions to mixtures +function isValidMixture(elementList) +{ + if(elementList.includes("dry_ice")) + { + return false; + } + return true; +} + +if(enabledMods.includes(runAfterAutogenMod)){ +whenAvailable(["runAfterAutogen"], function() { + runAfterAutogen(function() { + mixture2(["water","blood"]); + mixture2(["water","cough_drugs","cellulose_gum","carbon_dioxide","sugar","milk"]); + + }); +}); +} + + +predefinedColors = [ + ["#8f19c2",["sugar","carbon_dioxide","cough_drugs","water","cellulose_gum"]], + ["#ab1efc",["sugar","carbon_dioxide","cough_drugs","ice","cellulose_gum"]], + ["#a527db",["sugar","carbon_dioxide","cough_drugs","water"]], + ["#c62eff",["sugar","carbon_dioxide","cough_drugs","ice"]], + ["#422016",["sugar","carbon_dioxide","water"]], + ["#4f261c",["sugar","carbon_dioxide","ice"]], + ["#e9cba3",["sugar","carbon_dioxide","water","milk"]], + ["#fff3d3",["sugar","carbon_dioxide","ice","milk"]], +] + +/* +var c = elements.lean.colorObject; +for (var j = 0; j < autoElements.frozen.rgb.length; j++) { + var newc = autoElements.frozen.rgb[j]; + r = Math.floor(c.r * newc[0]); + g = Math.floor(c.g * newc[1]); + b = Math.floor(c.b * newc[2]); + if (r > 255) {r = 255;} if (g > 255) {g = 255;} if (b > 255) {b = 255;} + alert(RGBToHex({r:r,g:g,b:b})); + }*/ + +nameList = {}; + +nameList[["blood","water"].sort().join()] = "bloody_water"; +nameList[["blood","ice"].sort().join()] = "bloody_slush"; +nameList[["blood_ice","water"].sort().join()] = "slushy_blood"; +nameList[["blood_ice","ice"].sort().join()] = "bloody_ice"; + +nameList[["cough_drugs","water"].sort().join()] = "cough_water"; +nameList[["cough_drugs","ice"].sort().join()] = "cough_ice"; +nameList[["cellulose_gum","water"].sort().join()] = "thick_water"; +nameList[["cellulose_gum","ice"].sort().join()] = "thick_ice"; +nameList[["cough_drugs","cellulose_gum"].sort().join()] = "dried_unsweetened_cough_syrup"; +nameList[["molten_cough_drugs","cellulose_gum"].sort().join()] = "molten_dried_unsweetened_cough_syrup"; +nameList[["cough_drugs","cellulose_gum","water"].sort().join()] = "unsweetened_cough_syrup"; +nameList[["cough_drugs","cellulose_gum","ice"].sort().join()] = "unsweetened_cough_syrup_ice"; + +nameList[["carbon_dioxide","water"].sort().join()] = "seltzer"; +nameList[["carbon_dioxide","ice"].sort().join()] = "seltzer_ice"; + +nameList[["carbon_dioxide","cough_drugs","water"].sort().join()] = "cough_seltzer"; +nameList[["carbon_dioxide","cough_drugs","ice"].sort().join()] = "cough_seltzer_ice"; +nameList[["carbon_dioxide","cellulose_gum","water"].sort().join()] = "thick_seltzer"; +nameList[["carbon_dioxide","cellulose_gum","ice"].sort().join()] = "thick_seltzer_ice"; +nameList[["carbon_dioxide","cough_drugs","cellulose_gum","water"].sort().join()] = "thick_cough_seltzer"; +nameList[["carbon_dioxide","cough_drugs","cellulose_gum","ice"].sort().join()] = "thick_cough_seltzer_ice"; + + + +nameList[["sugar","water"].sort().join()] = "sugar_water"; +nameList[["sugar","ice"].sort().join()] = "sugar_ice"; + +nameList[["sugar","cough_drugs","water"].sort().join()] = "sweetened_cough_water"; +nameList[["sugar","cough_drugs","ice"].sort().join()] = "sweetened_cough_ice"; +nameList[["sugar","cellulose_gum","water"].sort().join()] = "thick_sugar_water"; +nameList[["sugar","cellulose_gum","ice"].sort().join()] = "thick_sugar_ice"; +nameList[["sugar","cough_drugs","cellulose_gum"].sort().join()] = "dried_cough_syrup"; +nameList[["sugar","molten_cough_drugs","cellulose_gum"].sort().join()] = "molten_dried_cough_syrup"; +nameList[["sugar","cough_drugs","cellulose_gum","water"].sort().join()] = "cough_syrup"; +nameList[["sugar","cough_drugs","cellulose_gum","ice"].sort().join()] = "cough_syrup_ice"; + +nameList[["sugar","carbon_dioxide","water"].sort().join()] = "soda"; +nameList[["sugar","carbon_dioxide","ice"].sort().join()] = "soda_ice"; + +nameList[["sugar","carbon_dioxide","cough_drugs","water"].sort().join()] = "runny_lean"; +nameList[["sugar","carbon_dioxide","cough_drugs","ice"].sort().join()] = "runny_lean_ice"; +nameList[["sugar","carbon_dioxide","cellulose_gum","water"].sort().join()] = "thick_soda"; +nameList[["sugar","carbon_dioxide","cellulose_gum","ice"].sort().join()] = "thick_soda_ice"; +nameList[["sugar","carbon_dioxide","cough_drugs","cellulose_gum","water"].sort().join()] = "lean"; +nameList[["sugar","carbon_dioxide","cough_drugs","cellulose_gum","ice"].sort().join()] = "lean_ice"; + +nameList[["sugar","cough_drugs"].sort().join()] = "cough_sugar"; +nameList[["sugar","molten_cough_drugs"].sort().join()] = "molten_cough_sugar"; +nameList[["caramel","molten_cough_drugs"].sort().join()] = "molten_cough_caramel"; +nameList[["caramel","cough_drugs"].sort().join()] = "cough_caramel"; +nameList[["candy","cough_drugs"].sort().join()] = "cough_candy"; +nameList[["candy","molten_cough_drugs"].sort().join()] = "molten_cough_candy"; + +nameList[["sugar","cellulose_gum"].sort().join()] = "sweet_cellulose_gum"; +nameList[["caramel","cellulose_gum"].sort().join()] = "caramel_cellulose_gum"; +nameList[["candy","cellulose_gum"].sort().join()] = "cellulose_gum_candy"; + + +nameList[["cellulose_gum","caramel","molten_cough_drugs"].sort().join()] = "molten_caramelized_cough_syrup"; +nameList[["cellulose_gum","caramel","cough_drugs"].sort().join()] = "caramelized_cough_syrup"; +nameList[["cellulose_gum","candy","cough_drugs"].sort().join()] = "cough_drop"; +nameList[["cellulose_gum","candy","molten_cough_drugs"].sort().join()] = "molten_cough_drop"; + +function milkNames(elements,name) +{ + nameList[elements.concat("milk").sort().join()] = name + "_milk"; + nameList[elements.concat("yogurt").sort().join()] = name + "_yogurt"; + nameList[elements.concat("frozen_yogurt").sort().join()] = name + "_frozen_yogurt"; + nameList[elements.concat("cream").sort().join()] = name + "_cream"; + nameList[elements.concat("ice_cream").sort().join()] = name + "_ice_cream"; +} + +nameList[["calcium","cough_drugs"].sort().join()] = "calcified_cough_syrup"; +nameList[["calcium","molten_cough_drugs"].sort().join()] = "calcified_molten_cough_syrup"; +nameList[["molten_calcium","molten_cough_drugs"].sort().join()] = "molten_calcified_cough_syrup"; + + +milkNames2([ +["water","ice","cellulose_gum","sugar","carbon_dioxide","caramel","candy","cough_drugs","molten_cough_drugs"], +["watery","icy","thick","sweetened","carbonated","caramelized","candied","cough","cough"]],[[],""],0); + +function milkNames2(elementList, list, n) +{ + if(list[0].length > 0) + { + if(list[0].includes("molten_cough_drugs")) + { + milkNames(list[0], "molten" + list[1]); + } + else + { + milkNames(list[0], list[1].substring(1)); + } + } + if(n < elementList[0].length && n < elementList[1].length) + { + milkNames2(elementList,list,n+1); + list2 = [list[0].concat([elementList[0][n]]),list[1] + "_" + elementList[1][n]]; + if(list2[0]) + { + milkNames2(elementList,list2,n+1); + } + } +} + +for(let i in nameList) +{ + if(nameList[i].includes("sweetened_carbonated_")) + { + nameList[i] = nameList[i].replace("sweetened_carbonated_",""); + nameList[i] += "_soda"; + } +} + +nameList[["sugar","carbon_dioxide","water","milk"].sort().join()] = "pilk"; +nameList[["sugar","carbon_dioxide","ice","milk"].sort().join()] = "icy_pilk"; +nameList[["sugar","carbon_dioxide","water","yogurt"].sort().join()] = "pogurt"; +nameList[["sugar","carbon_dioxide","ice","yogurt"].sort().join()] = "icy_pogurt"; +nameList[["sugar","carbon_dioxide","water","frozen_yogurt"].sort().join()] = "frozen_pogurt"; +nameList[["sugar","carbon_dioxide","ice","frozen_yogurt"].sort().join()] = "icy_frozen_pogurt"; +nameList[["sugar","carbon_dioxide","water","cream"].sort().join()] = "pilk_cream"; +nameList[["sugar","carbon_dioxide","ice","cream"].sort().join()] = "icy_pilk_cream"; +nameList[["sugar","carbon_dioxide","water","ice_cream"].sort().join()] = "pice_cream"; +nameList[["sugar","carbon_dioxide","ice","ice_cream"].sort().join()] = "icy_pice_cream"; + + +nameList[["cellulose_gum","sugar","carbon_dioxide","water","milk"].sort().join()] = "thick_pilk"; +nameList[["cellulose_gum","sugar","carbon_dioxide","ice","milk"].sort().join()] = "icy_thick_pilk"; +nameList[["cellulose_gum","sugar","carbon_dioxide","water","yogurt"].sort().join()] = "thick_pogurt"; +nameList[["cellulose_gum","sugar","carbon_dioxide","ice","yogurt"].sort().join()] = "icy_thick_pogurt"; +nameList[["cellulose_gum","sugar","carbon_dioxide","water","frozen_yogurt"].sort().join()] = "frozen_thick_pogurt"; +nameList[["cellulose_gum","sugar","carbon_dioxide","ice","frozen_yogurt"].sort().join()] = "icy_frozen_thick_pogurt"; +nameList[["cellulose_gum","sugar","carbon_dioxide","water","cream"].sort().join()] = "thick_pilk_cream"; +nameList[["cellulose_gum","sugar","carbon_dioxide","ice","cream"].sort().join()] = "icy_thick_pilk_cream"; +nameList[["cellulose_gum","sugar","carbon_dioxide","water","ice_cream"].sort().join()] = "thick_pice_cream"; +nameList[["cellulose_gum","sugar","carbon_dioxide","ice","ice_cream"].sort().join()] = "icy_thick_pice_cream"; + + +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","water","milk"].sort().join()] = "lilk"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","ice","milk"].sort().join()] = "icy_lilk"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","water","yogurt"].sort().join()] = "logurt"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","ice","yogurt"].sort().join()] = "icy_logurt"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","water","frozen_yogurt"].sort().join()] = "frozen_logurt"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","ice","frozen_yogurt"].sort().join()] = "icy_frozen_logurt"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","water","cream"].sort().join()] = "lilk_cream"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","ice","cream"].sort().join()] = "icy_lilk_cream"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","water","ice_cream"].sort().join()] = "leanice_cream"; +nameList[["cough_drugs","cellulose_gum","sugar","carbon_dioxide","ice","ice_cream"].sort().join()] = "icy_leanice_cream"; + +nameList[["cough_drugs","sugar","carbon_dioxide","water","milk"].sort().join()] = "runny_lilk"; +nameList[["cough_drugs","sugar","carbon_dioxide","ice","milk"].sort().join()] = "icy_runny_lilk"; +nameList[["cough_drugs","sugar","carbon_dioxide","water","yogurt"].sort().join()] = "runny_logurt"; +nameList[["cough_drugs","sugar","carbon_dioxide","ice","yogurt"].sort().join()] = "icy_runny_logurt"; +nameList[["cough_drugs","sugar","carbon_dioxide","water","frozen_yogurt"].sort().join()] = "frozen_runny_logurt"; +nameList[["cough_drugs","sugar","carbon_dioxide","ice","frozen_yogurt"].sort().join()] = "icy_frozen_runny_logurt"; +nameList[["cough_drugs","sugar","carbon_dioxide","water","cream"].sort().join()] = "runny_lilk_cream"; +nameList[["cough_drugs","sugar","carbon_dioxide","ice","cream"].sort().join()] = "icy_runny_lilk_cream"; +nameList[["cough_drugs","sugar","carbon_dioxide","water","ice_cream"].sort().join()] = "runny_leanice_cream"; +nameList[["cough_drugs","sugar","carbon_dioxide","ice","ice_cream"].sort().join()] = "icy_runny_leanice_cream"; + +elements.cough_drugs = { + density: 1230, //using the 6.25/10 ratio from a CP/PH cough syrup from Morton Grove Pharmaceuticals, Inc. because it was in hot on r/lean (of course there’s a subreddit for that) | this is 6.25 mg pr.hy. and 10 mg co.ph. per 5mL dose, but ratios and reactions aren’t possible and implementing them to this accuracy would also require an accurate cough syrup density + tempHigh: 157.5, + color: "#e0e4e0", + behavior: behaviors.POWDER, + category: "powders", + state: "solid" +} + + +elements.cellulose_gum = { + density: 1600, + tempHigh: 270, + stateHigh: "fire", + color: "#f7e7b7", + behavior: behaviors.POWDER, + category: "powders", + state: "solid" +} \ No newline at end of file diff --git a/mods/runAfterAutogen2.js b/mods/runAfterAutogen2.js index d7b1f692..8ea63f87 100644 --- a/mods/runAfterAutogen2.js +++ b/mods/runAfterAutogen2.js @@ -11,8 +11,10 @@ function runAfterAutogen(callback) { }, interval); } function createButtonsAndCountElements() { - document.getElementById("categoryControls").innerHTML = ""; + window.setTimeout(function() { + document.getElementById("categoryControls").innerHTML = ""; document.getElementById("elementControls").innerHTML = ""; + document.getElementById("category-tools").innerHTML = ""; document.getElementById("extraInfo").innerHTML = ""; elementCount = 0; hiddenCount = 0; @@ -46,7 +48,7 @@ function createButtonsAndCountElements() { document.getElementById("categoryControls").children[0].click() document.getElementById("extraInfo").insertAdjacentHTML("beforeend", "

v" + currentversion + " • " + elementCount + " elements, including " + hiddenCount + " hidden ones.

©2021-" + new Date().getFullYear() + ". All Rights Reserved. R74n

"); selectElement(currentElement); - + }, 10); }; runAfterAutogen(createButtonsAndCountElements); \ No newline at end of file From 948821e4541572ffff50e975e191b99a6e4a7bb2 Mon Sep 17 00:00:00 2001 From: lllllllllwith10ls <38187754+lllllllllwith10ls@users.noreply.github.com> Date: Sun, 26 Nov 2023 14:56:22 -0600 Subject: [PATCH 013/110] changed chem.js mod interaction --- mods/chem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/chem.js b/mods/chem.js index 520af9f2..6f6c0666 100644 --- a/mods/chem.js +++ b/mods/chem.js @@ -416,7 +416,7 @@ trueAcidGases = ["acid_gas", "hydrofluoric_acid_gas"]; if (enabledMods.includes("mods/generative_mods.js")) { -whenAvailable(["generateCloud"], function() { +runAfterLoad(function() { generateCloud("hydrofluoric_acid"); elements["hydrofluoric_acid_gas"].reactions["hydrofluoric_acid_gas"]= { "elem1": null, "elem2": "hydrofluoric_acid_cloud", "chance":0.3, "y":[0,12], "setting":"clouds" }; elements["hydrofluoric_acid_gas"].reactions["rain_cloud"]= { "elem1": null, "elem2": "hydrofluoric_acid_cloud", "chance":0.4, "y":[0,12], "setting":"clouds" }; @@ -476,7 +476,7 @@ function createAcid(name,reactions, gasReactions, color, category, categoryGas, elements.bless.reactions[name] = { elem2: "hydrogen" }; elements.bless.reactions[name+"_gas"] = { elem2: "hydrogen" }; if (enabledMods.includes("mods/generative_mods.js")) { - whenAvailable(["generateCloud"], function() { + runAfterLoad(function() { generateCloud(name); elements[name+"_gas"].reactions[name+"_gas"]= { "elem1": null, "elem2": name + "_cloud", "chance":0.3, "y":[0,12], "setting":"clouds" }; elements[name+"_gas"].reactions["rain_cloud"]= { "elem1": null, "elem2": name + "_cloud", "chance":0.4, "y":[0,12], "setting":"clouds" }; From 657244d2fd757fb2a75a826bca49714a6a51c54c Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Sun, 26 Nov 2023 18:41:09 -0500 Subject: [PATCH 014/110] Update nouserscaesium.js --- mods/nouserscaesium.js | 58 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/mods/nouserscaesium.js b/mods/nouserscaesium.js index 74dbcb12..c4511bd4 100644 --- a/mods/nouserscaesium.js +++ b/mods/nouserscaesium.js @@ -14,7 +14,7 @@ reactions: { "salt_water": { "elem1":"pop", "elem2":"hydrogen" }, "seltzer": { "elem1":"pop", "elem2":"hydrogen" }, } -}; +}, elements.molten_caesium = { color: ["#735c0a", "#a68e37", "#7e6715", "#9b832e"], behavior: behaviors.LIQUID, @@ -34,7 +34,7 @@ elements.molten_caesium = { "salt_water": { "elem1":"pop", "elem2":"hydrogen" }, "seltzer": { "elem1":"pop", "elem2":"hydrogen" }, } -}; +}, elements.caesium_vapor = { color: ["#d89e77", "#cd9064", "#af6f34", "#a26320"], behavior: behaviors.GAS, @@ -44,4 +44,56 @@ elements.caesium_vapor = { stateLow: "molten_caesium", density: 1.7, temp: 700 -} \ No newline at end of file +}, +elements.subzero_grass_seed = { + color: ["#022c14", "#032911", "#032205", "#021f00"], + behavior: [ + "XX|M2%0.1|XX", + "XX|L2:subzero_grass AND C2:subzero_grass%15|XX", + "XX|M1|XX", + ], + category: "life", + state: "solid", + tempHigh: 10, + temp: 0, + stateHigh: "dead_plant", + density: 1400 +}, +elements.subzero_grass = { + color: ["#003220", "#022a1a", "#032314", "#001c0d"], + behavior: behaviors.STURDYPOWDER, + category: "life", + state: "solid", + tempHigh: 13, + temp: 0, + stateHigh: "dead_plant", + density:1400 +}, +elements.technetium = { + color: ["#e7d9bb", "#bab195", "#8f8a70", "#66654e"], + behavior: [ + "XX|XX|XX", + "XX|CH:neutron%0.07|XX", + "XX|XX|XX", + ], + category: "solids", + state: "solid", + tempHigh: 2157, + stateHigh: "molten_technetium", + density: 11500 +}, + elements.molten_technetium = { + color: ["#d16b42", "#da904c", "#dfb360", "#e2d57f"], + behavior: behaviors.LIQUID, + tick: function(pixel) { + if (Math.random() < 0.0007) { + changePixel(pixel, "neutron", false); + } + }, + category: "states", + state: "liquid", + tempLow: 2140, + temp: 2200, + stateLow: "technetium", + density: 11400 +} From 5fce4a014ddecc180c49fc1fd09a701b575a9a30 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Sun, 26 Nov 2023 18:42:35 -0500 Subject: [PATCH 015/110] Rename nouserscaesium.js to nousersthings.js --- mods/{nouserscaesium.js => nousersthings.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mods/{nouserscaesium.js => nousersthings.js} (100%) diff --git a/mods/nouserscaesium.js b/mods/nousersthings.js similarity index 100% rename from mods/nouserscaesium.js rename to mods/nousersthings.js From e6efe909163ab17378a03d5617c89183ad02a8e1 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sun, 26 Nov 2023 18:52:38 -0500 Subject: [PATCH 016/110] 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 f922d884..76a87b4e 100644 --- a/mod-list.html +++ b/mod-list.html @@ -124,13 +124,14 @@ move_tools.jsAdds tools that move pixelsAlice noconfirm.jsRemoves all confirmation pop upsmollthecoder page_color.jsAllows changing the background color outside of the canvas with the “pageColor” query parameterAlice +pixelResizeTool.jsAdds a button to change pixel scalefeeshmaster prompt.jsAdds a primitive command consoleAlice prop.jsAdds tool to edit the attributes of pixelsAlice replace_all.jsAdds a way to replace every pixel of an element with another element
Read the commit description for usageAlice replace.jsAdds a tool that replaces every pixel of a specified element with another specified element. (The prompt to specify these is toggled by pressing " or by the button in the element description)Alice save_loading.jsAdds the ability to save and load scenes from files (See the info page of the element)Alice stripe_paint.jsAdds a tool to paint with stripesAlice -the_ground.jsA mod that adds several rock types, worldgen settings, and gemstones (broadly construed as ground-related).
Very incompleteAlice +the_ground.jsAdds several rock types, worldgen settings, and gemstones (broadly construed as ground-related).
Very incompleteAlice Science & Chemistry alcohol.jsAdds methanol, (iso-)propanol, and butanolAlice @@ -151,13 +152,16 @@ laetium.jsAdds several fictional elementsAlice liquid_energy.jsAdds liquid versions of the elements in the Energy categoryAlice metals.jsAdds several metalsAlice +mixture.jsAllows many chemicals to be mixedlllllllllwith10ls moreliquids.jsAdds various liquidste-agma-at nellfire.jsAdds a weird transforming flame and several rock typesAlice Neutronium Mod.jsVariety of scientific elements
ExplosionsStellarX20 neutronium_compressor.jsAdds a compressor (in reference to Minecraft’s Avaritia mod) that compresses 10,000 pixels of an element into a “singularity”Alice +nousersthings.jsAdds Caesium and morenousernamefound random_rocks.jsRandomly generates rocks on game loadAlice roseyiede.jsAdds several variants of a substance called roseyiedeAlice some_tf_liquids.jsAdds various liquids from the Thermal Foundation Minecraft modAlice +the_ground.jsAdds several rock types, worldgen settings, and gemstones (broadly construed as ground-related).
Very incompleteAlice Machines & Technology clone_liquid.jsAdds a liquid form of clonerAlice @@ -201,6 +205,7 @@ nocancer2.jsRemoves cancer from the game altogether. May be incompatible with other mods that spawn cancermollthecoder 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.jsAdds several rock types, worldgen settings, and gemstones (broadly construed as ground-related).
Very incompleteAlice toothpaste.jsTeeth and pasteAlice Fun & Games From 8deb82595fc709a9f74ae2fa13496e7c83b50685 Mon Sep 17 00:00:00 2001 From: AndrewY7321 <62182495+SeaPickle754@users.noreply.github.com> Date: Tue, 28 Nov 2023 20:03:19 -0700 Subject: [PATCH 017/110] Add files via upload --- star_wars.js | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 star_wars.js diff --git a/star_wars.js b/star_wars.js new file mode 100644 index 00000000..da287299 --- /dev/null +++ b/star_wars.js @@ -0,0 +1,61 @@ +elements.carbonite = { + color: "#343634", + behavior: behaviors.WALL, + category: "star wars", + state: "solid", + density: 1000, + tempHigh: 1000, + stateHigh: "carbondioxide", + reactions:{ + "acid": "slag", +} + +}; + +// look it up: +// https://starwars.fandom.com/wiki/Plastoid +// stormtrooper armor +elements.plastoid = { + color: "#FFAAAA", + behavior: behaviors.WALL, + category: "star wars", + state: "solid", + density: 400, + tempHigh: 300, + hardness: 1, + burn: 0 +}; + +elements.green_milk ={ + color: "#95f595", + behavior: behaviors.LIQUID, + category: "star wars", + state: "liquid", + viscosity: 100, + density: 720, +}; + +elements.laser_blast = { + color: "#ff0000", + behavior: behaviors.BOUNCY, + category: "star wars", +}; +elements.tibanna_gas ={ + color: "#d99a9a", + behavior: behaviors.GAS, + category: "star wars", + burn: 100, + burnTime: 1, + +} +elements.milk_water = { + color: "#e4fade", + behavior: behaviors.LIQUID, + category: "star wars", + hidden: true, + viscosity: 90, + state: "liquid", + density: 1, +}; + +elements.water.reactions.green_milk = {elem1: null, elem2: "milk_water"} From 12f5fa8a1abdfac74226b49d3a1606bca7117f85 Mon Sep 17 00:00:00 2001 From: AndrewY7321 <62182495+SeaPickle754@users.noreply.github.com> Date: Wed, 29 Nov 2023 15:08:05 -0700 Subject: [PATCH 018/110] Update and rename star_wars.js to mods/star_wars.js --- star_wars.js => mods/star_wars.js | 1 + 1 file changed, 1 insertion(+) rename star_wars.js => mods/star_wars.js (92%) diff --git a/star_wars.js b/mods/star_wars.js similarity index 92% rename from star_wars.js rename to mods/star_wars.js index da287299..d155671a 100644 --- a/star_wars.js +++ b/mods/star_wars.js @@ -22,6 +22,7 @@ elements.plastoid = { state: "solid", density: 400, tempHigh: 300, + stateHigh: "molten_plastic" hardness: 1, burn: 0 }; From d577ddd259c8d564dc2ae307faf42a36c2036088 Mon Sep 17 00:00:00 2001 From: SeaPickle Date: Wed, 29 Nov 2023 16:22:05 -0700 Subject: [PATCH 019/110] changed mod list and star wars.js final time :) --- mod-list.html | 2 +- mods/star_wars.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mod-list.html b/mod-list.html index 76a87b4e..14b6744b 100644 --- a/mod-list.html +++ b/mod-list.html @@ -229,7 +229,7 @@ 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 invisible_dye.jsAdds elements like Dye and Spray Paint that take the color of the backgroundAlice diff --git a/mods/star_wars.js b/mods/star_wars.js index d155671a..0961bc84 100644 --- a/mods/star_wars.js +++ b/mods/star_wars.js @@ -7,11 +7,19 @@ elements.carbonite = { tempHigh: 1000, stateHigh: "carbondioxide", reactions:{ - "acid": "slag", + "acid": {elem1: null, elem2: "slag"}, + } }; +elements.light_saber = { + color: "#06d106", + behavior: behaviors.WALL, + category: "star wars", + state: "solid" +} + // look it up: // https://starwars.fandom.com/wiki/Plastoid // stormtrooper armor @@ -22,7 +30,7 @@ elements.plastoid = { state: "solid", density: 400, tempHigh: 300, - stateHigh: "molten_plastic" + stateHigh: "molten_plastic", hardness: 1, burn: 0 }; From 18823bf993b67ea71f7e0833586b1bc74b0541ca Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Wed, 29 Nov 2023 20:37:29 -0500 Subject: [PATCH 020/110] fix silly mod mistake --- mods/pixelResizeTool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/pixelResizeTool.js b/mods/pixelResizeTool.js index beccf27c..758a8c62 100644 --- a/mods/pixelResizeTool.js +++ b/mods/pixelResizeTool.js @@ -3,7 +3,7 @@ pixelResizeButton.onclick = function(pixel) { let canvas_width = document.getElementById("game").width; let canvas_height = document.getElementById("game").height; let pixelSizeNeeded = prompt("How big should pixels be?"); - if (!pixelSizeNeeded || isNAN(pixelSizeNeeded)) { alert('number is invalid!'); return; } + if (!pixelSizeNeeded || isNaN(pixelSizeNeeded)) { alert('number is invalid!'); return; } resizeCanvas(canvas_height,canvas_width, parseFloat(pixelSizeNeeded), true); }; pixelResizeButton.textContent = "Resize"; From 24de3ede331f19cd7a2f693e8f664cc7d05255ca Mon Sep 17 00:00:00 2001 From: PumpkinPriest <104536541+PumpkinPriest@users.noreply.github.com> Date: Thu, 30 Nov 2023 18:54:05 -0500 Subject: [PATCH 021/110] random_things.js --- mods/random_things.js | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/mods/random_things.js b/mods/random_things.js index 4c37e214..8faa821f 100644 --- a/mods/random_things.js +++ b/mods/random_things.js @@ -17,20 +17,18 @@ elements.legendary_energy = { "magma": { "elem1": "armageddon", "elem2": null }, "void": { "elem1": "light", "elm2": null }, }, -} +}, -runAfterLoad(function() { - if(enabledMods.includes("liquid_energy.js") && enabledMods.includes("bananas.js")) { - elements.liquid_legend = { +elements.liquid_legend = { name: "liquid legend", color: "#13d644", behavior: [ "XX|XX|XX", - "M2|EX:15>radon,radon,radon,liquid_legend%0.4 AND DL%0.2|M2", + "M2|EX:15>radon,radon,legendary_energy,liquid_legend%0.4 AND DL%0.2|M2", "M1|M1|M1", ], temp: 300, - category: "energy liquids", + category: "liquids", state: "liquid", density: 2000, excludeRandom: true, @@ -38,19 +36,5 @@ runAfterLoad(function() { "magma": { "elem1": "armageddon", "elem2": null }, "void": { "elem1": "light", "elm2": null }, }, - }, - elements.banana_juice = { - name: "banana juice", - color: "#e0f542", - behavior: behaviors.LIQUID, - temp: 800, - category: "food", - state: "liquid", - density: 200, - excludeRandom: true, - - } - - } - + } }); From 1ed6fb86a26d3776270148f2b829ae3e95831f07 Mon Sep 17 00:00:00 2001 From: Alexthetransfem <124483815+theenchantedsword@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:13:55 -0600 Subject: [PATCH 022/110] Create morechemistry.js --- mods/morechemistry.js | 546 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 546 insertions(+) create mode 100644 mods/morechemistry.js diff --git a/mods/morechemistry.js b/mods/morechemistry.js new file mode 100644 index 00000000..07202a3b --- /dev/null +++ b/mods/morechemistry.js @@ -0,0 +1,546 @@ +//This mod was made by Alex the transfem, https://discord.com/users/778753696804765696 on discord and https://www.tiktok.com/@alextheagenenby?_t=8hoCVI3NRhu&_r=1 on tiktok. +elements.sodiumhydroxide = { + color: "#c9c5b1", + behavior: behaviors.LIQUID, + reactions: { + "acid": { "elem2":"water", }, + "acid": { "elem2":"smoke", }, + "acid": { "elem2":"fire", }, + "acid": { "elem2":"fire", }, + "acid": { "elem2":"fire", }, + "acid_gas": { "elem2":"water", }, + "acid_gas": { "elem2":"smoke", }, + "acid_gas": { "elem2":"fire", }, + "acid_gas": { "elem2":"fire", }, + "acid_gas": { "elem2":"fire", }, + "vinegar": { "elem1": ["sodium_acetate", "water"], }, + "aqua_regia": { "elem1": null, "elem2": ["fire", "fire", "hydrogen"], }, + "acid_water": { "elem1": null, "elem2": ["water", "pop"], }, + "nitric_acid": { "elem1": null, "elem2": ["fire", "pop", "hydrogen"], }, + "chloroauric_acid": {"elem1": "gold", "elem2": ["fire", "fire", "pop"], }, + }, + viscosity: 0.56, + //tempHigh: 64.7, + fireColor: "#fba600", + category: "liquids", + state: "liquid", + density: 2130, + stain: -0.25, + name: "Sodium Hydroxide", + stateHigh: "sodiumhydroxidecrystals", + tempHigh: "1388", +} +elements.sodiumhydroxidecrystals = { + color: "#c9c5b1", + behavior: behaviors.POWDER, + reactions: { + "acid": { "elem2":"smoke", }, + "acid": { "elem2":"fire", }, + "acid": { "elem2":"fire", }, + "acid": { "elem2":"fire", }, + "acid_gas": { "elem2":"smoke", }, + "acid_gas": { "elem2":"pop", }, + "acid_gas": { "elem2":"fire", }, + "acid_gas": { "elem2":"fire", }, + "water": { "elem1": null, "elem2": "sodiumhydroxide", }, + "vinegar": { "elem1": null, "elem2": "sodium_acetate", }, + "aqua_regia": { "elem1": null, "elem2": ["fire", "fire", "hydrogen"], }, + "acid_water": { "elem1": null, "elem2": ["water", "pop"], }, + "nitric_acid": { "elem1": null, "elem2": ["fire", "pop", "hydrogen"], }, + "chloroauric_acid": {"elem1": "gold", "elem2": ["fire", "fire", "pop"], }, + }, + //tempHigh: 64.7, + fireColor: "#fba600", + category: "powders", + state: "powder", + density: 2130, + name: "Sodium Hydroxide Crystals", +} + +elements.sodium.reactions = { + "chlorine": { + "elem1": "salt", + "elem2": "pop" + }, + "vinegar": { + "elem1": "sodium_acetate", + "elem2": [ + null, + null, + null, + "hydrogen" + ], + "attr1": { + "foam": 15 + } + }, + "water": { + "elem1": [ + "sodiumhydroxide" + ], + "chance": 1, + "temp2": 299.6 + }, + "salt_water": { + "elem1": [ + "sodiumhydroxide", + "salt" + ], + "chance": 1, + "temp2": 299.6 + }, + "sugar_water": { + "elem1": [ + "sodiumhydroxide", + "sugar" + ], + "chance": 1, + "temp2": 299.6 + }, + "acid": { + "elem1": "explosion", + "aqua_regia": { "elem1": null, "elem2": ["fire", "pop", "fire", "fire", "hydrogen"], }, + "acid_water": { "elem1": null, "elem2": ["water", "pop", "pop"], }, + "nitric_acid": { "elem1": null, "elem2": ["fire", "pop", "pop", "hydrogen"], }, + "chloroauric_acid": {"elem1": "gold", "elem2": ["fire", "fire", "pop"], }, + } +}; +elements.magnesium = { + color: "#e6e6e6", + reactions: { + "acid": { "elem1": "hydrogen", "chance": 0.02, }, + "aqua_regia": { "elem1": "hydrogen", "chance": 0.2, "elem2": "pop", }, + }, + behavior: behaviors.POWDER, + fireColor: "#ffffff", + category: "powders", + state: "solid", + density: 1740, + burnTime: 500, + name: "Magnesium", + stateHigh: "molten_magnesium", + tempHigh: "650", + burn: 50, +} +elements.molten_magnesium = { + color: ["#fab298", "#f78157", "#ff9169", "#ff9e7a"], + behavior: behaviors.MOLTEN, + fireColor: "#ffffff", + category: "states", + state: "liquid", + density: 1740, + name: "Molten Magnesium", + temp: 650, + stateLow: "magnesium", + tempLow: 600 +} +elements.acidic_water = { + burn: 0, + behavior: behaviors.LIQUID, + reactions: { + "quicklime": {"elem2": ["hydrogen", "water", "water", "water", "water"], "elem1": null, }, + "slaked_lime": {"elem2": ["hydrogen", "water", "water", "water", "water"], "elem1": null, }, + "calcium": {"elem2": ["hydrogen", "fire", "water", "water", "water"], "elem1": null, }, + "sodium": {"elem2": ["hydrogen", "fire", "fire", "pop", "fire"], "elem1": null, }, + "sodiumhydroxide": {"elem2": ["hydrogen", "fire", "pop", "pop", "water"], "elem1": null, }, + "sodiumhydroxidecrystals": {"elem2": ["hydrogen", "pop", "water", "water"], "elem1": null, }, + }, + category: "liquids", + state: "liquid", + density: 1000, + name: "Acid Water", +} +elements.acid.ignore.push("magnesium"); +elements.acid.ignore.push("sodiumhydroxide"); +elements.acid.ignore.push("sodiumhydroxidecrystals"); +elements.acid.ignore.push("water"); +elements.acid.ignore.push("acidic_water"); +elements.acid.ignore.push("gold"); +elements.acid.ignore.push("chloroauric_acid"); +elements.acid.ignore.push("nitric_acid"); +elements.acid.ignore.push("aqua_regia"); +elements.cwall = { + "color": "rgb(128,128,128)", + "name": "Conductive Wall", + "behavior": [ + [ + "XX", + "XX", + "XX" + ], + [ + "XX", + "XX", + "XX" + ], + [ + "XX", + "XX", + "XX" + ] + ], + "category": "solids", + "insulate": false, + "hardness": 1, + "noMix": true, + "colorObject": { + "r": 128, + "g": 128, + "b": 128 + }, + } +elements.acid.reactions = { + "ash": { + "elem1": "neutral_acid", + "elem2": null + }, + "limestone": { + "elem1": "neutral_acid", + "elem2": null + }, + "quicklime": { + "elem1": "neutral_acid", + "elem2": null + }, + "slaked_lime": { + "elem1": "neutral_acid", + "elem2": null + }, + "borax": { + "elem1": "neutral_acid", + "elem2": null + }, + "ammonia": { + "elem1": "neutral_acid", + "elem2": null + }, + "bleach": { + "elem1": "neutral_acid", + "elem2": null + }, + "water": { + "elem1": "acidic_water", + }, + "salt_water": { + "elem1": null, + "elem2": "water" + }, + "sugar_water": { + "elem1": null, + "elem2": "water" + }, + "charcoal": { + "elem1": null, + "elem2": "carbon_dioxide" + }, + "rock": { + "elem1": null, + "elem2": "sand", + "chance": 0.05 + }, + "baking_soda": { + "elem1": "salt_water", + "elem2": [ + "carbon_dioxide", + "foam" + ] + }, + "zinc": { "elem1": null, "elem2": "zinc_chloride", }, + "iron": { "elem1": null, "elem2": "iron_chloride", }, + "aluminum": { "elem1": null, "elem2": "aluminum_chloride", }, +} +elements.chloroauric_acid = { + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + name: "Chloroauric Acid", + color: "#ba7b00", + tempHigh: 60, + stateHigh: "liquid_chloroauric_acid", +} +elements.liquid_chloroauric_acid = { + behavior: behaviors.LIQUID, + category: "states", + state: "liquid", + name: "Liquid Chloroauric Acid", + color: "#ba7b00", + reactions: { + "sodiumhydroxide": { "elem2": "gold", "elem1": ["water", "pop", "pop", "fire", "fire"], }, + "sodiumhydroxidecrystals": { "elem2": "gold", "elem1": ["water", "pop", "pop", "fire", "fire"], }, + "sodium": { "elem2": "gold", "elem1": ["fire", "pop", "pop", "fire", "fire"], }, + "calcium": { "elem2": "gold", "elem1": ["water", "pop", "water", "fire"], }, + }, + tempLow: 59, + stateLow: "chloroauric_acid", + tempHigh: 115, + stateHigh: "gold", +} +elements.nitrogen_oxide = { + behavior: behaviors.GAS, + category: "gases", + state: "gas", + name: "Nitrogen Oxide", + color: "#961400", + reactions: { + "water": { "elem1": null, "elem2": "nitric_acid", }, + } +} +elements.nitric_acid = { + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + name: "Nitric Acid", + color: "#ffffff", + reactions: { "acid": { "elem1": null, "elem2": "aqua_regia",}, }, +} +elements.aqua_regia = { + "behavior": [ + [ + "XX", + "DB%5", + "XX" + ], + [ + "DB%5 AND M2", + "XX", + "DB%5 AND M2" + ], + [ + "DB%5 AND M2", + "DB%10 AND M1", + "DB%5 AND M2" + ] + ], + "ignore": [ + "glass", + "rad_glass", + "glass_shard", + "rad_shard", + "stained_glass", + "baked_clay", + "acid_gas", + "neutral_acid", + "acid_cloud", + "water", + "salt_water", + "sugar_water", + "dirty_water", + "copper", + "gold", + "porcelain", + "plastic", + "bead", + "microplastic", + "molten_plastic", + "pool_water", + "chlorine", + "hydrogen", + "magnesium", + "sodiumhydroxide", + "sodiumhydroxidecrystals", + "water", + "acidic_water", + "gold", + "chloroauric_acid", + "acid_ice", + "acid", + "nitric_acid", + ], + "reactions": { + "ash": { + "elem1": "neutral_acid", + "elem2": null + }, + "limestone": { + "elem1": "neutral_acid", + "elem2": null + }, + "quicklime": { + "elem1": "neutral_acid", + "elem2": null + }, + "slaked_lime": { + "elem1": "neutral_acid", + "elem2": null + }, + "borax": { + "elem1": "neutral_acid", + "elem2": null + }, + "ammonia": { + "elem1": "neutral_acid", + "elem2": null + }, + "bleach": { + "elem1": "neutral_acid", + "elem2": null + }, + "water": { + "elem1": "acidic_water" + }, + "salt_water": { + "elem1": null, + "elem2": "water" + }, + "sugar_water": { + "elem1": null, + "elem2": "water" + }, + "charcoal": { + "elem1": null, + "elem2": "carbon_dioxide" + }, + "rock": { + "elem1": null, + "elem2": "sand", + "chance": 0.05 + }, + "baking_soda": { + "elem1": "salt_water", + "elem2": [ + "carbon_dioxide", + "foam" + ] + }, + "gold": { + "elem1": null, "elem2": "chloroauric_acid", "temp2": 20, + }, + "gold_coin": { + "elem1": null, "elem2": "chloroauric_acid", "temp2": 20, + }, + }, + "category": "liquids", + "state": "liquid", + "density": 1049, + "stain": -0.1, + name: "Aqua Regia", + "alias": "HCl + HN03", + "movable": true, + "color": "#ffdd9b", + } +elements.potassium = { + behavior: behaviors.SOLID, + color: ["#545454", "#737373", "#7d7d7d", "#8f8f8f"], + "category": "solids", + "state": "solid", + "alias": "K", + reactions: { + "water": { "elem1": "potassiumhydroxide", "elem2": ["fire", "fire", "pop", "water"], }, + "acid": { "elem1": null, "elem2": ["water", "smoke", "fire"], }, + "acid": { "elem2":"fire", }, + "acid": { "elem2":"fire", }, + "acid_gas": { "elem1": null, "elem2": ["water", "smoke", "fire"], }, + "acid_gas": { "elem2":"fire", }, + "acid_gas": { "elem2":"fire", }, + "aqua_regia": { "elem1": null, "elem2": ["fire", "pop", "pop", "fire", "fire", "hydrogen"], }, + "acid_water": { "elem1": null, "elem2": ["water", "pop", "pop"], }, + "nitric_acid": { "elem1": null, "elem2": ["fire", "pop", "fire", "pop", "hydrogen"], }, + "chloroauric_acid": {"elem1": "gold", "elem2": ["fire", "fire", "pop", "pop"], }, + }, +} +elements.potassiumhydroxide = { + color: "#c9c5b1", + behavior: behaviors.LIQUID, + reactions: { + "acid": { "elem1": null, "elem2": ["water", "smoke", "fire"], }, + "acid": { "elem2":"fire", }, + "acid": { "elem2":"fire", }, + "acid_gas": { "elem1": null, "elem2": ["water", "smoke", "fire"], }, + "acid_gas": { "elem2":"fire", }, + "acid_gas": { "elem2":"fire", }, + "aqua_regia": { "elem1": null, "elem2": ["fire", "pop", "pop", "fire", "fire", "hydrogen"], }, + "acid_water": { "elem1": null, "elem2": ["water", "pop", "pop"], }, + "nitric_acid": { "elem1": null, "elem2": ["fire", "pop", "fire", "pop", "hydrogen"], }, + "chloroauric_acid": {"elem1": "gold", "elem2": ["fire", "pop"], } + }, + viscosity: 0.56, + //tempHigh: 64.7, + fireColor: "#fba600", + category: "liquids", + state: "liquid", + density: 2130, + stain: -0.25, + name: "Potassium Hydroxide", + stateHigh: "potassiumhydroxidecrystals", + tempHigh: "1388", +} +elements.potassiumhydroxidecrystals = { + color: "#c9c5b1", + behavior: behaviors.POWDER, + reactions: { + "acid": { "elem2":"smoke", }, + "acid": { "elem2":"fire", }, + "acid": { "elem2":"fire", }, + "acid": { "elem2":"fire", }, + "acid_gas": { "elem2":"smoke", }, + "acid_gas": { "elem2":"pop", }, + "acid_gas": { "elem2":"fire", }, + "acid_gas": { "elem2":"fire", }, + "water": { "elem1": null, "elem2": "potassiumhydroxide", }, + "vinegar": { "elem1": null, "elem2": "sodium_acetate", }, + "aqua_regia": { "elem1": null, "elem2": ["fire", "pop", "pop", "fire", "fire", "hydrogen"], }, + "acid_water": { "elem1": null, "elem2": ["water", "pop", "pop"], }, + "nitric_acid": { "elem1": null, "elem2": ["fire", "pop", "fire", "pop", "hydrogen"], }, + "chloroauric_acid": {"elem1": "gold", "elem2": ["fire", "fire", "pop", "pop"], }, + }, + //tempHigh: 64.7, + fireColor: "#fba600", + category: "powders", + state: "powder", + density: 2130, + name: "Potassium Hydroxide Crystals", +} +elements.supercooler = { + name: "Super Cooler", + category: "machines" +} +elements.supercooler.behavior = [["XX","CO:10","XX"],["CO:10","XX","CO:10"],["XX","CO:10","XX"]] +elements.iron_chloride = { + color: ["#010014", "#a2ff94"], + reactions: { + "dirty_water": { "elem1": "water", }, + "aluminum": { "elem1": "aluminum_chloride", "elem2": "iron" }, + }, + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + density: 1740, + burnTime: 500, + name: "Iron Chloride", +} +elements.aluminum_chloride = { + color: ["#faff61", "#f7f7e4", "#ffffb5"], + reactions: { + "dirty_water": { "elem1": "water", }, + }, + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + density: 1740, + burnTime: 500, + name: "Aluminum Chloride", +} +elements.zinc_chloride = { + color: ["#faff61", "#f7f7e4", "#ffffb5"], + reactions: { + "dirty_water": { "elem1": "water", }, + "water": { "elem1": null, "chance": 0.2 }, + }, + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + density: 1740, + burnTime: 500, + name: "Zinc Chloride", +} +elements.acid.ignore.push("zinc"); +elements.acid.ignore.push("iron"); +elements.acid.ignore.push("aluminum"); +elements.acid.ignore.push("zinc_chloride"); +elements.acid.ignore.push("iron_chloride"); +elements.acid.ignore.push("aluminum_chloride"); +elements.kilonova = { + name: "Kilonova", + category: "energy", +} +elements.kilonova.behavior = [ ["XX","XX","XX"],["XX","EX:80>plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,explosion,explosion,explosion,molten_gold,molten_uranium,molten_lead,oxygen,molten_sodium,neon,chlorine,molten_calcium,molten_nickel,molten_copper,molten_zinc,gallium_gas,molten_silver,hydrogen,helium,nitrogen,nitrogen_oxide,water AND CH:void","XX"],["XX","XX","XX"]] From 1b087ebeeb26af131ccdc0a24df988d4a3a6b0b7 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Thu, 30 Nov 2023 22:22:53 -0500 Subject: [PATCH 023/110] Update pixelResizeTool.js --- mods/pixelResizeTool.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/pixelResizeTool.js b/mods/pixelResizeTool.js index 758a8c62..9d305268 100644 --- a/mods/pixelResizeTool.js +++ b/mods/pixelResizeTool.js @@ -7,4 +7,6 @@ pixelResizeButton.onclick = function(pixel) { resizeCanvas(canvas_height,canvas_width, parseFloat(pixelSizeNeeded), true); }; pixelResizeButton.textContent = "Resize"; -document.getElementById("toolControls").appendChild(pixelResizeButton); +window.addEventListener("load",function(){ + document.getElementById("toolControls").appendChild(pixelResizeButton); +}); From 920657d9ce55bacbf904a83da34e4ea7518ce960 Mon Sep 17 00:00:00 2001 From: PumpkinPriest <104536541+PumpkinPriest@users.noreply.github.com> Date: Fri, 1 Dec 2023 10:56:30 -0500 Subject: [PATCH 024/110] random_things.js --- mods/random_things.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/random_things.js b/mods/random_things.js index 8faa821f..b8f59b1a 100644 --- a/mods/random_things.js +++ b/mods/random_things.js @@ -17,7 +17,7 @@ elements.legendary_energy = { "magma": { "elem1": "armageddon", "elem2": null }, "void": { "elem1": "light", "elm2": null }, }, -}, +} elements.liquid_legend = { name: "liquid legend", From cd73247461e662a03937b5b66f7bb11fbd5c734d Mon Sep 17 00:00:00 2001 From: PumpkinPriest <104536541+PumpkinPriest@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:03:04 -0500 Subject: [PATCH 025/110] random_things.js --- mods/random_things.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mods/random_things.js b/mods/random_things.js index b8f59b1a..9a540094 100644 --- a/mods/random_things.js +++ b/mods/random_things.js @@ -17,7 +17,7 @@ elements.legendary_energy = { "magma": { "elem1": "armageddon", "elem2": null }, "void": { "elem1": "light", "elm2": null }, }, -} +}, elements.liquid_legend = { name: "liquid legend", @@ -35,6 +35,5 @@ elements.liquid_legend = { reactions: { "magma": { "elem1": "armageddon", "elem2": null }, "void": { "elem1": "light", "elm2": null }, - }, - } -}); + } +}; From e1f417742b1788b54fa8cfa8ee426eb997141f81 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:26:30 -0500 Subject: [PATCH 026/110] Sandboxels v1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Version 1.9.1 - December 1, 2023 - Cozy Solstice] + Pipe 1. Draw a line with Pipe, maybe while paused 2. Wait for walls to form around it 3. Erase an exit point and allow Pipe to generate + Mayo + Mulch + Porcelain Shard (Hidden) + Jelly (Hidden) [Coffee] + Coffee Bean + Coffee Ground (Hidden) + Coffee (Hidden) [Nuts] + Nuts + Nut Meat (Hidden, from crushing) + Nut Butter (Hidden, from cooking) + Nut Milk (Hidden, from soaking) [Festivities] + Candy is candy cane-colored + Mashed Potato (Hidden) + Skin will warm itself up when cold [Other Changes] + Roots grow through Grass ~ Saplings no longer turn to wood all at once ~ Tree Branches no longer grow when burning ~ Tree Branches, Plant, and Grass are less flammable + Soda deoxidizes Rust and Copper + Balloons pop near absolute zero + Balloons pop when touching Clouds + Humans can consume Tomatoes, Pumpkin Seeds, and Cream + Humans get gas when eating Beans + Humans can take Gold Coins + Skin spawns at average body temperature ~ Skin no longer heals wounds + Snails can eat Lettuce + Tadpoles and Evergreen can be smashed ~ Rats no longer eat Rotten Meat + Rats can drink Milk + Lichen convert Gravel and Rock Wall to Dirt + Yeast ferments Sugar Water and Soda + Caramel freezes into Candy much colder + Baked Batter breaks into Crumbs + Rotten Meat or Cheese and Flies remove Fragrance + Primordial Soup spawns at a warmer temperature + Ammonia affects Pumpkin Seeds, Herbs, and Tomatoes + Glue can fix shards + Salt makes Water colder + Water breaks down Confetti into Cellulose + Hydrogen burns into some Steam + Hydrogen fusion releases Neutrons + Anesthesia breaks down to Oxygen at high temperatures + Castner–Kellner process + Sodium and Mercury reaction shocks and releases heat + Sulfur burns into Stench + Sugar dissolves in Milk + Salt dissolves in Sauce and Melted Cheese + Juice can be radiated + Carbonating Juice makes Soda + Seltzer can dissolve Limestone over time + Water can weather Limestone into Sand + Vinegar slowly dissolves the shell of Eggs + Baking Soda releases CO₂ when heated + Tuff melts into Magma + E-cloner ignores Wire, Sensor, and Battery + Cloners ignore Wall + Incense recipe ~ Fragrance now dissipates over time ~ Oxygen spreads Fragrance and Stench slower ~ Molten Solder no longer makes Fire ~ Recolored Molten Solder ~ Recolored Gold Coin + Insulation won't mix unless Shift is held + LEDs can break into Glass Shards + Cloners display element on hover + Author name appears if present in loaded save + Pressing ; toggles Replace mode + Methane Ice - Removed Molten Baking Soda [Bug Fixes] ~ Fixed: Flicker when stepping frame ~ Fixed: Lamp Oil burns forever ~ Fixed: Mushroom Gills don't conduct heat ~ Fixed: Pumpkin, Stained Glass, Skin, Sponge, E-cloner can be dragged ~ Fixed: God Raying Gray Goo makes Rainbow ~ Fixed: Soda deletes Salt Water quickly ~ Fixed: Juice Ice darkens when melting ~ Fixed: Sand from Water weathering Tuff uses wrong color ~ Fixed: Hail doesn't apply color variants when breaking ~ Fixed: Confirmation appears when dropping save onto empty canvas ~ Fixed: Sauce density too high ~ Fixed: Hail is way too cold ~ Fixed: Humans continue panicking after extinguished ~ Fixed: Cloned pixels don't change state based on Cloner temperature ~ Fixed: Antifire doesn't react with Antifluid right ~ Fixed: Porcelain reforms immediately after breaking when hot ~ Fixed: Hot Bomb often melts itself ~ Fixed: Hard Yolk can't be mixed into Batter/Dough [Technical] + Prop tool + Option for uncompressed raw save data ~ Save version is now sb2 ~ New saves may not work in older versions ~ Old saves will work fine + Version handling system, warnings + Random will work when placed by cheating ~ FW_Ember no longer has a long name + runAfterAutogen function --- changelog.html | 113 ++++- changelog.txt | 111 ++++- controls.html | 2 + controls.txt | 5 +- help.html | 4 + index.html | 934 ++++++++++++++++++++++++++++++++------- mods/classic_textures.js | 5 +- mods/devtests.js | 72 ++- promo.html | 9 + style.css | 1 + 10 files changed, 1080 insertions(+), 176 deletions(-) create mode 100644 promo.html diff --git a/changelog.html b/changelog.html index 343076e6..b34ffe2a 100644 --- a/changelog.html +++ b/changelog.html @@ -109,6 +109,117 @@

The original plain text version of this is still maintained.

+

[Version 1.9.1 - December 1, 2023 - Cozy Solstice]

+ +

[Version 1.9 - October 13, 2023 - Local Saves]