diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 548ea550..f70ed808 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -1,10 +1,3 @@
-Contributions to the main index.html file will be ignored. Use this repository to officially publish your Sandboxels mods.
+This repository is no longer accepting contributions or mod submissions.
-Rules for publishing mods:
-1. Must not focus on something NSFW or illegal.
-2. Must be tested beforehand on your own. This repo does not accept mods for the sole purpose of you testing them.
-3. Must contain some meaningful content.
-
-Failure to follow these rules may result in your pull request being ignored!
-
-Learn more about [submitting your mod](https://sandboxels.wiki.gg/wiki/Modding/Putting_it_online).
+**For future mod submissions, please go to the new repository at [R74nCom/Sandboxels-Mods](https://github.com/R74nCom/Sandboxels-Mods).**
diff --git a/README.md b/README.md
index 010907ce..60c4a7e3 100644
--- a/README.md
+++ b/README.md
@@ -8,9 +8,7 @@ Join the [Discord server](https://discord.com/invite/ejUc6YPQuS).

# Modding
-New to modding? Read the Sandboxels Wiki articles on [getting started with modding](https://sandboxels.wiki.gg/wiki/Modding/Getting_started) or [publishing your mod](https://sandboxels.wiki.gg/wiki/Modding/Putting_it_online).
-
-Please read the [Contribution Guidelines](https://github.com/R74nCom/sandboxels/tree/main/.github/CONTRIBUTING.md) before submitting your mod.
+**Mods are no longer accepted in this repository.** Please go to the new one at [R74nCom/Sandboxels-Mods](https://github.com/R74nCom/Sandboxels-Mods/).
# Controls
* Left Click = Draw pixels
diff --git a/keyBindButton.js b/keyBindButton.js
new file mode 100644
index 00000000..512066e6
--- /dev/null
+++ b/keyBindButton.js
@@ -0,0 +1,44 @@
+async function _kBBprompt(message, defaultValue = "") {
+ return new Promise(resolve => {
+ promptInput(message, (result) => {
+ resolve(result);
+ }, "keyBindButton.js is asking you...", defaultValue);
+
+ })
+}
+async function _jaydalert(message) {
+ promptText(message, undefined, "Jayd:");
+}
+runAfterLoad(async () => {
+ window.setTimeout(async () => {
+ _jaydalert("Warning! keyBindButton.js is in beta, expect bugs.")
+ },)
+})
+
+elements.keyBindButton = {
+ color: "#bebfa3",
+ onPlace: async (pixel) => {
+ pixel.thisKeyIsBinded = await _kBBprompt("Select a key to bind.",(pixel.thisKeyIsBinded||undefined))
+ },
+ tick: (pixel) => {
+ document.onkeydown = function(kb)/*keybind*/ {
+ if (kb.key.toLowerCase() == pixel.thisKeyIsBinded.toLowerCase()) {
+ pixel.charge = 1;
+ }
+ },
+ document.onkeyup = function(kb)/*keybind*/ {
+ if (kb.key.toLowerCase() == pixel.thisKeyIsBinded.toLowerCase()) {
+ }
+ }
+ doDefaults(pixel);
+ },
+ perTick: () => {
+ mouseSize = 1;
+ },
+ ignore: ["flash"],
+ conduct: 1,
+ movable: false,
+ category:"machines",
+ darkText: true,
+ maxSize: 1
+}
\ No newline at end of file
diff --git a/mod-list.html b/mod-list.html
index d9a16647..57e96c9c 100644
--- a/mod-list.html
+++ b/mod-list.html
@@ -304,6 +304,7 @@
subspace.js The Subspace Tripmine from Roblox nousernamefound
war_crimes.js Tear gas and more voidapex11
weapons.js Variety of different weapons Jayd
+ weaponsRewrite.js BETA! weapons.js is getting an overhaul, more details soon.(hopefully) Jayd
Food & Cooking
aChefsDream_beta.js Beta testing for aChefsDream.js SquareScreamYT
@@ -376,6 +377,7 @@
allliquids.js Made all elements liquids Orchid
amogus.js Small Among Us structure Alice
bfdi.js Several references to Battle for Dream Island Taterbob
+ chess.js Play chess in Sandboxels [Press U to start game] ggod
citybuilding.js Seeds that create miniature buildings and other city-related items SquareScreamYT
collab_mod.js Created by multiple people, adds random things mrapple, ilikepizza, stefanblox
cubesstuff.js Some random stuff like Disco Ball, Pyrite, and Nordic Gold Cube14yt
@@ -450,7 +452,6 @@
all_stain.js Every element stains solids stefanblox
betterMenuScreens.js Library for mods to create their own menus ggod
changePixelDebug.js The changePixel() function aborts and logs to console when it tries to change to a non-existent element Alice
- changeTempReactionParameter.js The changeTemp property to modded reactions Alice
code_library.js Functions and variables common to some other mods Alice
controllable_pixel_test.js Pixel that can be controlled with the keyboard keys [More Info] [PC ONLY] Alice
customexplosion.js Custom explosion element and interface for it Orchid
@@ -488,6 +489,7 @@
advanced_colonies.js Davlers, creatures with complex colonies DaviStudios
background_changer.js Press 'B' to change canvas background to a URL R74n
borders.js Black borders around pixels (Use bright background) R74n
+ changeTempReactionParameter.js The changeTemp property to modded reactions Alice
fast_lightmap.js Light sources glow, but faster RedBirdly
haseulite.js Loona-related materials with various properties Alice
humans.js Humans. Now part of the base game R74n
diff --git a/mods/PRNGworldgenlib.js b/mods/PRNGworldgenlib.js
index 48d5d0e8..68f221a6 100644
--- a/mods/PRNGworldgenlib.js
+++ b/mods/PRNGworldgenlib.js
@@ -520,7 +520,7 @@ elements.RandomGen = {
elements.view_seed = {
category: "edit",
onSelect: function(){
- alert(seed);
- selectElement("dirt");
+ promptText(seed, undefined, "Seed");
+ selectElement(prevElement);
}
}
diff --git a/mods/Sulfuric_Dixode.js b/mods/Sulfuric_Dixode.js
new file mode 100644
index 00000000..c2fa7d52
--- /dev/null
+++ b/mods/Sulfuric_Dixode.js
@@ -0,0 +1,125 @@
+if (typeof elements === "undefined") {
+ var elements = {};
+}
+if (typeof behaviors === "undefined") {
+ var behaviors = {};
+}
+if (typeof pixelMap === "undefined") {
+ var pixelMap = [];
+}
+if (typeof adjacentCoords === "undefined") {
+ var adjacentCoords = [
+ { x: 1, y: 0 },
+ { x: -1, y: 0 },
+ { x: 0, y: 1 },
+ { x: 0, y: -1 },
+ { x: 1, y: 1 },
+ { x: 1, y: -1 },
+ { x: -1, y: 1 },
+ { x: -1, y: -1 },
+ ];
+}
+if (typeof changePixel === "undefined") {
+ var changePixel = function (pixel, elemName) {
+ pixel.element = elemName;
+ };
+}
+
+elements.sulfuric_acid = {
+ name: "Sulfuric Acid",
+ color: ["#c8e0ff", "#d4e8ff", "#b8d4ff"],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1840,
+ tempHigh: 337,
+ stateHigh: "sulfuric_acid_gas",
+ tempLow: 10,
+ stateLow: "frozen_sulfuric_acid",
+ conduct: 1,
+ stain: 0.4,
+ viscosity: 0.02,
+ desc: "A highly corrosive, dense mineral acid. Reacts violently with water and metals.",
+ reactions: {
+ water: { elem1: "steam", elem2: "sulfuric_acid", chance: 0.6, temp1: 80 },
+ ice: { elem1: "water", elem2: "sulfuric_acid", chance: 0.7, temp1: 40 },
+ iron: { elem1: "hydrogen", elem2: "rust", chance: 0.4 },
+ steel: { elem1: "hydrogen", elem2: "corroded_steel", chance: 0.4 },
+ aluminum: { elem1: "hydrogen", elem2: "corroded_aluminum", chance: 0.4 },
+ wood: { elem1: "carbon", elem2: "sulfuric_acid", chance: 0.5 },
+ plant: { elem1: "carbon", elem2: "sulfuric_acid", chance: 0.5 },
+ flesh: { elem1: "carbon", elem2: "sulfuric_acid", chance: 0.5 },
+ },
+ tick: function (pixel) {
+ if (Math.random() < 0.05) {
+ var coord =
+ adjacentCoords[Math.floor(Math.random() * adjacentCoords.length)];
+ var x = pixel.x + coord.x;
+ var y = pixel.y + coord.y;
+ if (pixelMap[x] && pixelMap[x][y]) {
+ var other = pixelMap[x][y];
+ var elemDef = elements[other.element];
+ if (!elemDef) {
+ return;
+ }
+ if (elemDef.state === "solid" && !elemDef.acid_resistant) {
+ if (Math.random() < 0.1) {
+ changePixel(other, "corroded_matter");
+ }
+ }
+ }
+ }
+ },
+};
+
+elements.sulfuric_acid_gas = {
+ name: "Sulfuric Acid Gas",
+ color: ["#e0f0ff", "#d0e4ff"],
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 2,
+ desc: "Vaporized sulfuric acid.",
+};
+
+elements.frozen_sulfuric_acid = {
+ name: "Frozen Sulfuric Acid",
+ color: ["#9fb8e0", "#8fa8d0"],
+ behavior: behaviors.WALL,
+ category: "solids",
+ state: "solid",
+ density: 1900,
+ tempHigh: 10,
+ stateHigh: "sulfuric_acid",
+ desc: "Solidified sulfuric acid.",
+};
+
+elements.corroded_matter = {
+ name: "Corroded Matter",
+ color: ["#3a3a3a", "#2e2e2e", "#444444"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 1500,
+ desc: "Generic material heavily corroded by acid.",
+};
+
+elements.corroded_steel = {
+ name: "Corroded Steel",
+ color: ["#4b4b4b", "#555555", "#3f3f3f"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 7700,
+ desc: "Steel degraded by sulfuric acid.",
+};
+
+elements.corroded_aluminum = {
+ name: "Corroded Aluminum",
+ color: ["#6f6f6f", "#7a7a7a", "#656565"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 2600,
+ desc: "Aluminum degraded by sulfuric acid.",
+};
diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js
index 9e9840e3..9318325d 100644
--- a/mods/a_mod_by_alice.js
+++ b/mods/a_mod_by_alice.js
@@ -44986,7 +44986,6 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa
function editDistance(s1, s2) {s1 = s1.toLowerCase();s2 = s2.toLowerCase();var costs = new Array();for (var i = 0; i <= s1.length; i++) {var lastValue = i;for (var j = 0; j <= s2.length; j++) {if (i == 0)costs[j] = j;else {if (j > 0) {var newValue = costs[j - 1];if (s1.charAt(i - 1) != s2.charAt(j - 1))newValue = Math.min(Math.min(newValue, lastValue),costs[j]) + 1;costs[j - 1] = lastValue;lastValue = newValue;}}}if (i > 0)costs[s2.length] = lastValue;}return costs[s2.length];}
function similarity(s1, s2) {var longer = s1;var shorter = s2;if (s1.length < s2.length) {longer = s2;shorter = s1;}var longerLength = longer.length;if (longerLength == 0) {return 1.0;}return (longerLength - editDistance(longer, shorter)) / parseFloat(longerLength);}
function mostSimilarElement(s) {
- delete elements;
var max = 0;
var maxElement = "";
for (var e in elements) {
diff --git a/mods/alchem.js b/mods/alchem.js
index 39fb5d98..312b16f5 100644
--- a/mods/alchem.js
+++ b/mods/alchem.js
@@ -12,6 +12,17 @@ function findReachable(elems) {
if(e1 === "mushroom_gill") {
redo = redo || addElement_(elems, "mushroom_cap");
}
+
+
+ if(e1 === "oil") {
+ redo = redo || addElement_(elems, "lamp_oil");
+ redo = redo || addElement_(elems, "propane");
+ redo = redo || addElement_(elems, "molten_plastic");
+ }
+
+ if (eLists.SEEDS.includes(e1)) {
+ redo = redo || addElement_(elems, "fiber");
+ }
if(e1 === "thorium" && elems.includes("neutron")) {
@@ -80,6 +91,8 @@ function findReachable(elems) {
return elems;
}
+worldgentypes = {}
+
function addElement_(list, elem) {
if(elem instanceof Array)
{
@@ -102,11 +115,11 @@ let chemMod = document.querySelector("[src=\"mods/chem.js\"]");
// unhide oxygen (air), dirt (earth), fire, and water
function loadAlchem() {
- if(!elements.hematite) {
+ if (!elements.hematite) {
elements.hematite = {
- color: ["#e0472f","#bf2a2a","#913920"],
+ color: ["#e0472f", "#bf2a2a", "#913920"],
behavior: behaviors.POWDER,
- category: "alchemy mod",
+ category: "land",
density: 5250,
state: "solid",
tempHigh: 1539,
@@ -114,7 +127,7 @@ function loadAlchem() {
};
elements.molten_hematite = {
reactions: {
- "charcoal": { elem1: ["molten_iron","molten_iron","molten_iron","molten_iron","molten_nickel"], elem2: "carbon_dioxide"},
+ "charcoal": { elem1: ["molten_iron", "molten_iron", "molten_iron", "molten_iron", "molten_nickel"], elem2: "carbon_dioxide" },
},
};
elements.molten_slag.ignore.push("hematite");
@@ -122,17 +135,17 @@ function loadAlchem() {
elements.molten_pyrite = {
reactions: {
- "oxygen": { elem1: "iron", elem2: "sulfur_dioxide"},
+ "oxygen": { elem1: "iron", elem2: "sulfur_dioxide" },
},
};
elements.molten_slag.ignore.push("pyrite");
- if(!elements.chalcopyrite) {
+ if (!elements.chalcopyrite) {
elements.chalcopyrite = {
- color: ["#e8d7cb","#cdc0af","#726153","#8f775e","#bfaea0",],
+ color: ["#e8d7cb", "#cdc0af", "#726153", "#8f775e", "#bfaea0",],
behavior: behaviors.WALL,
- category: "alchemy mod",
+ category: "land",
density: 4200,
state: "solid",
tempHigh: 950,
@@ -140,17 +153,17 @@ function loadAlchem() {
};
elements.molten_chalcopyrite = {
reactions: {
- "charcoal": { elem1: "molten_copper", elem2: ["molten_slag","molten_slag","sulfur_dioxide","sulfur_dioxide","sulfur_dioxide","molten_iron"]},
+ "charcoal": { elem1: "molten_copper", elem2: ["molten_slag", "molten_slag", "sulfur_dioxide", "sulfur_dioxide", "sulfur_dioxide", "molten_iron"] },
},
};
elements.molten_slag.ignore.push("chalcopyrite");
}
- if(!elements.sphalerite) {
+ if (!elements.sphalerite) {
elements.sphalerite = {
- color: ["#7a7a7a","#5c5c5c","#3d3d3d","#363636","#e0e0e0",],
+ color: ["#7a7a7a", "#5c5c5c", "#3d3d3d", "#363636", "#e0e0e0",],
behavior: behaviors.WALL,
- category: "alchemy mod",
+ category: "land",
density: 4090,
state: "solid",
tempHigh: 1850,
@@ -158,18 +171,18 @@ function loadAlchem() {
};
elements.molten_sphalerite = {
reactions: {
- "charcoal": { elem1: "molten_zinc", elem2: ["sulfur_dioxide","sulfur_dioxide","sulfur_dioxide","sulfur_dioxide","sulfur_dioxide","gallium_gas"]},
+ "charcoal": { elem1: "molten_zinc", elem2: ["sulfur_dioxide", "sulfur_dioxide", "sulfur_dioxide", "sulfur_dioxide", "sulfur_dioxide", "gallium_gas"] },
},
};
elements.molten_slag.ignore.push("sphalerite");
}
- if(!elements.cassiterite) {
+ if (!elements.cassiterite) {
elements.cassiterite = {
- color: ["#5e5b5b","#705a4d","#826f6f","#333030","#e3d8d1"],
+ color: ["#5e5b5b", "#705a4d", "#826f6f", "#333030", "#e3d8d1"],
behavior: behaviors.WALL,
- category: "alchemy mod",
+ category: "land",
density: 6950,
state: "solid",
tempHigh: 1630,
@@ -177,17 +190,17 @@ function loadAlchem() {
};
elements.molten_cassiterite = {
reactions: {
- "charcoal": { elem1: "molten_tin", elem2: "carbon_dioxide"},
+ "charcoal": { elem1: "molten_tin", elem2: "carbon_dioxide" },
},
};
elements.molten_slag.ignore.push("cassiterite");
}
- if(!elements.galena) {
+ if (!elements.galena) {
elements.galena = {
- color: ["#e6e6e6","#bdbdbd","#7a7a7a","#737373"],
+ color: ["#e6e6e6", "#bdbdbd", "#7a7a7a", "#737373"],
behavior: behaviors.WALL,
- category: "alchemy mod",
+ category: "land",
density: 7600,
state: "solid",
tempHigh: 1113,
@@ -195,178 +208,161 @@ function loadAlchem() {
};
elements.molten_galena = {
reactions: {
- "charcoal": { elem1: "molten_lead", elem2: "sulfur_dioxide"},
+ "charcoal": { elem1: "molten_lead", elem2: "sulfur_dioxide" },
},
};
elements.molten_slag.ignore.push("galena");
}
let ores = Array(5).fill("molten_hematite")
- .concat(Array(5).fill("molten_pyrite"))
- .concat(Array(5).fill("molten_chalcopyrite"))
- .concat(Array(3).fill("molten_cassiterite"))
- .concat(Array(5).fill("molten_sphalerite"))
- .concat(Array(3).fill("molten_galena"))
- .concat(Array(2).fill("molten_rutile"))
- .concat(Array(5).fill("molten_bauxite"))
- .concat(Array(2).fill("molten_silver"))
- .concat(Array(1).fill("molten_gold"))
- .concat(Array(3).fill("molten_fluorite"))
- .concat(Array(3).fill("molten_uraninite"))
+ .concat(Array(5).fill("molten_pyrite"))
+ .concat(Array(5).fill("molten_chalcopyrite"))
+ .concat(Array(3).fill("molten_cassiterite"))
+ .concat(Array(5).fill("molten_sphalerite"))
+ .concat(Array(3).fill("molten_galena"))
+ .concat(Array(2).fill("molten_rutile"))
+ .concat(Array(5).fill("molten_bauxite"))
+ .concat(Array(2).fill("molten_silver"))
+ .concat(Array(1).fill("molten_gold"))
+ .concat(Array(3).fill("molten_fluorite"))
+ .concat(Array(3).fill("molten_uraninite"));
elements.molten_slag.ignore.push("rutile");
elements.molten_slag.ignore.push("bauxite");
elements.molten_slag.ignore.push("silver");
elements.molten_slag.ignore.push("gold");
- elements.seltzer.reactions["electric"] =
- { elem1: "water", elem2:"methane"};
- elements.carbon_dioxide.reactions["electric"] =
- { elem1:"methane"};
- elements.magma.reactions["magma"] =
- { elem2:ores, tempMin:2500, tempMax:3000, chance:0.0001};
+ elements.seltzer.reactions["electric"] =
+ { elem1: "water", elem2: "methane" };
+ elements.carbon_dioxide.reactions["electric"] =
+ { elem1: "methane" };
+ elements.magma.reactions["magma"] =
+ { elem2: ores, tempMin: 2500, tempMax: 3000, chance: 0.0001 };
-if (!settings.alchemyUnlocked) {
- settings.alchemyUnlocked = {
- "oxygen": true,
- "dirt": true,
- "fire": true,
- "water": true,
- };
-}
-if (settings.unlocked.alchemymod) {
- for (var element in settings.unlocked) {
- if (settings.unlocked[element]) {
- settings.alchemyUnlocked[element] = true
- }
+ if (!settings.alchemyUnlocked) {
+ settings.alchemyUnlocked = {
+ "oxygen": true,
+ "dirt": true,
+ "fire": true,
+ "water": true,
+ };
}
-}
-
-// loop through the elements object
-if (elements.explosion) {
- elements.explosion.category = "tools";
-}
-if (elements.room_temp) {
- elements.room_temp.category = "tools";
-}
-if (elements.cook) {
- elements.cook.category = "tools";
-}
-if (elements.incinerate) {
- elements.incinerate.category = "tools";
-}
-for (var element in elements) {
- if (elements[element].category === "tools") {
- settings.alchemyUnlocked[element] = true;
- }
- if (settings.alchemyUnlocked[element]) {
- elements[element].hidden = false;
- if (elements[element].category !== "tools") { elements[element].category = "alchemy mod"; }
- }
- else if (elements[element].category !== "tools") {
- // give the element the hidden attribute true
- elements[element].hidden = true;
- // set its category to "alchemy mod"
- elements[element].category = "alchemy mod";
- }
-}
-
-// set the unhide setting to Unlock as Discovered (2)
-settings.unhide = 2;
-
-runAfterLoad(function(){
- checkUnlock = function(element) {
- if (elements[element] && elements[element].hidden && !settings.alchemyUnlocked[element]) {
- settings.alchemyUnlocked[element] = true;
- if (settings.unhide === 2) {
- createElementButton(element)
- var categoryButton = document.querySelector(".categoryButton[current='true']");
- var currentCategory = categoryButton.getAttribute("category");
- if (currentCategory !== elements[element].category) {
- document.getElementById("categoryButton-"+elements[element].category).classList.add("notify");
- }
- // add notify to the elementButton of the element
- document.getElementById("elementButton-"+element).classList.add("notify");
+ if (settings.unlocked.alchemymod) {
+ for (var element in settings.unlocked) {
+ if (settings.unlocked[element]) {
+ settings.alchemyUnlocked[element] = true;
}
- saveSettings();
}
}
-})
-runAfterAutogen(function(){
- for (var element in elements) {
- if (elements[element].category === "states") {
- elements[element].category = "alchemy mod"
+
+ // loop through the elements object
+ if (elements.explosion) {
+ elements.explosion.category = "tools";
+ }
+ if (elements.room_temp) {
+ elements.room_temp.category = "tools";
+ }
+ if (elements.cook) {
+ elements.cook.category = "tools";
+ }
+ if (elements.incinerate) {
+ elements.incinerate.category = "tools";
+ }
+
+ // set the unhide setting to Unlock as Discovered (2)
+ settings.unhide = 2;
+
+ runAfterLoad(function () {
+ checkUnlock = function (element) {
+ if (elements[element] && elements[element].hidden && !settings.alchemyUnlocked[element]) {
+ settings.alchemyUnlocked[element] = true;
+ if (settings.unhide === 2) {
+ createElementButton(element);
+ var categoryButton = document.querySelector(".categoryButton[current='true']");
+ var currentCategory = categoryButton.getAttribute("category");
+ if (currentCategory !== elements[element].category) {
+ document.getElementById("categoryButton-" + elements[element].category).classList.add("notify");
+ }
+ // add notify to the elementButton of the element
+ document.getElementById("elementButton-" + element).classList.add("notify");
+ }
+ saveSettings();
+ }
+ };
+ });
+ window.addEventListener("load", function () {
+ for (var element in elements) {
+ if (elements[element].hidden && document.getElementById("elementButton-" + element)) {
+ document.getElementById("elementButton-" + element).remove();
+ }
+ }
+ });
+
+ function lockAll() {
+ for (var element in elements) {
+ if (elements[element].category === "tools") {
+ settings.alchemyUnlocked[element] = true;
+ }
+ if (settings.alchemyUnlocked[element]) {
+ elements[element].hidden = false;
+ }
+ else if (elements[element].category !== "tools") {
+ // give the element the hidden attribute true
+ elements[element].hidden = true;
+ }
+ if (elements[element].category !== "tools") {
+ if (!settings.alchemyUnlocked || Object.keys(settings.alchemyUnlocked).length < 25) {
+ elements[element].category = "alchemy mod";
+ }
+ }
}
}
-})
-window.addEventListener("load",function(){
- for (var element in elements) {
- if (elements[element].hidden && document.getElementById("elementButton-"+element)) {
- document.getElementById("elementButton-"+element).remove()
- }
- }
-})
-
- /*runAfterAutogen(function(){
+ runAfterAutogen(() => runAfterAutogen(lockAll));
+
+
+ function printReachable() {
let reachable = findReachable(initialElements);
console.log(reachable.join(","));
let string = "";
- for(let i in elements)
- {
- if(!reachable.includes(i))
- {
- if(string === "")
- {
+ for (let i in elements) {
+ if (!reachable.includes(i)) {
+ if (string === "") {
string = i;
}
- else
- {
+ else {
string += "," + i;
}
}
}
console.log(string);
string = "";
- for(let i = 0; i < reachable.length; i++)
- {
- if(!settings.alchemyUnlocked[reachable[i]])
- {
- if(string === "")
- {
+ for (let i = 0; i < reachable.length; i++) {
+ if (!settings.alchemyUnlocked[reachable[i]]) {
+ if (string === "") {
string = reachable[i];
}
- else
- {
+ else {
string += "," + reachable[i];
}
}
}
console.log(string);
string = "";
- for(let i in settings.alchemyUnlocked)
- {
- if(!reachable.includes(i) && settings.alchemyUnlocked[i] && elements[i].category !== "tools")
- {
- if(string === "")
- {
+ for (let i in settings.alchemyUnlocked) {
+ if (!reachable.includes(i) && settings.alchemyUnlocked[i] && elements[i].category !== "tools") {
+ if (string === "") {
string = i;
}
- else
- {
+ else {
string += "," + i;
}
}
}
console.log(string);
- });*/
+ }
+ // runAfterAutogen(() => runAfterAutogen(printReachable));
}
-if (chemMod) {
- if (chemMod.readyState === 'complete') {
- loadAlchem();
- } else {
- chemMod.addEventListener("load", loadAlchem);
- }
-} else {
- loadAlchem();
-}
\ No newline at end of file
+dependOn("chem.js", () => { return; }, true);
+
+loadAlchem();
\ No newline at end of file
diff --git a/mods/allthemods.js b/mods/allthemods.js
new file mode 100644
index 00000000..aa593ec2
--- /dev/null
+++ b/mods/allthemods.js
@@ -0,0 +1,21 @@
+var mods_to_include = ["glow.js", "circuitcore.js", "clone_liquid.js", "colored_lightbulbs.js", "combustion.js", "conveyance.js", "coresbyp.js", "datawire.js", "drill.js", "ExtraMachines.js", "fans.js", "fine_tuned_cloner.js", "flipflop.js", "fueled_generators.js", "gameOfLife.js", "heatshield.js", "human_friendly_design.js", "industry.js", "logicgates.js", "note_block_advanced.js", "note_block.js", "nousersthings.js", "portal.js", "pullers.js", "pushers.js", "sandboxels.js", "schematics.js", "scp.js", "spouts.js", "state_voids.js", "switches.js", "thiquovite.js", "ticking_temp_stuff.js", "video.js", "waterspout.js", "WhisperingTheory.js", "wifi_draw.js", "aircrafts.js", "c_fighter_jet.js", "guided_rocket.js", "icb.js", "life_eater.js", "liquid_void.js", "meat_rockets.js", "more_breaking.js", "rays.js", "rays++.js", "scp.js", "subspace.js", "war_crimes.js", "weapons.js", "aChefsDream_beta.js", "aChefsDream.js", "aChefsDream2.js", "bananas.js", "CherrySoda.js", "community_desserts.js", "devsnacks.js", "GrapeSoda.js", "greenitemsandmore.js", "ketchup_mod.js", "lemonade.js", "morefoodsmod.js", "mossstuff.js", "mustard.js", "potato_chips.js", "sbstuff.js", "soups.js", "weAllScreamFor.js", "apioforms_pre.js", "baby.js", "bacteria_mod.js", "bananas.js", "biology.js", "cat.js", "cells.js", "children.js", "coldblooded.js", "colonies.js", "crimson.js", "dogs.js", "eklegems.js", "fairy_chain.js", "fantastic_creatures.js", "fantasy_elements.js", "fey_and_more.js", "fishin.js", "flowers_and_forests.js", "fwibblen.js", "genetics.js", "human_edit.js", "kopalstuff.js", "lizard_mod.js", "lost_souls.js", "miscible_psoup_and_birthpool.js", "mobs.js", "moretrees.js", "no_blood.js", "nocancer.js", "nocancer2.js", "nograssgrow.js", "ocean.js", "ores.js", "petal_dye.js", "plants.js", "primordial_birthpool.js", "scp.js", "spring.js", "the_ground_og.js", "toothpaste.js", "volcanic_expansion.js", "alcohol.js","alkahest.js","alkali_metal.js","bettermetalscrap.js","boiling_things.js","bouncing_balls.js","chalk.js","chem.js","grav_mudstones.js","halogen.js","liquid_mixing.js","lye.js","metals.js","mixture.js","moreliquids.js", "PRNGworldgenlib.js"
+
+
+
+]
+
+var mods_included = mods_to_include.map(mod => enabledMods.includes(mod));
+var all_mods_included = mods_included.reduce(function(a,b) { return a && b });
+
+if(!all_mods_included) {
+ // var mods_needed = mods_to_include.filter(function(modPath) { return !(enabledMods.includes(modPath)) });
+
+ mods_needed.forEach(function(modName) {
+ // enabledMods.splice(enabledMods.indexOf("allthemods"),0,modPath);
+ dependOn(modPath, ()=>{}, true)
+ });
+// localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
+// alert(`The following mods have been inserted: ${mods_needed.join(", ")}
+// Reload the page for the mods to take effect.`)
+}
+
diff --git a/mods/background_music.js b/mods/background_music.js
new file mode 100644
index 00000000..9e2e986a
--- /dev/null
+++ b/mods/background_music.js
@@ -0,0 +1,277 @@
+/*
+function loadJsDelivr(url, callback) {
+ const script = document.createElement('script');
+ script.src = url;
+ script.onload = () => {
+ console.log('Loaded:', url);
+ if (callback) callback();
+ };
+ script.onerror = () => {
+ console.error('Failed to load:', url);
+ };
+ document.head.appendChild(script);
+}
+*/
+
+/**
+ * @type {undefined | HTMLAudioElement}
+ */
+let currentMusic;
+const PLAY = "\u25B6";
+const PAUSE = "\u23F8";
+/**
+ *
+ * @param {string|File} userAudio
+ */
+function setBackgroundMusic(userAudio) {
+ let audioSrc;
+
+ if (typeof userAudio === "string") {
+ if (!isValidAudioUrl(userAudio)) {
+ promptText("Invalid audio URL");
+ return;
+ }
+ audioSrc = new URL(userAudio).href;
+ } else if (userAudio instanceof File) {
+ if (!userAudio.type.startsWith("audio/")) {
+ promptText("Invalid audio file");
+ return;
+ }
+ audioSrc = URL.createObjectURL(userAudio);
+ } else {
+ promptText("Invalid audio input");
+ return;
+ }
+
+ if (currentMusic && currentMusic.src === audioSrc) return;
+
+ if (currentMusic) {
+ currentMusic.pause();
+ currentMusic.remove();
+ }
+
+ const audio = document.createElement('audio');
+ audio.src = audioSrc;
+ audio.loop = true;
+ audio.volume = 0.5;
+ audio.id = "bgm";
+ document.body.appendChild(audio);
+
+ currentMusic = audio;
+
+ // Only save if it's a URL, not a local file
+ if (typeof userAudio === "string") {
+ settings.bgMusic = audioSrc;
+ saveSettings();
+ }
+
+ logMessage(`Now playing: ${audioSrc}`);
+ return audio;
+}
+
+
+function isValidAudioUrl(inpurl) {
+ try {
+ const url = new URL(inpurl);
+ if (!['http:', 'https:'].includes(url.protocol)) return false;
+ return /\.(mp3|wav|ogg)$/i.test(url.pathname);
+ } catch {
+ return false;
+ }
+}
+
+
+let music_setting;
+let play;
+let playing = false;
+dependOn("betterSettings.js", () => {
+ // @ts-ignore
+ const settings_tab = new SettingsTab("background_music.js")
+ // @ts-ignore
+ music_setting = new Setting("Background Music", "bgm", settingType.TEXT, false)
+ // @ts-ignore
+ play = new Setting("Play", "play", settingType.BOOLEAN, false)
+ settings_tab.registerSettings(undefined, play)
+ settings_tab.registerSettings(undefined, music_setting)
+ // @ts-ignore
+ settingsManager.registerTab(settings_tab)
+}, true)
+
+keybinds["KeyK"] = () => {
+ if (playing) {
+ document.getElementById('pauseButton').click()
+ }
+}
+
+function addCss() {
+ const CSS = `
+ .songControl {
+ position: absolute;
+ bottom: 0;
+ left: 50%;
+ transform: translateX(-50%);
+
+ display: flex;
+ gap: 10px;
+ flex-wrap: nowrap;
+ align-items: center;
+ justify-content: center;
+
+ padding: 10px;
+ height: 20px;
+
+ pointer-events: none;
+ background-color: transparent;
+ border: 2px solid white;
+ box-shadow: 0 0 8px rgba(0,0,0,0.8);
+ }
+ .pixelArt {
+ image-rendering: pixelated;
+ image-rendering: crisp-edges;
+ width: 15px;
+ height: auto;
+ }
+
+
+ `
+ const style_div = document.createElement("style")
+ style_div.innerHTML = CSS
+
+ document.head.appendChild(style_div)
+}
+
+function createPauseButton() {
+ const pauseImgLink = "https://raw.githubusercontent.com/Cube14yt/assets/main/images/pause.png"
+ const playImgLink = "https://raw.githubusercontent.com/Cube14yt/assets/main/images/play.png"
+ const pauseButton = document.createElement("button");
+ /**
+ * @this {HTMLButtonElement}
+ */
+ pauseButton.onclick = function () {
+ if (playing) {
+ this.replaceChildren()
+ let img = document.createElement("img")
+ img.src = playImgLink
+ img.classList.add("pixelArt")
+ this.appendChild(img)
+ playing = !playing
+ currentMusic?.pause();
+ } else {
+ this.replaceChildren()
+ let img = document.createElement("img")
+ img.src = pauseImgLink
+ img.classList.add("pixelArt")
+ this.appendChild(img)
+ playing = !playing
+ const url = music_setting.value;
+
+ if (!currentMusic) {
+ setBackgroundMusic(url);
+ }
+ currentMusic?.play()
+ }
+ }
+ pauseButton.replaceChildren()
+ let img = document.createElement("img")
+ img.src = playImgLink
+ img.classList.add("pixelArt")
+ pauseButton.appendChild(img)
+ pauseButton.style.pointerEvents = 'auto'
+ pauseButton.style.border = '2px solid white'
+ pauseButton.id = 'pauseButton'
+ return pauseButton
+}
+
+function createResetButton() {
+ const resetButton = document.createElement("button");
+ /**
+ * @this {HTMLButtonElement}
+ */
+ resetButton.onclick = function () {
+ if (currentMusic) currentMusic.currentTime = 0
+ }
+ let img = document.createElement("img")
+ img.src = "https://raw.githubusercontent.com/Cube14yt/assets/main/images/reset.png"
+ img.classList.add("pixelArt")
+ resetButton.appendChild(img)
+ resetButton.style.pointerEvents = "auto"
+ resetButton.style.border = '2px solid white'
+ resetButton.id = 'resetButton'
+ return resetButton
+}
+
+function createVolumeButton() {
+ const volumeButton = document.createElement("button");
+ /**
+ * @this {HTMLButtonElement}
+ */
+ volumeButton.onclick = function () {
+ promptInput("Input the new volume of the current music", (vol) => {
+ if (!currentMusic) return;
+ let newVolume = Number(vol)
+ if (!(newVolume >= 0 && newVolume <= 1)) return
+ currentMusic.volume = newVolume
+ })
+ }
+ let img = document.createElement("img")
+ img.src = "https://raw.githubusercontent.com/Cube14yt/assets/main/images/volume.png"
+ img.classList.add("pixelArt")
+ volumeButton.appendChild(img)
+ volumeButton.style.pointerEvents = "auto"
+ volumeButton.style.border = '2px solid white'
+ volumeButton.id = "volumeButton"
+ return volumeButton
+}
+
+function createInputButton() {
+ const inputButton = document.createElement('button')
+ inputButton.onclick = function () {
+ promptChoose("How do you want to input your song?", ["URL", "File"], (choice) => {
+ if (choice === "URL") {
+ promptInput("Give the url your song should use", (url) => {
+ music_setting.value = url
+ }, "Input URL")
+ } else if (choice === "File") {
+ const input = document.createElement('input')
+ input.type = "file"
+ input.addEventListener('change', (event) => {
+ // @ts-ignore
+ const file = event.target.files[0];
+ if (file) setBackgroundMusic(file)
+ })
+ input.click()
+ }
+ })
+ }
+ inputButton.textContent = "Input Song"
+ inputButton.style.pointerEvents = "auto"
+ inputButton.style.border = '2px solid white'
+ inputButton.id = 'inputButton'
+ return inputButton
+}
+
+function showSongUi() {
+ let songDiv = document.getElementById("songUiParent");
+
+ const canvas_div = document.getElementById("canvasDiv");
+ if (!canvas_div) {
+ requestAnimationFrame(showSongUi)
+ return
+ };
+
+ if (!songDiv) {
+
+ songDiv = document.createElement("div");
+ songDiv.classList.add("songControl");
+ songDiv.id = "songUiParent";
+ songDiv.appendChild(createPauseButton())
+ songDiv.append(createResetButton())
+ songDiv.append(createVolumeButton())
+ songDiv.append(createInputButton())
+ canvas_div.appendChild(songDiv);
+ }
+ console.log("UI loaded sucessfully")
+}
+
+addCss()
+showSongUi()
diff --git a/mods/bananas.js b/mods/bananas.js
index be11cf0f..7f6bea83 100644
--- a/mods/bananas.js
+++ b/mods/bananas.js
@@ -1,139 +1,347 @@
var modName = "mods/bananas.js";
var onTryMoveIntoMod = "mods/onTryMoveInto.js";
var libraryMod = "mods/code_library.js";
+function scale (number, inMin, inMax, outMin, outMax) {
+ return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
+}
-if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
- randomNumberFromOneToThree = function() {
- return 1 + Math.floor(Math.random() * 3)
- };
-
- debugSpeedGrowth = false;
- logLeaves = false;
- bananaAttachWhitelist = ["banana_pseudostem","banana_peduncle_1","banana_peduncle_2","petal","banana_leaf","banana_plant_top","banana"];
-
- bananaDirtElements = ["dirt","mud","sand","wet_sand","clay_soil","mycelium","grass"];
+randomNumberFromOneToThree = function() {
+ return 1 + Math.floor(Math.random() * 3)
+};
- function logPixelCoords(pixel) {
- return `(${pixel.x}, ${pixel.y})`
- };
+debugSpeedGrowth = false;
+logLeaves = false;
+bananaAttachWhitelist = ["banana_pseudostem","banana_peduncle_1","banana_peduncle_2","petal","banana_leaf","banana_plant_top","banana"];
- function hasPixel(x,y,elementInput) {
- if(isEmpty(x,y,true)) { //if empty, it can't have a pixel
- return false;
+bananaDirtElements = ["dirt","mud","sand","wet_sand","clay_soil","mycelium","grass"];
+
+function logPixelCoords(pixel) {
+ return `(${pixel.x}, ${pixel.y})`
+};
+
+function hasPixel(x,y,elementInput) {
+ if(isEmpty(x,y,true)) { //if empty, it can't have a pixel
+ return false;
+ } else {
+ if(elementInput.includes(",")) { //CSTA
+ elementInput = elementInput.split(",");
+ };
+ if(Array.isArray(elementInput)) { //if element list
+ return elementInput.includes(pixelMap[x][y].element);
+ } else { //if single element
+ return pixelMap[x][y].element === elementInput;
+ };
+ };
+};
+
+elements.banana_seed = {
+ color: "#3b3b2e",
+ tick: function(pixel) {
+ if(pixel.bananaRange === null) {
+ pixel.bananaRange = randomNumberFromOneToThree();
+ };
+
+ if (isEmpty(pixel.x,pixel.y+1)) {
+ movePixel(pixel,pixel.x,pixel.y+1);
} else {
- if(elementInput.includes(",")) { //CSTA
- elementInput = elementInput.split(",");
- };
- if(Array.isArray(elementInput)) { //if element list
- return elementInput.includes(pixelMap[x][y].element);
- } else { //if single element
- return pixelMap[x][y].element === elementInput;
- };
- };
- };
-
- elements.banana_seed = {
- color: "#3b3b2e",
- tick: function(pixel) {
- if(pixel.bananaRange === null) {
- pixel.bananaRange = randomNumberFromOneToThree();
- };
-
- if (isEmpty(pixel.x,pixel.y+1)) {
- movePixel(pixel,pixel.x,pixel.y+1);
- } else {
- if (Math.random() < (debugSpeedGrowth ? 0.09 : 0.03) && pixel.age > (debugSpeedGrowth ? 20 : 50) && pixel.temp < 100) {
- if (!outOfBounds(pixel.x,pixel.y+1)) {
- var dirtPixel = pixelMap[pixel.x][pixel.y+1];
- if (bananaDirtElements.includes(dirtPixel.element)) {
- changePixel(dirtPixel,"root");
- };
+ if (Math.random() < (debugSpeedGrowth ? 0.09 : 0.03) && pixel.age > (debugSpeedGrowth ? 20 : 50) && pixel.temp < 100) {
+ if (!outOfBounds(pixel.x,pixel.y+1)) {
+ var dirtPixel = pixelMap[pixel.x][pixel.y+1];
+ if (bananaDirtElements.includes(dirtPixel.element)) {
+ changePixel(dirtPixel,"root");
};
- if (isEmpty(pixel.x,pixel.y-1)) {
- movePixel(pixel,pixel.x,pixel.y-1);
- createPixel("banana_pseudostem",pixel.x,pixel.y+1);
- pixelMap[pixel.x][pixel.y+1].bananaRange = pixel.bananaRange; //pass banana range down to pseudostem
- };
- } else if (pixel.age > (debugSpeedGrowth ? 500 : 1000)) {
- changePixel(pixel,"banana_plant_top");
};
- pixel.age++;
- };
- if(Math.random() < 0.01 && pixel.age > 200) {
+ if (isEmpty(pixel.x,pixel.y-1)) {
+ movePixel(pixel,pixel.x,pixel.y-1);
+ createPixel("banana_pseudostem",pixel.x,pixel.y+1);
+ pixelMap[pixel.x][pixel.y+1].bananaRange = pixel.bananaRange; //pass banana range down to pseudostem
+ };
+ } else if (pixel.age > (debugSpeedGrowth ? 500 : 1000)) {
changePixel(pixel,"banana_plant_top");
};
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- //"bananaRange": null, //apparently this is suddenly, in an illogical, never-before-seen, completely new, unprecedented incident of bad behavior, evaluated before being put into the property database, so RNG has to be done in tick
- "bananaRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- cooldown: defaultCooldown,
- };
+ pixel.age++;
+ };
+ if(Math.random() < 0.01 && pixel.age > 200) {
+ changePixel(pixel,"banana_plant_top");
+ };
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ //"bananaRange": null, //apparently this is suddenly, in an illogical, never-before-seen, completely new, unprecedented incident of bad behavior, evaluated before being put into the property database, so RNG has to be done in tick
+ "bananaRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+ cooldown: defaultCooldown,
+};
- elements.banana_pseudostem = {
- hidden: true,
- color: "#d5e39f",
- tick: function(pixel) {
- if(pixel.bananaRange === null) {
- pixel.bananaRange = randomNumberFromOneToThree();
+elements.banana_pseudostem = {
+ hidden: true,
+ color: "#d5e39f",
+ tick: function(pixel) {
+ if(pixel.bananaRange === null) {
+ pixel.bananaRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 60 && pixel.temp < 100 && !pixel.grewPeduncle) {
+ var peduncleOffsets = [-1, 1]; //placed to the left, placed to the right
+ for(i = 0; i < peduncleOffsets.length; i++) {
+ if (isEmpty(pixel.x+peduncleOffsets[i],pixel.y,false)) {
+ if (Math.random() < 0.005) {
+ createPixel("banana_peduncle_1",pixel.x+peduncleOffsets[i],pixel.y);
+ pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].dir = Math.sign(peduncleOffsets[i]);
+ pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].bananaRange = pixel.bananaRange; //pass banana range down to peduncle
+ if(Math.random() < 0.8) { pixel.grewPeduncle = true; } //20% chance to not mark as true, allowing for a chance to try another peduncle
+ };
+ };
};
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ "grewPeduncle": false,
+ "bananaRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
- if (pixel.age > 60 && pixel.temp < 100 && !pixel.grewPeduncle) {
- var peduncleOffsets = [-1, 1]; //placed to the left, placed to the right
- for(i = 0; i < peduncleOffsets.length; i++) {
- if (isEmpty(pixel.x+peduncleOffsets[i],pixel.y,false)) {
- if (Math.random() < 0.005) {
- createPixel("banana_peduncle_1",pixel.x+peduncleOffsets[i],pixel.y);
- pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].dir = Math.sign(peduncleOffsets[i]);
- pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].bananaRange = pixel.bananaRange; //pass banana range down to peduncle
- if(Math.random() < 0.8) { pixel.grewPeduncle = true; } //20% chance to not mark as true, allowing for a chance to try another peduncle
+elements.banana = {
+ color: "#ede84c",
+ tick: function(pixel) {
+ if(pixel.attached) {
+ var attachCoords = [pixel.x+Math.sign(pixel.attachDirection), pixel.y];
+ if(isEmpty(attachCoords[0],attachCoords[1],false)) {
+ pixel.attached = false;
+ };
+ } else { //Move if not attached
+ if (!tryMove(pixel, pixel.x, pixel.y+1)) {
+ if(Math.random() < 0.9) {
+ if (Math.random() < 0.5) {
+ if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
+ tryMove(pixel, pixel.x-1, pixel.y+1);
+ };
+ } else {
+ if (!tryMove(pixel, pixel.x-1, pixel.y+1)) {
+ tryMove(pixel, pixel.x+1, pixel.y+1);
};
};
};
};
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- "grewPeduncle": false,
- "bananaRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.banana = {
- color: "#ede84c",
- tick: function(pixel) {
- if(pixel.attached) {
- var attachCoords = [pixel.x+Math.sign(pixel.attachDirection), pixel.y];
- if(isEmpty(attachCoords[0],attachCoords[1],false)) {
- pixel.attached = false;
+ };
+ doDefaults(pixel);
+ var shouldSpoil = true; //spoil by default
+ if(pixel.attached) { //if it's attached
+ if(!isEmpty(attachCoords[0],attachCoords[1],true)) { //if the attachment coords are a pixel and not OOB
+ var attachPixel = pixelMap[attachCoords[0]][attachCoords[1]];
+ var attachElement = attachPixel.element;
+ if(bananaAttachWhitelist.includes(attachElement)) {//if the element is a whitelisted "don't spoil" element
+ shouldSpoil = false; //then don't spoil
};
- } else { //Move if not attached
+ };
+ };
+ if(shouldSpoil) { //spoil if not attached
+ if(pixel.temp > -14 && pixel.temp <= 4) { //(no spoiling below 14C)
+ pixel.spoilage += Math.max(Math.min(scale(pixel.temp,-14,4,0,9),9),0)
+ } else if(pixel.temp > 4) {
+ pixel.spoilage += Math.max(Math.min(scale(pixel.temp,4,20,9,30),40),0)
+ };
+ };
+ if(pixel.spoilage > 14400) { //3600 = 120 ticks at 20C
+ if(Math.random() < 0.05) {
+ changePixel(pixel,"spoiled_banana");
+ };
+ };
+ },
+ properties: {
+ "spoilage":0,
+ "attached": false,
+ "attachDirection": (!Math.floor(Math.random() * 2)) ? 1 : -1,
+ },
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+ onMoveInto: function(pixel,otherPixel) {
+ var otherInfo = elements[otherPixel.element]
+ if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
+ pixel.attached = false;
+ };
+ },
+ category: "food"
+};
+
+elements.banana_peduncle_1 = {
+ hidden: true,
+ name: "banana peduncle (offshoot)",
+ color: "#acb55b",
+ tick: function(pixel) {
+ if(pixel.bananaRange === null) {
+ pixel.bananaRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 20 && pixel.temp < 100) {
+ var peduncleCoords1 = [pixel.x + pixel.dir, pixel.y];
+ var peduncleCoords2 = [pixel.x + pixel.dir, pixel.y + 1];
+ if(isEmpty(peduncleCoords1[0],peduncleCoords1[1],false) && isEmpty(peduncleCoords2[0],peduncleCoords2[1],false)) {
+ if(Math.random() < 0.5) {
+ createPixel(pixel.element,peduncleCoords1[0],peduncleCoords1[1]);
+ pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].dir = pixel.dir;
+ pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].bananaRange = pixel.bananaRange; //pass banana range down to next pixel of peduncle horizontal
+ } else {
+ createPixel("banana_peduncle_2",peduncleCoords2[0],peduncleCoords2[1]);
+ pixelMap[peduncleCoords2[0]][peduncleCoords2[1]].bananaRange = pixel.bananaRange; //pass banana range down to diagonal offshoot
+ };
+ };
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "dir": (!Math.floor(Math.random() * 2)) ? 1 : -1,
+ "age": 0,
+ //"bananaRange": (1 + (Math.floor(Math.random() * 3))), //1-3
+ "bananaRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+elements.banana_peduncle_2 = {
+ hidden: true,
+ name: "banana peduncle (hanging)",
+ color: "#9bad51",
+ tick: function(pixel) {
+ if(pixel.bananaRange === null) {
+ pixel.bananaRange = randomNumberFromOneToThree();
+ };
+
+ // Grow/Flower
+ if (pixel.age > 20 && pixel.temp < 100) {
+ var growthCoords = [pixel.x, pixel.y + 1];
+ if(isEmpty(...growthCoords)) {
+ if(Math.random() < 0.9) {
+ createPixel(pixel.element,...growthCoords);
+ pixelMap[growthCoords[0]][growthCoords[1]].bananaRange = pixel.bananaRange; //pass banana range down to next pixel of peduncle vertical
+ } else {
+ createPixel("petal",...growthCoords); //the sexual dimorphism of the banana plant has zonked me
+ };
+ };
+ };
+
+ //Make bananas
+ if (pixel.age > 40 && pixel.temp < 100) {
+ var bananaOffsets = [-1, 1]; //placed to the left, placed to the right
+ for(i = 0; i < bananaOffsets.length; i++) {
+ //console.log(`Looping through left and right positions: ${bananaOffsets}`);
+ for(j = 1; j < pixel.bananaRange + 1; j++) { //for max banana distance, using the banana range
+ //console.log(`Looping through banana offset multipliers: ${j}`);
+ if (isEmpty(pixel.x+(j * bananaOffsets[i]),pixel.y,false)) { //if there's an empty space
+ //console.log(`Banana position is empty: [${j * bananaOffsets[i]}, 0]\nTrying banana at (${pixel.x+(j * bananaOffsets[i])},${pixel.y})`);
+ if (Math.random() < (debugSpeedGrowth ? 0.05 : 0.005)) { //try to place the banana
+ //console.log(`Placing banana`);
+ createPixel("banana",pixel.x+(j * bananaOffsets[i]),pixel.y);
+ pixelMap[pixel.x+(j * bananaOffsets[i])][pixel.y].attached = true;
+ pixelMap[pixel.x+(j * bananaOffsets[i])][pixel.y].attachDirection = -1 * Math.sign(bananaOffsets[i]); //attach dir is the opposite of placement dir so it attaches towards the stem
+ } else {
+ //console.log(`NOT placing banana`);
+ };
+ //console.log(`Banana tried, stopping iteration`);
+ break; //and then stop iteration
+ } else {
+ //console.log(`Banana position is NOT empty: [${j * bananaOffsets[i]}, 0]\nSkipping this offset`);
+ continue; //if not empty, skip that pixel and move on the next distance
+ };
+ //console.log(`====End of side try====`);
+ };
+ //console.log(`####End of side iterator####`);
+ };
+ //console.log(`>>>>End of banana iterator<<<<`);
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ //console.log(`\nEnd of peduncle tick\n`);
+ },
+ properties: {
+ "age": 0,
+ //"bananaRange": (1 + (Math.floor(Math.random() * 3))), //1-3
+ "bananaRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+elements.spoiled_banana = {
+ hidden: true,
+ color: "#594b29",
+ behavior: [
+ "XX|CR:stench,fly%0.1|XX",
+ "M2%0.5|CH:dirty_water,fly,fly%0.007|M2%0.5",
+ "M2|M1|M2"
+ ],
+ stain: 0.01,
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+};
+
+elements.fly.reactions.spoiled_banana = { "elem2":null, chance:0.15, func:behaviors.FEEDPIXEL };
+
+elements.banana_leaf = {
+ hidden: true,
+ color: "#9df24e",
+ tick: function(pixel) {
+ if(pixel.bananaRange === null) {
+ pixel.bananaRange = randomNumberFromOneToThree();
+ };
+
+ if(pixel.attached) {
+ var attachCoords = [pixel.x + pixel.attachOffsets[0], pixel.y + pixel.attachOffsets[1]];
+ if(isEmpty(attachCoords[0],attachCoords[1],false)) { //consider OOB full
+ pixel.attached = false;
+ };
+ } else { //Move if not attached
+ if(Math.random() < 0.2) {
if (!tryMove(pixel, pixel.x, pixel.y+1)) {
- if(Math.random() < 0.9) {
+ if(Math.random() < 0.4) {
if (Math.random() < 0.5) {
if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
tryMove(pixel, pixel.x-1, pixel.y+1);
@@ -146,398 +354,192 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
};
};
};
- doDefaults(pixel);
- var shouldSpoil = true; //spoil by default
- if(pixel.attached) { //if it's attached
- if(!isEmpty(attachCoords[0],attachCoords[1],true)) { //if the attachment coords are a pixel and not OOB
- var attachPixel = pixelMap[attachCoords[0]][attachCoords[1]];
- var attachElement = attachPixel.element;
- if(bananaAttachWhitelist.includes(attachElement)) {//if the element is a whitelisted "don't spoil" element
- shouldSpoil = false; //then don't spoil
- };
+ };
+ doDefaults(pixel);
+ },
+ properties: {
+ "attached": false,
+ "attachOffsets": [(!Math.floor(Math.random() * 2)) ? 1 : -1, 0],
+ "bananaRange": null,
+ },
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+ onMoveInto: function(pixel,otherPixel) { //Move through
+ var otherElement = otherPixel.element; //var element for readability
+
+ var otherInfo = elements[otherElement]; //var info
+
+ var otherState = "solid"; //consider things solid by default
+ if(typeof(otherInfo.state) === "string") {
+ otherState = otherInfo.state; //get actual state if it exists
+ };
+
+ var otherDensity = 1000; //consider density 1000 by default
+ if(typeof(otherInfo.density) === "number") {
+ otherDensity = otherInfo.density; //get actual density if it exists
+ };
+
+ var react = false; //default to no reaction
+ if(typeof(otherInfo.reactions) === "object") { //look for reactions
+ if(typeof(otherInfo.reactions[pixel.element]) === "object") { //look for reactions involving this element
+ react = true; //if there are any, set reaction flag to true
+ };
+ };
+
+ if(otherElement.endsWith("head") || otherElement.endsWith("body")) {
+ //i don't want to make general MPL handling so I'll just try to exclude them;
+ if(otherElement !== "antibody") {
+ //exclude antibody from exclusion
+ return false;
+ };
+ };
+
+ if(otherElement !== pixel.element) { //allow this element from piling on itself
+ if(logLeaves) { console.log("Other element is not banana leaves") }; //yes, this code is for banana leaves
+ if(react) { //if there was a reaction in that previous step
+ if(logLeaves) { console.log("Reacting pixels") };
+ reactPixels(otherPixel,pixel); //react
+ } else { //if no such reaction existed, move through
+ if(logLeaves) { console.log("Moving pixels") };
+ if((otherState !== "solid") || (otherState === "solid" && otherDensity > 100)) { //admit any non-solid, or any solid with a density over 100
+ var pX = pixel.x; //var pixel coords for no particular reason
+ var pY = pixel.y;
+ var oX = otherPixel.x; //var other pixel's coords for no particular reason
+ var oY = otherPixel.y;
+ if(logLeaves) { console.log(`${otherElement} pixel (${oX},${oY}) trying to move info leaf block (${pX},${pY})`) };
+ var dX = oX - pX; //get the difference between this's X and other's X; if the other pixel is moving from the space immediately to the right, this dX value should be 1
+ var dY = oY - pY;
+ var iDX = -1 * dX; //get the additive inverse; if we want to move such a pixel from the right to the left, we would change its +1 X offset to a -1 X offset for the coord sto move it to
+ var iDY = -1 * dY;
+ if(logLeaves) { console.log(`Old offset (relative to leaf): [${dX},${dY}], new offset [${iDX},${iDY}]`) };
+ var fX = pX + iDX; //combine this pixel's X with the inverted offset we just made;
+ //assuming this pixel is (23,31) and the other pixel is trying to move in to the left into this from (24,31),
+ //the dX would be [1, 0], signifying that the other pixel is 1 pixel to the right of this
+ //the space to the left of this, where it would go, is (22,31), and the offset for that pixel relative to this is [-1, 0]
+ //to get the [-1, 0], we'd need to flip that [1, 0] offset (lmao flip that the song by loona), hence the inverse
+ var fY = pY + iDY;
+ if(logLeaves) { console.log(`Calculated final position: (${fX},${fY}), moving other pixel from (${oX},${oY})`) };
+ tryMove(otherPixel,fX,fY);
};
};
- if(shouldSpoil) { //spoil if not attached
- if(pixel.temp > -14 && pixel.temp <= 4) { //(no spoiling below 14C)
- pixel.spoilage += Math.max(Math.min(scale(pixel.temp,-14,4,0,9),9),0)
- } else if(pixel.temp > 4) {
- pixel.spoilage += Math.max(Math.min(scale(pixel.temp,4,20,9,30),40),0)
- };
- };
- if(pixel.spoilage > 14400) { //3600 = 120 ticks at 20C
- if(Math.random() < 0.05) {
- changePixel(pixel,"spoiled_banana");
- };
- };
- },
- properties: {
- "spoilage":0,
- "attached": false,
- "attachDirection": (!Math.floor(Math.random() * 2)) ? 1 : -1,
- },
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- onTryMoveInto: function(pixel,otherPixel) {
- var otherInfo = elements[otherPixel.element]
- if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
- pixel.attached = false;
- };
- },
- };
-
- elements.banana_peduncle_1 = {
- hidden: true,
- name: "banana peduncle (offshoot)",
- color: "#acb55b",
- tick: function(pixel) {
- if(pixel.bananaRange === null) {
- pixel.bananaRange = randomNumberFromOneToThree();
- };
-
- if (pixel.age > 20 && pixel.temp < 100) {
- var peduncleCoords1 = [pixel.x + pixel.dir, pixel.y];
- var peduncleCoords2 = [pixel.x + pixel.dir, pixel.y + 1];
- if(isEmpty(peduncleCoords1[0],peduncleCoords1[1],false) && isEmpty(peduncleCoords2[0],peduncleCoords2[1],false)) {
- if(Math.random() < 0.5) {
- createPixel(pixel.element,peduncleCoords1[0],peduncleCoords1[1]);
- pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].dir = pixel.dir;
- pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].bananaRange = pixel.bananaRange; //pass banana range down to next pixel of peduncle horizontal
- } else {
- createPixel("banana_peduncle_2",peduncleCoords2[0],peduncleCoords2[1]);
- pixelMap[peduncleCoords2[0]][peduncleCoords2[1]].bananaRange = pixel.bananaRange; //pass banana range down to diagonal offshoot
- };
- };
- };
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "dir": (!Math.floor(Math.random() * 2)) ? 1 : -1,
- "age": 0,
- //"bananaRange": (1 + (Math.floor(Math.random() * 3))), //1-3
- "bananaRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.banana_peduncle_2 = {
- hidden: true,
- name: "banana peduncle (hanging)",
- color: "#9bad51",
- tick: function(pixel) {
- if(pixel.bananaRange === null) {
- pixel.bananaRange = randomNumberFromOneToThree();
- };
-
- // Grow/Flower
- if (pixel.age > 20 && pixel.temp < 100) {
- var growthCoords = [pixel.x, pixel.y + 1];
- if(isEmpty(...growthCoords)) {
- if(Math.random() < 0.9) {
- createPixel(pixel.element,...growthCoords);
- pixelMap[growthCoords[0]][growthCoords[1]].bananaRange = pixel.bananaRange; //pass banana range down to next pixel of peduncle vertical
- } else {
- createPixel("petal",...growthCoords); //the sexual dimorphism of the banana plant has zonked me
- };
- };
- };
-
- //Make bananas
- if (pixel.age > 40 && pixel.temp < 100) {
- var bananaOffsets = [-1, 1]; //placed to the left, placed to the right
- for(i = 0; i < bananaOffsets.length; i++) {
- //console.log(`Looping through left and right positions: ${bananaOffsets}`);
- for(j = 1; j < pixel.bananaRange + 1; j++) { //for max banana distance, using the banana range
- //console.log(`Looping through banana offset multipliers: ${j}`);
- if (isEmpty(pixel.x+(j * bananaOffsets[i]),pixel.y,false)) { //if there's an empty space
- //console.log(`Banana position is empty: [${j * bananaOffsets[i]}, 0]\nTrying banana at (${pixel.x+(j * bananaOffsets[i])},${pixel.y})`);
- if (Math.random() < (debugSpeedGrowth ? 0.05 : 0.005)) { //try to place the banana
- //console.log(`Placing banana`);
- createPixel("banana",pixel.x+(j * bananaOffsets[i]),pixel.y);
- pixelMap[pixel.x+(j * bananaOffsets[i])][pixel.y].attached = true;
- pixelMap[pixel.x+(j * bananaOffsets[i])][pixel.y].attachDirection = -1 * Math.sign(bananaOffsets[i]); //attach dir is the opposite of placement dir so it attaches towards the stem
- } else {
- //console.log(`NOT placing banana`);
- };
- //console.log(`Banana tried, stopping iteration`);
- break; //and then stop iteration
- } else {
- //console.log(`Banana position is NOT empty: [${j * bananaOffsets[i]}, 0]\nSkipping this offset`);
- continue; //if not empty, skip that pixel and move on the next distance
- };
- //console.log(`====End of side try====`);
- };
- //console.log(`####End of side iterator####`);
- };
- //console.log(`>>>>End of banana iterator<<<<`);
- };
- pixel.age++;
- doDefaults(pixel);
- //console.log(`\nEnd of peduncle tick\n`);
- },
- properties: {
- "age": 0,
- //"bananaRange": (1 + (Math.floor(Math.random() * 3))), //1-3
- "bananaRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.spoiled_banana = {
- hidden: true,
- color: "#594b29",
- behavior: [
- "XX|CR:stench,fly%0.1|XX",
- "M2%0.5|CH:dirty_water,fly,fly%0.007|M2%0.5",
- "M2|M1|M2"
- ],
- stain: 0.01,
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- };
-
- elements.fly.reactions.spoiled_banana = { "elem2":null, chance:0.15, func:behaviors.FEEDPIXEL };
-
- elements.banana_leaf = {
- hidden: true,
- color: "#9df24e",
- tick: function(pixel) {
- if(pixel.bananaRange === null) {
- pixel.bananaRange = randomNumberFromOneToThree();
- };
-
- if(pixel.attached) {
- var attachCoords = [pixel.x + pixel.attachOffsets[0], pixel.y + pixel.attachOffsets[1]];
- if(isEmpty(attachCoords[0],attachCoords[1],false)) { //consider OOB full
- pixel.attached = false;
- };
- } else { //Move if not attached
- if(Math.random() < 0.2) {
- if (!tryMove(pixel, pixel.x, pixel.y+1)) {
- if(Math.random() < 0.4) {
- if (Math.random() < 0.5) {
- if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
- tryMove(pixel, pixel.x-1, pixel.y+1);
- };
- } else {
- if (!tryMove(pixel, pixel.x-1, pixel.y+1)) {
- tryMove(pixel, pixel.x+1, pixel.y+1);
- };
- };
- };
- };
- };
- };
- doDefaults(pixel);
- },
- properties: {
- "attached": false,
- "attachOffsets": [(!Math.floor(Math.random() * 2)) ? 1 : -1, 0],
- "bananaRange": null,
- },
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- onTryMoveInto: function(pixel,otherPixel) { //Move through
- var otherElement = otherPixel.element; //var element for readability
-
- var otherInfo = elements[otherElement]; //var info
-
- var otherState = "solid"; //consider things solid by default
- if(typeof(otherInfo.state) === "string") {
- otherState = otherInfo.state; //get actual state if it exists
- };
-
- var otherDensity = 1000; //consider density 1000 by default
- if(typeof(otherInfo.density) === "number") {
- otherDensity = otherInfo.density; //get actual density if it exists
- };
-
- var react = false; //default to no reaction
- if(typeof(otherInfo.reactions) === "object") { //look for reactions
- if(typeof(otherInfo.reactions[pixel.element]) === "object") { //look for reactions involving this element
- react = true; //if there are any, set reaction flag to true
- };
- };
-
- if(otherElement.endsWith("head") || otherElement.endsWith("body")) {
- //i don't want to make general MPL handling so I'll just try to exclude them;
- if(otherElement !== "antibody") {
- //exclude antibody from exclusion
- return false;
- };
- };
-
- if(otherElement !== pixel.element) { //allow this element from piling on itself
- if(logLeaves) { console.log("Other element is not banana leaves") }; //yes, this code is for banana leaves
- if(react) { //if there was a reaction in that previous step
- if(logLeaves) { console.log("Reacting pixels") };
- reactPixels(otherPixel,pixel); //react
- } else { //if no such reaction existed, move through
- if(logLeaves) { console.log("Moving pixels") };
- if((otherState !== "solid") || (otherState === "solid" && otherDensity > 100)) { //admit any non-solid, or any solid with a density over 100
- var pX = pixel.x; //var pixel coords for no particular reason
- var pY = pixel.y;
- var oX = otherPixel.x; //var other pixel's coords for no particular reason
- var oY = otherPixel.y;
- if(logLeaves) { console.log(`${otherElement} pixel (${oX},${oY}) trying to move info leaf block (${pX},${pY})`) };
- var dX = oX - pX; //get the difference between this's X and other's X; if the other pixel is moving from the space immediately to the right, this dX value should be 1
- var dY = oY - pY;
- var iDX = -1 * dX; //get the additive inverse; if we want to move such a pixel from the right to the left, we would change its +1 X offset to a -1 X offset for the coord sto move it to
- var iDY = -1 * dY;
- if(logLeaves) { console.log(`Old offset (relative to leaf): [${dX},${dY}], new offset [${iDX},${iDY}]`) };
- var fX = pX + iDX; //combine this pixel's X with the inverted offset we just made;
- //assuming this pixel is (23,31) and the other pixel is trying to move in to the left into this from (24,31),
- //the dX would be [1, 0], signifying that the other pixel is 1 pixel to the right of this
- //the space to the left of this, where it would go, is (22,31), and the offset for that pixel relative to this is [-1, 0]
- //to get the [-1, 0], we'd need to flip that [1, 0] offset (lmao flip that the song by loona), hence the inverse
- var fY = pY + iDY;
- if(logLeaves) { console.log(`Calculated final position: (${fX},${fY}), moving other pixel from (${oX},${oY})`) };
- tryMove(otherPixel,fX,fY);
- };
- };
- };
- },
- };
-
- /*if(!elements.diamond.reactions) { //test reaction
- elements.diamond.reactions = {};
- };
-
- elements.diamond.reactions.banana_leaf = { "elem2": "dead_plant" };*/
-
- elements.banana_plant_top = {
- hidden: true,
- color: "#d5e39f",
- tick: function(pixel) {
- if(pixel.bananaRange === null) {
- pixel.bananaRange = randomNumberFromOneToThree();
- };
-
- if (pixel.age > 30 && pixel.temp < 100) {
- if(!pixel.grewLeftLeaves) {
- for(i = (0 - pixel.leafRange); i < 0; i++) { //left half
- if(i == 0) {
- continue;
- };
-
- var leafOffset = i; //readability
- var leafX = pixel.x + leafOffset; //set X to banana_plant_top pixel's X + offset/index
- var leafAttachOffset = [1, 0]; //difference 1: attaches rightwards (+) for leaves left (-) of center
- var leafY = pixel.y; //set Y to default banana_plant_top pixel's Y
- if(Math.abs(leafOffset) == pixel.leafRange) {
- leafY++; //place edge leaves 1 pixel downwards;
- leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
- };
-
- if(outOfBounds(leafX,leafY)) {
- continue;
- };
-
- if (isEmpty(leafX,leafY,false)) {
- createPixel("banana_leaf",leafX,leafY);
- pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
- pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
- pixelMap[leafX][leafY].bananaRange = pixel.bananaRange;
- pixel.grewLeftLeaves = true; //difference 2: separate flag for left side
- } else {
- break;
- };
- };
- };
-
- if(!pixel.grewRightLeaves) {
- for(i = 1; i < (pixel.leafRange + 1); i++) { //right half
- if(i == 0) {
- continue;
- };
-
- var leafOffset = i; //readability
- var leafX = pixel.x + leafOffset; //set X to banana_plant_top pixel's X + offset/index
- var leafAttachOffset = [-1, 0]; //difference 1: attaches leftwards (-) for leaves right (+) of center
- var leafY = pixel.y; //set Y to default banana_plant_top pixel's Y
- if(Math.abs(leafOffset) == pixel.leafRange) {
- leafY++; //place edge leaves 1 pixel downwards;
- leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
- };
-
- if(outOfBounds(leafX,leafY)) {
- continue;
- };
-
- if (isEmpty(leafX,leafY,false)) {
- createPixel("banana_leaf",leafX,leafY);
- pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
- pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
- pixelMap[leafX][leafY].bananaRange = pixel.bananaRange;
- pixel.grewRightLeaves = true; //difference 2: separate flag for right side
- } else {
- break;
- };
- };
- };
- };
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- "leafRange": 2 + (Math.floor(Math.random() * 3)), //2-4
- "grewLeftLeaves": false,
- "grewRightLeaves": false,
- "bananaRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
-
- /*elements.cocoa_bean = {
- color: ["#f2ede9", "#f0dfce", "#e8cfb5"],
- behavior: behaviors.SOLID,
- category: "liquids",
- viscosity: 100000,
- state: "liquid",
- density: 593,
- tick: functi
- };*/
-} else {
- enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
+ };
+ },
};
+
+/*if(!elements.diamond.reactions) { //test reaction
+ elements.diamond.reactions = {};
+};
+
+elements.diamond.reactions.banana_leaf = { "elem2": "dead_plant" };*/
+
+elements.banana_plant_top = {
+ hidden: true,
+ color: "#d5e39f",
+ tick: function(pixel) {
+ if(pixel.bananaRange === null) {
+ pixel.bananaRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 30 && pixel.temp < 100) {
+ if(!pixel.grewLeftLeaves) {
+ for(i = (0 - pixel.leafRange); i < 0; i++) { //left half
+ if(i == 0) {
+ continue;
+ };
+
+ var leafOffset = i; //readability
+ var leafX = pixel.x + leafOffset; //set X to banana_plant_top pixel's X + offset/index
+ var leafAttachOffset = [1, 0]; //difference 1: attaches rightwards (+) for leaves left (-) of center
+ var leafY = pixel.y; //set Y to default banana_plant_top pixel's Y
+ if(Math.abs(leafOffset) == pixel.leafRange) {
+ leafY++; //place edge leaves 1 pixel downwards;
+ leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
+ };
+
+ if(outOfBounds(leafX,leafY)) {
+ continue;
+ };
+
+ if (isEmpty(leafX,leafY,false)) {
+ createPixel("banana_leaf",leafX,leafY);
+ pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
+ pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
+ pixelMap[leafX][leafY].bananaRange = pixel.bananaRange;
+ pixel.grewLeftLeaves = true; //difference 2: separate flag for left side
+ } else {
+ break;
+ };
+ };
+ };
+
+ if(!pixel.grewRightLeaves) {
+ for(i = 1; i < (pixel.leafRange + 1); i++) { //right half
+ if(i == 0) {
+ continue;
+ };
+
+ var leafOffset = i; //readability
+ var leafX = pixel.x + leafOffset; //set X to banana_plant_top pixel's X + offset/index
+ var leafAttachOffset = [-1, 0]; //difference 1: attaches leftwards (-) for leaves right (+) of center
+ var leafY = pixel.y; //set Y to default banana_plant_top pixel's Y
+ if(Math.abs(leafOffset) == pixel.leafRange) {
+ leafY++; //place edge leaves 1 pixel downwards;
+ leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
+ };
+
+ if(outOfBounds(leafX,leafY)) {
+ continue;
+ };
+
+ if (isEmpty(leafX,leafY,false)) {
+ createPixel("banana_leaf",leafX,leafY);
+ pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
+ pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
+ pixelMap[leafX][leafY].bananaRange = pixel.bananaRange;
+ pixel.grewRightLeaves = true; //difference 2: separate flag for right side
+ } else {
+ break;
+ };
+ };
+ };
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ "leafRange": 2 + (Math.floor(Math.random() * 3)), //2-4
+ "grewLeftLeaves": false,
+ "grewRightLeaves": false,
+ "bananaRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+
+/*elements.cocoa_bean = {
+ color: ["#f2ede9", "#f0dfce", "#e8cfb5"],
+ behavior: behaviors.SOLID,
+ category: "liquids",
+ viscosity: 100000,
+ state: "liquid",
+ density: 593,
+ tick: functi
+};*/
+
+// enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
+// enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
+// localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
+// alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
diff --git a/mods/boiling_things.js b/mods/boiling_things.js
index 635cc91e..e5606555 100644
--- a/mods/boiling_things.js
+++ b/mods/boiling_things.js
@@ -1,7 +1,7 @@
var modName = "mods/boiling_things.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
//glass {
@@ -533,8 +533,4 @@ if(enabledMods.includes(libraryMod)) {
};
});
-} else {
- alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/change.js b/mods/change.js
index 9511a0c4..f6bd8f26 100644
--- a/mods/change.js
+++ b/mods/change.js
@@ -32,7 +32,7 @@ elements.change = {
tool: function(pixel) {
changePixel(pixel,changeTo,true);
},
- category: "tools",
+ category: "edit",
desc: "Changes any pixels it is used on to a specified type. Currently replacing pixels with \"" + changeTo + "\".Press [;] or click here to open the change prompt.",
};
@@ -41,7 +41,7 @@ elements.alt_change = {
tool: function(pixel) {
pixel.element = changeTo;
},
- category: "tools",
+ category: "edit",
desc: "Changes any pixels it is used on to a specified type, but keeping their non-element-based properties. Currently replacing pixels with \"" + changeTo + "\".Press [;] or click here to open the change prompt.",
hidden: true,
};
@@ -52,7 +52,7 @@ elements.alt_alt_change = {
pixel.element = changeTo;
pixel.color = pixelColorPick(pixel);
},
- category: "tools",
+ category: "edit",
desc: "Changes any pixels it is used on to a specified type, but keeping their non-element-based properties except for color. Currently replacing pixels with \"" + changeTo + "\".Press [;] or click here to open the change prompt.",
hidden: true,
};
\ No newline at end of file
diff --git a/mods/changeTempReactionParameter.js b/mods/changeTempReactionParameter.js
index 7ec37754..0492018e 100644
--- a/mods/changeTempReactionParameter.js
+++ b/mods/changeTempReactionParameter.js
@@ -1,3 +1,6 @@
+// This mod has been deprecated as of 2026-01-22.
+
+/*
function reactPixels(pixel1,pixel2) {
var r = elements[pixel1.element].reactions[pixel2.element];
if (r.setting && settings[r.setting]===0) {
@@ -71,3 +74,4 @@ function reactPixels(pixel1,pixel2) {
if (r.func) { r.func(pixel1,pixel2); }
return r.elem1!==undefined || r.elem2!==undefined;
}
+*/
\ No newline at end of file
diff --git a/mods/chem.js b/mods/chem.js
index 4d121ebd..32fa3eb0 100644
--- a/mods/chem.js
+++ b/mods/chem.js
@@ -1,3 +1,18 @@
+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;
+}
+
function toObject(color) {
color = color.match(/\d+/g);
return { r: color[0], g: color[1], b: color[2] };
@@ -10,17 +25,60 @@ function RGBToHex2(rgb) {
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
-function acidReact(elem1, elem2, product1, product2, temp = 0) {
- if (elements[elem1] && elements[elem1].ignore) {
+function reactList(list1, list2, reaction) {
+ for (let i = 0; i < list1.length; i++) {
+ for (let j = 0; j < list2.length; j++) {
+ let react = { react1: list1[i], react2: list2[j] };
+ if (!Array.isArray(reaction.elem1)) {
+ reaction.elem1 = [reaction.elem1];
+ }
+ if (!Array.isArray(reaction.elem2)) {
+ reaction.elem2 = [reaction.elem2];
+ }
+ val1 = parseReactStringValue(reaction.elem1, react);
+ val2 = parseReactStringValue(reaction.elem2, react);
+ if (val1 === "unknown" || val1.includes("unknown") || val2 === "unknown" || val2.includes("unknown")) {
+ continue;
+ }
+ ignoreReact(list1[i], list2[j], val1, val2, reaction.props);
+ if (reaction.deleteReactions) {
+ if (reaction.deleteReactions.aa) {
+ for (let k = 0; k < val1.length; k++) {
+ deleteReactions.push([list1[i], val1[k]]);
+ }
+ }
+ if (reaction.deleteReactions.ab) {
+ for (let k = 0; k < val2.length; k++) {
+ deleteReactions.push([list1[i], val2[k]]);
+ }
+ }
+ if (reaction.deleteReactions.ba) {
+ for (let k = 0; k < val1.length; k++) {
+ deleteReactions.push([list1[j], val1[k]]);
+ }
+ }
+ if (reaction.deleteReactions.bb) {
+ for (let k = 0; k < val2.length; k++) {
+ deleteReactions.push([list1[j], val2[k]]);
+ }
+ }
+ }
+ }
+ }
+}
+deleteReactions = [];
+
+function ignoreReact(elem1, elem2, product1, product2, props) {
+ if (elements[elem1] && elements[elem1].ignore && chemjsChemicals.ignorable.elementNames.includes(elem1)) {
if (product1 !== null) {
- if (product1 instanceof Array) {
+ if (Array.isArray(product1)) {
elements[elem1].ignore.push(...product1);
} else {
elements[elem1].ignore.push(product1);
}
}
if (product2 !== null) {
- if (product2 instanceof Array) {
+ if (Array.isArray(product2)) {
elements[elem1].ignore.push(...product2);
} else {
elements[elem1].ignore.push(product2);
@@ -28,16 +86,16 @@ function acidReact(elem1, elem2, product1, product2, temp = 0) {
}
elements[elem1].ignore.push(elem2);
}
- if (elements[elem2] && elements[elem2].ignore) {
+ if (elements[elem2] && elements[elem2].ignore && chemjsChemicals.ignorable.elementNames.includes(elem2)) {
if (product1 !== null) {
- if (product1 instanceof Array) {
+ if (Array.isArray(product1)) {
elements[elem2].ignore.push(...product1);
} else {
elements[elem2].ignore.push(product1);
}
}
if (product2 !== null) {
- if (product2 instanceof Array) {
+ if (Array.isArray(product2)) {
elements[elem2].ignore.push(...product2);
} else {
elements[elem2].ignore.push(product2);
@@ -45,818 +103,6284 @@ function acidReact(elem1, elem2, product1, product2, temp = 0) {
}
elements[elem2].ignore.push(elem1);
}
- if (product1 !== null)
- if (elements[product1] && elements[product1].ignore) {
- if (product2 !== null) elements[product1].ignore.push(product2);
- elements[product1].ignore.push(elem1);
- elements[product1].ignore.push(elem2);
+ if (product1 !== null) {
+ let product1names = product1;
+ if (!Array.isArray(product1)) {
+ product1names = [product1];
}
- if (product2 !== null)
- if (elements[product2] && elements[product2].ignore) {
- if (product1 !== null) elements[product2].ignore.push(product1);
- elements[product2].ignore.push(elem1);
- elements[product2].ignore.push(elem2);
+ for (let i = 0; i < product1names.length; i++) {
+ if (elements[product1names[i]] && elements[product1names[i]].ignore && chemjsChemicals.ignorable.elementNames.includes(product1names[i])) {
+ if (Array.isArray(product2)) elements[product1names[i]].ignore.push(...product2);
+ else elements[product1names[i]].ignore.push(product2);
+ elements[product1names[i]].ignore.push(elem1);
+ elements[product1names[i]].ignore.push(elem2);
+ }
}
+ }
+ if (product2 !== null) {
+ let product2names = product2;
+ if (!Array.isArray(product2)) {
+ product2names = [product2];
+ }
+ for (let i = 0; i < product2names.length; i++) {
+ if (elements[product2names[i]] && elements[product2names[i]].ignore && chemjsChemicals.ignorable.elementNames.includes(product2names[i])) {
+ if (Array.isArray(product1)) elements[product2names[i]].ignore.push(...product1);
+ else elements[product2names[i]].ignore.push(product1);
+ elements[product2names[i]].ignore.push(elem1);
+ elements[product2names[i]].ignore.push(elem2);
+ }
+ }
+ }
+ if (product1.length == 1) {
+ product1 = product1[0];
+ }
+ if (product2.length == 1) {
+ product2 = product2[0];
+ }
+ if (!elements[elem1].reactions) {
+ elements[elem1].reactions = {};
+ }
if (!elements[elem1].reactions[elem2]) {
- elements[elem1].reactions[elem2] = { elem1: product1, elem2: product2, temp1: temp, temp2: temp };
+ elements[elem1].reactions[elem2] = { elem1: product1, elem2: product2, ...props };
+ }
+ if (product1 !== null && (product1 === "no_change" || product1[0] === "no_change")) {
+ delete elements[elem1].reactions[elem2].elem1;
+ }
+ if (product2 !== null && (product2 === "no_change" || product2[0] === "no_change")) {
+ delete elements[elem1].reactions[elem2].elem2;
}
}
-elements.fluorine = {
- color: "#FFFFBF",
- behavior: behaviors.GAS,
- ignore: ["foof", "solid_foof", "oxygen", "ozone", "liquid_oxygen", "oxygen_ice", "chlorine", "liquid_chlorine", "liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "fire", "smoke", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "gold", "hydrogen", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "tungsten", "tungsten_hexafluoride"],
- tick: function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
+function stateChangeName(key, obj, stateHigh) {
+ if (stateHigh) {
+ var newname = obj.stateHighName;
+ if (obj.state === "solid" || !obj.state) {
+ // Melting
+ if (!newname) {
+ newname = "molten_" + key;
+ }
+ return newname;
+ } else if (obj.state === "liquid") {
+ // Evaporating
+ if (!newname) {
+ newname = key;
+ if (newname.startsWith("liquid_")) {
+ newname = newname.substring(7);
+ }
+ if (newname.startsWith("molten_")) {
+ newname = newname.substring(7);
+ }
+ newname += "_gas";
+ }
+ return newname;
+ }
+ } else {
+ var newname = obj.stateLowName;
+ if (obj.state === "liquid" || !obj.state) {
+ // Freezing
+ if (!newname) {
+ newname = key;
+ if (newname.startsWith("liquid_")) {
+ newname = newname.substring(7);
+ }
+ if (newname.endsWith("_water")) {
+ newname = newname.substring(0, newname.length - 6);
+ }
+ newname += "_ice";
+ }
+ return newname;
+ } else if (obj.state === "gas") {
+ // Condensing
+ if (!newname) {
+ newname = key;
+ if (newname.endsWith("_gas")) {
+ newname = newname.substring(0, newname.length - 4);
+ }
+ newname = "liquid_" + newname;
+ }
+ return newname;
+ }
+ }
+}
+
+function createChemical(key, obj) {
+ let key2 = key;
+ if (obj.elem) {
+ if (obj.elemName) {
+ key = obj.elemName;
+ }
+ elements[key] = obj.elem;
+ if (obj.tempLow) {
+ elements[key].tempLow = obj.tempLow[0];
+ } else {
+ obj.tempLow = [];
+ }
+ if (obj.tempHigh) {
+ elements[key].tempHigh = obj.tempHigh[0];
+ } else {
+ obj.tempHigh = [];
+ }
+
+ let statelows = obj.stateLow;
+ if (!obj.stateLow) {
+ statelows = [];
+ }
+ statelows.unshift(key);
+ for (let i = 1; i <= obj.tempLow.length; i++) {
+ if (!statelows[i]) {
+ statelows[i] = stateChangeName(statelows[i - 1], elements[statelows[i - 1]], false);
+ }
+ if (!statelows[i]) {
+ break;
+ } else if (Array.isArray(statelows[i])) {
+ elements[statelows[i - 1]].stateLow = statelows[i];
+ break;
+ } else {
+ elements[statelows[i - 1]].stateLowName = statelows[i];
+ }
+ if (!elements[statelows[i]]) {
+ elements[statelows[i]] = {};
+ }
+ elements[statelows[i]].tempLow = obj.tempLow[i];
+ if (obj.densityLow && obj.densityLow[i - 1]) {
+ elements[statelows[i]].density = obj.densityLow[i - 1];
+ }
+ }
+
+ let statehighs = obj.stateHigh;
+ if (!obj.stateHigh) {
+ statehighs = [];
+ }
+ statehighs.unshift(key);
+ for (let i = 1; i <= obj.tempHigh.length; i++) {
+ if (!statehighs[i]) {
+ statehighs[i] = stateChangeName(statehighs[i - 1], elements[statehighs[i - 1]], true);
+ }
+ if (!statehighs[i]) {
+ break;
+ } else if (Array.isArray(statehighs[i])) {
+ elements[statehighs[i - 1]].stateHigh = statehighs[i];
+ break;
+ } else {
+ elements[statehighs[i - 1]].stateHighName = statehighs[i];
+ }
+ if (!elements[statehighs[i]]) {
+ elements[statehighs[i]] = {};
+ }
+ elements[statehighs[i]].tempHigh = obj.tempHigh[i];
+ if (obj.densityHigh && obj.densityHigh[i - 1]) {
+ elements[statehighs[i]].density = obj.densityHigh[i - 1];
+ }
+ }
+
+ statelows = statelows.filter((x) => typeof x === "string" || x instanceof String);
+ statehighs = statehighs.filter((x) => typeof x === "string" || x instanceof String);
+
+ if (!chemjsChemicals[key2].elementNames) {
+ chemjsChemicals[key2].elementNames = statelows.concat(statehighs);
+ } else {
+ chemjsChemicals[key2].elementNames = chemjsChemicals[key2].elementNames.concat(statelows).concat(statehighs);
+ }
+ }
+}
+
+function toxic(name, chance, dirtyWater = false) {
+ chemjsReactions.push(
+ { react1: name, react2: "blood", elem1: null, elem2: "infection", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "soap", elem1: null, elem2: "no_change", chance: 0.02, priority: 10 },
+ { react1: name, react2: "plant", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "evergreen", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "cactus", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "grass", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "vine", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "algae", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "kelp", elem1: null, elem2: "dirty_water", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "mushroom_spore", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "lichen", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "yeast", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "rat", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "frog", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "tadpole", elem1: "no_change", elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "fish", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "bird", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "head", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "body", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "homunculus", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "ant", elem1: null, elem2: "dead_bug", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "worm", elem1: null, elem2: "dead_bug", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "fly", elem1: null, elem2: "dead_bug", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "firefly", elem1: null, elem2: "dead_bug", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "bee", elem1: null, elem2: "dead_bug", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "stink_bug", elem1: null, elem2: "dead_bug", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "termite", elem1: null, elem2: "dead_bug", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "flea", elem1: null, elem2: "dead_bug", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "slug", elem1: null, elem2: "slime", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "snail", elem1: null, elem2: "limestone", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "sapling", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "root", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "flower_seed", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "pistil", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "petal", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "grass_seed", elem1: null, elem2: "dead_plant", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "meat", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "cheese", elem1: null, elem2: "rotten_cheese", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "tree_branch", elem1: null, elem2: "wood", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "mushroom_cap", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "mushroom_gill", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "mushroom_stalk", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "hyphae", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "mycelium", elem1: null, elem2: "dirt", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "pollen", elem1: "no_change", elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "bone_marrow", elem1: null, elem2: "rotten_meat", props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "hair", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "cell", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: name, react2: "cancer", elem1: null, elem2: null, props: { chance: chance }, priority: 10 },
+ { react1: "bless", react2: name, elem1: "no_change", elem2: null, priority: 100 },
+ );
+ if (dirtyWater) {
+ chemjsReactions.push({ react1: name, react2: "chemical!water,ignore!dirty_water", elem1: null, elem2: "dirty_water", chance: chance, priority: 10 });
+ }
+}
+
+doStaining = function (pixel) {
+ if (settings.stain === 0) {
+ return;
+ }
+ var stain = elements[pixel.element].stain;
+ if (stain > 0) {
+ var newColor = pixel.color.match(/\d+/g);
+ } else {
+ var newColor = null;
+ }
+
+ for (var i = 0; i < adjacentCoords.length; i++) {
+ var x = pixel.x + adjacentCoords[i][0];
+ var y = pixel.y + adjacentCoords[i][1];
+ if (!isEmpty(x, y, true)) {
+ var newPixel = pixelMap[x][y];
+ if ((elements[pixel.element].ignore && elements[pixel.element].ignore.indexOf(newPixel.element) !== -1) || eLists.STAINLESS.includes(newPixel.element)) {
+ continue;
+ }
+ if ((elements[newPixel.element].id !== elements[pixel.element].id || elements[newPixel.element].stainSelf) && (solidStates[elements[newPixel.element].state] || elements[newPixel.element].id === elements[pixel.element].id)) {
+ if (Math.random() < Math.abs(stain)) {
+ if (stain < 0) {
+ if (newPixel.origColor) {
+ newColor = newPixel.origColor;
+ } else {
+ continue;
+ }
+ } else if (!newPixel.origColor) {
+ newPixel.origColor = newPixel.color.match(/\d+/g);
}
+ // if newPixel.color doesn't start with rgb, continue
+ if (!newPixel.color.match(/^rgb/)) {
+ continue;
+ }
+ // parse rgb color string of newPixel rgb(r,g,b)
+ var rgb = newPixel.color.match(/\d+/g);
+ if (elements[pixel.element].stainSelf && elements[newPixel.element].id === elements[pixel.element].id) {
+ // if rgb and newColor are the same, continue
+ if (rgb[0] === newColor[0] && rgb[1] === newColor[1] && rgb[2] === newColor[2]) {
+ continue;
+ }
+ var avg = [];
+ for (var j = 0; j < rgb.length; j++) {
+ avg[j] = Math.round(rgb[j] * (1 - Math.abs(stain)) + newColor[j] * Math.abs(stain));
+ }
+ } else {
+ // get the average of rgb and newColor, more intense as stain reaches 1
+ var avg = [];
+ for (var j = 0; j < rgb.length; j++) {
+ avg[j] = Math.floor(rgb[j] * (1 - Math.abs(stain)) + newColor[j] * Math.abs(stain));
+ }
+ }
+ // set newPixel color to avg
+ newPixel.color = "rgb(" + avg.join(",") + ")";
}
}
}
- if (change) {
- changePixel(pixel, "fire");
+ }
+};
+
+chemjsReactions = [];
+
+chemjsChemicals = {};
+//elements
+
+let fluorineTick = function (pixel, chance) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (Math.random() < chance && (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness)) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
}
+ }
+ if (change && Math.random() < 0.02) {
+ changePixel(pixel, "fire");
+ }
+};
+
+elements.sulfur.burnInto = ["sulfur_dioxide"];
+elements.molten_sulfur.burnInto = ["sulfur_dioxide"];
+elements.sulfur_gas.burnInto = ["sulfur_dioxide"];
+
+chemjsChemicals.hydrogen = {
+ elementNames: ["hydrogen", "liquid_hydrogen", "hydrogen_ice"],
+};
+
+chemjsChemicals.boron = {
+ elem: {
+ color: ["#80736a", "#a2999c", "#5e5544", "#292d2c"],
+ category: "solids",
+ density: 2080,
+ state: "solid",
+ behavior: behaviors.WALL,
+ fireColor: ["#34eb67", "#5ceb34"],
},
- reactions: {
- steam: { elem1: "hydrofluoric_acid_gas", elem2: "hydrogen" },
- liquid_oxygen: { elem1: "foof", elem2: null },
- hydrogen: { elem1: "hydrogen_fluoride", elem2: "fire" },
- tungsten: { elem1: "tungsten_hexafluoride", elem2: "fire" },
+ tempHigh: [2076],
+};
+
+chemjsChemicals.carbon = {
+ elementNames: ["charcoal"],
+};
+
+chemjsChemicals.oxygen = {
+ elementNames: ["oxygen", "liquid_oxygen", "oxygen_ice"],
+};
+
+chemjsChemicals.ozone = {
+ elementNames: ["ozone", "liquid_ozone", "ozone_ice"],
+};
+elements.liquid_ozone.tempLow = -192.2;
+
+chemjsChemicals.fluorine = {
+ elem: {
+ color: "#FFFFBF",
+ behavior: behaviors.GAS,
+ tick: (pixel) => fluorineTick(pixel, 1),
+ state: "gas",
+ category: "gases",
+ density: 1.7,
+ stain: 0.005,
},
- tempLow: -188.1,
- stateLow: "liquid_fluorine",
- state: "gas",
- category: "gases",
- density: 1.7,
- stain: 0.005,
+ tempLow: [-188.1, -219.7],
+ densityLow: [1505],
+ causticIgnore: true,
+ ignore: ["chemical!fluorine_ignore"],
+ ignorable: true,
};
elements.liquid_fluorine = {
color: "#ffff3b",
behavior: behaviors.LIQUID,
- ignore: ["foof", "solid_foof", "oxygen", "ozone", "liquid_oxygen", "oxygen_ice", "chlorine", "liquid_chlorine", "liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "fire", "smoke", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "seltzer", "pool_water", "primordial_soup", "gold", "hydrogen", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "tungsten", "tungsten_hexafluoride"],
- tick: function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (Math.random() < 0.01 && (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness)) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
- }
- }
- }
- if (change && Math.random() < 0.02) {
- changePixel(pixel, "fire");
- }
- },
- reactions: {
- steam: { elem1: "hydrofluoric_acid_gas", elem2: "hydrogen" },
- hydrogen: { elem1: "hydrogen_fluoride", elem2: "fire" },
- tungsten: { elem1: "tungsten_hexafluoride", elem2: "fire" },
- },
+ tick: (pixel) => fluorineTick(pixel, 0.01),
temp: -198.1,
- tempHigh: -188.1,
- stateHigh: "fluorine",
- tempLow: -219.7,
state: "liquid",
category: "liquids",
- density: 1505,
stain: 0.005,
+ hidden: false,
};
-elements.hydrofluoric_acid = {
- color: ["#c8cf91", "#efff5e", "#a0cc39"],
- ignore: ["fire", "liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "seltzer", "pool_water", "primordial_soup", "gold", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "chloroform", "chloroform_gas", "chloroform_ice", "tetrafluoroethylene", "tungsten", "tungsten_hexafluoride"],
- tick: function (pixel) {
- let change = false;
+chemjsChemicals.fluorine_ignore = {
+ elementNames: ["chemical!foof", "chemical!oxygen", "chemical!ozone", "chemical!chlorine", "chemical!hydrogen_fluoride", "chemical!fluorine", "chemical!acids", "fire", "smoke", "neutral_acid", "chemical!water", "acid_cloud", "steam", "gold", "hydrogen", "chemical!polytetrafluoroethylene", "molten_polytetrafluoroethylene", "foof_grass", "foof_grass_seed"],
+};
+
+chemjsChemicals.sodium = {
+ elementNames: ["sodium", "molten_sodium", "sodium_gas"],
+};
+
+elements.molten_sodium.behavior = behaviors.LIQUID;
+
+chemjsChemicals.magnesium = {
+ elementNames: ["magnesium", "molten_magnesium"],
+};
+elements.magnesium.burnInto = "magnesium_oxide";
+elements.molten_magnesium.burnInto = "magnesium_oxide";
+elements.molten_magnesium.behavior = function (pixel) {
+ if (Math.random() < 0.025 && isEmpty(pixel.x, pixel.y - 1)) {
+ createPixel("flash", pixel.x, pixel.y - 1);
+ pixelMap[pixel.x][pixel.y - 1].temp = pixel.temp;
+ if (elements[pixel.element].fireColor) {
+ pixelMap[pixel.x][pixel.y - 1].color = pixelColorPick(pixelMap[pixel.x][pixel.y - 1], elements[pixel.element].fireColor);
+ }
+ }
+ behaviors.LIQUID(pixel);
+};
+
+chemjsChemicals.aluminum = {
+ elementNames: ["aluminum", "molten_aluminum"],
+};
+
+let whitePhosphorusTick = function (pixel) {
+ if (Math.random() < 0.0001 && pixel.temp > 40 && pixel.temp < 860) {
+ changePixel(pixel, "red_phosphorus");
+ }
+ if (Math.random() < 0.0001 && pixel.temp > 530 && pixel.temp < 860) {
+ changePixel(pixel, "violet_phosphorus");
+ }
+ if (pixel.temp > 860 && pixel.temp < 1200 && Math.random() < 0.0001) {
+ changePixel(pixel, "black_phosphorus");
+ }
+};
+chemjsChemicals.white_phosphorus = {
+ elem: {
+ color: "#f4f7ad",
+ category: "powders",
+ density: 1820,
+ state: "solid",
+ behavior: ["XX|XX|XX", "XX|XX|XX", "M2%1|M1|M2%1"],
+ tick: whitePhosphorusTick,
+ stain: 0.01,
+ burn: 1,
+ burnTime: 300,
+ burnInto: "phosphorus_pentoxide",
+ fireColor: "#5ed6c8",
+ },
+ tempHigh: [44.1, 280],
+ stateHigh: [null, "white_phosphorus_gas"],
+};
+
+elements.molten_white_phosphorus = {
+ color: "#eaeb96",
+ tick: whitePhosphorusTick,
+ state: "liquid",
+ behavior: behaviors.LIQUID,
+ density: 1810,
+ stain: 0.01,
+ burn: 1,
+ burnTime: 300,
+ burnInto: "phosphorus_pentoxide",
+ fireColor: "#5ed6c8",
+};
+
+elements.white_phosphorus_gas = {
+ tick: whitePhosphorusTick,
+ behavior: behaviors.GAS,
+ density: 5.13,
+ stain: 0.01,
+ burn: 1,
+ burnTime: 300,
+ burnInto: "phosphorus_pentoxide",
+ fireColor: "#5ed6c8",
+};
+
+let redPhosphorusTick = function (pixel) {
+ if (pixel.temp > 250 && Math.random() < 0.00001) {
+ changePixel(pixel, "violet_phosphorus");
+ }
+};
+
+chemjsChemicals.red_phosphorus = {
+ elem: {
+ tick: redPhosphorusTick,
+ color: ["#fa5252", "#de4040", "#f24141"],
+ category: "powders",
+ density: 2275,
+ state: "solid",
+ behavior: behaviors.POWDER,
+ stain: 0.005,
+ fireColor: "#5ed6c8",
+ },
+ tempHigh: [530],
+ stateHigh: [["violet_phosphorus"]],
+};
+
+chemjsChemicals.violet_phosphorus = {
+ elem: {
+ color: ["#d92378", "#ab1364", "#bd1c8a"],
+ category: "powders",
+ density: 2360,
+ state: "solid",
+ behavior: behaviors.STURDYPOWDER,
+ stain: 0.005,
+ fireColor: "#5ed6c8",
+ burn: 0.1,
+ burnTime: 300,
+ burnInto: "phosphorus_pentoxide",
+ },
+ tempHigh: [860],
+ stateHigh: [["white_phosphorus_gas"]],
+};
+
+chemjsChemicals.black_phosphorus = {
+ elem: {
+ color: ["#170a02", "#380e03", "#6b6968"],
+ category: "powders",
+ density: 2690,
+ state: "solid",
+ behavior: behaviors.SUPPORTPOWDER,
+ stain: 0.005,
+ fireColor: "#5ed6c8",
+ },
+ tempHigh: [950, 1200],
+ stateHigh: [null, ["white_phosphorus_gas"]],
+};
+
+chemjsChemicals.sulfur = {
+ elementNames: ["sulfur", "molten_sulfur", "sulfur_gas"],
+};
+
+chemjsChemicals.chlorine = {
+ elementNames: ["chlorine", "liquid_chlorine", "chlorine_ice"],
+};
+
+chemjsChemicals.potassium = {
+ elementNames: ["potassium", "molten_potassium", "potassium_gas"],
+};
+elements.molten_potassium.behavior = behaviors.LIQUID;
+
+chemjsChemicals.calcium = {
+ elementNames: ["calcium", "molten_calcium"],
+};
+
+chemjsChemicals.titanium = {
+ elem: {
+ color: "#e3e5e6",
+ category: "solids",
+ density: 4500,
+ state: "solid",
+ behavior: behaviors.WALL,
+ conduct: 0.5,
+ hardness: 0.7,
+ },
+ tempHigh: [1668],
+};
+
+chemjsChemicals.iron = {
+ elementNames: ["iron", "molten_iron"],
+};
+
+let bromineTick = function (pixel) {
+ if (pixel.temp > 0 && Math.random() < 0.001) {
+ changePixel(pixelMap[pixel.x][pixel.y], "bromine_gas", false);
+ }
+};
+
+let bromineGasTick = function (pixel) {
+ if (pixel.temp < 58.8 && pixel.temp > 0 && Math.random() < 0.01) {
+ changePixel(pixelMap[pixel.x][pixel.y], "bromine", false);
+ }
+};
+
+chemjsChemicals.bromine = {
+ elem: {
+ color: "#470500",
+ tick: bromineTick,
+ category: "liquids",
+ density: 3102,
+ state: "liquid",
+ behavior: behaviors.LIQUID,
+ stain: 0.5,
+ },
+ tempHigh: [58.8],
+ densityHigh: [7.59],
+ tempLow: [-7.2],
+ toxic: [0.1],
+};
+
+elements.bromine_gas = {
+ tick: bromineGasTick,
+ tempLow: 0,
+ stateLow: "bromine",
+ state: "gas",
+ category: "gases",
+};
+
+chemjsChemicals.silver = {
+ elementNames: ["silver", "molten_silver"],
+};
+
+let indiumTick = function (pixel) {
+ pixel.indium_bendable = pixel.empty_above;
+ let k = 0;
+ while (!isEmpty(pixel.x, pixel.y - k, true)) {
+ k++;
+ }
+ indium_bendable = pixel.empty_above != k;
+ pixel.empty_above = k;
+ k = k - 1;
+ if (indium_bendable && !isEmpty(pixel.x, pixel.y - k, true) && elements[pixelMap[pixel.x][pixel.y - k].element].movable && pixelMap[pixel.x][pixel.y - k].element !== "indium") {
+ if (Math.random() < elements[pixelMap[pixel.x][pixel.y - k].element].density / 5e5) {
+ pixel.indium_bend = 0.5;
+ }
+ }
+ if (pixel.indium_bend > 0) {
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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
+ if (!isEmpty(pixel.x + i, pixel.y + 1, true) && pixelMap[pixel.x + i][pixel.y + 1].element == "indium") {
+ if (Math.random() < pixel.indium_bend) {
+ pixelMap[pixel.x + i][pixel.y + 1].indium_bend = pixel.indium_bend;
}
}
}
- if (change) {
- if (Math.random() < 0.2) {
- changePixel(pixel, "hydrogen_fluoride");
- } else {
- deletePixel(pixel.x, pixel.y);
- return;
- }
- } else {
- behaviors.LIQUID(pixel);
+ let i = 0;
+ let y = pixel.y;
+ while (!isEmpty(pixel.x, y + i, true) && pixelMap[pixel.x][y + i].element == "indium") {
+ pixelTick(pixelMap[pixel.x][y + i], [
+ ["XX", "XX", "XX"],
+ ["XX", "XX", "XX"],
+ ["M2%5", "M1", "M2%5"],
+ ]);
+ i--;
}
+ pixel.indium_bend = 0;
+ }
+};
+
+chemjsChemicals.indium = {
+ elem: {
+ tick: indiumTick,
+ color: ["#aca9b0", "#ccc7d1", "#d6cbd6"],
+ category: "solids",
+ density: 7290,
+ state: "solid",
+ behavior: behaviors.WALL,
+ conduct: 0.05,
+ hardness: 0.05,
+ superconductAt: -269.74,
},
- reactions: {},
+ tempHigh: [156.6],
+};
+
+let iodineTick = function (pixel) {
+ if (pixel.temp > 25 && Math.random() < 0.001) {
+ changePixel(pixelMap[pixel.x][pixel.y], "iodine_gas", false);
+ }
+};
+
+let iodineGasTick = function (pixel) {
+ if (pixel.temp < 113 && pixel.temp > 25 && Math.random() < 0.01) {
+ changePixel(pixelMap[pixel.x][pixel.y], "iodine", false);
+ }
+};
+
+chemjsChemicals.iodine = {
+ elem: {
+ color: ["#240030", "#15061a", "#752191"],
+ tick: iodineTick,
+ category: "powders",
+ density: 4933,
+ state: "solid",
+ behavior: behaviors.POWDER,
+ stain: 0.01,
+ },
+ tempHigh: [113, 183],
+ toxic: [0.1],
+};
+
+elements.molten_iodine = {
+ behavior: behaviors.LIQUID,
+ color: ["#360147", "#2b0d36", "#9b2ebf"],
state: "liquid",
category: "liquids",
- density: 1020,
- stain: 0.005,
- tempHigh: 100,
- stateHigh: "hydrofluoric_acid_gas",
- tempLow: -58.88,
+ hidden: true,
+};
+elements.iodine_gas = {
+ tick: iodineGasTick,
+ tempLow: 25,
+ stateLow: "iodine",
+ state: "gas",
+ category: "gases",
+ hidden: true,
+ density: 11.27,
+};
+
+chemjsChemicals.tungsten = {
+ elementNames: ["tungsten", "molten_tungsten"],
+};
+
+chemjsChemicals.mercury = {
+ elementNames: ["solid_mercury", "mercury", "mercury_gas"],
+};
+
+chemjsChemicals.thallium = {
+ elem: {
+ color: ["#b3bdb4", "#a7b8b0", "#9fa39d"],
+ category: "powders",
+ density: 11873,
+ state: "solid",
+ behavior: behaviors.STURDYPOWDER,
+ conduct: 0.05,
+ hardness: 0.05,
+ },
+ tempHigh: [304],
+ toxic: [0.2],
+};
+
+chemjsChemicals.polonium = {
+ elem: {
+ color: "#56b870",
+ behavior: ["XX|CR:radiation%10|XX", "CR:radiation%10|CH:lead%0.1|CR:radiation%10", "XX|CR:radiation%10|XX"],
+ tick: function (pixel) {
+ pixel.temp += 1;
+ },
+ state: "solid",
+ category: "solids",
+ density: 9196,
+ conduct: 0.21,
+ },
+ tempHigh: [254],
+ reactionProduct: { stable: "stable_polonium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_polonium = {};
+elements.molten_polonium.behavior = ["XX|CR:fire AND CR:radiation%12.5|XX", "M2 AND CR:radiation%10|CH:lead%0.1|M2 AND CR:radiation%10", "M1|M1|M1"];
+elements.molten_polonium.tick = function (pixel) {
+ pixel.temp += 1;
+};
+
+chemjsChemicals.stable_polonium = {
+ elem: {
+ color: [blendColors("#56b870", "#ff0000"), blendColors("#56b870", "#00ff00"), blendColors("#56b870", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "solids",
+ density: 9196,
+ conduct: 0.21,
+ hidden: true,
+ },
+ tempHigh: [254],
+};
+
+chemjsChemicals.astatine = {
+ elem: {
+ color: "#5a5e5a",
+ behavior: ["XX|CR:radiation%50|XX", "CR:radiation%50|CH:polonium,explosion%0.1|CR:radiation%50", "M2|M1|M2"],
+ tick: function (pixel) {
+ pixel.temp += 5;
+ },
+ state: "solid",
+ category: "powders",
+ density: 8910,
+ },
+ tempHigh: [301, 336],
+ reactionProduct: { stable: "stable_astatine" },
+ densityHigh: [null, 17.17],
+ categories: ["radioactive"],
+};
+
+elements.molten_astatine = {};
+elements.molten_astatine.color = "#aab0a0";
+elements.molten_astatine.state = "liquid";
+elements.molten_astatine.behavior = ["XX|CR:radiation%50|XX", "M2 AND CR:radiation%50|CH:polonium,explosion%0.1|M2 AND CR:radiation%50", "M1|M1|M1"];
+elements.molten_astatine.tick = function (pixel) {
+ pixel.temp += 5;
+};
+
+elements.astatine_gas = {};
+elements.astatine_gas.behavior2 = [
+ ["XX", "CR:radiation%50", "XX"],
+ ["CR:radiation%50", "CH:polonium,explosion%0.1", "CR:radiation%50"],
+ ["XX", "CR:radiation%50", "XX"],
+];
+elements.astatine_gas.tick = function (pixel) {
+ pixel.temp += 5;
+ pixelTick(pixel, elements[pixel.element].behavior2);
+};
+
+chemjsChemicals.stable_astatine = {
+ elem: {
+ color: [blendColors("#5a5e5a", "#ff0000"), blendColors("#5a5e5a", "#00ff00"), blendColors("#5a5e5a", "#0000ff")],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 8910,
+ },
+ densityHigh: [null, 17.17],
+ tempHigh: [301, 336],
+ toxic: [0.01],
+};
+
+elements.molten_stable_astatine = {};
+elements.molten_stable_astatine.color = [blendColors("#aab0a0", "#ff0000"), blendColors("#aab0a0", "#00ff00"), blendColors("#aab0a0", "#0000ff")];
+elements.molten_stable_astatine.state = "liquid";
+
+chemjsChemicals.radon = {
+ elem: {
+ color: "#b6ffb5",
+ behavior: ["M2|M1 AND CR:radiation%10|M2", "M1 AND CR:radiation%10|CH:polonium%0.1|M1 AND CR:radiation%10", "M2|M1 AND CR:radiation%10|M2"],
+ tick: function (pixel) {
+ pixel.temp += 1;
+ },
+ state: "gas",
+ category: "gases",
+ density: 9.73,
+ conduct: 0.86,
+ colorOn: ["#b224ff", "#cc6caa", "#a16ccc"],
+ },
+ tempLow: [-61.7, -71],
+ reactionProduct: { stable: "stable_radon" },
+ densityHigh: [null, 9.73],
+ categories: ["radioactive"],
+};
+
+elements.liquid_radon = {};
+elements.liquid_radon.behavior = ["XX|CR:radiation%10|XX", "M2 AND CR:radiation%10|CH:polonium%0.1|M2 AND CR:radiation%10", "M1|M1|M1"];
+elements.liquid_radon.tick = function (pixel) {
+ pixel.temp += 1;
+};
+
+elements.radon_ice = {};
+elements.radon_ice.behavior = ["XX|CR:radiation%10|XX", "CR:radiation%10|CH:polonium%0.1|CR:radiation%10", "XX|CR:radiation%10|XX"];
+elements.radon_ice.tick = function (pixel) {
+ pixel.temp += 1;
+};
+elements.radon_ice.color = "#789d96";
+
+chemjsChemicals.stable_radon = {
+ elem: {
+ color: [blendColors("#b6ffb5", "#ff0000"), blendColors("#b6ffb5", "#00ff00"), blendColors("#b6ffb5", "#0000ff")],
+ behavior: behaviors.GAS,
+ state: "gas",
+ category: "gases",
+ density: 9.73,
+ conduct: 0.86,
+ colorOn: ["#b224ff", "#cc6caa", "#a16ccc"],
+ hidden: true,
+ },
+ densityHigh: [null, 9.73],
+ tempLow: [-61.7, -71],
+};
+
+chemjsChemicals.francium = {
+ elem: {
+ color: "#3eff3b",
+ behavior: ["XX|CR:radiation%50|XX", "CR:radiation%50|CH:radon%0.1|CR:radiation%50", "M2|M1|M2"],
+ tick: function (pixel) {
+ pixel.temp += 5;
+ },
+ state: "solid",
+ category: "powders",
+ density: 2480,
+ conduct: 0.7,
+ },
+ tempHigh: [27],
+ reactionProduct: { stable: "stable_francium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_francium = {};
+elements.molten_francium.behavior = ["XX|CR:radiation%50|XX", "M2 AND CR:radiation%50|CH:radon%0.1|M2 AND CR:radiation%50", "M1|M1|M1"];
+elements.molten_francium.tick = function (pixel) {
+ pixel.temp += 5;
+};
+elements.molten_francium.tempLow = 27;
+elements.molten_francium.stateLow = "francium";
+
+chemjsChemicals.stable_francium = {
+ elem: {
+ color: [blendColors("#3eff3b", "#ff0000"), blendColors("#3eff3b", "#00ff00"), blendColors("#3eff3b", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 2480,
+ hidden: true,
+ conduct: 0.7,
+ },
+ tempHigh: [27],
+};
+
+elements.molten_stable_francium = {};
+elements.molten_stable_francium.behavior = behaviors.LIQUID;
+elements.molten_stable_francium.tempLow = 27;
+elements.molten_stable_francium.stateLow = "stable_francium";
+
+chemjsChemicals.radium = {
+ elem: {
+ color: "#3bdeff",
+ behavior: ["XX|CR:radiation%10|XX", "CR:radiation%10|CH:radon%0.1|CR:radiation%10", "M2|M1|M2"],
+ tick: function (pixel) {
+ pixel.temp += 1;
+ },
+ state: "solid",
+ category: "powders",
+ density: 5500,
+ conduct: 0.4,
+ },
+ tempHigh: [700],
+ reactionProduct: { stable: "stable_radium" },
+ categories: ["radioactive"],
+ toxic: [1],
+};
+
+elements.molten_radium = {};
+elements.molten_radium.behavior = ["XX|CR:radiation%10|XX", "M2 AND CR:radiation%10|CH:radon%0.01|M2 AND CR:radiation%10", "M1|M1|M1"];
+elements.molten_radium.tick = function (pixel) {
+ pixel.temp += 1;
+};
+elements.molten_radium.tempLow = 700;
+elements.molten_radium.stateLow = "radium";
+
+chemjsChemicals.stable_radium = {
+ elem: {
+ color: [blendColors("#3bdeff", "#ff0000"), blendColors("#3bdeff", "#00ff00"), blendColors("#3bdeff", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 5500,
+ hidden: true,
+ conduct: 0.4,
+ },
+ tempHigh: [700],
+};
+
+chemjsChemicals.actinium = {
+ elem: {
+ color: "#62ebf0",
+ behavior: ["XX|CR:alpha_particle%0.1 AND CR:radiation%10|XX", "CR:alpha_particle%0.1 AND CR:radiation%10|CH:radium%0.02|CR:alpha_particle%0.1 AND CR:radiation%10", "M2|M1|M2"],
+ tick: function (pixel) {
+ pixel.temp += 2.5;
+ },
+ state: "solid",
+ category: "powders",
+ density: 10000,
+ conduct: 0.225,
+ },
+ tempHigh: [1227],
+ reactionProduct: { stable: "stable_actinium" },
+ categories: ["radioactive"],
+ toxic: [1],
+};
+elements.molten_actinium = {};
+elements.molten_actinium.behavior = ["XX|CR:fire%2.5 AND CR:alpha_particle%0.1 AND CR:radiation%10|XX", "M2 AND CR:alpha_particle%0.1 AND CR:radiation%10|CH:radium%0.02|M2 AND CR:alpha_particle%0.1 AND CR:radiation%10", "M1|M1|M1"];
+elements.molten_actinium.tick = function (pixel) {
+ pixel.temp += 2.5;
+};
+elements.molten_actinium.tempLow = 1227;
+elements.molten_actinium.stateLow = "radium";
+
+chemjsChemicals.stable_actinium = {
+ elem: {
+ color: [blendColors("#62ebf0", "#ff0000"), blendColors("#62ebf0", "#00ff00"), blendColors("#62ebf0", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 10000,
+ hidden: true,
+ conduct: 0.225,
+ },
+ tempHigh: [1227],
+};
+
+chemjsChemicals.thorium = {
+ elementNames: ["chemical!pure_unstable_thorium", "chemical!pure_stable_thorium"],
+};
+
+chemjsChemicals.thorium = {
+ elementNames: ["chemical!pure_unstable_thorium", "chemical!pure_stable_thorium"],
+};
+
+chemjsChemicals.unstable_thorium = {
+ elementNames: [],
+};
+chemjsChemicals.stable_thorium = {
+ elementNames: [],
+};
+
+chemjsChemicals.pure_unstable_thorium = {
+ elem: {
+ color: ["#599e8a", "#364d4b", "#494d4c", "#428a58", "#658d7a", "#89e0a2"],
+ behavior: ["XX|CR:alpha_particle%0.01|XX", "CR:alpha_particle%0.01|CH:lead%0.001|CR:alpha_particle%0.01", "XX|CR:alpha_particle%0.01|XX"],
+ state: "solid",
+ category: "solids",
+ density: 11700,
+ hardness: 0.7,
+ conduct: 0.235,
+ },
+ tempHigh: [1750],
+ elemName: "thorium",
+ stateHigh: ["molten_thorium"],
+ reactionProduct: { isotope: "unstable_thorium", stable: "stable_thorium" },
+ categories: ["unstable_thorium", "radioactive"],
+};
+
+elements.molten_thorium = {};
+elements.molten_thorium.behavior = ["XX|CR:alpha_particle%0.01|XX", "M2 AND CR:alpha_particle%0.01|XX|M2 AND CR:alpha_particle%0.01", "M1|M1|M1"];
+
+chemjsChemicals.pure_stable_thorium = {
+ elem: {
+ color: [blendColors("#599e8a", "#ff0000"), blendColors("#364d4b", "#00ff00"), blendColors("#494d4c", "#0000ff"), blendColors("#428a58", "#ff0000"), blendColors("#658d7a", "#00ff00"), blendColors("#89e0a2", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "solids",
+ density: 11700,
+ hardness: 0.7,
+ conduct: 0.235,
+ hidden: true,
+ },
+ tempHigh: [1750],
+ elemName: "stable_thorium",
+ stateHigh: ["molten_stable_thorium"],
+ reactionProduct: { isotope: "stable_thorium" },
+ categories: ["stable_thorium"],
+};
+
+chemjsChemicals.protactinium = {
+ elem: {
+ color: ["#9899a3", "#44464a", "#5a5b5e"],
+ behavior: ["XX|CR:alpha_particle%0.01 AND CR:radiation%2|XX", "CR:alpha_particle%0.01 AND CR:radiation%2|CH:actinium%0.01|CR:alpha_particle%0.01 AND CR:radiation%2", "M2|M1|M2"],
+ state: "solid",
+ category: "powders",
+ density: 15700,
+ hardness: 0.1,
+ conduct: 0.235,
+ },
+ tempHigh: [1568],
+ reactionProduct: { stable: "stable_protactinium" },
+ categories: ["radioactive"],
+};
+elements.molten_protactinium = {};
+elements.molten_protactinium.behavior = ["XX|CR:fire%2.5 AND CR:alpha_particle%0.01 AND CR:radiation%2|XX", "M2 AND CR:alpha_particle%0.01 AND CR:radiation%2|CH:actinium%0.01|M2 AND CR:alpha_particle%0.01 AND CR:radiation%2", "M1|M1|M1"];
+
+chemjsChemicals.stable_protactinium = {
+ elem: {
+ color: [blendColors("#9899a3", "#ff0000"), blendColors("#44464a", "#00ff00"), blendColors("#5a5b5e", "#0000ff")],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 15700,
+ hardness: 0.1,
+ conduct: 0.235,
+ },
+ tempHigh: [1568],
+};
+
+chemjsChemicals.uranium = {
+ elementNames: ["chemical!pure_mixed_uranium", "chemical!pure_uranium_238", "chemical!pure_uranium_235", "chemical!pure_stable_uranium"],
+};
+
+chemjsChemicals.mixed_uranium = {
+ elementNames: [],
+};
+chemjsChemicals.uranium_238 = {
+ elementNames: [],
+};
+chemjsChemicals.uranium_235 = {
+ elementNames: [],
+};
+chemjsChemicals.stable_uranium = {
+ elementNames: [],
+};
+
+chemjsChemicals.pure_mixed_uranium = {
+ elementNames: ["uranium", "molten_uranium"],
+ categories: ["radioactive", "mixed_uranium"],
+ reactionProduct: { stable: "stable_uranium", isotope: "mixed_uranium" },
+};
+
+elements.uranium.behavior = ["XX|CR:radiation%1 AND CR:alpha_particle%0.01|XX", "CR:radiation%1 AND CR:alpha_particle%0.01|CH:thorium%0.001|CR:radiation%1 AND CR:alpha_particle%0.01", "M2|M1|M2"];
+elements.molten_uranium.behavior = ["XX|CR:fire%2.5 AND CR:radiation%1 AND CR:alpha_particle%0.01|XX", "M2 AND CR:radiation%1 AND CR:alpha_particle%0.01|CH:thorium%0.001|M2 AND CR:radiation%1 AND CR:alpha_particle%0.01", "M1|M1|M1"];
+elements.molten_uranium.excludeRandom = true;
+
+chemjsChemicals.pure_uranium_238 = {
+ elem: {
+ color: ["#599e61", "#364d3c", "#494d4a", "#6c8a42", "#798d65", "#b5e089"],
+ behavior: ["XX|CR:alpha_particle%0.01|XX", "CR:alpha_particle%0.01|CH:thorium%0.001|CR:alpha_particle%0.01", "M2|M1|M2"],
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 19100,
+ hardness: 0.6,
+ conduct: 0.235,
+ },
+ tempHigh: [1132.2],
+ stateHigh: ["molten_depleted_uranium"],
+ elemName: "depleted_uranium",
+ categories: ["radioactive", "uranium_238"],
+ reactionProduct: { stable: "stable_uranium", isotope: "uranium_238" },
+};
+
+elements.molten_depleted_uranium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.01|XX", "M2 AND CR:alpha_particle%0.01|CH:thorium%0.001|M2 AND CR:alpha_particle%0.01", "M1|M1|M1"],
+};
+
+chemjsChemicals.pure_uranium_235 = {
+ elem: {
+ color: ["#599e61", "#364d3c", "#494d4a", "#6c8a42", "#798d65", "#b5e089"],
+ behavior: ["XX|CR:radiation%2.5 AND CR:alpha_particle%0.1|XX", "CR:radiation%2.5 AND CR:alpha_particle%0.1|CH:thorium%0.01 AND CH:protactinium%0.005|CR:radiation%2.5 AND CR:alpha_particle%0.1", "M2|M1|M2"],
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 19100,
+ hardness: 0.6,
+ conduct: 0.235,
+ },
+ tempHigh: [1132.2],
+ stateHigh: ["molten_enriched_uranium"],
+ elemName: "enriched_uranium",
+ categories: ["radioactive", "uranium_235"],
+ reactionProduct: { stable: "stable_uranium", isotope: "uranium_235" },
+};
+
+elements.molten_enriched_uranium = {
+ excludeRandom: true,
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.01|XX", "M2 AND CR:alpha_particle%0.01|CH:thorium%0.01 AND CH:protactinium%0.005|M2 AND CR:alpha_particle%0.01", "M1|M1|M1"],
+};
+
+chemjsChemicals.pure_stable_uranium = {
+ elem: {
+ color: [blendColors("#599e61", "#ff0000"), blendColors("#364d3c", "#00ff00"), blendColors("#494d4a", "#0000ff"), blendColors("#6c8a42", "#ff0000"), blendColors("#798d65", "#00ff00"), blendColors("#b5e089", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 19100,
+ hardness: 0.6,
+ conduct: 0.235,
+ },
+ tempHigh: [1132.2],
+ stateHigh: ["molten_stable_uranium"],
+ elemName: "stable_uranium",
+ categories: ["stable_uranium"],
+ reactionProduct: { isotope: "stable_uranium" },
+};
+
+chemjsChemicals.neptunium = {
+ elem: {
+ color: ["#626580", "#3f4a61", "#4a5463"],
+ behavior: ["XX|CR:neutron%0.1 AND CR:radiation%2|XX", "CR:neutron%0.1 AND CR:radiation%2|CH:thorium%0.025|CR:neutron%0.1 AND CR:radiation%2", "XX|CR:neutron%0.1 AND CR:radiation%2|XX"],
+ state: "solid",
+ category: "solids",
+ density: 19380,
+ hardness: 0.7,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [639],
+ reactionProduct: { stable: "stable_neptunium" },
+ categories: ["radioactive"],
+};
+elements.molten_neptunium = {};
+elements.molten_neptunium.behavior = ["XX|CR:fire%2.5 AND CR:neutron%0.1 AND CR:radiation%2|XX", "M2 AND CR:neutron%0.1 AND CR:radiation%2|CH:thorium%0.025|M2 AND CR:neutron%0.1 AND CR:radiation%2", "M1|M1|M1"];
+elements.molten_neptunium.excludeRandom = true;
+
+chemjsChemicals.stable_neptunium = {
+ elem: {
+ color: [blendColors("#626580", "#ff0000"), blendColors("#3f4a61", "#00ff00"), blendColors("#4a5463", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "solids",
+ density: 19380,
+ hardness: 0.7,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [639],
+};
+
+chemjsChemicals.plutonium = {
+ elementNames: ["chemical!pure_mixed_plutonium", "chemical!pure_plutonium_242", "chemical!pure_plutonium_239", "chemical!pure_stable_plutonium"],
+};
+
+chemjsChemicals.mixed_plutonium = {
+ elementNames: [],
+};
+chemjsChemicals.plutonium_242 = {
+ elementNames: [],
+};
+chemjsChemicals.plutonium_239 = {
+ elementNames: [],
+};
+chemjsChemicals.stable_plutonium = {
+ elementNames: [],
+};
+
+chemjsChemicals.pure_mixed_plutonium = {
+ elem: {
+ color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
+ behavior: ["XX|CR:alpha_particle%0.05 AND CR:radiation%2|XX", "CR:alpha_particle%0.05 AND CR:radiation%2|CH:enriched_uranium%0.025 AND CH:americium%0.025|CR:alpha_particle%0.05 AND CR:radiation%2", "XX|CR:alpha_particle%0.05 AND CR:radiation%2|XX"],
+ category: "solids",
+ state: "solid",
+ density: 19850,
+ hardness: 0.7,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [639],
+ stateHigh: ["molten_plutonium"],
+ elemName: "plutonium",
+ categories: ["radioactive", "mixed_plutonium"],
+ reactionProduct: { stable: "stable_plutonium", isotope: "mixed_plutonium" },
+};
+elements.molten_plutonium = {
+ excludeRandom: true,
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.05 AND CR:radiation%2|XX", "M2 AND CR:alpha_particle%0.05 AND CR:radiation%2|CH:enriched_uranium%0.01 AND CH:depleted_uranium%0.02|M2 AND CR:alpha_particle%0.05 AND CR:radiation%2", "M1|M1|M1"],
+};
+
+chemjsChemicals.pure_plutonium_242 = {
+ elem: {
+ color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
+ behavior: ["XX|CR:radiation%2|XX", "CR:radiation%2|CH:depleted_uranium%0.025|CR:radiation%2", "XX|CR:radiation%2|XX"],
+ category: "solids",
+ hidden: true,
+ state: "solid",
+ density: 19850,
+ hardness: 0.7,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [639],
+ stateHigh: ["molten_depleted_plutonium"],
+ elemName: "depleted_plutonium",
+ categories: ["radioactive", "plutonium_242"],
+ reactionProduct: { stable: "stable_plutonium", isotope: "plutonium_242" },
+};
+elements.molten_depleted_plutonium = {
+ excludeRandom: true,
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%2|XX", "M2 AND CR:radiation%2|CH:depleted_uranium%0.015|M2 AND CR:radiation%2", "M1|M1|M1"],
+};
+
+chemjsChemicals.pure_plutonium_239 = {
+ elem: {
+ color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
+ behavior: ["XX|CR:alpha_particle%0.05 AND CR:radiation%2|XX", "CR:alpha_particle%0.05 AND CR:radiation%2|CH:enriched_uranium%0.035|CR:alpha_particle%0.05 AND CR:radiation%2", "XX|CR:alpha_particle%0.05 AND CR:radiation%2|XX"],
+ category: "solids",
+ hidden: true,
+ state: "solid",
+ density: 19850,
+ hardness: 0.7,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [639],
+ stateHigh: ["molten_enriched_plutonium"],
+ elemName: "enriched_plutonium",
+ categories: ["radioactive", "plutonium_239"],
+ reactionProduct: { stable: "stable_plutonium", isotope: "plutonium_239" },
+};
+elements.molten_enriched_plutonium = {
+ excludeRandom: true,
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.05 AND CR:radiation%2|XX", "M2 AND CR:alpha_particle%0.05 AND CR:radiation%2|CH:enriched_uranium%0.035|M2 AND CR:alpha_particle%0.05 AND CR:radiation%2", "M1|M1|M1"],
+};
+
+chemjsChemicals.pure_stable_plutonium = {
+ elem: {
+ color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
+ behavior: behaviors.WALL,
+ category: "solids",
+ hidden: true,
+ state: "solid",
+ density: 19850,
+ hardness: 0.7,
+ conduct: 0.2,
+ },
+ tempHigh: [639],
+ stateHigh: ["molten_stable_plutonium"],
+ elemName: "stable_plutonium",
+ categories: ["stable_plutonium"],
+ reactionProduct: { isotope: "stable_plutonium" },
+};
+
+chemjsChemicals.americium = {
+ elem: {
+ color: ["#42ebaf", "#59d998", "#d0dbd5"],
+ behavior: ["XX|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX", "CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|CH:neptunium%0.05 AND CH:plutonium%0.05|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2", "XX|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX"],
+ state: "solid",
+ category: "solids",
+ density: 12000,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [1176],
+ reactionProduct: { stable: "stable_americium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_americium = {};
+elements.molten_americium.behavior = ["XX|CR:fire%2.5 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX", "M2 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|CH:neptunium%0.05 AND CH:plutonium%0.05|M2 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2", "M1|M1|M1"];
+elements.molten_americium.excludeRandom = true;
+
+chemjsChemicals.stable_americium = {
+ elem: {
+ color: [blendColors("#42ebaf", "#ff0000"), blendColors("#59d998", "#00ff00"), blendColors("#d0dbd5", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "powders",
+ density: 12000,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [1176],
+};
+
+chemjsChemicals.curium = {
+ elem: {
+ color: ["#fab1f1", "#d6c9d5", "#e0b1d6"],
+ behavior: ["XX|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|CH:plutonium%0.075|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ state: "solid",
+ category: "solids",
+ density: 13510,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [1340],
+ reactionProduct: { stable: "stable_curium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_curium = {};
+elements.molten_curium.behavior = ["XX|CR:fire%2.5 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|CH:plutonium%0.075|M2 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"];
+elements.molten_curium.excludeRandom = true;
+
+chemjsChemicals.stable_curium = {
+ elem: {
+ color: [blendColors("#fab1f1", "#ff0000"), blendColors("#d6c9d5", "#00ff00"), blendColors("#e0b1d6", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "powders",
+ density: 13510,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [1340],
+};
+
+chemjsChemicals.berkelium = {
+ elem: {
+ color: ["#f2edfa", "#bdbccf", "#d7cae8"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.075|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ state: "solid",
+ category: "solids",
+ density: 13250,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [986],
+ reactionProduct: { stable: "stable_berkelium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_berkelium = {};
+elements.molten_berkelium.behavior = ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.075|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"];
+elements.molten_berkelium.excludeRandom = true;
+
+chemjsChemicals.stable_berkelium = {
+ elem: {
+ color: [blendColors("#f2edfa", "#ff0000"), blendColors("#bdbccf", "#00ff00"), blendColors("#d7cae8", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "powders",
+ density: 13250,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [986],
+};
+
+chemjsChemicals.californium = {
+ elem: {
+ color: ["#dfd0f7", "#bcbade", "#b99be0"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:curium%0.05 AND CH:einsteinium%0.05|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ state: "solid",
+ category: "solids",
+ density: 15100,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [900],
+ reactionProduct: { stable: "stable_californium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_californium = {};
+elements.molten_californium.behavior = ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:curium%0.05 AND CH:einsteinium%0.05|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"];
+elements.molten_californium.excludeRandom = true;
+
+chemjsChemicals.stable_californium = {
+ elem: {
+ color: [blendColors("#dfd0f7", "#ff0000"), blendColors("#bcbade", "#00ff00"), blendColors("#b99be0", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "powders",
+ density: 15100,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [900],
+};
+
+chemjsChemicals.einsteinium = {
+ elem: {
+ color: ["#3aa6c2", "#b8edf1", "#83d9e4"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:curium%0.05 AND CH:fermium%0.05|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ state: "solid",
+ category: "solids",
+ density: 8840,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [1133],
+ reactionProduct: { stable: "stable_einsteinium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_einsteinium = {};
+elements.molten_einsteinium.behavior = ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:berkelium%0.05 AND CH:fermium%0.05|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"];
+elements.molten_einsteinium.excludeRandom = true;
+
+chemjsChemicals.stable_einsteinium = {
+ elem: {
+ color: [blendColors("#3aa6c2", "#ff0000"), blendColors("#b8edf1", "#00ff00"), blendColors("#83d9e4", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "powders",
+ density: 8840,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [1133],
+};
+
+chemjsChemicals.fermium = {
+ elem: {
+ color: ["#c8a7fc", "#cecbf2", "#d5bff2"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ state: "solid",
+ category: "solids",
+ density: 9710,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+ },
+ tempHigh: [1800],
+ reactionProduct: { stable: "stable_fermium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_fermium = {};
+elements.molten_fermium.behavior = ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"];
+elements.molten_fermium.excludeRandom = true;
+
+chemjsChemicals.stable_fermium = {
+ elem: {
+ color: [blendColors("#c8a7fc", "#ff0000"), blendColors("#cecbf2", "#00ff00"), blendColors("#d5bff2", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "powders",
+ density: 9710,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [1800],
+};
+
+chemjsChemicals.copernicium = {
+ elem: {
+ color: ["#a7fcbc", "#8cc299", "#9db9c2"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
+ state: "liquid",
+ category: "liquids",
+ density: 14010,
+ hardness: 0.999,
+ conduct: 0.2,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ },
+ tempHigh: [67],
+ tempLow: [10],
+ stateLow: ["solid_copernicium"],
+ densityHigh: [11.848],
+ reactionProduct: { stable: "stable_copernicium" },
+ categories: ["radioactive"],
+ causticIgnore: true,
+};
+
+elements.solid_copernicium = {
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+elements.copernicium_gas = {
+ behavior: ["M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2", "M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+chemjsChemicals.stable_copernicium = {
+ elem: {
+ color: [blendColors("#a7fcbc", "#ff0000"), blendColors("#8cc299", "#00ff00"), blendColors("#9db9c2", "#0000ff")],
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ category: "liquids",
+ density: 14010,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [67],
+ tempLow: [10],
+ stateLow: ["solid_stable_copernicium"],
+ densityHigh: [11.848],
+ toxic: [0.02],
+ causticIgnore: true,
+};
+
+chemjsChemicals.nihonium = {
+ elem: {
+ color: ["#c94a0a"],
+ /*spike viper reference*/ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|M1|XX"],
+ state: "solid",
+ category: "powders",
+ density: 16000,
+ hardness: 0.999,
+ conduct: 0.2,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ },
+ tempHigh: [430],
+ reactionProduct: { stable: "stable_nihonium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_nihonium = {
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+ state: "liquid",
+};
+
+chemjsChemicals.stable_nihonium = {
+ elem: {
+ color: [blendColors("#c94a0a", "#ff0000"), blendColors("#c94a0a", "#00ff00"), blendColors("#c94a0a", "#0000ff")],
+ behavior: behaviors.STURDYPOWDER,
+ state: "solid",
+ category: "powders",
+ density: 16000,
+ hardness: 0.999,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [430],
+ toxic: [0.02],
+};
+
+chemjsChemicals.flerovium = {
+ elem: {
+ color: ["#a8ffe2", "#7ddbcd", "#9dc2b1"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
+ state: "liquid",
+ category: "liquids",
+ density: 11400,
+ hardness: 0.999,
+ conduct: 0.2,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ },
+ tempHigh: [107],
+ tempLow: [-73],
+ stateLow: ["solid_flerovium"],
+ densityHigh: [12.014],
+ reactionProduct: { stable: "stable_flerovium" },
+ categories: ["radioactive"],
+ causticIgnore: true,
+};
+
+elements.solid_flerovium = {
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+elements.flerovium_gas = {
+ behavior: ["M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2", "M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+chemjsChemicals.stable_flerovium = {
+ elem: {
+ color: [blendColors("#a8ffe2", "#ff0000"), blendColors("#7ddbcd", "#00ff00"), blendColors("#9dc2b1", "#0000ff")],
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ category: "liquids",
+ density: 11400,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [107],
+ tempLow: [-73],
+ stateLow: ["solid_stable_flerovium"],
+ densityHigh: [12.014],
+ toxic: [0.02],
+ causticIgnore: true,
+};
+
+chemjsChemicals.moscovium = {
+ elem: {
+ color: ["#8a3683", "#b0339b", "#d14fcd"],
+ behavior: ["XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX", "CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|CH:nihonium%1|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2", "XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX"],
+ state: "solid",
+ category: "solids",
+ density: 13500,
+ hardness: 0.999,
+ conduct: 0.2,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ },
+ tempHigh: [400],
+ reactionProduct: { stable: "stable_moscovium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_moscovium = {
+ behavior: ["XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX", "M2 AND CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|CH:nihonium%1|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2", "M1|M1|M1"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+ state: "liquid",
+};
+
+chemjsChemicals.stable_moscovium = {
+ elem: {
+ color: [blendColors("#c94a0a", "#ff0000"), blendColors("#c94a0a", "#00ff00"), blendColors("#c94a0a", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "solids",
+ density: 13500,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [400],
+};
+
+chemjsChemicals.livermorium = {
+ elem: {
+ color: ["#c9c26b", "#5ee04c", "#8bc253"],
+ behavior: ["XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX", "CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|CH:flerovium%1|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1", "XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX"],
+ state: "solid",
+ category: "solids",
+ density: 12900,
+ hardness: 0.999,
+ conduct: 0.2,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ },
+ tempHigh: [455],
+ reactionProduct: { stable: "stable_livermorium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_livermorium = {
+ behavior: ["XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX", "M2 AND CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|CH:flerovium%1|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1", "M1|M1|M1"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+ state: "liquid",
+};
+
+chemjsChemicals.stable_livermorium = {
+ elem: {
+ color: [blendColors("#c94a0a", "#ff0000"), blendColors("#c94a0a", "#00ff00"), blendColors("#c94a0a", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "solids",
+ density: 12900,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [455],
+};
+
+chemjsChemicals.tennessine = {
+ elem: {
+ color: ["#4f4c42"],
+ behavior: ["XX|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|XX", "CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|CH:moscovium%1|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2", "M2|M1|M2"],
+ state: "solid",
+ category: "powders",
+ density: 7200,
+ hardness: 0.999,
+ conduct: 0.1,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ },
+ tempHigh: [425],
+ reactionProduct: { stable: "stable_tennessine" },
+ categories: ["radioactive"],
+};
+
+elements.molten_tennessine = {
+ behavior: ["XX|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|XX", "M2 AND CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|CH:moscovium%1|M2 AND CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2", "M1|M1|M1"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+ state: "liquid",
+};
+
+chemjsChemicals.stable_tennessine = {
+ elem: {
+ color: [blendColors("#4f4c42", "#ff0000"), blendColors("#4f4c42", "#00ff00"), blendColors("#4f4c42", "#0000ff")],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 7200,
+ conduct: 0.1,
+ hidden: true,
+ },
+ tempHigh: [425],
+ toxic: [0.01],
+};
+
+chemjsChemicals.oganesson = {
+ elem: {
+ color: ["#c4ccc6", "#9ea39f", "#8e9294"],
+ behavior: ["XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX", "CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX"],
+ state: "solid",
+ category: "solids",
+ density: 7200,
+ hardness: 0.999,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ },
+ tempHigh: [52, 177],
+ densityHigh: [null, 12.222],
+ reactionProduct: { stable: "stable_oganesson" },
+ categories: ["radioactive"],
+};
+elements.molten_oganesson = {
+ behavior: ["XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX", "M2 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|M2 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "M1|M1|M1"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+ state: "liquid",
+};
+
+elements.oganesson_gas = {
+ behavior: ["M2|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|M2", "M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "M2|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|M2"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+ colorOn: ["#e224ff", "#cc6c96", "#c76ccc"],
+ conduct: 0.86,
+ state: "gas",
+};
+
+chemjsChemicals.stable_oganesson = {
+ elem: {
+ color: [blendColors("#c4ccc6", "#ff0000"), blendColors("#9ea39f", "#00ff00"), blendColors("#8e9294", "#0000ff")],
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "solids",
+ density: 7200,
+ conduct: 0.1,
+ hidden: true,
+ },
+ tempHigh: [52, 177],
+ densityHigh: [null, 12.222],
+};
+
+elements.molten_stable_oganesson = {
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+};
+
+elements.stable_oganesson_gas = {
+ colorOn: ["#e224ff", "#cc6c96", "#c76ccc"],
+ conduct: 0.86,
+ state: "gas",
+};
+
+chemjsChemicals.ununennium = {
+ elem: {
+ color: ["#c0eb9b", "#82e082", "#b8c29d"],
+ behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M1|M1|M1"],
+ state: "liquid",
+ category: "liquids",
+ density: 3000,
+ hardness: 0.999,
+ conduct: 0.2,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ },
+ tempHigh: [630],
+ tempLow: [15],
+ stateLow: ["solid_ununennium"],
+ densityHigh: [12.555],
+ reactionProduct: { stable: "stable_ununennium" },
+ categories: ["radioactive"],
+};
+
+elements.solid_ununennium = {
+ behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1|M2"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ excludeRandom: true,
+};
+
+elements.ununennium_gas = {
+ behavior: ["M2|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|M2", "M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|M2"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ excludeRandom: true,
+};
+
+chemjsChemicals.stable_ununennium = {
+ elem: {
+ color: [blendColors("#c0eb9b", "#ff0000"), blendColors("#82e082", "#00ff00"), blendColors("#b8c29d", "#0000ff")],
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ category: "liquids",
+ density: 14010,
+ conduct: 0.2,
+ hidden: true,
+ },
+ tempHigh: [630],
+ tempLow: [15],
+ stateLow: ["solid_stable_ununennium"],
+ densityHigh: [12.555],
+};
+
+elements.solid_stable_ununennium = {
+ behavior: behaviors.POWDER,
+};
+
+chemjsChemicals.unbinilium = {
+ elem: {
+ color: ["#faf069", "#fcf0c7", "#edcd3e"],
+ behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:oganesson%1|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1|M2"],
+ state: "solid",
+ category: "powders",
+ density: 7000,
+ hardness: 0.999,
+ conduct: 0.2,
+ excludeRandom: true,
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ },
+ tempHigh: [680],
+ reactionProduct: { stable: "stable_unbinilium" },
+ categories: ["radioactive"],
+};
+
+elements.molten_unbinilium = {
+ behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:oganesson%1|M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M1|M1|M1"],
+ hardness: 0.999,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+ state: "liquid",
+};
+
+chemjsChemicals.stable_unbinilium = {
+ elem: {
+ color: [blendColors("#faf069", "#ff0000"), blendColors("#fcf0c7", "#00ff00"), blendColors("#edcd3e", "#0000ff")],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 7000,
+ conduct: 0.1,
+ hidden: true,
+ },
+ tempHigh: [680],
+ toxic: [0.01],
+};
+
+chemjsChemicals.radioactive = {
+ elementNames: [],
+};
+//acids
+
+chemjsChemicals.generic_acid = {
+ elem: {
+ name: "acid",
+ color: "#80d488",
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1020,
+ burn: 30,
+ burnTime: 1,
+ hidden: true,
+ },
+ tempHigh: [110, 400],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [1],
+ tempLow: [-10],
+};
+elements.generic_acid_gas = {
+ name: "acid_gas",
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+elements.generic_acid_ice = {
+ name: "acid_ice",
+};
+
+let hydrofluoricAcidTick = function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "hydrogen_fluoride");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ }
+ }
+};
+
+chemjsChemicals.hydrofluoric_acid = {
+ elem: {
+ color: ["#c8cf91", "#efff5e", "#a0cc39"],
+ tick: hydrofluoricAcidTick,
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ category: "liquids",
+ density: 1020,
+ stain: 0.005,
+ },
+ densityHigh: [1.63],
+ tempHigh: [100, 400],
+ stateHigh: [null, ["fire"]],
+ tempLow: [-58.88],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "fluoride" },
+ categories: ["acids", "hydrogen_ion", "fluoride", "caustic"],
};
elements.hydrofluoric_acid_gas = {
- color: ["#acb37d", "#bfcc4b", "#668224"],
- ignore: ["liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "gold", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "chloroform", "chloroform_gas", "chloroform_ice", "tetrafluoroethylene", "tungsten", "tungsten_hexafluoride"],
- tick: function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
- }
- }
- }
- if (change) {
- if (Math.random() < 0.2) {
- changePixel(pixel, "hydrogen_fluoride");
- } else {
- deletePixel(pixel.x, pixel.y);
- }
- } else {
- behaviors.GAS(pixel);
- }
- },
- reactions: {},
- state: "gas",
- density: 1.63,
- stain: 0.005,
- tempHigh: 400,
- stateHigh: "fire",
- tempLow: -10,
- stateLow: "hydrofluoric_acid",
+ tick: hydrofluoricAcidTick,
+ behavior: behaviors.GAS,
category: "gases",
+ stain: 0.005,
};
-runAfterLoad(function () {
- reactList("fluorine", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "oxygen" });
- reactList("liquid_fluorine", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "oxygen" });
- reactList("hydrofluoric_acid", eLists.WATER, { elem2: "dirty_water" });
- reactList("hydrofluoric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
- delete elements.hydrofluoric_acid.reactions["dirty_water"];
- delete elements.hydrofluoric_acid_gas.reactions["dirty_water"];
-});
-
-elements.hydrogen_fluoride = {
- color: "#f2f28d",
- behavior: behaviors.GAS,
- ignore: ["liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_ice", "hydrofluoric_acid", "hydrofluoric_acid_gas", "fire", "smoke", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "gold", "hydrogen", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "chloroform", "chloroform_gas", "chloroform_ice", "tetrafluoroethylene"],
- tick: function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
+let hydrogenFluorideTick = function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
}
}
}
- if (change && Math.random() < 0.2) {
- changePixel(pixel, "fire");
- }
+ }
+ if (change && Math.random() < 0.2) {
+ changePixel(pixel, "fire");
+ }
+};
+
+chemjsChemicals.hydrogen_fluoride = {
+ elem: {
+ color: "#f2f28d",
+ behavior: behaviors.GAS,
+ tick: hydrogenFluorideTick,
+ state: "gas",
+ category: "gases",
+ density: 1.7,
+ stain: 0.005,
},
- reactions: {
- steam: { elem1: "hydrofluoric_acid_gas", elem2: null },
- },
- state: "gas",
- category: "gases",
- density: 1.7,
- stain: 0.005,
- tempLow: -19.5,
- stateLow: "liquid_hydrogen_fluoride",
+ densityLow: [990],
+ tempLow: [19.5, -83.6],
+ elementNames: ["chemical!hydrofluoric_acid"],
+ ignore: ["chemical!fluorine_ignore", "chemical!potassium_fluoride"],
+ ignorable: true,
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "fluoride" },
+ categories: ["hydrogen_ion", "fluoride"],
+ ignore: ["chemical!fluoride", "chemical!apatite"],
};
elements.liquid_hydrogen_fluoride = {
- color: "#e2e28d",
+ tick: hydrogenFluorideTick,
behavior: behaviors.LIQUID,
- ignore: ["liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "fire", "smoke", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "gold", "hydrogen", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "chloroform", "chloroform_gas", "chloroform_ice", "tetrafluoroethylene"],
- tick: function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
- }
- }
- }
- if (change && Math.random() < 0.2) {
- changePixel(pixel, "fire");
- }
- },
- reactions: {
- steam: { elem1: "hydrofluoric_acid_gas", elem2: null },
- },
- state: "liquid",
category: "liquids",
- hidden: true,
- density: 1.7,
stain: 0.005,
- temp: -20.5,
- tempHigh: -19.5,
- stateHigh: "hydrogen_fluoride",
- tempLow: -83.6,
};
-runAfterLoad(function () {
- reactList("hydrogen_fluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: null });
- reactList("liquid_hydrogen_fluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: null });
-});
-
-elements.foof = {
- color: "#fa1e1e",
- behavior: behaviors.LIQUID,
- ignore: ["foof", "solid_foof", "fluorine", "liquid_fluorine", "fluorine_ice", "liquid_oxygen", "oxygen_ice", "oxygen", "ozone", "fire", "polytetrafluoroethylene", "molten_polytetrafluoroethylene"],
- tick: function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
+let fluoroboricAcidTick = function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
}
}
}
- if (change && Math.random() < 0.01) {
- changePixel(pixel, "explosion");
- } else if (Math.random() < 0.0001) {
- if (Math.random() < 0.5) {
- changePixel(pixel, "oxygen", false);
- } else {
- changePixel(pixel, "fluorine", false);
- }
- pixelTempCheck(pixel);
- pixelTempCheck(pixel);
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "boron_trifluoride");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ return;
}
- },
- state: "liquid",
- category: "liquids",
- density: 1450,
- stain: 0.01,
- temp: -120,
- tempHigh: -57,
- stateHigh: ["oxygen", "fluorine", "explosion"],
- tempLow: -154,
- stateLow: "solid_foof",
- reactions: {},
+ }
};
+chemjsChemicals.fluoroboric_acid = {
+ elem: {
+ color: ["#3bffdb", "#00caaf", "#56c4a3"],
+ tick: fluoroboricAcidTick,
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ category: "liquids",
+ density: 1020,
+ stain: 0.005,
+ hidden: true,
+ },
+ densityHigh: [1],
+ tempHigh: [100, 1000],
+ stateHigh: [null, ["fire"]],
+ tempLow: [0],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "tetrafluoroborate" },
+ categories: ["acids", "hydrogen_ion", "tetrafluoroborate", "caustic"],
+ ignore: ["chemical!boric_acid", "chemical!tetrafluoroborate"],
+};
+
+elements.fluoroboric_acid_gas = {
+ tick: fluoroboricAcidTick,
+ behavior: behaviors.GAS,
+ category: "gases",
+ stain: 0.005,
+};
+
+chemjsChemicals.nitric_acid = {
+ elem: {
+ color: ["#91993c", "#6b7041", "#5f614b"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1500,
+ },
+ tempHigh: [83, 400],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [1.5],
+ tempLow: [-42],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "nitrate" },
+ categories: ["acids", "hydrogen_ion", "nitrate", "caustic"],
+ ignore: ["chemical!nitrate"],
+};
+elements.nitric_acid_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.hexafluorosilicic_acid = {
+ elem: {
+ color: ["#ebeed8", "#f9ffc2", "#c7e189"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1460,
+ hidden: true,
+ },
+ tempHigh: [108.5, 400],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [5.89],
+ tempLow: [19],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "hexafluorosilicate" },
+ categories: ["acids", "hydrogen_ion", "hexafluorosilicate", "caustic"],
+};
+elements.hexafluorosilicic_acid_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+ hidden: true,
+};
+
+chemjsChemicals.phosphoric_acid = {
+ elem: {
+ color: ["#a1a3ed", "#8f91db", "#bab5f5"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1684,
+ viscosity: 26.7,
+ },
+ tempHigh: [120, 1000],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [4],
+ tempLow: [0],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "phosphate" },
+ categories: ["acids", "hydrogen_ion", "phosphate"],
+ ignore: ["chemical!phosphorus_pentoxide", "chemical!phosphate", "sugar"],
+};
+elements.phosphoric_acid_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.sulfuric_acid = {
+ elem: {
+ color: ["#e9e05e", "#c2bd7a", "#9e9c7b"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1830,
+ viscosity: 26.7,
+ },
+ tempHigh: [337, 600],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [1.26],
+ tempLow: [10],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "sulfate" },
+ categories: ["acids", "hydrogen_ion", "sulfate", "caustic"],
+ ignore: ["chemical!sulfate"],
+};
+elements.sulfuric_acid_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+elements.acid.name = "hydrochloric_acid";
+elements.acid.forceAutoGen = true;
+elements.acid_gas.name = "hydrochloric_acid_gas";
+elements.acid_ice = {
+ name: "hydrochloric_acid_ice",
+};
+
+chemjsChemicals.hydrochloric_acid = {
+ elementNames: ["acid", "acid_gas", "acid_ice"],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "chloride" },
+ categories: ["acids", "hydrogen_ion", "chloride", "caustic"],
+};
+
+let perchloricAcidTick = function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "explosion");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ return;
+ }
+ }
+};
+
+chemjsChemicals.perchloric_acid = {
+ elem: {
+ color: ["#ff963b", "#ca6800", "#c48a56"],
+ tick: perchloricAcidTick,
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ category: "liquids",
+ density: 1768,
+ stain: 0.01,
+ viscosity: 200,
+ hardness: 0.4,
+ hidden: true,
+ },
+ densityHigh: [1.63],
+ tempHigh: [75, 100],
+ stateHigh: [null, ["fire"]],
+ tempLow: [-112],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "perchlorate" },
+ categories: ["acids", "hydrogen_ion", "perchlorate", "caustic"],
+ ignore: ["fire", "smoke"],
+};
+
+elements.perchloric_acid_gas = {
+ tick: perchloricAcidTick,
+ behavior: behaviors.GAS,
+ category: "gases",
+ stain: 0.01,
+ hardness: 0.4,
+};
+
+chemjsChemicals.hydrobromic_acid = {
+ elem: {
+ color: ["#ff3b3b", "#ca0000", "#9e7b7b"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1100,
+ hidden: true,
+ },
+ tempHigh: [100, 1000],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [3.31],
+ tempLow: [0],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "bromide" },
+ categories: ["acids", "hydrogen_ion", "bromide", "caustic"],
+};
+elements.hydrobromic_acid_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.hydrogen_iodide = {
+ elem: {
+ color: "#aa8df2",
+ behavior: behaviors.GAS,
+ state: "gas",
+ category: "gases",
+ density: 2.85,
+ stain: 0.005,
+ },
+ densityLow: [2850],
+ tempLow: [-35.4, -50.8],
+ elementNames: ["chemical!hydroiodic_acid"],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "iodide" },
+ categories: ["hydrogen_ion", "iodide"],
+ toxic: [0.1],
+};
+
+chemjsChemicals.hydroiodic_acid = {
+ elem: {
+ color: ["#9670ff", "#da6afc", "#a77af5", "#9670ff", "#da6afc", "#a77af5", "#633a1d"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1150,
+ hidden: true,
+ },
+ tempHigh: [100, 1000],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [2.85],
+ tempLow: [0],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "iodide" },
+ categories: ["acids", "hydrogen_ion", "iodide", "caustic"],
+};
+elements.hydroiodic_acid_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.hydroastatic_acid = {
+ elem: {
+ color: [blendColors("#5a5e5a", "#ff0000", 0.25), blendColors("#5a5e5a", "#00ff00", 0.25), blendColors("#5a5e5a", "#0000ff", 0.25)],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1200,
+ hidden: true,
+ },
+ tempHigh: [100, 1000],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [8.62],
+ tempLow: [-3],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "astatide" },
+ categories: ["acids", "hydrogen_ion", "astatide", "caustic"],
+};
+elements.hydroastatic_acid_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.acids = {
+ elementNames: ["chemical!generic_acid"],
+ ignorable: true,
+};
+
+chemjsChemicals.acid_liquids = {
+ elementNames: ["chemical!acids,state!liquid"],
+};
+
+chemjsChemicals.acid_gases = {
+ elementNames: ["chemical!acids,state!gas"],
+};
+
+chemjsChemicals.caustic_ignore = {
+ elementNames: structuredClone(elements.acid.ignore).concat("chemical!caustic"),
+};
+
+chemjsChemicals.ignorable = {
+ elementNames: [],
+};
+
+//bases
+
+behaviors.CAUSTIC = ["XX|DB%5|XX", "DB%5|XX|DB%5", "DB%5 AND M2|DB%10 AND M1|DB%5 AND M2"];
+behaviors.MOLTEN_CAUSTIC = ["XX|DB%5 AND CR:fire%2.5|XX", "DB%5 AND M2|XX|DB%5 AND M2", "DB%5 AND M2|DB%10 AND M1|DB%5 AND M2"];
+
+chemjsChemicals.caustic = {
+ elementNames: [],
+ ignore: ["chemical!caustic_ignore"],
+ ignorable: true,
+};
+
+chemjsChemicals.generic_base = {
+ elem: {
+ color: "#d48092",
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1020,
+ hidden: true,
+ },
+ elemName: "base",
+ tempHigh: [110, 400],
+ stateHigh: ["base_gas", ["fire"]],
+ densityHigh: [1],
+ tempLow: [-10],
+ categories: ["caustic"],
+};
+elements.base_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+ state: "gas",
+};
+
+chemjsChemicals.sodium_hydride = {
+ elem: {
+ color: ["#9e9e9e", "#4f4f4f", "#616161", "#454545"],
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ state: "solid",
+ density: 1390,
+ hidden: true,
+ burn: 75,
+ burnTime: 120,
+ fireColor: "#ffff00",
+ },
+ tempHigh: [638],
+ stateHigh: [["sodium", "hydrogen"]],
+ reactionProduct: { anionBase: "hydride", cationBase: "sodium_ion" },
+ categories: ["bases", "sodium_ion", "hydride", "insoluble", "caustic"],
+ ignore: ["chemical!sodium", "chemical!hydrogen"],
+};
+
+chemjsChemicals.sodium_methoxide = {
+ elem: {
+ color: ["#c4c4c4", "#8c8c8c", "#ababab", "#787878"],
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ state: "solid",
+ density: 970,
+ hidden: true,
+ burn: 5,
+ burnTime: 100,
+ fireColor: "#ffff00",
+ },
+ tempHigh: [127],
+ reactionProduct: { anionBase: "methoxide", cationBase: "sodium_ion" },
+ categories: ["bases", "sodium_ion", "methoxide", "insoluble", "caustic"],
+ ignore: ["chemical!sodium", "chemical!methanol"],
+};
+elements.molten_sodium_methoxide = {
+ behavior: behaviors.MOLTEN_CAUSTIC,
+};
+
+chemjsChemicals.sodium_hydroxide_solution = {
+ elem: {
+ color: ["#fc3bff", "#c000ca", "#9b7b9e"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1050,
+ },
+ elemName: "sodium_hydroxide",
+ tempHigh: [100, 150],
+ stateHigh: [null, ["lye"]],
+ densityHigh: [1],
+ tempLow: [0],
+ reactionProduct: { anionBase: "hydroxide", cationBase: "sodium_ion" },
+ categories: ["base_solution"],
+};
+elements.sodium_hydroxide_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.sodium_hydroxide = {
+ elementNames: ["lye", "molten_lye", "chemical!sodium_hydroxide_solution"],
+ tempHigh: [323],
+ reactionProduct: { anionBase: "hydroxide", cationBase: "sodium_ion" },
+ categories: ["bases", "sodium_ion", "hydroxide", "caustic"],
+};
+elements.lye.behavior = behaviors.CAUSTIC;
+elements.molten_lye.behavior = behaviors.MOLTEN_CAUSTIC;
+
+chemjsChemicals.potassium_hydroxide_solution = {
+ elem: {
+ color: ["#3bc4ff", "#0062ca", "#7b949e"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1075,
+ },
+ elemName: "potassium_hydroxide",
+ tempHigh: [100, 150],
+ stateHigh: [null, ["caustic_potash"]],
+ densityHigh: [1],
+ tempLow: [0],
+ reactionProduct: { anionBase: "hydroxide", cationBase: "potassium_ion" },
+ categories: ["base_solution"],
+};
+elements.potassium_hydroxide_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.potassium_hydroxide = {
+ elementNames: ["caustic_potash", "molten_caustic_potash", "chemical!potassium_hydroxide_solution"],
+ reactionProduct: { anionBase: "hydroxide", cationBase: "potassium_ion" },
+ categories: ["bases", "potassium_ion", "hydroxide", "caustic"],
+};
+elements.caustic_potash.behavior = behaviors.CAUSTIC;
+elements.molten_caustic_potash = {
+ behavior: behaviors.MOLTEN_CAUSTIC,
+};
+
+chemjsChemicals.francium_hydroxide_solution = {
+ elem: {
+ color: [blendColors("#863bff", "#ff0000"), blendColors("#4d00ca", "#00ff00"), blendColors("#897b9e", "#0000ff")],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1200,
+ hidden: true,
+ },
+ elemName: "francium_hydroxide",
+ tempHigh: [100, 160],
+ stateHigh: [null, ["francium_hydroxide_powder"]],
+ densityHigh: [1],
+ tempLow: [0],
+ reactionProduct: { anionBase: "hydroxide", cationBase: "francium_ion" },
+ categories: ["base_solution"],
+};
+elements.francium_hydroxide_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.francium_hydroxide = {
+ elementNames: ["chemical!francium_hydroxide_solution"],
+ elem: {
+ color: [blendColors("#e8ede8", "#ff0000"), blendColors("#e8ede8", "#00ff00"), blendColors("#e8ede8", "#0000ff")],
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ state: "solid",
+ density: 5100 /*made up*/,
+ hidden: true,
+ },
+ elemName: "francium_hydroxide_powder",
+ tempHigh: [251], //made up
+ reactionProduct: { anionBase: "hydroxide", cationBase: "francium_ion" },
+ categories: ["bases", "francium_ion", "hydroxide", "caustic"],
+ ignore: ["fire", "smoke", "smog", "steam"],
+};
+elements.molten_francium_hydroxide_powder = {
+ behavior: behaviors.MOLTEN_CAUSTIC,
+};
+
+chemjsChemicals.ununennium_hydroxide_solution = {
+ elem: {
+ color: [blendColors("#eb3bff", "#ff0000"), blendColors("#eb3bff", "#00ff00"), blendColors("#eb3bff", "#0000ff")],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1200,
+ hidden: true,
+ },
+ elemName: "ununennium_hydroxide",
+ tempHigh: [100, 160],
+ stateHigh: [null, ["ununennium_hydroxide_powder"]],
+ densityHigh: [1],
+ tempLow: [0],
+ reactionProduct: { anionBase: "hydroxide", cationBase: "ununennium_i" },
+ categories: ["base_solution"],
+};
+elements.ununennium_hydroxide_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.ununennium_hydroxide = {
+ elementNames: ["chemical!ununennium_hydroxide_solution"],
+ elem: {
+ color: [blendColors("#c8cdc8", "#ff0000"), blendColors("#c8cdc8", "#00ff00"), blendColors("#c8cdc8", "#0000ff")],
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ state: "solid",
+ density: 5100 /*made up*/,
+ hidden: true,
+ },
+ elemName: "ununennium_hydroxide_powder",
+ tempHigh: [251], //made up
+ reactionProduct: { anionBase: "hydroxide", cationBase: "ununennium_i" },
+ categories: ["bases", "ununennium_i", "hydroxide", "caustic"],
+ ignore: ["fire", "smoke", "smog", "steam"],
+};
+elements.molten_ununennium_hydroxide_powder = {
+ behavior: behaviors.MOLTEN_CAUSTIC,
+};
+
+chemjsChemicals.red_mud = {
+ elem: {
+ color: ["#ab3d24", "#cc5d2d", "#a81b1b"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 5200,
+ viscosity: 1000000,
+ hidden: true,
+ },
+ tempHigh: [1600],
+ stateHigh: [null],
+ densityHigh: [3],
+ tempLow: [-10],
+ categories: ["bases", "caustic"],
+};
+elements.red_mud_gas = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ category: "gases",
+};
+
+chemjsChemicals.bases = {
+ elementNames: ["chemical!base_solution"],
+};
+
+chemjsChemicals.base_solution = {
+ elementNames: ["chemical!generic_base"],
+};
+
+chemjsChemicals.base_solution_liquids = {
+ elementNames: ["chemical!base_solution,state!liquid"],
+};
+
+chemjsChemicals.base_solution_gases = {
+ elementNames: ["chemical!base_solution,state!gas"],
+};
+
+chemjsChemicals.amphoteric = {
+ elementNames: [],
+};
+
+//salts
+
+chemjsChemicals.boron_trioxide = {
+ elem: {
+ color: "#c6c5c7",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 2550,
+ state: "solid",
+ fireColor: ["#34eb67", "#5ceb34"],
+ hidden: true,
+ },
+ tempHigh: [450],
+ categories: ["insoluble", "boron_ion", "oxide"],
+};
+
+chemjsChemicals.boric_acid = {
+ elem: {
+ color: "#fbffeb",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 1435,
+ state: "solid",
+ fireColor: ["#34eb67", "#5ceb34"],
+ },
+ tempHigh: [170],
+ reactionProduct: { cationAcid: "hydrogen_ion", cationBase: "boron_ion", anionAcid: "borate", anionBase: "hydroxide" },
+ categories: ["insoluble", "boron_ion", "hydroxide", "borate", "hydrogen_ion", "amphoteric"],
+};
+elements.molten_boric_acid = {
+ behavior: behaviors.LIQUID,
+};
+
+chemjsChemicals.ammonium_nitrate = {
+ elem: {
+ color: "#e6c3a1",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 1725,
+ },
+ tempHigh: [169.6],
+ stateHigh: [["fire"]],
+ elementNames: ["chemical!ammonium_nitrate_solution"],
+ reactionProduct: { salt_water: "ammonium_nitrate_solution", cation: "ammonium_ion", anion: "nitrate" },
+ categories: ["salt", "ammonium_ion", "nitrate"],
+};
+chemjsChemicals.ammonium_nitrate_solution = {
+ elem: {
+ color: blendColors("#e6c3a1", "#2167ff", 0.5),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1010,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "ammonium_nitrate"]],
+ reactionProduct: { salt: "ammonium_nitrate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.ammonium_chloride = {
+ elem: {
+ color: "#daeced",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 1519,
+ hidden: true,
+ },
+ tempHigh: [338],
+ stateHigh: [["ammonia", "acid_gas"]],
+ elementNames: ["chemical!ammonium_chloride_solution"],
+ reactionProduct: { salt_water: "ammonium_chloride_solution", cation: "ammonium_ion", anion: "chloride" },
+ categories: ["salt", "ammonium_ion", "chloride"],
+};
+chemjsChemicals.ammonium_chloride_solution = {
+ elem: {
+ color: ["#a299c7", "#7e76b3"],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1008,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "ammonium_chloride"]],
+ reactionProduct: { salt: "ammonium_chloride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.ammonium_perchlorate = {
+ elem: {
+ color: "#edcfca",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "weapons",
+ density: 1950,
+ burn: 100,
+ burnTime: 100,
+ burnInto: "big_explosion",
+ },
+ tempHigh: [200],
+ stateHigh: [["big_explosion"]],
+ elementNames: ["chemical!ammonium_perchlorate_solution"],
+ reactionProduct: { salt_water: "ammonium_perchlorate_solution", cation: "ammonium_ion", anion: "perchlorate" },
+ categories: ["salt", "ammonium_ion", "perchlorate"],
+};
+chemjsChemicals.ammonium_perchlorate_solution = {
+ elem: {
+ color: blendColors("#edcfca", "#2167ff", 0.5),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1020,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ burn: 1,
+ burnTime: 100,
+ burnInto: "big_explosion",
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "ammonium_perchlorate"]],
+ reactionProduct: { salt: "ammonium_perchlorate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_borate = {
+ elementNames: ["borax", "molten_borax"],
+ categories: ["insoluble", "borate", "sodium_ion"],
+};
+elements.borax.hidden = false;
+
+chemjsChemicals.sodium_borohydride = {
+ elem: {
+ color: ["#deded3", "#ebebc7", "#fcfced", "#d9d9d9"],
+ behavior: behaviors.CAUSTIC,
+ state: "solid",
+ category: "powders",
+ density: 1070,
+ fireColor: ["#34eb67", "#5ceb34"],
+ },
+ tempHigh: [400],
+ stateHigh: [["sodium_hydride", "sodium", "boron"]],
+ elementNames: ["chemical!sodium_borohydride_solution"],
+ reactionProduct: { salt_water: "sodium_borohydride_solution", cation: "sodium_ion", anion: "borohydride" },
+ categories: ["salt", "sodium_ion", "borohydride", "caustic"],
+ ignore: ["chemical!sodium", "chemical!hydrogen", "chemical!boron", "chemical!borohydride"],
+};
+
+chemjsChemicals.sodium_borohydride_solution = {
+ elem: {
+ color: ["#ababb7", "#9d9dc1", "#bdbdcb", "#a8a898"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1005,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_borohydride"]],
+ reactionProduct: { salt: "sodium_borohydride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_octahydrotriborate = {
+ elem: {
+ color: ["#ded3de", "#ebc7eb", "#fbedfb", "#e3cce3"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 1070 /*wild guess*/,
+ state: "solid",
+ fireColor: ["#ffff00", "#34eb67", "#5ceb34"],
+ burn: 5,
+ burnTime: 10,
+ burnInto: "boron_trioxide",
+ hidden: true,
+ },
+ tempHigh: [500], //wild guess
+ stateHigh: [["sodium_dodecaborate"]],
+ categories: ["insoluble", "sodium_ion", "octahydrotriborate"],
+};
+
+chemjsChemicals.sodium_dodecaborate = {
+ elem: {
+ color: "#f5aef5",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 1050 /*wild guess*/,
+ state: "solid",
+ fireColor: ["#ffff00", "#34eb67", "#5ceb34"],
+ burn: 1,
+ burnTime: 10,
+ burnInto: "boron_trioxide",
+ hidden: true,
+ },
+ tempHigh: [700], //wild guess
+ categories: ["insoluble", "sodium_ion", "dodecaborate"],
+};
+
+chemjsChemicals.sodium_bromoheptahydrotriborate = {
+ elem: {
+ color: ["#ded9d3", "#ebd9c7", "#fbf4ed", "#e3d5cc"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 1090 /*wild guess*/,
+ state: "solid",
+ fireColor: ["#ffff00", "#34eb67", "#5ceb34"],
+ burn: 5,
+ burnTime: 10,
+ burnInto: "boron_trioxide",
+ hidden: true,
+ },
+ tempHigh: [150], //wild guess
+ stateHigh: [["pentaborane_9", "sodium_bromide", "hydrogen"]],
+ categories: ["insoluble", "sodium_ion", "bromoheptahydrotriborate"],
+};
+
+chemjsChemicals.sodium_tetrafluoroborate = {
+ elem: {
+ color: ["#deded3", "#ebebc7", "#fcfced", "#d9d9d9"],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2470,
+ hidden: true,
+ fireColor: ["#34eb67", "#5ceb34"],
+ },
+ tempHigh: [384],
+ stateHigh: [["sodium_fluoride", "boron_trifluoride"]],
+ elementNames: ["chemical!sodium_tetrafluoroborate_solution"],
+ reactionProduct: { salt_water: "sodium_tetrafluoroborate_solution", cation: "sodium_ion", anion: "tetrafluoroborate" },
+ categories: ["salt", "sodium_ion", "tetrafluoroborate"],
+};
+
+chemjsChemicals.sodium_tetrafluoroborate_solution = {
+ elem: {
+ color: ["#ababb7", "#9d9dc1", "#bdbdcb", "#a8a898"],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1012,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_tetrafluoroborate"]],
+ reactionProduct: { salt: "sodium_tetrafluoroborate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_carbonate = {
+ elem: {
+ color: "#d8dae6",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2540,
+ hidden: true,
+ },
+ tempHigh: [851],
+ elementNames: ["chemical!sodium_carbonate_solution"],
+ reactionProduct: { salt_water: "sodium_carbonate_solution", cation: "sodium_ion", anion: "carbonate" },
+ categories: ["salt", "sodium_ion", "carbonate"],
+};
+
+chemjsChemicals.sodium_carbonate_solution = {
+ elem: {
+ color: ["#c5c1d6", "#afacc2"],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1010,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_carbonate"]],
+ reactionProduct: { salt: "sodium_carbonate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_bicarbonate = {
+ elementNames: ["chemical!sodium_bicarbonate_solution", "baking_soda"],
+ reactionProduct: { salt_water: "sodium_carbonate_solution", cation: "sodium_ion", anion: "bicarbonate", cationBase: "sodium_ion", anionBase: "bicarbonate" },
+ categories: ["salt", "sodium_ion", "bicarbonate", "bases"],
+};
+
+chemjsChemicals.sodium_bicarbonate_solution = {
+ elem: {
+ color: "#7494db",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1026,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "baking_soda"]],
+ reactionProduct: { salt: "baking_soda" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_acetate = {
+ elementNames: ["sodium_acetate", "molten_sodium_acetate", "chemical!sodium_acetate_solution"],
+ reactionProduct: { salt_water: "sodium_carbonate_solution", cation: "sodium_ion", anion: "acetate" },
+ categories: ["salt", "sodium_ion", "acetate"],
+};
+
+chemjsChemicals.sodium_acetate_solution = {
+ elem: {
+ color: "#7ea2f2",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1028,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_acetate"]],
+ reactionProduct: { salt: "sodium_acetate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_fluoride = {
+ elem: {
+ color: ["#8aebce", "#b9edde"],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2558,
+ hidden: true,
+ },
+ tempHigh: [993],
+ elementNames: ["chemical!sodium_fluoride_solution"],
+ reactionProduct: { salt_water: "sodium_fluoride_solution", cation: "sodium_ion", anion: "fluoride" },
+ categories: ["salt", "sodium_ion", "fluoride"],
+};
+
+chemjsChemicals.sodium_fluoride_solution = {
+ elem: {
+ color: ["#8ad0eb", "#b9e3ed"],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1012,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_fluoride"]],
+ reactionProduct: { salt: "sodium_fluoride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_aluminate = {
+ elem: {
+ color: ["#e6c9b3", "#ebc8ad"],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 1500,
+ hidden: true,
+ },
+ tempHigh: [1650],
+ elementNames: ["chemical!sodium_aluminate_solution"],
+ reactionProduct: { salt_water: "sodium_aluminate_solution", cation: "sodium_ion", anion: "aluminate" },
+ categories: ["salt", "sodium_ion", "aluminate"],
+};
+
+chemjsChemicals.sodium_aluminate_solution = {
+ elem: {
+ color: ["#bdb3e6", "#b4adeb"],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1005,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_aluminate"]],
+ reactionProduct: { salt: "sodium_aluminate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_hexafluoroaluminate = {
+ elemName: "cryolite",
+ elem: {
+ color: ["#9ab6d9", "#dae4f0"],
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 2900,
+ state: "solid",
+ },
+ tempHigh: [950],
+ categories: ["insoluble", "sodium_ion", "hexafluoroaluminate"],
+};
+
+chemjsChemicals.cryolite_mixture = {
+ elem: {
+ color: [blendColors("#9ab6d9", "#ebf4ff"), blendColors("#dae4f0", "#e3fdff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 2910,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [950],
+};
+
+chemjsChemicals.cryolite_solution = {
+ elem: {
+ color: [blendColors(blendColors("#9ab6d9", "#ebf4ff"), "#d1cbcb"), blendColors(blendColors("#dae4f0", "#e3fdff"), "#d1cbcb")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 2920,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [950],
+};
+
+chemjsChemicals.sodium_sulfate = {
+ elem: {
+ color: "#f3f2f5",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2664,
+ hidden: true,
+ },
+ tempHigh: [884],
+ elementNames: ["chemical!sodium_sulfate_solution"],
+ reactionProduct: { salt_water: "sodium_sulfate_solution", cation: "sodium_ion", anion: "sulfate" },
+ categories: ["salt", "sodium_ion", "sulfate"],
+ toxic: [0.02],
+};
+chemjsChemicals.sodium_sulfate_solution = {
+ elem: {
+ color: blendColors("#f3f2f5", "#2167ff", 0.5),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1013,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_sulfate"]],
+ reactionProduct: { salt: "sodium_sulfate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_chloride = {
+ elementNames: ["salt", "molten_salt", "chemical!sodium_chloride_solution"],
+ reactionProduct: { salt_water: "salt_water", cation: "sodium_ion", anion: "chloride" },
+ categories: ["salt", "sodium_ion", "chloride"],
+};
+chemjsChemicals.sodium_chloride_solution = {
+ elementNames: ["salt_water", "salt_ice"],
+ reactionProduct: { salt: "salt" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_chlorate = {
+ elem: {
+ color: "#cff0cc",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2490,
+ hidden: true,
+ },
+ tempHigh: [255],
+ stateHigh: [["oxygen", "salt"]],
+ elementNames: ["chemical!sodium_chlorate_solution"],
+ reactionProduct: { salt_water: "sodium_chlorate_solution", cation: "sodium_ion", anion: "chlorate" },
+ categories: ["salt", "sodium_ion", "chlorate"],
+ toxic: [0.02],
+};
+chemjsChemicals.sodium_chlorate_solution = {
+ elem: {
+ color: blendColors("#cff0cc", "#2167ff", 0.25),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1011,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_chlorate"]],
+ reactionProduct: { salt: "sodium_chlorate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.sodium_perchlorate = {
+ elem: {
+ color: "#c0d3be",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2499,
+ hidden: true,
+ },
+ tempHigh: [468],
+ stateHigh: [["oxygen", "salt", "fire"]],
+ elementNames: ["chemical!sodium_perchlorate_solution"],
+ reactionProduct: { salt_water: "sodium_perchlorate_solution", cation: "sodium_ion", anion: "perchlorate" },
+ categories: ["salt", "sodium_ion", "perchlorate"],
+ toxic: [0.02],
+};
+chemjsChemicals.sodium_perchlorate_solution = {
+ elem: {
+ color: blendColors("#c0d3be", "#2167ff", 0.25),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1011,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_perchlorate"]],
+ reactionProduct: { salt: "sodium_perchlorate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.magnesium_oxide = {
+ elem: {
+ color: "#f0f0f0",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 3600,
+ state: "solid",
+ },
+ tempHigh: [2852],
+ categories: ["insoluble", "magnesium_ion", "oxide"],
+};
+
+chemjsChemicals.magnesium_fluoride = {
+ elem: {
+ color: ["#aaabae", "#a9adae"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 3148,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [1263],
+ categories: ["insoluble", "magnesium_ion", "fluoride"],
+ toxic: [0.1],
+};
+
+chemjsChemicals.magnesium_sulfate = {
+ elementNames: ["epsom_salt", "molten_epsom_salt", "chemical!magnesium_sulfate_solution"],
+ reactionProduct: { salt_water: "epsom_salt_water", cation: "magnesium_ion", anion: "sulfate" },
+ categories: ["salt", "magnesium_ion", "sulfate"],
+};
+
+chemjsChemicals.magnesium_sulfate_solution = {
+ elemName: "epsom_salt_water",
+ elem: {
+ color: [blendColors("#f2f2f2", "#2167ff", 0.75), blendColors("#d6d6d6", "#2167ff", 0.75)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1015,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "epsom_salt"]],
+ reactionProduct: { salt: "epsom_salt" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.magnesium_chloride = {
+ elem: {
+ color: "#bfbfbf",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2320,
+ fireColor: "#f9ebff",
+ hidden: true,
+ },
+ tempHigh: [714],
+ elementNames: ["chemical!magnesium_chloride_solution"],
+ reactionProduct: { salt_water: "magnesium_chloride_solution", cation: "magnesium_ion", anion: "chloride" },
+ categories: ["salt", "magnesium_ion", "chloride"],
+};
+
+chemjsChemicals.magnesium_chloride_solution = {
+ elem: {
+ color: blendColors("#bfbfbf", "#2167ff", 0.75),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1015,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "magnesium_chloride"]],
+ reactionProduct: { salt: "magnesium_chloride" },
+ categories: ["salt_water"],
+};
+
+elements.molten_magnesium_chloride = {
+ behaviorOn: ["XX|CR:fire%2.5|XX", "M2|CH:chlorine,magnesium%25|M2", "M1|M1|M1"],
+ conduct: 0.3,
+};
+
+chemjsChemicals.bauxite = {
+ elem: {
+ color: ["#915a30", "#cc7533"],
+ behavior: behaviors.SUPPORTPOWDER,
+ category: "land",
+ state: "solid",
+ density: 2420,
+ },
+ tempHigh: [300],
+};
+
+chemjsChemicals.bauxite_solution = {
+ elemName: "bauxite_slurry",
+ elem: {
+ color: ["#696380", "#7a759e"],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1005,
+ hidden: true,
+ conduct: 0.05,
+ stain: 0.33,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["sodium_aluminate", "sodium_aluminate", "sodium_aluminate", "gallium", "steam", "steam", "steam", "steam"]],
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.aluminum_hydroxide = {
+ elem: {
+ color: "#d1cbcb",
+ behavior: behaviors.STURDYPOWDER,
+ category: "powders",
+ density: 2420,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [300],
+ stateHigh: [["alumina", "steam"]],
+ categories: ["insoluble", "aluminum_ion", "hydroxide"],
+};
+
+chemjsChemicals.aluminum_oxide = {
+ elemName: "alumina",
+ elem: {
+ color: "#ebe1e1",
+ behavior: behaviors.STURDYPOWDER,
+ category: "powders",
+ density: 3987,
+ state: "solid",
+ },
+ tempHigh: [2072],
+ categories: ["insoluble", "aluminum_ion", "oxide"],
+};
+
+chemjsChemicals.aluminum_fluoride = {
+ elem: {
+ color: "#ebe1e1",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 3100,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [1290],
+ stateHigh: [["aluminum_fluoride_gas"]],
+ categories: ["insoluble", "aluminum_ion", "fluoride"],
+};
+
+elements.aluminum_fluoride_gas = {
+ color: "#ffff70",
+ behavior: behaviors.GAS,
+ state: "gas",
+ category: "gases",
+ density: 3.491,
+ hidden: true,
+};
+
+chemjsChemicals.potassium_carbonate = {
+ elem: {
+ color: "#e2e1e8",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2430,
+ hidden: true,
+ },
+ tempHigh: [891],
+ elementNames: ["chemical!potassium_carbonate_solution"],
+ reactionProduct: { salt_water: "potassium_carbonate_solution", cation: "potassium_ion", anion: "carbonate" },
+ categories: ["salt", "potassium_ion", "carbonate"],
+};
+
+chemjsChemicals.potassium_carbonate_solution = {
+ elem: {
+ color: blendColors("#e2e1e8", "#2167ff", 0.75),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1024,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "potassium_carbonate"]],
+ reactionProduct: { salt: "potassium_carbonate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.potassium_nitrate = {
+ elemName: "niter",
+ elem: {
+ color: "#f0efcc",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2109,
+ },
+ tempHigh: [334],
+ stateHigh: [["fire"]],
+ elementNames: ["chemical!potassium_nitrate_solution"],
+ reactionProduct: { salt_water: "potassium_nitrate_solution", cation: "potassium_ion", anion: "nitrate" },
+ categories: ["salt", "potassium_ion", "nitrate"],
+};
+
+chemjsChemicals.potassium_nitrate_solution = {
+ elemName: "niter_solution",
+ elem: {
+ color: blendColors("#f0efcc", "#2167ff", 0.75),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1011,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "potassium_nitrate"]],
+ reactionProduct: { salt: "potassium_nitrate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.potassium_fluoride = {
+ elem: {
+ color: "#e8e8e1",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2480,
+ hidden: true,
+ },
+ tempHigh: [858],
+ elementNames: ["chemical!potassium_fluoride_solution"],
+ reactionProduct: { salt_water: "potassium_fluoride_solution", cation: "potassium_ion", anion: "fluoride" },
+ categories: ["salt", "potassium_ion", "fluoride"],
+};
+
+chemjsChemicals.potassium_fluoride_solution = {
+ elem: {
+ color: blendColors("#e8e8e1", "#2167ff", 0.75),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1020,
+ hidden: true,
+ conduct: 0.5,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "potassium_fluoride"]],
+ reactionProduct: { salt: "potassium_fluoride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.potassium_sulfate = {
+ elem: {
+ color: "#f0d8cc",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2660,
+ hidden: true,
+ },
+ tempHigh: [1069],
+ elementNames: ["chemical!potassium_sulfate_solution"],
+ reactionProduct: { salt_water: "potassium_sulfate_solution", cation: "potassium_ion", anion: "sulfate" },
+ categories: ["salt", "potassium_ion", "sulfate"],
+};
+
+chemjsChemicals.potassium_sulfate_solution = {
+ elemName: "niter_solution",
+ elem: {
+ color: blendColors("#f0d8cc", "#2167ff", 0.75),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1012,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "potassium_sulfate"]],
+ reactionProduct: { salt: "potassium_sulfate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.potassium_chloride = {
+ elementNames: ["potassium_salt", "molten_potassium_salt", "chemical!potassium_chloride_solution"],
+ reactionProduct: { salt_water: "salt_water", cation: "potassium_ion", anion: "chloride" },
+ categories: ["salt", "potassium_ion", "chloride"],
+};
+
+chemjsChemicals.potassium_chloride_solution = {
+ elem: {
+ color: "#416ed1",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1026,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ elemName: "potassium_salt_water",
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "potassium_salt"]],
+ reactionProduct: { salt: "potassium_salt" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.calcium_oxide = {
+ elementNames: ["quicklime"],
+ categories: ["insoluble", "calcium_ion", "oxide"],
+};
+
+chemjsChemicals.calcium_hydroxide = {
+ elementNames: ["slaked_lime"],
+ reactionProduct: { cation: "calcium_ion", anion: "hydroxide", cationBase: "calcium_ion", anionBase: "hydroxide" },
+ categories: ["insoluble", "calcium_ion", "hydroxide", "bases"],
+};
+
+chemjsChemicals.calcium_fluoride = {
+ elemName: "fluorite",
+ elem: {
+ color: ["#8fc4f2", "#d0e5f7"],
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 3180,
+ state: "solid",
+ },
+ tempHigh: [1418],
+ categories: ["insoluble", "calcium_ion", "fluoride"],
+};
+
+chemjsChemicals.apatite = {
+ elem: {
+ color: ["#48b593", "#3adec0", "#29c4cc"],
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 3160,
+ state: "solid",
+ },
+ tempHigh: [1670],
+};
+
+chemjsChemicals.tricalcium_phosphate = {
+ elem: {
+ color: "#b9e9ed",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 3140,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [1670],
+ categories: ["insoluble", "calcium_ion", "phosphate"],
+};
+
+chemjsChemicals.calcium_sulfate = {
+ elemName: "chalk",
+ elem: {
+ color: ["#e0e0e0", "#bfbfbf"],
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 2320,
+ state: "solid",
+ stain: 0.05,
+ },
+ tempHigh: [1460],
+ categories: ["insoluble", "calcium_ion", "sulfate"],
+};
+
+chemjsChemicals.titanium_dioxide = {
+ elemName: "rutile",
+ elem: {
+ color: "#522614",
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 4240,
+ state: "solid",
+ },
+ tempHigh: [1843],
+ categories: ["insoluble", "titanium_iv", "oxide"],
+};
+
+chemjsChemicals.titanium_trichloride = {
+ elem: {
+ color: "#c71585",
+ behavior: behaviors.WALL,
+ state: "solid",
+ category: "solids",
+ density: 2640,
+ burn: 20,
+ fireColor: "#f9ebff",
+ },
+ tempHigh: [440],
+ stateHigh: [["titanium_tetrachloride", "fire"]],
+ elementNames: ["chemical!titanium_trichloride_solution"],
+ reactionProduct: { salt_water: "titanium_trichloride_solution", cation: "titanium_iii", anion: "chloride" },
+ toxic: [0.1],
+ categories: ["salt", "titanium_iii", "chloride"],
+};
+
+chemjsChemicals.titanium_trichloride_solution = {
+ elem: {
+ color: blendColors("#c71585", "#2167ff", 0.4),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1020,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "titanium_trichloride"]],
+ reactionProduct: { salt: "titanium_trichloride" },
+ toxic: [0.1],
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.iron_dichloride = {
+ elem: {
+ color: ["#207d09", "#b51259"],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2900,
+ },
+ tempHigh: [307.6],
+ elementNames: ["chemical!iron_dichloride_solution"],
+ reactionProduct: { salt_water: "iron_dichloride_solution", cation: "iron_ii", anion: "chloride" },
+ categories: ["salt", "iron_ii", "chloride"],
+};
+chemjsChemicals.iron_dichloride_solution = {
+ elem: {
+ color: [blendColors("#207d09", "#2167ff", 0.5), blendColors("#b51259", "#2167ff", 0.5)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1030,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "iron_dichloride"]],
+ reactionProduct: { salt: "iron_dichloride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.copper_sulfate = {
+ elementNames: ["copper_sulfate", "molten_copper_sulfate"],
+ categories: ["insoluble", "copper_ii", "sulfate"],
+};
+
+chemjsChemicals.sodium_bromide = {
+ elem: {
+ color: ["#f5f4ed", "#f2f2eb"],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 3210,
+ },
+ tempHigh: [747],
+ elementNames: ["chemical!sodium_bromide_solution"],
+ reactionProduct: { salt_water: "sodium_bromide_solution", cation: "sodium_ion", anion: "bromide" },
+ categories: ["salt", "sodium_ion", "bromide"],
+};
+chemjsChemicals.sodium_bromide_solution = {
+ elem: {
+ color: blendColors("#f5f4ed", "#2167ff", 0.75),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1040,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "sodium_bromide"]],
+ reactionProduct: { salt: "sodium_bromide" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.potassium_bromide = {
+ elem: {
+ color: ["#fccaca", "#f7cbcb"],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2740,
+ },
+ tempHigh: [734],
+ elementNames: ["chemical!potassium_bromide_solution"],
+ reactionProduct: { salt_water: "potassium_bromide_solution", cation: "potassium_ion", anion: "bromide" },
+ categories: ["salt", "potassium_ion", "bromide"],
+};
+chemjsChemicals.potassium_bromide_solution = {
+ elem: {
+ color: blendColors("#fccaca", "#2167ff", 0.75),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1050,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "potassium_bromide"]],
+ reactionProduct: { salt: "potassium_bromide" },
+ categories: ["salt_water"],
+};
+
+let silverBromideTick = function (pixel) {
+ for (let i = -1; i <= 1; i++) {
+ for (let j = -1; j <= 1; j++) {
+ if (!isEmpty(pixel.x + i, pixel.y + j, true) && Math.random() < 0.1 && (pixelMap[pixel.x + i][pixel.y + j].element === "light" || pixelMap[pixel.x + i][pixel.y + j].element === "laser" || pixelMap[pixel.x + i][pixel.y + j].element === "liquid_light")) {
+ let coords = circleCoords(pixel.x + i, pixel.y + j, 20);
+ for (var n = 0; n < coords.length; n++) {
+ let k = coords[n].x;
+ let l = coords[n].y;
+ let distance = (k - pixel.x - i) * (k - pixel.x - i) + (l - pixel.y - j) * (l - pixel.y - j);
+ if (!isEmpty(k, l, true) && pixelMap[k][l].element === "silver_bromide") {
+ if (distance <= 0) {
+ console.log("silver bromide broke");
+ }
+ let rgb = hexToRGB(blendColors(RGBToHex2(toObject(pixelMap[k][l].color)), RGBToHex2(toObject(pixelMap[pixel.x + i][pixel.y + j].color)), 10 / (10 + distance)));
+ pixelMap[k][l].color = "rgb(" + rgb.r + "," + rgb.g + "," + rgb.b + ")";
+ //pixelMap[k][l].color = pixelColorPick(pixelMap[k][l],blendColors(RGBToHex2(toObject(pixelMap[k][l].color)),RGBToHex2(toObject(pixelMap[pixel.x+i][pixel.y+j].color)),1/distance));
+ }
+ }
+ if (pixelMap[pixel.x + i][pixel.y + j].element === "light" || pixelMap[pixel.x + i][pixel.y + j].element === "laser") {
+ deletePixel(pixel.x + i, pixel.y + j);
+ }
+ }
+ }
+ }
+};
+
+chemjsChemicals.silver_nitrate = {
+ elem: {
+ color: ["#cad7fc", "#cbd2f7"],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 4350,
+ hidden: true,
+ },
+ tempHigh: [209, 440],
+ stateHigh: [null, ["silver", "nitrogen_dioxide", "oxygen", "fire"]],
+ elementNames: ["chemical!silver_nitrate_solution"],
+ reactionProduct: { salt_water: "silver_nitrate_solution", cation: "silver_i", anion: "nitrate" },
+ categories: ["salt", "silver_i", "nitrate"],
+ toxic: [0.1],
+};
+chemjsChemicals.silver_nitrate_solution = {
+ elem: {
+ color: blendColors("#cad7fc", "#2167ff", 0.5),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1060,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "silver_nitrate"]],
+ reactionProduct: { salt: "silver_nitrate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.silver_bromide = {
+ elem: {
+ color: ["#fcfcca", "#f7f24f"],
+ tick: silverBromideTick,
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 6470,
+ state: "solid",
+ },
+ tempHigh: [430],
+ categories: ["insoluble", "silver_i", "bromide"],
+};
+
+chemjsChemicals.indium_nitrate = {
+ elem: {
+ color: "#eddaf5",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 4380,
+ hidden: true,
+ },
+ tempHigh: [150],
+ stateHigh: [["indium_oxide", "nitrogen_dioxide", "fire"]],
+ elementNames: ["chemical!indium_nitrate_solution"],
+ reactionProduct: { salt_water: "indium_nitrate_solution", cation: "indium_iii", anion: "nitrate" },
+ categories: ["salt", "indium_iii", "nitrate"],
+ toxic: [0.1],
+};
+chemjsChemicals.indium_nitrate_solution = {
+ elem: {
+ color: blendColors("#eddaf5", "#2167ff", 0.5),
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1050,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "indium_nitrate"]],
+ reactionProduct: { salt: "indium_nitrate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.indium_oxide = {
+ elem: {
+ color: "#ebc7e4",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 7179,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [1910],
+ categories: ["insoluble", "indium_iii", "oxide"],
+};
+
+chemjsChemicals.indium_hydroxide = {
+ elem: {
+ color: "#e3f294",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 4380,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [150],
+ stateHigh: [["indium_oxide", "steam"]],
+ categories: ["insoluble", "indium_iii", "hydroxide"],
+ toxic: [0.02],
+};
+
+chemjsChemicals.indium_chloride = {
+ elem: {
+ color: "#f8ebff",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 3460,
+ hidden: true,
+ },
+ tempHigh: [586],
+ elementNames: ["chemical!indium_chloride_solution"],
+ reactionProduct: { salt_water: "indium_chloride_solution", cation: "indium_iii", anion: "chloride" },
+ categories: ["salt", "indium_iii", "chloride"],
+};
+chemjsChemicals.indium_chloride_solution = {
+ elem: {
+ color: "#7e70ff",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1030,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "indium_chloride"]],
+ reactionProduct: { salt: "indium_chloride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.thallium_oxide = {
+ elem: {
+ color: "#2b2b2a",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 10450,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [596],
+ categories: ["insoluble", "thallium_i", "oxide"],
+ toxic: [0.2],
+};
+
+chemjsChemicals.thallium_hydroxide = {
+ elem: {
+ color: ["#f0f564", "#f7ee45"],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 7440,
+ hidden: true,
+ },
+ tempHigh: [139],
+ stateHigh: [["thallium_oxide", "steam"]],
+ elementNames: ["chemical!thallium_hydroxide_solution"],
+ reactionProduct: { salt_water: "thallium_hydroxide_solution", cation: "thallium_i", anion: "hydroxide" },
+ categories: ["salt", "thallium_i", "hydroxide"],
+ toxic: [0.2],
+};
+chemjsChemicals.thallium_hydroxide_solution = {
+ elem: {
+ color: "#a4c244",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1035,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "thallium_hydroxide"]],
+ reactionProduct: { salt: "thallium_hydroxide" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.thallium_sulfide = {
+ elem: {
+ color: "#20201f",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 8390,
+ state: "solid",
+ hidden: true,
+ conduct: 0.5,
+ },
+ tempHigh: [448],
+ categories: ["insoluble", "thallium_i", "sulfide"],
+ toxic: [0.2],
+};
+
+chemjsChemicals.thallium_sulfate = {
+ elem: {
+ color: "#fafaf0",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 6770,
+ hidden: true,
+ },
+ tempHigh: [632],
+ elementNames: ["chemical!thallium_sulfate_solution"],
+ reactionProduct: { salt_water: "thallium_sulfate_solution", cation: "thallium_i", anion: "sulfate" },
+ categories: ["salt", "thallium_i", "sulfate"],
+ toxic: [0.2],
+};
+chemjsChemicals.thallium_sulfate_solution = {
+ elem: {
+ color: "#23ccbe",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1032,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "thallium_sulfate"]],
+ reactionProduct: { salt: "thallium_sulfate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.polonium_dioxide = {
+ elem: {
+ color: [blendColors("#ffff7f", "#ff0000"), blendColors("#ffff7f", "#00ff00"), blendColors("#ffff7f", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 8900,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [500],
+ categories: ["insoluble", "polonium_iv", "oxide"],
+};
+
+chemjsChemicals.magnesium_polonide = {
+ elem: {
+ color: [blendColors("#b5b5b5", "#ff0000", 0.25), blendColors("#b5b5b5", "#00ff00", 0.25), blendColors("#b5b5b5", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1800],
+ elementNames: ["chemical!magnesium_polonide_solution"],
+ reactionProduct: { salt_water: "magnesium_polonide_solution", cation: "magnesium_ion", anion: "polonide" },
+ categories: ["salt", "magnesium_ion", "polonide"],
+};
+
+chemjsChemicals.magnesium_polonide_solution = {
+ elem: {
+ color: [blendColors("#2167ff", "#ff0000", 0.25), blendColors("#2167ff", "#00ff00", 0.25), blendColors("#2167ff", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1050,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "magnesium_polonide"]],
+ reactionProduct: { salt: "magnesium_polonide" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.francium_nihonide = {
+ elem: {
+ color: [blendColors("#d6d3a9", "#ff0000"), blendColors("#d6d3a9", "#00ff00"), blendColors("#d6d3a9", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 13700,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [1920], //made up
+ categories: ["francium_ion", "nihonide", "insoluble"],
+ toxic: [0.1],
+};
+
+chemjsChemicals.radium_oxide = {
+ elem: {
+ color: [blendColors("#b2d9d9", "#ff0000", 0.25), blendColors("#b2d9d9", "#00ff00", 0.25), blendColors("#b2d9d9", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 12000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [1700],
+ categories: ["insoluble", "radium_ion", "oxide"],
+};
+chemjsChemicals.radium_hydroxide = {
+ elem: {
+ color: [blendColors("#f2fafa", "#ff0000", 0.25), blendColors("#f2fafa", "#00ff00", 0.25), blendColors("#f2fafa", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 12000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [600],
+ stateHigh: [["radium_oxide"]],
+ reactionProduct: { cation: "radium_ion", anion: "hydroxide", cationBase: "radium_ion", anionBase: "hydroxide" },
+ categories: ["insoluble", "radium_ion", "hydroxide", "bases"],
+};
+
+chemjsChemicals.radium_chloride = {
+ elem: {
+ color: [blendColors("#faf3de", "#ff0000", 0.25), blendColors("#faf3de", "#00ff00", 0.25), blendColors("#faf3de", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 4900,
+ hidden: true,
+ },
+ tempHigh: [900],
+ elementNames: ["chemical!radium_chloride_solution"],
+ reactionProduct: { salt_water: "radium_chloride_solution", cation: "radium_ion", anion: "chloride" },
+ categories: ["salt", "radium_ion", "chloride"],
+};
+
+chemjsChemicals.radium_chloride_solution = {
+ elem: {
+ color: [blendColors("#8eadef", "#ff0000", 0.25), blendColors("#8eadef", "#00ff00", 0.25), blendColors("#8eadef", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1050,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "radium_chloride"]],
+ reactionProduct: { salt: "radium_chloride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.actinium_oxide = {
+ elem: {
+ color: [blendColors("#ebf5f5", "#ff0000", 0.25), blendColors("#ebf5f5", "#00ff00", 0.25), blendColors("#ebf5f5", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 12000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [2327],
+ categories: ["insoluble", "actinium_ion", "oxide"],
+};
+chemjsChemicals.actinium_hydroxide = {
+ elem: {
+ color: [blendColors("#f2cef2", "#ff0000", 0.25), blendColors("#f2cef2", "#00ff00", 0.25), blendColors("#f2cef2", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 12000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [600],
+ stateHigh: [["actinium_oxide"]],
+ reactionProduct: { cation: "actinium_ion", anion: "hydroxide", cationBase: "actinium_ion", anionBase: "hydroxide" },
+ categories: ["insoluble", "actinium_ion", "hydroxide", "bases"],
+};
+
+chemjsChemicals.thorium_dioxide = {
+ elementNames: [],
+ categories: ["oxide", "insoluble"],
+ reactionProduct: { anion: "oxide" },
+};
+
+chemjsChemicals.unstable_thorium_dioxide = {
+ elem: {
+ color: ["#313331", "#1a1a18", "#171717", "#24231d", "#262622", "#171613"],
+ behavior: ["XX|CR:radiation%0.01|XX", "CR:radiation%0.01|XX|CR:radiation%0.01", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 10000,
+ },
+ tempHigh: [2865],
+ elemName: "thorium_dioxide",
+ stateHigh: ["molten_thorium_dioxide"],
+ categories: ["unstable_thorium_iv", "unstable_thorium", "thorium_dioxide"],
+ reactionProduct: { isotope: "unstable_thorium", cation: "unstable_thorium_iv" },
+};
+elements.molten_thorium_dioxide = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.01|XX", "M2 AND CR:radiation%0.01|XX|M2 AND CR:radiation%0.01", "M1|M1|M1"],
+};
+
+chemjsChemicals.stable_thorium_dioxide = {
+ elem: {
+ color: [blendColors("#313331", "#ff0000"), blendColors("#1a1a18", "#00ff00"), blendColors("#171717", "#0000ff"), blendColors("#24231d", "#ff0000"), blendColors("#262622", "#00ff00"), blendColors("#171613", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 10000,
+ hidden: true,
+ },
+ tempHigh: [2865],
+ elemName: "stable_thorium_dioxide",
+ stateHigh: ["molten_stable_thorium_dioxide"],
+ categories: ["stable_thorium_iv", "stable_thorium", "thorium_dioxide"],
+ reactionProduct: { isotope: "stable_thorium", cation: "stable_thorium_iv" },
+};
+
+chemjsChemicals.thorium_tetrafluoride = {
+ elementNames: [],
+ categories: ["fluoride", "insoluble"],
+ reactionProduct: { anion: "fluoride" },
+};
+
+chemjsChemicals.unstable_thorium_tetrafluoride = {
+ elem: {
+ color: "#e5e6e5",
+ behavior: ["XX|CR:radiation%0.01|XX", "CR:radiation%0.01|XX|CR:radiation%0.01", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 6300,
+ hidden: true,
+ },
+ tempHigh: [1110],
+ elemName: "thorium_tetrafluoride",
+ stateHigh: ["molten_thorium_tetrafluoride"],
+ categories: ["unstable_thorium_iv", "unstable_thorium", "thorium_tetrafluoride"],
+ reactionProduct: { isotope: "unstable_thorium", cation: "unstable_thorium_iv" },
+};
+elements.molten_thorium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.01|XX", "M2 AND CR:radiation%0.01|XX|M2 AND CR:radiation%0.01", "M1|M1|M1"],
+};
+
+chemjsChemicals.stable_thorium_tetrafluoride = {
+ elem: {
+ color: [blendColors("#e5e6e5", "#ff0000"), blendColors("#e5e6e5", "#00ff00"), blendColors("#e5e6e5", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 6300,
+ hidden: true,
+ },
+ tempHigh: [1110],
+ elemName: "stable_thorium_tetrafluoride",
+ stateHigh: ["molten_stable_thorium_tetrafluoride"],
+ categories: ["stable_thorium_iv", "stable_thorium", "thorium_tetrafluoride"],
+ reactionProduct: { isotope: "stable_thorium", cation: "stable_thorium_iv" },
+};
+
+chemjsChemicals.protactinium_v_oxide = {
+ elem: {
+ color: [blendColors("#353b3b", "#ff0000", 0.25), blendColors("#353b3b", "#00ff00", 0.25), blendColors("#353b3b", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 12000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [2500],
+ categories: ["insoluble", "protactinium_v", "oxide"],
+};
+chemjsChemicals.protactinium_hydroxide = {
+ elem: {
+ color: [blendColors("#95c7c7", "#ff0000", 0.25), blendColors("#95c7c7", "#00ff00", 0.25), blendColors("#95c7c7", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 12000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [350],
+ stateHigh: [["protactinium_v_oxide"]],
+ reactionProduct: { cation: "protactinium_v", anion: "hydroxide", cationBase: "protactinium_v", anionBase: "hydroxide" },
+ categories: ["insoluble", "protactinium_v", "hydroxide", "bases"],
+};
+chemjsChemicals.protactinium_v_fluoride = {
+ elem: {
+ color: [blendColors("#cbf2ec", "#ff0000", 0.25), blendColors("#cbf2ec", "#00ff00", 0.25), blendColors("#cbf2ec", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 9000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [2600],
+ categories: ["insoluble", "protactinium_v", "fluoride"],
+ toxic: [0.1],
+};
+
+chemjsChemicals.uraninite = {
+ elem: {
+ color: ["#545323", "#50573b", "#656660", "#4d4933", "#615e4a", "#525043"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ category: "land",
+ state: "solid",
+ density: 10970,
+ },
+ tempHigh: [2865],
+};
+
+chemjsChemicals.yellowcake = {
+ elem: {
+ color: ["#dbd827", "#bce346", "#a8c418", "#d9bb1a", "#dec418", "#cfb615"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 8300,
+ },
+ tempHigh: [1150],
+};
+
+chemjsChemicals.yellowcake_solution = {
+ elem: {
+ color: ["#d2ed6f"],
+ 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"],
+ category: "liquids",
+ state: "liquid",
+ density: 1850,
+ viscosity: 26.7,
+ hidden: true,
+ },
+ tempHigh: [337],
+ stateHigh: [["sulfuric_acid_gas", "yellowcake"]],
+ densityHigh: [1.26],
+ tempLow: [10],
+ categories: ["acids", "caustic"],
+ ignore: ["chemical!sulfate", "radiation", "yellowcake", "uraninite"],
+};
+
+chemjsChemicals.uranium_dioxide = {
+ elementNames: [],
+ categories: ["oxide", "insoluble"],
+ reactionProduct: { anion: "oxide" },
+};
+
+chemjsChemicals.mixed_uranium_dioxide = {
+ elem: {
+ color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 10970,
+ },
+ tempHigh: [2865],
+ elemName: "uranium_dioxide",
+ stateHigh: ["molten_uranium_dioxide"],
+ categories: ["mixed_uranium_iv", "mixed_uranium", "uranium_dioxide"],
+ reactionProduct: { isotope: "mixed_uranium", cation: "mixed_uranium_iv" },
+};
+
+elements.molten_uranium_dioxide = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+};
+
+chemjsChemicals.uranium_238_dioxide = {
+ elem: {
+ color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 10970,
+ hidden: true,
+ },
+ tempHigh: [2865],
+ elemName: "depleted_uranium_dioxide",
+ stateHigh: ["molten_depleted_uranium_dioxide"],
+ categories: ["uranium_238_iv", "uranium_238", "uranium_dioxide"],
+ reactionProduct: { isotope: "uranium_238", cation: "uranium_238_iv" },
+};
+
+chemjsChemicals.uranium_235_dioxide = {
+ elem: {
+ color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 10970,
+ excludeRandom: true,
+ hidden: true,
+ },
+ tempHigh: [2865],
+ elemName: "enriched_uranium_dioxide",
+ stateHigh: ["molten_enriched_uranium_dioxide"],
+ categories: ["uranium_235_iv", "uranium_235", "uranium_dioxide"],
+ reactionProduct: { isotope: "uranium_235", cation: "uranium_235_iv" },
+};
+
+elements.molten_enriched_uranium_dioxide = {
+ excludeRandom: true,
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.25|XX", "M2 AND CR:radiation%0.25|XX|M2 AND CR:radiation%0.25", "M1|M1|M1"],
+};
+
+chemjsChemicals.stable_uranium_dioxide = {
+ elem: {
+ color: [blendColors("#474744", "#ff0000"), blendColors("#21211f", "#00ff00"), blendColors("#2b2b2b", "#0000ff"), blendColors("#9c998c", "#ff0000"), blendColors("#40403f", "#00ff00"), blendColors("#24231d", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 10970,
+ hidden: true,
+ },
+ tempHigh: [2865],
+ stateHigh: ["molten_stable_uranium_dioxide"],
+ categories: ["stable_uranium_iv", "stable_uranium", "uranium_dioxide"],
+ reactionProduct: { isotope: "stable_uranium", cation: "stable_uranium_iv" },
+};
+
+chemjsChemicals.uranium_tetrafluoride = {
+ elementNames: [],
+ categories: ["fluoride", "insoluble"],
+ reactionProduct: { anion: "fluoride" },
+ toxic: [0.1],
+};
+
+chemjsChemicals.mixed_uranium_tetrafluoride = {
+ elem: {
+ color: ["#495747", "#394d38", "#5a7859"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1036],
+ elemName: "uranium_tetrafluoride",
+ stateHigh: ["molten_uranium_tetrafluoride"],
+ categories: ["mixed_uranium_iv", "mixed_uranium", "uranium_tetrafluoride"],
+ reactionProduct: { isotope: "mixed_uranium", cation: "mixed_uranium_iv" },
+};
+
+elements.molten_uranium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+};
+
+chemjsChemicals.uranium_238_tetrafluoride = {
+ elem: {
+ color: ["#495747", "#394d38", "#5a7859"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1036],
+ elemName: "depleted_uranium_tetrafluoride",
+ stateHigh: ["molten_depleted_uranium_tetrafluoride"],
+ categories: ["uranium_238_iv", "uranium_238", "uranium_tetrafluoride"],
+ reactionProduct: { isotope: "uranium_238", cation: "uranium_238_iv" },
+};
+
+chemjsChemicals.uranium_235_tetrafluoride = {
+ elem: {
+ color: ["#495747", "#394d38", "#5a7859"],
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1036],
+ elemName: "enriched_uranium_tetrafluoride",
+ stateHigh: ["molten_enriched_uranium_tetrafluoride"],
+ categories: ["uranium_235_iv", "uranium_235", "uranium_tetrafluoride"],
+ reactionProduct: { isotope: "uranium_235", cation: "uranium_235_iv" },
+};
+
+elements.molten_enriched_uranium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.25|XX", "M2 AND CR:radiation%0.25|XX|M2 AND CR:radiation%0.25", "M1|M1|M1"],
+};
+
+chemjsChemicals.stable_uranium_tetrafluoride = {
+ elem: {
+ color: [blendColors("#495747", "#ff0000"), blendColors("#394d38", "#00ff00"), blendColors("#5a7859", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1036],
+ stateHigh: ["molten_stable_uranium_tetrafluoride"],
+ categories: ["stable_uranium_iv", "stable_uranium", "uranium_tetrafluoride"],
+ reactionProduct: { isotope: "stable_uranium", cation: "stable_uranium_iv" },
+};
+
+chemjsChemicals.uranium_hexafluoride = {
+ elementNames: [],
+ categories: ["fluoride", "insoluble"],
+ reactionProduct: { anion: "fluoride" },
+ toxic: [0.2],
+};
+
+chemjsChemicals.mixed_uranium_hexafluoride = {
+ elem: {
+ color: "#f7fff7",
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 5090,
+ hidden: true,
+ },
+ tempHigh: [56.5],
+ elemName: "uranium_hexafluoride",
+ stateHigh: ["uranium_hexafluoride_gas"],
+ categories: ["mixed_uranium_vi", "mixed_uranium", "uranium_hexafluoride"],
+ reactionProduct: { isotope: "mixed_uranium", cation: "mixed_uranium_vi" },
+};
+
+uraniumHexafluorideCentrifuge = function (pixel) {
+ if (Math.random() < 0.05) {
+ if (Math.random() < 0.8) {
+ changePixel(pixel, "depleted_uranium_hexafluoride");
+ } else {
+ changePixel(pixel, "enriched_uranium_hexafluoride");
+ }
+ }
+};
+gasTick = function (pixel) {
+ pixelTick(pixel, elements[pixel.element].behavior2);
+};
+
+elements.uranium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.05", "XX"],
+ ["CR:radiation%0.05", "XX", "CR:radiation%0.05"],
+ ["XX", "CR:radiation%0.05", "XX"],
+ ],
+ tick: gasTick,
+ state: "gas",
+ density: 12.84,
+ onCentrifuge: uraniumHexafluorideCentrifuge,
+};
+
+chemjsChemicals.uranium_238_hexafluoride = {
+ elem: {
+ color: "#f7fff7",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 5090,
+ hidden: true,
+ },
+ tempHigh: [56.5],
+ elemName: "depleted_uranium_hexafluoride",
+ stateHigh: ["depleted_uranium_hexafluoride_gas"],
+ categories: ["uranium_238_iv", "uranium_238", "uranium_hexafluoride"],
+ reactionProduct: { isotope: "uranium_238", cation: "uranium_238_iv" },
+};
+
+elements.depleted_uranium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ state: "gas",
+ density: 12.84,
+};
+
+chemjsChemicals.uranium_235_hexafluoride = {
+ elem: {
+ color: "#f7fff7",
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 5090,
+ hidden: true,
+ },
+ tempHigh: [56.5],
+ elemName: "enriched_uranium_hexafluoride",
+ stateHigh: ["enriched_uranium_hexafluoride_gas"],
+ categories: ["uranium_235_iv", "uranium_235", "uranium_hexafluoride"],
+ reactionProduct: { isotope: "uranium_235", cation: "uranium_235_iv" },
+};
+
+elements.enriched_uranium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.25", "XX"],
+ ["CR:radiation%0.25", "XX", "CR:radiation%0.25"],
+ ["XX", "CR:radiation%0.25", "XX"],
+ ],
+ tick: gasTick,
+ state: "gas",
+ density: 12.84,
+};
+
+chemjsChemicals.stable_uranium_hexafluoride = {
+ elem: {
+ color: [blendColors("#f7fff7", "#ff0000"), blendColors("#f7fff7", "#00ff00"), blendColors("#f7fff7", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 5090,
+ hidden: true,
+ },
+ tempHigh: [56.5],
+ stateHigh: ["stable_uranium_hexafluoride_gas"],
+ categories: ["stable_uranium_vi", "stable_uranium", "uranium_hexafluoride"],
+ reactionProduct: { isotope: "stable_uranium", cation: "stable_uranium_vi" },
+};
+elements.stable_uranium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ state: "gas",
+ density: 12.84,
+};
+
+chemjsChemicals.neptunium_dioxide = {
+ elem: {
+ color: [blendColors("#47c94f", "#ff0000"), blendColors("#47c94f", "#00ff00"), blendColors("#47c94f", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 12000,
+ hidden: true,
+ },
+ tempHigh: [2600],
+ categories: ["neptunium_iv", "oxide", "insoluble"],
+ reactionProduct: { anion: "oxide", cation: "neptunium_iv" },
+};
+
+chemjsChemicals.neptunium_tetrafluoride = {
+ elem: {
+ color: [blendColors("#73e67a", "#ff0000"), blendColors("#73e67a", "#00ff00"), blendColors("#73e67a", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 12000,
+ hidden: true,
+ },
+ tempHigh: [2550],
+ categories: ["neptunium_iv", "fluoride", "insoluble"],
+ reactionProduct: { anion: "fluoride", cation: "neptunium_iv" },
+ toxic: [0.1],
+};
+
+chemjsChemicals.neptunium_hexafluoride = {
+ elem: {
+ color: [blendColors("#eda042", "#ff0000"), blendColors("#eda042", "#00ff00"), blendColors("#eda042", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 5000,
+ hidden: true,
+ },
+ tempHigh: [55],
+ stateHigh: ["neptunium_hexafluoride_gas"],
+ categories: ["neptunium_vi", "fluoride", "insoluble"],
+ reactionProduct: { anion: "fluoride", cation: "neptunium_vi" },
+ toxic: [0.1],
+};
+
+elements.neptunium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ state: "gas",
+ density: 14.591,
+};
+
+chemjsChemicals.plutonium_dioxide = {
+ elementNames: [],
+ categories: ["oxide", "insoluble"],
+ reactionProduct: { anion: "oxide" },
+};
+
+chemjsChemicals.mixed_plutonium_dioxide = {
+ elem: {
+ color: ["#edcf47", "#c7a924", "#e3c129"],
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 11500,
+ excludeRandom: true,
+ hidden: true,
+ },
+ tempHigh: [2744],
+ elemName: "plutonium_dioxide",
+ stateHigh: ["molten_plutonium_dioxide"],
+ categories: ["mixed_plutonium_iv", "mixed_plutonium", "plutonium_dioxide"],
+ reactionProduct: { isotope: "mixed_plutonium", cation: "mixed_plutonium_iv" },
+};
+
+elements.molten_plutonium_dioxide = {
+ excludeRandom: true,
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+};
+
+chemjsChemicals.plutonium_242_dioxide = {
+ elem: {
+ color: ["#edcf47", "#c7a924", "#e3c129"],
+ behavior: ["XX|CR:radiation%0.1|XX", "CR:radiation%0.1|XX|CR:radiation%0.1", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 11500,
+ hidden: true,
+ },
+ tempHigh: [2744],
+ elemName: "depleted_plutonium_dioxide",
+ stateHigh: ["molten_depleted_plutonium_dioxide"],
+ categories: ["plutonium_242_iv", "plutonium_242", "plutonium_dioxide"],
+ reactionProduct: { isotope: "plutonium_242", cation: "plutonium_242_iv" },
+};
+
+elements.molten_depleted_plutonium_dioxide = {
+ excludeRandom: true,
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.1|XX", "M2 AND CR:radiation%0.1|XX|M2 AND CR:radiation%0.1", "M1|M1|M1"],
+};
+
+chemjsChemicals.plutonium_239_dioxide = {
+ elem: {
+ color: ["#edcf47", "#c7a924", "#e3c129"],
+ behavior: ["XX|CR:radiation%0.5|XX", "CR:radiation%0.5|XX|CR:radiation%0.5", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 11500,
+ excludeRandom: true,
+ hidden: true,
+ },
+ tempHigh: [2744],
+ elemName: "enriched_plutonium_dioxide",
+ stateHigh: ["molten_enriched_plutonium_dioxide"],
+ categories: ["plutonium_239_iv", "plutonium_239", "plutonium_dioxide"],
+ reactionProduct: { isotope: "plutonium_239", cation: "plutonium_239_iv" },
+};
+
+elements.molten_enriched_plutonium_dioxide = {
+ excludeRandom: true,
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.5|XX", "M2 AND CR:radiation%0.5|XX|M2 AND CR:radiation%0.5", "M1|M1|M1"],
+};
+
+chemjsChemicals.stable_plutonium_dioxide = {
+ elem: {
+ color: [blendColors("#edcf47", "#ff0000"), blendColors("#c7a924", "#00ff00"), blendColors("#e3c129", "#0000ff"), blendColors("#9c998c", "#ff0000")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 11500,
+ hidden: true,
+ },
+ tempHigh: [2744],
+ stateHigh: ["molten_stable_plutonium_dioxide"],
+ categories: ["stable_plutonium_iv", "stable_plutonium", "plutonium_dioxide"],
+ reactionProduct: { isotope: "stable_plutonium", cation: "stable_plutonium_iv" },
+};
+
+chemjsChemicals.plutonium_tetrafluoride = {
+ elementNames: [],
+ categories: ["fluoride", "insoluble"],
+ reactionProduct: { anion: "fluoride" },
+ toxic: [0.1],
+};
+
+chemjsChemicals.mixed_plutonium_tetrafluoride = {
+ elem: {
+ color: ["#a13d0b", "#85401d", "#733211"],
+ behavior: [["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"]],
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1027],
+ elemName: "plutonium_tetrafluoride",
+ stateHigh: ["molten_plutonium_tetrafluoride"],
+ categories: ["mixed_plutonium_iv", "mixed_plutonium", "plutonium_tetrafluoride"],
+ reactionProduct: { isotope: "mixed_plutonium", cation: "mixed_plutonium_iv" },
+};
+
+elements.molten_plutonium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+};
+
+chemjsChemicals.plutonium_242_tetrafluoride = {
+ elem: {
+ color: ["#a13d0b", "#85401d", "#733211"],
+ behavior: ["XX|CR:radiation%0.02|XX", "CR:radiation%0.02|XX|CR:radiation%0.02", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1027],
+ elemName: "depleted_plutonium_tetrafluoride",
+ stateHigh: ["molten_depleted_plutonium_tetrafluoride"],
+ categories: ["plutonium_242_iv", "plutonium_242", "plutonium_tetrafluoride"],
+ reactionProduct: { isotope: "plutonium_242", cation: "plutonium_242_iv" },
+};
+elements.molten_depleted_plutonium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.02|XX", "M2 AND CR:radiation%0.02|XX|M2 AND CR:radiation%0.02", "M1|M1|M1"],
+};
+
+chemjsChemicals.plutonium_239_tetrafluoride = {
+ elem: {
+ color: ["#a13d0b", "#85401d", "#733211"],
+ behavior: ["XX|CR:radiation%0.02|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1027],
+ elemName: "enriched_plutonium_tetrafluoride",
+ stateHigh: ["molten_enriched_plutonium_tetrafluoride"],
+ categories: ["plutonium_239_iv", "plutonium_239", "plutonium_tetrafluoride"],
+ reactionProduct: { isotope: "plutonium_239", cation: "plutonium_239_iv" },
+};
+
+elements.molten_enriched_plutonium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.1|XX", "M2 AND CR:radiation%0.1|XX|M2 AND CR:radiation%0.1", "M1|M1|M1"],
+};
+
+chemjsChemicals.stable_plutonium_tetrafluoride = {
+ elem: {
+ color: [blendColors("#a13d0b", "#ff0000"), blendColors("#85401d", "#00ff00"), blendColors("#733211", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+ },
+ tempHigh: [1027],
+ stateHigh: ["molten_stable_plutonium_tetrafluoride"],
+ categories: ["stable_plutonium_iv", "stable_plutonium", "plutonium_tetrafluoride"],
+ reactionProduct: { isotope: "stable_plutonium", cation: "stable_plutonium_iv" },
+};
+
+chemjsChemicals.plutonium_hexafluoride = {
+ elementNames: [],
+ categories: ["fluoride", "insoluble"],
+ reactionProduct: { anion: "fluoride" },
+ toxic: [0.2],
+};
+
+plutoniumHexafluorideCentrifuge = function (pixel) {
+ if (Math.random() < 0.05) {
+ if (Math.random() < 0.8) {
+ changePixel(pixel, "depleted_plutonium_hexafluoride");
+ } else {
+ changePixel(pixel, "enriched_plutonium_hexafluoride");
+ }
+ }
+};
+chemjsChemicals.mixed_plutonium_hexafluoride = {
+ elem: {
+ color: "#6e2602",
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 5080,
+ hidden: true,
+ },
+ tempHigh: [62.5, 280],
+ elemName: "plutonium_hexafluoride",
+ stateHigh: ["plutonium_hexafluoride_gas", ["plutonium_tetrafluoride", "fluorine"]],
+ categories: ["mixed_plutonium_vi", "mixed_plutonium", "plutonium_hexafluoride"],
+ reactionProduct: { isotope: "mixed_plutonium", cation: "mixed_plutonium_vi" },
+};
+
+elements.plutonium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.05", "XX"],
+ ["CR:radiation%0.05", "XX", "CR:radiation%0.05"],
+ ["XX", "CR:radiation%0.05", "XX"],
+ ],
+ tick: gasTick,
+ state: "gas",
+ density: 14.88,
+ onCentrifuge: plutoniumHexafluorideCentrifuge,
+};
+
+chemjsChemicals.plutonium_242_hexafluoride = {
+ elem: {
+ color: "#6e2602",
+ behavior: ["XX|CR:radiation%0.01|XX", "CR:radiation%0.01|XX|CR:radiation%0.01", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 5080,
+ hidden: true,
+ },
+ tempHigh: [62.5, 280],
+ elemName: "depleted_plutonium_hexafluoride",
+ stateHigh: ["depleted_plutonium_hexafluoride_gas", ["depleted_plutonium_tetrafluoride", "fluorine"]],
+ categories: ["plutonium_242_iv", "plutonium_242", "plutonium_hexafluoride"],
+ reactionProduct: { isotope: "plutonium_242", cation: "plutonium_242_iv" },
+};
+
+elements.depleted_plutonium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.01", "XX"],
+ ["CR:radiation%0.01", "XX", "CR:radiation%0.01"],
+ ["XX", "CR:radiation%0.01", "XX"],
+ ],
+ tick: gasTick,
+ state: "gas",
+ density: 14.88,
+};
+
+chemjsChemicals.plutonium_239_hexafluoride = {
+ elem: {
+ color: "#6e2602",
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ category: "powders",
+ state: "solid",
+ density: 5080,
+ hidden: true,
+ },
+ tempHigh: [62.5, 280],
+ elemName: "enriched_plutonium_hexafluoride",
+ stateHigh: ["enriched_plutonium_hexafluoride_gas", ["enriched_plutonium_tetrafluoride", "fluorine"]],
+ categories: ["plutonium_239_iv", "plutonium_239", "plutonium_hexafluoride"],
+ reactionProduct: { isotope: "plutonium_239", cation: "plutonium_239_iv" },
+};
+
+elements.enriched_plutonium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.25", "XX"],
+ ["CR:radiation%0.25", "XX", "CR:radiation%0.25"],
+ ["XX", "CR:radiation%0.25", "XX"],
+ ],
+ tick: gasTick,
+ state: "gas",
+ density: 14.88,
+};
+
+chemjsChemicals.stable_plutonium_hexafluoride = {
+ elem: {
+ color: [blendColors("#6e2602", "#ff0000"), blendColors("#6e2602", "#00ff00"), blendColors("#6e2602", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 5080,
+ hidden: true,
+ },
+ tempHigh: [62.5, 280],
+ stateHigh: ["stable_plutonium_hexafluoride_gas", ["stable_plutonium_tetrafluoride", "fluorine"]],
+ categories: ["stable_plutonium_vi", "stable_plutonium", "plutonium_hexafluoride"],
+ reactionProduct: { isotope: "stable_plutonium", cation: "stable_plutonium_vi" },
+};
+elements.stable_plutonium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ state: "gas",
+ density: 14.88,
+};
+
+chemjsChemicals.copernicium_dioxide = {
+ elem: {
+ color: [blendColors("#e6c973", "#ff0000", 0.25), blendColors("#e6c973", "#00ff00", 0.25), blendColors("#e6c973", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 13120,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [300], //made up
+ stateHigh: [["stable_copernicium_gas", "oxygen"]],
+ categories: ["copernicium_iv", "oxide", "insoluble"],
+ toxic: [0.02],
+};
+
+chemjsChemicals.copernicium_tetrafluoride = {
+ elem: {
+ color: [blendColors("#eff2e4", "#ff0000", 0.25), blendColors("#eff2e4", "#00ff00", 0.25), blendColors("#eff2e4", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 12110,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [502], //made up
+ stateHigh: [["stable_copernicium_gas", "fluorine"]],
+ categories: ["copernicium_ii", "sulfide", "insoluble"],
+ toxic: [0.2],
+};
+
+chemjsChemicals.copernicium_sulfide = {
+ elem: {
+ color: [blendColors("#9c5f4f", "#ff0000", 0.25), blendColors("#9c5f4f", "#00ff00", 0.25), blendColors("#9c5f4f", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 13200,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [421], //made up
+ stateHigh: [["stable_copernicium_gas", "molten_sulfur"]],
+ categories: ["copernicium_ii", "sulfide", "insoluble"],
+ toxic: [0.02],
+};
+
+chemjsChemicals.nihonium_oxide = {
+ elem: {
+ color: [blendColors("#ab9a95", "#ff0000", 0.25), blendColors("#ab9a95", "#00ff00", 0.25), blendColors("#ab9a95", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 12370,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [567], //made up
+ categories: ["nihonium_i", "oxide", "insoluble"],
+ toxic: [0.02],
+};
+
+chemjsChemicals.nihonium_hydroxide = {
+ elem: {
+ color: [blendColors("#ebc7c7", "#ff0000", 0.25), blendColors("#ebc7c7", "#00ff00", 0.25), blendColors("#ebc7c7", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 10220,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [292], //made up
+ stateHigh: [["nihonium_oxide", "steam"]],
+ categories: ["nihonium_i", "hydroxide", "insoluble", "bases"],
+ reactionProduct: { anion: "hydroxide", cation: "nihonium_i", anionBase: "hydroxide", cationBase: "nihonium_i" },
+ toxic: [0.02],
+};
+
+chemjsChemicals.nihonium_nitrate = {
+ elem: {
+ color: [blendColors("#fccadd", "#ff0000", 0.25), blendColors("#fccadd", "#00ff00", 0.25), blendColors("#fccadd", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 9350,
+ hidden: true,
+ },
+ tempHigh: [203],
+ stateHigh: [["nihonium_oxide", "nitrogen_dioxide", "fire"]],
+ elementNames: ["chemical!nihonium_nitrate_solution"],
+ reactionProduct: { salt_water: "nihonium_nitrate_solution", cation: "nihonium_i", anion: "nitrate" },
+ categories: ["salt", "nihonium_i", "nitrate"],
+ toxic: [0.1],
+};
+chemjsChemicals.nihonium_nitrate_solution = {
+ elem: {
+ color: [blendColors("#8f19f7", "#ff0000", 0.25), blendColors("#8f19f7", "#00ff00", 0.25), blendColors("#8f19f7", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1090,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "nihonium_nitrate"]],
+ reactionProduct: { salt: "nihonium_nitrate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.nihonium_sulfate = {
+ elem: {
+ color: [blendColors("#fcf1ca", "#ff0000", 0.25), blendColors("#fcf1ca", "#00ff00", 0.25), blendColors("#fcf1ca", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 12050,
+ hidden: true,
+ },
+ tempHigh: [1305],
+ elementNames: ["chemical!nihonium_sulfate_solution"],
+ reactionProduct: { salt_water: "nihonium_sulfate_solution", cation: "nihonium_i", anion: "sulfate" },
+ categories: ["salt", "nihonium_i", "sulfate"],
+ toxic: [0.02],
+};
+chemjsChemicals.nihonium_sulfate_solution = {
+ elem: {
+ color: [blendColors("#1984f7", "#ff0000", 0.25), blendColors("#1984f7", "#00ff00", 0.25), blendColors("#1984f7", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1092,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "nihonium_sulfate"]],
+ reactionProduct: { salt: "nihonium_sulfate" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.flerovium_sulfide = {
+ elem: {
+ color: [blendColors("#121107", "#ff0000", 0.25), blendColors("#121107", "#00ff00", 0.25), blendColors("#121107", "#0000ff", 0.25)],
+ behavior: behaviors.WALL,
+ category: "solids",
+ state: "solid",
+ density: 14700,
+ /*made up*/ hidden: true,
+ burnInto: ["flerovium_oxide", "sulfur_dioxide"],
+ burn: 1,
+ },
+ tempHigh: [1220], //made up
+ categories: ["flerovium_ii", "sulfide", "insoluble"],
+};
+
+chemjsChemicals.flerovium_oxide = {
+ elem: {
+ color: [blendColors("#d9d8d4", "#ff0000", 0.25), blendColors("#d9d8d4", "#00ff00", 0.25), blendColors("#d9d8d4", "#0000ff", 0.25)],
+ behavior: behaviors.STURDYPOWDER,
+ category: "powders",
+ state: "solid",
+ density: 14320,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [1120], //made up
+ categories: ["flerovium_ii", "oxide", "insoluble"],
+};
+
+chemjsChemicals.moscovium_hydroxide = {
+ elem: {
+ color: [blendColors("#fcf1ca", "#ff0000", 0.25), blendColors("#fcf1ca", "#00ff00", 0.25), blendColors("#fcf1ca", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 5620,
+ hidden: true,
+ },
+ tempHigh: [670],
+ elementNames: ["chemical!moscovium_hydroxide_solution"],
+ reactionProduct: { salt_water: "moscovium_hydroxide_solution", cation: "moscovium_iii", anion: "hydroxide", cationBase: "moscovium_iii", anionBase: "hydroxide" },
+ categories: ["salt", "moscovium_iii", "hydroxide", "bases"],
+ toxic: [0.02],
+};
+chemjsChemicals.moscovium_hydroxide_solution = {
+ elem: {
+ color: [blendColors("#6548f7", "#ff0000", 0.25), blendColors("#6548f7", "#00ff00", 0.25), blendColors("#6548f7", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1092,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "moscovium_hydroxide"]],
+ reactionProduct: { salt: "moscovium_hydroxide" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.moscovium_fluoride = {
+ elem: {
+ color: [blendColors("#eedff5", "#ff0000", 0.25), blendColors("#eedff5", "#00ff00", 0.25), blendColors("#eedff5", "#0000ff", 0.25)],
+ behavior: behaviors.STURDYPOWDER,
+ category: "powders",
+ state: "solid",
+ density: 6220,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [720], //made up
+ categories: ["moscovium_iii", "fluoride", "insoluble"],
+ toxic: [0.2],
+};
+
+chemjsChemicals.livermorium_oxide = {
+ elem: {
+ color: [blendColors("#ebcb8f", "#ff0000", 0.25), blendColors("#ebcb8f", "#00ff00", 0.25), blendColors("#ebcb8f", "#0000ff", 0.25)],
+ behavior: behaviors.STURDYPOWDER,
+ category: "powders",
+ state: "solid",
+ density: 12430,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [730], //made up
+ categories: ["livermorium_ii", "oxide", "insoluble"],
+};
+
+chemjsChemicals.ununennium_fluoride = {
+ elem: {
+ color: [blendColors("#e1e4eb", "#ff0000", 0.25), blendColors("#e1e4eb", "#00ff00", 0.25), blendColors("#e1e4eb", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 6703,
+ hidden: true,
+ },
+ tempHigh: [1270], //made up
+ elementNames: ["chemical!ununennium_fluoride_solution"],
+ reactionProduct: { salt_water: "ununennium_fluoride_solution", cation: "ununennium_i", anion: "fluoride" },
+ categories: ["salt", "ununennium_i", "fluoride"],
+};
+
+chemjsChemicals.ununennium_fluoride_solution = {
+ elem: {
+ color: [blendColors("#3061f2", "#ff0000", 0.25), blendColors("#3061f2", "#00ff00", 0.25), blendColors("#3061f2", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1094,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "ununennium_fluoride"]],
+ reactionProduct: { salt: "ununennium_fluoride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.ununennium_trifluoride = {
+ elem: {
+ color: [blendColors("#ccb87a", "#ff0000", 0.25), blendColors("#ccb87a", "#00ff00", 0.25), blendColors("#ccb87a", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 7200,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [140], //made up
+ categories: ["ununennium_iii", "fluoride", "insoluble"],
+ toxic: [0.1],
+};
+
+chemjsChemicals.ununennium_pentafluoride = {
+ elem: {
+ color: [blendColors("#db5030", "#ff0000", 0.25), blendColors("#db5030", "#00ff00", 0.25), blendColors("#db5030", "#0000ff", 0.25)],
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ state: "solid",
+ density: 7250,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [70], //made up
+ stateHigh: [["ununennium_trifluoride", "fluorine"]],
+ categories: ["ununennium_v", "fluoride", "insoluble"],
+ toxic: [0.1],
+ ignore: ["chemical!foof", "chemical!fluorine", "chemical!ununennium_trifluoride", "chemical!oxygen", "chemical!ozone", "chemical!hydrogen_fluoride"],
+};
+
+chemjsChemicals.unbinilium_oxide = {
+ elem: {
+ color: [blendColors("#f5f2e1", "#ff0000", 0.25), blendColors("#f5f2e1", "#00ff00", 0.25), blendColors("#f5f2e1", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 15000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [2763],
+ categories: ["insoluble", "unbinilium_ii", "oxide"],
+};
+chemjsChemicals.unbinilium_hydroxide = {
+ elem: {
+ color: [blendColors("#f9faf2", "#ff0000", 0.25), blendColors("#f9faf2", "#00ff00", 0.25), blendColors("#f9faf2", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 12000,
+ state: "solid",
+ hidden: true,
+ },
+ tempHigh: [620],
+ stateHigh: [["unbinilium_oxide"]],
+ reactionProduct: { cation: "unbinilium_ii", anion: "hydroxide", cationBase: "unbinilium_ii", anionBase: "hydroxide" },
+ categories: ["insoluble", "unbinilium_ii", "hydroxide", "bases"],
+};
+
+chemjsChemicals.unbinilium_difluoride = {
+ elem: {
+ color: [blendColors("#e8ebe1", "#ff0000", 0.25), blendColors("#e8ebe1", "#00ff00", 0.25), blendColors("#e8ebe1", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 6800,
+ hidden: true,
+ },
+ tempHigh: [1340], //made up
+ elementNames: ["chemical!unbinilium_difluoride_solution"],
+ reactionProduct: { salt_water: "unbinilium_difluoride_solution", cation: "unbinilium_ii", anion: "fluoride" },
+ categories: ["salt", "unbinilium_ii", "fluoride"],
+};
+
+chemjsChemicals.unbinilium_difluoride_solution = {
+ elem: {
+ color: [blendColors("#3087f2", "#ff0000", 0.25), blendColors("#3087f2", "#00ff00", 0.25), blendColors("#3087f2", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1095,
+ hidden: true,
+ conduct: 0.1,
+ stain: -0.66,
+ },
+ tempLow: [-2],
+ tempHigh: [102],
+ stateHigh: [["steam", "unbinilium_difluoride"]],
+ reactionProduct: { salt: "unbinilium_difluoride" },
+ categories: ["salt_water"],
+};
+
+chemjsChemicals.unbinilium_tetrafluoride = {
+ elem: {
+ color: [blendColors("#e0dd12", "#ff0000", 0.25), blendColors("#e0dd12", "#00ff00", 0.25), blendColors("#e0dd12", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 7500,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [210], //made up
+ categories: ["unbinilium_iv", "fluoride", "insoluble"],
+ toxic: [0.1],
+};
+
+chemjsChemicals.unbinilium_hexafluoride = {
+ elem: {
+ color: [blendColors("#ffca7a", "#ff0000", 0.25), blendColors("#ffca7a", "#00ff00", 0.25), blendColors("#ffca7a", "#0000ff", 0.25)],
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ state: "solid",
+ density: 7700,
+ /*made up*/ hidden: true,
+ },
+ tempHigh: [70], //made up
+ stateHigh: [["unbinilium_tetrafluoride", "fluorine"]],
+ categories: ["unbinilium_vi", "fluoride", "insoluble"],
+ toxic: [0.1],
+ ignore: ["chemical!foof", "chemical!fluorine", "chemical!unbinilium_tetrafluoride", "chemical!oxygen", "chemical!ozone", "chemical!hydrogen_fluoride"],
+};
+
+chemjsChemicals.insoluble = {
+ elementNames: [],
+};
+
+chemjsChemicals.solid_insoluble = {
+ elementNames: ["chemical!insoluble,state!solid"],
+};
+
+chemjsChemicals.salt = {
+ elementNames: [],
+};
+chemjsChemicals.solid_salt = {
+ elementNames: ["chemical!salt,state!solid,ignorechemical!salt_water"],
+};
+
+chemjsChemicals.salt_water = {
+ elementNames: [],
+};
+
+chemjsChemicals.liquid_salt_water = {
+ elementNames: ["chemical!salt_water,state!liquid"],
+};
+
+chemjsChemicals.fertilizer = {
+ elementNames: ["chemical!ammonium_nitrate", "chemical!potassium_nitrate", "chemical!potassium_sulfate"],
+};
+
+//ions
+
+chemjsChemicals.hydrogen_ion = {
+ elementNames: [],
+};
+chemjsChemicals.hydride = {
+ elementNames: [],
+};
+
+chemjsChemicals.boron_ion = {
+ elementNames: [],
+};
+chemjsChemicals.borohydride = {
+ elementNames: [],
+};
+chemjsChemicals.octahydrotriborate = {
+ elementNames: [],
+};
+chemjsChemicals.dodecaborate = {
+ elementNames: [],
+};
+chemjsChemicals.borate = {
+ elementNames: [],
+};
+chemjsChemicals.tetrafluoroborate = {
+ elementNames: [],
+};
+chemjsChemicals.bromoheptahydrotriborate = {
+ elementNames: [],
+};
+
+chemjsChemicals.carbonate = {
+ elementNames: [],
+};
+chemjsChemicals.bicarbonate = {
+ elementNames: [],
+};
+chemjsChemicals.methoxide = {
+ elementNames: [],
+};
+chemjsChemicals.acetate = {
+ elementNames: [],
+};
+
+chemjsChemicals.ammonium_ion = {
+ elementNames: [],
+};
+chemjsChemicals.nitrate = {
+ elementNames: [],
+};
+
+chemjsChemicals.oxide = {
+ elementNames: [],
+};
+
+chemjsChemicals.hydroxide = {
+ elementNames: [],
+};
+
+chemjsChemicals.fluoride = {
+ elementNames: [],
+};
+
+chemjsChemicals.sodium_ion = {
+ elementNames: [],
+};
+
+chemjsChemicals.magnesium_ion = {
+ elementNames: [],
+};
+
+chemjsChemicals.aluminum_ion = {
+ elementNames: [],
+};
+
+chemjsChemicals.aluminate = {
+ elementNames: [],
+};
+
+chemjsChemicals.hexafluoroaluminate = {
+ elementNames: [],
+};
+
+chemjsChemicals.hexafluorosilicate = {
+ elementNames: [],
+};
+
+chemjsChemicals.phosphate = {
+ elementNames: [],
+};
+
+chemjsChemicals.sulfide = {
+ elementNames: [],
+};
+chemjsChemicals.sulfate = {
+ elementNames: [],
+};
+
+chemjsChemicals.chloride = {
+ elementNames: [],
+};
+chemjsChemicals.chlorate = {
+ elementNames: [],
+};
+chemjsChemicals.perchlorate = {
+ elementNames: [],
+};
+
+chemjsChemicals.potassium_ion = {
+ elementNames: [],
+};
+
+chemjsChemicals.calcium_ion = {
+ elementNames: [],
+};
+
+chemjsChemicals.titanium_iii = {
+ elementNames: [],
+};
+chemjsChemicals.titanium_iv = {
+ elementNames: [],
+};
+
+chemjsChemicals.iron_ii = {
+ elementNames: [],
+};
+
+chemjsChemicals.copper_ii = {
+ elementNames: [],
+};
+
+chemjsChemicals.bromide = {
+ elementNames: [],
+};
+
+chemjsChemicals.silver_i = {
+ elementNames: [],
+};
+
+chemjsChemicals.indium_iii = {
+ elementNames: [],
+};
+
+chemjsChemicals.iodide = {
+ elementNames: [],
+};
+
+chemjsChemicals.thallium_i = {
+ elementNames: [],
+};
+
+chemjsChemicals.polonide = {
+ elementNames: [],
+};
+chemjsChemicals.polonium_iv = {
+ elementNames: [],
+};
+
+chemjsChemicals.astatide = {
+ elementNames: [],
+};
+
+chemjsChemicals.francium_ion = {
+ elementNames: [],
+};
+
+chemjsChemicals.radium_ion = {
+ elementNames: [],
+};
+
+chemjsChemicals.actinium_ion = {
+ elementNames: [],
+};
+
+chemjsChemicals.unstable_thorium_iv = {
+ elementNames: [],
+};
+chemjsChemicals.stable_thorium_iv = {
+ elementNames: [],
+};
+
+chemjsChemicals.protactinium_v = {
+ elementNames: [],
+};
+
+chemjsChemicals.mixed_uranium_iv = {
+ elementNames: [],
+};
+chemjsChemicals.mixed_uranium_vi = {
+ elementNames: [],
+};
+chemjsChemicals.uranium_238_iv = {
+ elementNames: [],
+};
+chemjsChemicals.uranium_238_vi = {
+ elementNames: [],
+};
+chemjsChemicals.uranium_235_iv = {
+ elementNames: [],
+};
+chemjsChemicals.uranium_235_vi = {
+ elementNames: [],
+};
+chemjsChemicals.stable_uranium_iv = {
+ elementNames: [],
+};
+chemjsChemicals.stable_uranium_vi = {
+ elementNames: [],
+};
+
+chemjsChemicals.neptunium_iv = {
+ elementNames: [],
+};
+chemjsChemicals.neptunium_vi = {
+ elementNames: [],
+};
+
+chemjsChemicals.mixed_plutonium_iv = {
+ elementNames: [],
+};
+chemjsChemicals.mixed_plutonium_vi = {
+ elementNames: [],
+};
+chemjsChemicals.plutonium_242_iv = {
+ elementNames: [],
+};
+chemjsChemicals.plutonium_242_vi = {
+ elementNames: [],
+};
+chemjsChemicals.plutonium_239_iv = {
+ elementNames: [],
+};
+chemjsChemicals.plutonium_239_vi = {
+ elementNames: [],
+};
+chemjsChemicals.stable_plutonium_iv = {
+ elementNames: [],
+};
+chemjsChemicals.stable_plutonium_vi = {
+ elementNames: [],
+};
+
+chemjsChemicals.copernicium_ii = {
+ elementNames: [],
+};
+chemjsChemicals.copernicium_iv = {
+ elementNames: [],
+};
+
+chemjsChemicals.nihonide = {
+ elementNames: [],
+};
+chemjsChemicals.nihonium_i = {
+ elementNames: [],
+};
+
+chemjsChemicals.flerovium_ii = {
+ elementNames: [],
+};
+
+chemjsChemicals.moscovium_iii = {
+ elementNames: [],
+};
+
+chemjsChemicals.livermorium_ii = {
+ elementNames: [],
+};
+
+chemjsChemicals.ununennium_i = {
+ elementNames: [],
+};
+chemjsChemicals.ununennium_iii = {
+ elementNames: [],
+};
+chemjsChemicals.ununennium_v = {
+ elementNames: [],
+};
+
+chemjsChemicals.unbinilium_ii = {
+ elementNames: [],
+};
+chemjsChemicals.unbinilium_iv = {
+ elementNames: [],
+};
+chemjsChemicals.unbinilium_vi = {
+ elementNames: [],
+};
+
+//misc
+
+chemjsChemicals.diborane = {
+ elem: {
+ color: "#ffcac9",
+ behavior: behaviors.GAS,
+ state: "gas",
+ category: "gases",
+ density: 1.131,
+ burn: 100,
+ burnTime: 20,
+ burnInto: "boron_trioxide",
+ fireColor: ["#34eb67", "#5ceb34"],
+ },
+ tempLow: [-92.5, -164],
+ tempHigh: [200],
+ stateHigh: [["pentaborane_9", "pentaborane_9", "decaborane"]],
+ toxic: [1],
+ densityLow: [477],
+};
+
+chemjsChemicals.pentaborane_9 = {
+ elem: {
+ name: "pentaborane(9)",
+ color: "#f7b5b5",
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ category: "liquids",
+ density: 618,
+ hidden: true,
+ burn: 100,
+ burnTime: 5,
+ burnInto: "explosion",
+ fireColor: ["#34eb67", "#5ceb34"],
+ },
+ tempLow: [-46.8],
+ tempHigh: [60.1, 250],
+ stateHigh: [null, ["decaborane"]],
+ toxic: [1],
+ densityHigh: [477],
+};
+elements.pentaborane_9_gas = {
+ name: "pentaborane(9)_gas",
+};
+elements.pentaborane_9_ice = {
+ name: "pentaborane(9)_ice",
+};
+
+chemjsChemicals.decaborane = {
+ elem: {
+ color: "#d9cece",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 940,
+ hidden: true,
+ burn: 100,
+ burnTime: 100,
+ burnInto: "boron_trioxide",
+ fireColor: ["#34eb67", "#5ceb34"],
+ },
+ tempHigh: [98],
+ toxic: [0.1],
+};
+elements.molten_decaborane = {
+ behavior: behaviors.LIQUID,
+};
+
+chemjsChemicals.carbonic_acid = {
+ elementNames: ["seltzer", "soda", "pilk"],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "carbonate" },
+ categories: ["hydrogen_ion", "carbonate", "bicarbonate", "acids"],
+};
+
+chemjsChemicals.trimethyl_borate = {
+ elem: {
+ color: "#c4bc89",
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ category: "liquids",
+ density: 932,
+ burn: 100,
+ fireColor: ["#34eb67", "#5ceb34"],
+ burnTime: 10,
+ hidden: true,
+ },
+ tempLow: [-34],
+ tempHigh: [69],
+ toxic: [0.2],
+ densityHigh: [4.32],
+ causticIgnore: true,
+};
+
+chemjsChemicals.boron_trifluoride = {
+ elem: {
+ color: "#d5d9ce",
+ behavior: behaviors.GAS,
+ state: "gas",
+ category: "gases",
+ density: 2.76,
+ hidden: true,
+ },
+ tempLow: [-100.3, -126.8],
+ toxic: [0.1],
+ densityLow: [1640],
+ causticIgnore: true,
+};
+
+chemjsChemicals.boron_trichloride = {
+ elem: {
+ color: "#ddf0dd",
+ behavior: behaviors.GAS,
+ state: "gas",
+ category: "gases",
+ density: 4.87,
+ hidden: true,
+ },
+ tempLow: [-12.6, -107.3],
+ toxic: [0.2],
+ densityLow: [1326],
+ causticIgnore: true,
+};
+
+chemjsChemicals.water = {
+ elementNames: ["water", "chemical!salt_water", "sugar_water", "dirty_water", "neutral_acid", "seltzer", "pool_water", "primordial_soup", "disinfectant"],
+};
+
+chemjsChemicals.liquid_water = {
+ elementNames: ["chemical!water,state!liquid"],
+};
+
+chemjsChemicals.pure_water = {
+ elementNames: ["water", "ice", "rime", "snow", "slush", "packed_snow", "steam"],
+};
+
+chemjsChemicals.carbon_dioxide = {
+ elementNames: ["carbon_dioxide", "dry_ice"],
+};
+
+chemjsChemicals.ammonia = {
+ elementNames: ["ammonia", "liquid_ammonia", "ammonia_ice"],
+};
+chemjsChemicals.nitric_oxide = {
+ elem: {
+ color: "#b8926c",
+ behavior: behaviors.GAS,
+ state: "gas",
+ category: "gases",
+ density: 1.34,
+ },
+ tempLow: [-152, -164],
+ toxic: [0.1],
+ densityLow: [1280],
+ causticIgnore: true,
+};
+chemjsChemicals.nitrogen_dioxide = {
+ elem: {
+ color: "#964B00",
+ behavior: behaviors.GAS,
+ temp: 30,
+ category: "gases",
+ state: "gas",
+ density: 3.4,
+ },
+ tempLow: [21.15, -9.3],
+ toxic: [0.2],
+ densityLow: [1447],
+ causticIgnore: true,
+};
+
+let foofTick = function (pixel, chance) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change && Math.random() < 0.01) {
+ changePixel(pixel, "explosion");
+ } else if (Math.random() < chance) {
+ if (Math.random() < 0.5) {
+ changePixel(pixel, "oxygen", false);
+ } else {
+ changePixel(pixel, "fluorine", false);
+ }
+ pixelTempCheck(pixel);
+ pixelTempCheck(pixel);
+ }
+};
+
+chemjsChemicals.foof = {
+ elem: {
+ color: "#fa1e1e",
+ behavior: behaviors.LIQUID,
+ tick: (pixel) => foofTick(pixel, 0.0001),
+ state: "liquid",
+ category: "liquids",
+ density: 1450,
+ stain: 0.01,
+ temp: -120,
+ },
+ tempHigh: [-57],
+ stateHigh: [["oxygen", "fluorine", "explosion"]],
+ tempLow: [-154],
+ stateLow: ["solid_foof"],
+ ignore: ["chemical!foof", "chemical!fluorine", "chemical!oxygen", "chemical!ozone", "radiation", "chemical!polytetrafluoroethylene", "molten_polytetrafluoroethylene", "foof_grass", "foof_grass_seed"],
+ ignorable: true,
+};
elements.solid_foof = {
color: "#fa4a1e",
behavior: behaviors.WALL,
- ignore: ["foof", "solid_foof", "fluorine", "liquid_fluorine", "fluorine_ice", "liquid_oxygen", "oxygen_ice", "ozone", "oxygen", "fire", "polytetrafluoroethylene", "molten_polytetrafluoroethylene"],
- tick: function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
- }
- }
- }
- if (change && Math.random() < 0.01) {
- changePixel(pixel, "explosion");
- } else if (Math.random() < 0.00005) {
- if (Math.random() < 0.5) {
- changePixel(pixel, "oxygen", false);
- } else {
- changePixel(pixel, "fluorine", false);
- }
- pixelTempCheck(pixel);
- pixelTempCheck(pixel);
- }
- },
+ tick: (pixel) => foofTick(pixel, 0.00005),
state: "solid",
category: "solids",
- density: 1450,
- stain: 0.01,
- temp: -160,
- tempHigh: -154,
- stateHigh: "foof",
- reactions: {},
+ hidden: true,
};
-elements.tungsten_hexafluoride = {
- color: "#f5f57a",
- behavior: behaviors.GAS,
- tempLow: 17.1,
- state: "gas",
- category: "gases",
- density: 12.4,
- stain: 0.005,
- reactions: {
- steam: { elem1: "hydrofluoric_acid_gas", elem2: "tungsten" },
+chemjsChemicals.silicon_dioxide = {
+ elementNames: ["sand", "wet_sand"],
+};
+
+chemjsChemicals.phosphorus_pentoxide = {
+ elem: {
+ color: "#fcfcfa",
+ behavior: behaviors.POWDER,
+ state: "solid",
+ category: "powders",
+ density: 2390,
+ fireColor: "#5ed6c8",
},
+ tempHigh: [340],
};
-elements.liquid_tungsten_hexafluoride = { density: 4560, tempLow: 2.3 };
-
-runAfterLoad(function () {
- reactList("tungsten_hexafluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "tungsten" });
-});
-
-if (!elements.acid.ignore) {
- elements.acid.ignore = [];
-}
-if (!elements.acid_gas.ignore) {
- elements.acid_gas.ignore = [];
-}
-let defaultAcidIgnore = structuredClone(elements.acid.ignore);
-let defaultAcidGasIgnore = structuredClone(elements.acid_gas.ignore);
-
-let defaultAcidReactions = {
- 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 },
- caustic_potash: { elem1: "neutral_acid", elem2: null },
- radium_hydroxide: { elem1: "neutral_acid", elem2: null },
- actinium_hydroxide: { elem1: "neutral_acid", elem2: null },
- charcoal: { elem1: null, elem2: "carbon_dioxide" },
- grape: { elem2: "juice", color1: "#291824" },
- soap: { elem1: "hydrogen" },
- sodium: { elem1: "explosion" },
- potassium: { elem1: "explosion" },
- meat: { elem2: "rotten_meat", elem1: null, chance: 0.5 },
-};
-
-let defaultAcidGasReactions = {
- acid_gas: { elem1: null, elem2: "acid_cloud", chance: 0.3, y: [0, 12], setting: "clouds" },
- rain_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- snow_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- hail_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- pyrocumulus: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- fire_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- ash: { elem1: "hydrogen", elem2: null, chance: 0.05 },
- limestone: { elem1: "hydrogen", elem2: null, chance: 0.05 },
- quicklime: { elem1: "hydrogen", elem2: null, chance: 0.05 },
- slaked_lime: { elem1: "hydrogen", elem2: null, chance: 0.05 },
- borax: { elem1: "hydrogen", elem2: null, chance: 0.05 },
- ammonia: { elem1: "hydrogen", elem2: null, chance: 0.05 },
- bleach: { elem1: "hydrogen", elem2: null, chance: 0.05 },
- grape: { elem2: "juice", color1: "#291824" },
- soap: { elem1: "hydrogen" },
- sodium: { elem1: "explosion" },
- meat: { elem2: "rotten_meat", elem1: null, chance: 0.4 },
-};
-
-eListAdd("CAUSTIC", ["acid", "acid_gas", "fluorine", "liquid_fluorine", "hydrofluoric_acid", "hydrofluoric_acid_gas", "hydrogen_fluoride", "liquid_hydrogen_fluoride"]);
-eListAdd("CAUSTICIGNORE", []);
-
-eListAdd("ACID", ["acid", "hydrofluoric_acid"]);
-eListAdd("ACIDGAS", ["acid_gas", "hydrofluoric_acid_gas"]);
-
-if (enabledMods.includes("mods/generative_mods.js")) {
- 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" };
- elements["hydrofluoric_acid_gas"].reactions["cloud"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["hydrofluoric_acid_gas"].reactions["snow_cloud"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["hydrofluoric_acid_gas"].reactions["hail_cloud"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["hydrofluoric_acid_gas"].reactions["pyrocumulus"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["hydrofluoric_acid_gas"].reactions["fire_cloud"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
-
- elements["cloud"].reactions["anesthesia"] = { elem1: "nitric_acid_cloud", elem2: null, chance: 0.05 };
- elements["rain_cloud"].reactions["anesthesia"] = { elem1: "nitric_acid_cloud", elem2: null, chance: 0.05 };
- });
-}
-function createAcid(name, reactions, gasReactions, color, categoryhidden, categoryhiddenGas, tempHigh, tempLowGas, tempLow, tempHighGas, density, densityGas, type, extras = { compound: "acid" }) {
- compound = extras.compound;
- elements[name] = {
- forceAutoGen: true,
- color: color,
- 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: defaultAcidIgnore.concat(eLists.CAUSTICIGNORE),
- reactions: reactions,
- category: "liquids",
- hidden: categoryhidden,
- tempHigh: tempHigh,
- stateHigh: name + "_gas",
- tempLow: tempLow,
- state: "liquid",
- density: density,
- };
- elements[name + "_gas"] = {
- behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
- ignore: defaultAcidGasIgnore.concat(eLists.CAUSTICIGNORE),
- reactions: gasReactions,
+chemjsChemicals.hydrogen_sulfide = {
+ elem: {
+ color: "#d9e366",
+ behavior: behaviors.GAS,
category: "gases",
- hidden: categoryhiddenGas,
- tempHigh: tempHighGas,
- stateHigh: "fire",
- tempLow: tempLowGas,
- stateLow: name,
- temp: tempLowGas + 20,
state: "gas",
- density: densityGas,
- };
- elements.bless.reactions[name] = { elem2: "hydrogen" };
- elements.bless.reactions[name + "_gas"] = { elem2: "hydrogen" };
- if (enabledMods.includes("mods/generative_mods.js")) {
- 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" };
- elements[name + "_gas"].reactions["cloud"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements[name + "_gas"].reactions["snow_cloud"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements[name + "_gas"].reactions["hail_cloud"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements[name + "_gas"].reactions["pyrocumulus"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements[name + "_gas"].reactions["fire_cloud"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- });
- } else {
- if (compound == "acid") {
- elements[name + "_gas"].reactions[name + "_gas"] = { elem1: null, elem2: "acid_cloud", chance: 0.3, y: [0, 12], setting: "clouds" };
- } else {
- elements[name + "_gas"].reactions[name + "_gas"] = { elem1: null, elem2: "base_cloud", chance: 0.3, y: [0, 12], setting: "clouds" };
- }
- }
- eLists.CAUSTIC.push(name, name + "_gas");
- acidIgnore([name, name + "_gas", name + "_ice", name + "_cloud"]);
- if (type) {
- eListAddIon(type, [name, name + "_gas"], compound);
- }
- if (compound == "acid") {
- eListAddIon("HYDROGEN", [name, name + "_gas"], compound);
- if (!extras.dontDirtyWater) {
- runAfterLoad(function () {
- reactList(name, eLists.WATER, { elem1: null, elem2: "dirty_water" });
- reactList(name + "_gas", eLists.WATER, { elem1: null, elem2: "dirty_water" });
- delete elements[name].reactions["dirty_water"];
- delete elements[name + "_gas"].reactions["dirty_water"];
- });
- }
- }
-}
-
-function eListAddIon(listName, itemList, compoundType = "default", priority = 0) {
- eListAdd(listName, itemList);
- if (typeof itemList === "string") {
- itemList = [itemList];
- }
- for (var i = 0; i < itemList.length; i++) {
- if (!elements[itemList[i]]) {
- elements[itemList[i]] = {};
- }
- if (!elements[itemList[i]].salt) {
- elements[itemList[i]].salt = {};
- }
- if (!elements[itemList[i]].salt[compoundType]) {
- elements[itemList[i]].salt[compoundType] = {};
- elements[itemList[i]].salt[compoundType].priority = priority;
- elements[itemList[i]].salt[compoundType].components = [];
- }
- if (elements[itemList[i]].salt[compoundType].components.indexOf(listName) === -1) {
- elements[itemList[i]].salt[compoundType].components.push(listName);
- }
- }
-}
-
-function acidIgnore(ignore) {
- for (let i = 0; i < eLists.CAUSTIC.length; i++) {
- elements[eLists.CAUSTIC[i]].ignore = elements[eLists.CAUSTIC[i]].ignore.concat(ignore);
- }
- eLists.CAUSTICIGNORE = eLists.CAUSTICIGNORE.concat(ignore);
-}
-
-eListAdd("WATER", ["water", "salt_water", "sugar_water", "dirty_water", "neutral_acid", "seltzer", "pool_water", "primordial_soup"]);
-function reactList(element, list, reaction) {
- for (let i = 0; i < list.length; i++) {
- if (!elements[element].reactions[list[i]] && !(elements[element].ignore && elements[element].ignore.includes[list[i]])) {
- acidReact(element, list[i], reaction.elem1, reaction.elem2);
- elements[element].reactions[list[i]] = reaction;
- }
- }
-}
-
-function createSalt(name, nameWater, color, colorWater, hidden, hiddenWater, tempHigh, tempLowWater, tempHighWater, density, densityWater, cation, anion) {
- if (!elements[name]) {
- elements[name] = {
- color: color,
- behavior: behaviors.POWDER,
- category: "powders",
- density: density,
- state: "solid",
- tempHigh: tempHigh,
- reactions: {
- ice: { elem1: null, elem2: nameWater, chance: 0.1 },
- rime: { elem1: null, elem2: nameWater, chance: 0.075 },
- snow: { elem1: null, elem2: nameWater, chance: 0.25 },
- packed_snow: { elem1: null, elem2: nameWater, chance: 0.05 },
- packed_ice: { elem1: null, elem2: nameWater, chance: 0.01 },
- water: { elem2: nameWater, elem1: null },
- },
- hidden: hidden,
- };
- }
- if (!elements[nameWater]) {
- elements[nameWater] = {
- color: colorWater,
- behavior: behaviors.LIQUID,
- tempHigh: tempHighWater,
- stateHigh: ["steam", name],
- tempLow: tempLowWater,
- category: "liquids",
- reactions: {
- dirt: { elem1: null, elem2: "mud" },
- sand: { elem1: null, elem2: "wet_sand" },
- clay_soil: { elem1: null, elem2: "clay" },
- dust: { elem1: "dirty_water", elem2: null },
- ash: { elem1: "dirty_water", elem2: null },
- carbon_dioxide: { elem1: "dirty_water", elem2: null },
- sulfur: { elem1: "dirty_water", elem2: null },
- charcoal: { elem1: "dirty_water", chance: 0.005 },
- plague: { elem1: "dirty_water", elem2: null },
- fallout: { elem1: "dirty_water", chance: 0.25 },
- radiation: { elem1: "dirty_water", chance: 0.25 },
- rust: { elem1: "dirty_water", chance: 0.005 },
- quicklime: { elem1: null, elem2: "slaked_lime" },
- rock: { elem2: "wet_sand", chance: 0.0005 },
- fly: { elem2: "dead_bug", chance: 0.1, oneway: true },
- firefly: { elem2: "dead_bug", chance: 0.1, oneway: true },
- bee: { elem2: "dead_bug", chance: 0.05, oneway: true },
- stink_bug: { elem2: "dead_bug", chance: 0.1, oneway: true },
- cancer: { elem1: "dirty_water", chance: 0.25 },
- // electrolysis:
- aluminum: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0025 },
- zinc: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.015 },
- steel: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0125 },
- iron: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0125 },
- tin: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.01 },
- lead: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.01 },
- brass: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.001 },
- bronze: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.001 },
- copper: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0075 },
- silver: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0075 },
- gold: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0075 },
- fire: { elem2: "smoke" },
- snow: { elem2: "slush" },
- rat: { elem1: "dirty_water", chance: 0.2 },
- slug: { elem2: "slime", elem1: null },
- snail: { elem2: "calcium", elem1: null },
- torch: { elem2: "wood" },
- light: { color2: "#a1bac9" },
- sawdust: { elem2: "cellulose", elem1: null },
- oxygen: { elem2: "foam" },
- paper: { elem2: "cellulose", elem1: null },
- pollen: { elem2: null },
- soda: { elem1: "foam", chance: 0.01 },
- ice_nine: { elem1: "ice_nine" },
- ant_wall: { elem2: ["mud", "mud", "wet_sand"], elem1: null, chance: 0.007 },
- soap: { elem1: "water" },
- dye: { elem2: null, chance: 0.05 },
- ink: { elem2: null, chance: 0.01 },
- sodium: { elem2: ["pop", "pop", "pop", "hydrogen"], chance: 0.01, temp1: 250 },
- molten_sodium: { elem2: ["pop", "pop", "pop", "hydrogen"], chance: 0.01, temp1: 250 },
- confetti: { elem2: [null, "cellulose"], chance: 0.001 },
- greek_fire: {
- func: function (p, pixel) {
- if (!pixel.burning) {
- pixel.burning = true;
- pixel.burnStart = pixelTick;
- }
- },
- },
- },
- state: "liquid",
- density: densityWater,
- conduct: 0.1,
- stain: -0.66,
- hidden: hiddenWater,
- };
-
- elements["soap"].reactions[nameWater] = { elem1: ["foam", "bubble"], chance: 0.005 };
- elements["radiation"].reactions[nameWater] = { elem1: "rad_steam", chance: 0.4 };
- elements["iron"].reactions[nameWater] = { elem1: "rust", chance: 0.005 };
- elements["copper"].reactions[nameWater] = { elem1: "oxidized_copper", chance: 0.005 };
- elements["steel"].reactions[nameWater] = { elem1: "rust", chance: 0.004 };
- elements["bronze"].reactions[nameWater] = { elem1: "oxidized_copper", chance: 0.0025 };
- }
- eListAddIon(cation, [name, nameWater, "molten_" + name]);
- eListAddIon(anion, [name, nameWater, "molten_" + name]);
- eListAdd("WATER", nameWater);
- eListAdd("COMPOUND", name);
- eListAdd("SOLUBLE", name);
-}
-
-function toxic(name, chance, dirtyWater = false) {
- Object.assign(elements[name].reactions, {
- blood: { elem1: null, elem2: "infection", chance: chance },
- soap: { elem1: null, chance: 0.02 },
- plant: { elem1: null, elem2: "dead_plant", chance: chance },
- evergreen: { elem1: null, elem2: "dead_plant", chance: chance },
- cactus: { elem1: null, elem2: "dead_plant", chance: chance },
- grass: { elem1: null, elem2: "dead_plant", chance: chance },
- vine: { elem1: null, elem2: "dead_plant", chance: chance },
- algae: { elem1: null, elem2: null, chance: chance },
- kelp: { elem1: null, elem2: "dirty_water", chance: chance },
- mushroom_spore: { elem1: null, elem2: null, chance: chance },
- lichen: { elem1: null, elem2: null, chance: chance },
- yeast: { elem1: null, elem2: null, chance: chance },
- rat: { elem1: null, elem2: "rotten_meat", chance: chance },
- frog: { elem1: null, elem2: "rotten_meat", chance: chance },
- tadpole: { elem2: null, chance: chance },
- fish: { elem1: null, elem2: "rotten_meat", chance: chance },
- bird: { elem1: null, elem2: "rotten_meat", chance: chance },
- head: { elem1: null, elem2: "rotten_meat", chance: chance },
- body: { elem1: null, elem2: "rotten_meat", chance: chance },
- homunculus: { elem1: null, elem2: "rotten_meat", chance: chance },
- ant: { elem1: null, elem2: "dead_bug", chance: chance },
- worm: { elem1: null, elem2: "dead_bug", chance: chance },
- fly: { elem1: null, elem2: "dead_bug", chance: chance },
- firefly: { elem1: null, elem2: "dead_bug", chance: chance },
- bee: { elem1: null, elem2: "dead_bug", chance: chance },
- stink_bug: { elem1: null, elem2: "dead_bug", chance: chance },
- termite: { elem1: null, elem2: "dead_bug", chance: chance },
- flea: { elem1: null, elem2: "dead_bug", chance: chance },
- slug: { elem1: null, elem2: "slime", chance: chance },
- snail: { elem1: null, elem2: "limestone", chance: chance },
- sapling: { elem1: null, elem2: "dead_plant", chance: chance },
- root: { elem1: null, elem2: "dead_plant", chance: chance },
- flower_seed: { elem1: null, elem2: "dead_plant", chance: chance },
- pistil: { elem1: null, elem2: "dead_plant", chance: chance },
- petal: { elem1: null, elem2: "dead_plant", chance: chance },
- grass_seed: { elem1: null, elem2: "dead_plant", chance: chance },
- meat: { elem1: null, elem2: "rotten_meat", chance: chance },
- cheese: { elem1: null, elem2: "rotten_cheese", chance: chance },
- tree_branch: { elem1: null, elem2: "wood", chance: chance },
- mushroom_cap: { elem1: null, elem2: null, chance: chance },
- mushroom_gill: { elem1: null, elem2: null, chance: chance },
- mushroom_stalk: { elem1: null, elem2: null, chance: chance },
- hyphae: { elem1: null, elem2: null, chance: chance },
- mycelium: { elem1: null, elem2: "dirt", chance: chance },
- pollen: { elem2: null, chance: chance },
- bone_marrow: { elem1: null, elem2: "rotten_meat", chance: chance },
- hair: { elem1: null, elem2: null, chance: chance },
- cell: { elem1: null, elem2: null, chance: chance },
- cancer: { elem1: null, elem2: null, chance: chance },
- });
- elements.bless.reactions[name] = { elem2: null };
- if (dirtyWater) {
- runAfterLoad(function () {
- reactList(name, eLists.WATER, { elem1: null, elem2: "dirty_water", chance: chance });
- delete elements[name].reactions["dirty_water"];
- });
- }
-}
-
-createSalt("salt", "salt_water", null, null, false, false, 0, 0, 0, 0, 0, "SODIUM", "CHLORIDE");
-
-acidIgnore(["acid", "acid_gas", "acid_ice", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "liquid_hydrogen_fluoride", "hydrogen_fluoride_ice", "hydrofluoric_acid_ice", "hydrofluoric_acid", "hydrofluoric_acid_gas", "hydrofluoric_acid_cloud", "acid_cloud"]);
-elements.acid.name = "hydrochloricAcid";
-elements.acid_gas.name = "hydrochloricAcidGas";
-eListAddIon("CHLORIDE", ["acid", "acid_gas"], "acid");
-eListAddIon("HYDROGEN", ["acid", "acid_gas"], "acid");
-eListAddIon("FLUORIDE", ["hydrofluoric_acid", "hydrofluoric_acid_gas"], "acid");
-eListAddIon("HYDROGEN", ["hydrofluoric_acid", "hydrofluoric_acid_gas"], "acid");
-
-createAcid("generic_acid", defaultAcidReactions, defaultAcidGasReactions, "#80d488", true, true, 110, 100, -10, 400, 1020, 1);
-elements.generic_acid.name = "acid";
-elements.generic_acid_gas.name = "acid_gas";
-
-eLists.ACID.push("generic_acid");
-eLists.ACIDGAS.push("generic_acid_gas");
-
-if (!enabledMods.includes("mods/generative_mods.js")) {
- elements.acid_cloud.behavior = ["XX|XX|XX", "XX|CH:generic_acid%0.05|M1%2.5 AND BO", "XX|XX|XX"];
-}
-
-createAcid("nitric_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#91993c", "#6b7041", "#5f614b"], false, false, 83, 70, -42, 400, 1500, 1.5, "NITRATE", { compound: "acid", dontDirtyWater: true });
-
-acidReact("nitric_acid", "ammonia", "fertilizer", null, 0);
-acidReact("nitric_acid_gas", "ammonia", "fertilizer", null, 0);
-
-eLists.ACID.push("nitric_acid");
-eLists.ACIDGAS.push("nitric_acid_gas");
-
-elements.nitric_oxide = {
- color: "#b8926c",
- behavior: behaviors.GAS,
- reactions: {
- steam: { elem1: "smog", elem2: null, chance: 0.01 },
- oxygen: { elem1: "nitrogen_dioxide", elem2: null },
+ density: 1.539,
+ burn: 1,
+ burnTime: 10,
+ burnInto: ["sulfur_dioxide", "steam"],
+ fireColor: ["#8180CC", "#7F84E6"],
+ },
+ tempLow: [-59.55, -85.5],
+ tempHigh: [1000],
+ stateHigh: [["fire"]],
+ densityLow: [992],
+ toxic: [0.2],
+ causticIgnore: true,
+};
+
+chemjsChemicals.sulfur_dioxide = {
+ elem: {
+ color: "#FFF700",
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 2.6,
+ },
+ tempLow: [-10, -72],
+ densityLow: [1435],
+ toxic: [0.1],
+ causticIgnore: true,
+};
+
+chemjsChemicals.sulfur_hexafluoride = {
+ elem: {
+ color: "#f2ff00",
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 6.17,
+ },
+ tempLow: [-50.8, -64],
+ densityLow: [1339],
+ causticIgnore: true,
+};
+
+chemjsChemicals.sodium_hypochlorite = {
+ elementNames: ["bleach", "bleach_ice"],
+};
+
+chemjsChemicals.titanium_tetrachloride = {
+ elem: {
+ color: "#d9d7b2",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ density: 1728,
+ state: "liquid",
+ viscosity: 0.827,
+ },
+ tempHigh: [136.4],
+ densityHigh: [7.753],
+ tempLow: [-24],
+ categories: ["insoluble", "titanium_iv", "chloride"],
+ toxic: [0.1],
+};
+
+chemjsChemicals.tungsten_hexafluoride = {
+ elem: {
+ color: "#f5f57a",
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 12.4,
+ stain: 0.005,
+ },
+ tempLow: [17.1, -2.3],
+ densityLow: [4560],
+ causticIgnore: true,
+};
+
+chemjsChemicals.polonium_hydride = {
+ elem: {
+ color: [blendColors("#838396", "#ff0000"), blendColors("#838396", "#00ff00"), blendColors("#838396", "#0000ff")],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 2450,
+ burn: 1,
+ burnTime: 10,
+ burnInto: ["polonium_dioxide", "steam"],
+ hidden: true,
+ stain: 0.05,
+ },
+ tempLow: [-35.3],
+ tempHigh: [36.1],
+ densityHigh: [8.29],
+ categories: ["insoluble", "polonide", "hydrogen_ion"],
+};
+
+//organic chemistry
+
+let plasticTick = function (pixel) {
+ if (!pixel.colored) {
+ let rgb = elements[pixel.element].colorObject;
+
+ let coloroffset = Math.floor(Math.random() * (Math.random() > 0.5 ? -1 : 1) * Math.random() * 2);
+ let r = rgb.r + coloroffset;
+ let g = rgb.g + coloroffset;
+ let b = rgb.b + coloroffset;
+ pixel.color = "rgb(" + r + "," + g + "," + b + ")";
+ pixel.colored = true;
+ pixel.origColor = pixel.color.match(/\d+/g);
+ }
+};
+
+chemjsChemicals.methane = {
+ elementNames: ["methane_ice", "liquid_methane", "methane"],
+};
+
+chemjsChemicals.methanol = {
+ elem: {
+ color: "#969380",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 792,
+ burn: 100,
+ burnTime: 3,
+ fireColor: ["#80acf0", "#96cdfe", "#bee6d4"],
+ viscosity: 0.545,
+ },
+ tempLow: [-97.6],
+ tempHigh: [64.7, 385],
+ stateHigh: [null, ["fire"]],
+ densityHigh: [1.332],
+};
+
+chemjsChemicals.ethane = {
+ elem: {
+ color: "#afafaf",
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 1.356,
+ burn: 85,
+ burnTime: 5,
+ fireColor: ["#00ffff", "#00ffdd"],
+ },
+ tempLow: [-88.5, -142],
+ densityLow: [544],
+ tempHigh: [400],
+ stateHigh: [["fire"]],
+};
+
+chemjsChemicals.ethanol = {
+ elementNames: ["alcohol", "alcohol_gas", "alcohol_ice"],
+};
+
+chemjsChemicals.ethylene = {
+ elem: {
+ color: "#afafaf",
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 1.178,
+ burn: 100,
+ burnTime: 5,
+ fireColor: ["#00ffff", "#00ffdd"],
+ },
+ tempLow: [-103.7, -154.4],
+ densityLow: [567],
+ tempHigh: [400],
+ stateHigh: [["fire"]],
+};
+
+chemjsChemicals.polyethylene = {
+ elem: {
+ color: "#a7a7a7",
+ behavior: behaviors.WALL,
+ properties: { colored: false },
+ tick: plasticTick,
+ category: "solids",
+ state: "solid",
+ density: 1450,
+ },
+ tempHigh: [125],
+ causticIgnore: true,
+};
+
+chemjsChemicals.propane = {
+ elementNames: ["propane", "liquid_propane", "propane_ice"],
+};
+
+elements.liquid_propane.density = 493;
+
+chemjsChemicals.acetic_acid = {
+ elementNames: ["vinegar", "frozen_vinegar"],
+ reactionProduct: { cationAcid: "hydrogen_ion", anionAcid: "acetate" },
+ categories: ["acids", "hydrogen_ion", "acetate"],
+};
+
+chemjsChemicals.tetrafluoroethylene = {
+ elem: {
+ color: "#8f8f8f",
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 4.16,
+ burn: 100,
+ burnTime: 2,
+ hidden: true,
+ },
+ tempLow: [-76, -142],
+ densityLow: [1519],
+ causticIgnore: true,
+ toxic: [0.2],
+};
+
+chemjsChemicals.polytetrafluoroethylene = {
+ elem: {
+ color: "#efefef",
+ behavior: behaviors.WALL,
+ properties: { colored: false },
+ tick: plasticTick,
+ category: "solids",
+ state: "solid",
+ density: 1450,
+ },
+ tempHigh: [327],
+ causticIgnore: true,
+};
+
+chemjsChemicals.chloroform = {
+ elem: {
+ color: "#7f7f7f",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 1564,
+ viscosity: 0.563,
+ },
+ tempLow: [-63],
+ densityHigh: [1.489],
+ tempHigh: [61],
+ causticIgnore: true,
+ toxic: [0.1],
+};
+
+chemjsChemicals.chloroethane = {
+ elem: {
+ color: "#afdfaf",
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 2.879,
+ burn: 85,
+ burnTime: 5,
+ fireColor: ["#00ffff", "#00ffdd"],
+ },
+ tempLow: [12.27, -138.7],
+ densityLow: [921],
+ tempHigh: [510],
+ stateHigh: [["fire"]],
+};
+
+chemjsChemicals.diethylaluminium_chloride = {
+ elem: {
+ color: "#7faf7f",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 960,
+ hidden: true,
+ burn: 100,
+ burnTime: 500,
+ fireColor: ["#ffffff"],
+ },
+ tempLow: [-74],
+ densityHigh: [2.879],
+ tempHigh: [125, 175],
+ stateHigh: [null, ["fire"]],
+ toxic: [0.1],
+};
+
+chemjsChemicals.radium_water = {
+ elem: {
+ color: "#3bc4ff",
+ behavior: ["XX|CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+ category: "liquids",
+ state: "liquid",
+ density: 1100,
+ hidden: true,
+ },
+ tempLow: [0],
+ densityHigh: [2.879],
+ tempHigh: [100],
+ stateHigh: [["rad_steam"]],
+ toxic: [0.1],
+ categories: ["water"],
+};
+
+chemjsChemicals.tennessine_monofluoride = {
+ elem: {
+ color: [blendColors("#4a4123", "#ff0000", 0.25), blendColors("#4a4123", "#00ff00", 0.25), blendColors("#4a4123", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 5200,
+ hidden: true,
+ stain: 0.2,
+ },
+ tempLow: [5], //made up
+ densityHigh: [13.012],
+ tempHigh: [130],
+ toxic: [0.1],
+};
+
+chemjsChemicals.tennessine_trifluoride = {
+ elem: {
+ color: [blendColors("#ffc400", "#ff0000", 0.25), blendColors("#ffc400", "#00ff00", 0.25), blendColors("#ffc400", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+ density: 5600,
+ hidden: true,
+ stain: 0.3,
+ },
+ tempLow: [3], //made up
+ densityHigh: [14.591],
+ tempHigh: [105],
+ toxic: [0.1],
+};
+
+chemjsChemicals.oganesson_difluoride = {
+ elem: {
+ color: [blendColors("#e3e2de", "#ff0000", 0.25), blendColors("#e3e2de", "#00ff00", 0.25), blendColors("#e3e2de", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 6100,
+ hidden: true,
+ },
+ tempHigh: [160], //made up
+ toxic: [0.1],
+};
+
+chemjsChemicals.oganesson_tetrafluoride = {
+ elem: {
+ color: [blendColors("#d6d5d2", "#ff0000", 0.25), blendColors("#d6d5d2", "#00ff00", 0.25), blendColors("#d6d5d2", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 6300,
+ hidden: true,
+ },
+ tempHigh: [120], //made up
+ toxic: [0.1],
+};
+
+chemjsChemicals.oganesson_tetratennesside = {
+ elem: {
+ color: [blendColors("#f7f7f5", "#ff0000"), blendColors("#f7f7f5", "#00ff00"), blendColors("#f7f7f5", "#0000ff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ density: 13800,
+ hidden: true,
+ },
+ tempHigh: [180], //made up
+ stateHigh: [["molten_stable_oganesson", "stable_tennessine"]],
+ toxic: [0.1],
+};
+
+//whuh
+elements.acid_cloud.behavior = ["XX|XX|XX", "XX|CH:generic_acid%0.05|M1%2.5 AND BO", "XX|XX|XX"];
+elements.acid_cloud.behavior = ["XX|XX|XX", "XX|CH:generic_acid%0.05|M1%2.5 AND BO", "XX|XX|XX"];
+
+elements.base_cloud = {
+ color: "#78636a",
+ behavior: ["XX|XX|XX", "XX|CH:base%0.05|M1%2.5 AND BO", "XX|XX|XX"],
+ reactions: {
+ fire_cloud: { elem1: "electric", elem2: "fire" },
+ smoke: { elem2: "pyrocumulus", chance: 0.05, y: [0, 12], setting: "clouds" },
+ ash: { elem2: "pyrocumulus", chance: 0.05, y: [0, 12], setting: "clouds" },
+ balloon: { elem2: "pop" },
},
- tempLow: -152,
category: "gases",
+ burn: 15,
+ burnTime: 5,
state: "gas",
- density: 1.34,
+ density: 0.7,
+ ignoreAir: true,
};
-toxic("nitric_oxide", 0.1);
-
-elements.liquid_nitric_oxide = {
- tempLow: -164,
- hidden: true,
-};
-elements.nitrogen_dioxide = {
- color: "#964B00",
- behavior: behaviors.GAS,
+elements.disinfectant = {
+ color: "#2d004f",
+ behavior: behaviors.LIQUID,
reactions: {
- steam: { elem1: "smog", elem2: null, chance: 0.01 },
+ blood: { elem1: null, elem2: "water" },
+ dirty_water: { elem2: "water" },
+ plague: { elem2: null },
+ virus: { elem2: null },
+ infection: { elem2: null },
+ mushroom_spore: { elem2: null },
+ lichen: { elem2: null },
+ rotten_meat: { elem2: "meat" },
+ rotten_cheese: { elem2: "cheese" },
+ stench: { elem2: null },
+ cancer: { elem2: null, chance: 0.01 },
+ rat: { elem2: null, chance: 0.01 },
+ ant: { elem2: "dead_bug", chance: 0.1 },
+ bee: { elem2: "dead_bug", chance: 0.1 },
+ fly: { elem2: "dead_bug", chance: 0.1 },
+ firefly: { elem2: "dead_bug", chance: 0.1 },
+ worm: { elem2: "dead_bug", chance: 0.1 },
+ flea: { elem2: "dead_bug", chance: 0.1 },
+ termite: { elem2: "dead_bug", chance: 0.1 },
+ stink_bug: { elem2: "dead_bug", chance: 0.1 },
},
- temp: 30,
- tempLow: 21.15,
- category: "gases",
- state: "gas",
- density: 1.88,
+ tempHigh: 100,
+ tempLow: 0,
+ stateHigh: ["steam", "iodine"],
+ state: "liquid",
+ category: "liquids",
+ density: 1020,
+ stain: 0.01,
};
-toxic("nitrogen_dioxide", 0.2);
-
-runAfterLoad(function () {
- reactList("nitrogen_dioxide", eLists.WATER, { elem1: "nitric_oxide", elem2: "nitric_acid" });
- reactList("liquid_nitrogen_dioxide", eLists.WATER, { elem1: "nitric_oxide", elem2: "nitric_acid" });
- reactList("nitric_acid", eLists.WATER, { elem2: "dirty_water" });
- reactList("nitric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
- delete elements.nitric_acid.reactions["dirty_water"];
- delete elements.nitric_acid_gas.reactions["dirty_water"];
-});
-
-elements.liquid_nitrogen_dioxide = {
- tempLow: -9.3,
- hidden: true,
- reactions: structuredClone(elements.nitrogen_dioxide.reactions),
+elements.soy_sauce = {
+ color: "#470500",
+ behavior: behaviors.LIQUID,
+ tempLow: -5,
+ tempHigh: 105,
+ state: "liquid",
+ category: "liquids",
+ density: 1200,
+ stain: 0.5,
+ stateHigh: ["steam", "steam", "steam", "steam", "salt"],
};
-if (enabledMods.includes("mods/generative_mods.js")) {
- elements["nitrogen_dioxide"].reactions["rain_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["snow_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["hail_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["pyrocumulus"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["fire_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["thunder_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
-} else {
- elements["nitrogen_dioxide"].reactions["rain_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["snow_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["hail_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["pyrocumulus"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["fire_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
- elements["nitrogen_dioxide"].reactions["thunder_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
-}
-
-acidIgnore(["nitric_oxide", "liquid_nitric_oxide", "nitric_oxide_ice", "nitrogen_dioxide", "liquid_nitrogen_dioxide", "nitrogen_dioxide_ice"]);
-
-elements.fertilizer = {
- color: "#e6c3a1",
- behavior: behaviors.POWDER,
- reactions: {
- plant: { elem1: "plant", chance: 0.05 },
- wheat_seed: { elem1: "wheat", chance: 0.05 },
- grass: { elem1: "grass", chance: 0.05 },
- grass_seed: { elem1: "grass", chance: 0.05 },
- bamboo_plant: { elem1: "bamboo", chance: 0.05 },
- flower_seed: { elem1: "flower_seed", chance: 0.05 },
- petal: { elem1: "flower_seed", chance: 0.05 },
- vine: { elem1: "vine", chance: 0.05 },
- sapling: { elem1: "tree_branch", chance: 0.05 },
- tree_branch: { elem1: "tree_branch", chance: 0.05 },
- corn_seed: { elem1: "corn", chance: 0.05 },
- root: { elem1: "root", chance: 0.05 },
- dirt: { elem1: "grass", chance: 0.05 },
- mud: { elem1: "grass", chance: 0.05 },
- potato_seed: { elem1: "potato", chance: 0.05 },
- yeast: { elem1: "yeast", chance: 0.05 },
- },
- tempHigh: 169.6,
- stateHigh: "fire",
- category: "powders",
- state: "solid",
- density: 1725,
-};
-
-elements.ammonia.reactions["oxygen"] = { elem1: "steam", elem2: "nitric_oxide" };
-
-elements.supernova.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,molten_iron,molten_uranium,molten_lead,oxygen,molten_sodium,sulfur_gas,fluorine,neon,molten_potassium,chlorine,molten_calcium,molten_titanium,molten_nickel,molten_copper,molten_zinc,gallium_gas,bromine_gas,iodine_gas AND CH:neutronium,neutronium,quark_matter,void|XX", "XX|XX|XX"];
+elements.supernova.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,molten_iron,molten_uranium,molten_lead,oxygen,molten_sodium,sulfur_gas,fluorine,neon,molten_potassium,molten_magnesium,molten_aluminum,chlorine,molten_calcium,molten_titanium,molten_nickel,molten_copper,molten_zinc,gallium_gas,bromine_gas,iodine_gas AND CH:neutronium,neutronium,quark_matter,void|XX", "XX|XX|XX"];
elements.gamma_ray_burst = {
color: ["#fbf8ff", "#fbf3ff", "#f8f7ff"],
@@ -913,8 +6437,15 @@ elements.liquid_neutronium = {
excludeRandom: true,
};
+chemjsChemicals.neutronium = {
+ elementNames: ["neutronium", "liquid_neutronium"],
+};
+chemjsChemicals.quark_matter = {
+ elementNames: ["quark_matter"],
+};
+
elements.liquid_helium.behavior2 = ["XX|XX|XX".split("|"), "M1|XX|M1".split("|"), "M1|M1|M1".split("|")];
-elements.liquid_helium.behavior = null;
+delete elements.liquid_helium.behavior;
elements.liquid_helium.tick = function (pixel) {
if (Math.random() < 0.9) {
@@ -948,1453 +6479,8 @@ elements.quark_matter = {
excludeRandom: true,
};
-elements.sulfur.burnInto = ["sulfur_dioxide"];
-elements.molten_sulfur.burnInto = ["sulfur_dioxide"];
-elements.sulfur_gas.burnInto = ["sulfur_dioxide"];
-elements.sulfur.reactions["hydrogen"] = { elem1: "hydrogen_sulfide", elem2: null };
-
-elements.sulfur_dioxide = {
- color: "#FFF700",
- behavior: behaviors.GAS,
- reactions: {
- steam: { elem1: null, elem2: ["sulfuric_acid_gas", null, null, null, null] },
- acid_gas: { elem1: null, elem2: ["sulfuric_acid_gas", null, null, null, null] },
- //clouds
- rain_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- snow_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- hail_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- pyrocumulus: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- fire_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- },
- tempLow: -10,
- stateLow: "liquid_sulfur_dioxide",
- state: "gas",
- category: "gases",
- density: 2.6,
-};
-
-toxic("sulfur_dioxide", 0.1);
-
-runAfterLoad(function () {
- reactList("sulfur_dioxide", eLists.WATER, { elem1: null, elem2: ["sulfuric_acid_gas", null, null, null, null] });
-});
-
-elements.liquid_sulfur_dioxide = {
- color: "#d1cb17",
- behavior: behaviors.LIQUID,
- category: "liquids",
- reactions: elements.sulfur_dioxide.reactions,
- tempHigh: -10,
- temp: -15,
- tempLow: -72,
- stateHigh: "sulfur_dioxide",
- state: "liquid",
- hidden: true,
- density: 1435,
-};
-
-elements.hydrogen_sulfide = {
- color: "#d9e366",
- behavior: behaviors.GAS,
- reactions: {
- oxygen: { elem2: "stench" },
- nitrogen: { elem2: "stench" },
- baking_soda: { elem1: null },
- },
- category: "gases",
- tempHigh: 1000,
- stateHigh: "fire",
- state: "gas",
- density: 1.539,
- tempLow: -59.55,
- burn: 1,
- burnTime: 10,
- burnInto: ["sulfur_dioxide", "steam"],
- fireColor: ["#8180CC", "#7F84E6"],
-};
-toxic("hydrogen_sulfide", 0.2);
-
-runAfterLoad(function () {
- reactList("hydrogen_sulfide", eLists.WATER, { elem1: null, elem2: "dirty_water" });
- delete elements.hydrogen_sulfide.reactions["dirty_water"];
- delete elements.hydrogen_sulfide.reactions["iron_dichloride_solution"];
-});
-
-acidIgnore(["sulfur_dioxide", "liquid_sulfur_dioxide", "sulfur_dioxide_ice"]);
-
-elements.acid.ignore.push("liquid_hydrogen_sulfide");
-elements.acid_gas.ignore.push("liquid_hydrogen_sulfide");
-
-acidReact("acid", "pyrite", "iron_dichloride_solution", "hydrogen_sulfide", 50);
-acidReact("acid_gas", "pyrite", "iron_dichloride_solution", "hydrogen_sulfide", 50);
-
-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;
-}
-
-createSalt("iron_dichloride", "iron_dichloride_solution", ["#207d09", "#b51259"], [blendColors("#207d09", "#2167ff", 0.5), blendColors("#b51259", "#2167ff", 0.5)], false, true, 307.6, -2, 102, 2900, 1030, "IRONII", "CHLORIDE");
-
-createAcid("sulfuric_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#e9e05e", "#c2bd7a", "#9e9c7b"], false, false, 337, 337, 10, 500, 1830, 1.26, "SULFATE", { compound: "acid", dontDirtyWater: true });
-
-elements.sulfuric_acid.ignore.push("charcoal");
-elements.sulfuric_acid_gas.ignore.push("charcoal");
-
-runAfterLoad(function () {
- reactList("sulfuric_acid", eLists.WATER, { elem2: "dirty_water" });
- reactList("sulfuric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
- delete elements.sulfuric_acid.reactions["dirty_water"];
- delete elements.sulfuric_acid_gas.reactions["dirty_water"];
-});
-elements.sulfuric_acid.reactions["grape"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["juice"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["corn"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["popcorn"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["potato"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["bread"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["toast"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["wheat"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["flour"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["dough"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["sugar"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid.reactions["candy"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-delete elements.sulfuric_acid.reactions["charcoal"];
-elements.sulfuric_acid_gas.reactions["chocolate"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["grape"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["juice"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["corn"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["popcorn"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["potato"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["bread"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["toast"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["wheat"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["flour"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["dough"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["sugar"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-elements.sulfuric_acid_gas.reactions["candy"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
-delete elements.sulfuric_acid_gas.reactions["charcoal"];
-
-acidReact("sulfuric_acid", "magnesium_oxide", "epsom_salt", null, 50);
-acidReact("sulfuric_acid_gas", "magnesium_oxide", "epsom_salt", null, 50);
-
-eLists.ACID.push("sulfuric_acid");
-eLists.ACIDGAS.push("sulfuric_acid_gas");
-
-elements.polytetrafluoroethylene = {
- color: "#efefef",
- behavior: behaviors.WALL,
- properties: {
- colored: false,
- },
- tick: function (pixel) {
- if (!pixel.colored || !pixel.origColor) {
- let rgb = elements.polytetrafluoroethylene.colorObject;
-
- let coloroffset = Math.floor(Math.random() * (Math.random() > 0.5 ? -1 : 1) * Math.random() * 2);
- let r = rgb.r + coloroffset;
- let g = rgb.g + coloroffset;
- let b = rgb.b + coloroffset;
- pixel.color = "rgb(" + r + "," + g + "," + b + ")";
- pixel.colored = true;
- pixel.origColor = pixel.color.match(/\d+/g);
- }
- if (pixel.origColor != pixel.color) {
- pixel.color = "rgb(" + pixel.origColor.join(",") + ")";
- }
- },
- state: "solid",
- category: "solids",
- density: 1450,
- tempHigh: 327,
-};
-acidIgnore(["polytetrafluoroethylene", "molten_polytetrafluoroethylene", "tetrafluoroethylene"]);
-
-doStaining = function (pixel) {
- if (settings["stainoff"]) {
- return;
- }
- var stain = elements[pixel.element].stain;
- let newColor = null;
- if (stain > 0) {
- newColor = pixel.color.match(/\d+/g);
- } else {
- newColor = null;
- }
-
- for (var i = 0; i < adjacentCoords.length; i++) {
- var x = pixel.x + adjacentCoords[i][0];
- var y = pixel.y + adjacentCoords[i][1];
- if (!isEmpty(x, y, true)) {
- var newPixel = pixelMap[x][y];
- if ((elements[pixel.element].ignore && elements[pixel.element].ignore.indexOf(newPixel.element) !== -1) || newPixel.element == "polytetrafluoroethylene") {
- continue;
- }
- if ((elements[newPixel.element].id !== elements[pixel.element].id || elements[newPixel.element].stainSelf) && (solidStates[elements[newPixel.element].state] || elements[newPixel.element].id === elements[pixel.element].id)) {
- if (Math.random() < Math.abs(stain)) {
- if (stain < 0) {
- if (newPixel.origColor) {
- newColor = newPixel.origColor;
- } else {
- continue;
- }
- } else if (!newPixel.origColor) {
- newPixel.origColor = newPixel.color.match(/\d+/g);
- }
- // if newPixel.color doesn't start with rgb, continue
- if (!newPixel.color.match(/^rgb/)) {
- continue;
- }
- // parse rgb color string of newPixel rgb(r,g,b)
- var rgb = newPixel.color.match(/\d+/g);
- let avg = [];
- if (elements[pixel.element].stainSelf && elements[newPixel.element].id === elements[pixel.element].id) {
- // if rgb and newColor are the same, continue
- if (rgb[0] === newColor[0] && rgb[1] === newColor[1] && rgb[2] === newColor[2]) {
- continue;
- }
- for (var j = 0; j < rgb.length; j++) {
- avg[j] = Math.round(rgb[j] * (1 - Math.abs(stain)) + newColor[j] * Math.abs(stain));
- }
- } else {
- // get the average of rgb and newColor, more intense as stain reaches 1
- for (let j = 0; j < rgb.length; j++) {
- avg[j] = Math.floor(rgb[j] * (1 - Math.abs(stain)) + newColor[j] * Math.abs(stain));
- }
- }
- // set newPixel color to avg
- newPixel.color = "rgb(" + avg.join(",") + ")";
- }
- }
- }
- }
-};
-elements["bleach"].reactions.vinegar = { elem1: "chlorine", elem2: null };
-elements["bleach"].reactions.alcohol = { elem1: "chloroform", elem2: null };
-elements["chlorine"].reactions.methane = { elem1: "chloroform", elem2: null };
-
-elements.chloroform = {
- color: "#7f7f7f",
- behavior: behaviors.LIQUID,
- reactions: elements.poison.reactions,
- state: "liquid",
- category: "liquids",
- density: 1564,
- tempLow: -63,
- tempHigh: 61,
-};
-
-elements.chloroform_gas = {
- color: "#8f8f8f",
- behavior: behaviors.GAS,
- reactions: elements.poison.reactions,
- state: "gas",
- hidden: true,
- density: 4.12,
- tempLow: 61,
- stateLow: "chloroform",
-};
-
-elements["chloroform_gas"].reactions.hydrogen_fluoride = { elem1: "tetrafluoroethylene", elem2: null, tempMin: 550 };
-
-elements.tetrafluoroethylene = {
- color: "#8f8f8f",
- behavior: behaviors.GAS,
- reactions: {
- oxygen: { elem1: "fire", elem2: "fire" },
- sulfuric_acid: { elem1: "polytetrafluoroethylene", elem2: "sulfuric_acid", chance: 0.25 },
- sulfuric_acid_gas: { elem1: "polytetrafluoroethylene", elem2: "sulfuric_acid_gas", chance: 0.25 },
- },
- state: "gas",
- hidden: true,
- burn: 100,
- burnTime: 2,
- density: 1.52,
- category: "gases",
-};
-
-elements.methanol = {
- color: "#969380",
- behavior: behaviors.LIQUID,
- reactions: {
- plant: { elem2: "dead_plant", elem1: null, chance: 0.05 },
- cell: { elem2: [null, "dna"], chance: 0.075 },
- blood: { elem2: [null, "dna"], chance: 0.075 },
- antibody: { elem2: [null, "dna"], chance: 0.075 },
- infection: { elem2: [null, "dna"], chance: 0.075 },
- cancer: { elem2: [null, "dna"], chance: 0.0375 },
- flea: { elem2: "dead_bug", elem1: null },
- termite: { elem2: "dead_bug", elem1: null },
- ant: { elem2: "dead_bug", elem1: null },
- frog: { elem2: "meat", chance: 0.05 },
- evergreen: { elem2: "dead_plant", chance: 0.05 },
- cactus: { elem2: "dead_plant", chance: 0.05 },
- paper: { elem2: "cellulose" },
- primordial_soup: { elem2: "water" },
- },
- state: "liquid",
- category: "liquids",
- density: 792,
- tempLow: -97.6,
- tempHigh: 64.7,
- burn: 100,
- burnTime: 3,
- fireColor: ["#80acf0", "#96cdfe", "#bee6d4"],
-};
-
-elements.carbon_dioxide.reactions.hydrogen = { elem1: "steam", elem2: "methanol", tempMin: 100 };
-
-elements.polyethylene = {
- color: "#a7a7a7",
- behavior: behaviors.WALL,
- properties: {
- colored: false,
- },
- tick: function (pixel) {
- if (!pixel.colored) {
- let rgb = elements.polyethylene.colorObject;
-
- let coloroffset = Math.floor(Math.random() * (Math.random() > 0.5 ? -1 : 1) * Math.random() * 2);
- let r = rgb.r + coloroffset;
- let g = rgb.g + coloroffset;
- let b = rgb.b + coloroffset;
- pixel.color = "rgb(" + r + "," + g + "," + b + ")";
- pixel.colored = true;
- pixel.origColor = pixel.color.match(/\d+/g);
- }
- },
- state: "solid",
- category: "solids",
- density: 1450,
- tempHigh: 125,
-};
-
-elements.ethane = {
- color: "#afafaf",
- behavior: behaviors.GAS,
- reactions: {
- steam: { elem1: "hydrogen", elem2: "ethylene", chance: 0.01 },
- chlorine: { elem1: "chloroethane", elem2: null, chance: 0.01 },
- },
- category: "gases",
- tempHigh: 400,
- stateHigh: "fire",
- tempLow: -88.5,
- burn: 85,
- burnTime: 5,
- fireColor: ["#00ffff", "#00ffdd"],
- state: "gas",
- density: 1.356,
-};
-
-elements.chloroethane = {
- color: "#afdfaf",
- behavior: behaviors.GAS,
- reactions: {
- aluminum: { elem1: "diethylaluminium_chloride", elem2: null, chance: 0.1 },
- },
- category: "gases",
- tempHigh: 510,
- stateHigh: "fire",
- tempLow: 12.27,
- burn: 85,
- burnTime: 5,
- fireColor: ["#00ffff", "#00ffdd"],
- state: "gas",
- density: 2.879,
-};
-
-elements.diethylaluminium_chloride = {
- color: "#7faf7f",
- behavior: behaviors.LIQUID,
- category: "liquids",
- hidden: true,
- tempHigh: 125,
- stateHigh: "fire",
- tempLow: -74,
- burn: 85,
- burnTime: 10,
- state: "liquid",
- density: 2.879,
- reactions: {},
-};
-
-toxic("diethylaluminium_chloride", 0.1);
-
-elements.ethylene = {
- color: "#a7a7a7",
- behavior: behaviors.GAS,
- reactions: {
- titanium_trichloride: { elem1: "polyethylene", chance: 0.1 },
- acid_gas: { elem1: "chloroethane", elem2: null },
- diethylaluminium_chloride: { elem1: "polyethylene", chance: 0.1 },
- },
- category: "gases",
- tempHigh: 400,
- stateHigh: "fire",
- tempLow: -103.7,
- burn: 85,
- burnTime: 5,
- fireColor: ["#00ffff", "#00ffdd"],
- state: "gas",
- density: 1.356,
-};
-
-elements.liquid_ethylene = {
- tempHigh: -103.7,
- stateHigh: "ethylene",
- tempLow: -154.4,
-};
-elements.liquid_ethane = {
- tempHigh: -88.5,
- stateHigh: "ethane",
- tempLow: -128.2,
-};
-
-elements.liquid_ethylene = {
- tempHigh: -103.7,
- stateHigh: "ethylene",
- tempLow: -169.2,
-};
-elements.liquid_ethane = {
- tempHigh: -88.5,
- stateHigh: "ethane",
- tempLow: -182.8,
-};
-
-elements.liquid_chloroethane = {
- tempHigh: -12.27,
- stateHigh: "chloroethane",
- tempLow: -138.7,
-};
-
-elements.liquid_propane = {
- tempHigh: -42.25,
- stateHigh: "propane",
- tempLow: -187.7,
-};
-
-elements.acid.ignore.push("ethylene", "ethylene_ice", "liquid_ethylene", "chloroethane", "chloroethane_ice", "liquid_chloroethane");
-elements.acid_gas.ignore.push("ethylene", "ethylene_ice", "liquid_ethylene", "chloroethane", "chloroethane_ice", "liquid_chloroethane");
-
-elements.titanium = {
- color: "#e3e5e6",
- category: "solids",
- density: 4500,
- state: "solid",
- behavior: behaviors.WALL,
- reactions: {
- acid: { elem1: "titanium_trichloride", elem2: null },
- },
- stateHigh: "molten_titanium",
- tempHigh: 1668,
- conduct: 0.5,
- hardness: 0.7,
- forceAutoGen: true,
-};
-elements.molten_titanium = {
- color: ["#e0921d", "#e89e2e", "#f7b24a", "#fce168", "#fceca2", "#fffcf0"],
- viscosity: 10000,
-};
-
-elements.rutile = {
- color: "#522614",
- behavior: behaviors.POWDER,
- category: "land",
- density: 4240,
- state: "solid",
- tempHigh: 1843,
- stateHigh: "molten_rutile",
- forceAutoGen: true,
-};
-elements.molten_rutile = {
- color: ["#e3907f", "#e68f3e"],
- reactions: {
- chlorine: { elem1: "titanium_tetrachloride", elem2: null },
- },
- viscosity: 10000,
-};
-elements.titanium_tetrachloride = {
- color: "#d9d7b2",
- behavior: behaviors.LIQUID,
- category: "liquids",
- density: 1728,
- state: "liquid",
- tempHigh: 136.4,
- stateHighName: "titanium_tetrachloride_gas",
- tempLow: -24,
- stateLowName: "solid_titanium_tetrachloride",
- reactions: {}
-};
-eListAddIon("TITANIUMIV", "solid_titanium_tetrachloride");
-eListAddIon("CHLORIDE", "solid_titanium_tetrachloride");
-eListAddIon("TITANIUMIV", "titanium_tetrachloride");
-eListAddIon("CHLORIDE", "titanium_tetrachloride");
-eListAddIon("TITANIUMIV", "titanium_tetrachloride_gas");
-eListAddIon("CHLORIDE", "titanium_tetrachloride_gas");
-eListAdd("INSOLUBLE", "titanium_tetrachloride");
-
-elements.titanium_tetrachloride_gas = {
- behavior: behaviors.GAS,
- hidden: true,
- category: "gases",
- density: 500,
- state: "gas",
- temp: 200,
- tempLow: 136.4,
- stateLow: "titanium_tetrachloride",
- reactions: {}
-};
-
-toxic("titanium_tetrachloride", 0.1);
-toxic("titanium_tetrachloride_gas", 0.1);
-elements.solid_titanium_tetrachloride = {
- behavior: behaviors.WALL,
- hidden: true,
- category: "solids",
- density: 1728,
- state: "solid",
- temp: -50,
- tempHigh: -24,
- stateHigh: "titanium_tetrachloride",
-};
-
-createSalt("titanium_trichloride", "titanium_trichloride_solution", "#c71585", blendColors("#c71585", "#2167ff", 0.4), false, true, 440, -2, 102, 2640, 1020, "TITANIUMIII", "CHLORIDE");
-
-elements["titanium_trichloride"].behavior = behaviors.SOLID;
-elements["titanium_trichloride"].category = "solids";
-elements["titanium_trichloride"].stateHigh = ["chlorine", "titanium_tetrachloride"];
-delete elements["molten_titanium_trichloride"];
-toxic("titanium_trichloride_solution", 0.1);
-toxic("titanium_trichloride", 0.1);
-
-elements.magnesium.burnInto = "magnesium_oxide";
-elements.molten_magnesium.burnInto = "magnesium_oxide";
-elements.molten_magnesium.reactions = {
- titanium_tetrachloride: { elem1: "titanium", elem2: "magnesium_chloride" },
- titanium_tetrachloride_gas: { elem1: "titanium", elem2: "magnesium_chloride" },
-};
-
-elements.magnesium_oxide = {
- color: "#f0f0f0",
- behavior: behaviors.POWDER,
- reactions: {
- quicklime: { elem1: "cement", elem2: null },
- },
- category: "powders",
- density: 3600,
- state: "solid",
- tempHigh: 2852,
-};
-
-eListAdd("INSOLUBLE", "magnesium_oxide");
-eListAddIon("MAGNESIUM", "magnesium_oxide");
-eListAddIon("OXIDE", "magnesium_oxide");
-eListAddIon("MAGNESIUM", "molten_magnesium_oxide");
-eListAddIon("OXIDE", "molten_magnesium_oxide");
-
-elements.molten_magnesium_chloride = {
- behaviorOn: ["XX|CR:fire%2.5|XX", "M2|CH:chlorine,magnesium%25|M2", "M1|M1|M1"],
- conduct: 0.3,
-};
-
-createSalt("magnesium_chloride", "magnesium_chloride_solution", "#bfbfbf", blendColors("#bfbfbf", "#2167ff", 0.75), false, true, 714, -2, 102, 2320, 1015, "MAGNESIUM", "CHLORIDE");
-
-elements.magnesium_chloride.forceAutoGen = true;
-
-elements.francium = {
- color: "#3eff3b",
- behavior: ["XX|CR:radiation%50|XX", "CR:radiation%50|CH:radon%0.1|CR:radiation%50", "M2|M1|M2"],
- tick: function (pixel) {
- pixel.temp += 5;
- },
- reactions: {
- steam: { elem1: "radon", elem2: [null, null, "rad_pop"] },
- rad_steam: { elem1: "radon", elem2: [null, null, "rad_pop"] },
- quark_matter: { elem1: "stable_francium", elem2: "quark_matter" },
- },
- tempHigh: 27,
- category: "powders",
- state: "solid",
- density: 2480,
- conduct: 0.7,
-};
-
-runAfterLoad(function () {
- reactList("francium", eLists.WATER, { elem1: "radon", elem2: [null, null, "rad_pop"] });
-});
-
-elements.molten_francium = {
- behavior: ["XX|CR:radiation%50|XX", "M2 AND CR:radiation%50|CH:radon%0.1|M2 AND CR:radiation%50", "M1|M1|M1"],
- tick: function (pixel) {
- pixel.temp += 5;
- },
- reactions: {
- steam: { elem1: "radon", elem2: [null, null, "rad_pop"] },
- rad_steam: { elem1: "radon", elem2: [null, null, "rad_pop"] },
- quark_matter: { elem1: "stable_francium", elem2: "quark_matter" },
- },
- tempLow: 27,
- hidden: true,
- state: "liquid",
- density: 2480,
- conduct: 0.7,
-};
-
-runAfterLoad(function () {
- reactList("molten_francium", eLists.WATER, { elem1: "radon", elem2: [null, null, "rad_pop"] });
-});
-
-elements.astatine = {
- color: "#5a5e5a",
- behavior: ["XX|CR:radiation%50|XX", "CR:radiation%50|CH:polonium,big_pop%0.1|CR:radiation%50", "M2|M1|M2"],
- tick: function (pixel) {
- pixel.temp += 5;
- },
- reactions: {
- quark_matter: { elem1: "stable_astatine", elem2: "quark_matter" },
- },
- tempHigh: 301,
- category: "powders",
- state: "solid",
- density: 8910,
-};
-elements.molten_astatine = {
- color: "#aab0a0",
- behavior: ["XX|CR:radiation%50|XX", "M2 AND CR:radiation%50|CH:polonium,big_pop%0.1|M2 AND CR:radiation%50", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "molten_stable_astatine", elem2: "quark_matter" },
- },
- tick: function (pixel) {
- pixel.temp += 5;
- },
- tempLow: 301,
- hidden: true,
- state: "liquid",
- density: 8910,
- tempHigh: 336,
-};
-elements.astatine_gas = {
- behavior: behaviors.GAS,
- behavior2: [
- ["XX", "CR:radiation%50", "XX"],
- ["CR:radiation%50", "CH:polonium,big_pop%0.1", "CR:radiation%50"],
- ["XX", "CR:radiation%50", "XX"],
- ],
- reactions: {
- quark_matter: { elem1: "molten_stable_astatine", elem2: "quark_matter" },
- },
- tick: function (pixel) {
- pixel.temp += 5;
- pixelTick(pixel, elements[pixel.element].behavior2);
- },
-};
-
-elements.radon = {
- color: "#b6ffb5",
- behavior: ["M2|M1 AND CR:radiation%10|M2", "M1 AND CR:radiation%10|CH:polonium%0.1|M1 AND CR:radiation%10", "M2|M1 AND CR:radiation%10|M2"],
- reactions: {
- quark_matter: { elem1: "stable_radon", elem2: "quark_matter" },
- },
- tick: function (pixel) {
- pixel.temp += 1;
- },
- category: "gases",
- state: "gas",
- density: 9.73,
- colorOn: ["#b224ff", "#cc6caa", "#a16ccc"],
- conduct: 0.86,
-};
-
-elements.polonium = {
- color: "#56b870",
- behavior: ["XX|CR:radiation%10|XX", "CR:radiation%10|CH:lead%0.1|CR:radiation%10", "XX|CR:radiation%10|XX"],
- reactions: {
- quark_matter: { elem1: "stable_polonium", elem2: "quark_matter" },
- },
- tick: function (pixel) {
- pixel.temp += 1;
- },
- tempHigh: 254,
- category: "solids",
- state: "solid",
- density: 9196,
- conduct: 0.21,
-};
-elements.molten_polonium = {
- color: ["#ace638", "#acb838", "#ac8a00"],
- behavior: ["XX|CR:fire AND CR:radiation%12.5|XX", "M2 AND CR:radiation%10|CH:lead%0.1|M2 AND CR:radiation%10", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "molten_stable_polonium", elem2: "quark_matter" },
- },
- tick: function (pixel) {
- pixel.temp += 1;
- },
- tempLow: 254,
- hidden: true,
- state: "liquid",
- density: 9196,
- conduct: 0.21,
-};
-
-elements.rad_pop = {
- color: ["#ffb48f", "#ffd991", "#ffad91"],
- behavior: ["XX|XX|XX", "XX|EX:10>fire,radiation,radiation|XX", "XX|XX|XX"],
- category: "energy",
- state: "gas",
- density: 1000,
- excludeRandom: true,
- hidden: true,
-};
-
-elements.stable_radon = {
- color: [blendColors("#b6ffb5", "#ff0000"), blendColors("#b6ffb5", "#00ff00"), blendColors("#b6ffb5", "#0000ff")],
- behavior: behaviors.GAS,
- category: "gases",
- state: "gas",
- density: 9.73,
- hidden: true,
- tempLow: -61.7,
- colorOn: ["#b224ff", "#cc6caa", "#a16ccc"],
- conduct: 0.86,
-};
-
-elements.liquid_stable_radon = {
- tempLow: -71,
- density: 4400,
- colorOn: ["#b224ff", "#cc6caa", "#a16ccc"],
- conduct: 0.86,
-};
-
-elements.stable_polonium = {
- color: [blendColors("#56b870", "#ff0000"), blendColors("#56b870", "#00ff00"), blendColors("#56b870", "#0000ff")],
- behavior: behaviors.WALL,
- reactions: {
- oxygen: { elem1: "polonium_dioxide", elem2: null },
- },
- tempHigh: 254,
- hidden: true,
- category: "solids",
- state: "solid",
- density: 9196,
- conduct: 0.21,
-};
-elements.molten_stable_polonium = {
- color: [blendColors("#ace638", "#ff0000"), blendColors("#acb838", "#00ff00"), blendColors("#ac8a00", "#0000ff")],
- behavior: behaviors.MOLTEN,
- reactions: {
- oxygen: { elem1: "polonium_dioxide", elem2: null },
- magnesium: { elem1: "magnesium_polonide", elem2: null },
- molten_magnesium: { elem1: "magnesium_polonide", elem2: null },
- },
- tempLow: 254,
- hidden: true,
- state: "liquid",
- density: 9196,
- conduct: 0.21,
-};
-
-elements.stable_astatine = {
- color: [blendColors("#5a5e5a", "#ff0000"), blendColors("#5a5e5a", "#00ff00"), blendColors("#5a5e5a", "#0000ff")],
- behavior: behaviors.POWDER,
- tempHigh: 301,
- reactions: {
- steam: { elem1: "hydroastatic_acid", elem2: null },
- rad_steam: { elem1: "hydroastatic_acid", elem2: null },
- },
- category: "powders",
- state: "solid",
- hidden: true,
- density: 8910,
-};
-
-runAfterLoad(function () {
- reactList("stable_astatine", eLists.WATER, { elem1: "hydroastatic_acid", elem2: null });
-});
-
-elements.molten_stable_astatine = {
- color: [blendColors("#aab0a0", "#ff0000"), blendColors("#aab0a0", "#00ff00"), blendColors("#aab0a0", "#0000ff")],
- behavior: behaviors.LIQUID,
- tempLow: 301,
- reactions: {
- steam: { elem1: "hydroastatic_acid", elem2: null },
- rad_steam: { elem1: "hydroastatic_acid", elem2: null },
- },
- hidden: true,
- state: "liquid",
- density: 8910,
- tempHigh: 336,
-};
-
-runAfterLoad(function () {
- reactList("molten_stable_astatine", eLists.WATER, { elem1: "hydroastatic_acid", elem2: null });
-});
-
-createAcid("hydroastatic_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), [blendColors("#5a5e5a", "#ff0000", 0.25), blendColors("#5a5e5a", "#00ff00", 0.25), blendColors("#5a5e5a", "#0000ff", 0.25)], true, true, 100, 100, 0, 1000, 1200, 1, "ASTATIDE", { compound: "acid", dontDirtyWater: true });
-
-elements.hydroastatic_acid.ignore.push("astatine", "molten_astatine", "stable_astatine", "molten_stable_astatine");
-elements.hydroastatic_acid_gas.ignore.push("astatine", "molten_astatine", "stable_astatine", "molten_stable_astatine");
-
-eLists.ACID.push("hydroastatic_acid");
-eLists.ACIDGAS.push("hydroastatic_acid_gas");
-
-runAfterLoad(function () {
- reactList("hydroastatic_acid", eLists.WATER, { elem2: "dirty_water" });
- reactList("hydroastatic_acid_gas", eLists.WATER, { elem2: "dirty_water" });
- delete elements.hydroastatic_acid.reactions["dirty_water"];
- delete elements.hydroastatic_acid_gas.reactions["dirty_water"];
-});
-
-elements.polonium_dioxide = {
- color: [blendColors("#ffff7f", "#ff0000"), blendColors("#ffff7f", "#00ff00"), blendColors("#ffff7f", "#0000ff")],
- behavior: behaviors.POWDER,
- tempHigh: 500,
- hidden: true,
- state: "solid",
- density: 8900,
- category: "powders",
-};
-
-eListAdd("INSOLUBLE", "polonium_dioxide");
-eListAddIon("POLONIUMIV", "polonium_dioxide");
-eListAddIon("OXIDE", "polonium_dioxide");
-eListAddIon("POLONIUMIV", "molten_polonium_dioxide");
-eListAddIon("OXIDE", "molten_polonium_dioxide");
-
-createSalt("magnesium_polonide", "magnesium_polonide_solution", [blendColors("#b5b5b5", "#ff0000", 0.25), blendColors("#b5b5b5", "#00ff00", 0.25), blendColors("#b5b5b5", "#0000ff", 0.25)], [blendColors("#2167ff", "#ff0000", 0.25), blendColors("#2167ff", "#00ff00", 0.25), blendColors("#2167ff", "#0000ff", 0.25)], true, true, 1800, -2, 102, 6700, 1050, "MAGNESIUM", "POLONIDE");
-
-acidReact("acid", "magnesium_polonide", "magnesium_chloride_solution", "polonium_hydride", 100);
-acidReact("acid_gas", "magnesium_polonide", "magnesium_chloride_solution", "polonium_hydride", 100);
-acidReact("acid", "molten_magnesium_polonide", "magnesium_chloride_solution", "polonium_hydride", 100);
-acidReact("acid_gas", "molten_magnesium_polonide", "magnesium_chloride_solution", "polonium_hydride", 100);
-elements.acid.ignore.push("polonium_hydride_ice", "polonium_hydride_gas", "magnesium_chloride");
-elements.acid_gas.ignore.push("polonium_hydride_ice", "polonium_hydride_gas", "magnesium_chloride");
-
-elements.polonium_hydride = {
- density: 2450,
- color: [blendColors("#838396", "#ff0000"), blendColors("#838396", "#00ff00"), blendColors("#838396", "#0000ff")],
- hidden: true,
- state: "liquid",
- behavior: behaviors.LIQUID,
- tempLow: -35.3,
- tempHigh: 36.1,
- stain: 0.05,
- burn: 1,
- burnTime: 10,
- burnInto: ["polonium_dioxide", "steam"],
- category: "liquids",
-};
-
-elements.polonium_hydride_gas = {
- density: 8.29,
-};
-
-function franciumHydroxide(pixel) {
- elementCircle(pixel.x, pixel.y, 10, "francium_hydroxide", 0.1, eLists.WATER.concat(["steam", "rad_steam"]));
-}
-
-elements.stable_francium = {
- color: [blendColors("#3eff3b", "#ff0000"), blendColors("#3eff3b", "#00ff00"), blendColors("#3eff3b", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- steam: { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide },
- rad_steam: { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide },
- },
- tempHigh: 27,
- category: "powders",
- state: "solid",
- density: 2480,
- hidden: true,
- conduct: 0.7,
-};
-
-runAfterLoad(function () {
- reactList("stable_francium", eLists.WATER, { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide });
-});
-
-elements.molten_stable_francium = {
- behavior: behaviors.LIQUID,
- reactions: {
- steam: { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide },
- rad_steam: { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide },
- },
- tempLow: 27,
- state: "liquid",
- hidden: true,
- density: 2480,
- conduct: 0.7,
-};
-
-runAfterLoad(function () {
- reactList("molten_stable_francium", eLists.WATER, { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide });
-});
-
-elements.big_pop = {
- color: ["#ffb48f", "#ffd991", "#ffad91"],
- behavior: ["XX|XX|XX", "XX|EX:10|XX", "XX|XX|XX"],
- category: "energy",
- state: "gas",
- density: 1000,
- excludeRandom: true,
- hidden: true,
-};
-
-createSalt("potassium_salt", "potassium_salt_water", ["#f2f2f2", "#e0e0e0"], "#416ed1", false, false, 292, -2, 102, 3980, 1026, "POTASSIUM", "CHLORIDE");
-
-elements.potassium.reactions = {
- chlorine: { elem1: "potassium_salt", elem2: null, chance: 0.05 },
- smog: { elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], chance: 0.01, temp2: 400 },
- electric: { elem1: [null, "pop"], elem2: ["pop", "fire"], chance: 0.05, temp2: 400 },
-};
-
-runAfterLoad(function () {
- reactList("potassium", eLists.WATER, { elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], chance: 0.01, temp2: 400 });
-});
-
-elements.molten_potassium.reactions = {
- chlorine: { elem1: "potassium_salt", elem2: null, chance: 0.05 },
- smog: { elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], chance: 0.01, temp2: 400 },
- electric: { elem1: [null, "pop"], elem2: ["pop", "fire"], chance: 0.05, temp2: 400 },
-};
-
-runAfterLoad(function () {
- reactList("molten_potassium", eLists.WATER, { elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], chance: 0.01, temp2: 400 });
-});
-
-elements.molten_salt = {};
-elements.molten_potassium_salt = {};
-
-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 };
-elements.molten_salt.reactions.steel = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0125 };
-elements.molten_salt.reactions.iron = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0125 };
-elements.molten_salt.reactions.tin = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.01 };
-elements.molten_salt.reactions.lead = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.01 };
-elements.molten_salt.reactions.brass = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.001 };
-elements.molten_salt.reactions.bronze = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.001 };
-elements.molten_salt.reactions.copper = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0075 };
-elements.molten_salt.reactions.silver = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0075 };
-elements.molten_salt.reactions.gold = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0075 };
-elements.molten_salt.conduct = 0.7;
-
-elements.molten_potassium_salt.reactions = {};
-elements.molten_potassium_salt.reactions.aluminum = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.0025 };
-elements.molten_potassium_salt.reactions.zinc = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.015 };
-elements.molten_potassium_salt.reactions.steel = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.0125 };
-elements.molten_potassium_salt.reactions.iron = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.0125 };
-elements.molten_potassium_salt.reactions.tin = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.01 };
-elements.molten_potassium_salt.reactions.lead = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.01 };
-elements.molten_potassium_salt.reactions.brass = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.001 };
-elements.molten_potassium_salt.reactions.bronze = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.001 };
-elements.molten_potassium_salt.reactions.copper = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.0075 };
-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;
-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",
- behavior: behaviors.POWDER,
- reactions: {
- plant: { elem1: "plant", chance: 0.05 },
- wheat_seed: { elem1: "wheat", chance: 0.05 },
- grass: { elem1: "grass", chance: 0.05 },
- grass_seed: { elem1: "grass", chance: 0.05 },
- bamboo_plant: { elem1: "bamboo", chance: 0.05 },
- flower_seed: { elem1: "flower_seed", chance: 0.05 },
- petal: { elem1: "flower_seed", chance: 0.05 },
- vine: { elem1: "vine", chance: 0.05 },
- sapling: { elem1: "tree_branch", chance: 0.05 },
- tree_branch: { elem1: "tree_branch", chance: 0.05 },
- corn_seed: { elem1: "corn", chance: 0.05 },
- root: { elem1: "root", chance: 0.05 },
- dirt: { elem1: "grass", chance: 0.05 },
- mud: { elem1: "grass", chance: 0.05 },
- potato_seed: { elem1: "potato", chance: 0.05 },
- yeast: { elem1: "yeast", chance: 0.05 },
- sulfur: { elem1: "gunpowder", elem2: null },
- ice: { elem1: null, elem2: "niter_solution", chance: 0.1 },
- rime: { elem1: null, elem2: "niter_solution", chance: 0.075 },
- snow: { elem1: null, elem2: "niter_solution", chance: 0.25 },
- packed_snow: { elem1: null, elem2: "niter_solution", chance: 0.05 },
- packed_ice: { elem1: null, elem2: "niter_solution", chance: 0.01 },
- water: { elem2: "niter_solution", elem1: null },
- },
- tempHigh: 334,
- stateHigh: "fire",
- category: "powders",
- state: "solid",
- density: 2109,
-};
-createSalt("niter", "niter_solution", "#f0efcc", blendColors("#f0efcc", "#2167ff", 0.75), false, true, 334, -2, 102, 2109, 1011, "POTASSIUM", "NITRATE");
-elements["niter"].stateHigh = "fire";
-elements["niter"].reactions = Object.assign(elements["niter"].reactions, {
- plant: { elem1: "plant", chance: 0.05 },
- wheat_seed: { elem1: "wheat", chance: 0.05 },
- grass: { elem1: "grass", chance: 0.05 },
- grass_seed: { elem1: "grass", chance: 0.05 },
- bamboo_plant: { elem1: "bamboo", chance: 0.05 },
- flower_seed: { elem1: "flower_seed", chance: 0.05 },
- petal: { elem1: "flower_seed", chance: 0.05 },
- vine: { elem1: "vine", chance: 0.05 },
- sapling: { elem1: "tree_branch", chance: 0.05 },
- tree_branch: { elem1: "tree_branch", chance: 0.05 },
- corn_seed: { elem1: "corn", chance: 0.05 },
- root: { elem1: "root", chance: 0.05 },
- dirt: { elem1: "grass", chance: 0.05 },
- mud: { elem1: "grass", chance: 0.05 },
- potato_seed: { elem1: "potato", chance: 0.05 },
- yeast: { elem1: "yeast", chance: 0.05 },
- sulfur: { elem1: "gunpowder", elem2: null },
-});
-elements["niter_solution"].reactions = Object.assign(elements["niter_solution"].reactions, {
- plant: { elem1: "plant", chance: 0.05 },
- wheat_seed: { elem1: "wheat", chance: 0.05 },
- grass: { elem1: "grass", chance: 0.05 },
- grass_seed: { elem1: "grass", chance: 0.05 },
- bamboo_plant: { elem1: "bamboo", chance: 0.05 },
- flower_seed: { elem1: "flower_seed", chance: 0.05 },
- petal: { elem1: "flower_seed", chance: 0.05 },
- vine: { elem1: "vine", chance: 0.05 },
- sapling: { elem1: "tree_branch", chance: 0.05 },
- tree_branch: { elem1: "tree_branch", chance: 0.05 },
- corn_seed: { elem1: "corn", chance: 0.05 },
- root: { elem1: "root", chance: 0.05 },
- dirt: { elem1: "grass", chance: 0.05 },
- mud: { elem1: "grass", chance: 0.05 },
- potato_seed: { elem1: "potato", chance: 0.05 },
- yeast: { elem1: "yeast", chance: 0.05 },
- sulfur: { elem1: "gunpowder", elem2: "water" },
-});
-delete elements["molten_niter"];
-
-elements.potassium_salt.hidden = false;
-
-elements.fluorite = {
- color: ["#8fc4f2", "#d0e5f7"],
- behavior: behaviors.POWDER,
- category: "land",
- density: 3180,
- state: "solid",
- tempHigh: 1418,
- reactions: {
- sulfuric_acid: { elem1: "hydrogen_fluoride", elem2: "chalk" },
- },
-};
-
-eListAddIon("CALCIUM", "fluorite");
-eListAddIon("FLUORIDE", "fluorite");
-eListAddIon("CALCIUM", "molten_fluorite");
-eListAddIon("FLUORIDE", "molten_fluorite");
-eListAdd("INSOLUBLE", "fluorite");
-eListAddIon("CALCIUM", "chalk");
-eListAddIon("SULFATE", "chalk");
-eListAddIon("CALCIUM", "molten_chalk");
-eListAddIon("SULFATE", "molten_chalk");
-eListAdd("INSOLUBLE", "chalk");
-
-elements.sulfuric_acid.ignore.push("chalk", "fluorite");
-elements.sulfuric_acid_gas.ignore.push("chalk", "fluorite");
-
-elements.hydrogen_fluoride.ignore.push("chalk", "fluorite");
-elements.liquid_hydrogen_fluoride.ignore.push("chalk", "fluorite");
-
-elements.chalk = {
- color: ["#e0e0e0", "#bfbfbf"],
- behavior: behaviors.POWDER,
- category: "land",
- density: 2320,
- state: "solid",
- tempHigh: 1460,
- stain: 0.05,
-};
-
-elements.sulfur.reactions.fluorine = { elem1: "sulfur_hexafluoride", elem2: "fire" };
-
-elements.sulfur_hexafluoride = {
- color: "#f2ff00",
- behavior: behaviors.GAS,
- category: "gases",
- density: 6.17,
- state: "gas",
- tempLow: -50.8,
-};
-
-elements.liquid_sulfur_hexafluoride = {
- tempLow: -64,
-};
-
-createAcid("hexafluorosilicic_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#ebeed8", "#f9ffc2", "#c7e189"], true, true, 100, 100, 0, 1000, 1460, 1, "HEXAFLUOROSILICATE");
-
-eLists.ACID.push("hexafluorosilicic_acid");
-eLists.ACIDGAS.push("hexafluorosilicic_acid_gas");
-
-elements.hydrofluoric_acid.ignore.push("sand", "hexafluorosilicic_acid", "hexafluorosilicic_acid_gas", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide", "hydrogen");
-elements.hydrofluoric_acid_gas.ignore.push("sand", "hexafluorosilicic_acid", "hexafluorosilicic_acid_gas", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide", "hydrogen");
-elements.hydrogen_fluoride.ignore.push("sand", "hexafluorosilicic_acid", "hexafluorosilicic_acid_gas", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide", "hydrogen");
-elements.liquid_hydrogen_fluoride.ignore.push("sand", "hexafluorosilicic_acid", "hexafluorosilicic_acid_gas", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide", "hydrogen");
-elements.hexafluorosilicic_acid.ignore.push("sand");
-elements.hexafluorosilicic_acid_gas.ignore.push("sand");
-
-acidReact("hydrofluoric_acid", "sand", "hexafluorosilicic_acid", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "sand", "hexafluorosilicic_acid", "fire", 0);
-acidReact("hydrofluoric_acid", "potassium_carbonate", "potassium_fluoride_solution", "carbon_dioxide", 100);
-acidReact("hydrofluoric_acid_gas", "potassium_carbonate", "potassium_fluoride_solution", "carbon_dioxide", 100);
-acidReact("hydrogen_fluoride", "potassium_carbonate", "potassium_fluoride_solution", "carbon_dioxide", 100);
-acidReact("liquid_hydrogen_fluoride", "potassium_carbonate", "potassium_fluoride_solution", "carbon_dioxide", 100);
-
-acidReact("hydrofluoric_acid", "potassium_carbonate_solution", "potassium_fluoride_solution", "carbon_dioxide", 100);
-acidReact("hydrofluoric_acid_gas", "potassium_carbonate_solution", "potassium_fluoride_solution", "carbon_dioxide", 100);
-acidReact("hydrogen_fluoride", "potassium_carbonate_solution", "potassium_fluoride_solution", "carbon_dioxide", 100);
-acidReact("liquid_hydrogen_fluoride", "potassium_carbonate_solution", "potassium_fluoride_solution", "carbon_dioxide", 100);
-
-acidReact("hydrofluoric_acid", "potassium_fluoride", "fluorine", "potassium_fluoride_solution", 100);
-acidReact("hydrofluoric_acid_gas", "potassium_fluoride", "fluorine", "potassium_fluoride_solution", 100);
-acidReact("hydrofluoric_acid", "potassium_fluoride", "fluorine", ["potassium_fluoride_solution", null], 100);
-acidReact("hydrofluoric_acid_gas", "potassium_fluoride", "fluorine", ["potassium_fluoride_solution", null], 100);
-
-elements.fluorine.ignore.push("sand", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide");
-elements.liquid_fluorine.ignore.push("sand", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide");
-
-createSalt("potassium_carbonate", "potassium_carbonate_solution", "#e2e1e8", blendColors("#e2e1e8", "#2167ff", 0.75), true, true, 891, -2, 102, 2430, 1024, "POTASSIUM", "CARBONATE");
-createSalt("potassium_fluoride", "potassium_fluoride_solution", "#e8e8e1", blendColors("#e8e8e1", "#2167ff", 0.75), true, true, 858, -2, 102, 2480, 1020, "POTASSIUM", "FLUORIDE");
-
-elements.soy_sauce = {
- color: "#470500",
- behavior: behaviors.LIQUID,
- tempLow: -5,
- tempHigh: 105,
- state: "liquid",
- category: "liquids",
- density: 1200,
- stain: 0.5,
- stateHigh: ["steam", "steam", "steam", "steam", "salt"],
-};
-
-elements.bromine = {
- color: "#470500",
- behavior: behaviors.LIQUID,
- tick: function (pixel) {
- if (pixel.temp > 0 && Math.random() < 0.001) {
- changePixel(pixelMap[pixel.x][pixel.y], "bromine_gas", false);
- }
- },
- reactions: {
- water: { elem1: "pool_water", elem2: null },
- dirty_water: { elem2: "water" },
- potassium: { elem1: "potassium_bromide", elem2: "fire" },
- sodium: { elem1: "sodium_bromide", elem2: "fire" },
- virus: { elem2: null },
- },
- tempLow: -7.2,
- tempHigh: 58.8,
- state: "liquid",
- category: "liquids",
- density: 3102,
- stain: 0.5,
-};
-
-toxic("bromine", 0.1);
-
-elements.bromine_gas = {
- behavior: behaviors.GAS,
- tick: function (pixel) {
- if (pixel.temp < 58.8 && pixel.temp > 0 && Math.random() < 0.01) {
- changePixel(pixelMap[pixel.x][pixel.y], "bromine", false);
- }
- },
- reactions: {
- water: { elem1: "pool_water", elem2: null },
- dirty_water: { elem2: "water" },
- potassium: { elem1: "potassium_bromide", elem2: "fire" },
- sodium: { elem1: "sodium_bromide", elem2: "fire" },
- virus: { elem2: null },
- },
- tempLow: 0,
- stateLow: "bromine",
- state: "gas",
- category: "gases",
- hidden: true,
- density: 7.59,
- stain: 0.5,
-};
-
-toxic("bromine_gas", 0.1);
-
-createSalt("potassium_bromide", "potassium_bromide_solution", ["#fccaca", "#f7cbcb"], blendColors("#fccaca", "#2167ff", 0.75), false, true, 734, -2, 102, 2740, 1050, "POTASSIUM", "BROMIDE");
-createSalt("sodium_bromide", "sodium_bromide_solution", ["#f5f4ed", "#f2f2eb"], blendColors("#f5f4ed", "#2167ff", 0.75), false, true, 747, -2, 102, 3210, 1040, "SODIUM", "BROMIDE");
-
-elements.silver_bromide = {
- color: ["#fcfcca", "#f7f24f"],
- tick: function (pixel) {
- for (let i = -1; i <= 1; i++) {
- for (let j = -1; j <= 1; j++) {
- if (!isEmpty(pixel.x + i, pixel.y + j, true) && Math.random() < 0.1 && (pixelMap[pixel.x + i][pixel.y + j].element === "light" || pixelMap[pixel.x + i][pixel.y + j].element === "laser" || pixelMap[pixel.x + i][pixel.y + j].element === "liquid_light")) {
- let coords = circleCoords(pixel.x + i, pixel.y + j, 20);
- for (var n = 0; n < coords.length; n++) {
- let k = coords[n].x;
- let l = coords[n].y;
- let distance = (k - pixel.x - i) * (k - pixel.x - i) + (l - pixel.y - j) * (l - pixel.y - j);
- if (!isEmpty(k, l, true) && pixelMap[k][l].element === "silver_bromide") {
- if (distance <= 0) {
- console.log("silver bromide broke");
- }
- let rgb = hexToRGB(blendColors(RGBToHex2(toObject(pixelMap[k][l].color)), RGBToHex2(toObject(pixelMap[pixel.x + i][pixel.y + j].color)), 10 / (10 + distance)));
- pixelMap[k][l].color = "rgb(" + rgb.r + "," + rgb.g + "," + rgb.b + ")";
- //pixelMap[k][l].color = pixelColorPick(pixelMap[k][l],blendColors(RGBToHex2(toObject(pixelMap[k][l].color)),RGBToHex2(toObject(pixelMap[pixel.x+i][pixel.y+j].color)),1/distance));
- }
- }
- if (pixelMap[pixel.x + i][pixel.y + j].element === "light" || pixelMap[pixel.x + i][pixel.y + j].element === "laser") {
- deletePixel(pixel.x + i, pixel.y + j);
- }
- }
- }
- }
- },
- behavior: behaviors.POWDER,
- category: "powders",
- tempHigh: 430,
- state: "solid",
- density: 6470,
-};
-
-eListAddIon("SILVER", "silver_bromide");
-eListAddIon("BROMIDE", "silver_bromide");
-eListAdd("INSOLUBLE", "silver_bromide");
-eListAddIon("SILVER", "molten_silver_bromide");
-eListAddIon("BROMIDE", "molten_silver_bromide");
-
-elements.nitric_acid.reactions["silver"] = { elem1: "nitrogen_dioxide", elem2: "silver_nitrate_solution" };
-elements.nitric_acid_gas.reactions["silver"] = { elem1: "nitrogen_dioxide", elem2: "silver_nitrate_solution" };
-
-elements.nitric_acid.ignore.push("silver", "silver_nitrate", "silver_nitrate_solution");
-elements.nitric_acid_gas.ignore.push("silver", "silver_nitrate", "silver_nitrate_solution");
-
-elements.molten_silver_nitrate = {
- tempHigh: 440,
- stateHigh: ["silver", "nitrogen_dioxide", "oxygen", "fire"],
-};
-
-createSalt("silver_nitrate", "silver_nitrate_solution", ["#cad7fc", "#cbd2f7"], blendColors("#cad7fc", "#2167ff", 0.5), true, true, 209, -2, 102, 4350, 1060, "SILVER", "NITRATE");
-
-elements.silver_nitrate_solution.reactions["potassium_bromide"] = { elem1: "niter_solution", elem2: "silver_bromide" };
-elements.silver_nitrate_solution.reactions["potassium_bromide_solution"] = { elem1: "niter_solution", elem2: "silver_bromide" };
-
-toxic("silver_nitrate", 0.1);
-toxic("silver_nitrate_solution", 0.1);
-
-createAcid("hydrobromic_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#ff3b3b", "#ca0000", "#9e7b7b"], true, true, 100, 100, 0, 1000, 1100, 1, "BROMIDE");
-
-eLists.ACID.push("hydrobromic_acid");
-eLists.ACIDGAS.push("hydrobromic_acid_gas");
-
-acidReact("sulfuric_acid", "bromine", "sulfuric_acid", "hydrobromic_acid", 50);
-acidReact("sulfuric_acid", "bromine_ice", "sulfuric_acid", "hydrobromic_acid", 50);
-acidReact("sulfuric_acid", "bromine_gas", "sulfuric_acid", "hydrobromic_acid", 50);
-acidReact("sulfuric_acid_gas", "bromine", "sulfuric_acid", "hydrobromic_acid", 50);
-acidReact("sulfuric_acid_gas", "bromine_ice", "sulfuric_acid", "hydrobromic_acid", 50);
-acidReact("sulfuric_acid_gas", "bromine_gas", "sulfuric_acid", "hydrobromic_acid", 50);
-
-acidReact("sulfuric_acid", "potassium_salt", "potassium_sulfate", "acid", 50);
-acidReact("sulfuric_acid_gas", "potassium_salt", "potassium_sulfate", "acid", 50);
-acidReact("sulfuric_acid", "niter", "potassium_sulfate", "nitric_acid", 50);
-acidReact("sulfuric_acid_gas", "niter", "potassium_sulfate", "nitric_acid", 50);
-acidReact("sulfuric_acid", "potassium_bromide", "potassium_sulfate", "hydrobromic_acid", 50);
-acidReact("sulfuric_acid_gas", "potassium_bromide", "potassium_sulfate", "hydrobromic_acid", 50);
-
-createSalt("potassium_sulfate", "potassium_sulfate_solution", "#f0d8cc", blendColors("#f0d8cc", "#2167ff", 0.75), true, true, 1069, -2, 102, 2660, 1012, "POTASSIUM", "SULFATE");
-elements["potassium_sulfate"].reactions = Object.assign(elements["potassium_sulfate"].reactions, {
- plant: { elem1: "plant", chance: 0.05 },
- wheat_seed: { elem1: "wheat", chance: 0.05 },
- grass: { elem1: "grass", chance: 0.05 },
- grass_seed: { elem1: "grass", chance: 0.05 },
- bamboo_plant: { elem1: "bamboo", chance: 0.05 },
- flower_seed: { elem1: "flower_seed", chance: 0.05 },
- petal: { elem1: "flower_seed", chance: 0.05 },
- vine: { elem1: "vine", chance: 0.05 },
- sapling: { elem1: "tree_branch", chance: 0.05 },
- tree_branch: { elem1: "tree_branch", chance: 0.05 },
- corn_seed: { elem1: "corn", chance: 0.05 },
- root: { elem1: "root", chance: 0.05 },
- dirt: { elem1: "grass", chance: 0.05 },
- mud: { elem1: "grass", chance: 0.05 },
- potato_seed: { elem1: "potato", chance: 0.05 },
- yeast: { elem1: "yeast", chance: 0.05 },
-});
-elements["potassium_sulfate_solution"].reactions = Object.assign(elements["potassium_sulfate_solution"].reactions, {
- plant: { elem1: "plant", chance: 0.05 },
- wheat_seed: { elem1: "wheat", chance: 0.05 },
- grass: { elem1: "grass", chance: 0.05 },
- grass_seed: { elem1: "grass", chance: 0.05 },
- bamboo_plant: { elem1: "bamboo", chance: 0.05 },
- flower_seed: { elem1: "flower_seed", chance: 0.05 },
- petal: { elem1: "flower_seed", chance: 0.05 },
- vine: { elem1: "vine", chance: 0.05 },
- sapling: { elem1: "tree_branch", chance: 0.05 },
- tree_branch: { elem1: "tree_branch", chance: 0.05 },
- corn_seed: { elem1: "corn", chance: 0.05 },
- root: { elem1: "root", chance: 0.05 },
- dirt: { elem1: "grass", chance: 0.05 },
- mud: { elem1: "grass", chance: 0.05 },
- potato_seed: { elem1: "potato", chance: 0.05 },
- yeast: { elem1: "yeast", chance: 0.05 },
-});
-
-createSalt("sodium_chlorate", "sodium_chlorate_solution", "#cff0cc", blendColors("#cff0cc", "#2167ff", 0.25), true, true, 255, -2, 102, 2490, 1011, "SODIUM", "CHLORATE");
-elements.sodium_chlorate.stateHigh = ["fire", "salt"];
-toxic("sodium_chlorate", 0.02);
-toxic("sodium_chlorate_solution", 0.02);
-Object.assign(elements.sodium_chlorate.reactions, {
- plant: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- evergreen: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- cactus: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- grass: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- vine: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- algae: { elem1: null, elem2: null, chance: 0.1 },
- kelp: { elem1: null, elem2: "dirty_water", chance: 0.1 },
- mushroom_spore: { elem1: null, elem2: null, chance: 0.1 },
- lichen: { elem1: null, elem2: null, chance: 0.1 },
- yeast: { elem1: null, elem2: null, chance: 0.1 },
- sapling: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- root: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- flower_seed: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- pistil: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- petal: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- grass_seed: { elem1: null, elem2: "dead_plant", chance: 0.1 },
-});
-Object.assign(elements.sodium_chlorate_solution.reactions, {
- plant: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- evergreen: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- cactus: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- grass: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- vine: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- algae: { elem1: null, elem2: null, chance: 0.1 },
- kelp: { elem1: null, elem2: "dirty_water", chance: 0.1 },
- mushroom_spore: { elem1: null, elem2: null, chance: 0.1 },
- lichen: { elem1: null, elem2: null, chance: 0.1 },
- yeast: { elem1: null, elem2: null, chance: 0.1 },
- sapling: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- root: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- flower_seed: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- pistil: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- petal: { elem1: null, elem2: "dead_plant", chance: 0.1 },
- grass_seed: { elem1: null, elem2: "dead_plant", chance: 0.1 },
-});
-elements.sodium_chlorate_solution.reactions["gold"] = { elem1: "sodium_perchlorate_solution", charged: true, chance: 0.1 };
-
-elements.chlorine.reactions["bleach"] = { elem1: "sodium_chlorate_solution", elem2: null };
-delete elements["molten_sodium_chlorate"];
-
-createSalt("sodium_perchlorate", "sodium_perchlorate_solution", "#cff0cc", blendColors("#d6f0cc", "#2167ff", 0.25), true, true, 468, -2, 102, 2499, 1011, "SODIUM", "PERCHLORATE");
-elements.sodium_perchlorate.stateHigh = "fire";
-elements.sodium_perchlorate.reactions["acid"] = { elem1: "perchloric_acid", elem2: "salt" };
-elements.sodium_perchlorate_solution.reactions["acid"] = { elem1: "perchloric_acid", elem2: "salt_water" };
-
-toxic("sodium_perchlorate", 0.02);
-toxic("sodium_perchlorate_solution", 0.02);
-
-elements.acid.ignore.push("salt", "sodium_perchlorate", "sodium_perchlorate_solution");
-elements.acid_gas.ignore.push("salt", "sodium_perchlorate", "sodium_perchlorate_solution");
-delete elements["molten_sodium_perchlorate"];
-
-createAcid("perchloric_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#ff963b", "#ca6800", "#c48a56"], true, true, 100, 100, 0, 1000, 1768, 1, "PERCHLORATE");
-
-elements.perchloric_acid.tick = function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
- }
- }
- }
- if (change) {
- if (Math.random() < 0.2) {
- changePixel(pixel, "big_pop");
- } else {
- deletePixel(pixel.x, pixel.y);
- return;
- }
- } else {
- behaviors.LIQUID(pixel);
- }
-};
-delete elements.perchloric_acid.behavior;
-elements.perchloric_acid.burn = 0;
-elements.perchloric_acid.ignore.push("fire", "smoke");
-
-elements.perchloric_acid_gas.tick = function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
- }
- }
- }
- if (change) {
- if (Math.random() < 0.2) {
- changePixel(pixel, "big_pop");
- } else {
- deletePixel(pixel.x, pixel.y);
- return;
- }
- } else {
- behaviors.GAS(pixel);
- }
-};
-elements.perchloric_acid_gas.behavior = ["XX|XX|XX", "XX|XX|XX", "XX|XX|XX"];
-elements.perchloric_acid_gas.burn = 0;
-elements.perchloric_acid_gas.ignore.push("fire", "smoke");
-
-eLists.ACID.push("perchloric_acid");
-eLists.ACIDGAS.push("perchloric_acid_gas");
-
-acidReact("perchloric_acid", "ammonia", "rocket_fuel", null, 100);
-acidReact("perchloric_acid_gas", "ammonia", "rocket_fuel", null, 100);
-
-elements.perchloric_acid.ignore.push("salt", "sodium_perchlorate", "sodium_perchlorate_solution");
-elements.perchloric_acid_gas.ignore.push("salt", "sodium_perchlorate", "sodium_perchlorate_solution");
-
-elements.rocket_fuel = {
- color: "#edcfca",
- behavior: behaviors.POWDER,
- tempHigh: 200,
- stateHigh: "big_explosion",
- category: "weapons",
- state: "solid",
- density: 1950,
- burn: 100,
- burnTime: 100,
- burnInto: "big_explosion",
- excludeRandom: true,
-};
-
elements.big_explosion = {
- color: ["#ffb48f", "#ffd991", "#ffad91"],
+ color: ["#fc6c6c", "#fc8a3e", "#f55656"],
behavior: ["XX|XX|XX", "XX|EX:20|XX", "XX|XX|XX"],
temp: 300,
category: "energy",
@@ -2404,1349 +6490,19 @@ elements.big_explosion = {
noMix: true,
};
-elements.iodine = {
- color: ["#240030", "#15061a", "#752191"],
- behavior: behaviors.POWDER,
- tick: function (pixel) {
- if (pixel.temp > 25 && Math.random() < 0.001) {
- changePixel(pixelMap[pixel.x][pixel.y], "iodine_gas", false);
- }
- },
- reactions: {
- water: { elem1: "disinfectant", elem2: null },
- dirty_water: { elem2: "water" },
- potato: { color2: "#3e0252" },
- bread: { color2: "#3e0252" },
- toast: { color2: "#3e0252" },
- flour: { color2: "#3e0252" },
- dough: { color2: "#3e0252" },
- batter: { color2: "#3e0252" },
- hydrogen: { elem1: "hydrogen_iodide", elem2: null },
- hydrogen_sulfide: { elem1: "hydrogen_iodide", elem2: "sulfur" },
- algae: { elem2: null, chance: 0.035 },
- cell: { elem2: null, chance: 0.02 },
- plague: { elem2: null },
- virus: { elem2: null },
- },
- tempHigh: 113,
- stateHigh: "molten_iodine",
- state: "solid",
- category: "powders",
- density: 4933,
- stain: 0.01,
-};
-
-elements.molten_iodine = {
- color: ["#360147", "#2b0d36", "#9b2ebf"],
- forceAutoGen: true,
- behavior: behaviors.LIQUID,
- tempHigh: 184,
- tempLow: 113,
- temp: 123,
- stateHigh: "iodine_gas",
- stateLow: "iodine",
- state: "liquid",
- hidden: true,
- category: "liquids",
-};
-
-elements.iodine_gas = {
- behavior: behaviors.GAS,
- tick: function (pixel) {
- if (pixel.temp < 113 && pixel.temp > 25 && Math.random() < 0.01) {
- changePixel(pixelMap[pixel.x][pixel.y], "iodine", false);
- }
- },
- tempLow: 25,
- stateLow: "iodine",
+elements.rad_pop = {
+ color: ["#a2ff57", "#52ff83", "#58f494"],
+ behavior: ["XX|XX|XX", "XX|EX:10>fire,radiation,radiation|XX", "XX|XX|XX"],
+ category: "energy",
state: "gas",
- category: "gases",
- hidden: true,
- density: 11.27,
- stain: 0.01,
-};
-
-elements.disinfectant = {
- color: "#2d004f",
- behavior: behaviors.LIQUID,
- reactions: {
- blood: { elem1: null, elem2: "water" },
- dirty_water: { elem2: "water" },
- plague: { elem2: null },
- virus: { elem2: null },
- infection: { elem2: null },
- mushroom_spore: { elem2: null },
- lichen: { elem2: null },
- rotten_meat: { elem2: "meat" },
- rotten_cheese: { elem2: "cheese" },
- stench: { elem2: null },
- cancer: { elem2: null, chance: 0.01 },
- rat: { elem2: null, chance: 0.01 },
- ant: { elem2: "dead_bug", chance: 0.1 },
- bee: { elem2: "dead_bug", chance: 0.1 },
- fly: { elem2: "dead_bug", chance: 0.1 },
- firefly: { elem2: "dead_bug", chance: 0.1 },
- worm: { elem2: "dead_bug", chance: 0.1 },
- flea: { elem2: "dead_bug", chance: 0.1 },
- termite: { elem2: "dead_bug", chance: 0.1 },
- stink_bug: { elem2: "dead_bug", chance: 0.1 },
- },
- tempHigh: 100,
- tempLow: 0,
- stateHigh: ["steam", "iodine"],
- state: "liquid",
- category: "liquids",
- density: 1020,
- stain: 0.01,
-};
-
-createAcid("hydroiodic_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#9670ff", "#da6afc", "#a77af5", "#9670ff", "#da6afc", "#a77af5", "#633a1d"], true, true, 100, 100, 0, 1000, 1150, 1, "IODIDE", { compound: "acid", dontDirtyWater: true });
-
-elements.hydrogen_iodide = {
- color: "#aa8df2",
- behavior: behaviors.GAS,
- reactions: {
- water: { elem1: "hydroiodic_acid", elem2: null },
- salt_water: { elem1: "hydroiodic_acid", elem2: null },
- sugar_water: { elem1: "hydroiodic_acid", elem2: null },
- dirty_water: { elem1: "hydroiodic_acid", elem2: null },
- seltzer: { elem1: "hydroiodic_acid", elem2: null },
- pool_water: { elem1: "hydroiodic_acid", elem2: null },
- primordial_soup: { elem1: "hydroiodic_acid", elem2: null },
- steam: { elem1: "hydroiodic_acid_gas", elem2: null },
- neutral_acid: { elem1: "hydroiodic_acid", elem2: null },
- },
- state: "gas",
- category: "gases",
- hidden: true,
- density: 2.85,
- tempLow: -35.4,
- stateLow: "liquid_hydrogen_iodide",
- forceAutoGen: true,
-};
-
-runAfterLoad(function () {
- reactList("hydrogen_iodide", eLists.WATER, { elem1: "hydroiodic_acid", elem2: null });
-});
-
-elements.liquid_hydrogen_iodide = {
- reactions: {
- water: { elem1: "hydroiodic_acid", elem2: null },
- salt_water: { elem1: "hydroiodic_acid", elem2: null },
- sugar_water: { elem1: "hydroiodic_acid", elem2: null },
- dirty_water: { elem1: "hydroiodic_acid", elem2: null },
- seltzer: { elem1: "hydroiodic_acid", elem2: null },
- pool_water: { elem1: "hydroiodic_acid", elem2: null },
- primordial_soup: { elem1: "hydroiodic_acid", elem2: null },
- steam: { elem1: "hydroiodic_acid_gas", elem2: null },
- neutral_acid: { elem1: "hydroiodic_acid", elem2: null },
- },
- state: "liquid",
- tempLow: -50.8,
-};
-
-toxic("hydrogen_iodide", 0.1);
-toxic("liquid_hydrogen_iodide", 0.1);
-
-runAfterLoad(function () {
- reactList("liquid_hydrogen_iodide", eLists.WATER, { elem1: "hydroiodic_acid", elem2: null });
-});
-
-elements.hydroiodic_acid.ignore.push("hydrogen_iodide", "liquid_hydrogen_iodide", "hydrogen_iodide_ice");
-elements.hydroiodic_acid_gas.ignore.push("hydrogen_iodide", "liquid_hydrogen_iodide", "hydrogen_iodide_ice");
-
-eListAddIon("HYDROGEN", "hydrogen_iodide");
-eListAddIon("IODIDE", "hydrogen_iodide");
-eListAddIon("HYDROGEN", "liquid_hydrogen_iodide");
-eListAddIon("IODIDE", "liquid_hydrogen_iodide");
-eListAddIon("HYDROGEN", "hydroiodic_acid");
-eListAddIon("IODIDE", "hydroiodic_acid");
-eListAddIon("HYDROGEN", "hydroiodic_acid_gas");
-eListAddIon("IODIDE", "hydroiodic_acid_gas");
-runAfterLoad(function () {
- reactList("hydroiodic_acid", eLists.WATER, { elem2: "dirty_water" });
- reactList("hydroiodic_acid_gas", eLists.WATER, { elem2: "dirty_water" });
- delete elements.hydroiodic_acid.reactions["dirty_water"];
- delete elements.hydroiodic_acid_gas.reactions["dirty_water"];
-});
-
-elements.bauxite = {
- color: ["#915a30", "#cc7533"],
- behavior: behaviors.SUPPORTPOWDER,
- category: "land",
- density: 2420,
- state: "solid",
- tempHigh: 300,
-};
-
-elements.spent_sodium_aluminate_solution = {
- color: ["#696380", "#7a759e"],
- behavior: behaviors.LIQUID,
- category: "liquids",
- hidden: true,
- density: 1005,
- state: "liquid",
- tempHigh: 100,
- stateHigh: ["sodium_aluminate", "sodium_aluminate", "sodium_aluminate", "gallium", "steam", "steam", "steam", "steam"],
-};
-
-createSalt("sodium_aluminate", "sodium_aluminate_solution", ["#e6c9b3", "#ebc8ad"], ["#bdb3e6", "#b4adeb"], true, true, 1650, -2, 102, 1500, 1005, "SODIUM", "ALUMINATE");
-elements.sodium_aluminate_solution.reactions["carbon_dioxide"] = { elem1: "aluminum_hydroxide", elem2: ["sodium_carbonate_solution", "spent_sodium_aluminate_solution"] };
-
-createSalt("sodium_carbonate", "sodium_carbonate_solution", "#d8dae6", ["#c5c1d6", "#afacc2"], true, true, 851, -2, 102, 2540, 1010, "SODIUM", "CARBONATE");
-createSalt("ammonium_chloride", "ammonium_chloride_solution", "#daeced", ["#a299c7", "#7e76b3"], true, true, 338, -2, 102, 1519, 1008, "AMMONIUM", "CHLORIDE");
-elements["ammonium_chloride"].stateHigh = ["ammonia", "acid_gas"];
-delete elements["molten_ammonium_chloride"];
-acidReact("acid_gas", "ammonia", "ammonium_chloride", null, 0);
-
-elements.aluminum_hydroxide = {
- color: "#d1cbcb",
- behavior: behaviors.STURDYPOWDER,
- category: "powders",
- hidden: true,
- density: 2420,
- state: "solid",
- tempHigh: 300,
- stateHigh: ["alumina", "steam"],
-};
-
-eListAddIon("ALUMINUM", "aluminum_hydroxide");
-eListAddIon("HYDROXIDE", "aluminum_hydroxide");
-eListAdd("INSOLUBLE", "aluminum_hydroxide");
-
-elements.alumina = {
- color: "#d1cbcb",
- behavior: behaviors.STURDYPOWDER,
- category: "powders",
- density: 3987,
- state: "solid",
- tempHigh: 2072,
- reactions: {
- molten_cryolite_mixture: { elem1: "molten_cryolite_solution", elem2: "molten_cryolite_solution" },
- },
-};
-
-eListAddIon("ALUMINUM", "alumina");
-eListAddIon("OXIDE", "alumina");
-eListAdd("INSOLUBLE", "alumina");
-
-eListAddIon("ALUMINUM", "molten_alumina");
-eListAddIon("OXIDE", "molten_alumina");
-
-elements.cryolite = {
- color: ["#9ab6d9", "#dae4f0"],
- behavior: behaviors.POWDER,
- category: "land",
- density: 2900,
- state: "solid",
- tempHigh: 950,
- reactions: {
- aluminum_trifluoride: { elem1: "cryolite_mixture", elem2: "cryolite_mixture" },
- },
-};
-
-eListAddIon("SODIUM", "cryolite");
-eListAddIon("HEXAFLUOROALUMINATE", "cryolite");
-eListAdd("INSOLUBLE", "cryolite");
-
-eListAddIon("SODIUM", "molten_cryolite");
-eListAddIon("HEXAFLUOROALUMINATE", "molten_cryolite");
-
-elements.aluminum_trifluoride = {
- color: ["#ebf4ff", "#e3fdff"],
- behavior: behaviors.POWDER,
- category: "powders",
- hidden: true,
- density: 3100,
- state: "solid",
- tempHigh: 1290,
-};
-
-eListAddIon("ALUMINUM", "aluminum_trifluoride");
-eListAddIon("FLUORIDE", "aluminum_trifluoride");
-eListAdd("INSOLUBLE", "aluminum_trifluoride");
-
-eListAddIon("ALUMINUM", "aluminum_trifluoride_gas");
-eListAddIon("FLUORIDE", "aluminum_trifluoride_gas");
-
-elements.molten_aluminum_trifluoride = {
- tempHigh: 1290,
- tempLow: 1290,
-};
-
-elements.aluminum_trifluoride_gas = {
- tempLow: 1290,
- state: "gas",
- stateLow: "molten_aluminum_trifluoride",
-};
-
-elements.cryolite_mixture = {
- color: [blendColors("#9ab6d9", "#ebf4ff"), blendColors("#dae4f0", "#e3fdff")],
- behavior: behaviors.POWDER,
- category: "powders",
- hidden: true,
- density: 2910,
- state: "solid",
- tempHigh: 950,
-};
-
-elements.cryolite_solution = {
- color: [blendColors(blendColors("#9ab6d9", "#ebf4ff"), "#d1cbcb"), blendColors(blendColors("#dae4f0", "#e3fdff"), "#d1cbcb")],
- behavior: behaviors.POWDER,
- category: "powders",
- hidden: true,
- density: 2920,
- state: "solid",
- tempHigh: 950,
-};
-
-createSalt("sodium_fluoride", "sodium_fluoride_solution", ["#8aebce", "#b9edde"], ["#8ad0eb", "#b9e3ed"], false, true, 993, -2, 102, 2558, 1012, "SODIUM", "FLUORIDE");
-
-elements.magnesium_fluoride = {
- color: ["#aaabae", "#a9adae"],
- behavior: behaviors.POWDER,
- category: "powders",
- density: 3148,
- state: "solid",
- tempHigh: 1263,
- reactions: {
- sulfuric_acid: { elem1: "hydrogen_fluoride", elem2: "epsom_salt" },
- },
+ density: 1000,
+ excludeRandom: true,
hidden: true,
};
-toxic("magnesium_fluoride", 0.1);
-
-eListAddIon("MAGNESIUM", "magnesium_fluoride");
-eListAddIon("FLUORIDE", "magnesium_fluoride");
-eListAdd("INSOLUBLE", "magnesium_fluoride");
-
-eListAddIon("MAGNESIUM", "molten_magnesium_fluoride");
-eListAddIon("FLUORIDE", "molten_magnesium_fluoride");
-
-elements.sulfuric_acid.ignore.push("epsom_salt", "magnesium_fluoride");
-elements.sulfuric_acid_gas.ignore.push("epsom_salt", "magnesium_fluoride");
-
-elements.hydrogen_fluoride.ignore.push("epsom_salt", "magnesium_fluoride");
-elements.liquid_hydrogen_fluoride.ignore.push("epsom_salt", "magnesium_fluoride");
-
-//boron
-
-acidReact("acid", "borax", "boric_acid", "salt", 0);
-acidReact("acid_gas", "borax", "boric_acid", "salt", 0);
-
-elements.boric_acid = {
- color: "#fbffeb",
- behavior: behaviors.POWDER,
- category: "powders",
- density: 1435,
- state: "solid",
- tempHigh: 170,
- reactions: {
- hydrofluoric_acid: { elem1: "fluoroboric_acid", elem2: "dirty_water" },
- hydrofluoric_acid_gas: { elem1: "fluoroboric_acid_gas", elem2: "steam" },
- neutron: { elem2: null },
- },
-};
-
-acidReact("hydrofluoric_acid", "boric_acid", "fluoroboric_acid", "dirty_water", 50);
-acidReact("hydrofluoric_acid_gas", "boric_acid", "fluoroboric_acid_gas", "steam", 50);
-
-elements.hydrofluoric_acid.ignore.push("molten_boric_acid");
-elements.hydrofluoric_acid_gas.ignore.push("molten_boric_acid");
-
-elements.borax.hidden = false;
-
-createSalt("sodium_sulfate", "sodium_sulfate_solution", "#f3f2f5", blendColors("#f3f2f5", "#2167ff", 0.5), true, true, 884, -2, 102, 2664, 1013, "SODIUM", "SULFATE");
-
-acidReact("sulfuric_acid", "salt", "acid", "sodium_sulfate_solution");
-acidReact("sulfuric_acid_gas", "salt", "acid", "sodium_sulfate_solution");
-acidReact("sulfuric_acid", "salt_water", "acid", "sodium_sulfate_solution");
-acidReact("sulfuric_acid_gas", "salt_water", "acid", "sodium_sulfate_solution");
-
-eListAddIon("BORON", "boric_acid", "base");
-eListAddIon("HYDROXIDE", "boric_acid", "base");
-eListAddIon("BORATE", "boric_acid", "acid");
-eListAddIon("HYDROGEN", "boric_acid", "acid");
-eListAdd("INSOLUBLE", "boric_acid");
-
-eListAddIon("BORON", "molten_boric_acid", "base");
-eListAddIon("HYDROXIDE", "molten_boric_acid", "base");
-eListAddIon("BORATE", "molten_boric_acid", "acid");
-eListAddIon("HYDROGEN", "molten_boric_acid", "acid");
-
-eListAdd("AMPHOTERIC", "boric_acid");
-eListAdd("AMPHOTERIC", "molten_boric_acid");
-
-eListAddIon("BORATE", "borax");
-eListAddIon("SODIUM", "borax");
-eListAdd("INSOLUBLE", "borax");
-
-eListAddIon("BORATE", "molten_borax");
-eListAddIon("SODIUM", "molten_borax");
-
-elements.boron = {
- color: ["#80736a", "#a2999c", "#5e5544", "#292d2c"],
- behavior: behaviors.WALL,
- category: "solids",
- density: 2080,
- state: "solid",
- tempHigh: 2076,
- fireColor: ["#34eb67", "#5ceb34"],
- reactions: {
- chlorine: { elem1: "boron_trichloride", elem2: null },
- liquid_chlorine: { elem1: "boron_trichloride", elem2: null },
- fluorine: { elem1: "boron_trifluoride", elem2: null },
- liquid_fluorine: { elem1: "boron_trifluoride", elem2: null },
- },
-};
-
-elements.fluorine.ignore.push("boron", "molten_boron");
-elements.liquid_fluorine.ignore.push("boron", "molten_boron");
-
-elements.boron_trioxide = {
- color: "#c6c5c7",
- behavior: behaviors.POWDER,
- category: "powders",
- density: 2550,
- state: "solid",
- hidden: true,
- tempHigh: 450,
- fireColor: ["#34eb67", "#5ceb34"],
-};
-
-eListAddIon("BORON", "boron_trioxide");
-eListAddIon("OXIDE", "boron_trioxide");
-eListAdd("INSOLUBLE", "boron_trioxide");
-
-eListAddIon("BORON", "molten_boron_trioxide");
-eListAddIon("OXIDE", "molten_boron_trioxide");
-
-elements.molten_boron_trioxide = {
- reactions: {
- chlorine: { elem1: "boron_trichloride", elem2: null },
- },
-};
-
-acidReact("sulfuric_acid", "borax", "boron_trioxide", "sodium_sulfate", 200);
-acidReact("sulfuric_acid_gas", "borax", "boron_trioxide", "sodium_sulfate", 200);
-
-acidReact("hydrofluoric_acid", "boron_trioxide", "boron_trifluoride", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "boron_trioxide", "boron_trifluoride", "fire", 0);
-
-acidReact("hydrogen_fluoride", "boron_trioxide", "boron_trifluoride", "fire", 0);
-acidReact("liquid_hydrogen_fluoride", "boron_trioxide", "boron_trifluoride", "fire", 0);
-
-elements.boron_trifluoride = {
- color: "#d5d9ce",
- behavior: behaviors.GAS,
- category: "gases",
- density: 2.76,
- state: "gas",
- hidden: true,
- tempLow: -100.3,
- reactions: {
- steam: { elem1: "fluoroboric_acid_gas", elem2: "boric_acid" },
- },
-};
-
-eListAddIon("BORON", "boron_trifluoride");
-eListAddIon("FLUORIDE", "boron_trifluoride");
-eListAdd("INSOLUBLE", "boron_trifluoride");
-
-runAfterLoad(function () {
- reactList("boron_trifluoride", eLists.WATER, { elem1: "fluoroboric_acid", elem2: "boric_acid" });
-});
-
-elements.liquid_boron_trifluoride = {
- tempLow: -126.8,
- reactions: {},
-};
-toxic("boron_trifluoride", 0.1);
-toxic("liquid_boron_trifluoride", 0.1);
-
-eListAddIon("BORON", "liquid_boron_trifluoride");
-eListAddIon("FLUORIDE", "liquid_boron_trifluoride");
-eListAddIon("BORON", "boron_trifluoride_ice");
-eListAddIon("FLUORIDE", "boron_trifluoride_ice");
-
-elements.boron_trichloride = {
- color: "#ddf0dd",
- behavior: behaviors.GAS,
- category: "gases",
- density: 4.9,
- state: "gas",
- hidden: true,
- tempLow: 12.6,
- reactions: {
- steam: { elem1: "acid_gas", elem2: "boric_acid" },
- hydrogen: { elem1: "boron", elem2: "acid_gas" },
- },
-};
-
-eListAddIon("BORON", "boron_trichloride");
-eListAddIon("CHLORIDE", "boron_trichloride");
-eListAddIon("BORON", "liquid_boron_trichloride");
-eListAddIon("CHLORIDE", "liquid_boron_trichloride");
-eListAddIon("BORON", "boron_trichloride_ice");
-eListAddIon("CHLORIDE", "boron_trichloride_ice");
-eListAdd("INSOLUBLE", "boron_trichloride");
-
-runAfterLoad(function () {
- reactList("boron_trichloride", eLists.WATER, { elem1: "acid", elem2: "boric_acid" });
-});
-
-elements.liquid_boron_trichloride = {
- tempLow: -107.3,
- reactions: {},
-};
-toxic("boron_trichloride", 0.2);
-toxic("liquid_boron_trichloride", 0.2);
-
-runAfterLoad(function () {
- reactList("fluoroboric_acid", eLists.WATER, { elem2: "dirty_water" });
- reactList("fluoroboric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
- delete elements.fluoroboric_acid.reactions["dirty_water"];
- delete elements.fluoroboric_acid_gas.reactions["dirty_water"];
-});
-
-createAcid("fluoroboric_acid", {}, {}, ["#3bffdb", "#00caaf", "#56c4a3"], true, true, 100, 100, 0, 1000, 1020, 1, "TETRAFLUOROBORATE", { compound: "acid", dontDirtyWater: true });
-
-elements.fluoroboric_acid.ignore.push("boron_trifluoride", "liquid_boron_trifluoride", "boron_trifluoride_ice");
-elements.fluoroboric_acid_gas.ignore.push("boron_trifluoride", "liquid_boron_trifluoride", "boron_trifluoride_ice");
-elements.fluoroboric_acid.ignore.push("boric_acid", "molten_boric_acid");
-elements.fluoroboric_acid_gas.ignore.push("boric_acid", "molten_boric_acid");
-elements.fluoroboric_acid.tick = function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
- }
- }
- }
- if (change) {
- if (Math.random() < 0.2) {
- changePixel(pixel, "boron_trifluoride");
- } else {
- deletePixel(pixel.x, pixel.y);
- return;
- }
- } else {
- behaviors.LIQUID(pixel);
- }
-};
-
-delete elements.fluoroboric_acid.behavior;
-
-elements.fluoroboric_acid_gas.tick = function (pixel) {
- let change = false;
- 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
- if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
- changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
- change = true;
- }
- }
- }
- }
- if (change) {
- if (Math.random() < 0.2) {
- changePixel(pixel, "boron_trifluoride");
- } else {
- deletePixel(pixel.x, pixel.y);
- return;
- }
- } else {
- behaviors.GAS(pixel);
- }
-};
-
-elements.fluoroboric_acid_gas.behavior = ["XX|XX|XX", "XX|XX|XX", "XX|XX|XX"];
-
-elements.fluoroboric_acid.ignore.push("molten_boric_acid");
-elements.fluoroboric_acid_gas.ignore.push("molten_boric_acid");
-
-eLists.ACID.push("fluoroboric_acid");
-eLists.ACIDGAS.push("fluoroboric_acid_gas");
-
-acidReact("fluoroboric_acid", "sodium_carbonate", "sodium_tetrafluoroborate", ["carbon_dioxide,steam"], 50);
-acidReact("fluoroboric_acid_gas", "sodium_carbonate", "sodium_tetrafluoroborate", ["carbon_dioxide,steam"], 50);
-acidReact("fluoroboric_acid", "sodium_carbonate_solution", "sodium_tetrafluoroborate", ["seltzer,steam"], 50);
-acidReact("fluoroboric_acid_gas", "sodium_carbonate_solution", "sodium_tetrafluoroborate", ["seltzer,steam"], 50);
-
-behaviors.CAUSTIC = ["XX|DB%5|XX", "DB%5|XX|DB%5", "DB%5 AND M2|DB%10 AND M1|DB%5 AND M2"];
-behaviors.MOLTEN_CAUSTIC = ["XX|DB%5 AND CR:fire%2.5|XX", "DB%5 AND M2|XX|DB%5 AND M2", "DB%5 AND M2|DB%10 AND M1|DB%5 AND M2"];
-elements.sodium_hydride = {
- color: ["#9e9e9e", "#4f4f4f", "#616161", "#454545"],
- tempHigh: 638,
- stateHigh: ["sodium", "hydrogen"],
- behavior: behaviors.CAUSTIC,
- fireColor: "#ffff00",
- reactions: {
- chlorine: { elem1: "salt", elem2: "acid_gas" },
- vinegar: { elem1: "sodium_acetate", elem2: null, attr1: { foam: 15 } },
- },
- category: "powders",
- state: "solid",
- hidden: true,
- density: 1390,
- burn: 75,
- burnTime: 120,
-};
-
-eListAddIon("SODIUM", "sodium_hydride", "base");
-eListAddIon("HYDRIDE", "sodium_hydride", "base");
-eListAdd("INSOLUBLE", "sodium_hydride");
-
-runAfterLoad(function () {
- reactList("sodium_hydride", eLists.WATER, { elem1: ["pop", "pop", "hydrogen", "hydrogen"], chance: 0.1, temp2: 250 });
-});
-
-eLists.CAUSTIC.push("sodium_hydride");
-elements.sodium_hydride.ignore = defaultAcidIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen"]);
-acidIgnore(["sodium_hydride"]);
-
-elements.molten_sodium.reactions.hydrogen = { elem1: "sodium_hydride", elem2: null };
-
-elements.methanol.reactions.sodium = { elem1: "sodium_methoxide", elem2: "hydrogen", temp1: 200, temp2: 200 };
-elements.methanol.reactions.molten_sodium = { elem1: "sodium_methoxide", elem2: "hydrogen", temp1: 200, temp2: 200 };
-
-elements.sodium_methoxide = {
- color: ["#c4c4c4", "#8c8c8c", "#ababab", "#787878"],
- tempHigh: 127,
- behavior: behaviors.CAUSTIC,
- fireColor: "#ffff00",
- category: "powders",
- state: "solid",
- hidden: true,
- density: 970,
- burn: 5,
- burnTime: 100,
- reactions: {
- water: { elem1: "methanol", elem2: "sodium_hydroxide" },
- salt_water: { elem1: "methanol", elem2: "sodium_hydroxide" },
- sugar_water: { elem1: "methanol", elem2: "sodium_hydroxide" },
- dirty_water: { elem1: "methanol", elem2: "sodium_hydroxide" },
- seltzer: { elem1: "methanol", elem2: "sodium_hydroxide" },
- pool_water: { elem1: "methanol", elem2: "sodium_hydroxide" },
- primordial_soup: { elem1: "methanol", elem2: "sodium_hydroxide" },
- },
-};
-
-eListAddIon("SODIUM", "sodium_methoxide", "base");
-eListAddIon("METHOXIDE", "sodium_methoxide", "base");
-eListAdd("INSOLUBLE", "sodium_methoxide");
-eListAddIon("SODIUM", "molten_sodium_methoxide", "base");
-eListAddIon("METHOXIDE", "molten_sodium_methoxide", "base");
-
-runAfterLoad(function () {
- reactList("sodium_methoxide", eLists.WATER, { elem1: "methanol", elem2: "sodium_hydroxide" });
-});
-
-elements.molten_sodium_methoxide = {
- behavior: behaviors.MOLTEN_CAUSTIC,
- tempLow: 127,
-};
-
-eLists.CAUSTIC.push("sodium_methoxide");
-eLists.CAUSTIC.push("molten_sodium_methoxide");
-elements.sodium_methoxide.ignore = defaultAcidIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen", "methanol", "methanol_gas", "trimethyl_borate"]);
-elements.molten_sodium_methoxide.ignore = defaultAcidGasIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen", "methanol", "methanol_gas", "trimethyl_borate"]);
-acidIgnore(["sodium_methoxide", "molten_sodium_methoxide"]);
-
-elements.trimethyl_borate = {
- color: "#c4bc89",
- tempHigh: 69,
- tempLow: -34,
- behavior: behaviors.LIQUID,
- reactions: {
- sodium_hydride: { elem1: "sodium_borohydride", elem2: "sodium_methoxide" },
- },
- category: "liquids",
- state: "liquid",
- hidden: true,
- density: 932,
- burn: 100,
- burnTime: 10,
- fireColor: ["#34eb67", "#5ceb34"],
-};
-
-createSalt("sodium_borohydride", "sodium_borohydride_solution", ["#d3d3de", "#c7c7eb", "#ededfc", "#d9d9d9"], ["#ababc7", "#9d9dd1", "#bdbddb", "#a8a8a8"], false, true, 400, -2, 102, 1070, 1005, "SODIUM", "BOROHYDRIDE");
-
-elements.sodium_borohydride.behavior = behaviors.CAUSTIC;
-elements.sodium_borohydride_solution.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"];
-elements.sodium_borohydride.fireColor = ["#34eb67", "#5ceb34"];
-elements.sodium_borohydride_solution.fireColor = ["#34eb67", "#5ceb34"];
-elements.sodium_borohydride.stateHigh = ["sodium_hydride", "sodium", "boron"];
-
-delete elements["molten_sodium_borohydride"];
-
-eLists.CAUSTIC.push("sodium_borohydride");
-eLists.CAUSTIC.push("sodium_borohydride_solution");
-elements.sodium_borohydride.ignore = defaultAcidIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen", "boron", "trimethyl_borate"]);
-elements.sodium_borohydride_solution.ignore = defaultAcidIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen", "boron", "trimethyl_borate"]);
-acidIgnore(["sodium_borohydride", "sodium_borohydride_solution"]);
-elements.sodium_hydride.ignore.push(["sodium", "molten_sodium", "hydrogen", "boron"]);
-
-createSalt("sodium_tetrafluoroborate", "sodium_tetrafluoroborate_solution", ["#deded3", "#ebebc7", "#fcfced", "#d9d9d9"], ["#ababb7", "#9d9dc1", "#bdbdcb", "#a8a898"], true, true, 384, -2, 102, 2470, 1012, "SODIUM", "TETRAFLUOROBORATE");
-
-elements.sodium_tetrafluoroborate.stateHigh = ["sodium_fluoride", "boron_trifluoride"];
-elements.sodium_tetrafluoroborate.fireColor = ["#34eb67", "#5ceb34"];
-
-delete elements["molten_sodium_tetrafluoroborate"];
-
-elements.fluoroboric_acid.ignore.push("sodium_tetrafluoroborate", "sodium_tetrafluoroborate_solution");
-elements.fluoroboric_acid_gas.ignore.push("sodium_tetrafluoroborate", "sodium_tetrafluoroborate_solution");
-
-acidReact("sodium_hydride", "boron_trifluoride", "diborane", "sodium_tetrafluoroborate", 20);
-acidReact("sulfuric_acid", "sodium_borohydride", "diborane", "hydrogen", 50);
-
-elements.diborane = {
- color: "#ffcac9",
- tempLow: -92.5,
- behavior: behaviors.GAS,
- fireColor: ["#34eb67", "#5ceb34"],
- category: "gases",
- state: "gas",
- density: 1.131,
- burn: 100,
- burnTime: 20,
- burnInto: "boron_trioxide",
- reactions: {
- oxygen: { elem1: "boron_trioxide", elem2: "fire" },
- water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
- salt_water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
- sugar_water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
- dirty_water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
- seltzer: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
- pool_water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
- primordial_soup: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
- },
- tempHigh: 200,
- stateHigh: ["pentaborane", "pentaborane", "decaborane"],
-};
-
-runAfterLoad(function () {
- reactList("diborane", eLists.WATER, { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 });
-});
-
-elements.liquid_diborane = {
- tempLow: -164,
- reactions: {},
-};
-
-toxic("diborane", 1);
-toxic("liquid_diborane", 1);
-
-elements.decaborane = {
- color: "#d9cece",
- tempHigh: 98,
- behavior: behaviors.POWDER,
- fireColor: ["#34eb67", "#5ceb34"],
- category: "powders",
- state: "solid",
- hidden: true,
- density: 940,
- burn: 100,
- burnTime: 100,
- burnInto: "boron_trioxide",
- reactions: {
- oxygen: { elem1: "boron_trioxide", elem2: "fire" },
- },
-};
-runAfterLoad(function () {
- reactList("decaborane", eLists.WATER, { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 });
-});
-
-elements.molten_decaborane = {
- behavior: behaviors.LIQUID,
- tempLow: 98,
- burn: 100,
- burnTime: 1000,
- burnInto: "boron_trioxide",
- reactions: {
- oxygen: { elem1: "boron_trioxide", elem2: "fire" },
- },
- fireColor: ["#34eb67", "#5ceb34"],
- category: "liquids",
- state: "liquid",
- hidden: true,
- density: 900,
-};
-
-toxic("decaborane", 0.1);
-toxic("molten_decaborane", 0.1);
-
-runAfterLoad(function () {
- reactList("molten_decaborane", eLists.WATER, { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 });
-});
-
-elements.pentaborane = {
- color: "#f7b5b5",
- tempHigh: 60.1,
- tempLow: -46.8,
- behavior: behaviors.LIQUID,
- fireColor: ["#34eb67", "#5ceb34"],
- category: "liquids",
- state: "liquid",
- hidden: true,
- density: 618,
- burn: 100,
- burnTime: 1,
- burnInto: "explosion",
- reactions: {
- oxygen: { elem1: "boron_trioxide", elem2: "explosion" },
- },
-};
-
-runAfterLoad(function () {
- reactList("pentaborane", eLists.WATER, { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 });
-});
-
-elements.pentaborane_gas = {
- tempHigh: 250,
- stateHigh: "decaborane",
- reactions: {},
-};
-
-toxic("pentaborane", 1);
-toxic("pentaborane_gas", 1);
-
-acidReact("sodium_borohydride", "boron_trifluoride", "sodium_octahydrotriborate", ["sodium_fluoride", "hydrogen"], 20);
-acidReact("hydrobromic_acid", "sodium_octahydrotriborate", "sodium_bromoheptahydrotriborate", "hydrogen", 20);
-
-elements.sodium_octahydrotriborate = {
- color: ["#ded3de", "#ebc7eb", "#fbedfb", "#e3cce3"],
- tempHigh: 500, //i have no idea
- behavior: behaviors.POWDER,
- fireColor: ["ffff00", "#34eb67", "#5ceb34"],
- category: "powders",
- state: "solid",
- hidden: true,
- density: 1070, //???
- burn: 5,
- burnTime: 10,
- burnInto: "boron_trioxide",
- stateHigh: "sodium_dodecaborate",
-};
-
-eListAddIon("SODIUM", "sodium_octahydrotriborate");
-eListAddIon("OCTAHYDROTRIBORATE", "sodium_octahydrotriborate");
-eListAdd("INSOLUBLE", "sodium_octahydrotriborate");
-
-elements.sodium_dodecaborate = {
- color: "#f5aef5",
- tempHigh: 700, //see above comment
- behavior: behaviors.POWDER,
- fireColor: ["ffff00", "#34eb67", "#5ceb34"],
- category: "powders",
- state: "solid",
- hidden: true,
- density: 1050, //guess
- burn: 1,
- burnTime: 10,
- burnInto: "boron_trioxide",
-};
-
-eListAddIon("SODIUM", "sodium_dodecaborate");
-eListAddIon("DODECABORATE", "sodium_dodecaborate");
-eListAdd("INSOLUBLE", "sodium_dodecaborate");
-eListAddIon("SODIUM", "molten_sodium_dodecaborate");
-eListAddIon("DODECABORATE", "molten_sodium_dodecaborate");
-
-elements.sodium_bromoheptahydrotriborate = {
- color: ["#ded9d3", "#ebd9c7", "#fbf4ed", "#e3d5cc"],
- tempHigh: 150, //idk
- behavior: behaviors.POWDER,
- fireColor: ["ffff00", "#34eb67", "#5ceb34"],
- category: "powders",
- state: "solid",
- hidden: true,
- density: 1090, //idk
- burn: 5,
- burnTime: 10,
- burnInto: "boron_trioxide",
- stateHigh: ["pentaborane", "sodium_bromide", "hydrogen"],
-};
-
-eListAddIon("SODIUM", "sodium_bromoheptahydrotriborate");
-eListAddIon("BROMOHEPTAHYDROTRIBORATE", "sodium_bromoheptahydrotriborate");
-eListAdd("INSOLUBLE", "sodium_bromoheptahydrotriborate");
-
-runAfterLoad(function () {
- reactList("fluoroboric_acid", eLists.WATER, { elem2: "dirty_water" });
- reactList("fluoroboric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
- delete elements.fluoroboric_acid.reactions["dirty_water"];
- delete elements.fluoroboric_acid_gas.reactions["dirty_water"];
-});
-
-elements.white_phosphorus = {
- color: "#f4f7ad",
- behavior: [
- "XX|XX|XX",
- "XX|XX|XX",
- "M2%1|M1|M2%1",
- ],
- tick: function (pixel) {
- if (Math.random() < 0.00001 && pixel.temp > 40) {
- changePixel(pixel, "red_phosphorus");
- }
- },
- reactions: {
- head: { elem2: null, chance: 0.1 },
- light: { elem1: "red_phosphorus"},
- liquid_light: { elem1: "red_phosphorus"},
- },
- tempHigh: 44.1,
- stateHigh: "molten_white_phosphorus",
- state: "solid",
- category: "powders",
- density: 1820,
- stain: 0.01,
- burn: 50,
- burnTime: 300,
- burnInto: "phosphorus_pentoxide",
- fireColor: "#5ed6c8",
-};
-
-
-elements.molten_white_phosphorus = {
- color: "#eaeb96",
- behavior: behaviors.LIQUID,
- tick: function (pixel) {
- if (Math.random() < 0.00001) {
- changePixel(pixel, "red_phosphorus");
- }
- },
- reactions: {
- head: { elem2: null, chance: 0.1 },
- light: { elem1: "red_phosphorus"},
- liquid_light: { elem1: "red_phosphorus"},
- },
- tempLow: 44.1,
- temp: 50,
- tempHigh: 280,
- state: "liquid",
- stateLow: "white_phosphorus",
- category: "liquids",
- hidden: true,
- density: 1810,
- stain: 0.01,
- burn: 50,
- burnTime: 300,
- burnInto: "phosphorus_pentoxide",
- fireColor: "#5ed6c8",
-};
-
-elements.white_phosphorus_gas = {
- tick: function (pixel) {
- if (Math.random() < 0.00001 && pixel.temp < 860) {
- changePixel(pixel, "red_phosphorus");
- }
- if (pixel.temp > 860 && Math.random() < 0.00001) {
- changePixel(pixel, "black_phosphorus");
- }
- },
- burnInto: "phosphorus_pentoxide",
- density: 5.15,
- burnTime: 300,
-};
-
-
-elements.red_phosphorus = {
- color: ["#fa5252", "#de4040", "#f24141"],
- behavior: behaviors.POWDER,
- tick: function (pixel) {
- if (pixel.temp > 250 && Math.random() < 0.00001) {
- changePixel(pixel, "violet_phosphorus");
- }
- },
- reactions: {
- "violet_phosphorus": { elem1: "violet_phosphorus", tempMin: 250, chance: 0.001 }
- },
- tempHigh: 860,
- stateHigh: "white_phosphorus_gas",
- state: "solid",
- category: "powders",
- density: 2275,
- stain: 0.005,
- fireColor: "#5ed6c8",
-};
-
-
-elements.violet_phosphorus = {
- color: ["#d92378","#ab1364","#bd1c8a"],
- behavior: behaviors.STURDYPOWDER,
- tick: function (pixel) {
- if (pixel.temp > 300 && Math.random() < 0.000001) {
- pixel.burning = true;
- }
- },
- reactions: {},
- tempHigh: 893,
- stateHigh: "fire",
- state: "solid",
- category: "powders",
- density: 2360,
- fireColor: "#5ed6c8",
-};
-
-
-elements.black_phosphorus = {
- color: ["#170a02","#380e03","#6b6968"],
- behavior: behaviors.SUPPORTPOWDER,
- reactions: {},
- tempHigh: 900,
- state: "solid",
- category: "powders",
- density: 2690,
- fireColor: "#5ed6c8",
-};
-
-
-elements.phosphorus_pentoxide = {
- color: "#fcfcfa",
- behavior: behaviors.POWDER,
- tempHigh: 340,
- state: "solid",
- category: "powders",
- density: 2390,
- fireColor: "#5ed6c8",
- reactions: {
- mud: { elem2: "dirt" },
- sand: { elem2: "sand" },
- ant: { elem2: "dead_bug", chance: 0.1 },
- worm: { elem2: "dead_bug" },
- fly: { elem2: "dead_bug", chance: 0.1 },
- firefly: { elem2: "dead_bug", chance: 0.1 },
- bee: { elem2: "dead_bug", chance: 0.1 },
- stink_bug: { elem2: "dead_bug", chance: 0.1 },
- termite: { elem2: "dead_bug", chance: 0.1 },
- flea: { elem2: "dead_bug", chance: 0.1 },
- slug: { elem2: "slime" },
- frog: { elem2: "slime" },
- tadpole: { elem2: "slime" },
- fish: { elem2: "meat" },
- snail: { elem2: "limestone" },
- slime: { elem2: "dust" },
- meat: { elem2: "dust" },
- rotten_meat: { elem2: "dust" },
- cooked_meat: { elem2: "dust" },
- blood: { elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: ["salt", "oxygen"] },
- algae: { elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: "salt" },
- kelp: { elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: "salt" },
- mushroom_spore: { elem2: "dust" },
- lichen: { elem2: "dust" },
- yeast: { elem2: "dust" },
- cell: { elem2: "dust"},
- cancer: { elem2: "dust" },
- udder: { elem2: "dust" },
- bone_marrow: { elem2: "dust" },
- jelly: { elem2: "dust" },
- yolk: { elem2: "dust" },
- },
-};
-
-
-runAfterLoad(function () {
- reactList("phosphorus_pentoxide", eLists.WATER, { elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: null });
-});
-
-createAcid("phosphoric_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#a1a3ed", "#8f91db", "#bab5f5"], false, true, 120, 100, 0, 1000, 1684, 4, "PHOSPHATE", { compound: "acid", dontDirtyWater: true });
-
-elements.phosphoric_acid.ignore.push("phosphorus_pentoxide");
-elements.phosphoric_acid_gas.ignore.push("phosphorus_pentoxide");
-elements.phosphoric_acid.ignore.push("sugar");
-elements.phosphoric_acid_gas.ignore.push("sugar");
-
-acidReact("phosphoric_acid", "soda", "soda", ["soda", null]);
-elements.phosphoric_acid.reactions.slaked_lime = null;
-elements.phosphoric_acid_gas.reactions.slaked_lime = null;
-acidReact("phosphoric_acid", "slaked_lime", "neutral_acid", "tricalcium_phosphate");
-acidReact("phosphoric_acid_gas", "slaked_lime", "neutral_acid", "tricalcium_phosphate");
-
-
-elements.apatite = {
- color: ["#48b593", "#3adec0", "#29c4cc"],
- behavior: behaviors.POWDER,
- category: "land",
- density: 3160,
- state: "solid",
- tempHigh: 1670,
- reactions: {},
-};
-
-elements.molten_apatite = {
- reactions: {
- charcoal: { elem1: "white_phosphorus_gas", elem2: ["carbon_dioxide", "molten_slag"] },
- }
-}
-
-elements.tricalcium_phosphate = {
- color: "#b9e9ed",
- behavior: behaviors.POWDER,
- category: "powders",
- hidden: true,
- density: 3140,
- state: "solid",
- tempHigh: 1670,
- reactions: {},
-};
-
-elements.molten_tricalcium_phosphate = {
- reactions: {
- charcoal: { elem1: "white_phosphorus_gas", elem2: ["carbon_dioxide", "molten_slag"] },
- }
-}
-eListAdd("INSOLUBLE", "tricalcium_phosphate");
-eListAddIon("CALCIUM", "tricalcium_phosphate");
-eListAddIon("PHOSPHATE", "tricalcium_phosphate");
-
-acidReact("apatite", "sulfuric_acid", "phosphoric_acid", ["chalk", "chalk", "chalk", "chalk", "hydrogen_fluoride"]);
-acidReact("apatite", "sulfuric_acid_gas", "phosphoric_acid", ["chalk", "chalk", "chalk", "chalk", "hydrogen_fluoride"]);
-elements.hydrogen_fluoride.ignore.push("apatite");
-elements.liquid_hydrogen_fluoride.ignore.push("apatite");
-elements.hydrofluoric_acid.ignore.push("apatite");
-elements.hydrofluoric_acid_gas.ignore.push("apatite");
-acidReact("tricalcium_phosphate", "sulfuric_acid", "phosphoric_acid", "chalk");
-acidReact("tricalcium_phosphate", "sulfuric_acid_gas", "phosphoric_acid", "chalk");
-acidReact("bone", "sulfuric_acid", "phosphoric_acid", "chalk");
-acidReact("bone", "sulfuric_acid_gas", "phosphoric_acid", "chalk");
-
-
-
-
-elements.indium = {
- color: ["#aca9b0", "#ccc7d1", "#d6cbd6"],
- behavior: behaviors.WALL,
- tempHigh: 156.6,
- category: "solids",
- density: 7290,
- conduct: 0.05,
- hardness: 0.05,
- superconductAt: -269.74,
- tick: function (pixel) {
- if (!isEmpty(pixel.x, pixel.y - 1, true) && elements[pixelMap[pixel.x][pixel.y - 1].element].movable && pixelMap[pixel.x][pixel.y - 1].element !== "indium") {
- if (Math.random() < elements[pixelMap[pixel.x][pixel.y - 1].element].density / 7e4) {
- pixel.indium_bend = elements[pixelMap[pixel.x][pixel.y - 1].element].density / 7e4;
- }
- }
- if (pixel.indium_bend > 0) {
- for (let i = -1; i <= 1; i++) {
- if (!isEmpty(pixel.x + i, pixel.y + 1, true) && pixelMap[pixel.x + i][pixel.y + 1].element == "indium") {
- if (Math.random() < pixel.indium_bend) {
- pixelMap[pixel.x + i][pixel.y + 1].indium_bend = pixel.indium_bend;
- }
- }
- }
- let i = 0;
- let y = pixel.y;
- while (!isEmpty(pixel.x, y + i, true) && pixelMap[pixel.x][y + i].element == "indium") {
- behaviors.STURDYPOWDER(pixelMap[pixel.x][y + i]);
- i--;
- }
- pixel.indium_bend = 0;
- }
- },
- reactions: {
- chlorine: { elem1: "indium_chloride", elem2: null },
- liquid_chlorine: { elem1: "indium_chloride", elem2: null },
- },
-};
-
-createSalt("indium_chloride", "indium_chloride_solution", "#f8ebff", "#7e70ff", true, true, 586, -2, 102, 3460, 1030, "INDIUM", "CHLORIDE");
-createSalt("indium_nitrate", "indium_nitrate_solution", "#eddaf5", blendColors("#eddaf5", "#2167ff", 0.5), true, true, 150, -2, 102, 4380, 1050, "INDIUM", "NITRATE");
-
-acidReact("indium", "nitric_acid", "indium_nitrate_solution", "nitric_oxide");
-acidReact("indium", "nitric_acid_gas", "indium_nitrate_solution", "nitric_oxide");
-elements.nitric_acid.ignore.push("indium_nitrate");
-elements.nitric_acid_gas.ignore.push("indium_nitrate");
-
-elements.indium_nitrate.stateHigh = ["indium_oxide", "nitrogen_dioxide", "fire"];
-toxic("indium_nitrate", 0.1);
-toxic("indium_nitrate_solution", 0.1);
-
-elements.indium_hydroxide = {
- color: "#ebc7e4",
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 150,
- category: "powders",
- state: "solid",
- density: 4380,
- stateHigh: ["indium_oxide", "steam"],
- reactions: {},
-};
-
-toxic("indium_hydroxide", 0.02);
-
-eListAdd("INSOLUBLE", "indium_hydroxide");
-eListAddIon("INDIUM", "indium_hydroxide");
-eListAddIon("HYDROXIDE", "indium_hydroxide");
-
-elements.indium_oxide = {
- color: "#e3f294",
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 1910,
- category: "powders",
- state: "solid",
- density: 7179,
- reactions: {
- steam: { elem1: "indium_hydroxide", elem2: null, tempMax: 150 },
- },
-};
-
-eListAdd("INSOLUBLE", "indium_oxide");
-eListAddIon("INDIUM", "indium_oxide");
-eListAddIon("OXIDE", "indium_oxide");
-
-elements.thallium = {
- color: ["#b3bdb4", "#a7b8b0", "#9fa39d"],
- behavior: behaviors.STURDYPOWDER,
- tempHigh: 304,
- category: "powders",
- state: "solid",
- density: 11873,
- conduct: 0.05,
- hardness: 0.05,
- reactions: {
- steam: { elem1: "thallium_hydroxide_solution", elem2: "hydrogen", chance: 0.01 },
- molten_sulfur: { elem1: "thallium_sulfide", chance: 0.1}
- },
-};
-
-createSalt("thallium_hydroxide", "thallium_hydroxide_solution", ["#f0f564","#f7ee45"], "#a4c244", true, true, 139, -2, 102, 7440, 1035, "THALLIUM", "HYDROXIDE");
-elements.thallium_hydroxide.stateHigh = ["thallium_oxide", "steam"];
-
-elements.thallium_oxide = {
- color: "#2b2b2a",
- behavior: behaviors.POWDER,
- tempHigh: 596,
- category: "powders",
- state: "solid",
- density: 10450,
- hidden: true,
- reactions: {}
-};
-
-eListAdd("INSOLUBLE", "thallium_oxide");
-eListAddIon("THALLIUM", "thallium_oxide");
-eListAddIon("OXIDE", "thallium_oxide");
-
-
-elements.thallium_sulfide = {
- color: "#20201f",
- behavior: behaviors.POWDER,
- tempHigh: 448,
- category: "powders",
- state: "solid",
- density: 8390,
- hidden: true,
- conduct: 0.5,
- reactions: {
- "light": { elem2: null, charge1: 1 },
- "liquid_light": { elem2: null, charge1: 1 },
- }
-};
-
-eListAdd("INSOLUBLE", "thallium_sulfide");
-eListAddIon("THALLIUM", "thallium_sulfide");
-eListAddIon("SULFIDE", "thallium_sulfide");
-
-createSalt("thallium_sulfate", "thallium_sulfate_solution", "#fafaf0", "#23ccbe", true, true, 632, -2, 102, 6770, 1032, "THALLIUM", "SULFATE");
-
-acidReact("sulfuric_acid", "thallium", "thallium_sulfate_solution", "hydrogen", 50);
-acidReact("sulfuric_acid_gas", "thallium", "thallium_sulfate_solution", "hydrogen", 50);
-acidReact("sulfuric_acid", "molten_thallium", "thallium_sulfate_solution", "hydrogen", 50);
-acidReact("sulfuric_acid_gas", "molten_thallium", "thallium_sulfate_solution", "hydrogen", 50);
-elements.sulfuric_acid.ignore.push("thallium_sulfate");
-elements.sulfuric_acid_gas.ignore.push("thallium_sulfate");
-
-runAfterLoad(function () {
- reactList("thallium", eLists.WATER, { elem1: "thallium_hydroxide_solution", elem2: "hydrogen", chance: 0.01 });
- reactList("thallium_oxide", eLists.WATER, { elem1: "thallium_hydroxide_solution", elem2: null });
- reactList("thallium_hydroxide_solution", eLists.WATER, { elem2: "dirty_water" });
- reactList("thallium_sulfate_solution", eLists.WATER, { elem2: "dirty_water" });
- delete elements.thallium.reactions["thallium_hydroxide_solution"];
- delete elements.thallium_oxide.reactions["thallium_hydroxide_solution"];
- delete elements.thallium_hydroxide_solution.reactions["dirty_water"];
- delete elements.thallium_hydroxide_solution.reactions["thallium_hydroxide_solution"];
- delete elements.thallium_hydroxide_solution.reactions["thallium_sulfate_solution"];
- delete elements.thallium_sulfate_solution.reactions["dirty_water"];
- delete elements.thallium_sulfate_solution.reactions["thallium_hydroxide_solution"];
- delete elements.thallium_sulfate_solution.reactions["thallium_sulfate_solution"];
-});
-
-toxic("thallium", 0.2, false);
-toxic("thallium_hydroxide", 0.2, false);
-toxic("thallium_hydroxide_solution", 0.2, false);
-toxic("thallium_oxide", 0.2, false);
-toxic("thallium_sulfide", 0.2);
-toxic("thallium_sulfate", 0.2, false);
-toxic("thallium_sulfate_solution", 0.2, false);
-elements.thallium.reactions["hair"] = { elem2: null };
-elements.thallium_hydroxide.reactions["hair"] = { elem2: null };
-elements.thallium_hydroxide_solution.reactions["hair"] = { elem2: null };
-elements.thallium_oxide.reactions["hair"] = { elem2: null };
-elements.thallium_sulfide.reactions["hair"] = { elem2: null };
-elements.thallium_sulfate.reactions["hair"] = { elem2: null };
-elements.thallium_sulfate_solution.reactions["hair"] = { elem2: null };
-
-elements.uraninite = {
- color: ["#545323", "#50573b", "#656660", "#4d4933", "#615e4a", "#525043"],
- behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
- tempHigh: 2865,
- category: "land",
- state: "solid",
- density: 10970,
-};
-
-elements.yellowcake = {
- color: ["#dbd827", "#bce346", "#a8c418", "#d9bb1a", "#dec418", "#cfb615"],
- behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
- tempHigh: 1150,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 8300,
- reactions: {
- hydrogen: { elem1: ["uranium_dioxide", "uranium_dioxide", "uranium_dioxide", "uranium_dioxide", "thorium_dioxide"], elem2: "steam" },
- },
-};
-
-elements.yellowcake_solution = {
- color: "#d2ed6f",
- ignore: elements.sulfuric_acid.ignore.concat(eLists.CAUSTICIGNORE).concat(["radiation", "yellowcake", "uraninite"]),
- behavior: ["XX|DB%5 AND CR:radiation%0.05|XX", "DB%5 AND M2 AND CR:radiation%0.05|XX|DB%5 AND M2 AND CR:radiation%0.05", "DB%5 AND M2|DB%10 AND M1|DB%5 AND M2"],
- tempHigh: 337,
- category: "liquids",
- stateHigh: ["sulfuric_acid_gas", "yellowcake"],
- state: "liquid",
- hidden: true,
- density: 1850,
- reactions: {},
-};
-
-acidIgnore(["yellowcake_solution"]);
-eLists.CAUSTIC.push("yellowcake_solution");
-eLists.ACID.push("yellowcake_solution");
-
-acidReact("sulfuric_acid", "uraninite", "yellowcake_solution", null, 50);
-acidReact("sulfuric_acid_gas", "uraninite", "yellowcake", "sulfuric_acid_gas", 50);
-acidReact("sulfuric_acid", "yellowcake", "yellowcake_solution", "yellowcake_solution", 50);
-
elements.alpha_particle = {
color: "#ff7878",
behavior: ["XX|XX|XX", "XX|CH:helium%0.01 AND DL%0.25|XX", "XX|XX|XX"],
- reactions: {
- electric: { elem1: null, elem2: "helium", temp2: 200 },
- },
tick: behaviors.BOUNCY,
temp: 35,
category: "energy",
@@ -3755,1974 +6511,9 @@ elements.alpha_particle = {
ignoreAir: true,
};
-elements.depleted_uranium = {
- color: ["#599e61", "#364d3c", "#494d4a", "#6c8a42", "#798d65", "#b5e089"],
- behavior: ["XX|CR:alpha_particle%0.01|XX", "CR:alpha_particle%0.01|CH:thorium%0.001|CR:alpha_particle%0.01", "M2|M1|M2"],
- reactions: {
- neutron: { elem2: null, func: depleted_uranium },
- oxygen: { elem1: "depleted_uranium_dioxide", elem2: null, chance: 0.1 },
- meat: { elem2: "rotten_meat", chance: 0.1 },
- cheese: { elem2: "rotten_cheese", chance: 0.1 },
- quark_matter: { elem1: "stable_uranium" },
- },
- tempHigh: 1132.2,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 19100,
- hardness: 0.6,
- conduct: 0.235,
-};
-
-runAfterLoad(function () {
- reactList("depleted_uranium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
- delete elements.depleted_uranium.reactions["dirty_water"];
-});
-
-elements.molten_depleted_uranium = {
- behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.01|XX", "M2 AND CR:alpha_particle%0.01|XX|M2 AND CR:alpha_particle%0.01", "M1|M1|M1"],
- reactions: {
- neutron: { elem2: null, func: depleted_uranium },
- quark_matter: { elem1: "stable_uranium" },
- },
-};
-
-elements.enriched_uranium = {
- color: ["#599e61", "#364d3c", "#494d4a", "#6c8a42", "#798d65", "#b5e089"],
- behavior: ["XX|CR:radiation%2.5 AND CR:alpha_particle%0.1|XX", "CR:radiation%2.5 AND CR:alpha_particle%0.1|CH:thorium%0.05 AND CH:protactinium%0.01|CR:radiation%2.5 AND CR:alpha_particle%0.1", "M2|M1|M2"],
- reactions: {
- neutron: { func: enriched_uranium, temp1: 150 },
- oxygen: { elem1: "enriched_uranium_dioxide", elem2: null, chance: 0.1 },
- meat: { elem2: "rotten_meat", chance: 0.1 },
- cheese: { elem2: "rotten_cheese", chance: 0.1 },
- quark_matter: { elem1: "stable_uranium" },
- },
- tempHigh: 1132.2,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 19100,
- hardness: 0.6,
- conduct: 0.235,
- excludeRandom: true,
-};
-
-runAfterLoad(function () {
- reactList("enriched_uranium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
- delete elements.enriched_uranium.reactions["dirty_water"];
-});
-
-runAfterLoad(function () {
- reactList("uranium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
- delete elements.uranium.reactions["dirty_water"];
-});
-
-elements.molten_enriched_uranium = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%2.5 AND CR:alpha_particle%0.1|XX", "M2 AND CR:radiation%2.5 AND CR:alpha_particle%0.1|XX|M2 AND CR:radiation%2.5 AND CR:alpha_particle%0.1", "M1|M1|M1"],
- reactions: {
- neutron: { func: enriched_uranium, temp1: 150 },
- quark_matter: { elem1: "stable_uranium" },
- },
- excludeRandom: true,
-};
-function enriched_uranium(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- }
- if (Math.random() < 0.1) {
- changePixel(pixel, "neptunium");
- }
- elementCircle(p.x, p.y, 2, "neutron");
-}
-
-function depleted_uranium(pixel) {
- if (Math.random() < 0.1) {
- changePixel(pixel, "plutonium");
- }
-}
-
-elements.stable_uranium = {
- color: [blendColors("#599e61", "#ff0000"), blendColors("#364d3c", "#00ff00"), blendColors("#494d4a", "#0000ff"), blendColors("#6c8a42", "#ff0000"), blendColors("#798d65", "#00ff00"), blendColors("#b5e089", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- oxygen: { elem1: "stable_uranium_dioxide", elem2: null, chance: 0.1 },
- meat: { elem2: "rotten_meat", chance: 0.1 },
- cheese: { elem2: "rotten_cheese", chance: 0.1 },
- water: { elem2: "dirty_water", chance: 0.25 },
- },
- tempHigh: 1132.2,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 19100,
- hardness: 0.6,
- conduct: 0.235,
-};
-runAfterLoad(function () {
- reactList("stable_uranium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
- delete elements.stable_uranium.reactions["dirty_water"];
-});
-
-elements.uranium.reactions["oxygen"] = { elem1: "uranium_dioxide", elem2: null, chance: 0.1 };
-elements.uranium.reactions["quark_matter"] = { elem1: "stable_uranium" };
-elements.uranium.behavior = ["XX|CR:radiation%1 AND CR:alpha_particle%0.01|XX", "CR:radiation%1 AND CR:alpha_particle%0.01|CH:thorium%0.001|CR:radiation%1 AND CR:alpha_particle%0.01", "M2|M1|M2"];
-elements.molten_uranium.behavior = ["XX|CR:fire%2.5 AND CR:radiation%1 AND CR:alpha_particle%0.01|XX", "M2 AND CR:radiation%1 AND CR:alpha_particle%0.01|XX|M2 AND CR:radiation%1 AND CR:alpha_particle%0.01", "M1|M1|M1"];
-elements.molten_uranium.reactions["quark_matter"] = { elem1: "stable_uranium" };
-elements.molten_uranium.excludeRandom = true;
-
-eListAddIon("URANIUMIV", "uranium_dioxide");
-eListAddIon("OXIDE", "uranium_dioxide");
-eListAdd("INSOLUBLE", "uranium_dioxide");
-eListAddIon("ENRICHEDURANIUMIV", "enriched_uranium_dioxide");
-eListAddIon("OXIDE", "enriched_uranium_dioxide");
-eListAdd("INSOLUBLE", "enriched_uranium_dioxide");
-eListAddIon("DEPLETEDURANIUMIV", "depleted_uranium_dioxide");
-eListAddIon("OXIDE", "depleted_uranium_dioxide");
-eListAdd("INSOLUBLE", "depleted_uranium_dioxide");
-eListAddIon("STABLEURANIUMIV", "stable_uranium_dioxide");
-eListAddIon("OXIDE", "stable_uranium_dioxide");
-eListAdd("INSOLUBLE", "stable_uranium_dioxide");
-
-elements.uranium_dioxide = {
- color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
- behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
- reactions: {
- neutron: { temp1: 25 },
- },
- tempHigh: 2865,
- category: "powders",
- state: "solid",
- density: 10970,
-};
-
-elements.molten_uranium_dioxide = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
- reactions: {
- neutron: { temp1: 25 },
- },
-};
-
-elements.depleted_uranium_dioxide = {
- color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
- behavior: behaviors.POWDER,
- reactions: {
- neutron: { elem2: null },
- },
- tempHigh: 2865,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 10970,
-};
-
-elements.stable_uranium_dioxide = {
- color: [blendColors("#474744", "#ff0000"), blendColors("#21211f", "#00ff00"), blendColors("#2b2b2b", "#0000ff"), blendColors("#9c998c", "#ff0000"), blendColors("#40403f", "#00ff00"), blendColors("#24231d", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- neutron: { elem2: null },
- },
- tempHigh: 2865,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 10970,
-};
-
-elements.enriched_uranium_dioxide = {
- color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
- behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
- reactions: {
- neutron: {
- func: function (pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- }
- elementCircle(p.x, p.y, 2, "neutron");
- },
- temp1: 150,
- },
- },
- tempHigh: 2865,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 10970,
- excludeRandom: true,
-};
-
-elements.molten_enriched_uranium_dioxide = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.25|XX", "M2 AND CR:radiation%0.25|XX|M2 AND CR:radiation%0.25", "M1|M1|M1"],
- reactions: {
- neutron: {
- func: function (pixel, p) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 2, "neutron");
- },
- },
- },
- excludeRandom: true,
-};
-
-function reduce(element, element2, result) {
- if (element2 === "oxygen") {
- Object.assign(elements[element].reactions, {
- molten_magnesium: { elem1: result, elem2: "magnesium_oxide" },
- molten_calcium: { elem1: result, elem2: "quicklime" },
- //"molten_sodium": { elem1: result, elem2: "sodium_oxide"},
- });
- }
- if (element2 === "fluorine") {
- Object.assign(elements[element].reactions, {
- molten_magnesium: { elem1: result, elem2: "magnesium_fluoride" },
- molten_calcium: { elem1: result, elem2: "fluorite" },
- molten_sodium: { elem1: result, elem2: "sodium_fluoride" },
- molten_potassium: { elem1: result, elem2: "potassium_fluoride" },
- });
- }
-}
-
-reduce("uranium_dioxide", "oxygen", "uranium");
-reduce("enriched_uranium_dioxide", "oxygen", "enriched_uranium");
-reduce("depleted_uranium_dioxide", "oxygen", "depleted_uranium");
-reduce("stable_uranium_dioxide", "oxygen", "stable_uranium");
-
-acidReact("hydrofluoric_acid", "uranium_dioxide", "uranium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid", "depleted_uranium_dioxide", "depleted_uranium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid", "enriched_uranium_dioxide", "enriched_uranium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid", "stable_uranium_dioxide", "stable_uranium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "uranium_dioxide", "uranium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "depleted_uranium_dioxide", "depleted_uranium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "enriched_uranium_dioxide", "enriched_uranium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "stable_uranium_dioxide", "stable_uranium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "uranium_dioxide", "uranium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "depleted_uranium_dioxide", "depleted_uranium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "enriched_uranium_dioxide", "enriched_uranium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "stable_uranium_dioxide", "stable_uranium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "uranium_dioxide", "uranium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "depleted_uranium_dioxide", "depleted_uranium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "enriched_uranium_dioxide", "enriched_uranium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "stable_uranium_dioxide", "stable_uranium_tetrafluoride", "fire");
-
-elements.hydrofluoric_acid.ignore.push("uranium_hexafluoride", "enriched_uranium_hexafluoride", "depleted_uranium_hexafluoride", "stable_uranium_hexafluoride");
-elements.hydrofluoric_acid_gas.ignore.push("uranium_hexafluoride", "enriched_uranium_hexafluoride", "depleted_uranium_hexafluoride", "stable_uranium_hexafluoride");
-elements.hydrogen_fluoride.ignore.push("uranium_hexafluoride", "enriched_uranium_hexafluoride", "depleted_uranium_hexafluoride", "stable_uranium_hexafluoride");
-elements.liquid_hydrogen_fluoride.ignore.push("uranium_hexafluoride", "enriched_uranium_hexafluoride", "depleted_uranium_hexafluoride", "stable_uranium_hexafluoride");
-
-eListAddIon("URANIUMIV", "uranium_tetrafluoride");
-eListAddIon("FLUORIDE", "uranium_tetrafluoride");
-eListAdd("INSOLUBLE", "uranium_tetrafluoride");
-eListAddIon("ENRICHEDURANIUMIV", "enriched_uranium_tetrafluoride");
-eListAddIon("FLUORIDE", "enriched_uranium_tetrafluoride");
-eListAdd("INSOLUBLE", "enriched_uranium_tetrafluoride");
-eListAddIon("DEPLETEDURANIUMIV", "depleted_uranium_tetrafluoride");
-eListAddIon("FLUORIDE", "depleted_uranium_tetrafluoride");
-eListAdd("INSOLUBLE", "depleted_uranium_tetrafluoride");
-eListAddIon("STABLEURANIUMIV", "stable_uranium_tetrafluoride");
-eListAddIon("FLUORIDE", "stable_uranium_tetrafluoride");
-eListAdd("INSOLUBLE", "stable_uranium_tetrafluoride");
-
-elements.uranium_tetrafluoride = {
- color: ["#495747", "#394d38", "#5a7859"],
- behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
- reactions: {},
- tempHigh: 1036,
- category: "powders",
- state: "solid",
- density: 6700,
- hidden: true,
-};
-
-elements.molten_uranium_tetrafluoride = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
-};
-
-elements.depleted_uranium_tetrafluoride = {
- color: ["#495747", "#394d38", "#5a7859"],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 1036,
- category: "powders",
- state: "solid",
- density: 6700,
- hidden: true,
-};
-
-elements.stable_uranium_tetrafluoride = {
- color: [blendColors("#495747", "#ff0000"), blendColors("#394d38", "#00ff00"), blendColors("#5a7859", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 1036,
- category: "powders",
- state: "solid",
- density: 6700,
- hidden: true,
-};
-
-elements.enriched_uranium_tetrafluoride = {
- color: ["#495747", "#394d38", "#5a7859"],
- behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
- reactions: {},
- tempHigh: 1036,
- category: "powders",
- state: "solid",
- density: 6700,
- hidden: true,
-};
-
-elements.molten_enriched_uranium_tetrafluoride = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.25|XX", "M2 AND CR:radiation%0.25|XX|M2 AND CR:radiation%0.25", "M1|M1|M1"],
-};
-
-toxic("uranium_tetrafluoride", 0.1);
-toxic("enriched_uranium_tetrafluoride", 0.1);
-toxic("depleted_uranium_tetrafluoride", 0.1);
-toxic("stable_uranium_tetrafluoride", 0.1);
-
-acidReact("fluorine", "uranium_tetrafluoride", "uranium_hexafluoride", "fire");
-acidReact("fluorine", "depleted_uranium_tetrafluoride", "depleted_uranium_hexafluoride", "fire");
-acidReact("fluorine", "enriched_uranium_tetrafluoride", "enriched_uranium_hexafluoride", "fire");
-acidReact("fluorine", "stable_uranium_tetrafluoride", "stable_uranium_hexafluoride", "fire");
-acidReact("liquid_fluorine", "uranium_tetrafluoride", "uranium_hexafluoride", "fire");
-acidReact("liquid_fluorine", "depleted_uranium_tetrafluoride", "depleted_uranium_hexafluoride", "fire");
-acidReact("liquid_fluorine", "enriched_uranium_tetrafluoride", "enriched_uranium_hexafluoride", "fire");
-acidReact("liquid_fluorine", "stable_uranium_tetrafluoride", "stable_uranium_hexafluoride", "fire");
-
-elements.fluorine.ignore.push("uranium_hexafluoride_gas", "depleted_uranium_hexafluoride_gas", "enriched_uranium_hexafluoride_gas", "stable_uranium_hexafluoride_gas");
-elements.liquid_fluorine.ignore.push("uranium_hexafluoride_gas", "depleted_uranium_hexafluoride_gas", "enriched_uranium_hexafluoride_gas", "stable_uranium_hexafluoride_gas");
-
-reduce("uranium_tetrafluoride", "fluorine", "uranium");
-reduce("enriched_uranium_tetrafluoride", "fluorine", "enriched_uranium");
-reduce("depleted_uranium_tetrafluoride", "fluorine", "depleted_uranium");
-reduce("stable_uranium_tetrafluoride", "fluorine", "stable_uranium");
-
-eListAddIon("URANIUMVI", "uranium_hexafluoride");
-eListAddIon("FLUORIDE", "uranium_hexafluoride");
-eListAdd("INSOLUBLE", "uranium_hexafluoride");
-eListAddIon("ENRICHEDURANIUMVI", "enriched_uranium_hexafluoride");
-eListAddIon("FLUORIDE", "enriched_uranium_hexafluoride");
-eListAdd("INSOLUBLE", "enriched_uranium_hexafluoride");
-eListAddIon("DEPLETEDURANIUMVI", "depleted_uranium_hexafluoride");
-eListAddIon("FLUORIDE", "depleted_uranium_hexafluoride");
-eListAdd("INSOLUBLE", "depleted_uranium_hexafluoride");
-eListAddIon("STABLEURANIUMVI", "stable_uranium_hexafluoride");
-eListAddIon("FLUORIDE", "stable_uranium_hexafluoride");
-eListAdd("INSOLUBLE", "stable_uranium_hexafluoride");
-
-elements.uranium_hexafluoride = {
- color: "#f7fff7",
- behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
- reactions: {
- hydrogen: { elem1: "uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 56.5,
- category: "powders",
- state: "solid",
- density: 5090,
- stateHighName: "uranium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.uranium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- behavior2: [
- ["XX", "CR:radiation%0.05", "XX"],
- ["CR:radiation%0.05", "XX", "CR:radiation%0.05"],
- ["XX", "CR:radiation%0.05", "XX"],
- ],
- tick: function (pixel) {
- pixelTick(pixel, elements[pixel.element].behavior2);
- },
- state: "gas",
- density: 12.84,
- reactions: {
- hydrogen: { elem1: "uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- onCentrifuge: function (pixel) {
- if (Math.random() < 0.05) {
- if (Math.random() < 0.8) {
- changePixel(pixel, "depleted_uranium_hexafluoride");
- } else {
- changePixel(pixel, "enriched_uranium_hexafluoride");
- }
- }
- },
-};
-
-elements.depleted_uranium_hexafluoride = {
- color: "#f7fff7",
- behavior: behaviors.POWDER,
- reactions: {
- hydrogen: { elem1: "depleted_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 56.5,
- category: "powders",
- state: "solid",
- density: 5090,
- stateHighName: "depleted_uranium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.depleted_uranium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- state: "gas",
- density: 12.84,
- reactions: {
- hydrogen: { elem1: "depleted_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
-};
-
-elements.stable_uranium_hexafluoride = {
- color: [blendColors("#f7fff7", "#ff0000"), blendColors("#f7fff7", "#00ff00"), blendColors("#f7fff7", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- hydrogen: { elem1: "stable_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 56.5,
- category: "powders",
- state: "solid",
- density: 5090,
- stateHighName: "stable_uranium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.stable_uranium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- state: "gas",
- density: 12.84,
- reactions: {
- hydrogen: { elem1: "stable_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
-};
-
-elements.enriched_uranium_hexafluoride = {
- color: "#f7fff7",
- behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
- reactions: {
- hydrogen: { elem1: "enriched_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 56.5,
- category: "powders",
- state: "solid",
- density: 5090,
- stateHighName: "enriched_uranium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.enriched_uranium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- behavior2: [
- ["XX", "CR:radiation%0.25", "XX"],
- ["CR:radiation%0.25", "XX", "CR:radiation%0.25"],
- ["XX", "CR:radiation%0.25", "XX"],
- ],
- tick: function (pixel) {
- pixelTick(pixel, elements[pixel.element].behavior2);
- },
- reactions: {
- hydrogen: { elem1: "enriched_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- state: "gas",
- density: 12.84,
-};
-
-toxic("uranium_hexafluoride", 0.2);
-toxic("enriched_uranium_hexafluoride", 0.2);
-toxic("depleted_uranium_hexafluoride", 0.2);
-toxic("stable_uranium_hexafluoride", 0.2);
-toxic("uranium_hexafluoride_gas", 0.2);
-toxic("enriched_uranium_hexafluoride_gas", 0.2);
-toxic("depleted_uranium_hexafluoride_gas", 0.2);
-toxic("stable_uranium_hexafluoride_gas", 0.2);
-
-runAfterLoad(function () {
- reactList("uranium_hexafluoride", eLists.WATER, { elem1: "uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("depleted_uranium_hexafluoride", eLists.WATER, { elem1: "depleted_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("enriched_uranium_hexafluoride", eLists.WATER, { elem1: "enriched_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("stable_uranium_hexafluoride", eLists.WATER, { elem1: "stable_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("uranium_hexafluoride_gas", eLists.WATER, { elem1: "uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("depleted_uranium_hexafluoride_gas", eLists.WATER, { elem1: "depleted_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("enriched_uranium_hexafluoride_gas", eLists.WATER, { elem1: "enriched_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("stable_uranium_hexafluoride_gas", eLists.WATER, { elem1: "stable_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
-});
-
-elements.radium = {
- color: "#3bdeff",
- behavior: ["XX|CR:radiation%10|XX", "CR:radiation%10|CH:radon%0.1|CR:radiation%10", "M2|M1|M2"],
- tick: function (pixel) {
- pixel.temp += 1;
- },
- reactions: {
- quark_matter: { elem1: "stable_radium" },
- },
- tempHigh: 700,
- category: "powders",
- state: "solid",
- density: 5500,
- conduct: 0.4,
-};
-
-runAfterLoad(function () {
- reactList("radium", eLists.WATER, { elem1: ["radium_water", "rad_pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350, func: radiumWater });
-});
-
-elements.molten_radium = {
- behavior: ["XX|CR:radiation%10|XX", "M2 AND CR:radiation%10|CH:radon%0.01|M2 AND CR:radiation%10", "M1|M1|M1"],
- tick: function (pixel) {
- pixel.temp += 1;
- },
- reactions: {
- quark_matter: { elem1: "stable_radium" },
- },
- conduct: 0.4,
-};
-
-toxic("radium", 1);
-
-runAfterLoad(function () {
- reactList("molten_radium", eLists.WATER, { elem1: ["radium_water", "rad_pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350, func: radiumWater });
-});
-
-function radiumWater(pixel) {
- elementCircle(pixel.x, pixel.y, 15, "radium_water", 0.1, eLists.WATER);
-}
-
-elements.radium_water = {
- color: "#3bc4ff",
- behavior: ["XX|CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
- reactions: {
- head: { elem2: null, chance: 0.4 },
- bone: { elem2: ["quicklime", "quicklime"], chance: 0.4 },
- bone_marrow: { elem2: ["quicklime", "blood"], chance: 0.4 },
- },
- tempHigh: 100,
- stateHigh: "rad_steam",
- state: "liquid",
- density: 1100,
- category: "liquids",
- hidden: true,
- tempLow: 0,
-};
-
-toxic("radium_water", 0.1);
-elements.radium_water.reactions.head = { elem2: null, chance: 0.4 };
-elements.radium_water.reactions.bone = { elem2: ["quicklime", "quicklime"], chance: 0.4 };
-elements.radium_water.reactions.bone_marrow = { elem2: ["quicklime", "blood"], chance: 0.4 };
-eListAdd("WATER", "radium_water");
-
-elements.actinium = {
- color: "#62ebf0",
- behavior: ["XX|CR:alpha_particle%0.1 AND CR:radiation%10|XX", "CR:alpha_particle%0.1 AND CR:radiation%10|CH:radium%0.02|CR:alpha_particle%0.1 AND CR:radiation%10", "M2|M1|M2"],
- tick: function (pixel) {
- pixel.temp += 2.5;
- },
- reactions: {
- quark_matter: { elem1: "stable_actinium" },
- },
- tempHigh: 1227,
- category: "powders",
- state: "solid",
- density: 10000,
- conduct: 0.225,
-};
-toxic("actinium", 1);
-elements.molten_actinium = {
- behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.1 AND CR:radiation%10|XX", "M2 AND CR:alpha_particle%0.1 AND CR:radiation%10|CH:radium%0.02|M2 AND CR:alpha_particle%0.1 AND CR:radiation%10", "M1|M1|M1"],
- tick: function (pixel) {
- pixel.temp += 2.5;
- },
- reactions: {
- quark_matter: { elem1: "stable_actinium" },
- },
- conduct: 0.225,
-};
-
-elements.thorium = {
- color: ["#599e8a", "#364d4b", "#494d4c", "#428a58", "#658d7a", "#89e0a2"],
- behavior: ["XX|CR:alpha_particle%0.01|XX", "CR:alpha_particle%0.01|CH:lead%0.001|CR:alpha_particle%0.01", "XX|CR:alpha_particle%0.01|XX"],
- reactions: {
- neutron: {
- temp1: 100,
- func: function (pixel, p) {
- if (Math.random() < 0.1) {
- changePixel(pixel, "radium");
- elementCircle(p.x, p.y, 2, "neutron");
- }
- },
- },
- oxygen: { elem1: "thorium_dioxide", elem2: null, chance: 0.1 },
- quark_matter: { elem1: "stable_thorium" },
- },
- tempHigh: 1750,
- category: "solids",
- state: "solid",
- density: 11700,
- hardness: 0.7,
- conduct: 0.235,
-};
-elements.molten_thorium = {
- behavior: ["XX|CR:alpha_particle%0.01|XX", "M2 AND CR:alpha_particle%0.01|XX|M2 AND CR:alpha_particle%0.01", "M1|M1|M1"],
- reactions: {
- neutron: {
- temp1: 100,
- func: function (pixel, p) {
- if (Math.random() < 0.1) {
- changePixel(pixel, "radium");
- elementCircle(p.x, p.y, 2, "neutron");
- }
- },
- },
- oxygen: { elem1: "thorium_dioxide", elem2: null },
- quark_matter: { elem1: "stable_thorium" },
- },
-};
-
-elements.protactinium = {
- color: ["#9899a3", "#44464a", "#5a5b5e"],
- behavior: ["XX|CR:alpha_particle%0.01 AND CR:radiation%2|XX", "CR:alpha_particle%0.01 AND CR:radiation%2|CH:actinium%0.01|CR:alpha_particle%0.01 AND CR:radiation%2", "M2|M1|M2"],
- reactions: {
- quark_matter: { elem1: "stable_protactinium" },
- },
- tempHigh: 1568,
- category: "powders",
- state: "solid",
- density: 15700,
- hardness: 0.1,
- conduct: 0.235,
-};
-
-elements.molten_protactinium = {
- behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.01 AND CR:radiation%2|XX", "M2 AND CR:alpha_particle%0.01 AND CR:radiation%2|CH:actinium%0.01|M2 AND CR:alpha_particle%0.01 AND CR:radiation%2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_protactinium" },
- },
-};
-
-elements.neptunium = {
- color: ["#626580", "#3f4a61", "#4a5463"],
- behavior: ["XX|CR:neutron%0.1 AND CR:radiation%2|XX", "CR:neutron%0.1 AND CR:radiation%2|CH:thorium%0.025|CR:neutron%0.1 AND CR:radiation%2", "XX|CR:neutron%0.1 AND CR:radiation%2|XX"],
- reactions: {
- quark_matter: { elem1: "stable_neptunium" },
- neutron: { func: fissile, temp1: 150 },
- },
- tempHigh: 639,
- category: "solids",
- state: "solid",
- density: 19380,
- hardness: 0.7,
- conduct: 0.2,
- excludeRandom: true,
-};
-
-elements.molten_neptunium = {
- behavior: ["XX|CR:fire%2.5 AND CR:neutron%0.1 AND CR:radiation%2|XX", "M2 AND CR:neutron%0.1 AND CR:radiation%2|CH:thorium%0.025|M2 AND CR:neutron%0.1 AND CR:radiation%2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_neptunium" },
- neutron: { func: fissile, temp1: 150 },
- },
-};
-
-function fissile(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- }
- elementCircle(p.x, p.y, 2, "neutron");
-}
-
-elements.plutonium = {
- color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
- behavior: ["XX|CR:alpha_particle%0.05 AND CR:radiation%2|XX", "CR:alpha_particle%0.05 AND CR:radiation%2|CH:enriched_uranium%0.025 AND CH:americium%0.025|CR:alpha_particle%0.05 AND CR:radiation%2", "XX|CR:alpha_particle%0.05 AND CR:radiation%2|XX"],
- reactions: {
- oxygen: { elem1: "plutonium_dioxide", elem2: null },
- quark_matter: { elem1: "stable_plutonium" },
- neutron: { func: plutonium, temp1: 100 },
- },
- tempHigh: 639,
- category: "solids",
- state: "solid",
- density: 19850,
- hardness: 0.7,
- conduct: 0.2,
- excludeRandom: true,
-};
-
-elements.molten_plutonium = {
- behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.05 AND CR:radiation%2|XX", "M2 AND CR:alpha_particle%0.05 AND CR:radiation%2|CH:enriched_uranium%0.025|M2 AND CR:alpha_particle%0.05 AND CR:radiation%2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_plutonium" },
- neutron: { func: plutonium, temp1: 100 },
- },
- excludeRandom: true,
-};
-
-elements.enriched_plutonium = {
- color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
- behavior: ["XX|CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|XX", "CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|CH:enriched_uranium%0.05|CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1", "XX|CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|XX"],
- reactions: {
- oxygen: { elem1: "enriched_plutonium_dioxide", elem2: null },
- quark_matter: { elem1: "stable_plutonium" },
- neutron: { func: plutonium, temp1: 150 },
- },
- tempHigh: 639,
- category: "solids",
- state: "solid",
- density: 19850,
- hardness: 0.7,
- conduct: 0.2,
- excludeRandom: true,
- hidden: true,
-};
-
-elements.molten_enriched_plutonium = {
- behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|XX", "M2 AND CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|CH:enriched_uranium%0.025|M2 AND CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_plutonium" },
- neutron: { func: plutonium, temp1: 150 },
- },
- excludeRandom: true,
-};
-
-elements.depleted_plutonium = {
- color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
- behavior: ["XX|CR:radiation%2|XX", "CR:radiation%2|CH:enriched_uranium%0.05|CR:radiation%2", "XX|CR:radiation%2|XX"],
- reactions: {
- oxygen: { elem1: "depleted_plutonium_dioxide", elem2: null },
- quark_matter: { elem1: "stable_plutonium" },
- neutron: { func: depleted_plutonium, temp1: 25 },
- },
- tempHigh: 639,
- category: "solids",
- state: "solid",
- density: 19850,
- hardness: 0.7,
- conduct: 0.2,
- excludeRandom: true,
- hidden: true,
-};
-
-elements.molten_depleted_plutonium = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%2|XX", "M2 AND CR:radiation%2|CH:enriched_uranium%0.025|M2 AND CR:radiation%2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_plutonium" },
- neutron: { func: plutonium, temp1: 25 },
- },
-};
-
-elements.stable_plutonium = {
- color: [blendColors("#5fc29f", "#ff0000"), blendColors("#5d9e7d", "#00ff00"), blendColors("#5b7d6b", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- oxygen: { elem1: "stable_plutonium_dioxide", elem2: null },
- },
- tempHigh: 639,
- category: "solids",
- state: "solid",
- density: 19850,
- hardness: 0.7,
- conduct: 0.2,
- hidden: true,
-};
-
-function plutonium(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 5, "neutron");
- }
- if (Math.random() < 0.1) {
- changePixel(pixel, "americium");
- }
- elementCircle(p.x, p.y, 2, "neutron");
-}
-
-function depleted_plutonium(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 5, "neutron");
- }
- if (Math.random() < 0.1) {
- changePixel(pixel, "americium");
- }
-}
-
-runAfterLoad(function () {
- reactList("plutonium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
- delete elements.plutonium.reactions["dirty_water"];
- reactList("enriched_plutonium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
- delete elements.plutonium.reactions["dirty_water"];
- reactList("depleted_plutonium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
- delete elements.plutonium.reactions["dirty_water"];
- reactList("stable_plutonium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
- delete elements.stable_plutonium.reactions["dirty_water"];
-});
-
-elements.plutonium_dioxide = {
- color: ["#edcf47", "#c7a924", "#e3c129"],
- behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
- reactions: {
- neutron: {
- func: function (pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- }
- elementCircle(p.x, p.y, 2, "neutron");
- },
- temp1: 20,
- },
- },
- tempHigh: 2744,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 11500,
- excludeRandom: true,
-};
-
-elements.molten_plutonium_dioxide = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.25|XX", "M2 AND CR:radiation%0.25|XX|M2 AND CR:radiation%0.25", "M1|M1|M1"],
- reactions: {
- neutron: {
- func: function (pixel, p) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 2, "neutron");
- },
- },
- },
- excludeRandom: true,
-};
-
-elements.enriched_plutonium_dioxide = {
- color: ["#edcf47", "#c7a924", "#e3c129"],
- behavior: ["XX|CR:radiation%0.5|XX", "CR:radiation%0.5|XX|CR:radiation%0.5", "M2|M1|M2"],
- reactions: {
- neutron: {
- func: function (pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- }
- elementCircle(p.x, p.y, 2, "neutron");
- },
- temp1: 50,
- },
- },
- tempHigh: 2744,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 11500,
- excludeRandom: true,
-};
-
-elements.molten_enriched_plutonium_dioxide = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.5|XX", "M2 AND CR:radiation%0.5|XX|M2 AND CR:radiation%0.5", "M1|M1|M1"],
- reactions: {
- neutron: {
- func: function (pixel, p) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 2, "neutron");
- },
- },
- },
- excludeRandom: true,
-};
-
-elements.depleted_plutonium_dioxide = {
- color: ["#edcf47", "#c7a924", "#e3c129"],
- behavior: ["XX|CR:radiation%0.1|XX", "CR:radiation%0.1|XX|CR:radiation%0.1", "M2|M1|M2"],
- reactions: {
- neutron: {
- func: function (pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- }
- elementCircle(p.x, p.y, 2, "neutron");
- },
- temp1: 50,
- },
- },
- tempHigh: 2744,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 11500,
- excludeRandom: true,
-};
-
-elements.molten_depleted_plutonium_dioxide = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.1|XX", "M2 AND CR:radiation%0.1|XX|M2 AND CR:radiation%0.1", "M1|M1|M1"],
- reactions: {
- neutron: {
- func: function (pixel, p) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 2, "neutron");
- },
- },
- },
- excludeRandom: true,
-};
-
-elements.stable_plutonium_dioxide = {
- color: [blendColors("#edcf47", "#ff0000"), blendColors("#c7a924", "#00ff00"), blendColors("#e3c129", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- neutron: { elem2: null },
- },
- tempHigh: 2744,
- category: "powders",
- hidden: true,
- state: "solid",
- density: 11500,
-};
-
-reduce("plutonium_dioxide", "oxygen", "plutonium");
-reduce("enriched_plutonium_dioxide", "oxygen", "enriched_plutonium");
-reduce("depleted_plutonium_dioxide", "oxygen", "depleted_plutonium");
-reduce("stable_plutonium_dioxide", "oxygen", "stable_plutonium");
-
-acidReact("hydrofluoric_acid", "plutonium_dioxide", "plutonium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid", "enriched_plutonium_dioxide", "enriched_plutonium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid", "depleted_plutonium_dioxide", "depleted_plutonium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid", "stable_plutonium_dioxide", "stable_plutonium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "plutonium_dioxide", "plutonium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "enriched_plutonium_dioxide", "enriched_plutonium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "depleted_plutonium_dioxide", "depleted_plutonium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "stable_plutonium_dioxide", "stable_plutonium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "plutonium_dioxide", "plutonium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "enriched_plutonium_dioxide", "enriched_plutonium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "depleted_plutonium_dioxide", "depleted_plutonium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "stable_plutonium_dioxide", "stable_plutonium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "plutonium_dioxide", "plutonium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "enriched_plutonium_dioxide", "enriched_plutonium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "depleted_plutonium_dioxide", "depleted_plutonium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "stable_plutonium_dioxide", "stable_plutonium_tetrafluoride", "fire");
-
-elements.hydrofluoric_acid.ignore.push("plutonium_hexafluoride", "enriched_plutonium_hexafluoride", "depleted_plutonium_hexafluoride", "stable_plutonium_hexafluoride");
-elements.hydrofluoric_acid_gas.ignore.push("plutonium_hexafluoride", "enriched_plutonium_hexafluoride", "depleted_plutonium_hexafluoride", "stable_plutonium_hexafluoride");
-elements.hydrogen_fluoride.ignore.push("plutonium_hexafluoride", "enriched_plutonium_hexafluoride", "depleted_plutonium_hexafluoride", "stable_plutonium_hexafluoride");
-elements.liquid_hydrogen_fluoride.ignore.push("plutonium_hexafluoride", "enriched_plutonium_hexafluoride", "depleted_plutonium_hexafluoride", "stable_plutonium_hexafluoride");
-
-eListAddIon("PLUTONIUMIV", "plutonium_tetrafluoride");
-eListAddIon("FLUORIDE", "plutonium_tetrafluoride");
-eListAdd("INSOLUBLE", "plutonium_tetrafluoride");
-eListAddIon("ENRICHEDPLUTONIUMIV", "enriched_plutonium_tetrafluoride");
-eListAddIon("FLUORIDE", "enriched_plutonium_tetrafluoride");
-eListAdd("INSOLUBLE", "enriched_plutonium_tetrafluoride");
-eListAddIon("DEPLETEDPLUTONIUMIV", "depleted_plutonium_tetrafluoride");
-eListAddIon("FLUORIDE", "depleted_plutonium_tetrafluoride");
-eListAdd("INSOLUBLE", "depleted_plutonium_tetrafluoride");
-eListAddIon("STABLEPLUTONIUMIV", "stable_plutonium_tetrafluoride");
-eListAddIon("FLUORIDE", "stable_plutonium_tetrafluoride");
-eListAdd("INSOLUBLE", "stable_plutonium_tetrafluoride");
-
-elements.plutonium_tetrafluoride = {
- color: ["#a13d0b", "#85401d", "#733211"],
- behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
- reactions: {},
- tempHigh: 1027,
- category: "powders",
- state: "solid",
- density: 7100,
- hidden: true,
-};
-
-elements.enriched_plutonium_tetrafluoride = {
- color: ["#a13d0b", "#85401d", "#733211"],
- behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
- reactions: {},
- tempHigh: 1027,
- category: "powders",
- state: "solid",
- density: 7100,
- hidden: true,
-};
-
-elements.depleted_plutonium_tetrafluoride = {
- color: ["#a13d0b", "#85401d", "#733211"],
- behavior: ["XX|CR:radiation%0.02|XX", "CR:radiation%0.02|XX|CR:radiation%0.02", "M2|M1|M2"],
- reactions: {},
- tempHigh: 1027,
- category: "powders",
- state: "solid",
- density: 7100,
- hidden: true,
-};
-
-elements.molten_plutonium_tetrafluoride = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
-};
-
-elements.molten_enriched_plutonium_tetrafluoride = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.1|XX", "M2 AND CR:radiation%0.1|XX|M2 AND CR:radiation%0.1", "M1|M1|M1"],
-};
-
-elements.molten_depleted_plutonium_tetrafluoride = {
- behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.02|XX", "M2 AND CR:radiation%0.02|XX|M2 AND CR:radiation%0.02", "M1|M1|M1"],
-};
-
-elements.stable_plutonium_tetrafluoride = {
- color: [blendColors("#a13d0b", "#ff0000"), blendColors("#85401d", "#00ff00"), blendColors("#733211", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 1027,
- category: "powders",
- state: "solid",
- density: 7100,
- hidden: true,
-};
-
-toxic("plutonium_tetrafluoride", 0.1);
-toxic("enriched_plutonium_tetrafluoride", 0.1);
-toxic("depleted_plutonium_tetrafluoride", 0.1);
-toxic("stable_plutonium_tetrafluoride", 0.1);
-
-acidReact("fluorine", "plutonium_tetrafluoride", [null, null, null, null, "plutonium_hexafluoride"], null);
-acidReact("fluorine", "enriched_plutonium_tetrafluoride", [null, null, null, null, "enriched_plutonium_hexafluoride"], null);
-acidReact("fluorine", "depleted_plutonium_tetrafluoride", [null, null, null, null, "depleted_plutonium_hexafluoride"], null);
-acidReact("fluorine", "stable_plutonium_tetrafluoride", [null, null, null, null, "stable_plutonium_hexafluoride"], null);
-acidReact("liquid_fluorine", "plutonium_tetrafluoride", [null, null, null, null, "plutonium_hexafluoride"], null);
-acidReact("liquid_fluorine", "enriched_plutonium_tetrafluoride", [null, null, null, null, "enriched_plutonium_hexafluoride"], null);
-acidReact("liquid_fluorine", "depleted_plutonium_tetrafluoride", [null, null, null, null, "depleted_plutonium_hexafluoride"], null);
-acidReact("liquid_fluorine", "stable_plutonium_tetrafluoride", [null, null, null, null, "stable_plutonium_hexafluoride"], null);
-acidReact("foof", "plutonium_tetrafluoride", "plutonium_hexafluoride", null);
-acidReact("foof", "enriched_plutonium_tetrafluoride", "enriched_plutonium_hexafluoride", null);
-acidReact("foof", "depleted_plutonium_tetrafluoride", "depleted_plutonium_hexafluoride", null);
-acidReact("foof", "stable_plutonium_tetrafluoride", "stable_plutonium_hexafluoride", null);
-acidReact("solid_foof", "plutonium_tetrafluoride", "plutonium_hexafluoride", null);
-acidReact("solid_foof", "enriched_plutonium_tetrafluoride", "enriched_plutonium_hexafluoride", null);
-acidReact("solid_foof", "depleted_plutonium_tetrafluoride", "depleted_plutonium_hexafluoride", null);
-acidReact("solid_foof", "stable_plutonium_tetrafluoride", "stable_plutonium_hexafluoride", null);
-elements.foof.ignore.push("radiation");
-elements.solid_foof.ignore.push("radiation");
-
-reduce("plutonium_tetrafluoride", "fluorine", "plutonium");
-reduce("enriched_plutonium_tetrafluoride", "fluorine", "enriched_plutonium");
-reduce("depleted_plutonium_tetrafluoride", "fluorine", "depleted_plutonium");
-reduce("stable_plutonium_tetrafluoride", "fluorine", "stable_plutonium");
-
-eListAddIon("PLUTONIUMVI", "plutonium_hexafluoride");
-eListAddIon("FLUORIDE", "plutonium_hexafluoride");
-eListAdd("INSOLUBLE", "plutonium_hexafluoride");
-eListAddIon("ENRICHEDPLUTONIUMVI", "enriched_plutonium_hexafluoride");
-eListAddIon("FLUORIDE", "enriched_plutonium_hexafluoride");
-eListAdd("INSOLUBLE", "enriched_plutonium_hexafluoride");
-eListAddIon("DEPLETEDPLUTONIUMVI", "depleted_plutonium_hexafluoride");
-eListAddIon("FLUORIDE", "depleted_plutonium_hexafluoride");
-eListAdd("INSOLUBLE", "depleted_plutonium_hexafluoride");
-eListAddIon("STABLEPLUTONIUMVI", "stable_plutonium_hexafluoride");
-eListAddIon("FLUORIDE", "stable_plutonium_hexafluoride");
-eListAdd("INSOLUBLE", "stable_plutonium_hexafluoride");
-
-elements.plutonium_hexafluoride = {
- color: "#6e2602",
- behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
- reactions: {
- hydrogen: { elem1: "plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 62.5,
- category: "powders",
- state: "solid",
- density: 5080,
- stateHighName: "plutonium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.plutonium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- behavior2: [
- ["XX", "CR:radiation%0.05", "XX"],
- ["CR:radiation%0.05", "XX", "CR:radiation%0.05"],
- ["XX", "CR:radiation%0.05", "XX"],
- ],
- tick: function (pixel) {
- pixelTick(pixel, elements[pixel.element].behavior2);
- },
- state: "gas",
- density: 14.88,
- reactions: {
- hydrogen: { elem1: "plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 280,
- stateHigh: ["plutonium_tetrafluoride", "fluorine"],
- onCentrifuge: function (pixel) {
- if (Math.random() < 0.05) {
- if (Math.random() < 0.5) {
- changePixel(pixel, "depleted_plutonium_hexafluoride");
- } else {
- changePixel(pixel, "enriched_plutonium_hexafluoride");
- }
- }
- },
-};
-
-elements.enriched_plutonium_hexafluoride = {
- color: "#6e2602",
- behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
- reactions: {
- hydrogen: { elem1: "enriched_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 62.5,
- category: "powders",
- state: "solid",
- density: 5080,
- stateHighName: "enriched_plutonium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.enriched_plutonium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- behavior2: [
- ["XX", "CR:radiation%0.25", "XX"],
- ["CR:radiation%0.25", "XX", "CR:radiation%0.25"],
- ["XX", "CR:radiation%0.25", "XX"],
- ],
- tick: function (pixel) {
- pixelTick(pixel, elements[pixel.element].behavior2);
- },
- state: "gas",
- density: 14.88,
- reactions: {
- hydrogen: { elem1: "enriched_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 280,
- stateHigh: ["enriched_plutonium_tetrafluoride", "fluorine"],
-};
-
-elements.depleted_plutonium_hexafluoride = {
- color: "#6e2602",
- behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
- reactions: {
- hydrogen: { elem1: "depleted_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 62.5,
- category: "powders",
- state: "solid",
- density: 5080,
- stateHighName: "depleted_plutonium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.depleted_plutonium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- behavior2: [
- ["XX", "CR:radiation%0.01", "XX"],
- ["CR:radiation%0.01", "XX", "CR:radiation%0.01"],
- ["XX", "CR:radiation%0.01", "XX"],
- ],
- tick: function (pixel) {
- pixelTick(pixel, elements[pixel.element].behavior2);
- },
- state: "gas",
- density: 14.88,
- reactions: {
- hydrogen: { elem1: "depleted_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 280,
- stateHigh: ["depleted_plutonium_tetrafluoride", "fluorine"],
-};
-
-elements.stable_plutonium_hexafluoride = {
- color: [blendColors("#6e2602", "#ff0000"), blendColors("#6e2602", "#00ff00"), blendColors("#6e2602", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- hydrogen: { elem1: "stable_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 62.5,
- category: "powders",
- state: "solid",
- density: 5080,
- stateHighName: "stable_plutonium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.stable_plutonium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- state: "gas",
- density: 14.88,
- reactions: {
- hydrogen: { elem1: "stable_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 280,
- stateHigh: ["stable_plutonium_tetrafluoride", "fluorine"],
-};
-
-runAfterLoad(function () {
- reactList("plutonium_hexafluoride", eLists.WATER, { elem1: "plutonium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("enriched_plutonium_hexafluoride", eLists.WATER, { elem1: "enriched_plutonium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("depleted_plutonium_hexafluoride", eLists.WATER, { elem1: "depleted_plutonium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("stable_plutonium_hexafluoride", eLists.WATER, { elem1: "stable_plutonium_tetrafluoride", elem2: "hydrofluoric_acid" });
-});
-
-toxic("plutonium_hexafluoride", 0.1);
-toxic("enriched_plutonium_hexafluoride", 0.1);
-toxic("depleted_plutonium_hexafluoride", 0.1);
-toxic("stable_plutonium_hexafluoride", 0.1);
-toxic("plutonium_hexafluoride_gas", 0.1);
-toxic("enriched_plutonium_hexafluoride_gas", 0.1);
-toxic("depleted_plutonium_hexafluoride_gas", 0.1);
-toxic("stable_plutonium_hexafluoride_gas", 0.1);
-
-elements.americium = {
- color: ["#42ebaf", "#59d998", "#d0dbd5"],
- behavior: ["XX|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX", "CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|CH:neptunium%0.05 AND CH:plutonium%0.05|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2", "XX|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX"],
- reactions: {
- quark_matter: { elem1: "stable_americium" },
- neutron: { func: americium, temp1: 150 },
- },
- tempHigh: 1176,
- category: "solids",
- state: "solid",
- density: 12000,
- hardness: 0.9,
- conduct: 0.2,
- excludeRandom: true,
-};
-
-elements.stable_americium = {
- color: [blendColors("#42ebaf", "#ff0000"), blendColors("#59d998", "#00ff00"), blendColors("#d0dbd5", "#0000ff")],
- behavior: behaviors.WALL,
- tempHigh: 1176,
- category: "solids",
- state: "solid",
- density: 12000,
- hardness: 0.9,
- conduct: 0.2,
- hidden: true,
-};
-
-elements.molten_americium = {
- behavior: ["XX|CR:fire%2.5 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX", "M2 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|CH:neptunium%0.05 AND CH:plutonium%0.05|M2 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_americium" },
- neutron: { func: americium, temp1: 150 },
- },
- excludeRandom: true,
-};
-
-function americium(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 5, "neutron");
- }
- if (Math.random() < 0.1) {
- changePixel(pixel, "curium");
- }
- elementCircle(p.x, p.y, 2, "neutron");
-}
-
-elements.curium = {
- color: ["#fab1f1", "#d6c9d5", "#e0b1d6"],
- behavior: ["XX|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|CH:plutonium%0.075|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_curium" },
- neutron: { func: curium, temp1: 175 },
- },
- tempHigh: 1340,
- category: "solids",
- state: "solid",
- density: 13510,
- hardness: 0.9,
- conduct: 0.2,
- excludeRandom: true,
-};
-
-elements.stable_curium = {
- color: [blendColors("#fab1f1", "#ff0000"), blendColors("#d6c9d5", "#00ff00"), blendColors("#e0b1d6", "#0000ff")],
- behavior: behaviors.WALL,
- tempHigh: 1340,
- category: "solids",
- state: "solid",
- density: 13510,
- hardness: 0.9,
- conduct: 0.2,
- hidden: true,
-};
-
-elements.molten_curium = {
- behavior: ["XX|CR:fire%2.5 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|CH:plutonium%0.075|M2 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_curium" },
- neutron: { func: curium, temp1: 150 },
- },
- excludeRandom: true,
-};
-
-function curium(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 5, "neutron");
- }
- if (Math.random() < 0.1) {
- changePixel(pixel, "berkelium");
- }
- elementCircle(p.x, p.y, 2, "neutron");
-}
-
-elements.berkelium = {
- color: ["#f2edfa", "#bdbccf", "#d7cae8"],
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.075|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_berkelium" },
- neutron: { func: berkelium, temp1: 175 },
- },
- tempHigh: 986,
- category: "solids",
- state: "solid",
- density: 13250,
- hardness: 0.9,
- conduct: 0.2,
- excludeRandom: true,
-};
-
-elements.stable_berkelium = {
- color: [blendColors("#f2edfa", "#ff0000"), blendColors("#bdbccf", "#00ff00"), blendColors("#d7cae8", "#0000ff")],
- behavior: behaviors.WALL,
- tempHigh: 986,
- category: "solids",
- state: "solid",
- density: 13250,
- hardness: 0.9,
- conduct: 0.2,
- hidden: true,
-};
-
-elements.molten_berkelium = {
- behavior: ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.075|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_berkelium" },
- neutron: { func: berkelium, temp1: 150 },
- },
- excludeRandom: true,
-};
-
-function berkelium(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 5, "neutron");
- }
- if (Math.random() < 0.1) {
- changePixel(pixel, "californium");
- }
- elementCircle(p.x, p.y, 2, "neutron", 0.2);
-}
-
-elements.californium = {
- color: ["#dfd0f7", "#bcbade", "#b99be0"],
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:curium%0.05 AND CH:einsteinium%0.05|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_californium" },
- neutron: { func: californium, temp1: 175 },
- },
- tempHigh: 900,
- category: "solids",
- state: "solid",
- density: 15100,
- hardness: 0.9,
- conduct: 0.2,
- excludeRandom: true,
-};
-
-elements.stable_californium = {
- color: [blendColors("#dfd0f7", "#ff0000"), blendColors("#bcbade", "#00ff00"), blendColors("#b99be0", "#0000ff")],
- behavior: behaviors.WALL,
- tempHigh: 900,
- category: "solids",
- state: "solid",
- density: 15100,
- hardness: 0.9,
- conduct: 0.2,
- hidden: true,
-};
-
-elements.molten_californium = {
- behavior: ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:curium%0.05 AND CH:einsteinium%0.05|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_californium" },
- neutron: { func: californium, temp1: 150 },
- },
- excludeRandom: true,
-};
-
-function californium(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 5, "neutron");
- }
- if (Math.random() < 0.1) {
- changePixel(pixel, "einsteinium");
- }
- elementCircle(p.x, p.y, 2, "neutron", 0.25);
-}
-
-elements.einsteinium = {
- color: ["#3aa6c2", "#b8edf1", "#83d9e4"],
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:berkelium%0.05 AND CH:fermium%0.05|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_einsteinium" },
- neutron: { func: einsteinium, temp1: 175 },
- },
- tempHigh: 1133,
- category: "solids",
- state: "solid",
- density: 8840,
- hardness: 0.9,
- conduct: 0.2,
- excludeRandom: true,
-};
-
-elements.stable_einsteinium = {
- color: [blendColors("#3aa6c2", "#ff0000"), blendColors("#b8edf1", "#00ff00"), blendColors("#83d9e4", "#0000ff")],
- behavior: behaviors.WALL,
- tempHigh: 1133,
- category: "solids",
- state: "solid",
- density: 8840,
- hardness: 0.9,
- conduct: 0.2,
- hidden: true,
-};
-
-elements.molten_einsteinium = {
- behavior: ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:berkelium%0.05 AND CH:fermium%0.05|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_einsteinium" },
- neutron: { func: einsteinium, temp1: 150 },
- },
- excludeRandom: true,
-};
-
-function einsteinium(pixel, p) {
- if (pixel.temp >= 500) {
- transmuteAround(pixel);
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 5, "neutron");
- }
- if (Math.random() < 0.1) {
- changePixel(pixel, "fermium");
- }
- elementCircle(p.x, p.y, 3, "neutron");
-}
-
-elements.fermium = {
- color: ["#c8a7fc", "#cecbf2", "#d5bff2"],
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_fermium" },
- neutron: { func: fermium, temp1: 175 },
- },
- tempHigh: 1800,
- category: "solids",
- state: "solid",
- density: 9710,
- hardness: 0.9,
- conduct: 0.2,
- excludeRandom: true,
-};
-
-elements.stable_fermium = {
- color: [blendColors("#c8a7fc", "#ff0000"), blendColors("#cecbf2", "#00ff00"), blendColors("#d5bff2", "#0000ff")],
- behavior: behaviors.WALL,
- tempHigh: 1800,
- category: "solids",
- state: "solid",
- density: 9710,
- hardness: 0.9,
- conduct: 0.2,
- hidden: true,
-};
-
-elements.molten_fermium = {
- behavior: ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_fermium" },
- neutron: { func: fermium, temp1: 150 },
- },
- excludeRandom: true,
-};
-
-function fermium(pixel, p) {
- if (pixel.temp >= 500) {
- changePixel(pixel, "n_explosion");
- elementCircle(p.x, p.y, 5, "neutron");
- }
- elementCircle(p.x, p.y, 3, "neutron", 0.2);
-}
-
-function transmuteAround(pixel) {
- elementCircle(pixel.x, pixel.y, 40, "radium", 0.1, ["thorium", "molten_thorium"]);
- elementCircle(pixel.x, pixel.y, 40, "plutonium", 0.1, ["depleted_uranium", "molten_depleted_uranium"]);
- elementCircle(pixel.x, pixel.y, 40, "neptunium", 0.1, ["enriched_uranium", "molten_enriched_uranium"]);
- elementCircle(pixel.x, pixel.y, 40, "americium", 0.1, ["plutonium", "molten_plutonium"]);
- elementCircle(pixel.x, pixel.y, 40, "curium", 0.1, ["americium", "molten_americium"]);
- elementCircle(pixel.x, pixel.y, 40, "berkelium", 0.1, ["curium", "molten_curium"]);
- elementCircle(pixel.x, pixel.y, 40, "californium", 0.1, ["berkelium", "molten_berkelium"]);
- elementCircle(pixel.x, pixel.y, 40, "einsteinium", 0.1, ["californium", "molten_californium"]);
- elementCircle(pixel.x, pixel.y, 40, "fermium", 0.1, ["einsteinium", "molten_einsteinium"]);
-}
-
-function elementCircle(x, y, radius, pixelType = "fire", chance = 0.1, replace = [null]) {
- if (!Array.isArray(replace)) {
- replace = [replace];
- }
- // if pixelType includes , split it into an array
- if (pixelType.indexOf(",") !== -1) {
- pixelType = pixelType.split(",");
- }
- var coords = circleCoords(x, y, radius);
- for (var i = 0; i < coords.length; i++) {
- if (isEmpty(coords[i].x, coords[i].y) && replace.includes(null)) {
- if (Math.random() <= chance) {
- // if pixelType is an array, choose a random item
- if (Array.isArray(pixelType)) {
- createPixel(pixelType[Math.floor(Math.random() * pixelType.length)], coords[i].x, coords[i].y);
- } else {
- createPixel(pixelType, coords[i].x, coords[i].y);
- }
- }
- }
- if (!isEmpty(coords[i].x, coords[i].y, true) && replace.includes(pixelMap[coords[i].x][coords[i].y].element)) {
- if (Math.random() <= chance) {
- // if pixelType is an array, choose a random item
- if (Array.isArray(pixelType)) {
- changePixel(pixelMap[coords[i].x][coords[i].y], pixelType[Math.floor(Math.random() * pixelType.length)]);
- } else {
- changePixel(pixelMap[coords[i].x][coords[i].y], pixelType);
- }
- }
- }
- }
-}
-
-elements.thorium_dioxide = {
- color: ["#313331", "#1a1a18", "#171717", "#24231d", "#262622", "#171613"],
- behavior: ["XX|CR:radiation%0.01|XX", "CR:radiation%0.01|XX|CR:radiation%0.01", "M2|M1|M2"],
- reactions: {},
- hidden: true,
- tempHigh: 2865,
- category: "powders",
- state: "solid",
- density: 10970,
-};
-
-elements.stable_thorium_dioxide = {
- color: [blendColors("#313331", "#ff0000"), blendColors("#1a1a18", "#00ff00"), blendColors("#171717", "#0000ff"), blendColors("#24231d", "#ff0000"), blendColors("#262622", "#00ff00"), blendColors("#171613", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {},
- hidden: true,
- tempHigh: 2865,
- category: "powders",
- state: "solid",
- density: 10970,
-};
-
-eListAddIon("THORIUMIV", "thorium_dioxide");
-eListAddIon("OXIDE", "thorium_dioxide");
-eListAdd("INSOLUBLE", "thorium_dioxide");
-eListAddIon("STABLETHORIUMIV", "stable_thorium_dioxide");
-eListAddIon("OXIDE", "stable_thorium_dioxide");
-eListAdd("INSOLUBLE", "stable_thorium_dioxide");
-
-acidReact("hydrofluoric_acid", "thorium_dioxide", "thorium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid", "stable_thorium_dioxide", "stable_thorium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "thorium_dioxide", "thorium_tetrafluoride", "fire");
-acidReact("hydrofluoric_acid_gas", "stable_thorium_dioxide", "stable_thorium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "thorium_dioxide", "thorium_tetrafluoride", "fire");
-acidReact("hydrogen_fluoride", "stable_thorium_dioxide", "stable_thorium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "thorium_dioxide", "thorium_tetrafluoride", "fire");
-acidReact("liquid_hydrogen_fluoride", "stable_thorium_dioxide", "stable_thorium_tetrafluoride", "fire");
-
-elements.thorium_tetrafluoride = {
- color: "#e5e6e5",
- behavior: ["XX|CR:radiation%0.01|XX", "CR:radiation%0.01|XX|CR:radiation%0.01", "M2|M1|M2"],
- reactions: {},
- hidden: true,
- tempHigh: 1110,
- category: "powders",
- state: "solid",
- density: 6300,
-};
-
-elements.stable_thorium_tetrafluoride = {
- color: [blendColors("#e5e6e5", "#ff0000"), blendColors("#e5e6e5", "#00ff00"), blendColors("#e5e6e5", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {},
- hidden: true,
- tempHigh: 1110,
- category: "powders",
- state: "solid",
- density: 6300,
-};
-
-eListAddIon("THORIUMIV", "thorium_tetrafluoride");
-eListAddIon("OXIDE", "thorium_tetrafluoride");
-eListAdd("INSOLUBLE", "thorium_tetrafluoride");
-eListAddIon("STABLETHORIUMIV", "stable_thorium_tetrafluoride");
-eListAddIon("OXIDE", "stable_thorium_tetrafluoride");
-eListAdd("INSOLUBLE", "stable_thorium_tetrafluoride");
-
-reduce("thorium_dioxide", "oxygen", "thorium");
-reduce("stable_thorium_dioxide", "oxygen", "stable_thorium");
-reduce("thorium_tetrafluoride", "fluorine", "thorium");
-reduce("stable_thorium_tetrafluoride", "fluorine", "stable_thorium");
-
-elements.stable_thorium = {
- color: [blendColors("#599e8a", "#ff0000"), blendColors("#364d4b", "#00ff00"), blendColors("#494d4c", "#0000ff"), blendColors("#428a58", "#ff0000"), blendColors("#658d7a", "#00ff00"), blendColors("#89e0a2", "#0000ff")],
- behavior: behaviors.WALL,
- reactions: {
- oxygen: { elem1: "stable_thorium_dioxide", elem2: null },
- },
- tempHigh: 1750,
- category: "solids",
- state: "solid",
- hidden: true,
- density: 11700,
- hardness: 0.7,
- conduct: 0.235,
-};
-elements.molten_stable_thorium = {
- reactions: {
- oxygen: { elem1: "stable_thorium_dioxide", elem2: null },
- },
-};
-
-elements.stable_radium = {
- color: [blendColors("#3bdeff", "#ff0000"), blendColors("#3bdeff", "#00ff00"), blendColors("#3bdeff", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- oxygen: { elem1: "radium_oxide" },
- },
- tempHigh: 700,
- category: "powders",
- state: "solid",
- density: 5500,
- hidden: true,
- conduct: 0.4,
-};
-
-elements.radium_oxide = {
- color: [blendColors("#b2d9d9", "#ff0000", 0.25), blendColors("#b2d9d9", "#00ff00", 0.25), blendColors("#b2d9d9", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- reactions: {},
- hidden: true,
- tempHigh: 2327,
- category: "powders",
- state: "solid",
- density: 12000,
-};
-
-eListAddIon("RADIUM", "radium_oxide");
-eListAddIon("OXIDE", "radium_oxide");
-eListAdd("INSOLUBLE", "radium_oxide");
-
-elements.radium_hydroxide = {
- color: [blendColors("#f2fafa", "#ff0000", 0.25), blendColors("#f2fafa", "#00ff00", 0.25), blendColors("#f2fafa", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 600,
- reactions: {},
- stateHigh: "radium_oxide",
- category: "powders",
- state: "solid",
- density: 12000,
-};
-
-eListAdd("BASE", "radium_hydroxide");
-eListAddIon("RADIUM", "radium_hydroxide", "base");
-eListAddIon("HYDROXIDE", "radium_hydroxide", "base");
-eListAdd("INSOLUBLE", "radium_hydroxide");
-
-createSalt("radium_chloride", "radium_chloride_solution", [blendColors("#faf3de", "#ff0000", 0.25), blendColors("#faf3de", "#00ff00", 0.25), blendColors("#faf3de", "#0000ff", 0.25)], [blendColors("#8eadef", "#ff0000", 0.25), blendColors("#8eadef", "#00ff00", 0.25), blendColors("#8eadef", "#0000ff", 0.25)], true, true, 900, -2, 102, 4900, 1050, "RADIUM", "CHLORIDE");
-
-elements.radium_chloride_solution.reactions["mercury"] = { elem1: ["stable_radium", "chlorine", "hydrogen"], charged: true, chance: 0.02 };
-
-elements.molten_stable_radium = {
- reactions: {
- oxygen: { elem1: "radium_oxide" },
- },
- conduct: 0.4,
-};
-
-runAfterLoad(function () {
- reactList("radium_oxide", eLists.WATER, { elem1: "radium_hydroxide", elem2: null, chance: 0.01 });
- reactList("stable_radium", eLists.WATER, { elem1: ["radium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350 });
- reactList("molten_stable_radium", eLists.WATER, { elem1: ["radium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350 });
-});
-
-elements.stable_actinium = {
- color: [blendColors("#e5e6e5", "#ff0000", 0.25), blendColors("#62ebf0", "#00ff00"), blendColors("#62ebf0", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- oxygen: { elem1: "actinium_oxide" },
- },
- hidden: true,
- tempHigh: 1227,
- category: "powders",
- state: "solid",
- density: 10000,
- conduct: 0.225,
-};
-elements.molten_stable_actinium = {
- reactions: {
- oxygen: { elem1: "actinium_oxide" },
- },
- conduct: 0.225,
-};
-
-runAfterLoad(function () {
- reactList("stable_actinium", eLists.WATER, { elem1: "actinium_hydroxide", elem2: "hydrogen", chance: 0.01 });
- reactList("molten_stable_actinium", eLists.WATER, { elem1: "actinium_hydroxide", elem2: "hydrogen", chance: 0.01 });
-});
-
-elements.actinium_oxide = {
- color: [blendColors("#ebf5f5", "#ff0000", 0.25), blendColors("#ebf5f5", "#00ff00", 0.25), blendColors("#ebf5f5", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- reactions: {
- water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
- salt_water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
- sugar_water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
- dirty_water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
- steam: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
- seltzer: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
- pool_water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
- primordial_soup: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
- },
- hidden: true,
- tempHigh: 2327,
- category: "powders",
- state: "solid",
- density: 12000,
-};
-
-runAfterLoad(function () {
- reactList("actinium_oxide", eLists.WATER, { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 });
-});
-
-elements.actinium_hydroxide = {
- color: [blendColors("#f2cef2", "#ff0000", 0.25), blendColors("#f2cef2", "#00ff00", 0.25), blendColors("#f2cef2", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 350,
- stateHigh: ["actinium_oxide", "steam"],
- category: "powders",
- state: "solid",
- density: 12000,
-};
-
-eListAdd("BASE", "actinium_hydroxide");
-eListAddIon("ACTINIUM", "actinium_hydroxide", "base");
-eListAddIon("HYDROXIDE", "actinium_hydroxide", "base");
-eListAdd("INSOLUBLE", "actinium_hydroxide");
-
-reduce("actinium_oxide", "oxygen", "stable_actinium");
-
-elements.stable_protactinium = {
- color: [blendColors("#9899a3", "#ff0000"), blendColors("#44464a", "#00ff00"), blendColors("#5a5b5e", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- oxygen: { elem1: "protactinium_v_oxide", chance: 0.01 },
- steam: { elem1: "protactinium_hydroxide", elem2: "hydrogen", chance: 0.01 },
- },
-
- tempHigh: 1568,
- category: "powders",
- state: "solid",
- density: 15700,
- hardness: 0.1,
- conduct: 0.235,
- hidden: true,
-};
-
-elements.molten_stable_protactinium = {
- reactions: {
- oxygen: { elem1: "protactinium_v_oxide", chance: 0.01 },
- steam: { elem1: "protactinium_hydroxide", elem2: "hydrogen", chance: 0.01 },
- },
-};
-
-eListAdd("BASE", "protactinium_hydroxide");
-eListAddIon("PROTACTINIUMV", "protactinium_hydroxide", "base");
-eListAddIon("HYDROXIDE", "protactinium_hydroxide", "base");
-eListAdd("INSOLUBLE", "protactinium_hydroxide");
-
-elements.protactinium_hydroxide = {
- color: [blendColors("#95c7c7", "#ff0000", 0.25), blendColors("#95c7c7", "#00ff00", 0.25), blendColors("#95c7c7", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 350,
- category: "powders",
- state: "solid",
- stateHigh: ["protactinium_v_oxide", "steam"],
- density: 12000,
-};
-
-elements.protactinium_v_oxide = {
- color: [blendColors("#353b3b", "#ff0000", 0.25), blendColors("#353b3b", "#00ff00", 0.25), blendColors("#353b3b", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 2500,
- category: "powders",
- state: "solid",
- density: 12000,
- reactions: {},
-};
-
-eListAddIon("PROTACTINIUMV", "protactinium_v_oxide");
-eListAddIon("OXIDE", "protactinium_v_oxide");
-eListAdd("INSOLUBLE", "protactinium_v_oxide");
-
-acidReact("hydrofluoric_acid", "protactinium_v_oxide", "protactinium_pentafluoride", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "protactinium_v_oxide", "protactinium_pentafluoride", "fire", 0);
-acidReact("hydrogen_fluoride", "protactinium_v_oxide", "protactinium_pentafluoride", "fire", 0);
-acidReact("liquid_hydrogen_fluoride", "protactinium_v_oxide", "protactinium_pentafluoride", "fire", 0);
-
-elements.protactinium_pentafluoride = {
- color: [blendColors("#cbf2ec", "#ff0000", 0.25), blendColors("#cbf2ec", "#00ff00", 0.25), blendColors("#cbf2ec", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 2500,
- category: "powders",
- state: "solid",
- density: 12000,
- reactions: {},
-};
-
-eListAddIon("PROTACTINIUMV", "protactinium_pentafluoride");
-eListAddIon("OXIDE", "protactinium_pentafluoride");
-eListAdd("INSOLUBLE", "protactinium_pentafluoride");
-
-reduce("protactinium_v_oxide", "oxygen", "stable_protactinium");
-reduce("protactinium_pentafluoride", "fluorine", "stable_protactinium");
-
-elements.stable_neptunium = {
- color: [blendColors("#626580", "#ff0000"), blendColors("#3f4a61", "#00ff00"), blendColors("#4a5463", "#0000ff")],
- behavior: behaviors.WALL,
- reactions: {
- oxygen: { elem1: "neptunium_dioxide", chance: 0.01 },
- },
- tempHigh: 639,
- category: "solids",
- state: "solid",
- density: 19380,
- hardness: 0.7,
- conduct: 0.2,
- hidden: true,
-};
-
-elements.molten_stable_neptunium = {
- reactions: {
- oxygen: { elem1: "neptunium_dioxide", chance: 0.01 },
- },
-};
-
-elements.neptunium_dioxide = {
- color: [blendColors("#47c94f", "#ff0000"), blendColors("#47c94f", "#00ff00"), blendColors("#47c94f", "#0000ff")],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 2600,
- category: "powders",
- state: "solid",
- density: 12000,
- reactions: {},
-};
-
-eListAddIon("NEPTUNIUMIV", "neptunium_dioxide");
-eListAddIon("OXIDE", "neptunium_dioxide");
-eListAdd("INSOLUBLE", "neptunium_dioxide");
-
-elements.neptunium_tetrafluoride = {
- color: [blendColors("#73e67a", "#ff0000"), blendColors("#73e67a", "#00ff00"), blendColors("#73e67a", "#0000ff")],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 2550,
- category: "powders",
- state: "solid",
- density: 12000,
- reactions: {},
-};
-
-eListAddIon("NEPTUNIUMIV", "neptunium_tetrafluoride");
-eListAddIon("FLUORIDE", "neptunium_tetrafluoride");
-eListAdd("INSOLUBLE", "neptunium_tetrafluoride");
-
-acidReact("hydrofluoric_acid", "neptunium_dioxide", "neptunium_tetrafluoride", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "neptunium_dioxide", "neptunium_tetrafluoride", "fire", 0);
-acidReact("hydrogen_fluoride", "neptunium_dioxide", "neptunium_tetrafluoride", "fire", 0);
-acidReact("liquid_hydrogen_fluoride", "neptunium_dioxide", "neptunium_tetrafluoride", "fire", 0);
-
-acidReact("fluorine", "neptunium_tetrafluoride", "neptunium_hexafluoride", "fire", 0);
-acidReact("liquid_fluorine", "neptunium_tetrafluoride", "neptunium_hexafluoride", "fire", 0);
-acidReact("fluorine", "neptunium_dioxide", "neptunium_hexafluoride", "fire", 0);
-acidReact("liquid_fluorine", "neptunium_dioxide", "neptunium_hexafluoride", "fire", 0);
-
-eListAddIon("NEPTUNIUMVI", "neptunium_hexafluoride");
-eListAddIon("FLUORIDE", "neptunium_hexafluoride");
-eListAdd("INSOLUBLE", "neptunium_hexafluoride");
-
-reduce("neptunium_dioxide", "oxygen", "stable_neptunium");
-reduce("neptunium_tetrafluoride", "fluorine", "stable_neptunium");
-
-elements.neptunium_hexafluoride = {
- color: [blendColors("#eda042", "#ff0000"), blendColors("#eda042", "#00ff00"), blendColors("#eda042", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- hydrogen: { elem1: "neptunium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
- tempHigh: 55,
- category: "powders",
- state: "solid",
- density: 5000,
- stateHighName: "neptunium_hexafluoride_gas",
- forceAutoGen: true,
- hidden: true,
-};
-
-elements.neptunium_hexafluoride_gas = {
- behavior: behaviors.GAS,
- state: "gas",
- density: 14.591,
- reactions: {
- hydrogen: { elem1: "neptunium_tetrafluoride", elem2: "hydrogen_fluoride" },
- },
-};
-
-runAfterLoad(function () {
- reactList("neptunium_hexafluoride", eLists.WATER, { elem1: "neptunium_tetrafluoride", elem2: "hydrofluoric_acid" });
- reactList("neptunium_hexafluoride_gas", eLists.WATER, { elem1: "neptunium_tetrafluoride", elem2: "hydrofluoric_acid" });
-});
-
-toxic("neptunium_tetrafluoride", 0.1);
-
-toxic("neptunium_hexafluoride", 0.1);
-toxic("neptunium_hexafluoride_gas", 0.1);
-
-elements.fallout.reactions = { quark_matter: { elem1: null } };
elements.transactinide_fallout = {
color: ["#5ab891", "#00ff5e", "#a7ff4a", "#a2f752"],
behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:fallout%1 AND CH:radium%0.1 AND CH:francium%0.1 AND CH:fermium%0.01 AND CH:einsteinium%0.01 AND CH:californium%0.01 AND CH:berkelium%0.01 AND CH:curium%0.01 AND CH:americium%0.01 AND CH:plutonium%0.01 AND CH:neptunium%0.01 AND CH:uranium%0.01 AND CH:protactinium%0.01 AND CH:thorium%0.01 AND CH:actinium%0.01|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M2|M1|M2"],
- reactions: {
- quark_matter: { elem1: null },
- },
category: "energy",
hidden: true,
state: "solid",
@@ -5731,1595 +6522,6 @@ elements.transactinide_fallout = {
excludeRandom: true,
};
-elements.copernicium = {
- color: ["#a7fcbc", "#8cc299", "#9db9c2"],
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_copernicium" },
- neutron: { elem1: "nihonium", elem2: null, chance: 0.1 },
- },
- tempHigh: 67,
- tempLow: 10,
- category: "liquids",
- state: "liquid",
- density: 14010,
- hardness: 1.0,
- conduct: 0.2,
- stateLowName: "solid_copernicium",
- tick: function (pixel) {
- pixel.temp += 50;
- },
- excludeRandom: true,
-};
-
-elements.solid_copernicium = {
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_copernicium" },
- neutron: { elem1: "nihonium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 50;
- },
- excludeRandom: true,
-};
-
-elements.copernicium_gas = {
- behavior: ["M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2", "M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2"],
- reactions: {
- quark_matter: { elem1: "stable_copernicium" },
- neutron: { elem1: "nihonium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 50;
- },
- excludeRandom: true,
- density: 11.848,
-};
-
-elements.stable_copernicium = {
- color: [blendColors("#a7fcbc", "#ff0000"), blendColors("#8cc299", "#00ff00"), blendColors("#9db9c2", "#0000ff")],
- behavior: behaviors.LIQUID,
- tempHigh: 67,
- tempLow: 10,
- category: "liquids",
- state: "liquid",
- density: 14010,
- conduct: 0.2,
- stateLowName: "solid_stable_copernicium",
- hidden: true,
- reactions: {},
-};
-elements.stable_copernicium_gas = {
- density: 11.848,
- reactions: {
- oxygen: { elem1: "copernicium_dioxide", elem2: null, chance: 0.01 },
- molten_sulfur: { elem1: "copernicium_sulfide", elem2: null, tempMax: 421 },
- sulfur_gas: { elem1: "copernicium_sulfide", elem2: null, tempMax: 421 },
- },
-};
-
-elements.copernicium_dioxide = {
- color: [blendColors("#e6c973", "#ff0000", 0.25), blendColors("#e6c973", "#00ff00", 0.25), blendColors("#e6c973", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 300, //made up
- category: "powders",
- state: "solid",
- density: 13120, //made up
- stateHigh: ["stable_copernicium_gas", "stable_copernicium_gas", "fire"],
- reactions: {},
-};
-
-eListAddIon("COPERNICIUMIV", "copernicium_dioxide");
-eListAddIon("OXIDE", "copernicium_dioxide");
-eListAdd("INSOLUBLE", "copernicium_dioxide");
-
-elements.copernicium_sulfide = {
- color: [blendColors("#9c5f4f", "#ff0000", 0.25), blendColors("#9c5f4f", "#00ff00", 0.25), blendColors("#9c5f4f", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 421, //made up
- category: "powders",
- state: "solid",
- density: 13200, //made up
- stateHigh: ["stable_copernicium_gas", "molten_sulfur"],
- reactions: {},
-};
-
-toxic("stable_copernicium", 0.02);
-toxic("stable_copernicium_gas", 0.02);
-toxic("copernicium_dioxide", 0.02);
-toxic("copernicium_sulfide", 0.02);
-
-eListAddIon("COPERNICIUMII", "copernicium_sulfide");
-eListAddIon("SULFIDE", "copernicium_sulfide");
-eListAdd("INSOLUBLE", "copernicium_sulfide");
-
-elements.copernicium_tetrafluoride = {
- color: [blendColors("#eff2e4", "#ff0000", 0.25), blendColors("#eff2e4", "#00ff00", 0.25), blendColors("#eff2e4", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 502, //made up
- category: "powders",
- state: "solid",
- density: 12110, //made up
- stateHigh: ["stable_copernicium_gas", "fluorine"],
- reactions: {},
-};
-toxic("copernicium_tetrafluoride", 0.2);
-
-eListAddIon("COPERNICIUMIV", "copernicium_tetrafluoride");
-eListAddIon("FLUORIDE", "copernicium_tetrafluoride");
-eListAdd("INSOLUBLE", "copernicium_tetrafluoride");
-
-runAfterLoad(function () {
- reactList("copernicium_tetrafluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "stable_copernicium" });
-});
-
-acidIgnore(["copernicium", "copernicium_gas", "solid_copernicium", "stable_copernicium", "stable_copernicium_gas", "solid_stable_copernicium", "copernicium_tetrafluoride"]);
-elements.fluorine.ignore.push("copernicium", "copernicium_gas", "solid_copernicium", "stable_copernicium", "stable_copernicium_gas", "solid_stable_copernicium", "copernicium_tetrafluoride");
-elements.liquid_fluorine.ignore.push("copernicium", "copernicium_gas", "solid_copernicium", "stable_copernicium", "stable_copernicium_gas", "solid_stable_copernicium", "copernicium_tetrafluoride");
-
-acidReact("copernicium_dioxide", "fluorine", "copernicium_tetrafluoride", "fire");
-acidReact("copernicium_dioxide", "liquid_fluorine", "copernicium_tetrafluoride", "fire");
-
-elements.molten_uranium.reactions["molten_calcium"] = { elem1: "copernicium", elem2: null, tempMin: 10000, chance: 0.01 };
-elements.molten_depleted_uranium.reactions["molten_calcium"] = { elem1: "copernicium", elem2: null, tempMin: 10000, chance: 0.01 };
-elements.molten_enriched_uranium.reactions["molten_calcium"] = { elem1: "copernicium", elem2: null, tempMin: 10000, chance: 0.01 };
-
-elements.nihonium = {
- color: ["#c94a0a"], //spike viper reference
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|M1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_nihonium" },
- neutron: { elem1: "flerovium", elem2: null, chance: 0.1 },
- },
- tempHigh: 430,
- category: "powders",
- state: "solid",
- density: 16000,
- hardness: 1.0,
- conduct: 0.2,
- tick: function (pixel) {
- pixel.temp += 50;
- },
- excludeRandom: true,
-};
-
-elements.molten_nihonium = {
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_nihonium" },
- neutron: { elem1: "flerovium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 50;
- },
- excludeRandom: true,
-};
-
-elements.stable_nihonium = {
- color: [blendColors("#c94a0a", "#ff0000"), blendColors("#c94a0a", "#00ff00"), blendColors("#c94a0a", "#0000ff")],
- behavior: behaviors.STURDYPOWDER,
- reactions: {
- molten_stable_francium: { elem1: "francium_nihonide", elem2: null },
- },
- tempHigh: 430,
- category: "powders",
- state: "solid",
- density: 16000,
- conduct: 0.2,
- hidden: true,
-};
-
-toxic("stable_nihonium", 0.02);
-
-acidReact("stable_nihonium", "nitric_acid", "nihonium_nitrate_solution", "nitrogen_dioxide");
-acidReact("stable_nihonium", "nitric_acid_gas", "nihonium_nitrate_solution", "nitrogen_dioxide");
-elements.nitric_acid.ignore.push("nihonium_nitrate");
-elements.nitric_acid_gas.ignore.push("nihonium_nitrate");
-
-acidReact("stable_nihonium", "sulfuric_acid", "nihonium_sulfate_solution", "hydrogen", 50);
-acidReact("stable_nihonium", "sulfuric_acid_gas", "nihonium_sulfate_solution", "hydrogen", 50);
-elements.sulfuric_acid.ignore.push("nihonium_sulfate_solution");
-elements.sulfuric_acid_gas.ignore.push("nihonium_sulfate_solution");
-
-createSalt("nihonium_nitrate", "nihonium_nitrate_solution", [blendColors("#fccadd", "#ff0000", 0.25), blendColors("#fccadd", "#00ff00", 0.25), blendColors("#fccadd", "#0000ff", 0.25)], [blendColors("#8f19f7", "#ff0000", 0.25), blendColors("#8f19f7", "#00ff00", 0.25), blendColors("#8f19f7", "#0000ff", 0.25)], true, true, 203, -2, 102, 9350, 1090, "NIHONIUM", "NITRATE");
-createSalt("nihonium_sulfate", "nihonium_sulfate_solution", [blendColors("#fcf1ca", "#ff0000", 0.25), blendColors("#fcf1ca", "#00ff00", 0.25), blendColors("#fcf1ca", "#0000ff", 0.25)], [blendColors("#1984f7", "#ff0000", 0.25), blendColors("#1984f7", "#00ff00", 0.25), blendColors("#1984f7", "#0000ff", 0.25)], true, true, 1305, -2, 102, 12050, 1092, "NIHONIUM", "SULFATE");
-toxic("nihonium_nitrate", 0.1);
-toxic("nihonium_nitrate_solution", 0.1);
-toxic("nihonium_sulfate", 0.02);
-toxic("nihonium_sulfate_solution", 0.02);
-
-elements.nihonium_nitrate.stateHigh = ["nihonium_oxide", "nitrogen_dioxide", "fire"];
-
-elements.nihonium_hydroxide = {
- color: [blendColors("#ebc7c7", "#ff0000", 0.25), blendColors("#ebc7c7", "#00ff00", 0.25), blendColors("#ebc7c7", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 292, //made up
- category: "powders",
- state: "solid",
- density: 10220, //made up
- stateHigh: ["nihonium_oxide", "steam"],
- reactions: {},
-};
-
-eListAdd("INSOLUBLE", "nihonium_hydroxide");
-eListAddIon("NIHONIUM", "nihonium_hydroxide");
-eListAddIon("HYDROXIDE", "nihonium_hydroxide");
-
-elements.nihonium_oxide = {
- color: [blendColors("#ab9a95", "#ff0000", 0.25), blendColors("#ab9a95", "#00ff00", 0.25), blendColors("#ab9a95", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 567, //made up
- category: "powders",
- state: "solid",
- density: 12370, //made up
- reactions: {
- steam: { elem1: "nihonium_hydroxide", elem2: null, tempMax: 292 },
- },
-};
-
-eListAdd("INSOLUBLE", "nihonium_oxide");
-eListAddIon("NIHONIUM", "nihonium_oxide");
-eListAddIon("OXIDE", "nihonium_oxide");
-
-toxic("nihonium_hydroxide", 0.02);
-toxic("nihonium_oxide", 0.02);
-
-elements.francium_nihonide = {
- color: [blendColors("#d6d3a9", "#ff0000"), blendColors("#d6d3a9", "#00ff00"), blendColors("#d6d3a9", "#0000ff")],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 10920, //made up
- category: "powders",
- state: "solid",
- density: 13700, //made up
- reactions: {},
-};
-
-runAfterLoad(function () {
- reactList("francium_nihonide", eLists.WATER, { elem1: ["nihonium_hydroxide", "francium_hydroxide"], elem2: "hydrogen", temp1: 100, temp2: 100 });
-});
-
-eListAdd("INSOLUBLE", "francium_nihonide");
-eListAddIon("FRANCIUM", "francium_nihonide");
-eListAddIon("NIHONIDE", "francium_nihonide");
-
-toxic("francium_nihonide", 0.1);
-
-elements.molten_neptunium.reactions["molten_calcium"] = { elem1: "nihonium", elem2: null, tempMin: 10000, chance: 0.01 };
-
-elements.flerovium = {
- color: ["#a8ffe2", "#7ddbcd", "#9dc2b1"],
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_flerovium" },
- neutron: { elem1: "moscovium", elem2: null, chance: 0.1 },
- },
- tempHigh: 107,
- tempLow: -73,
- category: "liquids",
- state: "liquid",
- density: 11400,
- hardness: 1.0,
- conduct: 0.2,
- stateLowName: "solid_flerovium",
- tick: function (pixel) {
- pixel.temp += 50;
- },
- excludeRandom: true,
-};
-
-elements.solid_flerovium = {
- behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_flerovium" },
- neutron: { elem1: "moscovium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 50;
- },
- excludeRandom: true,
-};
-
-elements.flerovium_gas = {
- behavior: ["M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2", "M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2"],
- reactions: {
- quark_matter: { elem1: "stable_flerovium" },
- neutron: { elem1: "moscovium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 50;
- },
- excludeRandom: true,
- density: 12.014,
-};
-
-elements.stable_flerovium = {
- color: [blendColors("#a8ffe2", "#ff0000"), blendColors("#7ddbcd", "#00ff00"), blendColors("#9dc2b1", "#0000ff")],
- behavior: behaviors.LIQUID,
- reactions: {
- molten_sulfur: { elem1: "flerovium_sulfide", elem2: null },
- },
- tempHigh: 107,
- tempLow: -73,
- category: "liquids",
- state: "liquid",
- density: 14010,
- conduct: 0.2,
- stateLowName: "solid_stable_flerovium",
- hidden: true,
-};
-
-elements.stable_flerovium_gas = {
- density: 12.014,
- reactions: {
- molten_sulfur: { elem1: "flerovium_sulfide", elem2: null },
- },
-};
-
-elements.flerovium_sulfide = {
- color: [blendColors("#121107", "#ff0000", 0.25), blendColors("#121107", "#00ff00", 0.25), blendColors("#121107", "#0000ff", 0.25), blendColors("#d9d8d4", "#ff0000", 0.25), blendColors("#d9d8d4", "#00ff00", 0.25), blendColors("#d9d8d4", "#0000ff", 0.25)],
- behavior: behaviors.WALL,
- hidden: true,
- tempHigh: 1220, //made up
- category: "solids",
- state: "solid",
- density: 14700, //made up
- burnInto: ["flerovium_oxide", "sulfur_dioxide"],
- burn: 1,
-};
-eListAdd("INSOLUBLE", "flerovium_sulfide");
-eListAddIon("FLEROVIUM", "flerovium_sulfide");
-eListAddIon("SULFIDE", "flerovium_sulfide");
-
-elements.flerovium_oxide = {
- color: [blendColors("#eddb93", "#ff0000", 0.25), blendColors("#eddb93", "#00ff00", 0.25), blendColors("#eddb93", "#0000ff", 0.25)],
- behavior: behaviors.STURDYPOWDER,
- hidden: true,
- reactions: {},
- tempHigh: 1120, //made up
- category: "powders",
- state: "solid",
- density: 14320, //made up
-};
-elements.molten_flerovium_oxide = {
- reactions: {
- charcoal: { elem1: "stable_flerovium", elem2: "carbon_dioxide" },
- },
-};
-
-reduce("flerovium_oxide", "oxygen", "stable_flerovium");
-
-eListAdd("INSOLUBLE", "flerovium_sulfide");
-eListAddIon("FLEROVIUM", "flerovium_sulfide");
-eListAddIon("SULFIDE", "flerovium_sulfide");
-elements.molten_plutonium.reactions["molten_calcium"] = { elem1: "flerovium", elem2: null, tempMin: 10000, chance: 0.01 };
-elements.molten_depleted_plutonium.reactions["molten_calcium"] = { elem1: "flerovium", elem2: null, tempMin: 10000, chance: 0.01 };
-elements.molten_enriched_plutonium.reactions["molten_calcium"] = { elem1: "flerovium", elem2: null, tempMin: 10000, chance: 0.01 };
-
-elements.moscovium = {
- color: ["#8a3683", "#b0339b", "#d14fcd"],
- behavior: ["XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX", "CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|CH:nihonium%1|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2", "XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX"],
- reactions: {
- quark_matter: { elem1: "stable_moscovium" },
- neutron: { elem1: "livermorium", elem2: null, chance: 0.1 },
- },
- tempHigh: 400,
- category: "solids",
- state: "solid",
- density: 13500,
- hardness: 1.0,
- conduct: 0.2,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- excludeRandom: true,
-};
-
-elements.molten_moscovium = {
- behavior: ["XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX", "M2 AND CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|CH:nihonium%1|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_moscovium" },
- neutron: { elem1: "livermorium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- excludeRandom: true,
-};
-
-elements.stable_moscovium = {
- color: [blendColors("#8a3683", "#ff0000"), blendColors("#b0339b", "#00ff00"), blendColors("#d14fcd", "#0000ff")],
- behavior: behaviors.WALL,
- reactions: {},
- tempHigh: 400,
- category: "solids",
- state: "solid",
- density: 13500,
- conduct: 0.2,
- hidden: true,
-};
-
-runAfterLoad(function () {
- reactList("stable_moscovium", eLists.WATER, { elem1: "moscovium_hydroxide_solution", elem2: "hydrogen", chance: 0.05, temp1: 100, temp2: 100 });
-});
-
-createSalt("moscovium_hydroxide", "moscovium_hydroxide_solution", [blendColors("#f5dff3", "#ff0000", 0.25), blendColors("#f5dff3", "#00ff00", 0.25), blendColors("#f5dff3", "#0000ff", 0.25)], [blendColors("#6548f7", "#ff0000", 0.25), blendColors("#6548f7", "#00ff00", 0.25), blendColors("#6548f7", "#0000ff", 0.25)], true, true, 670, -2, 102, 5620, 1092, "MOSCOVIUM", "HYDROXIDE");
-
-eListAdd("BASE", "moscovium_hydroxide");
-eListAddIon("MOSCOVIUM", "moscovium_hydroxide", "base");
-eListAddIon("HYDROXIDE", "moscovium_hydroxide", "base");
-eListAdd("BASE", "moscovium_hydroxide_solution");
-eListAddIon("MOSCOVIUM", "moscovium_hydroxide_solution", "base");
-eListAddIon("HYDROXIDE", "moscovium_hydroxide_solution", "base");
-
-elements.moscovium_fluoride = {
- color: [blendColors("#eedff5", "#ff0000", 0.25), blendColors("#eedff5", "#00ff00", 0.25), blendColors("#eedff5", "#0000ff", 0.25)],
- behavior: behaviors.STURDYPOWDER,
- hidden: true,
- tempHigh: 720, //made up
- category: "powders",
- state: "solid",
- density: 6220, //made up
- reactions: {},
-};
-toxic("moscovium_fluoride", 0.1);
-
-acidReact("stable_moscovium", "hydrofluoric_acid", "moscovium_fluoride", "fire");
-acidReact("stable_moscovium", "liquid_hydrogen_fluoride", "moscovium_fluoride", "fire");
-acidReact("stable_moscovium", "hydrofluoric_acid_gas", "moscovium_fluoride", "fire");
-acidReact("stable_moscovium", "hydrogen_fluoride", "moscovium_fluoride", "fire");
-acidReact("moscovium_hydroxide", "hydrofluoric_acid", "moscovium_fluoride", "fire");
-acidReact("moscovium_hydroxide", "liquid_hydrogen_fluoride", "moscovium_fluoride", "fire");
-acidReact("moscovium_hydroxide", "hydrofluoric_acid_gas", "moscovium_fluoride", "fire");
-acidReact("moscovium_hydroxide", "hydrogen_fluoride", "moscovium_fluoride", "fire");
-acidReact("moscovium_hydroxide_solution", "hydrofluoric_acid", "moscovium_fluoride", "fire");
-acidReact("moscovium_hydroxide_solution", "liquid_hydrogen_fluoride", "moscovium_fluoride", "fire");
-acidReact("moscovium_hydroxide_solution", "hydrofluoric_acid_gas", "moscovium_fluoride", "fire");
-acidReact("moscovium_hydroxide_solution", "hydrogen_fluoride", "moscovium_fluoride", "fire");
-
-reduce("moscovium_fluoride", "fluorine", "stable_moscovium");
-
-eListAdd("INSOLUBLE", "moscovium_fluoride");
-eListAddIon("MOSCOVIUM", "moscovium_fluoride");
-eListAddIon("FLUORIDE", "moscovium_fluoride");
-
-elements.molten_americium.reactions["molten_calcium"] = { elem1: "moscovium", elem2: null, tempMin: 10000, chance: 0.01 };
-
-elements.livermorium = {
- color: ["#c9c26b", "#5ee04c", "#8bc253"],
- behavior: ["XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX", "CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|CH:flerovium%1|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1", "XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX"],
- reactions: {
- quark_matter: { elem1: "stable_livermorium" },
- neutron: { elem1: "tennessine", elem2: null, chance: 0.1 },
- },
- tempHigh: 455,
- category: "solids",
- state: "solid",
- density: 12900,
- hardness: 1.0,
- conduct: 0.2,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- excludeRandom: true,
-};
-
-elements.molten_livermorium = {
- behavior: ["XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX", "M2 AND CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|CH:flerovium%1|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_livermorium" },
- neutron: { elem1: "tennessine", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- excludeRandom: true,
-};
-
-elements.stable_livermorium = {
- color: [blendColors("#c9c26b", "#ff0000"), blendColors("#5ee04c", "#00ff00"), blendColors("#8bc253", "#0000ff")],
- behavior: behaviors.WALL,
- reactions: {
- oxygen: { elem1: "livermorium_oxide", elem2: "fire", chance: 0.05 },
- },
- tempHigh: 455,
- category: "solids",
- state: "solid",
- density: 12900,
- conduct: 0.2,
- hidden: true,
- burn: 1,
- burnInto: "livermorium_oxide",
-};
-
-elements.livermorium_oxide = {
- color: [blendColors("#ebcb8f", "#ff0000", 0.25), blendColors("#ebcb8f", "#00ff00", 0.25), blendColors("#ebcb8f", "#0000ff", 0.25)],
- behavior: behaviors.STURDYPOWDER,
- reactions: {},
- hidden: true,
- tempHigh: 730, //made up
- category: "powders",
- state: "solid",
- density: 12430, //made up
-};
-elements.molten_livermorium_oxide = {
- reactions: {
- charcoal: { elem1: "stable_livermorium", elem2: "carbon_dioxide" },
- },
-};
-
-reduce("livermorium_oxide", "oxygen", "stable_livermorium");
-
-elements.molten_curium.reactions["molten_calcium"] = { elem1: "livermorium", elem2: null, tempMin: 10000, chance: 0.01 };
-
-elements.tennessine = {
- color: ["#4f4c42"],
- behavior: ["XX|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|XX", "CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|CH:moscovium%1|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2", "M2|M1|M2"],
- reactions: {
- quark_matter: { elem1: "stable_tennessine" },
- neutron: { elem1: "oganesson", elem2: null, chance: 0.1 },
- },
- tempHigh: 425,
- category: "powders",
- state: "solid",
- density: 7200,
- hardness: 1.0,
- conduct: 0.1,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- excludeRandom: true,
-};
-
-elements.molten_tennessine = {
- behavior: ["XX|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|XX", "M2 AND CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|CH:moscovium%1|M2 AND CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_tennessine" },
- neutron: { elem1: "oganesson", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- excludeRandom: true,
-};
-
-elements.stable_tennessine = {
- color: [blendColors("#4f4c42", "#ff0000"), blendColors("#4f4c42", "#00ff00"), blendColors("#4f4c42", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 425,
- category: "powders",
- state: "solid",
- density: 7200,
- conduct: 0.1,
- hidden: true,
-};
-
-acidReact("stable_tennessine", "hydrofluoric_acid", "tennessine_monofluoride", "fire");
-acidReact("stable_tennessine", "liquid_hydrogen_fluoride", "tennessine_monofluoride", "fire");
-acidReact("stable_tennessine", "hydrofluoric_acid_gas", "tennessine_monofluoride", "fire");
-acidReact("stable_tennessine", "hydrogen_fluoride", "tennessine_monofluoride", "fire");
-
-elements.tennessine_monofluoride = {
- color: [blendColors("#4a4123", "#ff0000", 0.25), blendColors("#4a4123", "#00ff00", 0.25), blendColors("#4a4123", "#0000ff", 0.25)],
- behavior: behaviors.LIQUID,
- reactions: {},
- tempHigh: 130, //made up
- tempLow: 5,
- category: "liquids",
- state: "liquid",
- density: 5200, //made up
- hidden: true,
- stain: 0.2,
-};
-
-elements.tennessine_monofluoride_gas = {
- density: 13.012,
- reactions: {},
-};
-
-acidReact("fluorine", "tennessine_monofluoride_ice", "tennessine_trifluoride", "fire");
-acidReact("liquid_fluorine", "tennessine_monofluoride_ice", "tennessine_trifluoride", "fire");
-acidReact("fluorine", "tennessine_monofluoride", "tennessine_trifluoride", "fire");
-acidReact("liquid_fluorine", "tennessine_monofluoride", "tennessine_trifluoride", "fire");
-acidReact("fluorine", "tennessine_monofluoride_gas", "tennessine_trifluoride", "fire");
-acidReact("liquid_fluorine", "tennessine_monofluoride_gas", "tennessine_trifluoride", "fire");
-
-elements.fluorine.ignore.push("tennessine_trifluoride_gas");
-elements.fluorine.ignore.push("tennessine_trifluoride_ice");
-elements.liquid_fluorine.ignore.push("tennessine_trifluoride_gas");
-elements.liquid_fluorine.ignore.push("tennessine_trifluoride_ice");
-
-elements.tennessine_trifluoride = {
- color: [blendColors("#ffc400", "#ff0000", 0.25), blendColors("#ffc400", "#00ff00", 0.25), blendColors("#ffc400", "#0000ff", 0.25)],
- behavior: behaviors.LIQUID,
- reactions: {},
- tempHigh: 105, //made up
- tempLow: 3,
- category: "liquids",
- state: "liquid",
- density: 5600, //made up
- hidden: true,
- stain: 0.3,
-};
-
-elements.tennessine_trifluoride_gas = {
- density: 14.591,
- reactions: {},
-};
-
-runAfterAutogen(function () {
- reactList("tennessine_trifluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "tennessine_monofluoride" });
-});
-
-toxic("tennessine_monofluoride", 0.1);
-toxic("tennessine_monofluoride_gas", 0.1);
-toxic("tennessine_trifluoride", 0.1);
-toxic("tennessine_trifluoride_gas", 0.1);
-
-elements.molten_berkelium.reactions["molten_calcium"] = { elem1: "tennessine", elem2: null, tempMin: 10000, chance: 0.01 };
-
-elements.oganesson = {
- color: ["#c4ccc6", "#9ea39f", "#8e9294"],
- behavior: ["XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX", "CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX"],
-
- reactions: {
- quark_matter: { elem1: "stable_oganesson" },
- neutron: { elem1: "ununennium", elem2: null, chance: 0.1 },
- },
- tempHigh: 52,
- category: "solids",
- state: "solid",
- density: 7200,
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- excludeRandom: true,
-};
-
-elements.molten_oganesson = {
- behavior: ["XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX", "M2 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|M2 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_oganesson" },
- neutron: { elem1: "ununennium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- tempHigh: 177,
- excludeRandom: true,
-};
-
-elements.oganesson_gas = {
- behavior: ["M2|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|M2", "M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "M2|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|M2"],
- reactions: {
- quark_matter: { elem1: "stable_oganesson" },
- neutron: { elem1: "ununennium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 100;
- },
- excludeRandom: true,
- density: 12.222,
- colorOn: ["#e224ff", "#cc6c96", "#c76ccc"],
- conduct: 0.86,
-};
-
-elements.stable_oganesson = {
- color: [blendColors("#c4ccc6", "#ff0000"), blendColors("#9ea39f", "#00ff00"), blendColors("#8e9294", "#0000ff")],
- behavior: behaviors.SOLID,
- reactions: {
- tennessine_trifluoride: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
- tennessine_trifluoride_gas: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
- },
- tempHigh: 52,
- category: "solids",
- state: "solid",
- density: 7200,
- hidden: true,
-};
-elements.molten_stable_oganesson = {
- tempLow: 52,
- tempHigh: 177,
- reactions: {
- tennessine_trifluoride: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
- tennessine_trifluoride_gas: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
- },
-};
-elements.stable_oganesson_gas = {
- density: 12.222,
- reactions: {
- tennessine_trifluoride: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
- tennessine_trifluoride_gas: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
- },
- colorOn: ["#e224ff", "#cc6c96", "#c76ccc"],
- conduct: 0.86,
-};
-
-acidReact("stable_oganesson", "hydrofluoric_acid", "oganesson_difluoride", "fire");
-acidReact("stable_oganesson", "liquid_hydrogen_fluoride", "oganesson_difluoride", "fire");
-acidReact("stable_oganesson", "hydrofluoric_acid_gas", "oganesson_difluoride", "fire");
-acidReact("stable_oganesson", "hydrogen_fluoride", "oganesson_difluoride", "fire");
-
-elements.oganesson_difluoride = {
- color: [blendColors("#e3e2de", "#ff0000", 0.25), blendColors("#e3e2de", "#00ff00", 0.25), blendColors("#e3e2de", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 160, //made up
- category: "powders",
- state: "solid",
- density: 6100, //made up
- hidden: true,
-};
-
-acidReact("fluorine", "oganesson_difluoride", "oganesson_tetrafluoride", "fire");
-acidReact("liquid_fluorine", "oganesson_difluoride", "oganesson_tetrafluoride", "fire");
-acidReact("fluorine", "molten_oganesson_difluoride", "oganesson_tetrafluoride", "fire");
-acidReact("liquid_fluorine", "molten_oganesson_difluoride", "oganesson_tetrafluoride", "fire");
-
-elements.fluorine.ignore.push("molten_oganesson_tetrafluoride");
-elements.liquid_fluorine.ignore.push("molten_oganesson_tetrafluoride");
-
-elements.oganesson_tetrafluoride = {
- color: [blendColors("#d6d5d2", "#ff0000", 0.25), blendColors("#d6d5d2", "#00ff00", 0.25), blendColors("#d6d5d2", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 120, //made up
- category: "powders",
- state: "solid",
- density: 6300, //made up
- hidden: true,
-};
-
-runAfterAutogen(function () {
- reactList("oganesson_tetrafluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "oganesson_difluoride" });
-});
-
-elements.oganesson_tetratennesside = {
- color: [blendColors("#f7f7f5", "#ff0000"), blendColors("#f7f7f5", "#00ff00"), blendColors("#f7f7f5", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 180, //made up
- category: "powders",
- state: "solid",
- density: 13800, //made up
- stateHigh: ["molten_stable_oganesson", "stable_tennessine"],
- hidden: true,
-};
-
-toxic("oganesson_difluoride", 0.1);
-toxic("oganesson_tetrafluoride", 0.1);
-toxic("oganesson_tetratennesside", 0.1);
-
-elements.molten_californium.reactions["molten_calcium"] = { elem1: "oganesson", elem2: null, tempMin: 10000, chance: 0.01 };
-
-elements.ununennium = {
- color: ["#c0eb9b", "#82e082", "#b8c29d"],
- behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_ununennium" },
- neutron: { elem1: "unbinilium", elem2: null, chance: 0.1 },
- },
- tempHigh: 630,
- tempLow: 15,
- category: "liquids",
- state: "liquid",
- density: 3000,
- hardness: 1.0,
- conduct: 0.2,
- stateLowName: "solid_ununennium",
- tick: function (pixel) {
- pixel.temp += 150;
- },
- excludeRandom: true,
-};
-
-elements.solid_ununennium = {
- behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1|M2"],
- reactions: {
- quark_matter: { elem1: "stable_ununennium" },
- neutron: { elem1: "unbinilium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 150;
- },
- excludeRandom: true,
-};
-
-elements.ununennium_gas = {
- behavior: ["M2|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|M2", "M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|M2"],
- reactions: {
- quark_matter: { elem1: "stable_ununennium" },
- neutron: { elem1: "unbinilium", elem2: null, chance: 0.1 },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 150;
- },
- excludeRandom: true,
- density: 12.555,
-};
-
-runAfterAutogen(function () {
- reactList("ununennium", eLists.WATER, { elem1: "n_explosion", elem2: null });
- reactList("solid_ununennium", eLists.WATER, { elem1: "n_explosion", elem2: null });
- reactList("ununennium_gas", eLists.WATER, { elem1: "n_explosion", elem2: null });
-});
-
-elements.stable_ununennium = {
- color: [blendColors("#c0eb9b", "#ff0000"), blendColors("#82e082", "#00ff00"), blendColors("#b8c29d", "#0000ff")],
- behavior: behaviors.LIQUID,
- reactions: {
- steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
- rad_steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
- },
- tempHigh: 630,
- tempLow: 15,
- category: "liquids",
- state: "liquid",
- density: 14010,
- conduct: 0.2,
- stateLowName: "solid_stable_ununennium",
- hidden: true,
-};
-
-runAfterLoad(function () {
- reactList("stable_ununennium", eLists.WATER, { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide });
- reactList("stable_ununennium_gas", eLists.WATER, { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide });
- reactList("solid_stable_ununennium", eLists.WATER, { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide });
-});
-
-elements.stable_ununennium_gas = {
- density: 12.555,
- reactions: {
- steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
- rad_steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
- },
-};
-
-elements.solid_stable_ununennium = {
- behavior: behaviors.POWDER,
- reactions: {
- steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
- rad_steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
- },
-};
-
-function ununenniumHydroxide(pixel) {
- elementCircle(pixel.x, pixel.y, 10, "ununennium_hydroxide", 0.1, eLists.WATER.concat(["steam", "rad_steam"]));
-}
-
-elements.hydrofluoric_acid.ignore.push("ununennium_fluoride", "ununennium_trifluoride", "ununennium_pentafluoride");
-elements.hydrofluoric_acid_gas.ignore.push("ununennium_fluoride", "ununennium_trifluoride", "ununennium_pentafluoride");
-elements.hydrogen_fluoride.ignore.push("ununennium_fluoride", "ununennium_trifluoride", "ununennium_pentafluoride");
-elements.liquid_hydrogen_fluoride.ignore.push("ununennium_fluoride", "ununennium_trifluoride", "ununennium_pentafluoride");
-
-createSalt("ununennium_fluoride", "ununennium_fluoride_solution", [blendColors("#e1e4eb", "#ff0000", 0.25), blendColors("#e1e4eb", "#00ff00", 0.25), blendColors("#e1e4eb", "#0000ff", 0.25)], [blendColors("#3061f2", "#ff0000", 0.25), blendColors("#3061f2", "#00ff00", 0.25), blendColors("#3061f2", "#0000ff", 0.25)], true, true, 1270, -2, 102, 6703, 1094, "UNUNENNIUM", "FLUORIDE");
-
-acidReact("fluorine", "ununennium_fluoride", "ununennium_trifluoride", "fire");
-acidReact("liquid_fluorine", "ununennium_fluoride", "ununennium_trifluoride", "fire");
-acidReact("fluorine", "molten_ununennium_fluoride", "ununennium_trifluoride", "fire");
-acidReact("liquid_fluorine", "molten_ununennium_fluoride", "ununennium_trifluoride", "fire");
-
-elements.fluorine.ignore.push("molten_ununennium_trifluoride");
-elements.liquid_fluorine.ignore.push("molten_ununennium_trifluoride");
-
-elements.ununennium_trifluoride = {
- color: [blendColors("#ccb87a", "#ff0000", 0.25), blendColors("#ccb87a", "#00ff00", 0.25), blendColors("#ccb87a", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 140, //made up
- category: "powders",
- state: "solid",
- density: 7200, //made up
- hidden: true,
-};
-
-runAfterAutogen(function () {
- reactList("ununennium_trifluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "ununennium_fluoride" });
-});
-
-acidReact("foof", "ununennium_trifluoride", "ununennium_pentafluoride", "oxygen");
-acidReact("solid_foof", "ununennium_trifluoride", "ununennium_pentafluoride", "oxygen");
-
-elements.fluorine.ignore.push("ununennium_pentafluoride");
-elements.liquid_fluorine.ignore.push("ununennium_pentafluoride");
-
-elements.ununennium_pentafluoride = {
- color: [blendColors("#db5030", "#ff0000", 0.25), blendColors("#db5030", "#00ff00", 0.25), blendColors("#db5030", "#0000ff", 0.25)],
- behavior: behaviors.CAUSTIC,
- reactions: {},
- tempHigh: 70, //made up
- category: "powders",
- state: "solid",
- stateHigh: ["ununennium_trifluoride", "fluorine"],
- density: 7250, //made up
- hidden: true,
- ignore: ["foof", "solid_foof", "fluorine", "liquid_fluorine", "fluorine_ice", "ununennium_trifluoride", "oxygen", "liquid_oxygen", "oxygen_ice", "ozone", "hydrofluoric_acid", "hydrofluoric_acid_gas", "hydrogen_fluoride", "liquid_hydrogen_fluoride"],
-};
-
-toxic("ununennium_trifluoride", 0.1);
-toxic("ununennium_pentafluoride", 0.1);
-
-elements.molten_einsteinium.reactions["molten_calcium"] = { elem1: "ununennium", elem2: null, tempMin: 10000, chance: 0.01 };
-
-elements.unbinilium = {
- color: ["#faf069", "#fcf0c7", "#edcd3e"],
- behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:oganesson%1|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1|M2"],
- reactions: {
- quark_matter: { elem1: "stable_unbinilium" },
- },
- tempHigh: 680,
- category: "powders",
- state: "solid",
- density: 7000,
- hardness: 1.0,
- conduct: 0.2,
- tick: function (pixel) {
- pixel.temp += 150;
- },
- excludeRandom: true,
-};
-
-elements.molten_unbinilium = {
- behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:oganesson%1|M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M1|M1|M1"],
- reactions: {
- quark_matter: { elem1: "stable_unbinilium" },
- },
- hardness: 1.0,
- tick: function (pixel) {
- pixel.temp += 150;
- },
- excludeRandom: true,
-};
-
-elements.stable_unbinilium = {
- color: [blendColors("#faf069", "#ff0000"), blendColors("#fcf0c7", "#00ff00"), blendColors("#edcd3e", "#0000ff")],
- behavior: behaviors.POWDER,
- reactions: {
- oxygen: { elem1: "unbinilium_oxide" },
- },
- tempHigh: 680,
- category: "powders",
- state: "solid",
- density: 7000,
- conduct: 0.2,
- hidden: true,
-};
-
-elements.unbinilium_oxide = {
- color: [blendColors("#f5f2e1", "#ff0000", 0.25), blendColors("#f5f2e1", "#00ff00", 0.25), blendColors("#f5f2e1", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- reactions: {},
- hidden: true,
- tempHigh: 2763,
- category: "powders",
- state: "solid",
- density: 15000,
-};
-
-eListAddIon("UNBINILIUM", "unbinilium_oxide");
-eListAddIon("OXIDE", "unbinilium_oxide");
-eListAdd("INSOLUBLE", "unbinilium_oxide");
-
-elements.unbinilium_hydroxide = {
- color: [blendColors("#f9faf2", "#ff0000", 0.25), blendColors("#f9faf2", "#00ff00", 0.25), blendColors("#f9faf2", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- hidden: true,
- tempHigh: 620,
- reactions: {},
- stateHigh: "unbinilium_oxide",
- category: "powders",
- state: "solid",
- density: 12000,
-};
-
-eListAdd("BASE", "unbinilium_hydroxide");
-eListAddIon("UNBINILIUM", "unbinilium_hydroxide", "base");
-eListAddIon("HYDROXIDE", "unbinilium_hydroxide", "base");
-eListAdd("INSOLUBLE", "unbinilium_hydroxide");
-
-elements.molten_stable_unbinilium = {
- reactions: {
- oxygen: { elem1: "unbinilium_oxide" },
- },
- conduct: 0.2,
-};
-
-runAfterLoad(function () {
- reactList("unbinilium_oxide", eLists.WATER, { elem1: "unbinilium_hydroxide", elem2: null, chance: 0.01 });
- reactList("stable_unbinilium", eLists.WATER, { elem1: ["unbinilium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350 });
- reactList("molten_stable_unbinilium", eLists.WATER, { elem1: ["unbinilium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350 });
-});
-
-acidReact("hydrofluoric_acid", "unbinilium_hydroxide", "unbinilium_difluoride_solution", "fire");
-acidReact("hydrofluoric_acid_gas", "unbinilium_hydroxide", "unbinilium_difluoride_solution", "fire");
-acidReact("hydrogen_fluoride", "unbinilium_hydroxide", "unbinilium_difluoride_solution", "fire");
-acidReact("liquid_hydrogen_fluoride", "unbinilium_hydroxide", "unbinilium_difluoride_solution", "fire");
-elements.hydrofluoric_acid.ignore.push("unbinilium_difluoride", "unbinilium_tetrafluoride", "unbinilium_hexafluoride");
-elements.hydrofluoric_acid_gas.ignore.push("unbinilium_difluoride", "unbinilium_tetrafluoride", "unbinilium_hexafluoride");
-elements.hydrogen_fluoride.ignore.push("unbinilium_difluoride", "unbinilium_tetrafluoride", "unbinilium_hexafluoride");
-elements.liquid_hydrogen_fluoride.ignore.push("unbinilium_difluoride", "unbinilium_tetrafluoride", "unbinilium_hexafluoride");
-
-createSalt("unbinilium_difluoride", "unbinilium_difluoride_solution", [blendColors("#e8ebe1", "#ff0000", 0.25), blendColors("#e8ebe1", "#00ff00", 0.25), blendColors("#e8ebe1", "#0000ff", 0.25)], [blendColors("#3087f2", "#ff0000", 0.25), blendColors("#3087f2", "#00ff00", 0.25), blendColors("#3087f2", "#0000ff", 0.25)], true, true, 1340, -2, 102, 6800, 1095, "UNBINILIUM", "FLUORIDE");
-
-acidReact("fluorine", "unbinilium_difluoride", "unbinilium_tetrafluoride", "fire");
-acidReact("liquid_fluorine", "unbinilium_difluoride", "unbinilium_tetrafluoride", "fire");
-acidReact("fluorine", "molten_unbinilium_difluoride", "unbinilium_tetrafluoride", "fire");
-acidReact("liquid_fluorine", "molten_unbinilium_difluoride", "unbinilium_tetrafluoride", "fire");
-
-elements.fluorine.ignore.push("molten_unbinilium_tetrafluoride");
-elements.liquid_fluorine.ignore.push("molten_unbinilium_tetrafluoride");
-
-elements.unbinilium_tetrafluoride = {
- color: [blendColors("#e0dd12", "#ff0000", 0.25), blendColors("#e0dd12", "#00ff00", 0.25), blendColors("#e0dd12", "#0000ff", 0.25)],
- behavior: behaviors.POWDER,
- reactions: {},
- tempHigh: 210, //made up
- category: "powders",
- state: "solid",
- density: 7500, //made up
- hidden: true,
-};
-
-runAfterAutogen(function () {
- reactList("unbinilium_tetrafluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "unbinilium_difluoride" });
-});
-
-acidReact("foof", "unbinilium_tetrafluoride", "unbinilium_hexafluoride", "oxygen");
-acidReact("solid_foof", "unbinilium_tetrafluoride", "unbinilium_hexafluoride", "oxygen");
-
-elements.fluorine.ignore.push("unbinilium_hexafluoride");
-elements.liquid_fluorine.ignore.push("unbinilium_hexafluoride");
-
-elements.unbinilium_hexafluoride = {
- color: [blendColors("#ffca7a", "#ff0000", 0.25), blendColors("#ffca7a", "#00ff00", 0.25), blendColors("#ffca7a", "#0000ff", 0.25)],
- behavior: behaviors.CAUSTIC,
- reactions: {},
- tempHigh: 70, //made up
- category: "powders",
- state: "solid",
- stateHigh: ["unbinilium_tetrafluoride", "fluorine"],
- density: 7700, //made up
- hidden: true,
- ignore: ["foof", "solid_foof", "fluorine", "liquid_fluorine", "fluorine_ice", "unbinilium_tetrafluoride", "oxygen", "liquid_oxygen", "oxygen_ice", "ozone", "hydrofluoric_acid", "hydrofluoric_acid_gas", "hydrogen_fluoride", "liquid_hydrogen_fluoride"],
-};
-
-toxic("unbinilium_tetrafluoride", 0.1);
-toxic("unbinilium_hexafluoride", 0.1);
-
-elements.molten_fermium.reactions["molten_calcium"] = { elem1: "unbinilium", elem2: null, tempMin: 10000, chance: 0.01 };
-
-let defaultBaseReactions = {
- grape: { elem2: "juice", color1: "#291824" },
- sodium: { elem1: "pop" },
- meat: { elem2: "rotten_meat", elem1: null, chance: 0.5 },
- grease: { elem2: "soap", elem1: null },
- fat: { elem2: "soap", elem1: null },
-};
-
-let defaultBaseGasReactions = {
- rain_cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- snow_cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- hail_cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- pyrocumulus: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- fire_cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
- grape: { elem2: "juice", color1: "#291824" },
- sodium: { elem1: "pop" },
- meat: { elem2: "rotten_meat", elem1: null, chance: 0.4 },
- grease: { elem2: "soap", elem1: null },
- fat: { elem2: "soap", elem1: null },
-};
-
-elements["base_cloud"] = {
- color: "#78636a",
- behavior: ["XX|XX|XX", "XX|CH:generic_base%0.05|M1%2.5 AND BO", "XX|XX|XX"],
- reactions: {
- fire_cloud: { elem1: "electric", elem2: "fire" },
- smoke: { elem2: "pyrocumulus", chance: 0.05, y: [0, 12], setting: "clouds" },
- ash: { elem2: "pyrocumulus", chance: 0.05, y: [0, 12], setting: "clouds" },
- balloon: { elem2: "pop" },
- },
- category: "gases",
- burn: 15,
- burnTime: 5,
- state: "gas",
- density: 0.7,
- ignoreAir: true,
-};
-for (let i = 0; i < eLists.ACID.length; i++) {
- elements[eLists.ACID[i]].reactions["base_cloud"] = { elem1: "rain_cloud", elem2: null, chance: 0.05 };
-}
-for (let i = 0; i < eLists.ACIDGAS.length; i++) {
- elements[eLists.ACIDGAS[i]].reactions["base_cloud"] = { elem1: "rain_cloud", elem2: null, chance: 0.05 };
-}
-acidIgnore(["base_cloud"]);
-
-createAcid("francium_hydroxide", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), [blendColors("#863bff", "#ff0000"), blendColors("#4d00ca", "#00ff00"), blendColors("#897b9e", "#0000ff")], true, true, 100, 100, 0, 1000, 1200, 1, "FRANCIUM", { compound: "base" });
-
-elements.francium_hydroxide.ignore.push("francium_nihonide", "nihonium_hydroxide", "hydrogen", "steam");
-elements.francium_hydroxide_gas.ignore.push("francium_nihonide", "nihonium_hydroxide", "hydrogen", "steam");
-
-eListAddIon("HYDROXIDE", ["francium_hydroxide", "francium_hydroxide_gas"], "base");
-
-eListAdd("BASE", []);
-
-function acidNeutralize(base) {
- for (let i = 0; i < eLists.ACID.length; i++) {
- elements[eLists.ACID[i]].reactions[base] = { elem1: "neutral_acid", elem2: null };
- }
- for (let i = 0; i < eLists.ACIDGAS.length; i++) {
- elements[eLists.ACIDGAS[i]].reactions[base] = { elem1: "hydrogen", elem2: null };
- }
- eLists.BASE.push(base);
- if (eLists.HYDROGEN.indexOf(base) >= 0) {
- eLists.HYDROGEN.splice(eLists.HYDROGEN.indexOf(base), 1);
- }
- if (elements[base].salt)
- for (let i in elements[base].salt) {
- if (elements[base].salt[i]) {
- if (elements[base].salt[i].components.indexOf("HYDROGEN") >= 0) {
- elements[base].salt[i].components.splice(elements[base].salt[i].components.indexOf("HYDROGEN"), 1);
- }
- }
- }
-}
-
-createAcid("generic_base", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), "#d48092", true, true, 110, 100, -10, 400, 1020, 1, undefined, { compound: "base" });
-elements.generic_base.name = "base";
-elements.generic_base_gas.name = "base_gas";
-
-acidNeutralize("generic_base");
-acidNeutralize("generic_base_gas");
-
-acidNeutralize("radium_hydroxide");
-acidNeutralize("actinium_hydroxide");
-acidNeutralize("protactinium_hydroxide");
-acidNeutralize("unbinilium_hydroxide");
-
-elements.caustic_soda = {
- color: "#ffe8ff",
- behavior: behaviors.CAUSTIC,
- category: "powders",
- tempHigh: 323,
- state: "solid",
- density: 2130,
- hidden: true,
- alias: "sodium hydroxide powder",
-};
-
-acidNeutralize("sodium_hydride");
-
-acidNeutralize("sodium_methoxide");
-acidNeutralize("molten_sodium_methoxide");
-
-elements.francium_hydroxide_powder = {
- color: [blendColors("#e8ede8", "#ff0000"), blendColors("#e8ede8", "#00ff00"), blendColors("#e8ede8", "#0000ff")],
- behavior: behaviors.CAUSTIC,
- category: "powders",
- tempHigh: 251, //made up
- state: "solid",
- density: 5100, //made up
- hidden: true,
- reactions: {},
- ignore: [],
-};
-elements.francium_hydroxide_powder.ignore.push("francium_nihonide", "nihonium_hydroxide", "hydrogen", "steam");
-
-elements.francium.breakInto = "francium";
-elements.molten_francium.breakInto = "molten_francium";
-elements.stable_francium.breakInto = "stable_francium";
-elements.molten_stable_francium.breakInto = "molten_stable_francium";
-elements.francium_hydroxide_gas.breakInto = "francium_hydroxide_gas";
-elements.francium_hydroxide_powder.breakInto = "francium_hydroxide_powder";
-elements.molten_francium_hydroxide_powder = { breakInto: "molten_francium_hydroxide_powder" };
-elements.francium_hydroxide_gas.stateHigh = ["francium_hydroxide_powder", "steam"];
-elements.francium_hydroxide.ignore.push("fire", "smoke", "smog", "steam");
-elements.francium_hydroxide_gas.ignore.push("fire", "smoke", "smog", "steam");
-acidNeutralize("francium_hydroxide");
-acidNeutralize("francium_hydroxide_gas");
-acidNeutralize("francium_hydroxide_powder");
-eLists.WATER.push("francium_hydroxide");
-
-elements.francium_hydroxide_powder.ignore = elements.francium_hydroxide.ignore;
-acidIgnore(["francium_hydroxide_powder"]);
-
-eListAddIon("FRANCIUM", ["francium_hydroxide_powder", "molten_francium_hydroxide_powder"], "base");
-eListAddIon("HYDROXIDE", ["francium_hydroxide_powder", "molten_francium_hydroxide_powder"], "base");
-
-runAfterLoad(function () {
- for (let i = 0; i < eLists.WATER.length; i++) {
- delete elements["francium_hydroxide"].reactions[eLists.WATER[i]];
- delete elements["francium_hydroxide_gas"].reactions[eLists.WATER[i]];
- }
- reactList("francium_hydroxide_powder", eLists.WATER, { elem1: "francium_hydroxide", elem2: null });
-});
-
-createAcid("ununennium_hydroxide", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), [blendColors("#eb3bff", "#ff0000"), blendColors("#eb3bff", "#00ff00"), blendColors("#eb3bff", "#0000ff")], true, true, 100, 100, 0, 1000, 1200, 1, "UNUNENNIUM", { compound: "base" });
-
-eListAddIon("HYDROXIDE", ["ununennium_hydroxide", "ununennium_hydroxide_gas"], "base");
-
-elements.ununennium_hydroxide_powder = {
- color: [blendColors("#c8cdc8", "#ff0000"), blendColors("#c8cdc8", "#00ff00"), blendColors("#c8cdc8", "#0000ff")],
- behavior: behaviors.CAUSTIC,
- category: "powders",
- tempHigh: 271, //made up
- state: "solid",
- density: 8200, //made up
- hidden: true,
- reactions: {},
- ignore: [],
-};
-
-elements.ununennium_hydroxide_gas.breakInto = "ununennium_hydroxide_gas";
-elements.ununennium_hydroxide_powder.breakInto = "ununennium_hydroxide_powder";
-elements.molten_ununennium_hydroxide_powder = { breakInto: "molten_ununennium_hydroxide_powder" };
-elements.ununennium_hydroxide_gas.stateHigh = ["ununennium_hydroxide_powder", "steam"];
-elements.ununennium_hydroxide.ignore.push("fire", "smoke", "smog", "steam", "ununennium_fluoride", "ununennium_fluoride_solution");
-elements.ununennium_hydroxide_gas.ignore.push("fire", "smoke", "smog", "steam", "ununennium_fluoride", "ununennium_fluoride_solution");
-acidNeutralize("ununennium_hydroxide");
-acidNeutralize("ununennium_hydroxide_gas");
-acidNeutralize("ununennium_hydroxide_powder");
-eLists.WATER.push("ununennium_hydroxide");
-
-elements.ununennium_hydroxide_powder.ignore = elements.ununennium_hydroxide.ignore;
-acidIgnore(["ununennium_hydroxide_powder"]);
-
-eListAddIon("UNUNENNIUM", ["ununennium_hydroxide_powder", "molten_ununennium_hydroxide_powder"], "base");
-eListAddIon("HYDROXIDE", ["ununennium_hydroxide_powder", "molten_ununennium_hydroxide_powder"], "base");
-
-runAfterLoad(function () {
- for (let i = 0; i < eLists.WATER.length; i++) {
- delete elements["ununennium_hydroxide"].reactions[eLists.WATER[i]];
- delete elements["ununennium_hydroxide_gas"].reactions[eLists.WATER[i]];
- }
- reactList("ununennium_hydroxide_powder", eLists.WATER, { elem1: "ununennium_hydroxide", elem2: null });
-});
-
-createAcid("sodium_hydroxide", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), ["#fc3bff", "#c000ca", "#9b7b9e"], false, true, 100, 100, 0, 1000, 1050, 1, "SODIUM", { compound: "base" });
-acidNeutralize("sodium_hydroxide");
-acidNeutralize("sodium_hydroxide_gas");
-eListAddIon("HYDROXIDE", ["sodium_hydroxide", "sodium_hydroxide_gas"], "base");
-eLists.WATER.push("sodium_hydroxide");
-
-eLists.CAUSTIC.push("caustic_soda");
-acidNeutralize("caustic_soda");
-elements.caustic_soda.ignore = elements.sodium_hydroxide.ignore;
-acidIgnore(["caustic_soda"]);
-
-eListAddIon("SODIUM", ["caustic_soda", "molten_caustic_soda"], "base");
-eListAddIon("HYDROXIDE", ["caustic_soda", "molten_caustic_soda"], "base");
-eListAdd("COMPOUND", "caustic_soda");
-
-elements.caustic_soda.behavior = behaviors.CAUSTIC;
-if (!elements.caustic_soda.reactions) {
- elements.caustic_soda.reactions = {};
-}
-runAfterLoad(function () {
- reactList("caustic_soda", eLists.WATER, { elem1: "sodium_hydroxide", elem2: null });
- delete elements.sodium_hydroxide.reactions["sodium_aluminate_solution"];
- delete elements.sodium_hydroxide_gas.reactions["sodium_aluminate_solution"];
-});
-
-elements.sodium_hydroxide_gas.tempHigh = 150;
-elements.sodium_hydroxide_gas.stateHigh = ["caustic_soda", "steam"];
-
-createAcid("potassium_hydroxide", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), ["#3bc4ff", "#0062ca", "#7b949e"], false, true, 100, 100, 0, 1000, 1075, 1, "POTASSIUM", { compound: "base" });
-acidNeutralize("potassium_hydroxide");
-acidNeutralize("potassium_hydroxide_gas");
-eListAddIon("HYDROXIDE", ["potassium_hydroxide", "potassium_hydroxide_gas"], "base");
-eLists.WATER.push("potassium_hydroxide");
-
-eLists.CAUSTIC.push("caustic_potash");
-acidNeutralize("caustic_potash");
-elements.caustic_potash.ignore = elements.potassium_hydroxide.ignore;
-acidIgnore(["caustic_potash"]);
-
-eListAddIon("POTASSIUM", ["caustic_potash", "molten_caustic_potash"], "base");
-eListAddIon("HYDROXIDE", ["caustic_potash", "molten_caustic_potash"], "base");
-eListAdd("COMPOUND", "caustic_potash");
-
-elements.caustic_potash.behavior = behaviors.CAUSTIC;
-if (!elements.caustic_potash.reactions) {
- elements.caustic_potash.reactions = {};
-}
-runAfterLoad(function () {
- reactList("caustic_potash", eLists.WATER, { elem1: "potassium_hydroxide", elem2: null });
-});
-elements.potassium_hydroxide_gas.tempHigh = 150;
-elements.potassium_hydroxide_gas.stateHigh = ["caustic_potash", "steam"];
-
-createAcid("red_mud", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), ["#ab3d24", "#cc5d2d", "#a81b1b"], true, true, 1600, 1600, 0, Infinity, 5200, 3, "REDMUD", { compound: "base" });
-acidNeutralize("red_mud");
-acidNeutralize("red_mud_gas");
-elements.red_mud.viscosity = 1000000;
-
-runAfterLoad(function () {
- reactList("red_mud", eLists.WATER, { elem2: "dirty_water" });
- delete elements.red_mud.reactions["dirty_water"];
- delete elements.red_mud.reactions["sodium_aluminate_solution"];
-});
-
-acidReact("potassium_hydroxide", "fertilizer", "niter", "ammonia", 10);
-acidReact("potassium_hydroxide_gas", "fertilizer", "niter", "ammonia", 10);
-
-acidReact("potassium_hydroxide", "carbon_dioxide", "potassium_carbonate", null, 10);
-acidReact("potassium_hydroxide_gas", "carbon_dioxide", "potassium_carbonate", null, 10);
-elements.potassium_hydroxide.ignore.push("carbon_dioxide", "potassium_carbonate");
-elements.potassium_hydroxide_gas.ignore.push("carbon_dioxide", "potassium_carbonate");
-
-elements.salt_water.reactions["mercury"] = { elem1: ["sodium_hydroxide", "chlorine", "hydrogen"], charged: true, chance: 0.02 };
-elements.sodium_hydroxide.ignore.push("mercury", "chlorine", "salt_water");
-elements.sodium_hydroxide_gas.ignore.push("mercury", "chlorine", "salt_water");
-elements.potassium_salt_water.reactions["mercury"] = { elem1: ["potassium_hydroxide", "chlorine", "hydrogen"], charged: true, chance: 0.02 };
-elements.potassium_hydroxide.ignore.push("mercury", "chlorine", "potassium_salt_water");
-elements.potassium_hydroxide_gas.ignore.push("mercury", "chlorine", "potassium_salt_water");
-
-acidReact("sodium_hydroxide", "bauxite", "sodium_aluminate_solution", "red_mud", 10);
-acidReact("sodium_hydroxide_gas", "bauxite", "sodium_aluminate_solution", "red_mud", 10);
-elements.red_mud.ignore.push("sodium_aluminate_solution_ice", "sodium_aluminate", "molten_sodium_aluminate", "sodium_carbonate_solution", "spent_sodium_aluminate_solution", "spent_sodium_aluminate_solution_ice", "aluminum_hydroxide", "alumina", "molten_alumina");
-elements.red_mud_gas.ignore.push("sodium_aluminate_solution_ice", "sodium_aluminate", "molten_sodium_aluminate", "sodium_carbonate_solution", "spent_sodium_aluminate_solution", "spent_sodium_aluminate_solution_ice", "aluminum_hydroxide", "alumina", "molten_alumina");
-elements.sodium_hydroxide.ignore.push("sodium_aluminate_solution_ice", "sodium_aluminate", "molten_sodium_aluminate", "sodium_carbonate_solution", "spent_sodium_aluminate_solution", "spent_sodium_aluminate_solution_ice", "aluminum_hydroxide", "alumina", "molten_alumina");
-elements.sodium_hydroxide_gas.ignore.push("sodium_aluminate_solution_ice", "sodium_aluminate", "molten_sodium_aluminate", "sodium_carbonate_solution", "spent_sodium_aluminate_solution", "spent_sodium_aluminate_solution_ice", "aluminum_hydroxide", "alumina", "molten_alumina");
-
-//Cryolite
-acidReact("hydrofluoric_acid", "sodium_aluminate", "cryolite", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "sodium_aluminate", "cryolite", "fire", 0);
-
-acidReact("hydrogen_fluoride", "sodium_aluminate", "cryolite", "fire", 0);
-acidReact("liquid_hydrogen_fluoride", "sodium_aluminate", "cryolite", "fire", 0);
-
-elements.hydrofluoric_acid.ignore.push("molten_cryolite", "molten_sodium_aluminate");
-elements.hydrofluoric_acid_gas.ignore.push("molten_cryolite", "molten_sodium_aluminate");
-elements.hydrogen_fluoride.ignore.push("molten_cryolite", "molten_sodium_aluminate");
-elements.liquid_hydrogen_fluoride.ignore.push("molten_cryolite", "molten_sodium_aluminate");
-
-acidReact("hexafluorosilicic_acid", "sodium_aluminate", "cryolite", "sand", 0);
-acidReact("hexafluorosilicic_acid_gas", "sodium_aluminate", "cryolite", "sand", 0);
-elements.hexafluorosilicic_acid.ignore.push("molten_cryolite", "molten_sodium_aluminate");
-elements.hexafluorosilicic_acid_gas.ignore.push("molten_cryolite", "molten_sodium_aluminate");
-
-//Aluminum trifluoride
-acidReact("hydrofluoric_acid", "alumina", "aluminum_trifluoride", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "alumina", "aluminum_trifluoride", "fire", 0);
-
-acidReact("hydrogen_fluoride", "alumina", "aluminum_trifluoride", "fire", 0);
-acidReact("liquid_hydrogen_fluoride", "alumina", "aluminum_trifluoride", "fire", 0);
-
-elements.hydrofluoric_acid.ignore.push("molten_alumina", "aluminum_trifluoride_gas");
-elements.hydrofluoric_acid_gas.ignore.push("molten_alumina", "aluminum_trifluoride_gas");
-elements.hydrogen_fluoride.ignore.push("molten_alumina", "aluminum_trifluoride_gas");
-elements.liquid_hydrogen_fluoride.ignore.push("molten_alumina", "aluminum_trifluoride_gas");
-
-acidReact("hydrofluoric_acid", "aluminum_hydroxide", "aluminum_trifluoride", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "aluminum_hydroxide", "aluminum_trifluoride", "fire", 0);
-
-acidReact("hydrogen_fluoride", "aluminum_hydroxide", "aluminum_trifluoride", "fire", 0);
-acidReact("liquid_hydrogen_fluoride", "aluminum_hydroxide", "aluminum_trifluoride", "fire", 0);
-
-acidReact("hydrofluoric_acid", "sodium_hydroxide", "sodium_fluoride_solution", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "sodium_hydroxide", "sodium_fluoride_solution", "fire", 0);
-acidReact("hydrofluoric_acid", "sodium_hydroxide_gas", "sodium_fluoride_solution", "fire", 0);
-acidReact("hydrofluoric_acid_gas", "sodium_hydroxide_gas", "sodium_fluoride_solution", "fire", 0);
-
-acidReact("acid", "sodium_hydroxide", "salt_water", null, 0);
-acidReact("acid_gas", "sodium_hydroxide", "salt_water", null, 0);
-acidReact("acid", "sodium_hydroxide_gas", "salt_water", null, 0);
-acidReact("acid_gas", "sodium_hydroxide_gas", "salt_water", null, 0);
-
-acidReact("acid", "potassium_hydroxide", "potassium_salt_water", null, 0);
-acidReact("acid_gas", "potassium_hydroxide", "potassium_salt_water", null, 0);
-acidReact("acid", "potassium_hydroxide_gas", "potassium_salt_water", null, 0);
-acidReact("acid_gas", "potassium_hydroxide_gas", "potassium_salt_water", null, 0);
-
-elements.sodium_hydroxide.ignore.push("sodium_methoxide", "methanol");
-elements.sodium_hydroxide_gas.ignore.push("sodium_methoxide", "methanol");
-elements.sodium_hydroxide.ignore.push("sodium_methoxide", "methanol");
-elements.sodium_hydroxide_gas.ignore.push("sodium_methoxide", "methanol");
-
-acidReact("fluoroboric_acid", "sodium_hydroxide", "sodium_tetrafluoroborate", null, 50);
-acidReact("fluoroboric_acid_gas", "sodium_hydroxide", "sodium_tetrafluoroborate", null, 50);
-acidReact("fluoroboric_acid", "sodium_hydroxide_gas", "sodium_tetrafluoroborate", null, 50);
-acidReact("fluoroboric_acid_gas", "sodium_hydroxide_gas", "sodium_tetrafluoroborate", null, 50);
-
-//nihonium
-
-acidReact("sodium_hydroxide", "nihonium_sulfate_solution", "sodium_sulfate_solution", "nihonium_hydroxide");
-acidReact("sodium_hydroxide_gas", "nihonium_sulfate_solution", "sodium_sulfate_solution", "nihonium_hydroxide");
-acidReact("sodium_hydroxide", "nihonium_sulfate", "sodium_sulfate_solution", "nihonium_hydroxide");
-acidReact("sodium_hydroxide_gas", "nihonium_sulfate", "sodium_sulfate_solution", "nihonium_hydroxide");
-
-acidReact("potassium_hydroxide", "nihonium_sulfate_solution", "potassium_sulfate_solution", "nihonium_hydroxide");
-acidReact("potassium_hydroxide_gas", "nihonium_sulfate_solution", "potassium_sulfate_solution", "nihonium_hydroxide");
-acidReact("potassium_hydroxide", "nihonium_sulfate", "potassium_sulfate_solution", "nihonium_hydroxide");
-acidReact("potassium_hydroxide_gas", "nihonium_sulfate", "potassium_sulfate_solution", "nihonium_hydroxide");
-
-acidReact("potassium_hydroxide", "nihonium_nitrate_solution", "niter_solution", "nihonium_hydroxide");
-acidReact("potassium_hydroxide_gas", "nihonium_nitrate_solution", "niter_solution", "nihonium_hydroxide");
-acidReact("potassium_hydroxide", "nihonium_nitrate", "niter_solution", "nihonium_hydroxide");
-acidReact("potassium_hydroxide_gas", "nihonium_nitrate", "niter_solution", "nihonium_hydroxide");
-
-elements.bless.reactions["foof"] = { elem2: "oxygen" };
-elements.bless.reactions["solid_foof"] = { elem2: "oxygen" };
-elements.bless.reactions["fluorine"] = { elem2: null };
-elements.bless.reactions["liquid_fluorine"] = { elem2: null };
-elements.bless.reactions["fluorine_ice"] = { elem2: null };
-elements.bless.reactions["hydrogen_fluoride"] = { elem2: "hydrogen" };
-elements.bless.reactions["liquid_hydrogen_fluoride"] = { elem2: "hydrogen" };
-elements.bless.reactions["hydrogen_fluoride_ice"] = { elem2: "hydrogen" };
-elements.bless.reactions["hydrofluoric_acid"] = { elem2: "hydrogen" };
-elements.bless.reactions["hydrofluoric_acid_ice"] = { elem2: "hydrogen" };
-elements.bless.reactions["francium"] = { elem2: null };
-elements.bless.reactions["molten_francium"] = { elem2: null };
-elements.bless.reactions["astatine"] = { elem2: null };
-elements.bless.reactions["molten_astatine"] = { elem2: null };
-elements.bless.reactions["astatine_gas"] = { elem2: null };
-elements.bless.reactions["big_pop"] = { elem2: null };
-elements.bless.reactions["rad_pop"] = { elem2: null };
-elements.bless.reactions["radon"] = { elem2: null };
-elements.bless.reactions["polonium"] = { elem2: null };
-elements.bless.reactions["molten_polonium"] = { elem2: null };
-elements.bless.reactions["neutronium"] = { elem2: "neutron" };
-elements.bless.reactions["liquid_neutronium"] = { elem2: "neutron" };
-elements.bless.reactions["quark_matter"] = { elem2: ["neutron", "proton"] };
-elements.bless.reactions["gamma_ray_burst"] = { elem2: null };
-elements.bless.reactions["nitrogen_dioxide"] = { elem2: "oxygen" };
-elements.bless.reactions["liquid_nitrogen_dioxide"] = { elem2: "oxygen" };
-elements.bless.reactions["sulfur_dioxide"] = { elem2: "oxygen" };
-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["bromine"] = { elem2: [null, null, null, "soy_sauce"] };
-elements.bless.reactions["bromine_gas"] = { elem2: [null, null, null, "soy_sauce"] };
-elements.bless.reactions["bromine_ice"] = { elem2: [null, null, null, "soy_sauce"] };
-elements.bless.reactions["rocket_fuel"] = { elem2: null };
-elements.bless.reactions["diborane"] = { elem2: "hydrogen" };
-elements.bless.reactions["pentaborane"] = { elem2: "hydrogen" };
-elements.bless.reactions["decaborane"] = { elem2: "hydrogen" };
-elements.bless.reactions["sodium_hydride"] = { elem2: "hydrogen" };
-elements.bless.reactions["sodium_borohydride"] = { elem2: "hydrogen" };
-elements.bless.reactions["sodium_borohydride_solution"] = { elem2: "water" };
-elements.bless.reactions["uraninite"] = { elem2: "rock" };
-elements.bless.reactions["yellowcake_solution"] = { elem2: ["rock", "hydrogen", "rock", "hydrogen", "rock", "hydrogen", "baked_batter", "hydrogen"] };
-elements.bless.reactions["yellowcake"] = { elem2: ["rock", "rock", "rock", "baked_batter"] };
-elements.bless.reactions["depleted_uranium"] = { elem2: "rock" };
-elements.bless.reactions["enriched_uranium"] = { elem2: "rock" };
-elements.bless.reactions["uranium_dioxide"] = { elem2: "rock" };
-elements.bless.reactions["depleted_uranium_dioxide"] = { elem2: "rock" };
-elements.bless.reactions["enriched_uranium_dioxide"] = { elem2: "rock" };
-elements.bless.reactions["uranium_tetrafluoride"] = { elem2: "rock" };
-elements.bless.reactions["depleted_uranium_tetrafluoride"] = { elem2: "rock" };
-elements.bless.reactions["enriched_uranium_tetrafluoride"] = { elem2: "rock" };
-elements.bless.reactions["uranium_hexafluoride"] = { elem2: "rock" };
-elements.bless.reactions["depleted_uranium_hexafluoride"] = { elem2: "rock" };
-elements.bless.reactions["enriched_uranium_hexafluoride"] = { elem2: "rock" };
-elements.bless.reactions["stable_uranium_hexafluoride"] = { elem2: "stable_uranium" };
-elements.bless.reactions["molten_depleted_uranium"] = { elem2: "magma" };
-elements.bless.reactions["molten_enriched_uranium"] = { elem2: "magma" };
-elements.bless.reactions["molten_uranium_dioxide"] = { elem2: "magma" };
-elements.bless.reactions["molten_depleted_uranium_dioxide"] = { elem2: "magma" };
-elements.bless.reactions["molten_enriched_uranium_dioxide"] = { elem2: "magma" };
-elements.bless.reactions["molten_uranium_tetrafluoride"] = { elem2: "magma" };
-elements.bless.reactions["molten_depleted_uranium_tetrafluoride"] = { elem2: "magma" };
-elements.bless.reactions["molten_enriched_uranium_tetrafluoride"] = { elem2: "magma" };
-elements.bless.reactions["uranium_hexafluoride_gas"] = { elem2: "rock" };
-elements.bless.reactions["depleted_uranium_hexafluoride_gas"] = { elem2: "rock" };
-elements.bless.reactions["enriched_uranium_hexafluoride_gas"] = { elem2: "rock" };
-elements.bless.reactions["stable_uranium_hexafluoride_gas"] = { elem2: "stable_uranium" };
-elements.bless.reactions["neptunium"] = { elem2: "rock" };
-elements.bless.reactions["molten_neptunium"] = { elem2: "rock" };
-elements.bless.reactions["enriched_uranium_hexafluoride_gas"] = { elem2: "rock" };
-elements.bless.reactions["radium"] = { elem2: null };
-elements.bless.reactions["molten_radium"] = { elem2: null };
-elements.bless.reactions["actinium"] = { elem2: null };
-elements.bless.reactions["molten_actinium"] = { elem2: null };
-elements.bless.reactions["thorium"] = { elem2: "rock" };
-elements.bless.reactions["molten_thorium"] = { elem2: "magma" };
-elements.bless.reactions["thorium_dioxide"] = { elem2: "rock" };
-elements.bless.reactions["molten_thorium_dioxide"] = { elem2: "magma" };
-elements.bless.reactions["thorium_tetrafluoride"] = { elem2: "rock" };
-elements.bless.reactions["molten_thorium_tetrafluoride"] = { elem2: "magma" };
-elements.bless.reactions["protactinium"] = { elem2: "rock" };
-elements.bless.reactions["molten_protactinium"] = { elem2: "magma" };
-elements.bless.reactions["neptunium"] = { elem2: "rock" };
-elements.bless.reactions["molten_neptunium"] = { elem2: "magma" };
-elements.bless.reactions["neptunium_hexafluoride"] = { elem2: "stable_neptunium" };
-elements.bless.reactions["neptunium_hexafluoride_gas"] = { elem2: "stable_neptunium" };
-elements.bless.reactions["plutonium"] = { elem2: "rock" };
-elements.bless.reactions["molten_plutonium"] = { elem2: "magma" };
-elements.bless.reactions["plutonium_dioxide"] = { elem2: "rock" };
-elements.bless.reactions["molten_plutonium_dioxide"] = { elem2: "magma" };
-elements.bless.reactions["plutonium_tetrafluoride"] = { elem2: "rock" };
-elements.bless.reactions["molten_plutonium_tetrafluoride"] = { elem2: "magma" };
-elements.bless.reactions["plutonium_hexafluoride"] = { elem2: "rock" };
-elements.bless.reactions["plutonium_hexafluoride_gas"] = { elem2: "magma" };
-elements.bless.reactions["stable_plutonium_hexafluoride"] = { elem2: "stable_plutonium" };
-elements.bless.reactions["stable_plutonium_hexafluoride_gas"] = { elem2: "stable_plutonium" };
-elements.bless.reactions["americium"] = { elem2: "rock" };
-elements.bless.reactions["molten_americium"] = { elem2: "magma" };
-elements.bless.reactions["curium"] = { elem2: "rock" };
-elements.bless.reactions["molten_curium"] = { elem2: "magma" };
-elements.bless.reactions["berkelium"] = { elem2: "rock" };
-elements.bless.reactions["molten_berkelium"] = { elem2: "magma" };
-elements.bless.reactions["californium"] = { elem2: "rock" };
-elements.bless.reactions["molten_californium"] = { elem2: "magma" };
-elements.bless.reactions["einsteinium"] = { elem2: "rock" };
-elements.bless.reactions["molten_einsteinium"] = { elem2: "magma" };
-elements.bless.reactions["fermium"] = { elem2: "rock" };
-elements.bless.reactions["molten_fermium"] = { elem2: "magma" };
-
-elements.bless.reactions["copernicium"] = { elem2: "rock" };
-elements.bless.reactions["copernicium_gas"] = { elem2: "magma" };
-elements.bless.reactions["solid_copernicium"] = { elem2: "rock" };
-elements.bless.reactions["copernicium_tetrafluoride"] = { elem2: "stable_copernicium" };
-elements.bless.reactions["nihonium"] = { elem2: "rock" };
-elements.bless.reactions["molten_nihonium"] = { elem2: "magma" };
-elements.bless.reactions["francium_nihonide"] = { elem2: "stable_nihonium" };
-elements.bless.reactions["flerovium"] = { elem2: "rock" };
-elements.bless.reactions["flerovium_gas"] = { elem2: "magma" };
-elements.bless.reactions["solid_flerovium"] = { elem2: "rock" };
-elements.bless.reactions["moscovium"] = { elem2: "rock" };
-elements.bless.reactions["molten_moscovium"] = { elem2: "magma" };
-elements.bless.reactions["livermorium"] = { elem2: "rock" };
-elements.bless.reactions["molten_livermorium"] = { elem2: "magma" };
-elements.bless.reactions["tennessine"] = { elem2: null };
-elements.bless.reactions["molten_tennessine"] = { elem2: null };
-elements.bless.reactions["stable_tennessine"] = { elem2: null };
-elements.bless.reactions["molten_stable_tennessine"] = { elem2: null };
-elements.bless.reactions["tennessine_monofluoride"] = { elem2: null };
-elements.bless.reactions["tennessine_monofluoride_ice"] = { elem2: null };
-elements.bless.reactions["tennessine_monofluoride_gas"] = { elem2: null };
-elements.bless.reactions["tennessine_trifluoride"] = { elem2: null };
-elements.bless.reactions["tennessine_trifluoride_ice"] = { elem2: null };
-elements.bless.reactions["tennessine_trifluoride_gas"] = { elem2: null };
-elements.bless.reactions["molten_oganesson"] = { elem2: null };
-elements.bless.reactions["oganesson_gas"] = { elem2: null };
-elements.bless.reactions["oganesson"] = { elem2: null };
-elements.bless.reactions["oganesson_difluoride"] = { elem2: "stable_oganesson" };
-elements.bless.reactions["molten_oganesson_difluoride"] = { elem2: "stable_oganesson" };
-elements.bless.reactions["oganesson_tetrafluoride"] = { elem2: "stable_oganesson" };
-elements.bless.reactions["molten_oganesson_tetrafluoride"] = { elem2: "stable_oganesson" };
-elements.bless.reactions["oganesson_tetratennesside"] = { elem2: "stable_oganesson" };
-elements.bless.reactions["ununennium"] = { elem2: null };
-elements.bless.reactions["ununennium_gas"] = { elem2: null };
-elements.bless.reactions["solid_ununennium"] = { elem2: null };
-elements.bless.reactions["stable_ununennium"] = { elem2: null };
-elements.bless.reactions["stable_ununennium_gas"] = { elem2: null };
-elements.bless.reactions["solid_stable_ununennium"] = { elem2: null };
-elements.bless.reactions["ununennium_trifluoride"] = { elem2: null };
-elements.bless.reactions["molten_ununennium_trifluoride"] = { elem2: null };
-elements.bless.reactions["ununennium_pentafluoride"] = { elem2: null };
-elements.bless.reactions["unbinilium"] = { elem2: null };
-elements.bless.reactions["molten_unbinilium"] = { elem2: null };
-elements.bless.reactions["unbinilium_tetrafluoride"] = { elem2: null };
-elements.bless.reactions["molten_unbinilium_tetrafluoride"] = { elem2: null };
-elements.bless.reactions["unbinilium_hexafluoride"] = { elem2: null };
-
-elements.foof.ignore.push("foof_grass", "foof_grass_seed");
-elements.solid_foof.ignore.push("foof_grass", "foof_grass_seed");
-elements.fluorine.ignore.push("foof_grass", "foof_grass_seed");
-elements.liquid_fluorine.ignore.push("foof_grass", "foof_grass_seed");
-
elements.foof_grass = {
color: ["#980909", "#8b2708", "#852a11", "#7b1212", "#6d1d13"],
tick: function (pixel) {
@@ -7530,348 +6732,1275 @@ runEveryTick(function () {
}
});
-for (let i = 0; i < eLists.INSOLUBLE.length; i++) {
- eListAdd("COMPOUND", eLists.INSOLUBLE[i]);
+
+function elementCircle(x, y, radius, pixelType = "fire", chance = 0.1, replace = [null]) {
+ if (!Array.isArray(replace)) {
+ replace = [replace];
+ }
+ // if pixelType includes , split it into an array
+ if (pixelType.indexOf(",") !== -1) {
+ pixelType = pixelType.split(",");
+ }
+ var coords = circleCoords(x, y, radius);
+ for (var i = 0; i < coords.length; i++) {
+ if (isEmpty(coords[i].x, coords[i].y) && replace.includes(null)) {
+ if (Math.random() <= chance) {
+ // if pixelType is an array, choose a random item
+ if (Array.isArray(pixelType)) {
+ createPixel(pixelType[Math.floor(Math.random() * pixelType.length)], coords[i].x, coords[i].y);
+ } else {
+ createPixel(pixelType, coords[i].x, coords[i].y);
+ }
+ }
+ }
+ if (!isEmpty(coords[i].x, coords[i].y, true) && replace.includes(pixelMap[coords[i].x][coords[i].y].element)) {
+ if (Math.random() <= chance) {
+ // if pixelType is an array, choose a random item
+ if (Array.isArray(pixelType)) {
+ changePixel(pixelMap[coords[i].x][coords[i].y], pixelType[Math.floor(Math.random() * pixelType.length)]);
+ } else {
+ changePixel(pixelMap[coords[i].x][coords[i].y], pixelType);
+ }
+ }
+ }
+ }
}
-eListAdd("COMPOUND", "water");
-eListAddIon("HYDROGEN", "water");
-eListAddIon("HYDROXIDE", "water");
+function franciumHydroxide(pixel) {
+ elementCircle(pixel.x, pixel.y, 10, "francium_hydroxide", 0.1, parseReactStringValue(["chemical!liquid_water", "steam", "rad_steam"]));
+}
+function ununenniumHydroxide(pixel) {
+ elementCircle(pixel.x, pixel.y, 10, "ununennium_hydroxide", 0.1, parseReactStringValue(["chemical!liquid_water", "steam", "rad_steam"]));
+}
-eListAdd("COMPOUND", "methanol");
-eListAddIon("HYDROGEN", "methanol");
-eListAddIon("METHOXIDE", "methanol");
+function radiumWater(pixel) {
+ elementCircle(pixel.x, pixel.y, 10, "radium_water", 0.1, parseReactStringValue(["chemical!liquid_water"]));
+}
-eListAdd("COMPOUND", "vinegar");
-eListAdd("ACID", "vinegar");
-eListAddIon("HYDROGEN", "vinegar", "acid");
-eListAddIon("ACETATE", "vinegar", "acid");
+function thorium(pixel, p) {
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "radium");
+ elementCircle(p.x, p.y, 2, "neutron");
+ }
+}
-createSalt("baking_soda", "baking_soda_solution", ["#f2f2f2", "#e0e0e0"], "#7494db", false, true, 292, -2, 102, 3980, 1026, "SODIUM", "BICARBONATE");
+function depletedUranium(pixel) {
+ if (Math.random() < 0.05) {
+ changePixel(pixel, "plutonium");
+ }
+}
-delete elements["molten_baking_soda"];
+function enrichedUranium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "neptunium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron", 0.05);
+}
+function enrichedUraniumDioxide(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ elementCircle(p.x, p.y, 2, "neutron", 0.02);
+}
-eListAdd("COMPOUND", "baking_soda");
-eListAdd("BASE", "baking_soda");
-eListAdd("COMPOUND", "baking_soda_solution");
-eListAdd("BASE", "baking_soda_solution");
-eListAddIon("SODIUM", "baking_soda", "base");
-eListAddIon("BICARBONATE", "baking_soda", "base");
-eListAddIon("SODIUM", "baking_soda_solution", "base");
-eListAddIon("BICARBONATE", "baking_soda_solution", "base");
+function plutonium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "americium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron", 0.2);
+}
-elements["baking_soda"].reactions["sodium_hydroxide"] = { elem1: "sodium_carbonate_solution", elem2: null };
-elements["baking_soda"].reactions["sodium_hydroxide_gas"] = { elem1: "sodium_carbonate_solution", elem2: null };
-elements["baking_soda_solution"].reactions["sodium_hydroxide"] = { elem1: "sodium_carbonate_solution", elem2: null };
-elements["baking_soda_solution"].reactions["sodium_hydroxide_gas"] = { elem1: "sodium_carbonate_solution", elem2: null };
+function depletedPlutonium(pixel) {
+ if (pixel.temp >= 500 && Math.random() < 0.1) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "americium");
+ }
+}
-createSalt("sodium_acetate", "sodium_acetate_solution", ["#f2f2f2", "#e0e0e0"], "#7ea2f2", false, true, 292, -2, 102, 3980, 1028, "SODIUM", "ACETATE");
+function plutoniumDioxide(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ elementCircle(p.x, p.y, 2, "neutron", 0.075);
+}
-eListAdd("ACID", "seltzer");
-eListAddIon("HYDROGEN", "seltzer", "acid");
-eListAddIon("CARBONATE", "seltzer", "acid");
-eListAddIon("HYDROGEN", "seltzer", "bicarbonate");
-eListAddIon("BICARBONATE", "seltzer", "bicarbonate");
+function transmuteAround(pixel) {
+ elementCircle(pixel.x, pixel.y, 40, "fermium", 0.1, parseReactStringValue(["chemical!einsteinium"]));
+ elementCircle(pixel.x, pixel.y, 40, "einsteinium", 0.1, parseReactStringValue(["chemical!californium"]));
+ elementCircle(pixel.x, pixel.y, 40, "californium", 0.1, parseReactStringValue(["chemical!berkelium"]));
+ elementCircle(pixel.x, pixel.y, 40, "berkelium", 0.1, parseReactStringValue(["chemical!curium"]));
+ elementCircle(pixel.x, pixel.y, 40, "curium", 0.1, parseReactStringValue(["chemical!americium"]));
+ elementCircle(pixel.x, pixel.y, 40, "americium", 0.1, parseReactStringValue(["chemical!plutonium,ignorechemical!stable_plutonium"]));
+ elementCircle(pixel.x, pixel.y, 40, "plutonium", 0.1, parseReactStringValue(["chemical!pure_uranium_238"]));
+ elementCircle(pixel.x, pixel.y, 40, "neptunium", 0.1, parseReactStringValue(["chemical!pure_uranium_235"]));
+ elementCircle(pixel.x, pixel.y, 40, "radium", 0.1, parseReactStringValue(["chemical!thorium"]));
+}
-eListAdd("ACID", "soda");
-eListAddIon("HYDROGEN", "soda", "acid");
-eListAddIon("CARBONATE", "soda", "acid");
-eListAddIon("HYDROGEN", "soda", "bicarbonate");
-eListAddIon("BICARBONATE", "soda", "bicarbonate");
+function neptunium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+}
+function americium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "curium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+}
+function curium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "berkelium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+}
+function berkelium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "californium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron", 0.2);
+}
+function californium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "einsteinium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron", 0.25);
+}
+function einsteinium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "fermium");
+ }
+ elementCircle(p.x, p.y, 3, "neutron");
+}
+function fermium(pixel, p) {
+ if (pixel.temp >= 500) {
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ elementCircle(p.x, p.y, 3, "neutron", 0.2);
+}
-eListAdd("ACID", "pilk");
-eListAddIon("HYDROGEN", "pilk", "acid");
-eListAddIon("CARBONATE", "pilk", "acid");
-eListAddIon("HYDROGEN", "pilk", "bicarbonate");
-eListAddIon("BICARBONATE", "pilk", "bicarbonate");
+elements.molten_salt.conduct = 0.1;
+elements.molten_potassium_salt = {};
+elements.molten_potassium_salt.conduct = 0.1;
+elements.molten_potassium_salt.fireElement = null;
+elements.potassium_salt.hidden = false;
+elements.bleach.stateHigh = ["salt", "steam", "sodium_chlorate"];
-eListAdd("COMPOUND", "copper_sulfate");
-eListAddIon("COPPERII", "copper_sulfate");
-eListAddIon("SULFATE", "copper_sulfate");
+chemjsReactions = [
+ { react1: "chemical!acid_liquids", react2: "ash", elem1: "neutral_acid", elem2: null, priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "limestone", elem1: "neutral_acid", elem2: null, priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "quicklime", elem1: "neutral_acid", elem2: null, priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "slaked_lime", elem1: "neutral_acid", elem2: null, priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "borax", elem1: "neutral_acid", elem2: null, priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "ammonia", elem1: "neutral_acid", elem2: null, priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "bleach", elem1: "neutral_acid", elem2: null, priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "caustic_potash", elem1: "neutral_acid", elem2: null, priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "charcoal", elem1: null, elem2: "carbon_dioxide", priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "grape", elem1: "no_change", elem2: "juice", color1: "#291824", priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "soap", elem1: "hydrogen", elem2: "no_change", priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "sodium", elem1: "explosion", elem2: "no_change", priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "potassium", elem1: "explosion", elem2: "no_change", priority: 50 },
+ { react1: "chemical!acid_liquids", react2: "meat", elem1: "no_change", elem2: "rotten_meat", elem1: null, chance: 0.5, priority: 50 },
+ { react1: "chemical!acids,restrictchemical!caustic", react2: "chemical!liquid_water,ignore!dirty_water,ignore!neutral_acid", elem1: null, elem2: "dirty_water", priority: 10 },
+ { react1: "chemical!nitric_acid,chemical!sulfuric_acid,chemical!hydroiodic_acid,chemical!hydroastatic_acid,chemical!fluoroboric_acid", react2: "chemical!liquid_water,ignore!dirty_water,ignore!neutral_acid", elem1: "no_change", elem2: "dirty_water", priority: 11 },
-eListAddIon("COPPERII", "molten_copper_sulfate");
-eListAddIon("SULFATE", "molten_copper_sulfate");
+ { react1: "chemical!acid_gases", react2: "chemical!acid_gases", elem1: null, elem2: "acid_cloud", props: { chance: 0.3, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "rain_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "snow_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "hail_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "pyrocumulus", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "fire_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
-function listMatching(list) {
+ { react1: "chemical!acid_gases", react2: "ash", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "limestone", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "quicklime", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "slaked_lime", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "borax", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "ammonia", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "bleach", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "caustic_potash", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "radium_hydroxide", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "actinium_hydroxide", elem1: "hydrogen", elem2: null, priority: 50 },
+ { react1: "chemical!acid_gases", react2: "charcoal", elem1: null, elem2: "carbon_dioxide", priority: 50 },
+ { react1: "chemical!acid_gases", react2: "grape", elem1: "no_change", elem2: "juice", color1: "#291824", priority: 50 },
+ { react1: "chemical!acid_gases", react2: "soap", elem1: "hydrogen", elem2: "no_change", priority: 50 },
+ { react1: "chemical!acid_gases", react2: "sodium", elem1: "explosion", elem2: "no_change", priority: 50 },
+ { react1: "chemical!acid_gases", react2: "potassium", elem1: "explosion", elem2: "no_change", priority: 50 },
+ { react1: "chemical!acid_gases", react2: "meat", elem1: "no_change", elem2: "rotten_meat", elem1: null, chance: 0.5, priority: 50 },
+
+ { react1: "chemical!base_solution_liquids", react2: "grape", elem1: "no_change", elem2: "juice", props: { color1: "#291824" }, priority: 50 },
+ { react1: "chemical!base_solution_liquids", react2: "sodium", elem1: "no_change", elem2: "pop", priority: 50 },
+ { react1: "chemical!base_solution_liquids", react2: "meat", elem1: null, elem2: "rotten_meat", props: { chance: 0.5 }, priority: 50 },
+ { react1: "chemical!base_solution_liquids", react2: "grease", elem1: null, elem2: "soap", priority: 50 },
+ { react1: "chemical!base_solution_liquids", react2: "fat", elem1: null, elem2: "soap", priority: 50 },
+
+ { react1: "chemical!base_solution_gases", react2: "chemical!base_solution_gases", elem1: null, elem2: "base_cloud", props: { chance: 0.3, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!base_solution_gases", react2: "rain_cloud", elem1: null, elem2: "base_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!base_solution_gases", react2: "cloud", elem1: null, elem2: "base_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!base_solution_gases", react2: "snow_cloud", elem1: null, elem2: "base_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!base_solution_gases", react2: "hail_cloud", elem1: null, elem2: "base_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!base_solution_gases", react2: "pyrocumulus", elem1: null, elem2: "base_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+ { react1: "chemical!base_solution_gases", react2: "fire_cloud", elem1: null, elem2: "base_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 50 },
+
+ { react1: "chemical!base_solution_gases", react2: "grape", elem1: "no_change", elem2: "juice", props: { color1: "#291824" }, priority: 50 },
+ { react1: "chemical!base_solution_gases", react2: "sodium", elem1: "no_change", elem2: "pop", priority: 50 },
+ { react1: "chemical!base_solution_gases", react2: "meat", elem1: null, elem2: "rotten_meat", props: { chance: 0.4 }, priority: 50 },
+ { react1: "chemical!base_solution_gases,ignorechemical!red_mud", react2: "grease", elem1: null, elem2: "soap", priority: 50 },
+ { react1: "chemical!base_solution_gases,ignorechemical!red_mud", react2: "fat", elem1: null, elem2: "soap", priority: 50 },
+
+ { react1: "chemical!red_mud", react2: "chemical!liquid_water,ignore!dirty_water,ignore!bauxite_slurry", elem1: "no_change", elem2: "dirty_water", priority: 10 },
+
+ { react1: "acid_cloud", react2: "chemical!base", elem1: "rain_cloud", elem2: null, props: { elem2: null, chance: 0.05 }, priority: 50 },
+ { react1: "base_cloud", react2: "chemical!acid", elem1: "rain_cloud", elem2: null, props: { elem2: null, chance: 0.05 }, priority: 50 },
+
+ { react1: "chemical!sulfuric_acid", react2: "grape", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, deleteReactions: { aa: true }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "juice", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "corn", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "popcorn", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "potato", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "bread", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "toast", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "wheat", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "flour", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "dough", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "sugar", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "candy", elem1: "charcoal", elem2: "steam", props: { temp2: 200 }, priority: 100 },
+
+ { react1: "chemical!solid_salt", react2: "water", elem1: null, elem2: "react1!salt_water", priority: 10 },
+ { react1: "chemical!solid_salt", react2: "ice", elem1: null, elem2: "react1!salt_water", props: { chance: 0.1 }, priority: 10 },
+ { react1: "chemical!solid_salt", react2: "rime", elem1: null, elem2: "react1!salt_water", props: { chance: 0.075 }, priority: 10 },
+ { react1: "chemical!solid_salt", react2: "snow", elem1: null, elem2: "react1!salt_water", props: { chance: 0.25 }, priority: 10 },
+ { react1: "chemical!solid_salt", react2: "packed_snow", elem1: null, elem2: "react1!salt_water", props: { chance: 0.05 }, priority: 10 },
+ { react1: "chemical!solid_salt", react2: "packed_ice", elem1: null, elem2: "react1!salt_water", props: { chance: 0.01 }, priority: 10 },
+
+ { react1: "chemical!liquid_salt_water", react2: "dirt", elem1: null, elem2: "mud", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "sand", elem1: null, elem2: "wet_sand", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "clay_soil", elem1: null, elem2: "clay", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "dust", elem1: "dirty_water", elem2: null, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "ash", elem1: "dirty_water", elem2: null, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "carbon_dioxide", elem1: "dirty_water", elem2: null, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "sulfur", elem1: "dirty_water", elem2: null, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "charcoal", elem1: "dirty_water", elem2: "no_change", props: { chance: 0.005 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "plague", elem1: "dirty_water", elem2: null, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "fallout", elem1: "dirty_water", elem2: "no_change", props: { chance: 0.25 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "radiation", elem1: "dirty_water", elem2: "no_change", props: { chance: 0.25 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "rust", elem1: "dirty_water", elem2: "no_change", props: { chance: 0.005 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "quicklime", elem1: null, elem2: "slaked_lime", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "rock", elem1: "no_change", elem2: "wet_sand", props: { chance: 0.0005 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "fly", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1, oneway: true }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "firefly", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1, oneway: true }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "bee", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.05, oneway: true }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "stink_bug", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1, oneway: true }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "cancer", elem1: "dirty_water", elem2: "no_change", props: { chance: 0.25 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "aluminum", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.0025 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "zinc", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.015 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "steel", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.0125 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "iron", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.0125 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "tin", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.01 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "lead", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.01 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "brass", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.001 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "bronze", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.001 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "copper", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "silver", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "gold", elem1: ["hydrogen", "hydrogen", "oxygen", "react1!salt"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "fire", elem1: "no_change", elem2: "smoke", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "snow", elem1: "no_change", elem2: "slush", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "rat", elem1: "dirty_water", elem2: "no_change", props: { chance: 0.2 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "slug", elem1: null, elem2: "slime", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "snail", elem1: null, elem2: "calcium", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "torch", elem1: "no_change", elem2: "wood", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "sawdust", elem1: null, elem2: "cellulose", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "oxygen", elem1: "no_change", elem2: "foam", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "paper", elem1: null, elem2: "cellulose", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "pollen", elem1: "no_change", elem2: null, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "soda", elem1: "foam", elem2: "no_change", elem1: "foam", props: { chance: 0.01 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "ice_nine", elem1: "ice_nine", elem2: "no_change", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "ant_wall", elem1: null, elem2: ["mud", "mud", "wet_sand"], props: { chance: 0.007 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "soap", elem1: "water", elem2: "no_change", priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "dye", elem1: "no_change", elem2: null, props: { chance: 0.05 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "ink", elem1: "no_change", elem2: null, props: { chance: 0.01 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "sodium", elem1: "no_change", elem2: ["pop", "pop", "pop", "hydrogen"], props: { chance: 0.01, temp1: 250 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "molten_sodium", elem1: "no_change", elem2: ["pop", "pop", "pop", "hydrogen"], props: { chance: 0.01, temp1: 250 }, priority: 10 },
+ { react1: "chemical!liquid_salt_water", react2: "confetti", elem1: "no_change", elem2: [null, "cellulose"], props: { chance: 0.001 }, priority: 10 },
+ {
+ react1: "chemical!liquid_salt_water",
+ react2: "greek_fire",
+ elem1: "no_change",
+ elem2: "no_change",
+ props: {
+ func: function (p, pixel) {
+ if (!pixel.burning) {
+ pixel.burning = true;
+ pixel.burnStart = pixelTick;
+ }
+ },
+ },
+ priority: 10,
+ },
+ { react1: "radiation", react2: "chemical!liquid_salt_water", elem1: "rad_steam", elem2: "no_change", props: { chance: 0.4 }, priority: 10 },
+ { react1: "iron", react2: "chemical!liquid_salt_water", elem1: "rust", elem2: "no_change", props: { chance: 0.005 }, priority: 10 },
+ { react1: "copper", react2: "chemical!liquid_salt_water", elem1: "oxidized_copper", elem2: "no_change", props: { chance: 0.005 }, priority: 10 },
+ { react1: "steel", react2: "chemical!liquid_salt_water", elem1: "rust", elem2: "no_change", props: { chance: 0.004 }, priority: 10 },
+ { react1: "bronze", react2: "chemical!liquid_salt_water", elem1: "oxidized_copper", elem2: "no_change", props: { chance: 0.0025 }, priority: 10 },
+
+ { react1: "chemical!liquid_salt_water", react2: "chemical!liquid_salt_water", elem1: "chemical!solid_insoluble,react1restrict!anion,react2restrict!cation,one!", elem2: "chemical!liquid_salt_water,react2restrict!anion,react1restrict!cation,one!", priority: 10 },
+ { react1: "chemical!acids,chemical!amphoteric,restrictchemical!hydrogen_ion", react2: "chemical!bases,restrictchemical!hydroxide", elem1: "chemical!liquid_salt_water,chemical!solid_insoluble,react1restrict!anionAcid,react2restrict!cationBase,one!", elem2: null, deleteReactions: { aa: true }, priority: 20 },
+ { react1: "chemical!acids,restrictchemical!hydrogen_ion", react2: "chemical!bases,chemical!amphoteric,restrictchemical!hydroxide", elem1: "chemical!liquid_salt_water,chemical!solid_insoluble,react1restrict!anionAcid,react2restrict!cationBase,one!", elem2: null, deleteReactions: { aa: true }, priority: 20 },
+ { react1: "chemical!hydrochloric_acid,chemical!sulfuric_acid", react2: "chemical!bases,chemical!amphoteric,restrictchemical!hydroxide", elem1: "chemical!liquid_salt_water,chemical!solid_insoluble,react1restrict!anionAcid,react2restrict!cationBase,one!", elem2: null, deleteReactions: { aa: true }, props: { temp1: 50, temp2: 50 }, priority: 21 },
+ { react1: "chemical!hydrogen_fluoride", react2: "chemical!bases,chemical!amphoteric,restrictchemical!hydroxide", elem1: "chemical!liquid_salt_water,chemical!solid_insoluble,react1restrict!anionAcid,react2restrict!cationBase,one!", elem2: "fire", deleteReactions: { aa: true }, priority: 21 },
+ { react1: "chemical!acids,chemical!amphoteric,restrictchemical!hydrogen_ion", react2: "chemical!bases,restrictchemical!hydride", elem1: "chemical!liquid_salt_water,chemical!solid_insoluble,react1restrict!anionAcid,react2restrict!cationBase,one!", elem2: "hydrogen", deleteReactions: { aa: true }, priority: 20 },
+ { react1: "chemical!acids,chemical!amphoteric,restrictchemical!hydrogen_ion", react2: "chemical!bases,restrictchemical!methoxide", elem1: "chemical!liquid_salt_water,chemical!solid_insoluble,react1restrict!anionAcid,react2restrict!cationBase,one!", elem2: "methanol", deleteReactions: { aa: true }, priority: 20 },
+
+ { react1: "chemical!acid_liquids", react2: "chemical!bases", elem1: "neutral_acid", elem2: null, priority: 10 },
+ { react1: "chemical!acid_gases", react2: "chemical!bases", elem1: "hydrogen", elem2: null, priority: 10 },
+
+ { react1: "chemical!fertilizer", react2: "plant", elem1: "plant", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "wheat_seed", elem1: "wheat", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "grass", elem1: "grass", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "grass_seed", elem1: "grass", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "bamboo_plant", elem1: "bamboo", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "flower_seed", elem1: "flower_seed", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "petal", elem1: "flower_seed", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "vine", elem1: "vine", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "sapling", elem1: "tree_branch", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "tree_branch", elem1: "tree_branch", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "corn_seed", elem1: "corn", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "root", elem1: "root", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "dirt", elem1: "grass", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "mud", elem1: "grass", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "potato_seed", elem1: "potato", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+ { react1: "chemical!fertilizer", react2: "yeast", elem1: "yeast", elem2: "no_change", props: { chance: 0.05 }, priority: 15 },
+
+ { react1: "chemical!radioactive", react2: "quark_matter", elem1: "react1!stable", elem2: "no_change", priority: 50 },
+ { react1: "fallout", react2: "quark_matter", elem1: null, elem2: "no_change", priority: 100 },
+ { react1: "transactinide_fallout", react2: "quark_matter", elem1: null, elem2: "no_change", priority: 100 },
+
+ //He
+
+ { react1: "alpha_particle", react2: "electric", elem1: "helium", elem2: null, priority: 100 },
+
+ //B
+
+ { react1: "chemical!diborane", react2: "chemical!oxygen", elem1: "boron_trioxide", elem2: "fire", priority: 100 },
+ { react1: "chemical!decaborane", react2: "chemical!oxygen", elem1: "boron_trioxide", elem2: "fire", priority: 100 },
+ { react1: "chemical!pentaborane_9", react2: "chemical!oxygen", elem1: "boron_trioxide", elem2: "explosion", priority: 100 },
+ { react1: "chemical!diborane", react2: "chemical!liquid_water", elem1: "boric_acid", elem2: "hydrogen", props: { temp1: 100, temp2: 100 }, priority: 10 },
+ { react1: "chemical!decaborane", react2: "chemical!liquid_water", elem1: "boric_acid", elem2: "hydrogen", props: { temp1: 100, temp2: 100 }, priority: 10 },
+ { react1: "chemical!pentaborane_9", react2: "chemical!liquid_water", elem1: "boric_acid", elem2: "hydrogen", props: { temp1: 100, temp2: 100 }, priority: 10 },
+
+ { react1: "chemical!boric_acid", react2: "chemical!methanol", elem1: "trimethyl_borate", elem2: "steam", props: { tempMin: 100 }, priority: 100 },
+
+ { react1: "chemical!boron_trioxide", react2: "chemical!hydrofluoric_acid", elem1: "boron_trifloride", elem2: "fire", priority: 100 },
+ { react1: "chemical!boron", react2: "chemical!fluorine", elem1: "boron_trifloride", elem2: "fire", priority: 100 },
+ { react1: "chemical!boron_trifluoride", react2: "chemical!liquid_water,ignorechemical!tetrafluoroborate", elem1: "fluoroboric_acid", elem2: "boric_acid", priority: 10 },
+
+ { react1: "chemical!fluoroboric_acid", react2: "chemical!sodium_carbonate", elem1: "fluoroboric_acid", elem2: ["carbon_dioxide,steam"], props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ { react1: "chemical!hydrochloric_acid", react2: "chemical!sodium_borate", elem1: "boric_acid", elem2: "salt", props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ { react1: "chemical!boron_trioxide", react2: "chemical!chlorine", elem1: "boron_trichloride", elem2: null, props: { tempMin: 500 }, priority: 100 },
+ { react1: "chemical!boron", react2: "chemical!chlorine", elem1: "boron_trichloride", elem2: null, props: { temp1: 50, temp2: 50 }, priority: 100 },
+ { react1: "chemical!boron_trichloride", react2: "chemical!liquid_water", elem1: "acid", elem2: "boric_acid", priority: 10 },
+
+ { react1: "chemical!sodium_hydride", react2: "chemical!boron_trifluoride", elem1: "diborane", elem2: "sodium_tetrafluoroborate", props: { temp1: 20, temp2: 20 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "chemical!sodium_borohydride", elem1: "diborane", elem2: "hydrogen", props: { temp1: 50, temp2: 50 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "chemical!sodium_borate", elem1: "boron_trioxide", elem2: "sodium_sulfate", props: { temp1: 200, temp2: 200 }, priority: 100 },
+ { react1: "chemical!sodium_borohydride", react2: "chemical!boron_trifluoride", elem1: "sodium_octahydrotriborate", elem2: ["sodium_fluoride", "hydrogen"], props: { temp1: 20, temp2: 20 }, priority: 100 },
+ { react1: "chemical!hydrobromic_acid", react2: "chemical!sodium_octahydrotriborate", elem1: "sodium_bromoheptahydrotriborate", elem2: "hydrogen", props: { temp1: 20, temp2: 20 }, priority: 100 },
+
+ //C
+ { react1: "methanol", react2: "plant", elem1: null, elem2: "dead_plant", props: { chance: 0.05 }, priority: 100 },
+ { react1: "methanol", react2: "cell", elem1: "no_change", elem2: [null, "dna"], props: { chance: 0.075 }, priority: 100 },
+ { react1: "methanol", react2: "blood", elem1: "no_change", elem2: [null, "dna"], props: { chance: 0.075 }, priority: 100 },
+ { react1: "methanol", react2: "antibody", elem1: "no_change", elem2: [null, "dna"], props: { chance: 0.075 }, priority: 100 },
+ { react1: "methanol", react2: "infection", elem1: "no_change", elem2: [null, "dna"], props: { chance: 0.075 }, priority: 100 },
+ { react1: "methanol", react2: "cancer", elem1: "no_change", elem2: [null, "dna"], props: { chance: 0.0375 }, priority: 100 },
+ { react1: "methanol", react2: "flea", elem1: "no_change", elem2: "dead_bug", priority: 100 },
+ { react1: "methanol", react2: "termite", elem1: "no_change", elem2: "dead_bug", priority: 100 },
+ { react1: "methanol", react2: "ant", elem1: "no_change", elem2: "dead_bug", priority: 100 },
+ { react1: "methanol", react2: "frog", elem1: "no_change", elem2: "meat", props: { chance: 0.05 }, priority: 100 },
+ { react1: "methanol", react2: "evergreen", elem1: "no_change", elem2: "dead_plant", props: { chance: 0.05 }, priority: 100 },
+ { react1: "methanol", react2: "cactus", elem1: "no_change", elem2: "dead_plant", props: { chance: 0.05 }, priority: 100 },
+ { react1: "methanol", react2: "paper", elem1: "no_change", elem2: "cellulose", priority: 100 },
+ { react1: "methanol", react2: "primordial_soup", elem1: "no_change", elem2: "water", priority: 100 },
+
+ { react1: "chemical!carbon_dioxide", react2: "chemical!hydrogen", elem1: "steam", elem2: "methanol", props: { chance: 0.1, tempMin: 300 }, priority: 100 },
+
+ { react1: "chemical!ethane", react2: "chemical!pure_water", elem1: "hydrogen", elem2: "ethylene", props: { chance: 0.01, tempMin: 300 }, priority: 100 },
+
+ { react1: "chemical!titanium_trichloride", react2: "chemical!ethylene", elem1: "no_change", elem2: "polyethylene", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!diethylaluminium_chloride", react2: "chemical!ethylene", elem1: "no_change", elem2: "polyethylene", props: { chance: 0.1 }, priority: 100 },
+
+ //N
+ { react1: "chemical!nitric_oxide", react2: "steam", elem1: "smog", elem2: null, props: { chance: 0.01 }, priority: 100 },
+ { react1: "chemical!nitric_oxide", react2: "oxygen", elem1: "nitrogen_dioxide", elem2: null, priority: 100 },
+
+ { react1: "chemical!nitrogen_dioxide", react2: "steam", elem1: "smog", elem2: null, props: { chance: 0.01 }, priority: 100 },
+ { react1: "chemical!nitrogen_dioxide", react2: "chemical!liquid_water,ignorechemical!nitrate", elem1: "nitric_oxide", elem2: "nitric_acid", priority: 10 },
+ { react1: "chemical!sulfuric_acid", react2: "chemical!potassium_nitrate", elem1: "potassium_sulfate", elem2: "nitric_acid", props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ { react1: "chemical!ammonia", react2: "oxygen", elem1: "nitric_oxide", elem2: "steam", props: { chance: 0.01 }, priority: 100 },
+ { react1: "chemical!nitric_acid", react2: "chemical!ammonia", elem1: "ammonium_nitrate", elem2: null, priority: 100 },
+
+ { react1: "chemical!ammonia", react2: "acid", elem1: "ammonium_chloride", elem2: null, priority: 100 },
+
+ { react1: "chemical!nitrogen_dioxide", react2: "rain_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!nitrogen_dioxide", react2: "cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!nitrogen_dioxide", react2: "snow_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!nitrogen_dioxide", react2: "hail_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!nitrogen_dioxide", react2: "pyrocumulus", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!nitrogen_dioxide", react2: "fire_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!nitrogen_dioxide", react2: "thunder_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+
+ //F
+ { react1: "chemical!fluorine", react2: "steam", elem1: "hydrofluoric_acid_gas", elem2: "oxygen", priority: 100 },
+ { react1: "chemical!fluorine", react2: "chemical!liquid_water,ignore!potassium_fluoride_solution", elem1: "hydrofluoric_acid_gas", elem2: "oxygen", priority: 10 },
+ { react1: "chemical!fluorine", react2: "chemical!hydrogen", elem1: "hydrogen_fluoride", elem2: "fire", priority: 100 },
+
+ { react1: "chemical!hydrogen_fluoride,ignorechemical!hydrofluoric_acid", react2: "steam", elem1: "hydrofluoric_acid_gas", elem2: null, priority: 100 },
+ { react1: "chemical!hydrogen_fluoride,ignorechemical!hydrofluoric_acid", react2: "chemical!liquid_water,ignore!potassium_fluoride_solution", elem1: "hydrofluoric_acid", elem2: null, priority: 100 },
+ { react1: "chemical!hydrofluoric_acid", react2: "chemical!liquid_water,ignore!dirty_water,ignore!potassium_fluoride_solution", elem1: "no_change", elem2: "dirty_water", priority: 10 },
+
+ { react1: "chemical!potassium_fluoride_solution", react2: "chemical!hydrogen_fluoride", elem1: ["fluorine", "hydrogen"], elem2: "potassium_fluoride_solution", props: { charged: true, chance: 0.02 }, priority: 100 },
+
+ { react1: "fluorine", react2: "liquid_oxygen", elem1: "foof", elem2: null, priority: 100 },
+
+ { react1: "chemical!chloroform", react2: "chemical!hydrogen_fluoride", elem1: "tetrafluoroethylene", elem2: "acid", props: { temp2: 50 }, priority: 100 },
+ { react1: "chemical!tetrafluoroethylene", react2: "chemical!oxygen", elem1: "fire", elem2: "fire", priority: 100 },
+ { react1: "chemical!tetrafluoroethylene", react2: "chemical!sulfuric_acid", elem1: "polytetrafluoroethylene", elem2: "no_change", priority: 100 },
+
+ { react1: "chemical!calcium_fluoride", react2: "chemical!sulfuric_acid", elem1: "hydrogen_fluoride", elem2: "chalk", priority: 100 },
+
+ //Na
+ { react1: "molten_salt", react2: "aluminum", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0025 }, priority: 100 },
+ { react1: "molten_salt", react2: "zinc", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.015 }, priority: 100 },
+ { react1: "molten_salt", react2: "steel", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0125 }, priority: 100 },
+ { react1: "molten_salt", react2: "iron", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0125 }, priority: 100 },
+ { react1: "molten_salt", react2: "tin", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.01 }, priority: 100 },
+ { react1: "molten_salt", react2: "lead", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.01 }, priority: 100 },
+ { react1: "molten_salt", react2: "brass", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.001 }, priority: 100 },
+ { react1: "molten_salt", react2: "bronze", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.001 }, priority: 100 },
+ { react1: "molten_salt", react2: "copper", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 100 },
+ { react1: "molten_salt", react2: "silver", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 100 },
+ { react1: "molten_salt", react2: "gold", elem1: ["sodium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 100 },
+
+ { react1: "chemical!sodium", react2: "chemical!hydrogen", elem1: "sodium_hydride", elem2: null, props: { tempMin: 250 }, priority: 100 },
+ { react1: "chemical!sodium_hydride", react2: "chemical!liquid_water", elem1: ["pop", "pop", "hydrogen", "hydrogen"], elem2: "no_change", props: { chance: 0.1, temp2: 250 }, priority: 10 },
+
+ { react1: "chemical!sodium_hydroxide_solution", react2: "chemical!sodium_bicarbonate", elem1: null, elem2: "sodium_carbonate_solution", priority: 100 },
+ { react1: "chemical!sodium_hydroxide", react2: "chemical!sodium_bicarbonate_solution", elem1: null, elem2: "sodium_carbonate_solution", priority: 100 },
+ { react1: "chemical!sodium_hydroxide", react2: "chemical!sodium_bicarbonate", elem1: null, elem2: "sodium_carbonate", priority: 99 },
+
+ { react1: "chemical!sodium", react2: "chemical!methanol", elem1: "sodium_methoxide", elem2: "hydrogen", props: { temp1: 200, temp2: 200 }, priority: 100 },
+ { react1: "chemical!sodium_methoxide", react2: "chemical!liquid_water", elem1: "methanol", elem2: "sodium_hydroxide", props: { temp1: 50, temp2: 50 }, priority: 10 },
+
+ { react1: "chemical!sodium_hydroxide,ignorechemical!sodium_hydroxide_solution", react2: "chemical!liquid_water,ignorechemical!sodium_aluminate_solution", elem1: "sodium_hydroxide", elem2: null, priority: 10 },
+
+ { react1: "chemical!sodium_hydroxide_solution", react2: "chemical!bauxite", elem1: "bauxite_slurry", elem2: "red_mud", priority: 100 },
+
+ { react1: "chemical!sodium_chloride_solution", react2: "chemical!mercury", elem1: ["sodium_hydroxide", "chlorine", "hydrogen"], elem2: "no_change", props: { charged: true, chance: 0.1 }, priority: 100 },
+ { react1: "chemical!sodium_hydride", react2: "chemical!chlorine", elem1: "salt", elem2: "acid_gas", priority: 100 },
+
+ //Mg
+ { react1: "chemical!sulfuric_acid", react2: "chemical!magnesium_oxide", elem1: null, elem2: "epsom_salt", props: { temp2: 50 }, priority: 100 },
+ { react1: "chemical!magnesium_oxide", react2: "chemical!calcium_oxide", elem1: "cement", elem2: null, priority: 100 },
+ { react1: "chemical!magnesium_fluoride", react2: "chemical!sulfuric_acid", elem1: "hydrogen_fluoride", elem2: "epsom_salt", priority: 100 },
+
+ //Al
+ { react1: "chemical!chloroethane", react2: "chemical!aluminum", elem1: "diethylaluminium_chloride", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!sodium_aluminate_solution", react2: "chemical!carbon_dioxide", elem1: "aluminum_hydroxide", elem2: "sodium_carbonate_solution", priority: 100 },
+ { react1: "chemical!aluminum_oxide", react2: "chemical!cryolite_mixture", elem1: "molten_cryolite_solution", elem2: "molten_cryolite_solution", props: { tempMin: 950 }, priority: 100 },
+ { react1: "chemical!cryolite_solution", react2: "chemical!carbon", elem1: "molten_aluminum", elem2: "carbon_dioxide", props: { tempMin: 950 }, priority: 100 },
+
+ { react1: "chemical!hydrogen_fluoride", react2: "chemical!sodium_aluminate", elem1: "cryolite", elem2: "fire", priority: 100 },
+ { react1: "chemical!hydrogen_fluoride", react2: "chemical!aluminum_oxide", elem1: "aluminum_fluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!hydrogen_fluoride", react2: "chemical!aluminum_hydroxide", elem1: "aluminum_fluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!sodium_hexafluoroaluminate", react2: "chemical!aluminum_fluoride", elem1: "molten_cryolite_mixture", elem2: "molten_cryolite_mixture", props: { tempMin: 950 }, priority: 100 },
+
+ { react1: "chemical!hexafluorosilicic_acid", react2: "chemical!sodium_aluminate", elem1: "cryolite", elem2: "sand", priority: 100 },
+
+ //Si
+ { react1: "chemical!hydrogen_fluoride", react2: "chemical!silicon_dioxide", elem1: "hexafluorosilicic_acid", elem2: "fire", props: { chance: 0.05 }, priority: 100 },
+
+ //P
+ { react1: "chemical!white_phosphorus", react2: "head", elem1: "no_change", elem2: null, props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!white_phosphorus", react2: "light", elem1: "red_phosphorus", elem2: "no_change", priority: 100 },
+ { react1: "chemical!white_phosphorus", react2: "liquid_light", elem1: "red_phosphorus", elem2: "no_change", priority: 100 },
+
+ { react1: "chemical!phosphorus_pentoxide", react2: "mud", elem1: "no_change", elem2: "dirt", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "wet_sand", elem1: "no_change", elem2: "sand", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "ant", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "worm", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "fly", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "firefly", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "bee", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "stink_bug", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "termite", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "flea", elem1: "no_change", elem2: "dead_bug", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "slug", elem1: "no_change", elem2: "slime", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "frog", elem1: "no_change", elem2: "slime", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "tadpole", elem1: "no_change", elem2: "slime", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "fish", elem1: "no_change", elem2: "meat", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "snail", elem1: "no_change", elem2: "limestone", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "slime", elem1: "no_change", elem2: "dust", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "meat", elem1: "no_change", elem2: "dust", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "rotten_meat", elem1: "no_change", elem2: "dust", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "cooked_meat", elem1: "no_change", elem2: "dust", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "blood", elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: ["salt", "oxygen"], priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "algae", elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: "salt", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "kelp", elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: "salt", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "mushroom_spore", elem1: "no_change", elem2: "dust", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "lichen", elem1: "no_change", elem2: "dust", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "yeast", elem1: "no_change", elem2: "dust", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "cell", elem1: "no_change", elem2: "dust", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "cancer", elem1: "no_change", elem2: "dust", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "udder", elem1: "no_change", elem2: "meat", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "bone_marrow", elem1: "no_change", elem2: "bone", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "jelly", elem1: "no_change", elem2: "dust", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "yolk", elem1: "no_change", elem2: "dust", priority: 100 },
+ { react1: "chemical!phosphorus_pentoxide", react2: "chemical!liquid_water", elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: null, priority: 100 },
+
+ { react1: "chemical!phosphoric_acid", react2: "chemical!soda", elem1: ["soda", null], elem2: "soda", priority: 100 },
+ { react1: "chemical!phosphoric_acid", react2: "chemical!calcium_hydroxide", elem1: "neutral_acid", elem2: "tricalcium_phosphate", priority: 100 },
+
+ { react1: "chemical!apatite", react2: "chemical!carbon", elem1: "white_phosphorus_gas", elem2: ["carbon_dioxide", "molten_slag"], props: { tempMin: 1670 }, priority: 100 },
+ { react1: "chemical!tricalcium_phosphate", react2: "chemical!carbon", elem1: "white_phosphorus_gas", elem2: ["carbon_dioxide", "molten_slag"], props: { tempMin: 1670 }, priority: 100 },
+
+ { react1: "chemical!apatite", react2: "chemical!sulfuric_acid", elem1: "phosphoric_acid", elem2: ["chalk", "chalk", "chalk", "chalk", "hydrogen_fluoride"], priority: 100 },
+ { react1: "chemical!tricalcium_phosphate", react2: "chemical!sulfuric_acid", elem1: "phosphoric_acid", elem2: "chalk", priority: 100 },
+ { react1: "bone", react2: "chemical!sulfuric_acid", elem1: "phosphoric_acid", elem2: "chalk", priority: 100 },
+
+ //S
+ { react1: "chemical!sulfur", react2: "chemical!hydrogen", elem1: "hydrogen_sulfide", elem2: null, priority: 100 },
+ { react1: "chemical!hydrogen_sulfide", react2: "oxygen", elem1: null, elem2: "stench", priority: 100 },
+ { react1: "chemical!hydrogen_sulfide", react2: "nitrogen", elem1: null, elem2: "stench", priority: 100 },
+ { react1: "chemical!hydrogen_sulfide", react2: "nitrogen", elem1: null, elem2: "stench", priority: 100 },
+ { react1: "chemical!hydrogen_sulfide", react2: "chemical!liquid_water,ignore!dirty_water,ignore!iron_dichloride_solution", elem1: null, elem2: "dirty_water", priority: 10 },
+ { react1: "chemical!hydrogen_sulfide", react2: "chemical!sodium_bicarbonate", elem1: null, elem2: "no_change", priority: 100 },
+
+ { react1: "chemical!sulfur_dioxide", react2: "steam", elem1: null, elem2: ["sulfuric_acid_gas", null, null, null, null], priority: 100 },
+ { react1: "chemical!sulfur_dioxide", react2: "chemical!liquid_water,ignore_chemical!sulfate", elem1: null, elem2: ["sulfuric_acid_gas", "dirty_water", "dirty_water", "dirty_water", "dirty_water"], priority: 10 },
+ { react1: "chemical!sulfur_dioxide", react2: "chemical!acid_gases", elem1: null, elem2: ["sulfuric_acid_gas", null, null, null, null], priority: 50 },
+
+ { react1: "chemical!sulfur_dioxide", react2: "rain_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!sulfur_dioxide", react2: "cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!sulfur_dioxide", react2: "snow_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!sulfur_dioxide", react2: "hail_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!sulfur_dioxide", react2: "pyrocumulus", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!sulfur_dioxide", react2: "fire_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+ { react1: "chemical!sulfur_dioxide", react2: "thunder_cloud", elem1: null, elem2: "acid_cloud", props: { chance: 0.4, y: [0, 12], setting: "clouds" }, priority: 100 },
+
+ { react1: "chemical!sulfur", react2: "chemical!fluorine", elem1: "sulfur_hexafluoride", elem2: "fire", priority: 100 },
+
+ //Cl
+ { react1: "chemical!chlorine", react2: "chemical!methane", elem1: "chloroform", elem2: ["acid", null, null], priority: 100 },
+
+ { react1: "chemical!sulfuric_acid", react2: "chemical!sodium_chloride", elem1: "sodium_sulfate", elem2: "acid", props: { temp1: 50, temp2: 50 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "chemical!potassium_chloride", elem1: "potassium_sulfate", elem2: "acid", props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ { react1: "chemical!ethylene", react2: "chemical!hydrochloric_acid", elem1: "chloroethane", elem2: null, props: { tempMin: 200 }, priority: 100 },
+
+ { react1: "chemical!sodium_hypochlorite", react2: "chemical!acetic_acid", elem1: "chlorine", elem2: "sodium_acetate_solution", priority: 100 },
+ { react1: "chemical!sodium_hypochlorite", react2: "chemical!ethanol", elem1: "chlorine", elem2: null, priority: 100 },
+
+ { react1: "chemical!sodium_chlorate", react2: "plant", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "evergreen", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "cactus", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "vine", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "algae", elem1: null, elem2: null, priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "kelp", elem1: null, elem2: "dirty_water", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "mushroom_spore", elem1: null, elem2: null, priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "lichen", elem1: null, elem2: null, priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "yeast", elem1: null, elem2: null, priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "sapling", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "root", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "flower_seed", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "pistil", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "petal", elem1: null, elem2: "dead_plant", priority: 100 },
+ { react1: "chemical!sodium_chlorate", react2: "grass_seed", elem1: null, elem2: "dead_plant", priority: 100 },
+
+ { react1: "chemical!sodium_chlorate_solution", react2: "gold", elem1: "sodium_perchlorate_solution", elem2: "no_change", props: { charged: true, chance: 0.05 }, priority: 100 },
+
+ { react1: "chemical!sodium_perchlorate", react2: "chemical!hydrochloric_acid", elem1: "perchloric_acid", elem2: "salt", priority: 100 },
+
+ { react1: "chemical!perchloric_acid", react2: "chemical!ammonia", elem1: "ammonium_perchlorate", elem2: null, props: { temp1: 100 }, priority: 100 },
+
+ //K
+ { react1: "chemical!potassium", react2: "chemical!liquid_water", elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], props: { chance: 0.01, temp2: 400 }, priority: 10 },
+
+ { react1: "molten_potassium_salt", react2: "aluminum", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0025 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "zinc", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.015 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "steel", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0125 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "iron", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0125 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "tin", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.01 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "lead", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.01 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "brass", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.001 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "bronze", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.001 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "copper", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "silver", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 100 },
+ { react1: "molten_potassium_salt", react2: "gold", elem1: ["potassium", "chlorine"], elem2: "no_change", props: { charged: true, chance: 0.0075 }, priority: 100 },
+
+ { react1: "chemical!potassium_hydroxide,ignorechemical!potassium_hydroxide_solution", react2: "chemical!liquid_water", elem1: "potassium_hydroxide", elem2: null, priority: 10 },
+
+ { react1: "chemical!potassium_hydroxide", react2: "chemical!carbon_dioxide", elem1: "potassium_carbonate", elem2: null, priority: 99 },
+ { react1: "chemical!potassium_hydroxide_solution", react2: "chemical!carbon_dioxide", elem1: "potassium_carbonate_solution", elem2: null, priority: 100 },
+
+ { react1: "chemical!potassium_hydroxide", react2: "chemical!ammonium_nitrate", elem1: "niter", elem2: "ammonia", priority: 99 },
+ { react1: "chemical!potassium_hydroxide", react2: "chemical!ammonium_nitrate_solution", elem1: "niter_solution", elem2: "ammonia", priority: 100 },
+
+ { react1: "chemical!potassium_nitrate", react2: "chemical!sulfur", elem1: "gunpowder", elem2: null, priority: 99 },
+ { react1: "chemical!potassium_nitrate_solution", react2: "chemical!sulfur", elem1: "gunpowder", elem2: "water", priority: 100 },
+
+ { react1: "chemical!hydrogen_fluoride", react2: "chemical!potassium_carbonate", elem1: "potassium_fluoride_solution", elem2: "carbon_dioxide", props: { temp1: 100, temp2: 100 }, priority: 100 },
+
+ { react1: "chemical!potassium_chloride_solution", react2: "chemical!mercury", elem1: ["potassium_hydroxide", "chlorine", "hydrogen"], elem2: "no_change", props: { charged: true, chance: 0.1 }, priority: 100 },
+
+ //Ti
+ { react1: "chemical!magnesium", react2: "chemical!titanium_tetrachloride", elem1: "titanium", elem2: "magnesium_chloride", props: { tempMin: 650 }, priority: 100 },
+
+ { react1: "chemical!titanium", react2: "chemical!hydrochloric_acid", elem1: "titanium_trichloride_solution", elem2: "hydrogen", props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ { react1: "chemical!titanium_dioxide", react2: "chemical!chlorine", elem1: "titanium_tetrachloride", elem2: null, props: { tempMin: 825 }, priority: 100 },
+
+ //Fe
+ { react1: "chemical!hydrochloric_acid", react2: "pyrite", elem1: "iron_dichloride_solution", elem2: "hydrogen_sulfide", deleteReactions: { aa: true }, props: { temp1: 50 }, priority: 100 }, //TODO: Pyrite
+
+ //Br
+
+ { react1: "water", react2: "chemical!bromine", elem1: "pool_water", elem2: null, priority: 100 },
+ { react1: "chemical!potassium", react2: "chemical!bromine", elem1: "potassium_bromide", elem2: "fire", priority: 100 },
+ { react1: "chemical!sodium", react2: "chemical!bromine", elem1: "sodium_bromide", elem2: "fire", priority: 100 },
+
+ { react1: "chemical!sulfuric_acid", react2: "chemical!potassium_bromide", elem1: "potassium_sulfate", elem2: "hydrobromic_acid", props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ //Ag
+
+ { react1: "chemical!nitric_acid", react2: "chemical!silver", elem1: "nitrogen_dioxide", elem2: "silver_nitrate_solution", props: { temp1: 50, temp2: 50 }, deleteReactions: { ab: true }, priority: 100 },
+
+ //In
+
+ { react1: "chemical!nitric_acid", react2: "chemical!indium", elem1: "nitric_oxide", elem2: "indium_nitrate_solution", props: { temp1: 50, temp2: 50 }, deleteReactions: { ab: true }, priority: 100 },
+ { react1: "chemical!chlorine", react2: "chemical!indium", elem1: null, elem2: "indium_chloride", props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ { react1: "chemical!indium_iii,restrictchemical!water", react2: "chemical!bases,restrictchemical!hydroxide", elem1: "chemical!liquid_salt_water,react1restrict!anion,react2restrict!cationBase,one!", elem2: "indium_hydroxide", priority: 20 },
+ { react1: "chemical!indium_iii", react2: "chemical!bases,restrictchemical!hydroxide,restrictchemical!base_solution", elem1: "chemical!liquid_salt_water,react1restrict!anion,react2restrict!cationBase,one!", elem2: "indium_hydroxide", priority: 20 },
+ { react1: "chemical!indium_iii", react2: "chemical!bases,restrictchemical!hydroxide", elem1: "chemical!solid_salt,react1restrict!anion,react2restrict!cationBase,one!", elem2: "indium_hydroxide", priority: 20 },
+
+ //I
+ { react1: "water", react2: "chemical!iodine", elem1: "disinfectant", elem2: null, priority: 100 },
+ { react1: "dirty_water", react2: "chemical!iodine", elem1: "water", elem2: null, priority: 100 },
+ { react1: "chemical!iodine", react2: "algae", elem1: "no_change", elem2: null, props: { chance: 0.035 }, priority: 100 },
+ { react1: "chemical!iodine", react2: "cell", elem1: "no_change", elem2: null, props: { chance: 0.02 }, priority: 100 },
+ { react1: "chemical!iodine", react2: "cancer", elem1: "no_change", elem2: null, props: { chance: 0.02 }, priority: 100 },
+ { react1: "chemical!iodine", react2: "plauge", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "chemical!iodine", react2: "virus", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "chemical!iodine", react2: "potato", elem1: "no_change", elem2: "no_change", props: { color2: "#3e0252" }, priority: 100 },
+ { react1: "chemical!iodine", react2: "bread", elem1: "no_change", elem2: "no_change", props: { color2: "#3e0252" }, priority: 100 },
+ { react1: "chemical!iodine", react2: "toast", elem1: "no_change", elem2: "no_change", props: { color2: "#3e0252" }, priority: 100 },
+ { react1: "chemical!iodine", react2: "flour", elem1: "no_change", elem2: "no_change", props: { color2: "#3e0252" }, priority: 100 },
+ { react1: "chemical!iodine", react2: "dough", elem1: "no_change", elem2: "no_change", props: { color2: "#3e0252" }, priority: 100 },
+ { react1: "chemical!iodine", react2: "batter", elem1: "no_change", elem2: "no_change", props: { color2: "#3e0252" }, priority: 100 },
+
+ { react1: "chemical!iodine", react2: "chemical!hydrogen", elem1: "hydrogen_iodide", elem2: null, priority: 100 },
+ { react1: "chemical!iodine", react2: "chemical!hydrogen_sulfide", elem1: "hydrogen_iodide", elem2: "sulfur", priority: 100 },
+
+ { react1: "chemical!hydrogen_iodide,ignorechemical!hydroiodic_acid", react2: "steam", elem1: "hydroiodic_acid_gas", elem2: null, priority: 100 },
+ { react1: "chemical!hydrogen_iodide,ignorechemical!hydroiodic_acid", react2: "chemical!liquid_water", elem1: "hydroiodic_acid", elem2: null, priority: 10 },
+
+ //W
+
+ { react1: "chemical!fluorine", react2: "chemical!tungsten", elem1: "tungsten_hexafluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!tungsten_hexafluoride", react2: "chemical!liquid_water", elem1: "tungsten", elem2: "hydrofluoric_acid", priority: 10 },
+ { react1: "chemical!tungsten_hexafluoride", react2: "chemical!liquid_water", elem1: "tungsten", elem2: "hydrofluoric_acid", priority: 10 },
+
+ //Hg
+
+ { react1: "chemical!mercury", react2: "chemical!liquid_water,ignore!dirty_water,ignore!salt_water,ignore!potassium_salt_water", elem1: null, elem2: "dirty_water", priority: 10 },
+
+ //Tl
+
+ { react1: "chemical!thallium", react2: "chemical!liquid_water,ignorechemical!thallium_i", elem1: "thallium_hydroxide_solution", elem2: "hydrogen", props: { chance: 0.01 }, priority: 10 },
+ { react1: "chemical!thallium", react2: "chemical!steam", elem1: "thallium_hydroxide", elem2: "hydrogen", props: { chance: 0.01 }, priority: 10 },
+ { react1: "chemical!thallium_oxide", react2: "chemical!liquid_water,ignorechemical!thallium_i", elem1: "thallium_hydroxide_solution", elem2: null, priority: 10 },
+
+ { react1: "chemical!thallium_hydroxide_solution", react2: "chemical!liquid_water,ignore!dirty_water,ignorechemical!thallium_i", elem1: "no_change", elem2: "dirty_water", priority: 10 },
+ { react1: "chemical!thallium_sulfate_solution", react2: "chemical!liquid_water,ignore!dirty_water,ignorechemical!thallium_i", elem1: "no_change", elem2: "dirty_water", priority: 10 },
+
+ { react1: "chemical!thallium", react2: "chemical!sulfur", elem1: "thallium_sulfide", elem2: null, props: { tempMin: 115.21, chance: 0.1 }, priority: 100 },
+ { react1: "chemical!thallium_sulfide", react2: "light", elem1: "no_change", elem2: null, props: { charge1: 1 }, priority: 100 },
+ { react1: "chemical!thallium_sulfide", react2: "liquid_light", elem1: "no_change", elem2: null, props: { charge1: 1 }, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "chemical!thallium", elem1: "thallium_sulfate_solution", elem2: "hydrogen", props: { temp1: 50, temp2: 50 }, deleteReactions: { aa: true }, priority: 100 },
+
+ { react1: "chemical!thallium", react2: "hair", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "chemical!thallium_i", react2: "hair", elem1: "no_change", elem2: null, priority: 100 },
+
+ //Po
+ { react1: "chemical!stable_polonium", react2: "chemical!oxygen", elem1: "polonium_dioxide", elem2: null, props: { tempMin: 0 }, priority: 100 },
+ { react1: "chemical!stable_polonium", react2: "chemical!oxygen", elem1: "polonium_dioxide", elem2: null, props: { tempMin: 0 }, priority: 100 },
+ { react1: "chemical!stable_polonium", react2: "chemical!magnesium", elem1: "magnesium_polonide", elem2: null, props: { tempMin: 300 }, priority: 100 },
+ { react1: "chemical!stable_polonium", react2: "chemical!magnesium", elem1: "magnesium_polonide", elem2: null, props: { tempMin: 300 }, priority: 100 },
+
+ { react1: "chemical!hydrochloric_acid", react2: "chemical!magnesium_polonide", elem1: "magnesium_chloride_solution", elem2: "polonium_hydride", props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ //At
+ { react1: "chemical!stable_astatine", react2: "chemical!liquid_water", elem1: "hydroastatic_acid", elem2: null, props: { chance: 0.001 }, priority: 10 },
+
+ //Fr
+ { react1: "chemical!francium", react2: "chemical!liquid_water", elem1: "radon", elem2: [null, null, "rad_pop"], priority: 10 },
+ { react1: "chemical!francium", react2: "steam", elem1: "radon", elem2: [null, null, "rad_pop"], priority: 100 },
+ { react1: "chemical!francium", react2: "rad_steam", elem1: "radon", elem2: [null, null, "rad_pop"], priority: 100 },
+
+ { react1: "chemical!stable_francium", react2: "chemical!liquid_water", elem1: "francium_hydroxide", elem2: [null, null, "explosion"], props: { func: franciumHydroxide }, priority: 10 },
+ { react1: "chemical!stable_francium", react2: "steam", elem1: "francium_hydroxide", elem2: [null, null, "explosion"], props: { func: franciumHydroxide }, priority: 100 },
+ { react1: "chemical!stable_francium", react2: "rad_steam", elem1: "francium_hydroxide", elem2: [null, null, "explosion"], props: { func: franciumHydroxide }, priority: 100 },
+ { react1: "chemical!francium_hydroxide,ignorechemical!francium_hydroxide_solution", react2: "chemical!liquid_water", elem1: "francium_hydroxide", elem2: null, priority: 10 },
+
+ //Ra
+ { react1: "chemical!radium", react2: "chemical!liquid_water", elem1: ["radium_water", "rad_pop"], elem2: ["hydrogen", "bubble"], props: { chance: 0.05, temp2: 350, func: radiumWater }, priority: 10 },
+ { react1: "chemical!radium_water", react2: "head", elem1: "no_change", elem2: null, props: { chance: 0.4 }, priority: 100 },
+ { react1: "chemical!radium_water", react2: "bone", elem1: "no_change", elem2: ["quicklime", "quicklime"], props: { chance: 0.4 }, priority: 100 },
+ { react1: "chemical!radium_water", react2: "bone_marrow", elem1: "no_change", elem2: ["quicklime", "blood"], props: { chance: 0.4 }, priority: 100 },
+
+ { react1: "chemical!stable_radium", react2: "chemical!liquid_water", elem1: ["radium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], props: { chance: 0.05, temp2: 350, func: radiumWater }, priority: 10 },
+ { react1: "chemical!radium_chloride_solution", react2: "chemical!mercury", elem1: ["stable_radium", "chlorine", "hydrogen", "oxygen"], elem2: "no_change", props: { charged: true, chance: 0.02 }, priority: 100 },
+ { react1: "chemical!radium_oxide", react2: "chemical!liquid_water", elem1: "radium_hydroxide", elem2: null, props: { chance: 0.01 }, priority: 10 },
+
+ //Ac
+ { react1: "chemical!stable_actinium", react2: "chemical!oxygen", elem1: "chemical!actinium_oxide", elem2: null, priority: 100 },
+ { react1: "chemical!stable_actinium", react2: "chemical!liquid_water", elem1: "actinium_hydroxide", elem2: "hydrogen", props: { chance: 0.01 }, priority: 10 },
+ { react1: "chemical!actinium_oxide", react2: "chemical!liquid_water", elem1: "actinium_hydroxide", elem2: null, props: { chance: 0.01 }, priority: 10 },
+
+ { react1: "chemical!actinium_oxide", react2: "chemical!magnesium", elem1: "stable_actinium", elem2: "magnesium_oxide", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!actinium_oxide", react2: "chemical!calcium", elem1: "stable_actinium", elem2: "quicklime", props: { tempMin: 500 }, priority: 100 },
+
+ //Th
+ { react1: "chemical!unstable_thorium", react2: "neutron", elem1: "no_change", elem2: null, props: { func: thorium, temp1: 100 }, priority: 100 },
+
+ { react1: "chemical!thorium", react2: "chemical!oxygen", elem1: "chemical!thorium_dioxide,react1restrict!isotope,state!solid,one!", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!thorium_dioxide", react2: "chemical!hydrogen_fluoride", elem1: "chemical!thorium_tetrafluoride,react1restrict!isotope,state!solid,one!", elem2: "fire", priority: 100 },
+
+ { react1: "chemical!thorium_dioxide", react2: "chemical!magnesium", elem1: "chemical!thorium,react1restrict!isotope,state!solid,one!", elem2: "magnesium_oxide", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!thorium_dioxide", react2: "chemical!calcium", elem1: "chemical!thorium,react1restrict!isotope,state!solid,one!", elem2: "quicklime", props: { tempMin: 500 }, priority: 100 },
+
+ { react1: "chemical!thorium_tetrafluoride", react2: "chemical!magnesium", elem1: "chemical!thorium,react1restrict!isotope,state!solid,one!", elem2: "magnesium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!thorium_tetrafluoride", react2: "chemical!calcium", elem1: "chemical!thorium,react1restrict!isotope,state!solid,one!", elem2: "fluorite", props: { tempMin: 500 }, priority: 100 },
+ { react1: "chemical!thorium_tetrafluoride", react2: "chemical!sodium", elem1: "chemical!thorium,react1restrict!isotope,state!solid,one!", elem2: "sodium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!thorium_tetrafluoride", react2: "chemical!potassium", elem1: "chemical!thorium,react1restrict!isotope,state!solid,one!", elem2: "potassium_fluoride", props: { tempMin: 200 }, priority: 100 },
+
+ //Pa
+ { react1: "chemical!stable_protactinium", react2: "chemical!oxygen", elem1: "protactinium_v_oxide", elem2: null, props: { chance: 0.01 }, priority: 100 },
+ { react1: "chemical!stable_protactinium", react2: "steam", elem1: "protactinium_hydroxide", elem2: "hydrogen", props: { chance: 0.01 }, priority: 100 },
+ { react1: "chemical!protactinium_v_oxide", react2: "chemical!hydrofluoric_acid", elem1: "protactinium_v_fluoride", elem2: "fire", priority: 100 },
+
+ { react1: "chemical!protactinium_v_oxide", react2: "chemical!magnesium", elem1: "stable_protactinium", elem2: "magnesium_oxide", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!protactinium_v_oxide", react2: "chemical!calcium", elem1: "stable_protactinium", elem2: "quicklime", props: { tempMin: 500 }, priority: 100 },
+
+ { react1: "chemical!protactinium_v_fluoride", react2: "chemical!magnesium", elem1: "stable_protactinium", elem2: "magnesium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!protactinium_v_fluoride", react2: "chemical!calcium", elem1: "stable_protactinium", elem2: "fluorite", props: { tempMin: 500 }, priority: 100 },
+ { react1: "chemical!protactinium_v_fluoride", react2: "chemical!sodium", elem1: "stable_protactinium", elem2: "sodium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!protactinium_v_fluoride", react2: "chemical!potassium", elem1: "stable_protactinium", elem2: "potassium_fluoride", props: { tempMin: 200 }, priority: 100 },
+
+ //U
+ { react1: "chemical!uranium", react2: "meat", elem1: "no_change", elem2: "rotten_meat", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!uranium", react2: "cheese", elem1: "no_change", elem2: "rotten_cheese", props: { chance: 0.1 }, priority: 100 },
+ { react1: "chemical!uranium", react2: "chemical!liquid_water,ignore!dirty_water", elem1: "no_change", elem2: "dirty_water", priority: 10 },
+
+ { react1: "chemical!pure_uranium_238", react2: "neutron", elem1: "no_change", elem2: null, props: { func: depletedUranium }, priority: 100 },
+ { react1: "chemical!pure_uranium_235", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: enrichedUranium, temp1: 100 }, priority: 100 },
+
+ { react1: "chemical!uranium", react2: "chemical!oxygen", elem1: "chemical!uranium_dioxide,react1restrict!isotope,state!solid,one!", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!mixed_uranium_dioxide", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { temp1: 25 }, priority: 100 },
+ { react1: "chemical!uranium_235_dioxide", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: enrichedUraniumDioxide, temp1: 50 }, priority: 100 },
+ { react1: "chemical!uranium_238_dioxide,chemical!stable_uranium_dioxide", react2: "neutron", elem1: "no_change", elem2: null, priority: 100 },
+
+ { react1: "chemical!uranium_dioxide", react2: "chemical!magnesium", elem1: "chemical!uranium,react1restrict!isotope,state!solid,one!", elem2: "magnesium_oxide", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!uranium_dioxide", react2: "chemical!calcium", elem1: "chemical!uranium,react1restrict!isotope,state!solid,one!", elem2: "quicklime", props: { tempMin: 500 }, priority: 100 },
+
+ { react1: "chemical!uranium_dioxide", react2: "chemical!hydrogen_fluoride", elem1: "chemical!uranium_tetrafluoride,react1restrict!isotope,state!solid,one!", elem2: "fire", priority: 100 },
+ { react1: "chemical!uranium_tetrafluoride", react2: "chemical!fluorine", elem1: "chemical!uranium_hexafluoride,react1restrict!isotope,state!solid,one!", elem2: "fire", priority: 100 },
+
+ { react1: "chemical!uranium_tetrafluoride", react2: "chemical!magnesium", elem1: "chemical!uranium,react1restrict!isotope,state!solid,one!", elem2: "magnesium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!uranium_tetrafluoride", react2: "chemical!calcium", elem1: "chemical!uranium,react1restrict!isotope,state!solid,one!", elem2: "fluorite", props: { tempMin: 500 }, priority: 100 },
+ { react1: "chemical!uranium_tetrafluoride", react2: "chemical!sodium", elem1: "chemical!uranium,react1restrict!isotope,state!solid,one!", elem2: "sodium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!uranium_tetrafluoride", react2: "chemical!potassium", elem1: "chemical!uranium,react1restrict!isotope,state!solid,one!", elem2: "potassium_fluoride", props: { tempMin: 200 }, priority: 100 },
+
+ { react1: "chemical!uranium_hexafluoride", react2: "chemical!hydrogen", elem1: "chemical!uranium_tetrafluoride,react1restrict!isotope,state!solid,one!", elem2: "hydrogen_fluoride", priority: 100 },
+ { react1: "chemical!uranium_hexafluoride", react2: "chemical!liquid_water", elem1: "chemical!uranium_tetrafluoride,react1restrict!isotope,state!solid,one!", elem2: "hydrofluoric_acid", priority: 100 },
+
+ { react1: "chemical!sulfuric_acid", react2: "chemical!uraninite", elem1: "yellowcake_solution", elem2: null, priority: 100 },
+ { react1: "chemical!sulfuric_acid", react2: "chemical!yellowcake", elem1: "yellowcake_solution", elem2: "yellowcake_solution", priority: 100 },
+ { react1: "chemical!yellowcake", react2: "chemical!hydrogen", elem1: ["uranium_dioxide", "uranium_dioxide", "uranium_dioxide", "uranium_dioxide", "thorium_dioxide"], elem2: "steam", priority: 100 },
+
+ //Np
+ { react1: "chemical!neptunium", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: neptunium, temp1: 150 }, priority: 100 },
+
+ { react1: "chemical!stable_neptunium", react2: "chemical!oxygen", elem1: "neptunium_dioxide", elem2: null, props: { chance: 0.01 }, priority: 100 },
+ { react1: "chemical!neptunium_dioxide", react2: "chemical!hydrofluoric_acid", elem1: "neptunium_tetrafluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!neptunium_tetrafluoride", react2: "chemical!fluorine", elem1: "neptunium_hexafluoride", elem2: "fire", priority: 100 },
+
+ { react1: "chemical!neptunium_dioxide", react2: "chemical!magnesium", elem1: "stable_protactinium", elem2: "magnesium_oxide", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!neptunium_dioxide", react2: "chemical!calcium", elem1: "stable_protactinium", elem2: "quicklime", props: { tempMin: 500 }, priority: 100 },
+
+ { react1: "chemical!neptunium_tetrafluoride", react2: "chemical!magnesium", elem1: "stable_protactinium", elem2: "magnesium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!neptunium_tetrafluoride", react2: "chemical!calcium", elem1: "stable_protactinium", elem2: "fluorite", props: { tempMin: 500 }, priority: 100 },
+ { react1: "chemical!neptunium_tetrafluoride", react2: "chemical!sodium", elem1: "stable_protactinium", elem2: "sodium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!neptunium_tetrafluoride", react2: "chemical!potassium", elem1: "stable_protactinium", elem2: "potassium_fluoride", props: { tempMin: 200 }, priority: 100 },
+
+ { react1: "chemical!neptunium_hexafluoride", react2: "chemical!hydrogen", elem1: "neptunium_tetrafluoride", elem2: "hydrogen_fluoride", priority: 100 },
+ { react1: "chemical!neptunium_hexafluoride", react2: "chemical!liquid_water", elem1: "neptunium_tetrafluoride", elem2: "hydrofluoric_acid", priority: 100 },
+
+ //Pu
+
+ { react1: "chemical!plutonium", react2: "chemical!liquid_water,ignore!dirty_water", elem1: "no_change", elem2: "dirty_water", priority: 10 },
+
+ { react1: "chemical!pure_mixed_plutonium", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: plutonium, temp1: 100 }, priority: 100 },
+ { react1: "chemical!pure_plutonium_239", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: plutonium, temp1: 150 }, priority: 100 },
+ { react1: "chemical!pure_plutonium_242", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: depletedPlutonium, temp1: 25 }, priority: 100 },
+
+ { react1: "chemical!mixed_plutonium_dioxide", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: plutoniumDioxide, temp1: 25 }, priority: 100 },
+ { react1: "chemical!plutonium_239_dioxide", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: plutoniumDioxide, temp1: 50 }, priority: 100 },
+
+ { react1: "chemical!plutonium", react2: "chemical!oxygen", elem1: "chemical!plutonium_dioxide,react1restrict!isotope,state!solid,one!", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!plutonium_dioxide", react2: "chemical!magnesium", elem1: "chemical!plutonium,react1restrict!isotope,state!solid,one!", elem2: "magnesium_oxide", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!plutonium_dioxide", react2: "chemical!calcium", elem1: "chemical!plutonium,react1restrict!isotope,state!solid,one!", elem2: "quicklime", props: { tempMin: 500 }, priority: 100 },
+
+ { react1: "chemical!plutonium_dioxide", react2: "chemical!hydrogen_fluoride", elem1: "chemical!plutonium_tetrafluoride,react1restrict!isotope,state!solid,one!", elem2: "fire", priority: 100 },
+ { react1: "chemical!plutonium_tetrafluoride", react2: "chemical!fluorine", elem1: ["fire", "fire", "fire", "fire", "chemical!plutonium_hexafluoride,react1restrict!isotope,state!solid,one!"], elem2: "fire", priority: 100 },
+ { react1: "chemical!plutonium_tetrafluoride", react2: "chemical!foof", elem1: "chemical!plutonium_hexafluoride,react1restrict!isotope,state!solid,one!", elem2: "oxygen", priority: 100 },
+
+ { react1: "chemical!plutonium_tetrafluoride", react2: "chemical!magnesium", elem1: "chemical!plutonium,react1restrict!isotope,state!solid,one!", elem2: "magnesium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!plutonium_tetrafluoride", react2: "chemical!calcium", elem1: "chemical!plutonium,react1restrict!isotope,state!solid,one!", elem2: "fluorite", props: { tempMin: 500 }, priority: 100 },
+ { react1: "chemical!plutonium_tetrafluoride", react2: "chemical!sodium", elem1: "chemical!plutonium,react1restrict!isotope,state!solid,one!", elem2: "sodium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!plutonium_tetrafluoride", react2: "chemical!potassium", elem1: "chemical!plutonium,react1restrict!isotope,state!solid,one!", elem2: "potassium_fluoride", props: { tempMin: 200 }, priority: 100 },
+
+ { react1: "chemical!plutonium_hexafluoride", react2: "chemical!hydrogen", elem1: "chemical!plutonium_tetrafluoride,react1restrict!isotope,state!solid,one!", elem2: "hydrogen_fluoride", priority: 100 },
+ { react1: "chemical!plutonium_hexafluoride", react2: "chemical!liquid_water", elem1: "chemical!plutonium_tetrafluoride,react1restrict!isotope,state!solid,one!", elem2: "hydrofluoric_acid", priority: 100 },
+
+ //Am
+ { react1: "chemical!americium", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: americium, temp1: 150 }, priority: 100 },
+ //Cm
+ { react1: "chemical!curium", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: curium, temp1: 150 }, priority: 100 },
+ //Bk
+ { react1: "chemical!berkelium", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: berkelium, temp1: 150 }, priority: 100 },
+ //Cf
+ { react1: "chemical!californium", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: californium, temp1: 150 }, priority: 100 },
+ //Es
+ { react1: "chemical!einsteinium", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: einsteinium, temp1: 175 }, priority: 100 },
+ //Fm
+ { react1: "chemical!fermium", react2: "neutron", elem1: "no_change", elem2: "no_change", props: { func: fermium, temp1: 175 }, priority: 100 },
+
+ //Cn
+ { react1: "chemical!uranium,ignorechemical!pure_stable_uranium", react2: "chemical!calcium", elem1: "copernicium", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!copernicium", react2: "neutron", elem1: "nihonium", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!stable_copernicium", react2: "chemical!oxygen", elem1: "copernicium_dioxide", elem2: null, props: { chance: 0.01, tempMin: 67, tempMax: 300 }, priority: 100 },
+ { react1: "chemical!stable_copernicium", react2: "chemical!sulfur", elem1: "copernicium_sulfide", elem2: null, props: { tempMin: 115.21, tempMax: 421 }, priority: 100 },
+ { react1: "chemical!copernicium_dioxide", react2: "chemical!fluorine", elem1: "copernicium_tetrafluoride", elem2: "fire", priority: 100 },
+
+ { react1: "chemical!copernicium_tetrafluoride", react2: "chemical!liquid_water", elem1: "stable_copernicium", elem2: "hydrofluoric_acid", priority: 100 },
+
+ //Nh
+ { react1: "chemical!neptunium", react2: "chemical!calcium", elem1: "nihonium", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!nihonium", react2: "neutron", elem1: "flerovium", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!stable_nihonium", react2: "chemical!stable_francium", elem1: "francium_nihonide", elem2: null, props: { tempMin: 50 }, priority: 100 },
+ { react1: "chemical!stable_nihonium", react2: "chemical!nitric_acid", elem1: "nihonium_nitrate_solution", elem2: "nitrogen_dioxide", priority: 100 },
+ { react1: "chemical!stable_nihonium", react2: "chemical!sulfuric_acid", elem1: "nihonium_sulfate_solution", elem2: "hydrogen", props: { temp1: 50, temp2: 50 }, priority: 100 },
+
+ { react1: "chemical!nihonium_oxide", react2: "chemical!liquid_water", elem1: "nihonium_hydroxide", elem2: null, priority: 100 },
+ { react1: "chemical!francium_nihonide", react2: "chemical!liquid_water", elem1: ["nihonium_hydroxide", "francium_hydroxide"], elem2: "hydrogen", priority: 10 },
+
+ { react1: "chemical!nihonium_oxide", react2: "chemical!carbon", elem1: "stable_nihonium", elem2: "carbon_dioxide", props: { tempMin: 567 }, priority: 100 },
+
+ { react1: "chemical!nihonium_i,restrictchemical!water", react2: "chemical!bases,restrictchemical!hydroxide", elem1: "chemical!liquid_salt_water,react1restrict!anion,react2restrict!cationBase,one!", elem2: "nihonium_hydroxide", priority: 20 },
+
+ //Fl
+ { react1: "chemical!plutonium,ignorechemical!pure_stable_uranium", react2: "chemical!calcium", elem1: "flerovium", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!flerovium", react2: "neutron", elem1: "moscovium", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!flerovium", react2: "chemical!sulfur", elem1: "flerovium_sulfide", elem2: null, props: { tempMin: 115.21 }, priority: 100 },
+ { react1: "chemical!flerovium_oxide", react2: "chemical!carbon", elem1: "stable_flerovium", elem2: "carbon_dioxide", props: { tempMin: 1120 }, priority: 100 },
+
+ //Mc
+ { react1: "chemical!americium", react2: "chemical!calcium", elem1: "moscovium", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!moscovium", react2: "neutron", elem1: "livermorium", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!stable_moscovium", react2: "chemical!hydrogen_fluoride", elem1: "moscovium_fluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!moscovium_hydroxide", react2: "chemical!hydrogen_fluoride", elem1: "moscovium_fluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!stable_moscovium", react2: "chemical!liquid_water", elem1: "moscovium_hydroxide_solution", elem2: "hydrogen", props: { chance: 0.05, temp1: 100, temp2: 100 }, priority: 10 },
+
+ { react1: "chemical!moscovium_fluoride", react2: "chemical!magnesium", elem1: "stable_moscovium", elem2: "magnesium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!moscovium_fluoride", react2: "chemical!calcium", elem1: "stable_moscovium", elem2: "fluorite", props: { tempMin: 500 }, priority: 100 },
+ { react1: "chemical!moscovium_fluoride", react2: "chemical!sodium", elem1: "stable_moscovium", elem2: "sodium_fluoride", props: { tempMin: 200 }, priority: 100 },
+ { react1: "chemical!moscovium_fluoride", react2: "chemical!potassium", elem1: "stable_moscovium", elem2: "potassium_fluoride", props: { tempMin: 200 }, priority: 100 },
+
+ //Lv
+
+ { react1: "chemical!curium", react2: "chemical!calcium", elem1: "livermorium", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!livermorium", react2: "neutron", elem1: "tennessine", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!livermorium", react2: "chemical!oxygen", elem1: "livermorium_oxide", elem2: "fire", props: { tempMin: 300 }, priority: 100 },
+ { react1: "chemical!livermorium_oxide", react2: "chemical!carbon", elem1: "stable_livermorium", elem2: "carbon_dioxide", props: { tempMin: 730 }, priority: 100 },
+
+ //Ts
+
+ { react1: "chemical!berkelium", react2: "chemical!calcium", elem1: "tennessine", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!tennessine", react2: "neutron", elem1: "oganesson", elem2: null, props: { chance: 0.1 }, priority: 100 },
+
+ { react1: "chemical!stable_tennessine", react2: "chemical!hydrogen_fluoride", elem1: "tennessine_monofluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!tennessine_monofluoride", react2: "chemical!fluorine", elem1: "tennessine_trifluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!tennessine_trifluoride", react2: "chemical!liquid_water", elem1: "tennessine_monofluoride", elem2: "hydrofluoric_acid", priority: 10 },
+
+ //Og
+
+ { react1: "chemical!californium", react2: "chemical!calcium", elem1: "oganesson", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!stable_oganesson", react2: "chemical!hydrogen_fluoride", elem1: "oganesson_difluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!oganesson_difluoride", react2: "chemical!fluorine", elem1: "oganesson_tetrafluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!oganesson_tetrafluoride", react2: "chemical!liquid_water", elem1: "oganesson_difluoride", elem2: "hydrofluoric_acid", priority: 10 },
+
+ { react1: "chemical!stable_oganesson", react2: "chemical!tennessine_trifluoride", elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside", priority: 100 },
+ { react1: "chemical!oganesson_difluoride", react2: "chemical!tennessine_trifluoride", elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside", priority: 100 },
+
+ //Uue
+
+ { react1: "chemical!einsteinium", react2: "chemical!calcium", elem1: "ununennium", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!ununennium", react2: "rad_steam", elem1: "n_explosion", elem2: null, priority: 100 },
+ { react1: "chemical!ununennium", react2: "steam", elem1: "n_explosion", elem2: null, priority: 100 },
+ { react1: "chemical!ununennium", react2: "chemical!liquid_water", elem1: "n_explosion", elem2: null, priority: 10 },
+
+ { react1: "chemical!stable_ununennium", react2: "rad_steam", elem1: "ununennium_hydroxide", elem2: [null, null, "explosion"], props: { func: ununenniumHydroxide }, priority: 100 },
+ { react1: "chemical!stable_ununennium", react2: "steam", elem1: "ununennium_hydroxide", elem2: [null, null, "explosion"], props: { func: ununenniumHydroxide }, priority: 100 },
+ { react1: "chemical!stable_ununennium", react2: "chemical!liquid_water", elem1: "ununennium_hydroxide", elem2: [null, null, "explosion"], props: { func: ununenniumHydroxide }, priority: 10 },
+ { react1: "chemical!ununennium_hydroxide,ignorechemical!ununennium_hydroxide_solution", react2: "chemical!liquid_water", elem1: "ununennium_hydroxide", elem2: null, priority: 10 },
+
+ { react1: "chemical!ununennium_fluoride", react2: "chemical!fluorine", elem1: "ununennium_trifluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!ununennium_trifluoride", react2: "chemical!foof", elem1: "ununennium_pentafluoride", elem2: "oxygen", priority: 100 },
+ { react1: "chemical!ununennium_trifluoride", react2: "chemical!liquid_water", elem1: "ununennium_fluoride", elem2: "hydrofluoric_acid", priority: 10 },
+ { react1: "chemical!ununennium_pentafluoride", react2: "chemical!liquid_water", elem1: "ununennium_trifluoride", elem2: "hydrofluoric_acid", priority: 10 },
+
+ //Ubn
+
+ { react1: "chemical!fermium", react2: "chemical!calcium", elem1: "unbinilium", elem2: null, props: { chance: 0.01, tempMin: 10000 }, priority: 100 },
+
+ { react1: "chemical!stable_unbinilium", react2: "chemical!liquid_water", elem1: ["unbinilium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], props: { chance: 0.05, temp2: 350 }, priority: 100 },
+ { react1: "chemical!unbinilium_oxide", react2: "chemical!liquid_water", elem1: "unbinilium_hydroxide", elem2: null, props: { chance: 0.01 }, priority: 100 },
+
+ { react1: "chemical!unbinilium_difluoride", react2: "chemical!fluorine", elem1: "unbinilium_tetrafluoride", elem2: "fire", priority: 100 },
+ { react1: "chemical!unbinilium_tetrafluoride", react2: "chemical!foof", elem1: "unbinilium_hexafluoride", elem2: "oxygen", priority: 100 },
+ { react1: "chemical!unbinilium_tetrafluoride", react2: "chemical!liquid_water", elem1: "unbinilium_difluoride", elem2: "hydrofluoric_acid", priority: 10 },
+ { react1: "chemical!unbinilium_hexafluoride", react2: "chemical!liquid_water", elem1: "unbinilium_tetrafluoride", elem2: "hydrofluoric_acid", priority: 10 },
+
+ //Magic
+ { react1: "bless", react2: "chemical!neutronium", elem1: "no_change", elem2: "neutron", priority: 100 },
+ { react1: "bless", react2: "chemical!diborane", elem1: "no_change", elem2: "hydrogen", priority: 100 },
+ { react1: "bless", react2: "chemical!pentaborane_9", elem1: "no_change", elem2: "hydrogen", priority: 100 },
+ { react1: "bless", react2: "chemical!decaborane", elem1: "no_change", elem2: "hydrogen", priority: 100 },
+ { react1: "bless", react2: "chemical!fluorine", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!hydrogen_fluoride", elem1: "no_change", elem2: "hydrogen", priority: 100 },
+ { react1: "bless", react2: "chemical!sodium_hydride", elem1: "no_change", elem2: "hydrogen", priority: 100 },
+ { react1: "bless", react2: "chemical!sodium_borohydride", elem1: "no_change", elem2: "hydrogen", priority: 99 },
+ { react1: "bless", react2: "chemical!sodium_borohydride_solution", elem1: "no_change", elem2: "water", priority: 100 },
+ { react1: "bless", react2: "chemical!foof", elem1: "no_change", elem2: "oxygen", priority: 100 },
+ { react1: "bless", react2: "chemical!hydrogen_sulfide", elem1: "no_change", elem2: "hydrogen", priority: 100 },
+ { react1: "bless", react2: "chemical!sulfur_dioxide", elem1: "no_change", elem2: "oxygen", priority: 100 },
+ { react1: "bless", react2: "chemical!ammonium_perchlorate", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!bromine", elem1: "no_change", elem2: [null, null, null, "soy_sauce"], priority: 100 },
+ { react1: "bless", react2: "chemical!polonium", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!astatine", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!radon", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!francium", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!radium", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!actinium", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!thorium,ignorechemical!stable_thorium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!thorium_dioxide,ignorechemical!stable_thorium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!thorium_tetrafluoride,ignorechemical!stable_thorium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!protactinium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!protactinium_v_fluoride", elem1: "no_change", elem2: "stable_protactinium", priority: 100 },
+ { react1: "bless", react2: "chemical!uranium,ignorechemical!stable_uranium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!uraninite", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!yellowcake", elem1: "no_change", elem2: ["rock", "rock", "rock", "baked_batter"], priority: 100 },
+ { react1: "bless", react2: "chemical!yellowcake_solution", elem1: "no_change", elem2: ["rock", "rock", "rock", "baked_batter", "hydrogen", "hydrogen", "hydrogen", "hydrogen"], priority: 100 },
+ { react1: "bless", react2: "chemical!uranium_dioxide,ignorechemical!stable_uranium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!uranium_tetrafluoride,ignorechemical!stable_uranium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!uranium_hexafluoride", elem1: "no_change", elem2: "rock", priority: 99 },
+ { react1: "bless", react2: "chemical!stable_uranium_hexafluoride", elem1: "no_change", elem2: "stable_uranium", priority: 100 },
+ { react1: "bless", react2: "chemical!neptunium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!neptunium_tetrafluoride", elem1: "no_change", elem2: "stable_neptunium", priority: 100 },
+ { react1: "bless", react2: "chemical!plutonium,ignorechemical!stable_plutonium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!plutonium_dioxide,ignorechemical!stable_plutonium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!plutonium_tetrafluoride,ignorechemical!stable_plutonium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!plutonium_hexafluoride", elem1: "no_change", elem2: "rock", priority: 99 },
+ { react1: "bless", react2: "chemical!stable_plutonium_hexafluoride", elem1: "no_change", elem2: "stable_plutonium", priority: 100 },
+ { react1: "bless", react2: "chemical!americium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!curium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!berkelium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!californium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!einsteinium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!fermium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!copernicium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!nihonium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!francium_nihonide", elem1: "no_change", elem2: "stable_nihonium", priority: 100 },
+ { react1: "bless", react2: "chemical!flerovium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!moscovium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!livermorium", elem1: "no_change", elem2: "rock", priority: 100 },
+ { react1: "bless", react2: "chemical!tennessine", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!stable_tennessine", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!tennessine_monofluoride", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!tennessine_trifluoride", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!oganesson", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!oganesson_difluoride", elem1: "no_change", elem2: "stable_oganesson", priority: 100 },
+ { react1: "bless", react2: "chemical!oganesson_tetrafluoride", elem1: "no_change", elem2: "stable_oganesson", priority: 100 },
+ { react1: "bless", react2: "chemical!oganesson_tetratennesside", elem1: "no_change", elem2: "stable_oganesson", priority: 100 },
+ { react1: "bless", react2: "chemical!ununennium", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!stable_ununennium", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!ununennium_trifluoride", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!ununennium_pentafluoride", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!unbinilium", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!unbinilium_tetrafluoride", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!unbinilium_hexafluoride", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!quark_matter", elem1: "no_change", elem2: "neutron", priority: 100 },
+ { react1: "bless", react2: "chemical!caustic", elem1: "no_change", elem2: "hydrogen", priority: 100 },
+
+ { react1: "bless", react2: "chemical!rad_pop", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!big_explosion", elem1: "no_change", elem2: null, priority: 100 },
+ { react1: "bless", react2: "chemical!gamma_ray_burst", elem1: "no_change", elem2: null, priority: 100 },
+];
+
+function createChemicals() {
+ for (let i in chemjsChemicals) {
+ createChemical(i, chemjsChemicals[i]);
+ }
+}
+function cleanChemicals() {
+ for (let i in chemjsChemicals) {
+ if (chemjsChemicals[i].causticIgnore) {
+ chemjsChemicals.caustic_ignore.elementNames.push("chemical!" + i);
+ }
+ if (chemjsChemicals[i].ignorable) {
+ chemjsChemicals.ignorable.elementNames.push("chemical!" + i);
+ }
+ if (chemjsChemicals[i].categories) {
+ for (let j = 0; j < chemjsChemicals[i].categories.length; j++) {
+ chemjsChemicals[chemjsChemicals[i].categories[j]].elementNames.push("chemical!" + i);
+ }
+ }
+ }
+ let changed = true;
+ while (changed) {
+ changed = false;
+ for (let i in chemjsChemicals) {
+ let value = parseReactStringArr(chemjsChemicals[i].elementNames);
+ chemjsChemicals[i].elementNames = value.value;
+ changed = changed || value.changed;
+ }
+ }
+ for (let i in chemjsChemicals) {
+ chemjsChemicals[i].elementNames = [...new Set(chemjsChemicals[i].elementNames)];
+ if (chemjsChemicals[i].reactionProduct) {
+ for (let j = 0; j < chemjsChemicals[i].elementNames.length; j++) {
+ if (!elements[chemjsChemicals[i].elementNames[j]].reactionProduct) {
+ elements[chemjsChemicals[i].elementNames[j]].reactionProduct = Object.assign({}, chemjsChemicals[i].reactionProduct);
+ } else {
+ elements[chemjsChemicals[i].elementNames[j]].reactionProduct = Object.assign({}, elements[chemjsChemicals[i].elementNames[j]].reactionProduct, chemjsChemicals[i].reactionProduct);
+ }
+ }
+ }
+ if (chemjsChemicals[i].toxic) {
+ toxic("chemical!" + i, ...chemjsChemicals[i].toxic);
+ }
+
+ if (chemjsChemicals[i].ignore && chemjsChemicals[i].ignore.length > 0) {
+ for (let j = 0; j < chemjsChemicals[i].elementNames.length; j++) {
+ if (!elements[chemjsChemicals[i].elementNames[j]].ignore) {
+ elements[chemjsChemicals[i].elementNames[j]].ignore = [];
+ }
+ elements[chemjsChemicals[i].elementNames[j]].ignore = elements[chemjsChemicals[i].elementNames[j]].ignore.concat(parseReactStringValue(chemjsChemicals[i].ignore));
+ }
+ }
+ }
+}
+
+function isCleaned(arr) {
+ for (let i = 0; i < arr.length; i++) {
+ if (arr[i].indexOf("!") > -1 || arr[i].indexOf(",") > -1) {
+ return false;
+ }
+ }
+ return true;
+}
+
+function parseReactString(input, props = {}) {
+ let str = input.split(",");
let result = [];
+ let changed = false;
+ for (let i = 0; i < str.length; i++) {
+ let str2 = str[i].split("!");
+ if (str2[0] === "chemical" && chemjsChemicals[str2[1]]) {
+ if (isCleaned(chemjsChemicals[str2[1]].elementNames)) {
+ result.push(...chemjsChemicals[str2[1]].elementNames);
+ changed = true;
+ } else {
+ return { value: input, changed: false };
+ }
+ } else if (str2[0] === "ignore") {
+ result = result.filter((x) => x != str2[1]);
+ changed = true;
+ } else if (str2[0] === "ignorechemical") {
+ if (isCleaned(chemjsChemicals[str2[1]].elementNames)) {
+ result = result.filter((x) => !chemjsChemicals[str2[1]].elementNames.includes(x));
+ changed = true;
+ } else {
+ return { value: input, changed: false };
+ }
+ } else if (str2[0] === "restrictchemical") {
+ if (isCleaned(chemjsChemicals[str2[1]].elementNames)) {
+ result = result.filter((x) => chemjsChemicals[str2[1]].elementNames.includes(x));
+ changed = true;
+ } else {
+ return { value: input, changed: false };
+ }
+ } else if (str2[0] === "state") {
+ result = result.filter((x) => elements[x].state === str2[1]);
+ changed = true;
+ } else if (str2[0] === "react1") {
+ if (elements[props.react1].reactionProduct) {
+ result.push(elements[props.react1].reactionProduct[str2[1]]);
+ changed = true;
+ } else {
+ return { value: "unknown", changed: true };
+ }
+ } else if (str2[0] === "react2") {
+ if (elements[props.react2].reactionProduct) {
+ result.push(elements[props.react2].reactionProduct[str2[1]]);
+ changed = true;
+ } else {
+ return { value: "unknown", changed: true };
+ }
+ } else if (str2[0] === "react1restrict") {
+ if (elements[props.react1].reactionProduct) {
+ let restrict = elements[props.react1].reactionProduct[str2[1]];
+ result = result.filter((x) => chemjsChemicals[restrict].elementNames.includes(x));
+ changed = true;
+ } else {
+ return { value: "unknown", changed: true };
+ }
+ } else if (str2[0] === "react2restrict") {
+ if (elements[props.react2].reactionProduct) {
+ let restrict = elements[props.react2].reactionProduct[str2[1]];
+ result = result.filter((x) => chemjsChemicals[restrict].elementNames.includes(x));
+ changed = true;
+ } else {
+ return { value: "unknown", changed: true };
+ }
+ } else if (str2[0] === "one") {
+ if (result.length !== 1) {
+ return { value: "unknown", changed: true };
+ }
+ } else {
+ result.push(str[i]);
+ }
+ if (i > 0) {
+ changed = true;
+ }
+ }
+ return { value: result, changed: changed };
+}
+
+function parseReactStringArr(arr, props = {}) {
+ let result = [];
+ let changed = false;
+ for (let i = 0; i < arr.length; i++) {
+ let value = { value: null, changed: false };
+ if (arr[i] !== null) {
+ value = parseReactString(arr[i], props);
+ }
+ changed = changed || value.changed;
+ result = result.concat(value.value);
+ }
+ return { value: result, changed: changed };
+}
+
+function parseReactStringValue(arr, props = {}) {
+ return parseReactStringArr(arr, props).value;
+}
+
+function reactChemicals() {
+ chemjsReactions.sort((x, y) => -(x.priority - y.priority));
+ for (let i = 0; i < chemjsReactions.length; i++) {
+ let reaction = Object.assign({}, chemjsReactions[i]);
+ reaction.react1 = parseReactString(reaction.react1).value;
+ reaction.react2 = parseReactString(reaction.react2).value;
+ reactList(reaction.react1, reaction.react2, reaction);
+ }
+ for (let i = 0; i < deleteReactions.length; i++) {
+ if (elements[deleteReactions[i][0]].reactions) {
+ delete elements[deleteReactions[i][0]].reactions[[deleteReactions[i][1]]];
+ }
+ if (elements[deleteReactions[i][1]].reactions) {
+ delete elements[deleteReactions[i][1]].reactions[[deleteReactions[i][0]]];
+ }
+ }
for (let i in elements) {
- let valid = false;
- if (elements[i].salt) {
- for (let ii in elements[i].salt) {
- let valid2 = true;
-
- for (let j = 0; j < list.length; j++) {
- if (!elements[i].salt[ii].components.includes(list[j])) {
- valid2 = false;
- continue;
- }
- }
-
- for (let j = 0; j < elements[i].salt[ii].components.length; j++) {
- if (!list.includes(elements[i].salt[ii].components[j])) {
- valid2 = false;
- continue;
- }
- }
- valid = valid || valid2;
- }
- }
- if (valid) {
- result.push(i);
- }
+ elements[i].ignore = [...new Set(elements[i].ignore)];
+ elements[i].ignore = elements[i].ignore.filter((x) => x !== null);
}
- return result;
}
+runAfterLoad(createChemicals);
+runAfterAutogen(cleanChemicals);
+runAfterAutogen(reactChemicals);
-function listMatching2(list, elem) {
- let result = [];
- for (let i = 0; i < elem.length; i++) {
- let valid = true;
- for (let j = 0; j < list.length; j++) {
- if (!eLists[list[j]].includes(elem[i])) {
- valid = false;
- break;
- }
- }
- if (valid) {
- result.push(elem[i]);
- }
- }
- return result;
-}
-
-runAfterAutogen(function () {
- water_salt = eLists.WATER.concat(eLists.SOLUBLE);
- for (let ii = 0; ii < eLists.WATER.length; ii++) {
- let i = eLists.WATER[ii];
- if (!elements[i]) {
- continue;
- }
- if (!elements[i].reactions) {
- elements[i].reactions = {};
- }
- for (let jj = 0; jj < water_salt.length; jj++) {
- let j = water_salt[jj];
- if (i != j && elements[i].salt && elements[j].salt) {
- let priorityA = -Infinity;
- let priorityB = -Infinity;
- for (let iii in elements[i].salt) {
- if (priorityA > elements[i].salt[iii].priority) {
- continue;
- }
- for (let jjj in elements[j].salt) {
- if (priorityB > elements[j].salt[jjj].priority) {
- continue;
- }
- if (elements[i].salt[iii].components.length > 1 && elements[j].salt[jjj].components.length > 1) {
- let match1 = listMatching([elements[i].salt[iii].components[0], elements[j].salt[jjj].components[1]]);
- let match2 = listMatching([elements[i].salt[iii].components[1], elements[j].salt[jjj].components[0]]);
- let match3 = listMatching([elements[i].salt[iii].components[0], elements[j].salt[jjj].components[0]]);
- let match4 = listMatching([elements[i].salt[iii].components[1], elements[j].salt[jjj].components[1]]);
-
- let water1 = listMatching2(["WATER"], match1);
- let water2 = listMatching2(["WATER"], match2);
- let water3 = listMatching2(["WATER"], match3);
- let water4 = listMatching2(["WATER"], match4);
- let salt1 = listMatching2(["INSOLUBLE"], match1);
- let salt2 = listMatching2(["INSOLUBLE"], match2);
- let salt3 = listMatching2(["INSOLUBLE"], match3);
- let salt4 = listMatching2(["INSOLUBLE"], match4);
-
- let productsA = [];
- let productsB = [];
-
- if (water1.length > 0 && salt2.length > 0) {
- productsA = productsA.concat(water1);
- productsB = productsB.concat(salt2);
- }
- if (water2.length > 0 && salt1.length > 0) {
- productsA = productsA.concat(water2);
- productsB = productsB.concat(salt1);
- }
-
- if (water3.length > 0 && salt4.length > 0) {
- productsA = productsA.concat(water3);
- productsB = productsB.concat(salt4);
- }
- if (water4.length > 0 && salt3.length > 0) {
- productsA = productsA.concat(water4);
- productsB = productsB.concat(salt3);
- }
-
- if (productsA.length > 0 && productsB.length > 0) {
- acidReact(i, j, productsA, productsB, 0);
- // console.log("precipitate");
- // console.log(i);
- // console.log(j);
- // console.log(productsA);
- // console.log(productsB);
- priorityA = elements[i].salt[iii].priority;
- priorityB = elements[j].salt[jjj].priority;
- continue;
- }
-
- // if (elements[i].salt[iii].components[0] == elements[j].salt[jjj].components[0] || elements[i].salt[iii].components[1] == elements[j].salt[jjj].components[1] || elements[i].salt[iii].components[1] == elements[j].salt[jjj].components[0] || elements[i].salt[iii].components[0] == elements[j].salt[jjj].components[1]) {
- // continue;
- // }
-
- // productsA = [];
- // productsB = [];
-
- // if (water1.length > 0 && water2.length > 0) {
- // productsA = productsA.concat(water1);
- // productsB = productsB.concat(water2);
- // }
-
- // if (water3.length > 0 && water4.length > 0) {
- // productsA = productsA.concat(water3);
- // productsB = productsB.concat(water4);
- // }
-
- // if (productsA.length > 0 && productsB.length > 0) {
- // elements[i].reactions[j] = { elem1: productsA, elem2: productsB, chance: 0.001, oneway: true };
- // console.log(i);
- // console.log(j);
- // console.log(productsA);
- // console.log(productsB);
- // priorityA = elements[i].salt[iii].priority;
- // priorityB = elements[j].salt[jjj].priority;
- // }
- }
- }
- }
- }
- }
- }
- let acids = eLists.ACID.concat(eLists.ACIDGAS).concat(eLists.AMPHOTERIC);
- for (let ii = 0; ii < acids.length; ii++) {
- let i = acids[ii];
- if (!elements[i]) {
- continue;
- }
- if (!elements[i].reactions) {
- elements[i].reactions = {};
- }
- let bases = eLists.BASE.concat(eLists.AMPHOTERIC);
- for (let jj = 0; jj < bases.length; jj++) {
- let j = bases[jj];
- if (i != j && elements[i].salt && elements[j].salt && elements[i].salt["acid"].components.length > 1 && elements[j].salt["base"].components.length > 1) {
- let productsA = [];
- let productsB = [];
-
- let match = [listMatching([elements[i].salt["acid"].components[0], elements[j].salt["base"].components[1]]), listMatching([elements[i].salt["acid"].components[1], elements[j].salt["base"].components[0]]), listMatching([elements[i].salt["acid"].components[0], elements[j].salt["base"].components[0]]), listMatching([elements[i].salt["acid"].components[1], elements[j].salt["base"].components[1]])];
-
- let compounds = [listMatching2(["COMPOUND"], match[0]), listMatching2(["COMPOUND"], match[1]), listMatching2(["COMPOUND"], match[2]), listMatching2(["COMPOUND"], match[3])];
-
- for (let n = 0; n < compounds.length; n++) {
- let m = n - 1;
- if (n % 2 == 0) {
- m = n + 1;
- }
- if (compounds[n].includes("water")) {
- let water1 = listMatching2(["WATER"], match[m]);
- if (water1.length > 0) {
- compounds[m] = water1;
- compounds[n].splice(compounds[n].indexOf("water"), 1);
- if (compounds[n].length == 0) compounds[n] = [null];
- }
- }
- }
-
- if (compounds[0].length > 0 && compounds[1].length > 0) {
- productsA = productsA.concat(compounds[0]);
- productsB = productsB.concat(compounds[1]);
- }
- if (compounds[2].length > 0 && compounds[3].length > 0) {
- productsA = productsA.concat(compounds[2]);
- productsB = productsB.concat(compounds[3]);
- }
- if (productsA.length > 0 && productsB.length > 0) {
- let reactionTemp = 0;
- if (elements[i].salt["acid"].components.includes("FLUORIDE") && elements[i].salt["acid"].components.includes("HYDROGEN")) {
- if (productsB[0] === null && productsB.length === 1) {
- productsB = ["fire"];
- } else {
- productsB.push("fire");
- }
- }
- if ((elements[i].salt["acid"].components.includes("SULFATE") || elements[i].salt["acid"].components.includes("CHLORIDE")) && elements[i].salt["acid"].components.includes("HYDROGEN")) {
- reactionTemp = 50;
- }
-
- if (elements[i].reactions && elements[i].reactions[j]) {
- delete elements[i].reactions[j];
- }
- if (elements[j].reactions && elements[j].reactions[i]) {
- delete elements[j].reactions[i];
- }
- acidReact(i, j, productsA, productsB, reactionTemp);
- for (let k = 0; k < productsA.length; k++) {
- if (productsA[k] == "water") {
- continue;
- }
- if (elements[j].reactions && elements[j].reactions[productsA[k]]) {
- delete elements[j].reactions[productsA[k]];
- }
- if (elements[i].reactions && elements[i].reactions[productsA[k]]) {
- delete elements[i].reactions[productsA[k]];
- }
- }
- for (let k = 0; k < productsB.length; k++) {
- if (productsB[k] == "water") {
- continue;
- }
- if (elements[j].reactions && elements[j].reactions[productsB[k]]) {
- delete elements[j].reactions[productsB[k]];
- }
- if (elements[i].reactions && elements[i].reactions[productsB[k]]) {
- delete elements[i].reactions[productsB[k]];
- }
- }
- // console.log("neutral");
- // console.log(i);
- // console.log(j);
- // console.log(compounds);
- // console.log(productsA);
- // console.log(productsB);
- }
- }
- if (elements[i].salt) {
- let acidType = eLists[elements[i].salt["acid"].components[0]];
- for (let jj = 0; jj < acidType.length; jj++) {
- let j = acidType[jj];
- if (elements[i].reactions && elements[i].reactions[j] && elements[i].reactions[j].elem2 === "dirty_water") {
- delete elements[i].reactions[j];
- }
- }
- }
- }
-
- let acidType = eLists["NITRATE"];
- for (let jj = 0; jj < acidType.length; jj++) {
- let j = acidType[jj];
- if (elements["nitrogen_dioxide"].reactions[j] && elements["nitrogen_dioxide"].reactions[j].elem2 === "nitric_acid") {
- delete elements["nitrogen_dioxide"].reactions[j];
- }
- if (elements["liquid_nitrogen_dioxide"].reactions[j] && elements["liquid_nitrogen_dioxide"].reactions[j].elem2 === "nitric_acid") {
- delete elements["liquid_nitrogen_dioxide"].reactions[j];
- }
- }
-
- acidType = eLists["SULFATE"];
- for (let jj = 0; jj < acidType.length; jj++) {
- let j = acidType[jj];
- if (elements["sulfur_dioxide"].reactions[j] && elements["sulfur_dioxide"].reactions[j].elem2 === "sulfuric_acid") {
- delete elements["sulfur_dioxide"].reactions[j];
- }
- }
- delete elements["molten_iodine_ice"];
- delete elements["molten_nihonium_nitrate"];
- for (let i in elements) {
- if (elements[i].ignore) {
- elements[i].ignore = [...new Set(elements[i].ignore)];
- elements[i].ignore = elements[i].ignore.filter(x => typeof x === 'string' || x instanceof String);
- }
- }
- }
-});
+eLists.STAINLESS = ["polytetrafluoroethylene"];
diff --git a/mods/chemLegacy.js b/mods/chemLegacy.js
new file mode 100644
index 00000000..0fbb9af4
--- /dev/null
+++ b/mods/chemLegacy.js
@@ -0,0 +1,7877 @@
+function toObject(color) {
+ color = color.match(/\d+/g);
+ return { r: color[0], g: color[1], b: color[2] };
+}
+
+function RGBToHex2(rgb) {
+ var r = Math.min(255, parseInt(rgb.r));
+ var g = Math.min(255, parseInt(rgb.g));
+ var b = Math.min(255, parseInt(rgb.b));
+ return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
+}
+
+function acidReact(elem1, elem2, product1, product2, temp = 0) {
+ if (elements[elem1] && elements[elem1].ignore) {
+ if (product1 !== null) {
+ if (product1 instanceof Array) {
+ elements[elem1].ignore.push(...product1);
+ } else {
+ elements[elem1].ignore.push(product1);
+ }
+ }
+ if (product2 !== null) {
+ if (product2 instanceof Array) {
+ elements[elem1].ignore.push(...product2);
+ } else {
+ elements[elem1].ignore.push(product2);
+ }
+ }
+ elements[elem1].ignore.push(elem2);
+ }
+ if (elements[elem2] && elements[elem2].ignore) {
+ if (product1 !== null) {
+ if (product1 instanceof Array) {
+ elements[elem2].ignore.push(...product1);
+ } else {
+ elements[elem2].ignore.push(product1);
+ }
+ }
+ if (product2 !== null) {
+ if (product2 instanceof Array) {
+ elements[elem2].ignore.push(...product2);
+ } else {
+ elements[elem2].ignore.push(product2);
+ }
+ }
+ elements[elem2].ignore.push(elem1);
+ }
+ if (product1 !== null)
+ if (elements[product1] && elements[product1].ignore) {
+ if (product2 !== null) elements[product1].ignore.push(product2);
+ elements[product1].ignore.push(elem1);
+ elements[product1].ignore.push(elem2);
+ }
+ if (product2 !== null)
+ if (elements[product2] && elements[product2].ignore) {
+ if (product1 !== null) elements[product2].ignore.push(product1);
+ elements[product2].ignore.push(elem1);
+ elements[product2].ignore.push(elem2);
+ }
+ if (!elements[elem1].reactions[elem2]) {
+ elements[elem1].reactions[elem2] = { elem1: product1, elem2: product2, temp1: temp, temp2: temp };
+ }
+}
+
+elements.fluorine = {
+ color: "#FFFFBF",
+ behavior: behaviors.GAS,
+ ignore: ["foof", "solid_foof", "oxygen", "ozone", "liquid_oxygen", "oxygen_ice", "chlorine", "liquid_chlorine", "liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "fire", "smoke", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "gold", "hydrogen", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "tungsten", "tungsten_hexafluoride"],
+ tick: function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ changePixel(pixel, "fire");
+ }
+ },
+ reactions: {
+ steam: { elem1: "hydrofluoric_acid_gas", elem2: "hydrogen" },
+ liquid_oxygen: { elem1: "foof", elem2: null },
+ hydrogen: { elem1: "hydrogen_fluoride", elem2: "fire" },
+ tungsten: { elem1: "tungsten_hexafluoride", elem2: "fire" },
+ },
+ tempLow: -188.1,
+ stateLow: "liquid_fluorine",
+ state: "gas",
+ category: "gases",
+ density: 1.7,
+ stain: 0.005,
+};
+
+elements.liquid_fluorine = {
+ color: "#ffff3b",
+ behavior: behaviors.LIQUID,
+ ignore: ["foof", "solid_foof", "oxygen", "ozone", "liquid_oxygen", "oxygen_ice", "chlorine", "liquid_chlorine", "liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "fire", "smoke", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "seltzer", "pool_water", "primordial_soup", "gold", "hydrogen", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "tungsten", "tungsten_hexafluoride"],
+ tick: function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (Math.random() < 0.01 && (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness)) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change && Math.random() < 0.02) {
+ changePixel(pixel, "fire");
+ }
+ },
+ reactions: {
+ steam: { elem1: "hydrofluoric_acid_gas", elem2: "hydrogen" },
+ hydrogen: { elem1: "hydrogen_fluoride", elem2: "fire" },
+ tungsten: { elem1: "tungsten_hexafluoride", elem2: "fire" },
+ },
+ temp: -198.1,
+ tempHigh: -188.1,
+ stateHigh: "fluorine",
+ tempLow: -219.7,
+ state: "liquid",
+ category: "liquids",
+ density: 1505,
+ stain: 0.005,
+};
+
+elements.hydrofluoric_acid = {
+ color: ["#c8cf91", "#efff5e", "#a0cc39"],
+ ignore: ["fire", "liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "seltzer", "pool_water", "primordial_soup", "gold", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "chloroform", "chloroform_gas", "chloroform_ice", "tetrafluoroethylene", "tungsten", "tungsten_hexafluoride"],
+ tick: function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "hydrogen_fluoride");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ return;
+ }
+ } else {
+ behaviors.LIQUID(pixel);
+ }
+ },
+ reactions: {},
+ state: "liquid",
+ category: "liquids",
+ density: 1020,
+ stain: 0.005,
+ tempHigh: 100,
+ stateHigh: "hydrofluoric_acid_gas",
+ tempLow: -58.88,
+};
+
+elements.hydrofluoric_acid_gas = {
+ color: ["#acb37d", "#bfcc4b", "#668224"],
+ ignore: ["liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "gold", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "chloroform", "chloroform_gas", "chloroform_ice", "tetrafluoroethylene", "tungsten", "tungsten_hexafluoride"],
+ tick: function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "hydrogen_fluoride");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ }
+ } else {
+ behaviors.GAS(pixel);
+ }
+ },
+ reactions: {},
+ state: "gas",
+ density: 1.63,
+ stain: 0.005,
+ tempHigh: 400,
+ stateHigh: "fire",
+ tempLow: -10,
+ stateLow: "hydrofluoric_acid",
+ category: "gases",
+};
+
+runAfterLoad(function () {
+ reactList("fluorine", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "oxygen" });
+ reactList("liquid_fluorine", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "oxygen" });
+ reactList("hydrofluoric_acid", eLists.WATER, { elem2: "dirty_water" });
+ reactList("hydrofluoric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.hydrofluoric_acid.reactions["dirty_water"];
+ delete elements.hydrofluoric_acid_gas.reactions["dirty_water"];
+});
+
+elements.hydrogen_fluoride = {
+ color: "#f2f28d",
+ behavior: behaviors.GAS,
+ ignore: ["liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_ice", "hydrofluoric_acid", "hydrofluoric_acid_gas", "fire", "smoke", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "gold", "hydrogen", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "chloroform", "chloroform_gas", "chloroform_ice", "tetrafluoroethylene"],
+ tick: function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change && Math.random() < 0.2) {
+ changePixel(pixel, "fire");
+ }
+ },
+ reactions: {
+ steam: { elem1: "hydrofluoric_acid_gas", elem2: null },
+ },
+ state: "gas",
+ category: "gases",
+ density: 1.7,
+ stain: 0.005,
+ tempLow: -19.5,
+ stateLow: "liquid_hydrogen_fluoride",
+};
+
+elements.liquid_hydrogen_fluoride = {
+ color: "#e2e28d",
+ behavior: behaviors.LIQUID,
+ ignore: ["liquid_hydrogen_fluoride", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "hydrofluoric_acid", "hydrofluoric_ice", "hydrofluoric_acid_gas", "fire", "smoke", "acid_gas", "neutral_acid", "acid", "acid_cloud", "water", "salt_water", "sugar_water", "dirty_water", "steam", "gold", "hydrogen", "polytetrafluoroethylene", "molten_polytetrafluoroethylene", "chloroform", "chloroform_gas", "chloroform_ice", "tetrafluoroethylene"],
+ tick: function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change && Math.random() < 0.2) {
+ changePixel(pixel, "fire");
+ }
+ },
+ reactions: {
+ steam: { elem1: "hydrofluoric_acid_gas", elem2: null },
+ },
+ state: "liquid",
+ category: "liquids",
+ hidden: true,
+ density: 1.7,
+ stain: 0.005,
+ temp: -20.5,
+ tempHigh: -19.5,
+ stateHigh: "hydrogen_fluoride",
+ tempLow: -83.6,
+};
+
+runAfterLoad(function () {
+ reactList("hydrogen_fluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: null });
+ reactList("liquid_hydrogen_fluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: null });
+});
+
+elements.foof = {
+ color: "#fa1e1e",
+ behavior: behaviors.LIQUID,
+ ignore: ["foof", "solid_foof", "fluorine", "liquid_fluorine", "fluorine_ice", "liquid_oxygen", "oxygen_ice", "oxygen", "ozone", "fire", "polytetrafluoroethylene", "molten_polytetrafluoroethylene"],
+ tick: function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change && Math.random() < 0.01) {
+ changePixel(pixel, "explosion");
+ } else if (Math.random() < 0.0001) {
+ if (Math.random() < 0.5) {
+ changePixel(pixel, "oxygen", false);
+ } else {
+ changePixel(pixel, "fluorine", false);
+ }
+ pixelTempCheck(pixel);
+ pixelTempCheck(pixel);
+ }
+ },
+ state: "liquid",
+ category: "liquids",
+ density: 1450,
+ stain: 0.01,
+ temp: -120,
+ tempHigh: -57,
+ stateHigh: ["oxygen", "fluorine", "explosion"],
+ tempLow: -154,
+ stateLow: "solid_foof",
+ reactions: {},
+};
+
+elements.solid_foof = {
+ color: "#fa4a1e",
+ behavior: behaviors.WALL,
+ ignore: ["foof", "solid_foof", "fluorine", "liquid_fluorine", "fluorine_ice", "liquid_oxygen", "oxygen_ice", "ozone", "oxygen", "fire", "polytetrafluoroethylene", "molten_polytetrafluoroethylene"],
+ tick: function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change && Math.random() < 0.01) {
+ changePixel(pixel, "explosion");
+ } else if (Math.random() < 0.00005) {
+ if (Math.random() < 0.5) {
+ changePixel(pixel, "oxygen", false);
+ } else {
+ changePixel(pixel, "fluorine", false);
+ }
+ pixelTempCheck(pixel);
+ pixelTempCheck(pixel);
+ }
+ },
+ state: "solid",
+ category: "solids",
+ density: 1450,
+ stain: 0.01,
+ temp: -160,
+ tempHigh: -154,
+ stateHigh: "foof",
+ reactions: {},
+};
+
+elements.tungsten_hexafluoride = {
+ color: "#f5f57a",
+ behavior: behaviors.GAS,
+ tempLow: 17.1,
+ state: "gas",
+ category: "gases",
+ density: 12.4,
+ stain: 0.005,
+ reactions: {
+ steam: { elem1: "hydrofluoric_acid_gas", elem2: "tungsten" },
+ },
+};
+
+elements.liquid_tungsten_hexafluoride = { density: 4560, tempLow: 2.3 };
+
+runAfterLoad(function () {
+ reactList("tungsten_hexafluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "tungsten" });
+});
+
+if (!elements.acid.ignore) {
+ elements.acid.ignore = [];
+}
+if (!elements.acid_gas.ignore) {
+ elements.acid_gas.ignore = [];
+}
+let defaultAcidIgnore = structuredClone(elements.acid.ignore);
+let defaultAcidGasIgnore = structuredClone(elements.acid_gas.ignore);
+
+let defaultAcidReactions = {
+ 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 },
+ caustic_potash: { elem1: "neutral_acid", elem2: null },
+ radium_hydroxide: { elem1: "neutral_acid", elem2: null },
+ actinium_hydroxide: { elem1: "neutral_acid", elem2: null },
+ charcoal: { elem1: null, elem2: "carbon_dioxide" },
+ grape: { elem2: "juice", color1: "#291824" },
+ soap: { elem1: "hydrogen" },
+ sodium: { elem1: "explosion" },
+ potassium: { elem1: "explosion" },
+ meat: { elem2: "rotten_meat", elem1: null, chance: 0.5 },
+};
+
+let defaultAcidGasReactions = {
+ acid_gas: { elem1: null, elem2: "acid_cloud", chance: 0.3, y: [0, 12], setting: "clouds" },
+ rain_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ snow_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ hail_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ pyrocumulus: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ fire_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ ash: { elem1: "hydrogen", elem2: null, chance: 0.05 },
+ limestone: { elem1: "hydrogen", elem2: null, chance: 0.05 },
+ quicklime: { elem1: "hydrogen", elem2: null, chance: 0.05 },
+ slaked_lime: { elem1: "hydrogen", elem2: null, chance: 0.05 },
+ borax: { elem1: "hydrogen", elem2: null, chance: 0.05 },
+ ammonia: { elem1: "hydrogen", elem2: null, chance: 0.05 },
+ bleach: { elem1: "hydrogen", elem2: null, chance: 0.05 },
+ grape: { elem2: "juice", color1: "#291824" },
+ soap: { elem1: "hydrogen" },
+ sodium: { elem1: "explosion" },
+ meat: { elem2: "rotten_meat", elem1: null, chance: 0.4 },
+};
+
+eListAdd("CAUSTIC", ["acid", "acid_gas", "fluorine", "liquid_fluorine", "hydrofluoric_acid", "hydrofluoric_acid_gas", "hydrogen_fluoride", "liquid_hydrogen_fluoride"]);
+eListAdd("CAUSTICIGNORE", []);
+
+eListAdd("ACID", ["acid", "hydrofluoric_acid"]);
+eListAdd("ACIDGAS", ["acid_gas", "hydrofluoric_acid_gas"]);
+
+if (enabledMods.includes("mods/generative_mods.js")) {
+ 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" };
+ elements["hydrofluoric_acid_gas"].reactions["cloud"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["hydrofluoric_acid_gas"].reactions["snow_cloud"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["hydrofluoric_acid_gas"].reactions["hail_cloud"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["hydrofluoric_acid_gas"].reactions["pyrocumulus"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["hydrofluoric_acid_gas"].reactions["fire_cloud"] = { elem1: null, elem2: "hydrofluoric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+
+ elements["cloud"].reactions["anesthesia"] = { elem1: "nitric_acid_cloud", elem2: null, chance: 0.05 };
+ elements["rain_cloud"].reactions["anesthesia"] = { elem1: "nitric_acid_cloud", elem2: null, chance: 0.05 };
+ });
+}
+function createAcid(name, reactions, gasReactions, color, categoryhidden, categoryhiddenGas, tempHigh, tempLowGas, tempLow, tempHighGas, density, densityGas, type, extras = { compound: "acid" }) {
+ compound = extras.compound;
+ elements[name] = {
+ forceAutoGen: true,
+ color: color,
+ 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: defaultAcidIgnore.concat(eLists.CAUSTICIGNORE),
+ reactions: reactions,
+ category: "liquids",
+ hidden: categoryhidden,
+ tempHigh: tempHigh,
+ stateHigh: name + "_gas",
+ tempLow: tempLow,
+ state: "liquid",
+ density: density,
+ };
+ elements[name + "_gas"] = {
+ behavior: ["M1|DB%5 AND M1|M1", "DB%5 AND M1|XX|DB%5 AND M1", "DB%5 AND M1|DB%10 AND M1|DB%5 AND M1"],
+ ignore: defaultAcidGasIgnore.concat(eLists.CAUSTICIGNORE),
+ reactions: gasReactions,
+ category: "gases",
+ hidden: categoryhiddenGas,
+ tempHigh: tempHighGas,
+ stateHigh: "fire",
+ tempLow: tempLowGas,
+ stateLow: name,
+ temp: tempLowGas + 20,
+ state: "gas",
+ density: densityGas,
+ };
+ elements.bless.reactions[name] = { elem2: "hydrogen" };
+ elements.bless.reactions[name + "_gas"] = { elem2: "hydrogen" };
+ if (enabledMods.includes("mods/generative_mods.js")) {
+ 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" };
+ elements[name + "_gas"].reactions["cloud"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements[name + "_gas"].reactions["snow_cloud"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements[name + "_gas"].reactions["hail_cloud"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements[name + "_gas"].reactions["pyrocumulus"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements[name + "_gas"].reactions["fire_cloud"] = { elem1: null, elem2: name + "_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ });
+ } else {
+ if (compound == "acid") {
+ elements[name + "_gas"].reactions[name + "_gas"] = { elem1: null, elem2: "acid_cloud", chance: 0.3, y: [0, 12], setting: "clouds" };
+ } else {
+ elements[name + "_gas"].reactions[name + "_gas"] = { elem1: null, elem2: "base_cloud", chance: 0.3, y: [0, 12], setting: "clouds" };
+ }
+ }
+ eLists.CAUSTIC.push(name, name + "_gas");
+ acidIgnore([name, name + "_gas", name + "_ice", name + "_cloud"]);
+ if (type) {
+ eListAddIon(type, [name, name + "_gas"], compound);
+ }
+ if (compound == "acid") {
+ eListAddIon("HYDROGEN", [name, name + "_gas"], compound);
+ if (!extras.dontDirtyWater) {
+ runAfterLoad(function () {
+ reactList(name, eLists.WATER, { elem1: null, elem2: "dirty_water" });
+ reactList(name + "_gas", eLists.WATER, { elem1: null, elem2: "dirty_water" });
+ delete elements[name].reactions["dirty_water"];
+ delete elements[name + "_gas"].reactions["dirty_water"];
+ });
+ }
+ }
+}
+
+function eListAddIon(listName, itemList, compoundType = "default", priority = 0) {
+ eListAdd(listName, itemList);
+ if (typeof itemList === "string") {
+ itemList = [itemList];
+ }
+ for (var i = 0; i < itemList.length; i++) {
+ if (!elements[itemList[i]]) {
+ elements[itemList[i]] = {};
+ }
+ if (!elements[itemList[i]].salt) {
+ elements[itemList[i]].salt = {};
+ }
+ if (!elements[itemList[i]].salt[compoundType]) {
+ elements[itemList[i]].salt[compoundType] = {};
+ elements[itemList[i]].salt[compoundType].priority = priority;
+ elements[itemList[i]].salt[compoundType].components = [];
+ }
+ if (elements[itemList[i]].salt[compoundType].components.indexOf(listName) === -1) {
+ elements[itemList[i]].salt[compoundType].components.push(listName);
+ }
+ }
+}
+
+function acidIgnore(ignore) {
+ for (let i = 0; i < eLists.CAUSTIC.length; i++) {
+ elements[eLists.CAUSTIC[i]].ignore = elements[eLists.CAUSTIC[i]].ignore.concat(ignore);
+ }
+ eLists.CAUSTICIGNORE = eLists.CAUSTICIGNORE.concat(ignore);
+}
+
+eListAdd("WATER", ["water", "salt_water", "sugar_water", "dirty_water", "neutral_acid", "seltzer", "pool_water", "primordial_soup"]);
+function reactList(element, list, reaction) {
+ for (let i = 0; i < list.length; i++) {
+ if (!elements[element].reactions[list[i]] && !(elements[element].ignore && elements[element].ignore.includes[list[i]])) {
+ acidReact(element, list[i], reaction.elem1, reaction.elem2);
+ elements[element].reactions[list[i]] = reaction;
+ }
+ }
+}
+
+function createSalt(name, nameWater, color, colorWater, hidden, hiddenWater, tempHigh, tempLowWater, tempHighWater, density, densityWater, cation, anion) {
+ if (!elements[name]) {
+ elements[name] = {
+ color: color,
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: density,
+ state: "solid",
+ tempHigh: tempHigh,
+ reactions: {
+ ice: { elem1: null, elem2: nameWater, chance: 0.1 },
+ rime: { elem1: null, elem2: nameWater, chance: 0.075 },
+ snow: { elem1: null, elem2: nameWater, chance: 0.25 },
+ packed_snow: { elem1: null, elem2: nameWater, chance: 0.05 },
+ packed_ice: { elem1: null, elem2: nameWater, chance: 0.01 },
+ water: { elem2: nameWater, elem1: null },
+ },
+ hidden: hidden,
+ };
+ }
+ if (!elements[nameWater]) {
+ elements[nameWater] = {
+ color: colorWater,
+ behavior: behaviors.LIQUID,
+ tempHigh: tempHighWater,
+ stateHigh: ["steam", name],
+ tempLow: tempLowWater,
+ category: "liquids",
+ reactions: {
+ dirt: { elem1: null, elem2: "mud" },
+ sand: { elem1: null, elem2: "wet_sand" },
+ clay_soil: { elem1: null, elem2: "clay" },
+ dust: { elem1: "dirty_water", elem2: null },
+ ash: { elem1: "dirty_water", elem2: null },
+ carbon_dioxide: { elem1: "dirty_water", elem2: null },
+ sulfur: { elem1: "dirty_water", elem2: null },
+ charcoal: { elem1: "dirty_water", chance: 0.005 },
+ plague: { elem1: "dirty_water", elem2: null },
+ fallout: { elem1: "dirty_water", chance: 0.25 },
+ radiation: { elem1: "dirty_water", chance: 0.25 },
+ rust: { elem1: "dirty_water", chance: 0.005 },
+ quicklime: { elem1: null, elem2: "slaked_lime" },
+ rock: { elem2: "wet_sand", chance: 0.0005 },
+ fly: { elem2: "dead_bug", chance: 0.1, oneway: true },
+ firefly: { elem2: "dead_bug", chance: 0.1, oneway: true },
+ bee: { elem2: "dead_bug", chance: 0.05, oneway: true },
+ stink_bug: { elem2: "dead_bug", chance: 0.1, oneway: true },
+ cancer: { elem1: "dirty_water", chance: 0.25 },
+ // electrolysis:
+ aluminum: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0025 },
+ zinc: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.015 },
+ steel: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0125 },
+ iron: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0125 },
+ tin: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.01 },
+ lead: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.01 },
+ brass: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.001 },
+ bronze: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.001 },
+ copper: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0075 },
+ silver: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0075 },
+ gold: { elem1: ["hydrogen", "hydrogen", "oxygen", name], charged: true, chance: 0.0075 },
+ fire: { elem2: "smoke" },
+ snow: { elem2: "slush" },
+ rat: { elem1: "dirty_water", chance: 0.2 },
+ slug: { elem2: "slime", elem1: null },
+ snail: { elem2: "calcium", elem1: null },
+ torch: { elem2: "wood" },
+ light: { color2: "#a1bac9" },
+ sawdust: { elem2: "cellulose", elem1: null },
+ oxygen: { elem2: "foam" },
+ paper: { elem2: "cellulose", elem1: null },
+ pollen: { elem2: null },
+ soda: { elem1: "foam", chance: 0.01 },
+ ice_nine: { elem1: "ice_nine" },
+ ant_wall: { elem2: ["mud", "mud", "wet_sand"], elem1: null, chance: 0.007 },
+ soap: { elem1: "water" },
+ dye: { elem2: null, chance: 0.05 },
+ ink: { elem2: null, chance: 0.01 },
+ sodium: { elem2: ["pop", "pop", "pop", "hydrogen"], chance: 0.01, temp1: 250 },
+ molten_sodium: { elem2: ["pop", "pop", "pop", "hydrogen"], chance: 0.01, temp1: 250 },
+ confetti: { elem2: [null, "cellulose"], chance: 0.001 },
+ greek_fire: {
+ func: function (p, pixel) {
+ if (!pixel.burning) {
+ pixel.burning = true;
+ pixel.burnStart = pixelTick;
+ }
+ },
+ },
+ },
+ state: "liquid",
+ density: densityWater,
+ conduct: 0.1,
+ stain: -0.66,
+ hidden: hiddenWater,
+ };
+
+ elements["soap"].reactions[nameWater] = { elem1: ["foam", "bubble"], chance: 0.005 };
+ elements["radiation"].reactions[nameWater] = { elem1: "rad_steam", chance: 0.4 };
+ elements["iron"].reactions[nameWater] = { elem1: "rust", chance: 0.005 };
+ elements["copper"].reactions[nameWater] = { elem1: "oxidized_copper", chance: 0.005 };
+ elements["steel"].reactions[nameWater] = { elem1: "rust", chance: 0.004 };
+ elements["bronze"].reactions[nameWater] = { elem1: "oxidized_copper", chance: 0.0025 };
+ }
+ eListAddIon(cation, [name, nameWater, "molten_" + name]);
+ eListAddIon(anion, [name, nameWater, "molten_" + name]);
+ eListAdd("WATER", nameWater);
+ eListAdd("COMPOUND", name);
+ eListAdd("SOLUBLE", name);
+}
+
+function toxic(name, chance, dirtyWater = false) {
+ Object.assign(elements[name].reactions, {
+ blood: { elem1: null, elem2: "infection", chance: chance },
+ soap: { elem1: null, chance: 0.02 },
+ plant: { elem1: null, elem2: "dead_plant", chance: chance },
+ evergreen: { elem1: null, elem2: "dead_plant", chance: chance },
+ cactus: { elem1: null, elem2: "dead_plant", chance: chance },
+ grass: { elem1: null, elem2: "dead_plant", chance: chance },
+ vine: { elem1: null, elem2: "dead_plant", chance: chance },
+ algae: { elem1: null, elem2: null, chance: chance },
+ kelp: { elem1: null, elem2: "dirty_water", chance: chance },
+ mushroom_spore: { elem1: null, elem2: null, chance: chance },
+ lichen: { elem1: null, elem2: null, chance: chance },
+ yeast: { elem1: null, elem2: null, chance: chance },
+ rat: { elem1: null, elem2: "rotten_meat", chance: chance },
+ frog: { elem1: null, elem2: "rotten_meat", chance: chance },
+ tadpole: { elem2: null, chance: chance },
+ fish: { elem1: null, elem2: "rotten_meat", chance: chance },
+ bird: { elem1: null, elem2: "rotten_meat", chance: chance },
+ head: { elem1: null, elem2: "rotten_meat", chance: chance },
+ body: { elem1: null, elem2: "rotten_meat", chance: chance },
+ homunculus: { elem1: null, elem2: "rotten_meat", chance: chance },
+ ant: { elem1: null, elem2: "dead_bug", chance: chance },
+ worm: { elem1: null, elem2: "dead_bug", chance: chance },
+ fly: { elem1: null, elem2: "dead_bug", chance: chance },
+ firefly: { elem1: null, elem2: "dead_bug", chance: chance },
+ bee: { elem1: null, elem2: "dead_bug", chance: chance },
+ stink_bug: { elem1: null, elem2: "dead_bug", chance: chance },
+ termite: { elem1: null, elem2: "dead_bug", chance: chance },
+ flea: { elem1: null, elem2: "dead_bug", chance: chance },
+ slug: { elem1: null, elem2: "slime", chance: chance },
+ snail: { elem1: null, elem2: "limestone", chance: chance },
+ sapling: { elem1: null, elem2: "dead_plant", chance: chance },
+ root: { elem1: null, elem2: "dead_plant", chance: chance },
+ flower_seed: { elem1: null, elem2: "dead_plant", chance: chance },
+ pistil: { elem1: null, elem2: "dead_plant", chance: chance },
+ petal: { elem1: null, elem2: "dead_plant", chance: chance },
+ grass_seed: { elem1: null, elem2: "dead_plant", chance: chance },
+ meat: { elem1: null, elem2: "rotten_meat", chance: chance },
+ cheese: { elem1: null, elem2: "rotten_cheese", chance: chance },
+ tree_branch: { elem1: null, elem2: "wood", chance: chance },
+ mushroom_cap: { elem1: null, elem2: null, chance: chance },
+ mushroom_gill: { elem1: null, elem2: null, chance: chance },
+ mushroom_stalk: { elem1: null, elem2: null, chance: chance },
+ hyphae: { elem1: null, elem2: null, chance: chance },
+ mycelium: { elem1: null, elem2: "dirt", chance: chance },
+ pollen: { elem2: null, chance: chance },
+ bone_marrow: { elem1: null, elem2: "rotten_meat", chance: chance },
+ hair: { elem1: null, elem2: null, chance: chance },
+ cell: { elem1: null, elem2: null, chance: chance },
+ cancer: { elem1: null, elem2: null, chance: chance },
+ });
+ elements.bless.reactions[name] = { elem2: null };
+ if (dirtyWater) {
+ runAfterLoad(function () {
+ reactList(name, eLists.WATER, { elem1: null, elem2: "dirty_water", chance: chance });
+ delete elements[name].reactions["dirty_water"];
+ });
+ }
+}
+
+createSalt("salt", "salt_water", null, null, false, false, 0, 0, 0, 0, 0, "SODIUM", "CHLORIDE");
+
+acidIgnore(["acid", "acid_gas", "acid_ice", "liquid_fluorine", "fluorine", "fluorine_ice", "hydrogen_fluoride", "liquid_hydrogen_fluoride", "hydrogen_fluoride_ice", "hydrofluoric_acid_ice", "hydrofluoric_acid", "hydrofluoric_acid_gas", "hydrofluoric_acid_cloud", "acid_cloud"]);
+elements.acid.name = "hydrochloricAcid";
+elements.acid_gas.name = "hydrochloricAcidGas";
+eListAddIon("CHLORIDE", ["acid", "acid_gas"], "acid");
+eListAddIon("HYDROGEN", ["acid", "acid_gas"], "acid");
+eListAddIon("FLUORIDE", ["hydrofluoric_acid", "hydrofluoric_acid_gas"], "acid");
+eListAddIon("HYDROGEN", ["hydrofluoric_acid", "hydrofluoric_acid_gas"], "acid");
+
+createAcid("generic_acid", defaultAcidReactions, defaultAcidGasReactions, "#80d488", true, true, 110, 100, -10, 400, 1020, 1);
+elements.generic_acid.name = "acid";
+elements.generic_acid_gas.name = "acid_gas";
+
+eLists.ACID.push("generic_acid");
+eLists.ACIDGAS.push("generic_acid_gas");
+
+if (!enabledMods.includes("mods/generative_mods.js")) {
+ elements.acid_cloud.behavior = ["XX|XX|XX", "XX|CH:generic_acid%0.05|M1%2.5 AND BO", "XX|XX|XX"];
+}
+
+createAcid("nitric_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#91993c", "#6b7041", "#5f614b"], false, false, 83, 70, -42, 400, 1500, 1.5, "NITRATE", { compound: "acid", dontDirtyWater: true });
+
+acidReact("nitric_acid", "ammonia", "fertilizer", null, 0);
+acidReact("nitric_acid_gas", "ammonia", "fertilizer", null, 0);
+
+eLists.ACID.push("nitric_acid");
+eLists.ACIDGAS.push("nitric_acid_gas");
+
+elements.nitric_oxide = {
+ color: "#b8926c",
+ behavior: behaviors.GAS,
+ reactions: {
+ steam: { elem1: "smog", elem2: null, chance: 0.01 },
+ oxygen: { elem1: "nitrogen_dioxide", elem2: null },
+ },
+ tempLow: -152,
+ category: "gases",
+ state: "gas",
+ density: 1.34,
+};
+
+toxic("nitric_oxide", 0.1);
+
+elements.liquid_nitric_oxide = {
+ tempLow: -164,
+ hidden: true,
+};
+elements.nitrogen_dioxide = {
+ color: "#964B00",
+ behavior: behaviors.GAS,
+ reactions: {
+ steam: { elem1: "smog", elem2: null, chance: 0.01 },
+ },
+ temp: 30,
+ tempLow: 21.15,
+ category: "gases",
+ state: "gas",
+ density: 1.88,
+};
+
+toxic("nitrogen_dioxide", 0.2);
+
+runAfterLoad(function () {
+ reactList("nitrogen_dioxide", eLists.WATER, { elem1: "nitric_oxide", elem2: "nitric_acid" });
+ reactList("liquid_nitrogen_dioxide", eLists.WATER, { elem1: "nitric_oxide", elem2: "nitric_acid" });
+ reactList("nitric_acid", eLists.WATER, { elem2: "dirty_water" });
+ reactList("nitric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.nitric_acid.reactions["dirty_water"];
+ delete elements.nitric_acid_gas.reactions["dirty_water"];
+});
+
+elements.liquid_nitrogen_dioxide = {
+ tempLow: -9.3,
+ hidden: true,
+ reactions: structuredClone(elements.nitrogen_dioxide.reactions),
+};
+
+if (enabledMods.includes("mods/generative_mods.js")) {
+ elements["nitrogen_dioxide"].reactions["rain_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["snow_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["hail_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["pyrocumulus"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["fire_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["thunder_cloud"] = { elem1: null, elem2: "nitric_acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+} else {
+ elements["nitrogen_dioxide"].reactions["rain_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["snow_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["hail_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["pyrocumulus"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["fire_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+ elements["nitrogen_dioxide"].reactions["thunder_cloud"] = { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" };
+}
+
+acidIgnore(["nitric_oxide", "liquid_nitric_oxide", "nitric_oxide_ice", "nitrogen_dioxide", "liquid_nitrogen_dioxide", "nitrogen_dioxide_ice"]);
+
+elements.fertilizer = {
+ color: "#e6c3a1",
+ behavior: behaviors.POWDER,
+ reactions: {
+ plant: { elem1: "plant", chance: 0.05 },
+ wheat_seed: { elem1: "wheat", chance: 0.05 },
+ grass: { elem1: "grass", chance: 0.05 },
+ grass_seed: { elem1: "grass", chance: 0.05 },
+ bamboo_plant: { elem1: "bamboo", chance: 0.05 },
+ flower_seed: { elem1: "flower_seed", chance: 0.05 },
+ petal: { elem1: "flower_seed", chance: 0.05 },
+ vine: { elem1: "vine", chance: 0.05 },
+ sapling: { elem1: "tree_branch", chance: 0.05 },
+ tree_branch: { elem1: "tree_branch", chance: 0.05 },
+ corn_seed: { elem1: "corn", chance: 0.05 },
+ root: { elem1: "root", chance: 0.05 },
+ dirt: { elem1: "grass", chance: 0.05 },
+ mud: { elem1: "grass", chance: 0.05 },
+ potato_seed: { elem1: "potato", chance: 0.05 },
+ yeast: { elem1: "yeast", chance: 0.05 },
+ },
+ tempHigh: 169.6,
+ stateHigh: "fire",
+ category: "powders",
+ state: "solid",
+ density: 1725,
+};
+
+elements.ammonia.reactions["oxygen"] = { elem1: "steam", elem2: "nitric_oxide" };
+
+elements.supernova.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,molten_iron,molten_uranium,molten_lead,oxygen,molten_sodium,sulfur_gas,fluorine,neon,molten_potassium,chlorine,molten_calcium,molten_titanium,molten_nickel,molten_copper,molten_zinc,gallium_gas,bromine_gas,iodine_gas AND CH:neutronium,neutronium,quark_matter,void|XX", "XX|XX|XX"];
+
+elements.gamma_ray_burst = {
+ color: ["#fbf8ff", "#fbf3ff", "#f8f7ff"],
+ behavior: ["XX|XX|XX", "XX|EX:100>plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,plasma,molten_gold,molten_uranium,molten_lead,molten_tungsten,molten_nickel,molten_copper,molten_zinc,gallium_gas,bromine_gas,iodine_gas,molten_tin,molten_silver AND CH:void|XX", "XX|XX|XX"],
+ temp: 99999999700,
+ category: "energy",
+ state: "gas",
+ density: 1000,
+ hardness: 1,
+ hidden: true,
+ excludeRandom: true,
+ maxSize: 1,
+};
+
+elements.neutronium = {
+ color: "#aaffff",
+ behavior: ["XX|CR:neutron%0.1|XX", "CR:neutron%0.1|XX|CR:neutron%0.1", "XX|CR:neutron%0.1|XX"],
+ temp: 1e6,
+ tempHigh: 1e7,
+ stateHigh: "liquid_neutronium",
+ tempLow: 1e5,
+ stateLow: ["molten_uranium", "molten_gold", "molten_tungsten", "molten_lead"],
+ breakInto: ["gamma_ray_burst", "supernova", "supernova"],
+ category: "special",
+ state: "solid",
+ density: 4e17,
+ hardness: 0.999,
+ excludeRandom: true,
+};
+
+elements.liquid_neutronium = {
+ color: "#ffffaa",
+ behavior2: ["XX|CR:neutron%0.2|XX".split("|"), "M1 AND CR:neutron%0.2|XX|M1 AND CR:neutron%0.2".split("|"), "M1|M1|M1".split("|")],
+ tick: function (pixel) {
+ if (!isEmpty(pixel.x - 1, pixel.y, false) && (isEmpty(pixel.x - 1, pixel.y, true) || pixelMap[pixel.x - 1][pixel.y].element !== "liquid_neutronium") && !(outOfBounds(pixel.x - 1, pixel.y - 1) || !isEmpty(pixel.x - 1, pixel.y - 1, true))) {
+ tryMove(pixel, pixel.x - 1, pixel.y - 1);
+ } else if (!isEmpty(pixel.x + 1, pixel.y, false) && (isEmpty(pixel.x + 1, pixel.y, true) || pixelMap[pixel.x + 1][pixel.y].element !== "liquid_neutronium") && !(outOfBounds(pixel.x + 1, pixel.y - 1) || !isEmpty(pixel.x + 1, pixel.y - 1, true))) {
+ tryMove(pixel, pixel.x + 1, pixel.y - 1);
+ } else if (((!isEmpty(pixel.x + 1, pixel.y, false) && (isEmpty(pixel.x + 1, pixel.y, true) || pixelMap[pixel.x + 1][pixel.y].element !== "liquid_neutronium")) || (!isEmpty(pixel.x - 1, pixel.y, false) && (isEmpty(pixel.x - 1, pixel.y, true) || pixelMap[pixel.x - 1][pixel.y].element !== "liquid_neutronium"))) && !(outOfBounds(pixel.x, pixel.y - 1) || !isEmpty(pixel.x, pixel.y - 1, true))) {
+ tryMove(pixel, pixel.x, pixel.y - 1);
+ } else {
+ pixelTick(pixel, elements.liquid_neutronium.behavior2);
+ }
+ doDefaults(pixel);
+ },
+ temp: 2e7,
+ tempLow: 1e7,
+ stateLow: "neutronium",
+ breakInto: ["gamma_ray_burst", "supernova", "supernova"],
+ category: "special",
+ state: "liquid",
+ density: 2e17,
+ hardness: 0.999,
+ excludeRandom: true,
+};
+
+elements.liquid_helium.behavior2 = ["XX|XX|XX".split("|"), "M1|XX|M1".split("|"), "M1|M1|M1".split("|")];
+elements.liquid_helium.behavior = null;
+
+elements.liquid_helium.tick = function (pixel) {
+ if (Math.random() < 0.9) {
+ if (!isEmpty(pixel.x - 1, pixel.y, false) && (isEmpty(pixel.x - 1, pixel.y, true) || pixelMap[pixel.x - 1][pixel.y].element !== "liquid_helium") && !(outOfBounds(pixel.x - 1, pixel.y - 1) || !isEmpty(pixel.x - 1, pixel.y - 1, true))) {
+ tryMove(pixel, pixel.x - 1, pixel.y - 1);
+ } else if (!isEmpty(pixel.x + 1, pixel.y, false) && (isEmpty(pixel.x + 1, pixel.y, true) || pixelMap[pixel.x + 1][pixel.y].element !== "liquid_helium") && !(outOfBounds(pixel.x + 1, pixel.y - 1) || !isEmpty(pixel.x + 1, pixel.y - 1, true))) {
+ tryMove(pixel, pixel.x + 1, pixel.y - 1);
+ } else if (((!isEmpty(pixel.x + 1, pixel.y, false) && (isEmpty(pixel.x + 1, pixel.y, true) || pixelMap[pixel.x + 1][pixel.y].element !== "liquid_helium")) || (!isEmpty(pixel.x - 1, pixel.y, false) && (isEmpty(pixel.x - 1, pixel.y, true) || pixelMap[pixel.x - 1][pixel.y].element !== "liquid_helium"))) && !(outOfBounds(pixel.x, pixel.y - 1) || !isEmpty(pixel.x, pixel.y - 1, true))) {
+ tryMove(pixel, pixel.x, pixel.y - 1);
+ } else {
+ pixelTick(pixel, elements.liquid_helium.behavior2);
+ }
+ } else {
+ pixelTick(pixel, elements.liquid_helium.behavior2);
+ }
+ doDefaults(pixel);
+};
+
+elements.quark_matter = {
+ color: ["#ff0000", "#00ff00", "#0000ff"],
+ behavior: ["XX|CR:neutron%0.1 AND CR:proton%0.1|XX", "M2 AND CR:neutron%0.1 AND CR:proton%0.1|XX|M2 AND CR:neutron%0.1 AND CR:proton%0.1", "M1|M1|M1"],
+ tick: function (pixel) {
+ pixel.color = pixelColorPick(pixel);
+ },
+ temp: 2e7,
+ breakInto: "gamma_ray_burst",
+ category: "special",
+ state: "liquid",
+ density: 4e18,
+ hardness: 0.999,
+ excludeRandom: true,
+};
+
+elements.sulfur.burnInto = ["sulfur_dioxide"];
+elements.molten_sulfur.burnInto = ["sulfur_dioxide"];
+elements.sulfur_gas.burnInto = ["sulfur_dioxide"];
+elements.sulfur.reactions["hydrogen"] = { elem1: "hydrogen_sulfide", elem2: null };
+
+elements.sulfur_dioxide = {
+ color: "#FFF700",
+ behavior: behaviors.GAS,
+ reactions: {
+ steam: { elem1: null, elem2: ["sulfuric_acid_gas", null, null, null, null] },
+ acid_gas: { elem1: null, elem2: ["sulfuric_acid_gas", null, null, null, null] },
+ //clouds
+ rain_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ snow_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ hail_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ pyrocumulus: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ fire_cloud: { elem1: null, elem2: "acid_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ },
+ tempLow: -10,
+ stateLow: "liquid_sulfur_dioxide",
+ state: "gas",
+ category: "gases",
+ density: 2.6,
+};
+
+toxic("sulfur_dioxide", 0.1);
+
+runAfterLoad(function () {
+ reactList("sulfur_dioxide", eLists.WATER, { elem1: null, elem2: ["sulfuric_acid_gas", null, null, null, null] });
+});
+
+elements.liquid_sulfur_dioxide = {
+ color: "#d1cb17",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ reactions: elements.sulfur_dioxide.reactions,
+ tempHigh: -10,
+ temp: -15,
+ tempLow: -72,
+ stateHigh: "sulfur_dioxide",
+ state: "liquid",
+ hidden: true,
+ density: 1435,
+};
+
+elements.hydrogen_sulfide = {
+ color: "#d9e366",
+ behavior: behaviors.GAS,
+ reactions: {
+ oxygen: { elem2: "stench" },
+ nitrogen: { elem2: "stench" },
+ baking_soda: { elem1: null },
+ },
+ category: "gases",
+ tempHigh: 1000,
+ stateHigh: "fire",
+ state: "gas",
+ density: 1.539,
+ tempLow: -59.55,
+ burn: 1,
+ burnTime: 10,
+ burnInto: ["sulfur_dioxide", "steam"],
+ fireColor: ["#8180CC", "#7F84E6"],
+};
+toxic("hydrogen_sulfide", 0.2);
+
+runAfterLoad(function () {
+ reactList("hydrogen_sulfide", eLists.WATER, { elem1: null, elem2: "dirty_water" });
+ delete elements.hydrogen_sulfide.reactions["dirty_water"];
+ delete elements.hydrogen_sulfide.reactions["iron_dichloride_solution"];
+});
+
+acidIgnore(["sulfur_dioxide", "liquid_sulfur_dioxide", "sulfur_dioxide_ice"]);
+
+elements.acid.ignore.push("liquid_hydrogen_sulfide");
+elements.acid_gas.ignore.push("liquid_hydrogen_sulfide");
+
+acidReact("acid", "pyrite", "iron_dichloride_solution", "hydrogen_sulfide", 50);
+acidReact("acid_gas", "pyrite", "iron_dichloride_solution", "hydrogen_sulfide", 50);
+
+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;
+}
+
+createSalt("iron_dichloride", "iron_dichloride_solution", ["#207d09", "#b51259"], [blendColors("#207d09", "#2167ff", 0.5), blendColors("#b51259", "#2167ff", 0.5)], false, true, 307.6, -2, 102, 2900, 1030, "IRONII", "CHLORIDE");
+
+createAcid("sulfuric_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#e9e05e", "#c2bd7a", "#9e9c7b"], false, false, 337, 337, 10, 500, 1830, 1.26, "SULFATE", { compound: "acid", dontDirtyWater: true });
+
+elements.sulfuric_acid.ignore.push("charcoal");
+elements.sulfuric_acid_gas.ignore.push("charcoal");
+
+runAfterLoad(function () {
+ reactList("sulfuric_acid", eLists.WATER, { elem2: "dirty_water" });
+ reactList("sulfuric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.sulfuric_acid.reactions["dirty_water"];
+ delete elements.sulfuric_acid_gas.reactions["dirty_water"];
+});
+elements.sulfuric_acid.reactions["grape"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["juice"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["corn"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["popcorn"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["potato"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["bread"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["toast"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["wheat"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["flour"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["dough"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["sugar"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid.reactions["candy"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+delete elements.sulfuric_acid.reactions["charcoal"];
+elements.sulfuric_acid_gas.reactions["chocolate"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["grape"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["juice"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["corn"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["popcorn"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["potato"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["bread"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["toast"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["wheat"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["flour"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["dough"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["sugar"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+elements.sulfuric_acid_gas.reactions["candy"] = { elem1: "charcoal", elem2: "steam", temp2: 200 };
+delete elements.sulfuric_acid_gas.reactions["charcoal"];
+
+acidReact("sulfuric_acid", "magnesium_oxide", "epsom_salt", null, 50);
+acidReact("sulfuric_acid_gas", "magnesium_oxide", "epsom_salt", null, 50);
+
+eLists.ACID.push("sulfuric_acid");
+eLists.ACIDGAS.push("sulfuric_acid_gas");
+
+elements.polytetrafluoroethylene = {
+ color: "#efefef",
+ behavior: behaviors.WALL,
+ properties: {
+ colored: false,
+ },
+ tick: function (pixel) {
+ if (!pixel.colored) {
+ let rgb = elements.polytetrafluoroethylene.colorObject;
+
+ let coloroffset = Math.floor(Math.random() * (Math.random() > 0.5 ? -1 : 1) * Math.random() * 2);
+ let r = rgb.r + coloroffset;
+ let g = rgb.g + coloroffset;
+ let b = rgb.b + coloroffset;
+ pixel.color = "rgb(" + r + "," + g + "," + b + ")";
+ pixel.colored = true;
+ pixel.origColor = pixel.color.match(/\d+/g);
+ }
+ if (pixel.origColor != pixel.color) {
+ pixel.color = "rgb(" + pixel.origColor.join(",") + ")";
+ }
+ },
+ state: "solid",
+ category: "solids",
+ density: 1450,
+ tempHigh: 327,
+};
+acidIgnore(["polytetrafluoroethylene", "molten_polytetrafluoroethylene", "tetrafluoroethylene"]);
+
+doStaining = function (pixel) {
+ if (settings["stainoff"]) {
+ return;
+ }
+ var stain = elements[pixel.element].stain;
+ let newColor = null;
+ if (stain > 0) {
+ newColor = pixel.color.match(/\d+/g);
+ } else {
+ newColor = null;
+ }
+
+ for (var i = 0; i < adjacentCoords.length; i++) {
+ var x = pixel.x + adjacentCoords[i][0];
+ var y = pixel.y + adjacentCoords[i][1];
+ if (!isEmpty(x, y, true)) {
+ var newPixel = pixelMap[x][y];
+ if ((elements[pixel.element].ignore && elements[pixel.element].ignore.indexOf(newPixel.element) !== -1) || newPixel.element == "polytetrafluoroethylene") {
+ continue;
+ }
+ if ((elements[newPixel.element].id !== elements[pixel.element].id || elements[newPixel.element].stainSelf) && (solidStates[elements[newPixel.element].state] || elements[newPixel.element].id === elements[pixel.element].id)) {
+ if (Math.random() < Math.abs(stain)) {
+ if (stain < 0) {
+ if (newPixel.origColor) {
+ newColor = newPixel.origColor;
+ } else {
+ continue;
+ }
+ } else if (!newPixel.origColor) {
+ newPixel.origColor = newPixel.color.match(/\d+/g);
+ }
+ // if newPixel.color doesn't start with rgb, continue
+ if (!newPixel.color.match(/^rgb/)) {
+ continue;
+ }
+ // parse rgb color string of newPixel rgb(r,g,b)
+ var rgb = newPixel.color.match(/\d+/g);
+ let avg = [];
+ if (elements[pixel.element].stainSelf && elements[newPixel.element].id === elements[pixel.element].id) {
+ // if rgb and newColor are the same, continue
+ if (rgb[0] === newColor[0] && rgb[1] === newColor[1] && rgb[2] === newColor[2]) {
+ continue;
+ }
+ for (var j = 0; j < rgb.length; j++) {
+ avg[j] = Math.round(rgb[j] * (1 - Math.abs(stain)) + newColor[j] * Math.abs(stain));
+ }
+ } else {
+ // get the average of rgb and newColor, more intense as stain reaches 1
+ for (let j = 0; j < rgb.length; j++) {
+ avg[j] = Math.floor(rgb[j] * (1 - Math.abs(stain)) + newColor[j] * Math.abs(stain));
+ }
+ }
+ // set newPixel color to avg
+ newPixel.color = "rgb(" + avg.join(",") + ")";
+ }
+ }
+ }
+ }
+};
+elements["bleach"].reactions.vinegar = { elem1: "chlorine", elem2: null };
+elements["bleach"].reactions.alcohol = { elem1: "chloroform", elem2: null };
+elements["chlorine"].reactions.methane = { elem1: "chloroform", elem2: null };
+
+elements.chloroform = {
+ color: "#7f7f7f",
+ behavior: behaviors.LIQUID,
+ reactions: elements.poison.reactions,
+ state: "liquid",
+ category: "liquids",
+ density: 1564,
+ tempLow: -63,
+ tempHigh: 61,
+};
+
+elements.chloroform_gas = {
+ color: "#8f8f8f",
+ behavior: behaviors.GAS,
+ reactions: elements.poison.reactions,
+ state: "gas",
+ hidden: true,
+ density: 4.12,
+ tempLow: 61,
+ stateLow: "chloroform",
+};
+
+elements["chloroform_gas"].reactions.hydrogen_fluoride = { elem1: "tetrafluoroethylene", elem2: null, tempMin: 550 };
+
+elements.tetrafluoroethylene = {
+ color: "#8f8f8f",
+ behavior: behaviors.GAS,
+ reactions: {
+ oxygen: { elem1: "fire", elem2: "fire" },
+ sulfuric_acid: { elem1: "polytetrafluoroethylene", elem2: "sulfuric_acid", chance: 0.25 },
+ sulfuric_acid_gas: { elem1: "polytetrafluoroethylene", elem2: "sulfuric_acid_gas", chance: 0.25 },
+ },
+ state: "gas",
+ hidden: true,
+ burn: 100,
+ burnTime: 2,
+ density: 1.52,
+ category: "gases",
+};
+
+elements.methanol = {
+ color: "#969380",
+ behavior: behaviors.LIQUID,
+ reactions: {
+ plant: { elem2: "dead_plant", elem1: null, chance: 0.05 },
+ cell: { elem2: [null, "dna"], chance: 0.075 },
+ blood: { elem2: [null, "dna"], chance: 0.075 },
+ antibody: { elem2: [null, "dna"], chance: 0.075 },
+ infection: { elem2: [null, "dna"], chance: 0.075 },
+ cancer: { elem2: [null, "dna"], chance: 0.0375 },
+ flea: { elem2: "dead_bug", elem1: null },
+ termite: { elem2: "dead_bug", elem1: null },
+ ant: { elem2: "dead_bug", elem1: null },
+ frog: { elem2: "meat", chance: 0.05 },
+ evergreen: { elem2: "dead_plant", chance: 0.05 },
+ cactus: { elem2: "dead_plant", chance: 0.05 },
+ paper: { elem2: "cellulose" },
+ primordial_soup: { elem2: "water" },
+ },
+ state: "liquid",
+ category: "liquids",
+ density: 792,
+ tempLow: -97.6,
+ tempHigh: 64.7,
+ burn: 100,
+ burnTime: 3,
+ fireColor: ["#80acf0", "#96cdfe", "#bee6d4"],
+};
+
+elements.carbon_dioxide.reactions.hydrogen = { elem1: "steam", elem2: "methanol", tempMin: 100 };
+
+elements.polyethylene = {
+ color: "#a7a7a7",
+ behavior: behaviors.WALL,
+ properties: {
+ colored: false,
+ },
+ tick: function (pixel) {
+ if (!pixel.colored) {
+ let rgb = elements.polyethylene.colorObject;
+
+ let coloroffset = Math.floor(Math.random() * (Math.random() > 0.5 ? -1 : 1) * Math.random() * 2);
+ let r = rgb.r + coloroffset;
+ let g = rgb.g + coloroffset;
+ let b = rgb.b + coloroffset;
+ pixel.color = "rgb(" + r + "," + g + "," + b + ")";
+ pixel.colored = true;
+ pixel.origColor = pixel.color.match(/\d+/g);
+ }
+ },
+ state: "solid",
+ category: "solids",
+ density: 1450,
+ tempHigh: 125,
+};
+
+elements.ethane = {
+ color: "#afafaf",
+ behavior: behaviors.GAS,
+ reactions: {
+ steam: { elem1: "hydrogen", elem2: "ethylene", chance: 0.01 },
+ chlorine: { elem1: "chloroethane", elem2: null, chance: 0.01 },
+ },
+ category: "gases",
+ tempHigh: 400,
+ stateHigh: "fire",
+ tempLow: -88.5,
+ burn: 85,
+ burnTime: 5,
+ fireColor: ["#00ffff", "#00ffdd"],
+ state: "gas",
+ density: 1.356,
+};
+
+elements.chloroethane = {
+ color: "#afdfaf",
+ behavior: behaviors.GAS,
+ reactions: {
+ aluminum: { elem1: "diethylaluminium_chloride", elem2: null, chance: 0.1 },
+ },
+ category: "gases",
+ tempHigh: 510,
+ stateHigh: "fire",
+ tempLow: 12.27,
+ burn: 85,
+ burnTime: 5,
+ fireColor: ["#00ffff", "#00ffdd"],
+ state: "gas",
+ density: 2.879,
+};
+
+elements.diethylaluminium_chloride = {
+ color: "#7faf7f",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ hidden: true,
+ tempHigh: 125,
+ stateHigh: "fire",
+ tempLow: -74,
+ burn: 85,
+ burnTime: 10,
+ state: "liquid",
+ density: 2.879,
+ reactions: {},
+};
+
+toxic("diethylaluminium_chloride", 0.1);
+
+elements.ethylene = {
+ color: "#a7a7a7",
+ behavior: behaviors.GAS,
+ reactions: {
+ titanium_trichloride: { elem1: "polyethylene", chance: 0.1 },
+ acid_gas: { elem1: "chloroethane", elem2: null },
+ diethylaluminium_chloride: { elem1: "polyethylene", chance: 0.1 },
+ },
+ category: "gases",
+ tempHigh: 400,
+ stateHigh: "fire",
+ tempLow: -103.7,
+ burn: 85,
+ burnTime: 5,
+ fireColor: ["#00ffff", "#00ffdd"],
+ state: "gas",
+ density: 1.356,
+};
+
+elements.liquid_ethylene = {
+ tempHigh: -103.7,
+ stateHigh: "ethylene",
+ tempLow: -154.4,
+};
+elements.liquid_ethane = {
+ tempHigh: -88.5,
+ stateHigh: "ethane",
+ tempLow: -128.2,
+};
+
+elements.liquid_ethylene = {
+ tempHigh: -103.7,
+ stateHigh: "ethylene",
+ tempLow: -169.2,
+};
+elements.liquid_ethane = {
+ tempHigh: -88.5,
+ stateHigh: "ethane",
+ tempLow: -182.8,
+};
+
+elements.liquid_chloroethane = {
+ tempHigh: -12.27,
+ stateHigh: "chloroethane",
+ tempLow: -138.7,
+};
+
+elements.liquid_propane = {
+ tempHigh: -42.25,
+ stateHigh: "propane",
+ tempLow: -187.7,
+};
+
+elements.acid.ignore.push("ethylene", "ethylene_ice", "liquid_ethylene", "chloroethane", "chloroethane_ice", "liquid_chloroethane");
+elements.acid_gas.ignore.push("ethylene", "ethylene_ice", "liquid_ethylene", "chloroethane", "chloroethane_ice", "liquid_chloroethane");
+
+elements.titanium = {
+ color: "#e3e5e6",
+ category: "solids",
+ density: 4500,
+ state: "solid",
+ behavior: behaviors.WALL,
+ reactions: {
+ acid: { elem1: "titanium_trichloride", elem2: null },
+ },
+ stateHigh: "molten_titanium",
+ tempHigh: 1668,
+ conduct: 0.5,
+ hardness: 0.7,
+ forceAutoGen: true,
+};
+elements.molten_titanium = {
+ color: ["#e0921d", "#e89e2e", "#f7b24a", "#fce168", "#fceca2", "#fffcf0"],
+ viscosity: 10000,
+};
+
+elements.rutile = {
+ color: "#522614",
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 4240,
+ state: "solid",
+ tempHigh: 1843,
+ stateHigh: "molten_rutile",
+ forceAutoGen: true,
+};
+elements.molten_rutile = {
+ color: ["#e3907f", "#e68f3e"],
+ reactions: {
+ chlorine: { elem1: "titanium_tetrachloride", elem2: null },
+ },
+ viscosity: 10000,
+};
+elements.titanium_tetrachloride = {
+ color: "#d9d7b2",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ density: 1728,
+ state: "liquid",
+ tempHigh: 136.4,
+ stateHighName: "titanium_tetrachloride_gas",
+ tempLow: -24,
+ stateLowName: "solid_titanium_tetrachloride",
+ reactions: {}
+};
+eListAddIon("TITANIUMIV", "solid_titanium_tetrachloride");
+eListAddIon("CHLORIDE", "solid_titanium_tetrachloride");
+eListAddIon("TITANIUMIV", "titanium_tetrachloride");
+eListAddIon("CHLORIDE", "titanium_tetrachloride");
+eListAddIon("TITANIUMIV", "titanium_tetrachloride_gas");
+eListAddIon("CHLORIDE", "titanium_tetrachloride_gas");
+eListAdd("INSOLUBLE", "titanium_tetrachloride");
+
+elements.titanium_tetrachloride_gas = {
+ behavior: behaviors.GAS,
+ hidden: true,
+ category: "gases",
+ density: 500,
+ state: "gas",
+ temp: 200,
+ tempLow: 136.4,
+ stateLow: "titanium_tetrachloride",
+ reactions: {}
+};
+
+toxic("titanium_tetrachloride", 0.1);
+toxic("titanium_tetrachloride_gas", 0.1);
+elements.solid_titanium_tetrachloride = {
+ behavior: behaviors.WALL,
+ hidden: true,
+ category: "solids",
+ density: 1728,
+ state: "solid",
+ temp: -50,
+ tempHigh: -24,
+ stateHigh: "titanium_tetrachloride",
+};
+
+createSalt("titanium_trichloride", "titanium_trichloride_solution", "#c71585", blendColors("#c71585", "#2167ff", 0.4), false, true, 440, -2, 102, 2640, 1020, "TITANIUMIII", "CHLORIDE");
+
+elements["titanium_trichloride"].behavior = behaviors.SOLID;
+elements["titanium_trichloride"].category = "solids";
+elements["titanium_trichloride"].stateHigh = ["chlorine", "titanium_tetrachloride"];
+delete elements["molten_titanium_trichloride"];
+toxic("titanium_trichloride_solution", 0.1);
+toxic("titanium_trichloride", 0.1);
+
+elements.magnesium.burnInto = "magnesium_oxide";
+elements.molten_magnesium.burnInto = "magnesium_oxide";
+elements.molten_magnesium.reactions = {
+ titanium_tetrachloride: { elem1: "titanium", elem2: "magnesium_chloride" },
+ titanium_tetrachloride_gas: { elem1: "titanium", elem2: "magnesium_chloride" },
+};
+
+elements.magnesium_oxide = {
+ color: "#f0f0f0",
+ behavior: behaviors.POWDER,
+ reactions: {
+ quicklime: { elem1: "cement", elem2: null },
+ },
+ category: "powders",
+ density: 3600,
+ state: "solid",
+ tempHigh: 2852,
+};
+
+eListAdd("INSOLUBLE", "magnesium_oxide");
+eListAddIon("MAGNESIUM", "magnesium_oxide");
+eListAddIon("OXIDE", "magnesium_oxide");
+eListAddIon("MAGNESIUM", "molten_magnesium_oxide");
+eListAddIon("OXIDE", "molten_magnesium_oxide");
+
+elements.molten_magnesium_chloride = {
+ behaviorOn: ["XX|CR:fire%2.5|XX", "M2|CH:chlorine,magnesium%25|M2", "M1|M1|M1"],
+ conduct: 0.3,
+};
+
+createSalt("magnesium_chloride", "magnesium_chloride_solution", "#bfbfbf", blendColors("#bfbfbf", "#2167ff", 0.75), false, true, 714, -2, 102, 2320, 1015, "MAGNESIUM", "CHLORIDE");
+
+elements.magnesium_chloride.forceAutoGen = true;
+
+elements.francium = {
+ color: "#3eff3b",
+ behavior: ["XX|CR:radiation%50|XX", "CR:radiation%50|CH:radon%0.1|CR:radiation%50", "M2|M1|M2"],
+ tick: function (pixel) {
+ pixel.temp += 5;
+ },
+ reactions: {
+ steam: { elem1: "radon", elem2: [null, null, "rad_pop"] },
+ rad_steam: { elem1: "radon", elem2: [null, null, "rad_pop"] },
+ quark_matter: { elem1: "stable_francium", elem2: "quark_matter" },
+ },
+ tempHigh: 27,
+ category: "powders",
+ state: "solid",
+ density: 2480,
+ conduct: 0.7,
+};
+
+runAfterLoad(function () {
+ reactList("francium", eLists.WATER, { elem1: "radon", elem2: [null, null, "rad_pop"] });
+});
+
+elements.molten_francium = {
+ behavior: ["XX|CR:radiation%50|XX", "M2 AND CR:radiation%50|CH:radon%0.1|M2 AND CR:radiation%50", "M1|M1|M1"],
+ tick: function (pixel) {
+ pixel.temp += 5;
+ },
+ reactions: {
+ steam: { elem1: "radon", elem2: [null, null, "rad_pop"] },
+ rad_steam: { elem1: "radon", elem2: [null, null, "rad_pop"] },
+ quark_matter: { elem1: "stable_francium", elem2: "quark_matter" },
+ },
+ tempLow: 27,
+ hidden: true,
+ state: "liquid",
+ density: 2480,
+ conduct: 0.7,
+};
+
+runAfterLoad(function () {
+ reactList("molten_francium", eLists.WATER, { elem1: "radon", elem2: [null, null, "rad_pop"] });
+});
+
+elements.astatine = {
+ color: "#5a5e5a",
+ behavior: ["XX|CR:radiation%50|XX", "CR:radiation%50|CH:polonium,big_pop%0.1|CR:radiation%50", "M2|M1|M2"],
+ tick: function (pixel) {
+ pixel.temp += 5;
+ },
+ reactions: {
+ quark_matter: { elem1: "stable_astatine", elem2: "quark_matter" },
+ },
+ tempHigh: 301,
+ category: "powders",
+ state: "solid",
+ density: 8910,
+};
+elements.molten_astatine = {
+ color: "#aab0a0",
+ behavior: ["XX|CR:radiation%50|XX", "M2 AND CR:radiation%50|CH:polonium,big_pop%0.1|M2 AND CR:radiation%50", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "molten_stable_astatine", elem2: "quark_matter" },
+ },
+ tick: function (pixel) {
+ pixel.temp += 5;
+ },
+ tempLow: 301,
+ hidden: true,
+ state: "liquid",
+ density: 8910,
+ tempHigh: 336,
+};
+elements.astatine_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%50", "XX"],
+ ["CR:radiation%50", "CH:polonium,big_pop%0.1", "CR:radiation%50"],
+ ["XX", "CR:radiation%50", "XX"],
+ ],
+ reactions: {
+ quark_matter: { elem1: "molten_stable_astatine", elem2: "quark_matter" },
+ },
+ tick: function (pixel) {
+ pixel.temp += 5;
+ pixelTick(pixel, elements[pixel.element].behavior2);
+ },
+};
+
+elements.radon = {
+ color: "#b6ffb5",
+ behavior: ["M2|M1 AND CR:radiation%10|M2", "M1 AND CR:radiation%10|CH:polonium%0.1|M1 AND CR:radiation%10", "M2|M1 AND CR:radiation%10|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_radon", elem2: "quark_matter" },
+ },
+ tick: function (pixel) {
+ pixel.temp += 1;
+ },
+ category: "gases",
+ state: "gas",
+ density: 9.73,
+ colorOn: ["#b224ff", "#cc6caa", "#a16ccc"],
+ conduct: 0.86,
+};
+
+elements.polonium = {
+ color: "#56b870",
+ behavior: ["XX|CR:radiation%10|XX", "CR:radiation%10|CH:lead%0.1|CR:radiation%10", "XX|CR:radiation%10|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_polonium", elem2: "quark_matter" },
+ },
+ tick: function (pixel) {
+ pixel.temp += 1;
+ },
+ tempHigh: 254,
+ category: "solids",
+ state: "solid",
+ density: 9196,
+ conduct: 0.21,
+};
+elements.molten_polonium = {
+ color: ["#ace638", "#acb838", "#ac8a00"],
+ behavior: ["XX|CR:fire AND CR:radiation%12.5|XX", "M2 AND CR:radiation%10|CH:lead%0.1|M2 AND CR:radiation%10", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "molten_stable_polonium", elem2: "quark_matter" },
+ },
+ tick: function (pixel) {
+ pixel.temp += 1;
+ },
+ tempLow: 254,
+ hidden: true,
+ state: "liquid",
+ density: 9196,
+ conduct: 0.21,
+};
+
+elements.rad_pop = {
+ color: ["#ffb48f", "#ffd991", "#ffad91"],
+ behavior: ["XX|XX|XX", "XX|EX:10>fire,radiation,radiation|XX", "XX|XX|XX"],
+ category: "energy",
+ state: "gas",
+ density: 1000,
+ excludeRandom: true,
+ hidden: true,
+};
+
+elements.stable_radon = {
+ color: [blendColors("#b6ffb5", "#ff0000"), blendColors("#b6ffb5", "#00ff00"), blendColors("#b6ffb5", "#0000ff")],
+ behavior: behaviors.GAS,
+ category: "gases",
+ state: "gas",
+ density: 9.73,
+ hidden: true,
+ tempLow: -61.7,
+ colorOn: ["#b224ff", "#cc6caa", "#a16ccc"],
+ conduct: 0.86,
+};
+
+elements.liquid_stable_radon = {
+ tempLow: -71,
+ density: 4400,
+ colorOn: ["#b224ff", "#cc6caa", "#a16ccc"],
+ conduct: 0.86,
+};
+
+elements.stable_polonium = {
+ color: [blendColors("#56b870", "#ff0000"), blendColors("#56b870", "#00ff00"), blendColors("#56b870", "#0000ff")],
+ behavior: behaviors.WALL,
+ reactions: {
+ oxygen: { elem1: "polonium_dioxide", elem2: null },
+ },
+ tempHigh: 254,
+ hidden: true,
+ category: "solids",
+ state: "solid",
+ density: 9196,
+ conduct: 0.21,
+};
+elements.molten_stable_polonium = {
+ color: [blendColors("#ace638", "#ff0000"), blendColors("#acb838", "#00ff00"), blendColors("#ac8a00", "#0000ff")],
+ behavior: behaviors.MOLTEN,
+ reactions: {
+ oxygen: { elem1: "polonium_dioxide", elem2: null },
+ magnesium: { elem1: "magnesium_polonide", elem2: null },
+ molten_magnesium: { elem1: "magnesium_polonide", elem2: null },
+ },
+ tempLow: 254,
+ hidden: true,
+ state: "liquid",
+ density: 9196,
+ conduct: 0.21,
+};
+
+elements.stable_astatine = {
+ color: [blendColors("#5a5e5a", "#ff0000"), blendColors("#5a5e5a", "#00ff00"), blendColors("#5a5e5a", "#0000ff")],
+ behavior: behaviors.POWDER,
+ tempHigh: 301,
+ reactions: {
+ steam: { elem1: "hydroastatic_acid", elem2: null },
+ rad_steam: { elem1: "hydroastatic_acid", elem2: null },
+ },
+ category: "powders",
+ state: "solid",
+ hidden: true,
+ density: 8910,
+};
+
+runAfterLoad(function () {
+ reactList("stable_astatine", eLists.WATER, { elem1: "hydroastatic_acid", elem2: null });
+});
+
+elements.molten_stable_astatine = {
+ color: [blendColors("#aab0a0", "#ff0000"), blendColors("#aab0a0", "#00ff00"), blendColors("#aab0a0", "#0000ff")],
+ behavior: behaviors.LIQUID,
+ tempLow: 301,
+ reactions: {
+ steam: { elem1: "hydroastatic_acid", elem2: null },
+ rad_steam: { elem1: "hydroastatic_acid", elem2: null },
+ },
+ hidden: true,
+ state: "liquid",
+ density: 8910,
+ tempHigh: 336,
+};
+
+runAfterLoad(function () {
+ reactList("molten_stable_astatine", eLists.WATER, { elem1: "hydroastatic_acid", elem2: null });
+});
+
+createAcid("hydroastatic_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), [blendColors("#5a5e5a", "#ff0000", 0.25), blendColors("#5a5e5a", "#00ff00", 0.25), blendColors("#5a5e5a", "#0000ff", 0.25)], true, true, 100, 100, 0, 1000, 1200, 1, "ASTATIDE", { compound: "acid", dontDirtyWater: true });
+
+elements.hydroastatic_acid.ignore.push("astatine", "molten_astatine", "stable_astatine", "molten_stable_astatine");
+elements.hydroastatic_acid_gas.ignore.push("astatine", "molten_astatine", "stable_astatine", "molten_stable_astatine");
+
+eLists.ACID.push("hydroastatic_acid");
+eLists.ACIDGAS.push("hydroastatic_acid_gas");
+
+runAfterLoad(function () {
+ reactList("hydroastatic_acid", eLists.WATER, { elem2: "dirty_water" });
+ reactList("hydroastatic_acid_gas", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.hydroastatic_acid.reactions["dirty_water"];
+ delete elements.hydroastatic_acid_gas.reactions["dirty_water"];
+});
+
+elements.polonium_dioxide = {
+ color: [blendColors("#ffff7f", "#ff0000"), blendColors("#ffff7f", "#00ff00"), blendColors("#ffff7f", "#0000ff")],
+ behavior: behaviors.POWDER,
+ tempHigh: 500,
+ hidden: true,
+ state: "solid",
+ density: 8900,
+ category: "powders",
+};
+
+eListAdd("INSOLUBLE", "polonium_dioxide");
+eListAddIon("POLONIUMIV", "polonium_dioxide");
+eListAddIon("OXIDE", "polonium_dioxide");
+eListAddIon("POLONIUMIV", "molten_polonium_dioxide");
+eListAddIon("OXIDE", "molten_polonium_dioxide");
+
+createSalt("magnesium_polonide", "magnesium_polonide_solution", [blendColors("#b5b5b5", "#ff0000", 0.25), blendColors("#b5b5b5", "#00ff00", 0.25), blendColors("#b5b5b5", "#0000ff", 0.25)], [blendColors("#2167ff", "#ff0000", 0.25), blendColors("#2167ff", "#00ff00", 0.25), blendColors("#2167ff", "#0000ff", 0.25)], true, true, 1800, -2, 102, 6700, 1050, "MAGNESIUM", "POLONIDE");
+
+acidReact("acid", "magnesium_polonide", "magnesium_chloride_solution", "polonium_hydride", 100);
+acidReact("acid_gas", "magnesium_polonide", "magnesium_chloride_solution", "polonium_hydride", 100);
+acidReact("acid", "molten_magnesium_polonide", "magnesium_chloride_solution", "polonium_hydride", 100);
+acidReact("acid_gas", "molten_magnesium_polonide", "magnesium_chloride_solution", "polonium_hydride", 100);
+elements.acid.ignore.push("polonium_hydride_ice", "polonium_hydride_gas", "magnesium_chloride");
+elements.acid_gas.ignore.push("polonium_hydride_ice", "polonium_hydride_gas", "magnesium_chloride");
+
+elements.polonium_hydride = {
+ density: 2450,
+ color: [blendColors("#838396", "#ff0000"), blendColors("#838396", "#00ff00"), blendColors("#838396", "#0000ff")],
+ hidden: true,
+ state: "liquid",
+ behavior: behaviors.LIQUID,
+ tempLow: -35.3,
+ tempHigh: 36.1,
+ stain: 0.05,
+ burn: 1,
+ burnTime: 10,
+ burnInto: ["polonium_dioxide", "steam"],
+ category: "liquids",
+};
+
+elements.polonium_hydride_gas = {
+ density: 8.29,
+};
+
+function franciumHydroxide(pixel) {
+ elementCircle(pixel.x, pixel.y, 10, "francium_hydroxide", 0.1, eLists.WATER.concat(["steam", "rad_steam"]));
+}
+
+elements.stable_francium = {
+ color: [blendColors("#3eff3b", "#ff0000"), blendColors("#3eff3b", "#00ff00"), blendColors("#3eff3b", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ steam: { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide },
+ rad_steam: { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide },
+ },
+ tempHigh: 27,
+ category: "powders",
+ state: "solid",
+ density: 2480,
+ hidden: true,
+ conduct: 0.7,
+};
+
+runAfterLoad(function () {
+ reactList("stable_francium", eLists.WATER, { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide });
+});
+
+elements.molten_stable_francium = {
+ behavior: behaviors.LIQUID,
+ reactions: {
+ steam: { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide },
+ rad_steam: { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide },
+ },
+ tempLow: 27,
+ state: "liquid",
+ hidden: true,
+ density: 2480,
+ conduct: 0.7,
+};
+
+runAfterLoad(function () {
+ reactList("molten_stable_francium", eLists.WATER, { elem1: "francium_hydroxide", elem2: [null, null, "big_pop"], func: franciumHydroxide });
+});
+
+elements.big_pop = {
+ color: ["#ffb48f", "#ffd991", "#ffad91"],
+ behavior: ["XX|XX|XX", "XX|EX:10|XX", "XX|XX|XX"],
+ category: "energy",
+ state: "gas",
+ density: 1000,
+ excludeRandom: true,
+ hidden: true,
+};
+
+createSalt("potassium_salt", "potassium_salt_water", ["#f2f2f2", "#e0e0e0"], "#416ed1", false, false, 292, -2, 102, 3980, 1026, "POTASSIUM", "CHLORIDE");
+
+elements.potassium.reactions = {
+ chlorine: { elem1: "potassium_salt", elem2: null, chance: 0.05 },
+ smog: { elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], chance: 0.01, temp2: 400 },
+ electric: { elem1: [null, "pop"], elem2: ["pop", "fire"], chance: 0.05, temp2: 400 },
+};
+
+runAfterLoad(function () {
+ reactList("potassium", eLists.WATER, { elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], chance: 0.01, temp2: 400 });
+});
+
+elements.molten_potassium.reactions = {
+ chlorine: { elem1: "potassium_salt", elem2: null, chance: 0.05 },
+ smog: { elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], chance: 0.01, temp2: 400 },
+ electric: { elem1: [null, "pop"], elem2: ["pop", "fire"], chance: 0.05, temp2: 400 },
+};
+
+runAfterLoad(function () {
+ reactList("molten_potassium", eLists.WATER, { elem1: ["potassium_hydroxide", "pop"], elem2: ["hydrogen", "pop", "fire"], chance: 0.01, temp2: 400 });
+});
+
+elements.molten_salt = {};
+elements.molten_potassium_salt = {};
+
+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 };
+elements.molten_salt.reactions.steel = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0125 };
+elements.molten_salt.reactions.iron = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0125 };
+elements.molten_salt.reactions.tin = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.01 };
+elements.molten_salt.reactions.lead = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.01 };
+elements.molten_salt.reactions.brass = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.001 };
+elements.molten_salt.reactions.bronze = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.001 };
+elements.molten_salt.reactions.copper = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0075 };
+elements.molten_salt.reactions.silver = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0075 };
+elements.molten_salt.reactions.gold = { elem1: ["sodium", "chlorine"], charged: true, chance: 0.0075 };
+elements.molten_salt.conduct = 0.7;
+
+elements.molten_potassium_salt.reactions = {};
+elements.molten_potassium_salt.reactions.aluminum = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.0025 };
+elements.molten_potassium_salt.reactions.zinc = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.015 };
+elements.molten_potassium_salt.reactions.steel = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.0125 };
+elements.molten_potassium_salt.reactions.iron = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.0125 };
+elements.molten_potassium_salt.reactions.tin = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.01 };
+elements.molten_potassium_salt.reactions.lead = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.01 };
+elements.molten_potassium_salt.reactions.brass = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.001 };
+elements.molten_potassium_salt.reactions.bronze = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.001 };
+elements.molten_potassium_salt.reactions.copper = { elem1: ["potassium", "chlorine"], charged: true, chance: 0.0075 };
+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;
+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",
+ behavior: behaviors.POWDER,
+ reactions: {
+ plant: { elem1: "plant", chance: 0.05 },
+ wheat_seed: { elem1: "wheat", chance: 0.05 },
+ grass: { elem1: "grass", chance: 0.05 },
+ grass_seed: { elem1: "grass", chance: 0.05 },
+ bamboo_plant: { elem1: "bamboo", chance: 0.05 },
+ flower_seed: { elem1: "flower_seed", chance: 0.05 },
+ petal: { elem1: "flower_seed", chance: 0.05 },
+ vine: { elem1: "vine", chance: 0.05 },
+ sapling: { elem1: "tree_branch", chance: 0.05 },
+ tree_branch: { elem1: "tree_branch", chance: 0.05 },
+ corn_seed: { elem1: "corn", chance: 0.05 },
+ root: { elem1: "root", chance: 0.05 },
+ dirt: { elem1: "grass", chance: 0.05 },
+ mud: { elem1: "grass", chance: 0.05 },
+ potato_seed: { elem1: "potato", chance: 0.05 },
+ yeast: { elem1: "yeast", chance: 0.05 },
+ sulfur: { elem1: "gunpowder", elem2: null },
+ ice: { elem1: null, elem2: "niter_solution", chance: 0.1 },
+ rime: { elem1: null, elem2: "niter_solution", chance: 0.075 },
+ snow: { elem1: null, elem2: "niter_solution", chance: 0.25 },
+ packed_snow: { elem1: null, elem2: "niter_solution", chance: 0.05 },
+ packed_ice: { elem1: null, elem2: "niter_solution", chance: 0.01 },
+ water: { elem2: "niter_solution", elem1: null },
+ },
+ tempHigh: 334,
+ stateHigh: "fire",
+ category: "powders",
+ state: "solid",
+ density: 2109,
+};
+createSalt("niter", "niter_solution", "#f0efcc", blendColors("#f0efcc", "#2167ff", 0.75), false, true, 334, -2, 102, 2109, 1011, "POTASSIUM", "NITRATE");
+elements["niter"].stateHigh = "fire";
+elements["niter"].reactions = Object.assign(elements["niter"].reactions, {
+ plant: { elem1: "plant", chance: 0.05 },
+ wheat_seed: { elem1: "wheat", chance: 0.05 },
+ grass: { elem1: "grass", chance: 0.05 },
+ grass_seed: { elem1: "grass", chance: 0.05 },
+ bamboo_plant: { elem1: "bamboo", chance: 0.05 },
+ flower_seed: { elem1: "flower_seed", chance: 0.05 },
+ petal: { elem1: "flower_seed", chance: 0.05 },
+ vine: { elem1: "vine", chance: 0.05 },
+ sapling: { elem1: "tree_branch", chance: 0.05 },
+ tree_branch: { elem1: "tree_branch", chance: 0.05 },
+ corn_seed: { elem1: "corn", chance: 0.05 },
+ root: { elem1: "root", chance: 0.05 },
+ dirt: { elem1: "grass", chance: 0.05 },
+ mud: { elem1: "grass", chance: 0.05 },
+ potato_seed: { elem1: "potato", chance: 0.05 },
+ yeast: { elem1: "yeast", chance: 0.05 },
+ sulfur: { elem1: "gunpowder", elem2: null },
+});
+elements["niter_solution"].reactions = Object.assign(elements["niter_solution"].reactions, {
+ plant: { elem1: "plant", chance: 0.05 },
+ wheat_seed: { elem1: "wheat", chance: 0.05 },
+ grass: { elem1: "grass", chance: 0.05 },
+ grass_seed: { elem1: "grass", chance: 0.05 },
+ bamboo_plant: { elem1: "bamboo", chance: 0.05 },
+ flower_seed: { elem1: "flower_seed", chance: 0.05 },
+ petal: { elem1: "flower_seed", chance: 0.05 },
+ vine: { elem1: "vine", chance: 0.05 },
+ sapling: { elem1: "tree_branch", chance: 0.05 },
+ tree_branch: { elem1: "tree_branch", chance: 0.05 },
+ corn_seed: { elem1: "corn", chance: 0.05 },
+ root: { elem1: "root", chance: 0.05 },
+ dirt: { elem1: "grass", chance: 0.05 },
+ mud: { elem1: "grass", chance: 0.05 },
+ potato_seed: { elem1: "potato", chance: 0.05 },
+ yeast: { elem1: "yeast", chance: 0.05 },
+ sulfur: { elem1: "gunpowder", elem2: "water" },
+});
+delete elements["molten_niter"];
+
+elements.potassium_salt.hidden = false;
+
+elements.fluorite = {
+ color: ["#8fc4f2", "#d0e5f7"],
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 3180,
+ state: "solid",
+ tempHigh: 1418,
+ reactions: {
+ sulfuric_acid: { elem1: "hydrogen_fluoride", elem2: "chalk" },
+ },
+};
+
+eListAddIon("CALCIUM", "fluorite");
+eListAddIon("FLUORIDE", "fluorite");
+eListAddIon("CALCIUM", "molten_fluorite");
+eListAddIon("FLUORIDE", "molten_fluorite");
+eListAdd("INSOLUBLE", "fluorite");
+eListAddIon("CALCIUM", "chalk");
+eListAddIon("SULFATE", "chalk");
+eListAddIon("CALCIUM", "molten_chalk");
+eListAddIon("SULFATE", "molten_chalk");
+eListAdd("INSOLUBLE", "chalk");
+
+elements.sulfuric_acid.ignore.push("chalk", "fluorite");
+elements.sulfuric_acid_gas.ignore.push("chalk", "fluorite");
+
+elements.hydrogen_fluoride.ignore.push("chalk", "fluorite");
+elements.liquid_hydrogen_fluoride.ignore.push("chalk", "fluorite");
+
+elements.chalk = {
+ color: ["#e0e0e0", "#bfbfbf"],
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 2320,
+ state: "solid",
+ tempHigh: 1460,
+ stain: 0.05,
+};
+
+elements.sulfur.reactions.fluorine = { elem1: "sulfur_hexafluoride", elem2: "fire" };
+
+elements.sulfur_hexafluoride = {
+ color: "#f2ff00",
+ behavior: behaviors.GAS,
+ category: "gases",
+ density: 6.17,
+ state: "gas",
+ tempLow: -50.8,
+};
+
+elements.liquid_sulfur_hexafluoride = {
+ tempLow: -64,
+};
+
+createAcid("hexafluorosilicic_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#ebeed8", "#f9ffc2", "#c7e189"], true, true, 100, 100, 0, 1000, 1460, 1, "HEXAFLUOROSILICATE");
+
+eLists.ACID.push("hexafluorosilicic_acid");
+eLists.ACIDGAS.push("hexafluorosilicic_acid_gas");
+
+elements.hydrofluoric_acid.ignore.push("sand", "hexafluorosilicic_acid", "hexafluorosilicic_acid_gas", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide", "hydrogen");
+elements.hydrofluoric_acid_gas.ignore.push("sand", "hexafluorosilicic_acid", "hexafluorosilicic_acid_gas", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide", "hydrogen");
+elements.hydrogen_fluoride.ignore.push("sand", "hexafluorosilicic_acid", "hexafluorosilicic_acid_gas", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide", "hydrogen");
+elements.liquid_hydrogen_fluoride.ignore.push("sand", "hexafluorosilicic_acid", "hexafluorosilicic_acid_gas", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide", "hydrogen");
+elements.hexafluorosilicic_acid.ignore.push("sand");
+elements.hexafluorosilicic_acid_gas.ignore.push("sand");
+
+acidReact("hydrofluoric_acid", "sand", "hexafluorosilicic_acid", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "sand", "hexafluorosilicic_acid", "fire", 0);
+acidReact("hydrofluoric_acid", "potassium_carbonate", "potassium_fluoride_solution", "carbon_dioxide", 100);
+acidReact("hydrofluoric_acid_gas", "potassium_carbonate", "potassium_fluoride_solution", "carbon_dioxide", 100);
+acidReact("hydrogen_fluoride", "potassium_carbonate", "potassium_fluoride_solution", "carbon_dioxide", 100);
+acidReact("liquid_hydrogen_fluoride", "potassium_carbonate", "potassium_fluoride_solution", "carbon_dioxide", 100);
+
+acidReact("hydrofluoric_acid", "potassium_carbonate_solution", "potassium_fluoride_solution", "carbon_dioxide", 100);
+acidReact("hydrofluoric_acid_gas", "potassium_carbonate_solution", "potassium_fluoride_solution", "carbon_dioxide", 100);
+acidReact("hydrogen_fluoride", "potassium_carbonate_solution", "potassium_fluoride_solution", "carbon_dioxide", 100);
+acidReact("liquid_hydrogen_fluoride", "potassium_carbonate_solution", "potassium_fluoride_solution", "carbon_dioxide", 100);
+
+acidReact("hydrofluoric_acid", "potassium_fluoride", "fluorine", "potassium_fluoride_solution", 100);
+acidReact("hydrofluoric_acid_gas", "potassium_fluoride", "fluorine", "potassium_fluoride_solution", 100);
+acidReact("hydrofluoric_acid", "potassium_fluoride", "fluorine", ["potassium_fluoride_solution", null], 100);
+acidReact("hydrofluoric_acid_gas", "potassium_fluoride", "fluorine", ["potassium_fluoride_solution", null], 100);
+
+elements.fluorine.ignore.push("sand", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide");
+elements.liquid_fluorine.ignore.push("sand", "potassium_carbonate", "potassium_fluoride", "carbon_dioxide");
+
+createSalt("potassium_carbonate", "potassium_carbonate_solution", "#e2e1e8", blendColors("#e2e1e8", "#2167ff", 0.75), true, true, 891, -2, 102, 2430, 1024, "POTASSIUM", "CARBONATE");
+createSalt("potassium_fluoride", "potassium_fluoride_solution", "#e8e8e1", blendColors("#e8e8e1", "#2167ff", 0.75), true, true, 858, -2, 102, 2480, 1020, "POTASSIUM", "FLUORIDE");
+
+elements.soy_sauce = {
+ color: "#470500",
+ behavior: behaviors.LIQUID,
+ tempLow: -5,
+ tempHigh: 105,
+ state: "liquid",
+ category: "liquids",
+ density: 1200,
+ stain: 0.5,
+ stateHigh: ["steam", "steam", "steam", "steam", "salt"],
+};
+
+elements.bromine = {
+ color: "#470500",
+ behavior: behaviors.LIQUID,
+ tick: function (pixel) {
+ if (pixel.temp > 0 && Math.random() < 0.001) {
+ changePixel(pixelMap[pixel.x][pixel.y], "bromine_gas", false);
+ }
+ },
+ reactions: {
+ water: { elem1: "pool_water", elem2: null },
+ dirty_water: { elem2: "water" },
+ potassium: { elem1: "potassium_bromide", elem2: "fire" },
+ sodium: { elem1: "sodium_bromide", elem2: "fire" },
+ virus: { elem2: null },
+ },
+ tempLow: -7.2,
+ tempHigh: 58.8,
+ state: "liquid",
+ category: "liquids",
+ density: 3102,
+ stain: 0.5,
+};
+
+toxic("bromine", 0.1);
+
+elements.bromine_gas = {
+ behavior: behaviors.GAS,
+ tick: function (pixel) {
+ if (pixel.temp < 58.8 && pixel.temp > 0 && Math.random() < 0.01) {
+ changePixel(pixelMap[pixel.x][pixel.y], "bromine", false);
+ }
+ },
+ reactions: {
+ water: { elem1: "pool_water", elem2: null },
+ dirty_water: { elem2: "water" },
+ potassium: { elem1: "potassium_bromide", elem2: "fire" },
+ sodium: { elem1: "sodium_bromide", elem2: "fire" },
+ virus: { elem2: null },
+ },
+ tempLow: 0,
+ stateLow: "bromine",
+ state: "gas",
+ category: "gases",
+ hidden: true,
+ density: 7.59,
+ stain: 0.5,
+};
+
+toxic("bromine_gas", 0.1);
+
+createSalt("potassium_bromide", "potassium_bromide_solution", ["#fccaca", "#f7cbcb"], blendColors("#fccaca", "#2167ff", 0.75), false, true, 734, -2, 102, 2740, 1050, "POTASSIUM", "BROMIDE");
+createSalt("sodium_bromide", "sodium_bromide_solution", ["#f5f4ed", "#f2f2eb"], blendColors("#f5f4ed", "#2167ff", 0.75), false, true, 747, -2, 102, 3210, 1040, "SODIUM", "BROMIDE");
+
+elements.silver_bromide = {
+ color: ["#fcfcca", "#f7f24f"],
+ tick: function (pixel) {
+ for (let i = -1; i <= 1; i++) {
+ for (let j = -1; j <= 1; j++) {
+ if (!isEmpty(pixel.x + i, pixel.y + j, true) && Math.random() < 0.1 && (pixelMap[pixel.x + i][pixel.y + j].element === "light" || pixelMap[pixel.x + i][pixel.y + j].element === "laser" || pixelMap[pixel.x + i][pixel.y + j].element === "liquid_light")) {
+ let coords = circleCoords(pixel.x + i, pixel.y + j, 20);
+ for (var n = 0; n < coords.length; n++) {
+ let k = coords[n].x;
+ let l = coords[n].y;
+ let distance = (k - pixel.x - i) * (k - pixel.x - i) + (l - pixel.y - j) * (l - pixel.y - j);
+ if (!isEmpty(k, l, true) && pixelMap[k][l].element === "silver_bromide") {
+ if (distance <= 0) {
+ console.log("silver bromide broke");
+ }
+ let rgb = hexToRGB(blendColors(RGBToHex2(toObject(pixelMap[k][l].color)), RGBToHex2(toObject(pixelMap[pixel.x + i][pixel.y + j].color)), 10 / (10 + distance)));
+ pixelMap[k][l].color = "rgb(" + rgb.r + "," + rgb.g + "," + rgb.b + ")";
+ //pixelMap[k][l].color = pixelColorPick(pixelMap[k][l],blendColors(RGBToHex2(toObject(pixelMap[k][l].color)),RGBToHex2(toObject(pixelMap[pixel.x+i][pixel.y+j].color)),1/distance));
+ }
+ }
+ if (pixelMap[pixel.x + i][pixel.y + j].element === "light" || pixelMap[pixel.x + i][pixel.y + j].element === "laser") {
+ deletePixel(pixel.x + i, pixel.y + j);
+ }
+ }
+ }
+ }
+ },
+ behavior: behaviors.POWDER,
+ category: "powders",
+ tempHigh: 430,
+ state: "solid",
+ density: 6470,
+};
+
+eListAddIon("SILVER", "silver_bromide");
+eListAddIon("BROMIDE", "silver_bromide");
+eListAdd("INSOLUBLE", "silver_bromide");
+eListAddIon("SILVER", "molten_silver_bromide");
+eListAddIon("BROMIDE", "molten_silver_bromide");
+
+elements.nitric_acid.reactions["silver"] = { elem1: "nitrogen_dioxide", elem2: "silver_nitrate_solution" };
+elements.nitric_acid_gas.reactions["silver"] = { elem1: "nitrogen_dioxide", elem2: "silver_nitrate_solution" };
+
+elements.nitric_acid.ignore.push("silver", "silver_nitrate", "silver_nitrate_solution");
+elements.nitric_acid_gas.ignore.push("silver", "silver_nitrate", "silver_nitrate_solution");
+
+elements.molten_silver_nitrate = {
+ tempHigh: 440,
+ stateHigh: ["silver", "nitrogen_dioxide", "oxygen", "fire"],
+};
+
+createSalt("silver_nitrate", "silver_nitrate_solution", ["#cad7fc", "#cbd2f7"], blendColors("#cad7fc", "#2167ff", 0.5), true, true, 209, -2, 102, 4350, 1060, "SILVER", "NITRATE");
+
+elements.silver_nitrate_solution.reactions["potassium_bromide"] = { elem1: "niter_solution", elem2: "silver_bromide" };
+elements.silver_nitrate_solution.reactions["potassium_bromide_solution"] = { elem1: "niter_solution", elem2: "silver_bromide" };
+
+toxic("silver_nitrate", 0.1);
+toxic("silver_nitrate_solution", 0.1);
+
+createAcid("hydrobromic_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#ff3b3b", "#ca0000", "#9e7b7b"], true, true, 100, 100, 0, 1000, 1100, 1, "BROMIDE");
+
+eLists.ACID.push("hydrobromic_acid");
+eLists.ACIDGAS.push("hydrobromic_acid_gas");
+
+acidReact("sulfuric_acid", "bromine", "sulfuric_acid", "hydrobromic_acid", 50);
+acidReact("sulfuric_acid", "bromine_ice", "sulfuric_acid", "hydrobromic_acid", 50);
+acidReact("sulfuric_acid", "bromine_gas", "sulfuric_acid", "hydrobromic_acid", 50);
+acidReact("sulfuric_acid_gas", "bromine", "sulfuric_acid", "hydrobromic_acid", 50);
+acidReact("sulfuric_acid_gas", "bromine_ice", "sulfuric_acid", "hydrobromic_acid", 50);
+acidReact("sulfuric_acid_gas", "bromine_gas", "sulfuric_acid", "hydrobromic_acid", 50);
+
+acidReact("sulfuric_acid", "potassium_salt", "potassium_sulfate", "acid", 50);
+acidReact("sulfuric_acid_gas", "potassium_salt", "potassium_sulfate", "acid", 50);
+acidReact("sulfuric_acid", "niter", "potassium_sulfate", "nitric_acid", 50);
+acidReact("sulfuric_acid_gas", "niter", "potassium_sulfate", "nitric_acid", 50);
+acidReact("sulfuric_acid", "potassium_bromide", "potassium_sulfate", "hydrobromic_acid", 50);
+acidReact("sulfuric_acid_gas", "potassium_bromide", "potassium_sulfate", "hydrobromic_acid", 50);
+
+createSalt("potassium_sulfate", "potassium_sulfate_solution", "#f0d8cc", blendColors("#f0d8cc", "#2167ff", 0.75), true, true, 1069, -2, 102, 2660, 1012, "POTASSIUM", "SULFATE");
+elements["potassium_sulfate"].reactions = Object.assign(elements["potassium_sulfate"].reactions, {
+ plant: { elem1: "plant", chance: 0.05 },
+ wheat_seed: { elem1: "wheat", chance: 0.05 },
+ grass: { elem1: "grass", chance: 0.05 },
+ grass_seed: { elem1: "grass", chance: 0.05 },
+ bamboo_plant: { elem1: "bamboo", chance: 0.05 },
+ flower_seed: { elem1: "flower_seed", chance: 0.05 },
+ petal: { elem1: "flower_seed", chance: 0.05 },
+ vine: { elem1: "vine", chance: 0.05 },
+ sapling: { elem1: "tree_branch", chance: 0.05 },
+ tree_branch: { elem1: "tree_branch", chance: 0.05 },
+ corn_seed: { elem1: "corn", chance: 0.05 },
+ root: { elem1: "root", chance: 0.05 },
+ dirt: { elem1: "grass", chance: 0.05 },
+ mud: { elem1: "grass", chance: 0.05 },
+ potato_seed: { elem1: "potato", chance: 0.05 },
+ yeast: { elem1: "yeast", chance: 0.05 },
+});
+elements["potassium_sulfate_solution"].reactions = Object.assign(elements["potassium_sulfate_solution"].reactions, {
+ plant: { elem1: "plant", chance: 0.05 },
+ wheat_seed: { elem1: "wheat", chance: 0.05 },
+ grass: { elem1: "grass", chance: 0.05 },
+ grass_seed: { elem1: "grass", chance: 0.05 },
+ bamboo_plant: { elem1: "bamboo", chance: 0.05 },
+ flower_seed: { elem1: "flower_seed", chance: 0.05 },
+ petal: { elem1: "flower_seed", chance: 0.05 },
+ vine: { elem1: "vine", chance: 0.05 },
+ sapling: { elem1: "tree_branch", chance: 0.05 },
+ tree_branch: { elem1: "tree_branch", chance: 0.05 },
+ corn_seed: { elem1: "corn", chance: 0.05 },
+ root: { elem1: "root", chance: 0.05 },
+ dirt: { elem1: "grass", chance: 0.05 },
+ mud: { elem1: "grass", chance: 0.05 },
+ potato_seed: { elem1: "potato", chance: 0.05 },
+ yeast: { elem1: "yeast", chance: 0.05 },
+});
+
+createSalt("sodium_chlorate", "sodium_chlorate_solution", "#cff0cc", blendColors("#cff0cc", "#2167ff", 0.25), true, true, 255, -2, 102, 2490, 1011, "SODIUM", "CHLORATE");
+elements.sodium_chlorate.stateHigh = ["fire", "salt"];
+toxic("sodium_chlorate", 0.02);
+toxic("sodium_chlorate_solution", 0.02);
+Object.assign(elements.sodium_chlorate.reactions, {
+ plant: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ evergreen: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ cactus: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ grass: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ vine: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ algae: { elem1: null, elem2: null, chance: 0.1 },
+ kelp: { elem1: null, elem2: "dirty_water", chance: 0.1 },
+ mushroom_spore: { elem1: null, elem2: null, chance: 0.1 },
+ lichen: { elem1: null, elem2: null, chance: 0.1 },
+ yeast: { elem1: null, elem2: null, chance: 0.1 },
+ sapling: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ root: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ flower_seed: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ pistil: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ petal: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ grass_seed: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+});
+Object.assign(elements.sodium_chlorate_solution.reactions, {
+ plant: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ evergreen: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ cactus: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ grass: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ vine: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ algae: { elem1: null, elem2: null, chance: 0.1 },
+ kelp: { elem1: null, elem2: "dirty_water", chance: 0.1 },
+ mushroom_spore: { elem1: null, elem2: null, chance: 0.1 },
+ lichen: { elem1: null, elem2: null, chance: 0.1 },
+ yeast: { elem1: null, elem2: null, chance: 0.1 },
+ sapling: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ root: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ flower_seed: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ pistil: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ petal: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+ grass_seed: { elem1: null, elem2: "dead_plant", chance: 0.1 },
+});
+elements.sodium_chlorate_solution.reactions["gold"] = { elem1: "sodium_perchlorate_solution", charged: true, chance: 0.1 };
+
+elements.chlorine.reactions["bleach"] = { elem1: "sodium_chlorate_solution", elem2: null };
+delete elements["molten_sodium_chlorate"];
+
+createSalt("sodium_perchlorate", "sodium_perchlorate_solution", "#cff0cc", blendColors("#d6f0cc", "#2167ff", 0.25), true, true, 468, -2, 102, 2499, 1011, "SODIUM", "PERCHLORATE");
+elements.sodium_perchlorate.stateHigh = "fire";
+elements.sodium_perchlorate.reactions["acid"] = { elem1: "perchloric_acid", elem2: "salt" };
+elements.sodium_perchlorate_solution.reactions["acid"] = { elem1: "perchloric_acid", elem2: "salt_water" };
+
+toxic("sodium_perchlorate", 0.02);
+toxic("sodium_perchlorate_solution", 0.02);
+
+elements.acid.ignore.push("salt", "sodium_perchlorate", "sodium_perchlorate_solution");
+elements.acid_gas.ignore.push("salt", "sodium_perchlorate", "sodium_perchlorate_solution");
+delete elements["molten_sodium_perchlorate"];
+
+createAcid("perchloric_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#ff963b", "#ca6800", "#c48a56"], true, true, 100, 100, 0, 1000, 1768, 1, "PERCHLORATE");
+
+elements.perchloric_acid.tick = function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "big_pop");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ return;
+ }
+ } else {
+ behaviors.LIQUID(pixel);
+ }
+};
+delete elements.perchloric_acid.behavior;
+elements.perchloric_acid.burn = 0;
+elements.perchloric_acid.ignore.push("fire", "smoke");
+
+elements.perchloric_acid_gas.tick = function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "big_pop");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ return;
+ }
+ } else {
+ behaviors.GAS(pixel);
+ }
+};
+elements.perchloric_acid_gas.behavior = ["XX|XX|XX", "XX|XX|XX", "XX|XX|XX"];
+elements.perchloric_acid_gas.burn = 0;
+elements.perchloric_acid_gas.ignore.push("fire", "smoke");
+
+eLists.ACID.push("perchloric_acid");
+eLists.ACIDGAS.push("perchloric_acid_gas");
+
+acidReact("perchloric_acid", "ammonia", "rocket_fuel", null, 100);
+acidReact("perchloric_acid_gas", "ammonia", "rocket_fuel", null, 100);
+
+elements.perchloric_acid.ignore.push("salt", "sodium_perchlorate", "sodium_perchlorate_solution");
+elements.perchloric_acid_gas.ignore.push("salt", "sodium_perchlorate", "sodium_perchlorate_solution");
+
+elements.rocket_fuel = {
+ color: "#edcfca",
+ behavior: behaviors.POWDER,
+ tempHigh: 200,
+ stateHigh: "big_explosion",
+ category: "weapons",
+ state: "solid",
+ density: 1950,
+ burn: 100,
+ burnTime: 100,
+ burnInto: "big_explosion",
+ excludeRandom: true,
+};
+
+elements.big_explosion = {
+ color: ["#ffb48f", "#ffd991", "#ffad91"],
+ behavior: ["XX|XX|XX", "XX|EX:20|XX", "XX|XX|XX"],
+ temp: 300,
+ category: "energy",
+ state: "gas",
+ density: 1000,
+ excludeRandom: true,
+ noMix: true,
+};
+
+elements.iodine = {
+ color: ["#240030", "#15061a", "#752191"],
+ behavior: behaviors.POWDER,
+ tick: function (pixel) {
+ if (pixel.temp > 25 && Math.random() < 0.001) {
+ changePixel(pixelMap[pixel.x][pixel.y], "iodine_gas", false);
+ }
+ },
+ reactions: {
+ water: { elem1: "disinfectant", elem2: null },
+ dirty_water: { elem2: "water" },
+ potato: { color2: "#3e0252" },
+ bread: { color2: "#3e0252" },
+ toast: { color2: "#3e0252" },
+ flour: { color2: "#3e0252" },
+ dough: { color2: "#3e0252" },
+ batter: { color2: "#3e0252" },
+ hydrogen: { elem1: "hydrogen_iodide", elem2: null },
+ hydrogen_sulfide: { elem1: "hydrogen_iodide", elem2: "sulfur" },
+ algae: { elem2: null, chance: 0.035 },
+ cell: { elem2: null, chance: 0.02 },
+ plague: { elem2: null },
+ virus: { elem2: null },
+ },
+ tempHigh: 113,
+ stateHigh: "molten_iodine",
+ state: "solid",
+ category: "powders",
+ density: 4933,
+ stain: 0.01,
+};
+
+elements.molten_iodine = {
+ color: ["#360147", "#2b0d36", "#9b2ebf"],
+ forceAutoGen: true,
+ behavior: behaviors.LIQUID,
+ tempHigh: 184,
+ tempLow: 113,
+ temp: 123,
+ stateHigh: "iodine_gas",
+ stateLow: "iodine",
+ state: "liquid",
+ hidden: true,
+ category: "liquids",
+};
+
+elements.iodine_gas = {
+ behavior: behaviors.GAS,
+ tick: function (pixel) {
+ if (pixel.temp < 113 && pixel.temp > 25 && Math.random() < 0.01) {
+ changePixel(pixelMap[pixel.x][pixel.y], "iodine", false);
+ }
+ },
+ tempLow: 25,
+ stateLow: "iodine",
+ state: "gas",
+ category: "gases",
+ hidden: true,
+ density: 11.27,
+ stain: 0.01,
+};
+
+elements.disinfectant = {
+ color: "#2d004f",
+ behavior: behaviors.LIQUID,
+ reactions: {
+ blood: { elem1: null, elem2: "water" },
+ dirty_water: { elem2: "water" },
+ plague: { elem2: null },
+ virus: { elem2: null },
+ infection: { elem2: null },
+ mushroom_spore: { elem2: null },
+ lichen: { elem2: null },
+ rotten_meat: { elem2: "meat" },
+ rotten_cheese: { elem2: "cheese" },
+ stench: { elem2: null },
+ cancer: { elem2: null, chance: 0.01 },
+ rat: { elem2: null, chance: 0.01 },
+ ant: { elem2: "dead_bug", chance: 0.1 },
+ bee: { elem2: "dead_bug", chance: 0.1 },
+ fly: { elem2: "dead_bug", chance: 0.1 },
+ firefly: { elem2: "dead_bug", chance: 0.1 },
+ worm: { elem2: "dead_bug", chance: 0.1 },
+ flea: { elem2: "dead_bug", chance: 0.1 },
+ termite: { elem2: "dead_bug", chance: 0.1 },
+ stink_bug: { elem2: "dead_bug", chance: 0.1 },
+ },
+ tempHigh: 100,
+ tempLow: 0,
+ stateHigh: ["steam", "iodine"],
+ state: "liquid",
+ category: "liquids",
+ density: 1020,
+ stain: 0.01,
+};
+
+createAcid("hydroiodic_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#9670ff", "#da6afc", "#a77af5", "#9670ff", "#da6afc", "#a77af5", "#633a1d"], true, true, 100, 100, 0, 1000, 1150, 1, "IODIDE", { compound: "acid", dontDirtyWater: true });
+
+elements.hydrogen_iodide = {
+ color: "#aa8df2",
+ behavior: behaviors.GAS,
+ reactions: {
+ water: { elem1: "hydroiodic_acid", elem2: null },
+ salt_water: { elem1: "hydroiodic_acid", elem2: null },
+ sugar_water: { elem1: "hydroiodic_acid", elem2: null },
+ dirty_water: { elem1: "hydroiodic_acid", elem2: null },
+ seltzer: { elem1: "hydroiodic_acid", elem2: null },
+ pool_water: { elem1: "hydroiodic_acid", elem2: null },
+ primordial_soup: { elem1: "hydroiodic_acid", elem2: null },
+ steam: { elem1: "hydroiodic_acid_gas", elem2: null },
+ neutral_acid: { elem1: "hydroiodic_acid", elem2: null },
+ },
+ state: "gas",
+ category: "gases",
+ hidden: true,
+ density: 2.85,
+ tempLow: -35.4,
+ stateLow: "liquid_hydrogen_iodide",
+ forceAutoGen: true,
+};
+
+runAfterLoad(function () {
+ reactList("hydrogen_iodide", eLists.WATER, { elem1: "hydroiodic_acid", elem2: null });
+});
+
+elements.liquid_hydrogen_iodide = {
+ reactions: {
+ water: { elem1: "hydroiodic_acid", elem2: null },
+ salt_water: { elem1: "hydroiodic_acid", elem2: null },
+ sugar_water: { elem1: "hydroiodic_acid", elem2: null },
+ dirty_water: { elem1: "hydroiodic_acid", elem2: null },
+ seltzer: { elem1: "hydroiodic_acid", elem2: null },
+ pool_water: { elem1: "hydroiodic_acid", elem2: null },
+ primordial_soup: { elem1: "hydroiodic_acid", elem2: null },
+ steam: { elem1: "hydroiodic_acid_gas", elem2: null },
+ neutral_acid: { elem1: "hydroiodic_acid", elem2: null },
+ },
+ state: "liquid",
+ tempLow: -50.8,
+};
+
+toxic("hydrogen_iodide", 0.1);
+toxic("liquid_hydrogen_iodide", 0.1);
+
+runAfterLoad(function () {
+ reactList("liquid_hydrogen_iodide", eLists.WATER, { elem1: "hydroiodic_acid", elem2: null });
+});
+
+elements.hydroiodic_acid.ignore.push("hydrogen_iodide", "liquid_hydrogen_iodide", "hydrogen_iodide_ice");
+elements.hydroiodic_acid_gas.ignore.push("hydrogen_iodide", "liquid_hydrogen_iodide", "hydrogen_iodide_ice");
+
+eListAddIon("HYDROGEN", "hydrogen_iodide");
+eListAddIon("IODIDE", "hydrogen_iodide");
+eListAddIon("HYDROGEN", "liquid_hydrogen_iodide");
+eListAddIon("IODIDE", "liquid_hydrogen_iodide");
+eListAddIon("HYDROGEN", "hydroiodic_acid");
+eListAddIon("IODIDE", "hydroiodic_acid");
+eListAddIon("HYDROGEN", "hydroiodic_acid_gas");
+eListAddIon("IODIDE", "hydroiodic_acid_gas");
+runAfterLoad(function () {
+ reactList("hydroiodic_acid", eLists.WATER, { elem2: "dirty_water" });
+ reactList("hydroiodic_acid_gas", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.hydroiodic_acid.reactions["dirty_water"];
+ delete elements.hydroiodic_acid_gas.reactions["dirty_water"];
+});
+
+elements.bauxite = {
+ color: ["#915a30", "#cc7533"],
+ behavior: behaviors.SUPPORTPOWDER,
+ category: "land",
+ density: 2420,
+ state: "solid",
+ tempHigh: 300,
+};
+
+elements.spent_sodium_aluminate_solution = {
+ color: ["#696380", "#7a759e"],
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ hidden: true,
+ density: 1005,
+ state: "liquid",
+ tempHigh: 100,
+ stateHigh: ["sodium_aluminate", "sodium_aluminate", "sodium_aluminate", "gallium", "steam", "steam", "steam", "steam"],
+};
+
+createSalt("sodium_aluminate", "sodium_aluminate_solution", ["#e6c9b3", "#ebc8ad"], ["#bdb3e6", "#b4adeb"], true, true, 1650, -2, 102, 1500, 1005, "SODIUM", "ALUMINATE");
+elements.sodium_aluminate_solution.reactions["carbon_dioxide"] = { elem1: "aluminum_hydroxide", elem2: ["sodium_carbonate_solution", "spent_sodium_aluminate_solution"] };
+
+createSalt("sodium_carbonate", "sodium_carbonate_solution", "#d8dae6", ["#c5c1d6", "#afacc2"], true, true, 851, -2, 102, 2540, 1010, "SODIUM", "CARBONATE");
+createSalt("ammonium_chloride", "ammonium_chloride_solution", "#daeced", ["#a299c7", "#7e76b3"], true, true, 338, -2, 102, 1519, 1008, "AMMONIUM", "CHLORIDE");
+elements["ammonium_chloride"].stateHigh = ["ammonia", "acid_gas"];
+delete elements["molten_ammonium_chloride"];
+acidReact("acid_gas", "ammonia", "ammonium_chloride", null, 0);
+
+elements.aluminum_hydroxide = {
+ color: "#d1cbcb",
+ behavior: behaviors.STURDYPOWDER,
+ category: "powders",
+ hidden: true,
+ density: 2420,
+ state: "solid",
+ tempHigh: 300,
+ stateHigh: ["alumina", "steam"],
+};
+
+eListAddIon("ALUMINUM", "aluminum_hydroxide");
+eListAddIon("HYDROXIDE", "aluminum_hydroxide");
+eListAdd("INSOLUBLE", "aluminum_hydroxide");
+
+elements.alumina = {
+ color: "#d1cbcb",
+ behavior: behaviors.STURDYPOWDER,
+ category: "powders",
+ density: 3987,
+ state: "solid",
+ tempHigh: 2072,
+ reactions: {
+ molten_cryolite_mixture: { elem1: "molten_cryolite_solution", elem2: "molten_cryolite_solution" },
+ },
+};
+
+eListAddIon("ALUMINUM", "alumina");
+eListAddIon("OXIDE", "alumina");
+eListAdd("INSOLUBLE", "alumina");
+
+eListAddIon("ALUMINUM", "molten_alumina");
+eListAddIon("OXIDE", "molten_alumina");
+
+elements.cryolite = {
+ color: ["#9ab6d9", "#dae4f0"],
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 2900,
+ state: "solid",
+ tempHigh: 950,
+ reactions: {
+ aluminum_trifluoride: { elem1: "cryolite_mixture", elem2: "cryolite_mixture" },
+ },
+};
+
+eListAddIon("SODIUM", "cryolite");
+eListAddIon("HEXAFLUOROALUMINATE", "cryolite");
+eListAdd("INSOLUBLE", "cryolite");
+
+eListAddIon("SODIUM", "molten_cryolite");
+eListAddIon("HEXAFLUOROALUMINATE", "molten_cryolite");
+
+elements.aluminum_trifluoride = {
+ color: ["#ebf4ff", "#e3fdff"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ hidden: true,
+ density: 3100,
+ state: "solid",
+ tempHigh: 1290,
+};
+
+eListAddIon("ALUMINUM", "aluminum_trifluoride");
+eListAddIon("FLUORIDE", "aluminum_trifluoride");
+eListAdd("INSOLUBLE", "aluminum_trifluoride");
+
+eListAddIon("ALUMINUM", "aluminum_trifluoride_gas");
+eListAddIon("FLUORIDE", "aluminum_trifluoride_gas");
+
+elements.molten_aluminum_trifluoride = {
+ tempHigh: 1290,
+ tempLow: 1290,
+};
+
+elements.aluminum_trifluoride_gas = {
+ tempLow: 1290,
+ state: "gas",
+ stateLow: "molten_aluminum_trifluoride",
+};
+
+elements.cryolite_mixture = {
+ color: [blendColors("#9ab6d9", "#ebf4ff"), blendColors("#dae4f0", "#e3fdff")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ hidden: true,
+ density: 2910,
+ state: "solid",
+ tempHigh: 950,
+};
+
+elements.cryolite_solution = {
+ color: [blendColors(blendColors("#9ab6d9", "#ebf4ff"), "#d1cbcb"), blendColors(blendColors("#dae4f0", "#e3fdff"), "#d1cbcb")],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ hidden: true,
+ density: 2920,
+ state: "solid",
+ tempHigh: 950,
+};
+
+createSalt("sodium_fluoride", "sodium_fluoride_solution", ["#8aebce", "#b9edde"], ["#8ad0eb", "#b9e3ed"], false, true, 993, -2, 102, 2558, 1012, "SODIUM", "FLUORIDE");
+
+elements.magnesium_fluoride = {
+ color: ["#aaabae", "#a9adae"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 3148,
+ state: "solid",
+ tempHigh: 1263,
+ reactions: {
+ sulfuric_acid: { elem1: "hydrogen_fluoride", elem2: "epsom_salt" },
+ },
+ hidden: true,
+};
+
+toxic("magnesium_fluoride", 0.1);
+
+eListAddIon("MAGNESIUM", "magnesium_fluoride");
+eListAddIon("FLUORIDE", "magnesium_fluoride");
+eListAdd("INSOLUBLE", "magnesium_fluoride");
+
+eListAddIon("MAGNESIUM", "molten_magnesium_fluoride");
+eListAddIon("FLUORIDE", "molten_magnesium_fluoride");
+
+elements.sulfuric_acid.ignore.push("epsom_salt", "magnesium_fluoride");
+elements.sulfuric_acid_gas.ignore.push("epsom_salt", "magnesium_fluoride");
+
+elements.hydrogen_fluoride.ignore.push("epsom_salt", "magnesium_fluoride");
+elements.liquid_hydrogen_fluoride.ignore.push("epsom_salt", "magnesium_fluoride");
+
+//boron
+
+acidReact("acid", "borax", "boric_acid", "salt", 0);
+acidReact("acid_gas", "borax", "boric_acid", "salt", 0);
+
+elements.boric_acid = {
+ color: "#fbffeb",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 1435,
+ state: "solid",
+ tempHigh: 170,
+ reactions: {
+ hydrofluoric_acid: { elem1: "fluoroboric_acid", elem2: "dirty_water" },
+ hydrofluoric_acid_gas: { elem1: "fluoroboric_acid_gas", elem2: "steam" },
+ neutron: { elem2: null },
+ },
+};
+
+acidReact("hydrofluoric_acid", "boric_acid", "fluoroboric_acid", "dirty_water", 50);
+acidReact("hydrofluoric_acid_gas", "boric_acid", "fluoroboric_acid_gas", "steam", 50);
+
+elements.hydrofluoric_acid.ignore.push("molten_boric_acid");
+elements.hydrofluoric_acid_gas.ignore.push("molten_boric_acid");
+
+elements.borax.hidden = false;
+
+createSalt("sodium_sulfate", "sodium_sulfate_solution", "#f3f2f5", blendColors("#f3f2f5", "#2167ff", 0.5), true, true, 884, -2, 102, 2664, 1013, "SODIUM", "SULFATE");
+
+acidReact("sulfuric_acid", "salt", "acid", "sodium_sulfate_solution");
+acidReact("sulfuric_acid_gas", "salt", "acid", "sodium_sulfate_solution");
+acidReact("sulfuric_acid", "salt_water", "acid", "sodium_sulfate_solution");
+acidReact("sulfuric_acid_gas", "salt_water", "acid", "sodium_sulfate_solution");
+
+eListAddIon("BORON", "boric_acid", "base");
+eListAddIon("HYDROXIDE", "boric_acid", "base");
+eListAddIon("BORATE", "boric_acid", "acid");
+eListAddIon("HYDROGEN", "boric_acid", "acid");
+eListAdd("INSOLUBLE", "boric_acid");
+
+eListAddIon("BORON", "molten_boric_acid", "base");
+eListAddIon("HYDROXIDE", "molten_boric_acid", "base");
+eListAddIon("BORATE", "molten_boric_acid", "acid");
+eListAddIon("HYDROGEN", "molten_boric_acid", "acid");
+
+eListAdd("AMPHOTERIC", "boric_acid");
+eListAdd("AMPHOTERIC", "molten_boric_acid");
+
+eListAddIon("BORATE", "borax");
+eListAddIon("SODIUM", "borax");
+eListAdd("INSOLUBLE", "borax");
+
+eListAddIon("BORATE", "molten_borax");
+eListAddIon("SODIUM", "molten_borax");
+
+elements.boron = {
+ color: ["#80736a", "#a2999c", "#5e5544", "#292d2c"],
+ behavior: behaviors.WALL,
+ category: "solids",
+ density: 2080,
+ state: "solid",
+ tempHigh: 2076,
+ fireColor: ["#34eb67", "#5ceb34"],
+ reactions: {
+ chlorine: { elem1: "boron_trichloride", elem2: null },
+ liquid_chlorine: { elem1: "boron_trichloride", elem2: null },
+ fluorine: { elem1: "boron_trifluoride", elem2: null },
+ liquid_fluorine: { elem1: "boron_trifluoride", elem2: null },
+ },
+};
+
+elements.fluorine.ignore.push("boron", "molten_boron");
+elements.liquid_fluorine.ignore.push("boron", "molten_boron");
+
+elements.boron_trioxide = {
+ color: "#c6c5c7",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ density: 2550,
+ state: "solid",
+ hidden: true,
+ tempHigh: 450,
+ fireColor: ["#34eb67", "#5ceb34"],
+};
+
+eListAddIon("BORON", "boron_trioxide");
+eListAddIon("OXIDE", "boron_trioxide");
+eListAdd("INSOLUBLE", "boron_trioxide");
+
+eListAddIon("BORON", "molten_boron_trioxide");
+eListAddIon("OXIDE", "molten_boron_trioxide");
+
+elements.molten_boron_trioxide = {
+ reactions: {
+ chlorine: { elem1: "boron_trichloride", elem2: null },
+ },
+};
+
+acidReact("sulfuric_acid", "borax", "boron_trioxide", "sodium_sulfate", 200);
+acidReact("sulfuric_acid_gas", "borax", "boron_trioxide", "sodium_sulfate", 200);
+
+acidReact("hydrofluoric_acid", "boron_trioxide", "boron_trifluoride", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "boron_trioxide", "boron_trifluoride", "fire", 0);
+
+acidReact("hydrogen_fluoride", "boron_trioxide", "boron_trifluoride", "fire", 0);
+acidReact("liquid_hydrogen_fluoride", "boron_trioxide", "boron_trifluoride", "fire", 0);
+
+elements.boron_trifluoride = {
+ color: "#d5d9ce",
+ behavior: behaviors.GAS,
+ category: "gases",
+ density: 2.76,
+ state: "gas",
+ hidden: true,
+ tempLow: -100.3,
+ reactions: {
+ steam: { elem1: "fluoroboric_acid_gas", elem2: "boric_acid" },
+ },
+};
+
+eListAddIon("BORON", "boron_trifluoride");
+eListAddIon("FLUORIDE", "boron_trifluoride");
+eListAdd("INSOLUBLE", "boron_trifluoride");
+
+runAfterLoad(function () {
+ reactList("boron_trifluoride", eLists.WATER, { elem1: "fluoroboric_acid", elem2: "boric_acid" });
+});
+
+elements.liquid_boron_trifluoride = {
+ tempLow: -126.8,
+ reactions: {},
+};
+toxic("boron_trifluoride", 0.1);
+toxic("liquid_boron_trifluoride", 0.1);
+
+eListAddIon("BORON", "liquid_boron_trifluoride");
+eListAddIon("FLUORIDE", "liquid_boron_trifluoride");
+eListAddIon("BORON", "boron_trifluoride_ice");
+eListAddIon("FLUORIDE", "boron_trifluoride_ice");
+
+elements.boron_trichloride = {
+ color: "#ddf0dd",
+ behavior: behaviors.GAS,
+ category: "gases",
+ density: 4.9,
+ state: "gas",
+ hidden: true,
+ tempLow: 12.6,
+ reactions: {
+ steam: { elem1: "acid_gas", elem2: "boric_acid" },
+ hydrogen: { elem1: "boron", elem2: "acid_gas" },
+ },
+};
+
+eListAddIon("BORON", "boron_trichloride");
+eListAddIon("CHLORIDE", "boron_trichloride");
+eListAddIon("BORON", "liquid_boron_trichloride");
+eListAddIon("CHLORIDE", "liquid_boron_trichloride");
+eListAddIon("BORON", "boron_trichloride_ice");
+eListAddIon("CHLORIDE", "boron_trichloride_ice");
+eListAdd("INSOLUBLE", "boron_trichloride");
+
+runAfterLoad(function () {
+ reactList("boron_trichloride", eLists.WATER, { elem1: "acid", elem2: "boric_acid" });
+});
+
+elements.liquid_boron_trichloride = {
+ tempLow: -107.3,
+ reactions: {},
+};
+toxic("boron_trichloride", 0.2);
+toxic("liquid_boron_trichloride", 0.2);
+
+runAfterLoad(function () {
+ reactList("fluoroboric_acid", eLists.WATER, { elem2: "dirty_water" });
+ reactList("fluoroboric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.fluoroboric_acid.reactions["dirty_water"];
+ delete elements.fluoroboric_acid_gas.reactions["dirty_water"];
+});
+
+createAcid("fluoroboric_acid", {}, {}, ["#3bffdb", "#00caaf", "#56c4a3"], true, true, 100, 100, 0, 1000, 1020, 1, "TETRAFLUOROBORATE", { compound: "acid", dontDirtyWater: true });
+
+elements.fluoroboric_acid.ignore.push("boron_trifluoride", "liquid_boron_trifluoride", "boron_trifluoride_ice");
+elements.fluoroboric_acid_gas.ignore.push("boron_trifluoride", "liquid_boron_trifluoride", "boron_trifluoride_ice");
+elements.fluoroboric_acid.ignore.push("boric_acid", "molten_boric_acid");
+elements.fluoroboric_acid_gas.ignore.push("boric_acid", "molten_boric_acid");
+elements.fluoroboric_acid.tick = function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "boron_trifluoride");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ return;
+ }
+ } else {
+ behaviors.LIQUID(pixel);
+ }
+};
+
+delete elements.fluoroboric_acid.behavior;
+
+elements.fluoroboric_acid_gas.tick = function (pixel) {
+ let change = false;
+ 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].ignore.includes(pixelMap[pixel.x + i][pixel.y + j].element)) {
+ if (!elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness || Math.random() > elements[pixelMap[pixel.x + i][pixel.y + j].element].hardness) {
+ changePixel(pixelMap[pixel.x + i][pixel.y + j], "fire");
+ change = true;
+ }
+ }
+ }
+ }
+ if (change) {
+ if (Math.random() < 0.2) {
+ changePixel(pixel, "boron_trifluoride");
+ } else {
+ deletePixel(pixel.x, pixel.y);
+ return;
+ }
+ } else {
+ behaviors.GAS(pixel);
+ }
+};
+
+elements.fluoroboric_acid_gas.behavior = ["XX|XX|XX", "XX|XX|XX", "XX|XX|XX"];
+
+elements.fluoroboric_acid.ignore.push("molten_boric_acid");
+elements.fluoroboric_acid_gas.ignore.push("molten_boric_acid");
+
+eLists.ACID.push("fluoroboric_acid");
+eLists.ACIDGAS.push("fluoroboric_acid_gas");
+
+acidReact("fluoroboric_acid", "sodium_carbonate", "sodium_tetrafluoroborate", ["carbon_dioxide,steam"], 50);
+acidReact("fluoroboric_acid_gas", "sodium_carbonate", "sodium_tetrafluoroborate", ["carbon_dioxide,steam"], 50);
+acidReact("fluoroboric_acid", "sodium_carbonate_solution", "sodium_tetrafluoroborate", ["seltzer,steam"], 50);
+acidReact("fluoroboric_acid_gas", "sodium_carbonate_solution", "sodium_tetrafluoroborate", ["seltzer,steam"], 50);
+
+behaviors.CAUSTIC = ["XX|DB%5|XX", "DB%5|XX|DB%5", "DB%5 AND M2|DB%10 AND M1|DB%5 AND M2"];
+behaviors.MOLTEN_CAUSTIC = ["XX|DB%5 AND CR:fire%2.5|XX", "DB%5 AND M2|XX|DB%5 AND M2", "DB%5 AND M2|DB%10 AND M1|DB%5 AND M2"];
+elements.sodium_hydride = {
+ color: ["#9e9e9e", "#4f4f4f", "#616161", "#454545"],
+ tempHigh: 638,
+ stateHigh: ["sodium", "hydrogen"],
+ behavior: behaviors.CAUSTIC,
+ fireColor: "#ffff00",
+ reactions: {
+ chlorine: { elem1: "salt", elem2: "acid_gas" },
+ vinegar: { elem1: "sodium_acetate", elem2: null, attr1: { foam: 15 } },
+ },
+ category: "powders",
+ state: "solid",
+ hidden: true,
+ density: 1390,
+ burn: 75,
+ burnTime: 120,
+};
+
+eListAddIon("SODIUM", "sodium_hydride", "base");
+eListAddIon("HYDRIDE", "sodium_hydride", "base");
+eListAdd("INSOLUBLE", "sodium_hydride");
+
+runAfterLoad(function () {
+ reactList("sodium_hydride", eLists.WATER, { elem1: ["pop", "pop", "hydrogen", "hydrogen"], chance: 0.1, temp2: 250 });
+});
+
+eLists.CAUSTIC.push("sodium_hydride");
+elements.sodium_hydride.ignore = defaultAcidIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen"]);
+acidIgnore(["sodium_hydride"]);
+
+elements.molten_sodium.reactions.hydrogen = { elem1: "sodium_hydride", elem2: null };
+
+elements.methanol.reactions.sodium = { elem1: "sodium_methoxide", elem2: "hydrogen", temp1: 200, temp2: 200 };
+elements.methanol.reactions.molten_sodium = { elem1: "sodium_methoxide", elem2: "hydrogen", temp1: 200, temp2: 200 };
+
+elements.sodium_methoxide = {
+ color: ["#c4c4c4", "#8c8c8c", "#ababab", "#787878"],
+ tempHigh: 127,
+ behavior: behaviors.CAUSTIC,
+ fireColor: "#ffff00",
+ category: "powders",
+ state: "solid",
+ hidden: true,
+ density: 970,
+ burn: 5,
+ burnTime: 100,
+ reactions: {
+ water: { elem1: "methanol", elem2: "sodium_hydroxide" },
+ salt_water: { elem1: "methanol", elem2: "sodium_hydroxide" },
+ sugar_water: { elem1: "methanol", elem2: "sodium_hydroxide" },
+ dirty_water: { elem1: "methanol", elem2: "sodium_hydroxide" },
+ seltzer: { elem1: "methanol", elem2: "sodium_hydroxide" },
+ pool_water: { elem1: "methanol", elem2: "sodium_hydroxide" },
+ primordial_soup: { elem1: "methanol", elem2: "sodium_hydroxide" },
+ },
+};
+
+eListAddIon("SODIUM", "sodium_methoxide", "base");
+eListAddIon("METHOXIDE", "sodium_methoxide", "base");
+eListAdd("INSOLUBLE", "sodium_methoxide");
+eListAddIon("SODIUM", "molten_sodium_methoxide", "base");
+eListAddIon("METHOXIDE", "molten_sodium_methoxide", "base");
+
+runAfterLoad(function () {
+ reactList("sodium_methoxide", eLists.WATER, { elem1: "methanol", elem2: "sodium_hydroxide" });
+});
+
+elements.molten_sodium_methoxide = {
+ behavior: behaviors.MOLTEN_CAUSTIC,
+ tempLow: 127,
+};
+
+eLists.CAUSTIC.push("sodium_methoxide");
+eLists.CAUSTIC.push("molten_sodium_methoxide");
+elements.sodium_methoxide.ignore = defaultAcidIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen", "methanol", "methanol_gas", "trimethyl_borate"]);
+elements.molten_sodium_methoxide.ignore = defaultAcidGasIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen", "methanol", "methanol_gas", "trimethyl_borate"]);
+acidIgnore(["sodium_methoxide", "molten_sodium_methoxide"]);
+
+elements.trimethyl_borate = {
+ color: "#c4bc89",
+ tempHigh: 69,
+ tempLow: -34,
+ behavior: behaviors.LIQUID,
+ reactions: {
+ sodium_hydride: { elem1: "sodium_borohydride", elem2: "sodium_methoxide" },
+ },
+ category: "liquids",
+ state: "liquid",
+ hidden: true,
+ density: 932,
+ burn: 100,
+ burnTime: 10,
+ fireColor: ["#34eb67", "#5ceb34"],
+};
+
+createSalt("sodium_borohydride", "sodium_borohydride_solution", ["#d3d3de", "#c7c7eb", "#ededfc", "#d9d9d9"], ["#ababc7", "#9d9dd1", "#bdbddb", "#a8a8a8"], false, true, 400, -2, 102, 1070, 1005, "SODIUM", "BOROHYDRIDE");
+
+elements.sodium_borohydride.behavior = behaviors.CAUSTIC;
+elements.sodium_borohydride_solution.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"];
+elements.sodium_borohydride.fireColor = ["#34eb67", "#5ceb34"];
+elements.sodium_borohydride_solution.fireColor = ["#34eb67", "#5ceb34"];
+elements.sodium_borohydride.stateHigh = ["sodium_hydride", "sodium", "boron"];
+
+delete elements["molten_sodium_borohydride"];
+
+eLists.CAUSTIC.push("sodium_borohydride");
+eLists.CAUSTIC.push("sodium_borohydride_solution");
+elements.sodium_borohydride.ignore = defaultAcidIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen", "boron", "trimethyl_borate"]);
+elements.sodium_borohydride_solution.ignore = defaultAcidIgnore.concat(eLists.CAUSTICIGNORE).concat(["sodium", "molten_sodium", "hydrogen", "boron", "trimethyl_borate"]);
+acidIgnore(["sodium_borohydride", "sodium_borohydride_solution"]);
+elements.sodium_hydride.ignore.push(["sodium", "molten_sodium", "hydrogen", "boron"]);
+
+createSalt("sodium_tetrafluoroborate", "sodium_tetrafluoroborate_solution", ["#deded3", "#ebebc7", "#fcfced", "#d9d9d9"], ["#ababb7", "#9d9dc1", "#bdbdcb", "#a8a898"], true, true, 384, -2, 102, 2470, 1012, "SODIUM", "TETRAFLUOROBORATE");
+
+elements.sodium_tetrafluoroborate.stateHigh = ["sodium_fluoride", "boron_trifluoride"];
+elements.sodium_tetrafluoroborate.fireColor = ["#34eb67", "#5ceb34"];
+
+delete elements["molten_sodium_tetrafluoroborate"];
+
+elements.fluoroboric_acid.ignore.push("sodium_tetrafluoroborate", "sodium_tetrafluoroborate_solution");
+elements.fluoroboric_acid_gas.ignore.push("sodium_tetrafluoroborate", "sodium_tetrafluoroborate_solution");
+
+acidReact("sodium_hydride", "boron_trifluoride", "diborane", "sodium_tetrafluoroborate", 20);
+acidReact("sulfuric_acid", "sodium_borohydride", "diborane", "hydrogen", 50);
+
+elements.diborane = {
+ color: "#ffcac9",
+ tempLow: -92.5,
+ behavior: behaviors.GAS,
+ fireColor: ["#34eb67", "#5ceb34"],
+ category: "gases",
+ state: "gas",
+ density: 1.131,
+ burn: 100,
+ burnTime: 20,
+ burnInto: "boron_trioxide",
+ reactions: {
+ oxygen: { elem1: "boron_trioxide", elem2: "fire" },
+ water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
+ salt_water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
+ sugar_water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
+ dirty_water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
+ seltzer: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
+ pool_water: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
+ primordial_soup: { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 },
+ },
+ tempHigh: 200,
+ stateHigh: ["pentaborane", "pentaborane", "decaborane"],
+};
+
+runAfterLoad(function () {
+ reactList("diborane", eLists.WATER, { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 });
+});
+
+elements.liquid_diborane = {
+ tempLow: -164,
+ reactions: {},
+};
+
+toxic("diborane", 1);
+toxic("liquid_diborane", 1);
+
+elements.decaborane = {
+ color: "#d9cece",
+ tempHigh: 98,
+ behavior: behaviors.POWDER,
+ fireColor: ["#34eb67", "#5ceb34"],
+ category: "powders",
+ state: "solid",
+ hidden: true,
+ density: 940,
+ burn: 100,
+ burnTime: 100,
+ burnInto: "boron_trioxide",
+ reactions: {
+ oxygen: { elem1: "boron_trioxide", elem2: "fire" },
+ },
+};
+runAfterLoad(function () {
+ reactList("decaborane", eLists.WATER, { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 });
+});
+
+elements.molten_decaborane = {
+ behavior: behaviors.LIQUID,
+ tempLow: 98,
+ burn: 100,
+ burnTime: 1000,
+ burnInto: "boron_trioxide",
+ reactions: {
+ oxygen: { elem1: "boron_trioxide", elem2: "fire" },
+ },
+ fireColor: ["#34eb67", "#5ceb34"],
+ category: "liquids",
+ state: "liquid",
+ hidden: true,
+ density: 900,
+};
+
+toxic("decaborane", 0.1);
+toxic("molten_decaborane", 0.1);
+
+runAfterLoad(function () {
+ reactList("molten_decaborane", eLists.WATER, { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 });
+});
+
+elements.pentaborane = {
+ color: "#f7b5b5",
+ tempHigh: 60.1,
+ tempLow: -46.8,
+ behavior: behaviors.LIQUID,
+ fireColor: ["#34eb67", "#5ceb34"],
+ category: "liquids",
+ state: "liquid",
+ hidden: true,
+ density: 618,
+ burn: 100,
+ burnTime: 1,
+ burnInto: "explosion",
+ reactions: {
+ oxygen: { elem1: "boron_trioxide", elem2: "explosion" },
+ },
+};
+
+runAfterLoad(function () {
+ reactList("pentaborane", eLists.WATER, { elem1: "boric_acid", elem2: "hydrogen", temp1: 100 });
+});
+
+elements.pentaborane_gas = {
+ tempHigh: 250,
+ stateHigh: "decaborane",
+ reactions: {},
+};
+
+toxic("pentaborane", 1);
+toxic("pentaborane_gas", 1);
+
+acidReact("sodium_borohydride", "boron_trifluoride", "sodium_octahydrotriborate", ["sodium_fluoride", "hydrogen"], 20);
+acidReact("hydrobromic_acid", "sodium_octahydrotriborate", "sodium_bromoheptahydrotriborate", "hydrogen", 20);
+
+elements.sodium_octahydrotriborate = {
+ color: ["#ded3de", "#ebc7eb", "#fbedfb", "#e3cce3"],
+ tempHigh: 500, //i have no idea
+ behavior: behaviors.POWDER,
+ fireColor: ["ffff00", "#34eb67", "#5ceb34"],
+ category: "powders",
+ state: "solid",
+ hidden: true,
+ density: 1070, //???
+ burn: 5,
+ burnTime: 10,
+ burnInto: "boron_trioxide",
+ stateHigh: "sodium_dodecaborate",
+};
+
+eListAddIon("SODIUM", "sodium_octahydrotriborate");
+eListAddIon("OCTAHYDROTRIBORATE", "sodium_octahydrotriborate");
+eListAdd("INSOLUBLE", "sodium_octahydrotriborate");
+
+elements.sodium_dodecaborate = {
+ color: "#f5aef5",
+ tempHigh: 700, //see above comment
+ behavior: behaviors.POWDER,
+ fireColor: ["ffff00", "#34eb67", "#5ceb34"],
+ category: "powders",
+ state: "solid",
+ hidden: true,
+ density: 1050, //guess
+ burn: 1,
+ burnTime: 10,
+ burnInto: "boron_trioxide",
+};
+
+eListAddIon("SODIUM", "sodium_dodecaborate");
+eListAddIon("DODECABORATE", "sodium_dodecaborate");
+eListAdd("INSOLUBLE", "sodium_dodecaborate");
+eListAddIon("SODIUM", "molten_sodium_dodecaborate");
+eListAddIon("DODECABORATE", "molten_sodium_dodecaborate");
+
+elements.sodium_bromoheptahydrotriborate = {
+ color: ["#ded9d3", "#ebd9c7", "#fbf4ed", "#e3d5cc"],
+ tempHigh: 150, //idk
+ behavior: behaviors.POWDER,
+ fireColor: ["ffff00", "#34eb67", "#5ceb34"],
+ category: "powders",
+ state: "solid",
+ hidden: true,
+ density: 1090, //idk
+ burn: 5,
+ burnTime: 10,
+ burnInto: "boron_trioxide",
+ stateHigh: ["pentaborane", "sodium_bromide", "hydrogen"],
+};
+
+eListAddIon("SODIUM", "sodium_bromoheptahydrotriborate");
+eListAddIon("BROMOHEPTAHYDROTRIBORATE", "sodium_bromoheptahydrotriborate");
+eListAdd("INSOLUBLE", "sodium_bromoheptahydrotriborate");
+
+runAfterLoad(function () {
+ reactList("fluoroboric_acid", eLists.WATER, { elem2: "dirty_water" });
+ reactList("fluoroboric_acid_gas", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.fluoroboric_acid.reactions["dirty_water"];
+ delete elements.fluoroboric_acid_gas.reactions["dirty_water"];
+});
+
+elements.white_phosphorus = {
+ color: "#f4f7ad",
+ behavior: [
+ "XX|XX|XX",
+ "XX|XX|XX",
+ "M2%1|M1|M2%1",
+ ],
+ tick: function (pixel) {
+ if (Math.random() < 0.00001 && pixel.temp > 40) {
+ changePixel(pixel, "red_phosphorus");
+ }
+ },
+ reactions: {
+ head: { elem2: null, chance: 0.1 },
+ light: { elem1: "red_phosphorus"},
+ liquid_light: { elem1: "red_phosphorus"},
+ },
+ tempHigh: 44.1,
+ stateHigh: "molten_white_phosphorus",
+ state: "solid",
+ category: "powders",
+ density: 1820,
+ stain: 0.01,
+ burn: 50,
+ burnTime: 300,
+ burnInto: "phosphorus_pentoxide",
+ fireColor: "#5ed6c8",
+};
+
+
+elements.molten_white_phosphorus = {
+ color: "#eaeb96",
+ behavior: behaviors.LIQUID,
+ tick: function (pixel) {
+ if (Math.random() < 0.00001) {
+ changePixel(pixel, "red_phosphorus");
+ }
+ },
+ reactions: {
+ head: { elem2: null, chance: 0.1 },
+ light: { elem1: "red_phosphorus"},
+ liquid_light: { elem1: "red_phosphorus"},
+ },
+ tempLow: 44.1,
+ temp: 50,
+ tempHigh: 280,
+ state: "liquid",
+ stateLow: "white_phosphorus",
+ category: "liquids",
+ hidden: true,
+ density: 1810,
+ stain: 0.01,
+ burn: 50,
+ burnTime: 300,
+ burnInto: "phosphorus_pentoxide",
+ fireColor: "#5ed6c8",
+};
+
+elements.white_phosphorus_gas = {
+ tick: function (pixel) {
+ if (Math.random() < 0.00001 && pixel.temp < 860) {
+ changePixel(pixel, "red_phosphorus");
+ }
+ if (pixel.temp > 860 && Math.random() < 0.00001) {
+ changePixel(pixel, "black_phosphorus");
+ }
+ },
+ burnInto: "phosphorus_pentoxide",
+ density: 5.15,
+ burnTime: 300,
+};
+
+
+elements.red_phosphorus = {
+ color: ["#fa5252", "#de4040", "#f24141"],
+ behavior: behaviors.POWDER,
+ tick: function (pixel) {
+ if (pixel.temp > 250 && Math.random() < 0.00001) {
+ changePixel(pixel, "violet_phosphorus");
+ }
+ },
+ reactions: {
+ "violet_phosphorus": { elem1: "violet_phosphorus", tempMin: 250, chance: 0.001 }
+ },
+ tempHigh: 860,
+ stateHigh: "white_phosphorus_gas",
+ state: "solid",
+ category: "powders",
+ density: 2275,
+ stain: 0.005,
+ fireColor: "#5ed6c8",
+};
+
+
+elements.violet_phosphorus = {
+ color: ["#d92378","#ab1364","#bd1c8a"],
+ behavior: behaviors.STURDYPOWDER,
+ tick: function (pixel) {
+ if (pixel.temp > 300 && Math.random() < 0.000001) {
+ pixel.burning = true;
+ }
+ },
+ reactions: {},
+ tempHigh: 893,
+ stateHigh: "fire",
+ state: "solid",
+ category: "powders",
+ density: 2360,
+ fireColor: "#5ed6c8",
+};
+
+
+elements.black_phosphorus = {
+ color: ["#170a02","#380e03","#6b6968"],
+ behavior: behaviors.SUPPORTPOWDER,
+ reactions: {},
+ tempHigh: 900,
+ state: "solid",
+ category: "powders",
+ density: 2690,
+ fireColor: "#5ed6c8",
+};
+
+
+elements.phosphorus_pentoxide = {
+ color: "#fcfcfa",
+ behavior: behaviors.POWDER,
+ tempHigh: 340,
+ state: "solid",
+ category: "powders",
+ density: 2390,
+ fireColor: "#5ed6c8",
+ reactions: {
+ mud: { elem2: "dirt" },
+ sand: { elem2: "sand" },
+ ant: { elem2: "dead_bug", chance: 0.1 },
+ worm: { elem2: "dead_bug" },
+ fly: { elem2: "dead_bug", chance: 0.1 },
+ firefly: { elem2: "dead_bug", chance: 0.1 },
+ bee: { elem2: "dead_bug", chance: 0.1 },
+ stink_bug: { elem2: "dead_bug", chance: 0.1 },
+ termite: { elem2: "dead_bug", chance: 0.1 },
+ flea: { elem2: "dead_bug", chance: 0.1 },
+ slug: { elem2: "slime" },
+ frog: { elem2: "slime" },
+ tadpole: { elem2: "slime" },
+ fish: { elem2: "meat" },
+ snail: { elem2: "limestone" },
+ slime: { elem2: "dust" },
+ meat: { elem2: "dust" },
+ rotten_meat: { elem2: "dust" },
+ cooked_meat: { elem2: "dust" },
+ blood: { elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: ["salt", "oxygen"] },
+ algae: { elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: "salt" },
+ kelp: { elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: "salt" },
+ mushroom_spore: { elem2: "dust" },
+ lichen: { elem2: "dust" },
+ yeast: { elem2: "dust" },
+ cell: { elem2: "dust"},
+ cancer: { elem2: "dust" },
+ udder: { elem2: "dust" },
+ bone_marrow: { elem2: "dust" },
+ jelly: { elem2: "dust" },
+ yolk: { elem2: "dust" },
+ },
+};
+
+
+runAfterLoad(function () {
+ reactList("phosphorus_pentoxide", eLists.WATER, { elem1: ["phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphorus_pentoxide", "phosphoric_acid"], elem2: null });
+});
+
+createAcid("phosphoric_acid", structuredClone(defaultAcidReactions), structuredClone(defaultAcidGasReactions), ["#a1a3ed", "#8f91db", "#bab5f5"], false, true, 120, 100, 0, 1000, 1684, 4, "PHOSPHATE", { compound: "acid", dontDirtyWater: true });
+
+elements.phosphoric_acid.ignore.push("phosphorus_pentoxide");
+elements.phosphoric_acid_gas.ignore.push("phosphorus_pentoxide");
+elements.phosphoric_acid.ignore.push("sugar");
+elements.phosphoric_acid_gas.ignore.push("sugar");
+
+acidReact("phosphoric_acid", "soda", "soda", ["soda", null]);
+elements.phosphoric_acid.reactions.slaked_lime = null;
+elements.phosphoric_acid_gas.reactions.slaked_lime = null;
+acidReact("phosphoric_acid", "slaked_lime", "neutral_acid", "tricalcium_phosphate");
+acidReact("phosphoric_acid_gas", "slaked_lime", "neutral_acid", "tricalcium_phosphate");
+
+
+elements.apatite = {
+ color: ["#48b593", "#3adec0", "#29c4cc"],
+ behavior: behaviors.POWDER,
+ category: "land",
+ density: 3160,
+ state: "solid",
+ tempHigh: 1670,
+ reactions: {},
+};
+
+elements.molten_apatite = {
+ reactions: {
+ charcoal: { elem1: "white_phosphorus_gas", elem2: ["carbon_dioxide", "molten_slag"] },
+ }
+}
+
+elements.tricalcium_phosphate = {
+ color: "#b9e9ed",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ hidden: true,
+ density: 3140,
+ state: "solid",
+ tempHigh: 1670,
+ reactions: {},
+};
+
+elements.molten_tricalcium_phosphate = {
+ reactions: {
+ charcoal: { elem1: "white_phosphorus_gas", elem2: ["carbon_dioxide", "molten_slag"] },
+ }
+}
+eListAdd("INSOLUBLE", "tricalcium_phosphate");
+eListAddIon("CALCIUM", "tricalcium_phosphate");
+eListAddIon("PHOSPHATE", "tricalcium_phosphate");
+
+acidReact("apatite", "sulfuric_acid", "phosphoric_acid", ["chalk", "chalk", "chalk", "chalk", "hydrogen_fluoride"]);
+acidReact("apatite", "sulfuric_acid_gas", "phosphoric_acid", ["chalk", "chalk", "chalk", "chalk", "hydrogen_fluoride"]);
+elements.hydrogen_fluoride.ignore.push("apatite");
+elements.liquid_hydrogen_fluoride.ignore.push("apatite");
+elements.hydrofluoric_acid.ignore.push("apatite");
+elements.hydrofluoric_acid_gas.ignore.push("apatite");
+acidReact("tricalcium_phosphate", "sulfuric_acid", "phosphoric_acid", "chalk");
+acidReact("tricalcium_phosphate", "sulfuric_acid_gas", "phosphoric_acid", "chalk");
+acidReact("bone", "sulfuric_acid", "phosphoric_acid", "chalk");
+acidReact("bone", "sulfuric_acid_gas", "phosphoric_acid", "chalk");
+
+
+
+
+elements.indium = {
+ color: ["#aca9b0", "#ccc7d1", "#d6cbd6"],
+ behavior: behaviors.WALL,
+ tempHigh: 156.6,
+ category: "solids",
+ density: 7290,
+ conduct: 0.05,
+ hardness: 0.05,
+ superconductAt: -269.74,
+ tick: function (pixel) {
+ if (!isEmpty(pixel.x, pixel.y - 1, true) && elements[pixelMap[pixel.x][pixel.y - 1].element].movable && pixelMap[pixel.x][pixel.y - 1].element !== "indium") {
+ if (Math.random() < elements[pixelMap[pixel.x][pixel.y - 1].element].density / 7e4) {
+ pixel.indium_bend = elements[pixelMap[pixel.x][pixel.y - 1].element].density / 7e4;
+ }
+ }
+ if (pixel.indium_bend > 0) {
+ for (let i = -1; i <= 1; i++) {
+ if (!isEmpty(pixel.x + i, pixel.y + 1, true) && pixelMap[pixel.x + i][pixel.y + 1].element == "indium") {
+ if (Math.random() < pixel.indium_bend) {
+ pixelMap[pixel.x + i][pixel.y + 1].indium_bend = pixel.indium_bend;
+ }
+ }
+ }
+ let i = 0;
+ let y = pixel.y;
+ while (!isEmpty(pixel.x, y + i, true) && pixelMap[pixel.x][y + i].element == "indium") {
+ behaviors.STURDYPOWDER(pixelMap[pixel.x][y + i]);
+ i--;
+ }
+ pixel.indium_bend = 0;
+ }
+ },
+ reactions: {
+ chlorine: { elem1: "indium_chloride", elem2: null },
+ liquid_chlorine: { elem1: "indium_chloride", elem2: null },
+ },
+};
+
+createSalt("indium_chloride", "indium_chloride_solution", "#f8ebff", "#7e70ff", true, true, 586, -2, 102, 3460, 1030, "INDIUM", "CHLORIDE");
+createSalt("indium_nitrate", "indium_nitrate_solution", "#eddaf5", blendColors("#eddaf5", "#2167ff", 0.5), true, true, 150, -2, 102, 4380, 1050, "INDIUM", "NITRATE");
+
+acidReact("indium", "nitric_acid", "indium_nitrate_solution", "nitric_oxide");
+acidReact("indium", "nitric_acid_gas", "indium_nitrate_solution", "nitric_oxide");
+elements.nitric_acid.ignore.push("indium_nitrate");
+elements.nitric_acid_gas.ignore.push("indium_nitrate");
+
+elements.indium_nitrate.stateHigh = ["indium_oxide", "nitrogen_dioxide", "fire"];
+toxic("indium_nitrate", 0.1);
+toxic("indium_nitrate_solution", 0.1);
+
+elements.indium_hydroxide = {
+ color: "#ebc7e4",
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 150,
+ category: "powders",
+ state: "solid",
+ density: 4380,
+ stateHigh: ["indium_oxide", "steam"],
+ reactions: {},
+};
+
+toxic("indium_hydroxide", 0.02);
+
+eListAdd("INSOLUBLE", "indium_hydroxide");
+eListAddIon("INDIUM", "indium_hydroxide");
+eListAddIon("HYDROXIDE", "indium_hydroxide");
+
+elements.indium_oxide = {
+ color: "#e3f294",
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 1910,
+ category: "powders",
+ state: "solid",
+ density: 7179,
+ reactions: {
+ steam: { elem1: "indium_hydroxide", elem2: null, tempMax: 150 },
+ },
+};
+
+eListAdd("INSOLUBLE", "indium_oxide");
+eListAddIon("INDIUM", "indium_oxide");
+eListAddIon("OXIDE", "indium_oxide");
+
+elements.thallium = {
+ color: ["#b3bdb4", "#a7b8b0", "#9fa39d"],
+ behavior: behaviors.STURDYPOWDER,
+ tempHigh: 304,
+ category: "powders",
+ state: "solid",
+ density: 11873,
+ conduct: 0.05,
+ hardness: 0.05,
+ reactions: {
+ steam: { elem1: "thallium_hydroxide_solution", elem2: "hydrogen", chance: 0.01 },
+ molten_sulfur: { elem1: "thallium_sulfide", chance: 0.1}
+ },
+};
+
+createSalt("thallium_hydroxide", "thallium_hydroxide_solution", ["#f0f564","#f7ee45"], "#a4c244", true, true, 139, -2, 102, 7440, 1035, "THALLIUM", "HYDROXIDE");
+elements.thallium_hydroxide.stateHigh = ["thallium_oxide", "steam"];
+
+elements.thallium_oxide = {
+ color: "#2b2b2a",
+ behavior: behaviors.POWDER,
+ tempHigh: 596,
+ category: "powders",
+ state: "solid",
+ density: 10450,
+ hidden: true,
+ reactions: {}
+};
+
+eListAdd("INSOLUBLE", "thallium_oxide");
+eListAddIon("THALLIUM", "thallium_oxide");
+eListAddIon("OXIDE", "thallium_oxide");
+
+
+elements.thallium_sulfide = {
+ color: "#20201f",
+ behavior: behaviors.POWDER,
+ tempHigh: 448,
+ category: "powders",
+ state: "solid",
+ density: 8390,
+ hidden: true,
+ conduct: 0.5,
+ reactions: {
+ "light": { elem2: null, charge1: 1 },
+ "liquid_light": { elem2: null, charge1: 1 },
+ }
+};
+
+eListAdd("INSOLUBLE", "thallium_sulfide");
+eListAddIon("THALLIUM", "thallium_sulfide");
+eListAddIon("SULFIDE", "thallium_sulfide");
+
+createSalt("thallium_sulfate", "thallium_sulfate_solution", "#fafaf0", "#23ccbe", true, true, 632, -2, 102, 6770, 1032, "THALLIUM", "SULFATE");
+
+acidReact("sulfuric_acid", "thallium", "thallium_sulfate_solution", "hydrogen", 50);
+acidReact("sulfuric_acid_gas", "thallium", "thallium_sulfate_solution", "hydrogen", 50);
+acidReact("sulfuric_acid", "molten_thallium", "thallium_sulfate_solution", "hydrogen", 50);
+acidReact("sulfuric_acid_gas", "molten_thallium", "thallium_sulfate_solution", "hydrogen", 50);
+elements.sulfuric_acid.ignore.push("thallium_sulfate");
+elements.sulfuric_acid_gas.ignore.push("thallium_sulfate");
+
+runAfterLoad(function () {
+ reactList("thallium", eLists.WATER, { elem1: "thallium_hydroxide_solution", elem2: "hydrogen", chance: 0.01 });
+ reactList("thallium_oxide", eLists.WATER, { elem1: "thallium_hydroxide_solution", elem2: null });
+ reactList("thallium_hydroxide_solution", eLists.WATER, { elem2: "dirty_water" });
+ reactList("thallium_sulfate_solution", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.thallium.reactions["thallium_hydroxide_solution"];
+ delete elements.thallium_oxide.reactions["thallium_hydroxide_solution"];
+ delete elements.thallium_hydroxide_solution.reactions["dirty_water"];
+ delete elements.thallium_hydroxide_solution.reactions["thallium_hydroxide_solution"];
+ delete elements.thallium_hydroxide_solution.reactions["thallium_sulfate_solution"];
+ delete elements.thallium_sulfate_solution.reactions["dirty_water"];
+ delete elements.thallium_sulfate_solution.reactions["thallium_hydroxide_solution"];
+ delete elements.thallium_sulfate_solution.reactions["thallium_sulfate_solution"];
+});
+
+toxic("thallium", 0.2, false);
+toxic("thallium_hydroxide", 0.2, false);
+toxic("thallium_hydroxide_solution", 0.2, false);
+toxic("thallium_oxide", 0.2, false);
+toxic("thallium_sulfide", 0.2);
+toxic("thallium_sulfate", 0.2, false);
+toxic("thallium_sulfate_solution", 0.2, false);
+elements.thallium.reactions["hair"] = { elem2: null };
+elements.thallium_hydroxide.reactions["hair"] = { elem2: null };
+elements.thallium_hydroxide_solution.reactions["hair"] = { elem2: null };
+elements.thallium_oxide.reactions["hair"] = { elem2: null };
+elements.thallium_sulfide.reactions["hair"] = { elem2: null };
+elements.thallium_sulfate.reactions["hair"] = { elem2: null };
+elements.thallium_sulfate_solution.reactions["hair"] = { elem2: null };
+
+elements.uraninite = {
+ color: ["#545323", "#50573b", "#656660", "#4d4933", "#615e4a", "#525043"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ tempHigh: 2865,
+ category: "land",
+ state: "solid",
+ density: 10970,
+};
+
+elements.yellowcake = {
+ color: ["#dbd827", "#bce346", "#a8c418", "#d9bb1a", "#dec418", "#cfb615"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ tempHigh: 1150,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 8300,
+ reactions: {
+ hydrogen: { elem1: ["uranium_dioxide", "uranium_dioxide", "uranium_dioxide", "uranium_dioxide", "thorium_dioxide"], elem2: "steam" },
+ },
+};
+
+elements.yellowcake_solution = {
+ color: "#d2ed6f",
+ ignore: elements.sulfuric_acid.ignore.concat(eLists.CAUSTICIGNORE).concat(["radiation", "yellowcake", "uraninite"]),
+ behavior: ["XX|DB%5 AND CR:radiation%0.05|XX", "DB%5 AND M2 AND CR:radiation%0.05|XX|DB%5 AND M2 AND CR:radiation%0.05", "DB%5 AND M2|DB%10 AND M1|DB%5 AND M2"],
+ tempHigh: 337,
+ category: "liquids",
+ stateHigh: ["sulfuric_acid_gas", "yellowcake"],
+ state: "liquid",
+ hidden: true,
+ density: 1850,
+ reactions: {},
+};
+
+acidIgnore(["yellowcake_solution"]);
+eLists.CAUSTIC.push("yellowcake_solution");
+eLists.ACID.push("yellowcake_solution");
+
+acidReact("sulfuric_acid", "uraninite", "yellowcake_solution", null, 50);
+acidReact("sulfuric_acid_gas", "uraninite", "yellowcake", "sulfuric_acid_gas", 50);
+acidReact("sulfuric_acid", "yellowcake", "yellowcake_solution", "yellowcake_solution", 50);
+
+elements.alpha_particle = {
+ color: "#ff7878",
+ behavior: ["XX|XX|XX", "XX|CH:helium%0.01 AND DL%0.25|XX", "XX|XX|XX"],
+ reactions: {
+ electric: { elem1: null, elem2: "helium", temp2: 200 },
+ },
+ tick: behaviors.BOUNCY,
+ temp: 35,
+ category: "energy",
+ state: "gas",
+ density: 0.00012,
+ ignoreAir: true,
+};
+
+elements.depleted_uranium = {
+ color: ["#599e61", "#364d3c", "#494d4a", "#6c8a42", "#798d65", "#b5e089"],
+ behavior: ["XX|CR:alpha_particle%0.01|XX", "CR:alpha_particle%0.01|CH:thorium%0.001|CR:alpha_particle%0.01", "M2|M1|M2"],
+ reactions: {
+ neutron: { elem2: null, func: depleted_uranium },
+ oxygen: { elem1: "depleted_uranium_dioxide", elem2: null, chance: 0.1 },
+ meat: { elem2: "rotten_meat", chance: 0.1 },
+ cheese: { elem2: "rotten_cheese", chance: 0.1 },
+ quark_matter: { elem1: "stable_uranium" },
+ },
+ tempHigh: 1132.2,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 19100,
+ hardness: 0.6,
+ conduct: 0.235,
+};
+
+runAfterLoad(function () {
+ reactList("depleted_uranium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
+ delete elements.depleted_uranium.reactions["dirty_water"];
+});
+
+elements.molten_depleted_uranium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.01|XX", "M2 AND CR:alpha_particle%0.01|XX|M2 AND CR:alpha_particle%0.01", "M1|M1|M1"],
+ reactions: {
+ neutron: { elem2: null, func: depleted_uranium },
+ quark_matter: { elem1: "stable_uranium" },
+ },
+};
+
+elements.enriched_uranium = {
+ color: ["#599e61", "#364d3c", "#494d4a", "#6c8a42", "#798d65", "#b5e089"],
+ behavior: ["XX|CR:radiation%2.5 AND CR:alpha_particle%0.1|XX", "CR:radiation%2.5 AND CR:alpha_particle%0.1|CH:thorium%0.05 AND CH:protactinium%0.01|CR:radiation%2.5 AND CR:alpha_particle%0.1", "M2|M1|M2"],
+ reactions: {
+ neutron: { func: enriched_uranium, temp1: 150 },
+ oxygen: { elem1: "enriched_uranium_dioxide", elem2: null, chance: 0.1 },
+ meat: { elem2: "rotten_meat", chance: 0.1 },
+ cheese: { elem2: "rotten_cheese", chance: 0.1 },
+ quark_matter: { elem1: "stable_uranium" },
+ },
+ tempHigh: 1132.2,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 19100,
+ hardness: 0.6,
+ conduct: 0.235,
+ excludeRandom: true,
+};
+
+runAfterLoad(function () {
+ reactList("enriched_uranium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
+ delete elements.enriched_uranium.reactions["dirty_water"];
+});
+
+runAfterLoad(function () {
+ reactList("uranium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
+ delete elements.uranium.reactions["dirty_water"];
+});
+
+elements.molten_enriched_uranium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%2.5 AND CR:alpha_particle%0.1|XX", "M2 AND CR:radiation%2.5 AND CR:alpha_particle%0.1|XX|M2 AND CR:radiation%2.5 AND CR:alpha_particle%0.1", "M1|M1|M1"],
+ reactions: {
+ neutron: { func: enriched_uranium, temp1: 150 },
+ quark_matter: { elem1: "stable_uranium" },
+ },
+ excludeRandom: true,
+};
+function enriched_uranium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "neptunium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+}
+
+function depleted_uranium(pixel) {
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "plutonium");
+ }
+}
+
+elements.stable_uranium = {
+ color: [blendColors("#599e61", "#ff0000"), blendColors("#364d3c", "#00ff00"), blendColors("#494d4a", "#0000ff"), blendColors("#6c8a42", "#ff0000"), blendColors("#798d65", "#00ff00"), blendColors("#b5e089", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ oxygen: { elem1: "stable_uranium_dioxide", elem2: null, chance: 0.1 },
+ meat: { elem2: "rotten_meat", chance: 0.1 },
+ cheese: { elem2: "rotten_cheese", chance: 0.1 },
+ water: { elem2: "dirty_water", chance: 0.25 },
+ },
+ tempHigh: 1132.2,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 19100,
+ hardness: 0.6,
+ conduct: 0.235,
+};
+runAfterLoad(function () {
+ reactList("stable_uranium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
+ delete elements.stable_uranium.reactions["dirty_water"];
+});
+
+elements.uranium.reactions["oxygen"] = { elem1: "uranium_dioxide", elem2: null, chance: 0.1 };
+elements.uranium.reactions["quark_matter"] = { elem1: "stable_uranium" };
+elements.uranium.behavior = ["XX|CR:radiation%1 AND CR:alpha_particle%0.01|XX", "CR:radiation%1 AND CR:alpha_particle%0.01|CH:thorium%0.001|CR:radiation%1 AND CR:alpha_particle%0.01", "M2|M1|M2"];
+elements.molten_uranium.behavior = ["XX|CR:fire%2.5 AND CR:radiation%1 AND CR:alpha_particle%0.01|XX", "M2 AND CR:radiation%1 AND CR:alpha_particle%0.01|XX|M2 AND CR:radiation%1 AND CR:alpha_particle%0.01", "M1|M1|M1"];
+elements.molten_uranium.reactions["quark_matter"] = { elem1: "stable_uranium" };
+elements.molten_uranium.excludeRandom = true;
+
+eListAddIon("URANIUMIV", "uranium_dioxide");
+eListAddIon("OXIDE", "uranium_dioxide");
+eListAdd("INSOLUBLE", "uranium_dioxide");
+eListAddIon("ENRICHEDURANIUMIV", "enriched_uranium_dioxide");
+eListAddIon("OXIDE", "enriched_uranium_dioxide");
+eListAdd("INSOLUBLE", "enriched_uranium_dioxide");
+eListAddIon("DEPLETEDURANIUMIV", "depleted_uranium_dioxide");
+eListAddIon("OXIDE", "depleted_uranium_dioxide");
+eListAdd("INSOLUBLE", "depleted_uranium_dioxide");
+eListAddIon("STABLEURANIUMIV", "stable_uranium_dioxide");
+eListAddIon("OXIDE", "stable_uranium_dioxide");
+eListAdd("INSOLUBLE", "stable_uranium_dioxide");
+
+elements.uranium_dioxide = {
+ color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ reactions: {
+ neutron: { temp1: 25 },
+ },
+ tempHigh: 2865,
+ category: "powders",
+ state: "solid",
+ density: 10970,
+};
+
+elements.molten_uranium_dioxide = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+ reactions: {
+ neutron: { temp1: 25 },
+ },
+};
+
+elements.depleted_uranium_dioxide = {
+ color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
+ behavior: behaviors.POWDER,
+ reactions: {
+ neutron: { elem2: null },
+ },
+ tempHigh: 2865,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 10970,
+};
+
+elements.stable_uranium_dioxide = {
+ color: [blendColors("#474744", "#ff0000"), blendColors("#21211f", "#00ff00"), blendColors("#2b2b2b", "#0000ff"), blendColors("#9c998c", "#ff0000"), blendColors("#40403f", "#00ff00"), blendColors("#24231d", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ neutron: { elem2: null },
+ },
+ tempHigh: 2865,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 10970,
+};
+
+elements.enriched_uranium_dioxide = {
+ color: ["#474744", "#21211f", "#2b2b2b", "#9c998c", "#40403f", "#24231d"],
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ reactions: {
+ neutron: {
+ func: function (pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+ },
+ temp1: 150,
+ },
+ },
+ tempHigh: 2865,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 10970,
+ excludeRandom: true,
+};
+
+elements.molten_enriched_uranium_dioxide = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.25|XX", "M2 AND CR:radiation%0.25|XX|M2 AND CR:radiation%0.25", "M1|M1|M1"],
+ reactions: {
+ neutron: {
+ func: function (pixel, p) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 2, "neutron");
+ },
+ },
+ },
+ excludeRandom: true,
+};
+
+function reduce(element, element2, result) {
+ if (element2 === "oxygen") {
+ Object.assign(elements[element].reactions, {
+ molten_magnesium: { elem1: result, elem2: "magnesium_oxide" },
+ molten_calcium: { elem1: result, elem2: "quicklime" },
+ //"molten_sodium": { elem1: result, elem2: "sodium_oxide"},
+ });
+ }
+ if (element2 === "fluorine") {
+ Object.assign(elements[element].reactions, {
+ molten_magnesium: { elem1: result, elem2: "magnesium_fluoride" },
+ molten_calcium: { elem1: result, elem2: "fluorite" },
+ molten_sodium: { elem1: result, elem2: "sodium_fluoride" },
+ molten_potassium: { elem1: result, elem2: "potassium_fluoride" },
+ });
+ }
+}
+
+reduce("uranium_dioxide", "oxygen", "uranium");
+reduce("enriched_uranium_dioxide", "oxygen", "enriched_uranium");
+reduce("depleted_uranium_dioxide", "oxygen", "depleted_uranium");
+reduce("stable_uranium_dioxide", "oxygen", "stable_uranium");
+
+acidReact("hydrofluoric_acid", "uranium_dioxide", "uranium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid", "depleted_uranium_dioxide", "depleted_uranium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid", "enriched_uranium_dioxide", "enriched_uranium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid", "stable_uranium_dioxide", "stable_uranium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "uranium_dioxide", "uranium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "depleted_uranium_dioxide", "depleted_uranium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "enriched_uranium_dioxide", "enriched_uranium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "stable_uranium_dioxide", "stable_uranium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "uranium_dioxide", "uranium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "depleted_uranium_dioxide", "depleted_uranium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "enriched_uranium_dioxide", "enriched_uranium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "stable_uranium_dioxide", "stable_uranium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "uranium_dioxide", "uranium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "depleted_uranium_dioxide", "depleted_uranium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "enriched_uranium_dioxide", "enriched_uranium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "stable_uranium_dioxide", "stable_uranium_tetrafluoride", "fire");
+
+elements.hydrofluoric_acid.ignore.push("uranium_hexafluoride", "enriched_uranium_hexafluoride", "depleted_uranium_hexafluoride", "stable_uranium_hexafluoride");
+elements.hydrofluoric_acid_gas.ignore.push("uranium_hexafluoride", "enriched_uranium_hexafluoride", "depleted_uranium_hexafluoride", "stable_uranium_hexafluoride");
+elements.hydrogen_fluoride.ignore.push("uranium_hexafluoride", "enriched_uranium_hexafluoride", "depleted_uranium_hexafluoride", "stable_uranium_hexafluoride");
+elements.liquid_hydrogen_fluoride.ignore.push("uranium_hexafluoride", "enriched_uranium_hexafluoride", "depleted_uranium_hexafluoride", "stable_uranium_hexafluoride");
+
+eListAddIon("URANIUMIV", "uranium_tetrafluoride");
+eListAddIon("FLUORIDE", "uranium_tetrafluoride");
+eListAdd("INSOLUBLE", "uranium_tetrafluoride");
+eListAddIon("ENRICHEDURANIUMIV", "enriched_uranium_tetrafluoride");
+eListAddIon("FLUORIDE", "enriched_uranium_tetrafluoride");
+eListAdd("INSOLUBLE", "enriched_uranium_tetrafluoride");
+eListAddIon("DEPLETEDURANIUMIV", "depleted_uranium_tetrafluoride");
+eListAddIon("FLUORIDE", "depleted_uranium_tetrafluoride");
+eListAdd("INSOLUBLE", "depleted_uranium_tetrafluoride");
+eListAddIon("STABLEURANIUMIV", "stable_uranium_tetrafluoride");
+eListAddIon("FLUORIDE", "stable_uranium_tetrafluoride");
+eListAdd("INSOLUBLE", "stable_uranium_tetrafluoride");
+
+elements.uranium_tetrafluoride = {
+ color: ["#495747", "#394d38", "#5a7859"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ reactions: {},
+ tempHigh: 1036,
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+};
+
+elements.molten_uranium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+};
+
+elements.depleted_uranium_tetrafluoride = {
+ color: ["#495747", "#394d38", "#5a7859"],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 1036,
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+};
+
+elements.stable_uranium_tetrafluoride = {
+ color: [blendColors("#495747", "#ff0000"), blendColors("#394d38", "#00ff00"), blendColors("#5a7859", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 1036,
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+};
+
+elements.enriched_uranium_tetrafluoride = {
+ color: ["#495747", "#394d38", "#5a7859"],
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ reactions: {},
+ tempHigh: 1036,
+ category: "powders",
+ state: "solid",
+ density: 6700,
+ hidden: true,
+};
+
+elements.molten_enriched_uranium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.25|XX", "M2 AND CR:radiation%0.25|XX|M2 AND CR:radiation%0.25", "M1|M1|M1"],
+};
+
+toxic("uranium_tetrafluoride", 0.1);
+toxic("enriched_uranium_tetrafluoride", 0.1);
+toxic("depleted_uranium_tetrafluoride", 0.1);
+toxic("stable_uranium_tetrafluoride", 0.1);
+
+acidReact("fluorine", "uranium_tetrafluoride", "uranium_hexafluoride", "fire");
+acidReact("fluorine", "depleted_uranium_tetrafluoride", "depleted_uranium_hexafluoride", "fire");
+acidReact("fluorine", "enriched_uranium_tetrafluoride", "enriched_uranium_hexafluoride", "fire");
+acidReact("fluorine", "stable_uranium_tetrafluoride", "stable_uranium_hexafluoride", "fire");
+acidReact("liquid_fluorine", "uranium_tetrafluoride", "uranium_hexafluoride", "fire");
+acidReact("liquid_fluorine", "depleted_uranium_tetrafluoride", "depleted_uranium_hexafluoride", "fire");
+acidReact("liquid_fluorine", "enriched_uranium_tetrafluoride", "enriched_uranium_hexafluoride", "fire");
+acidReact("liquid_fluorine", "stable_uranium_tetrafluoride", "stable_uranium_hexafluoride", "fire");
+
+elements.fluorine.ignore.push("uranium_hexafluoride_gas", "depleted_uranium_hexafluoride_gas", "enriched_uranium_hexafluoride_gas", "stable_uranium_hexafluoride_gas");
+elements.liquid_fluorine.ignore.push("uranium_hexafluoride_gas", "depleted_uranium_hexafluoride_gas", "enriched_uranium_hexafluoride_gas", "stable_uranium_hexafluoride_gas");
+
+reduce("uranium_tetrafluoride", "fluorine", "uranium");
+reduce("enriched_uranium_tetrafluoride", "fluorine", "enriched_uranium");
+reduce("depleted_uranium_tetrafluoride", "fluorine", "depleted_uranium");
+reduce("stable_uranium_tetrafluoride", "fluorine", "stable_uranium");
+
+eListAddIon("URANIUMVI", "uranium_hexafluoride");
+eListAddIon("FLUORIDE", "uranium_hexafluoride");
+eListAdd("INSOLUBLE", "uranium_hexafluoride");
+eListAddIon("ENRICHEDURANIUMVI", "enriched_uranium_hexafluoride");
+eListAddIon("FLUORIDE", "enriched_uranium_hexafluoride");
+eListAdd("INSOLUBLE", "enriched_uranium_hexafluoride");
+eListAddIon("DEPLETEDURANIUMVI", "depleted_uranium_hexafluoride");
+eListAddIon("FLUORIDE", "depleted_uranium_hexafluoride");
+eListAdd("INSOLUBLE", "depleted_uranium_hexafluoride");
+eListAddIon("STABLEURANIUMVI", "stable_uranium_hexafluoride");
+eListAddIon("FLUORIDE", "stable_uranium_hexafluoride");
+eListAdd("INSOLUBLE", "stable_uranium_hexafluoride");
+
+elements.uranium_hexafluoride = {
+ color: "#f7fff7",
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ reactions: {
+ hydrogen: { elem1: "uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 56.5,
+ category: "powders",
+ state: "solid",
+ density: 5090,
+ stateHighName: "uranium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.uranium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.05", "XX"],
+ ["CR:radiation%0.05", "XX", "CR:radiation%0.05"],
+ ["XX", "CR:radiation%0.05", "XX"],
+ ],
+ tick: function (pixel) {
+ pixelTick(pixel, elements[pixel.element].behavior2);
+ },
+ state: "gas",
+ density: 12.84,
+ reactions: {
+ hydrogen: { elem1: "uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ onCentrifuge: function (pixel) {
+ if (Math.random() < 0.05) {
+ if (Math.random() < 0.8) {
+ changePixel(pixel, "depleted_uranium_hexafluoride");
+ } else {
+ changePixel(pixel, "enriched_uranium_hexafluoride");
+ }
+ }
+ },
+};
+
+elements.depleted_uranium_hexafluoride = {
+ color: "#f7fff7",
+ behavior: behaviors.POWDER,
+ reactions: {
+ hydrogen: { elem1: "depleted_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 56.5,
+ category: "powders",
+ state: "solid",
+ density: 5090,
+ stateHighName: "depleted_uranium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.depleted_uranium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ state: "gas",
+ density: 12.84,
+ reactions: {
+ hydrogen: { elem1: "depleted_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+};
+
+elements.stable_uranium_hexafluoride = {
+ color: [blendColors("#f7fff7", "#ff0000"), blendColors("#f7fff7", "#00ff00"), blendColors("#f7fff7", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ hydrogen: { elem1: "stable_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 56.5,
+ category: "powders",
+ state: "solid",
+ density: 5090,
+ stateHighName: "stable_uranium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.stable_uranium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ state: "gas",
+ density: 12.84,
+ reactions: {
+ hydrogen: { elem1: "stable_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+};
+
+elements.enriched_uranium_hexafluoride = {
+ color: "#f7fff7",
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ reactions: {
+ hydrogen: { elem1: "enriched_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 56.5,
+ category: "powders",
+ state: "solid",
+ density: 5090,
+ stateHighName: "enriched_uranium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.enriched_uranium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.25", "XX"],
+ ["CR:radiation%0.25", "XX", "CR:radiation%0.25"],
+ ["XX", "CR:radiation%0.25", "XX"],
+ ],
+ tick: function (pixel) {
+ pixelTick(pixel, elements[pixel.element].behavior2);
+ },
+ reactions: {
+ hydrogen: { elem1: "enriched_uranium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ state: "gas",
+ density: 12.84,
+};
+
+toxic("uranium_hexafluoride", 0.2);
+toxic("enriched_uranium_hexafluoride", 0.2);
+toxic("depleted_uranium_hexafluoride", 0.2);
+toxic("stable_uranium_hexafluoride", 0.2);
+toxic("uranium_hexafluoride_gas", 0.2);
+toxic("enriched_uranium_hexafluoride_gas", 0.2);
+toxic("depleted_uranium_hexafluoride_gas", 0.2);
+toxic("stable_uranium_hexafluoride_gas", 0.2);
+
+runAfterLoad(function () {
+ reactList("uranium_hexafluoride", eLists.WATER, { elem1: "uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("depleted_uranium_hexafluoride", eLists.WATER, { elem1: "depleted_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("enriched_uranium_hexafluoride", eLists.WATER, { elem1: "enriched_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("stable_uranium_hexafluoride", eLists.WATER, { elem1: "stable_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("uranium_hexafluoride_gas", eLists.WATER, { elem1: "uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("depleted_uranium_hexafluoride_gas", eLists.WATER, { elem1: "depleted_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("enriched_uranium_hexafluoride_gas", eLists.WATER, { elem1: "enriched_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("stable_uranium_hexafluoride_gas", eLists.WATER, { elem1: "stable_uranium_tetrafluoride", elem2: "hydrofluoric_acid" });
+});
+
+elements.radium = {
+ color: "#3bdeff",
+ behavior: ["XX|CR:radiation%10|XX", "CR:radiation%10|CH:radon%0.1|CR:radiation%10", "M2|M1|M2"],
+ tick: function (pixel) {
+ pixel.temp += 1;
+ },
+ reactions: {
+ quark_matter: { elem1: "stable_radium" },
+ },
+ tempHigh: 700,
+ category: "powders",
+ state: "solid",
+ density: 5500,
+ conduct: 0.4,
+};
+
+runAfterLoad(function () {
+ reactList("radium", eLists.WATER, { elem1: ["radium_water", "rad_pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350, func: radiumWater });
+});
+
+elements.molten_radium = {
+ behavior: ["XX|CR:radiation%10|XX", "M2 AND CR:radiation%10|CH:radon%0.01|M2 AND CR:radiation%10", "M1|M1|M1"],
+ tick: function (pixel) {
+ pixel.temp += 1;
+ },
+ reactions: {
+ quark_matter: { elem1: "stable_radium" },
+ },
+ conduct: 0.4,
+};
+
+toxic("radium", 1);
+
+runAfterLoad(function () {
+ reactList("molten_radium", eLists.WATER, { elem1: ["radium_water", "rad_pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350, func: radiumWater });
+});
+
+function radiumWater(pixel) {
+ elementCircle(pixel.x, pixel.y, 15, "radium_water", 0.1, eLists.WATER);
+}
+
+elements.radium_water = {
+ color: "#3bc4ff",
+ behavior: ["XX|CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+ reactions: {
+ head: { elem2: null, chance: 0.4 },
+ bone: { elem2: ["quicklime", "quicklime"], chance: 0.4 },
+ bone_marrow: { elem2: ["quicklime", "blood"], chance: 0.4 },
+ },
+ tempHigh: 100,
+ stateHigh: "rad_steam",
+ state: "liquid",
+ density: 1100,
+ category: "liquids",
+ hidden: true,
+ tempLow: 0,
+};
+
+toxic("radium_water", 0.1);
+elements.radium_water.reactions.head = { elem2: null, chance: 0.4 };
+elements.radium_water.reactions.bone = { elem2: ["quicklime", "quicklime"], chance: 0.4 };
+elements.radium_water.reactions.bone_marrow = { elem2: ["quicklime", "blood"], chance: 0.4 };
+eListAdd("WATER", "radium_water");
+
+elements.actinium = {
+ color: "#62ebf0",
+ behavior: ["XX|CR:alpha_particle%0.1 AND CR:radiation%10|XX", "CR:alpha_particle%0.1 AND CR:radiation%10|CH:radium%0.02|CR:alpha_particle%0.1 AND CR:radiation%10", "M2|M1|M2"],
+ tick: function (pixel) {
+ pixel.temp += 2.5;
+ },
+ reactions: {
+ quark_matter: { elem1: "stable_actinium" },
+ },
+ tempHigh: 1227,
+ category: "powders",
+ state: "solid",
+ density: 10000,
+ conduct: 0.225,
+};
+toxic("actinium", 1);
+elements.molten_actinium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.1 AND CR:radiation%10|XX", "M2 AND CR:alpha_particle%0.1 AND CR:radiation%10|CH:radium%0.02|M2 AND CR:alpha_particle%0.1 AND CR:radiation%10", "M1|M1|M1"],
+ tick: function (pixel) {
+ pixel.temp += 2.5;
+ },
+ reactions: {
+ quark_matter: { elem1: "stable_actinium" },
+ },
+ conduct: 0.225,
+};
+
+elements.thorium = {
+ color: ["#599e8a", "#364d4b", "#494d4c", "#428a58", "#658d7a", "#89e0a2"],
+ behavior: ["XX|CR:alpha_particle%0.01|XX", "CR:alpha_particle%0.01|CH:lead%0.001|CR:alpha_particle%0.01", "XX|CR:alpha_particle%0.01|XX"],
+ reactions: {
+ neutron: {
+ temp1: 100,
+ func: function (pixel, p) {
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "radium");
+ elementCircle(p.x, p.y, 2, "neutron");
+ }
+ },
+ },
+ oxygen: { elem1: "thorium_dioxide", elem2: null, chance: 0.1 },
+ quark_matter: { elem1: "stable_thorium" },
+ },
+ tempHigh: 1750,
+ category: "solids",
+ state: "solid",
+ density: 11700,
+ hardness: 0.7,
+ conduct: 0.235,
+};
+elements.molten_thorium = {
+ behavior: ["XX|CR:alpha_particle%0.01|XX", "M2 AND CR:alpha_particle%0.01|XX|M2 AND CR:alpha_particle%0.01", "M1|M1|M1"],
+ reactions: {
+ neutron: {
+ temp1: 100,
+ func: function (pixel, p) {
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "radium");
+ elementCircle(p.x, p.y, 2, "neutron");
+ }
+ },
+ },
+ oxygen: { elem1: "thorium_dioxide", elem2: null },
+ quark_matter: { elem1: "stable_thorium" },
+ },
+};
+
+elements.protactinium = {
+ color: ["#9899a3", "#44464a", "#5a5b5e"],
+ behavior: ["XX|CR:alpha_particle%0.01 AND CR:radiation%2|XX", "CR:alpha_particle%0.01 AND CR:radiation%2|CH:actinium%0.01|CR:alpha_particle%0.01 AND CR:radiation%2", "M2|M1|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_protactinium" },
+ },
+ tempHigh: 1568,
+ category: "powders",
+ state: "solid",
+ density: 15700,
+ hardness: 0.1,
+ conduct: 0.235,
+};
+
+elements.molten_protactinium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.01 AND CR:radiation%2|XX", "M2 AND CR:alpha_particle%0.01 AND CR:radiation%2|CH:actinium%0.01|M2 AND CR:alpha_particle%0.01 AND CR:radiation%2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_protactinium" },
+ },
+};
+
+elements.neptunium = {
+ color: ["#626580", "#3f4a61", "#4a5463"],
+ behavior: ["XX|CR:neutron%0.1 AND CR:radiation%2|XX", "CR:neutron%0.1 AND CR:radiation%2|CH:thorium%0.025|CR:neutron%0.1 AND CR:radiation%2", "XX|CR:neutron%0.1 AND CR:radiation%2|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_neptunium" },
+ neutron: { func: fissile, temp1: 150 },
+ },
+ tempHigh: 639,
+ category: "solids",
+ state: "solid",
+ density: 19380,
+ hardness: 0.7,
+ conduct: 0.2,
+ excludeRandom: true,
+};
+
+elements.molten_neptunium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:neutron%0.1 AND CR:radiation%2|XX", "M2 AND CR:neutron%0.1 AND CR:radiation%2|CH:thorium%0.025|M2 AND CR:neutron%0.1 AND CR:radiation%2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_neptunium" },
+ neutron: { func: fissile, temp1: 150 },
+ },
+};
+
+function fissile(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+}
+
+elements.plutonium = {
+ color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
+ behavior: ["XX|CR:alpha_particle%0.05 AND CR:radiation%2|XX", "CR:alpha_particle%0.05 AND CR:radiation%2|CH:enriched_uranium%0.025 AND CH:americium%0.025|CR:alpha_particle%0.05 AND CR:radiation%2", "XX|CR:alpha_particle%0.05 AND CR:radiation%2|XX"],
+ reactions: {
+ oxygen: { elem1: "plutonium_dioxide", elem2: null },
+ quark_matter: { elem1: "stable_plutonium" },
+ neutron: { func: plutonium, temp1: 100 },
+ },
+ tempHigh: 639,
+ category: "solids",
+ state: "solid",
+ density: 19850,
+ hardness: 0.7,
+ conduct: 0.2,
+ excludeRandom: true,
+};
+
+elements.molten_plutonium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.05 AND CR:radiation%2|XX", "M2 AND CR:alpha_particle%0.05 AND CR:radiation%2|CH:enriched_uranium%0.025|M2 AND CR:alpha_particle%0.05 AND CR:radiation%2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_plutonium" },
+ neutron: { func: plutonium, temp1: 100 },
+ },
+ excludeRandom: true,
+};
+
+elements.enriched_plutonium = {
+ color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
+ behavior: ["XX|CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|XX", "CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|CH:enriched_uranium%0.05|CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1", "XX|CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|XX"],
+ reactions: {
+ oxygen: { elem1: "enriched_plutonium_dioxide", elem2: null },
+ quark_matter: { elem1: "stable_plutonium" },
+ neutron: { func: plutonium, temp1: 150 },
+ },
+ tempHigh: 639,
+ category: "solids",
+ state: "solid",
+ density: 19850,
+ hardness: 0.7,
+ conduct: 0.2,
+ excludeRandom: true,
+ hidden: true,
+};
+
+elements.molten_enriched_plutonium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|XX", "M2 AND CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1|CH:enriched_uranium%0.025|M2 AND CR:alpha_particle%0.05 AND CR:radiation%2 AND CR:neutron%0.1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_plutonium" },
+ neutron: { func: plutonium, temp1: 150 },
+ },
+ excludeRandom: true,
+};
+
+elements.depleted_plutonium = {
+ color: ["#5fc29f", "#5d9e7d", "#5b7d6b"],
+ behavior: ["XX|CR:radiation%2|XX", "CR:radiation%2|CH:enriched_uranium%0.05|CR:radiation%2", "XX|CR:radiation%2|XX"],
+ reactions: {
+ oxygen: { elem1: "depleted_plutonium_dioxide", elem2: null },
+ quark_matter: { elem1: "stable_plutonium" },
+ neutron: { func: depleted_plutonium, temp1: 25 },
+ },
+ tempHigh: 639,
+ category: "solids",
+ state: "solid",
+ density: 19850,
+ hardness: 0.7,
+ conduct: 0.2,
+ excludeRandom: true,
+ hidden: true,
+};
+
+elements.molten_depleted_plutonium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%2|XX", "M2 AND CR:radiation%2|CH:enriched_uranium%0.025|M2 AND CR:radiation%2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_plutonium" },
+ neutron: { func: plutonium, temp1: 25 },
+ },
+};
+
+elements.stable_plutonium = {
+ color: [blendColors("#5fc29f", "#ff0000"), blendColors("#5d9e7d", "#00ff00"), blendColors("#5b7d6b", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ oxygen: { elem1: "stable_plutonium_dioxide", elem2: null },
+ },
+ tempHigh: 639,
+ category: "solids",
+ state: "solid",
+ density: 19850,
+ hardness: 0.7,
+ conduct: 0.2,
+ hidden: true,
+};
+
+function plutonium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "americium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+}
+
+function depleted_plutonium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "americium");
+ }
+}
+
+runAfterLoad(function () {
+ reactList("plutonium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
+ delete elements.plutonium.reactions["dirty_water"];
+ reactList("enriched_plutonium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
+ delete elements.plutonium.reactions["dirty_water"];
+ reactList("depleted_plutonium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
+ delete elements.plutonium.reactions["dirty_water"];
+ reactList("stable_plutonium", eLists.WATER, { elem2: "dirty_water", chance: 0.25 });
+ delete elements.stable_plutonium.reactions["dirty_water"];
+});
+
+elements.plutonium_dioxide = {
+ color: ["#edcf47", "#c7a924", "#e3c129"],
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ reactions: {
+ neutron: {
+ func: function (pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+ },
+ temp1: 20,
+ },
+ },
+ tempHigh: 2744,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 11500,
+ excludeRandom: true,
+};
+
+elements.molten_plutonium_dioxide = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.25|XX", "M2 AND CR:radiation%0.25|XX|M2 AND CR:radiation%0.25", "M1|M1|M1"],
+ reactions: {
+ neutron: {
+ func: function (pixel, p) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 2, "neutron");
+ },
+ },
+ },
+ excludeRandom: true,
+};
+
+elements.enriched_plutonium_dioxide = {
+ color: ["#edcf47", "#c7a924", "#e3c129"],
+ behavior: ["XX|CR:radiation%0.5|XX", "CR:radiation%0.5|XX|CR:radiation%0.5", "M2|M1|M2"],
+ reactions: {
+ neutron: {
+ func: function (pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+ },
+ temp1: 50,
+ },
+ },
+ tempHigh: 2744,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 11500,
+ excludeRandom: true,
+};
+
+elements.molten_enriched_plutonium_dioxide = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.5|XX", "M2 AND CR:radiation%0.5|XX|M2 AND CR:radiation%0.5", "M1|M1|M1"],
+ reactions: {
+ neutron: {
+ func: function (pixel, p) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 2, "neutron");
+ },
+ },
+ },
+ excludeRandom: true,
+};
+
+elements.depleted_plutonium_dioxide = {
+ color: ["#edcf47", "#c7a924", "#e3c129"],
+ behavior: ["XX|CR:radiation%0.1|XX", "CR:radiation%0.1|XX|CR:radiation%0.1", "M2|M1|M2"],
+ reactions: {
+ neutron: {
+ func: function (pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+ },
+ temp1: 50,
+ },
+ },
+ tempHigh: 2744,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 11500,
+ excludeRandom: true,
+};
+
+elements.molten_depleted_plutonium_dioxide = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.1|XX", "M2 AND CR:radiation%0.1|XX|M2 AND CR:radiation%0.1", "M1|M1|M1"],
+ reactions: {
+ neutron: {
+ func: function (pixel, p) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 2, "neutron");
+ },
+ },
+ },
+ excludeRandom: true,
+};
+
+elements.stable_plutonium_dioxide = {
+ color: [blendColors("#edcf47", "#ff0000"), blendColors("#c7a924", "#00ff00"), blendColors("#e3c129", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ neutron: { elem2: null },
+ },
+ tempHigh: 2744,
+ category: "powders",
+ hidden: true,
+ state: "solid",
+ density: 11500,
+};
+
+reduce("plutonium_dioxide", "oxygen", "plutonium");
+reduce("enriched_plutonium_dioxide", "oxygen", "enriched_plutonium");
+reduce("depleted_plutonium_dioxide", "oxygen", "depleted_plutonium");
+reduce("stable_plutonium_dioxide", "oxygen", "stable_plutonium");
+
+acidReact("hydrofluoric_acid", "plutonium_dioxide", "plutonium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid", "enriched_plutonium_dioxide", "enriched_plutonium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid", "depleted_plutonium_dioxide", "depleted_plutonium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid", "stable_plutonium_dioxide", "stable_plutonium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "plutonium_dioxide", "plutonium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "enriched_plutonium_dioxide", "enriched_plutonium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "depleted_plutonium_dioxide", "depleted_plutonium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "stable_plutonium_dioxide", "stable_plutonium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "plutonium_dioxide", "plutonium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "enriched_plutonium_dioxide", "enriched_plutonium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "depleted_plutonium_dioxide", "depleted_plutonium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "stable_plutonium_dioxide", "stable_plutonium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "plutonium_dioxide", "plutonium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "enriched_plutonium_dioxide", "enriched_plutonium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "depleted_plutonium_dioxide", "depleted_plutonium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "stable_plutonium_dioxide", "stable_plutonium_tetrafluoride", "fire");
+
+elements.hydrofluoric_acid.ignore.push("plutonium_hexafluoride", "enriched_plutonium_hexafluoride", "depleted_plutonium_hexafluoride", "stable_plutonium_hexafluoride");
+elements.hydrofluoric_acid_gas.ignore.push("plutonium_hexafluoride", "enriched_plutonium_hexafluoride", "depleted_plutonium_hexafluoride", "stable_plutonium_hexafluoride");
+elements.hydrogen_fluoride.ignore.push("plutonium_hexafluoride", "enriched_plutonium_hexafluoride", "depleted_plutonium_hexafluoride", "stable_plutonium_hexafluoride");
+elements.liquid_hydrogen_fluoride.ignore.push("plutonium_hexafluoride", "enriched_plutonium_hexafluoride", "depleted_plutonium_hexafluoride", "stable_plutonium_hexafluoride");
+
+eListAddIon("PLUTONIUMIV", "plutonium_tetrafluoride");
+eListAddIon("FLUORIDE", "plutonium_tetrafluoride");
+eListAdd("INSOLUBLE", "plutonium_tetrafluoride");
+eListAddIon("ENRICHEDPLUTONIUMIV", "enriched_plutonium_tetrafluoride");
+eListAddIon("FLUORIDE", "enriched_plutonium_tetrafluoride");
+eListAdd("INSOLUBLE", "enriched_plutonium_tetrafluoride");
+eListAddIon("DEPLETEDPLUTONIUMIV", "depleted_plutonium_tetrafluoride");
+eListAddIon("FLUORIDE", "depleted_plutonium_tetrafluoride");
+eListAdd("INSOLUBLE", "depleted_plutonium_tetrafluoride");
+eListAddIon("STABLEPLUTONIUMIV", "stable_plutonium_tetrafluoride");
+eListAddIon("FLUORIDE", "stable_plutonium_tetrafluoride");
+eListAdd("INSOLUBLE", "stable_plutonium_tetrafluoride");
+
+elements.plutonium_tetrafluoride = {
+ color: ["#a13d0b", "#85401d", "#733211"],
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ reactions: {},
+ tempHigh: 1027,
+ category: "powders",
+ state: "solid",
+ density: 7100,
+ hidden: true,
+};
+
+elements.enriched_plutonium_tetrafluoride = {
+ color: ["#a13d0b", "#85401d", "#733211"],
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ reactions: {},
+ tempHigh: 1027,
+ category: "powders",
+ state: "solid",
+ density: 7100,
+ hidden: true,
+};
+
+elements.depleted_plutonium_tetrafluoride = {
+ color: ["#a13d0b", "#85401d", "#733211"],
+ behavior: ["XX|CR:radiation%0.02|XX", "CR:radiation%0.02|XX|CR:radiation%0.02", "M2|M1|M2"],
+ reactions: {},
+ tempHigh: 1027,
+ category: "powders",
+ state: "solid",
+ density: 7100,
+ hidden: true,
+};
+
+elements.molten_plutonium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.05|XX", "M2 AND CR:radiation%0.05|XX|M2 AND CR:radiation%0.05", "M1|M1|M1"],
+};
+
+elements.molten_enriched_plutonium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.1|XX", "M2 AND CR:radiation%0.1|XX|M2 AND CR:radiation%0.1", "M1|M1|M1"],
+};
+
+elements.molten_depleted_plutonium_tetrafluoride = {
+ behavior: ["XX|CR:fire%2.5 AND CR:radiation%0.02|XX", "M2 AND CR:radiation%0.02|XX|M2 AND CR:radiation%0.02", "M1|M1|M1"],
+};
+
+elements.stable_plutonium_tetrafluoride = {
+ color: [blendColors("#a13d0b", "#ff0000"), blendColors("#85401d", "#00ff00"), blendColors("#733211", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 1027,
+ category: "powders",
+ state: "solid",
+ density: 7100,
+ hidden: true,
+};
+
+toxic("plutonium_tetrafluoride", 0.1);
+toxic("enriched_plutonium_tetrafluoride", 0.1);
+toxic("depleted_plutonium_tetrafluoride", 0.1);
+toxic("stable_plutonium_tetrafluoride", 0.1);
+
+acidReact("fluorine", "plutonium_tetrafluoride", [null, null, null, null, "plutonium_hexafluoride"], null);
+acidReact("fluorine", "enriched_plutonium_tetrafluoride", [null, null, null, null, "enriched_plutonium_hexafluoride"], null);
+acidReact("fluorine", "depleted_plutonium_tetrafluoride", [null, null, null, null, "depleted_plutonium_hexafluoride"], null);
+acidReact("fluorine", "stable_plutonium_tetrafluoride", [null, null, null, null, "stable_plutonium_hexafluoride"], null);
+acidReact("liquid_fluorine", "plutonium_tetrafluoride", [null, null, null, null, "plutonium_hexafluoride"], null);
+acidReact("liquid_fluorine", "enriched_plutonium_tetrafluoride", [null, null, null, null, "enriched_plutonium_hexafluoride"], null);
+acidReact("liquid_fluorine", "depleted_plutonium_tetrafluoride", [null, null, null, null, "depleted_plutonium_hexafluoride"], null);
+acidReact("liquid_fluorine", "stable_plutonium_tetrafluoride", [null, null, null, null, "stable_plutonium_hexafluoride"], null);
+acidReact("foof", "plutonium_tetrafluoride", "plutonium_hexafluoride", null);
+acidReact("foof", "enriched_plutonium_tetrafluoride", "enriched_plutonium_hexafluoride", null);
+acidReact("foof", "depleted_plutonium_tetrafluoride", "depleted_plutonium_hexafluoride", null);
+acidReact("foof", "stable_plutonium_tetrafluoride", "stable_plutonium_hexafluoride", null);
+acidReact("solid_foof", "plutonium_tetrafluoride", "plutonium_hexafluoride", null);
+acidReact("solid_foof", "enriched_plutonium_tetrafluoride", "enriched_plutonium_hexafluoride", null);
+acidReact("solid_foof", "depleted_plutonium_tetrafluoride", "depleted_plutonium_hexafluoride", null);
+acidReact("solid_foof", "stable_plutonium_tetrafluoride", "stable_plutonium_hexafluoride", null);
+elements.foof.ignore.push("radiation");
+elements.solid_foof.ignore.push("radiation");
+
+reduce("plutonium_tetrafluoride", "fluorine", "plutonium");
+reduce("enriched_plutonium_tetrafluoride", "fluorine", "enriched_plutonium");
+reduce("depleted_plutonium_tetrafluoride", "fluorine", "depleted_plutonium");
+reduce("stable_plutonium_tetrafluoride", "fluorine", "stable_plutonium");
+
+eListAddIon("PLUTONIUMVI", "plutonium_hexafluoride");
+eListAddIon("FLUORIDE", "plutonium_hexafluoride");
+eListAdd("INSOLUBLE", "plutonium_hexafluoride");
+eListAddIon("ENRICHEDPLUTONIUMVI", "enriched_plutonium_hexafluoride");
+eListAddIon("FLUORIDE", "enriched_plutonium_hexafluoride");
+eListAdd("INSOLUBLE", "enriched_plutonium_hexafluoride");
+eListAddIon("DEPLETEDPLUTONIUMVI", "depleted_plutonium_hexafluoride");
+eListAddIon("FLUORIDE", "depleted_plutonium_hexafluoride");
+eListAdd("INSOLUBLE", "depleted_plutonium_hexafluoride");
+eListAddIon("STABLEPLUTONIUMVI", "stable_plutonium_hexafluoride");
+eListAddIon("FLUORIDE", "stable_plutonium_hexafluoride");
+eListAdd("INSOLUBLE", "stable_plutonium_hexafluoride");
+
+elements.plutonium_hexafluoride = {
+ color: "#6e2602",
+ behavior: ["XX|CR:radiation%0.05|XX", "CR:radiation%0.05|XX|CR:radiation%0.05", "M2|M1|M2"],
+ reactions: {
+ hydrogen: { elem1: "plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 62.5,
+ category: "powders",
+ state: "solid",
+ density: 5080,
+ stateHighName: "plutonium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.plutonium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.05", "XX"],
+ ["CR:radiation%0.05", "XX", "CR:radiation%0.05"],
+ ["XX", "CR:radiation%0.05", "XX"],
+ ],
+ tick: function (pixel) {
+ pixelTick(pixel, elements[pixel.element].behavior2);
+ },
+ state: "gas",
+ density: 14.88,
+ reactions: {
+ hydrogen: { elem1: "plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 280,
+ stateHigh: ["plutonium_tetrafluoride", "fluorine"],
+ onCentrifuge: function (pixel) {
+ if (Math.random() < 0.05) {
+ if (Math.random() < 0.5) {
+ changePixel(pixel, "depleted_plutonium_hexafluoride");
+ } else {
+ changePixel(pixel, "enriched_plutonium_hexafluoride");
+ }
+ }
+ },
+};
+
+elements.enriched_plutonium_hexafluoride = {
+ color: "#6e2602",
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ reactions: {
+ hydrogen: { elem1: "enriched_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 62.5,
+ category: "powders",
+ state: "solid",
+ density: 5080,
+ stateHighName: "enriched_plutonium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.enriched_plutonium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.25", "XX"],
+ ["CR:radiation%0.25", "XX", "CR:radiation%0.25"],
+ ["XX", "CR:radiation%0.25", "XX"],
+ ],
+ tick: function (pixel) {
+ pixelTick(pixel, elements[pixel.element].behavior2);
+ },
+ state: "gas",
+ density: 14.88,
+ reactions: {
+ hydrogen: { elem1: "enriched_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 280,
+ stateHigh: ["enriched_plutonium_tetrafluoride", "fluorine"],
+};
+
+elements.depleted_plutonium_hexafluoride = {
+ color: "#6e2602",
+ behavior: ["XX|CR:radiation%0.25|XX", "CR:radiation%0.25|XX|CR:radiation%0.25", "M2|M1|M2"],
+ reactions: {
+ hydrogen: { elem1: "depleted_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 62.5,
+ category: "powders",
+ state: "solid",
+ density: 5080,
+ stateHighName: "depleted_plutonium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.depleted_plutonium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ behavior2: [
+ ["XX", "CR:radiation%0.01", "XX"],
+ ["CR:radiation%0.01", "XX", "CR:radiation%0.01"],
+ ["XX", "CR:radiation%0.01", "XX"],
+ ],
+ tick: function (pixel) {
+ pixelTick(pixel, elements[pixel.element].behavior2);
+ },
+ state: "gas",
+ density: 14.88,
+ reactions: {
+ hydrogen: { elem1: "depleted_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 280,
+ stateHigh: ["depleted_plutonium_tetrafluoride", "fluorine"],
+};
+
+elements.stable_plutonium_hexafluoride = {
+ color: [blendColors("#6e2602", "#ff0000"), blendColors("#6e2602", "#00ff00"), blendColors("#6e2602", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ hydrogen: { elem1: "stable_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 62.5,
+ category: "powders",
+ state: "solid",
+ density: 5080,
+ stateHighName: "stable_plutonium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.stable_plutonium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ state: "gas",
+ density: 14.88,
+ reactions: {
+ hydrogen: { elem1: "stable_plutonium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 280,
+ stateHigh: ["stable_plutonium_tetrafluoride", "fluorine"],
+};
+
+runAfterLoad(function () {
+ reactList("plutonium_hexafluoride", eLists.WATER, { elem1: "plutonium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("enriched_plutonium_hexafluoride", eLists.WATER, { elem1: "enriched_plutonium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("depleted_plutonium_hexafluoride", eLists.WATER, { elem1: "depleted_plutonium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("stable_plutonium_hexafluoride", eLists.WATER, { elem1: "stable_plutonium_tetrafluoride", elem2: "hydrofluoric_acid" });
+});
+
+toxic("plutonium_hexafluoride", 0.1);
+toxic("enriched_plutonium_hexafluoride", 0.1);
+toxic("depleted_plutonium_hexafluoride", 0.1);
+toxic("stable_plutonium_hexafluoride", 0.1);
+toxic("plutonium_hexafluoride_gas", 0.1);
+toxic("enriched_plutonium_hexafluoride_gas", 0.1);
+toxic("depleted_plutonium_hexafluoride_gas", 0.1);
+toxic("stable_plutonium_hexafluoride_gas", 0.1);
+
+elements.americium = {
+ color: ["#42ebaf", "#59d998", "#d0dbd5"],
+ behavior: ["XX|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX", "CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|CH:neptunium%0.05 AND CH:plutonium%0.05|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2", "XX|CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_americium" },
+ neutron: { func: americium, temp1: 150 },
+ },
+ tempHigh: 1176,
+ category: "solids",
+ state: "solid",
+ density: 12000,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+};
+
+elements.stable_americium = {
+ color: [blendColors("#42ebaf", "#ff0000"), blendColors("#59d998", "#00ff00"), blendColors("#d0dbd5", "#0000ff")],
+ behavior: behaviors.WALL,
+ tempHigh: 1176,
+ category: "solids",
+ state: "solid",
+ density: 12000,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+};
+
+elements.molten_americium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|XX", "M2 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2|CH:neptunium%0.05 AND CH:plutonium%0.05|M2 AND CR:neutron%0.1 AND CR:radiation%2 AND CR:alpha_particle%2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_americium" },
+ neutron: { func: americium, temp1: 150 },
+ },
+ excludeRandom: true,
+};
+
+function americium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "curium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+}
+
+elements.curium = {
+ color: ["#fab1f1", "#d6c9d5", "#e0b1d6"],
+ behavior: ["XX|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|CH:plutonium%0.075|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_curium" },
+ neutron: { func: curium, temp1: 175 },
+ },
+ tempHigh: 1340,
+ category: "solids",
+ state: "solid",
+ density: 13510,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+};
+
+elements.stable_curium = {
+ color: [blendColors("#fab1f1", "#ff0000"), blendColors("#d6c9d5", "#00ff00"), blendColors("#e0b1d6", "#0000ff")],
+ behavior: behaviors.WALL,
+ tempHigh: 1340,
+ category: "solids",
+ state: "solid",
+ density: 13510,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+};
+
+elements.molten_curium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1|CH:plutonium%0.075|M2 AND CR:neutron%0.5 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_curium" },
+ neutron: { func: curium, temp1: 150 },
+ },
+ excludeRandom: true,
+};
+
+function curium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "berkelium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron");
+}
+
+elements.berkelium = {
+ color: ["#f2edfa", "#bdbccf", "#d7cae8"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.075|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_berkelium" },
+ neutron: { func: berkelium, temp1: 175 },
+ },
+ tempHigh: 986,
+ category: "solids",
+ state: "solid",
+ density: 13250,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+};
+
+elements.stable_berkelium = {
+ color: [blendColors("#f2edfa", "#ff0000"), blendColors("#bdbccf", "#00ff00"), blendColors("#d7cae8", "#0000ff")],
+ behavior: behaviors.WALL,
+ tempHigh: 986,
+ category: "solids",
+ state: "solid",
+ density: 13250,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+};
+
+elements.molten_berkelium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.075|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_berkelium" },
+ neutron: { func: berkelium, temp1: 150 },
+ },
+ excludeRandom: true,
+};
+
+function berkelium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "californium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron", 0.2);
+}
+
+elements.californium = {
+ color: ["#dfd0f7", "#bcbade", "#b99be0"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:curium%0.05 AND CH:einsteinium%0.05|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_californium" },
+ neutron: { func: californium, temp1: 175 },
+ },
+ tempHigh: 900,
+ category: "solids",
+ state: "solid",
+ density: 15100,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+};
+
+elements.stable_californium = {
+ color: [blendColors("#dfd0f7", "#ff0000"), blendColors("#bcbade", "#00ff00"), blendColors("#b99be0", "#0000ff")],
+ behavior: behaviors.WALL,
+ tempHigh: 900,
+ category: "solids",
+ state: "solid",
+ density: 15100,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+};
+
+elements.molten_californium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:curium%0.05 AND CH:einsteinium%0.05|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_californium" },
+ neutron: { func: californium, temp1: 150 },
+ },
+ excludeRandom: true,
+};
+
+function californium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "einsteinium");
+ }
+ elementCircle(p.x, p.y, 2, "neutron", 0.25);
+}
+
+elements.einsteinium = {
+ color: ["#3aa6c2", "#b8edf1", "#83d9e4"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:berkelium%0.05 AND CH:fermium%0.05|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_einsteinium" },
+ neutron: { func: einsteinium, temp1: 175 },
+ },
+ tempHigh: 1133,
+ category: "solids",
+ state: "solid",
+ density: 8840,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+};
+
+elements.stable_einsteinium = {
+ color: [blendColors("#3aa6c2", "#ff0000"), blendColors("#b8edf1", "#00ff00"), blendColors("#83d9e4", "#0000ff")],
+ behavior: behaviors.WALL,
+ tempHigh: 1133,
+ category: "solids",
+ state: "solid",
+ density: 8840,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+};
+
+elements.molten_einsteinium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:berkelium%0.05 AND CH:fermium%0.05|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_einsteinium" },
+ neutron: { func: einsteinium, temp1: 150 },
+ },
+ excludeRandom: true,
+};
+
+function einsteinium(pixel, p) {
+ if (pixel.temp >= 500) {
+ transmuteAround(pixel);
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ if (Math.random() < 0.1) {
+ changePixel(pixel, "fermium");
+ }
+ elementCircle(p.x, p.y, 3, "neutron");
+}
+
+elements.fermium = {
+ color: ["#c8a7fc", "#cecbf2", "#d5bff2"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_fermium" },
+ neutron: { func: fermium, temp1: 175 },
+ },
+ tempHigh: 1800,
+ category: "solids",
+ state: "solid",
+ density: 9710,
+ hardness: 0.9,
+ conduct: 0.2,
+ excludeRandom: true,
+};
+
+elements.stable_fermium = {
+ color: [blendColors("#c8a7fc", "#ff0000"), blendColors("#cecbf2", "#00ff00"), blendColors("#d5bff2", "#0000ff")],
+ behavior: behaviors.WALL,
+ tempHigh: 1800,
+ category: "solids",
+ state: "solid",
+ density: 9710,
+ hardness: 0.9,
+ conduct: 0.2,
+ hidden: true,
+};
+
+elements.molten_fermium = {
+ behavior: ["XX|CR:fire%2.5 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1|CH:californium%0.1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_fermium" },
+ neutron: { func: fermium, temp1: 150 },
+ },
+ excludeRandom: true,
+};
+
+function fermium(pixel, p) {
+ if (pixel.temp >= 500) {
+ changePixel(pixel, "n_explosion");
+ elementCircle(p.x, p.y, 5, "neutron");
+ }
+ elementCircle(p.x, p.y, 3, "neutron", 0.2);
+}
+
+function transmuteAround(pixel) {
+ elementCircle(pixel.x, pixel.y, 40, "radium", 0.1, ["thorium", "molten_thorium"]);
+ elementCircle(pixel.x, pixel.y, 40, "plutonium", 0.1, ["depleted_uranium", "molten_depleted_uranium"]);
+ elementCircle(pixel.x, pixel.y, 40, "neptunium", 0.1, ["enriched_uranium", "molten_enriched_uranium"]);
+ elementCircle(pixel.x, pixel.y, 40, "americium", 0.1, ["plutonium", "molten_plutonium"]);
+ elementCircle(pixel.x, pixel.y, 40, "curium", 0.1, ["americium", "molten_americium"]);
+ elementCircle(pixel.x, pixel.y, 40, "berkelium", 0.1, ["curium", "molten_curium"]);
+ elementCircle(pixel.x, pixel.y, 40, "californium", 0.1, ["berkelium", "molten_berkelium"]);
+ elementCircle(pixel.x, pixel.y, 40, "einsteinium", 0.1, ["californium", "molten_californium"]);
+ elementCircle(pixel.x, pixel.y, 40, "fermium", 0.1, ["einsteinium", "molten_einsteinium"]);
+}
+
+function elementCircle(x, y, radius, pixelType = "fire", chance = 0.1, replace = [null]) {
+ if (!Array.isArray(replace)) {
+ replace = [replace];
+ }
+ // if pixelType includes , split it into an array
+ if (pixelType.indexOf(",") !== -1) {
+ pixelType = pixelType.split(",");
+ }
+ var coords = circleCoords(x, y, radius);
+ for (var i = 0; i < coords.length; i++) {
+ if (isEmpty(coords[i].x, coords[i].y) && replace.includes(null)) {
+ if (Math.random() <= chance) {
+ // if pixelType is an array, choose a random item
+ if (Array.isArray(pixelType)) {
+ createPixel(pixelType[Math.floor(Math.random() * pixelType.length)], coords[i].x, coords[i].y);
+ } else {
+ createPixel(pixelType, coords[i].x, coords[i].y);
+ }
+ }
+ }
+ if (!isEmpty(coords[i].x, coords[i].y, true) && replace.includes(pixelMap[coords[i].x][coords[i].y].element)) {
+ if (Math.random() <= chance) {
+ // if pixelType is an array, choose a random item
+ if (Array.isArray(pixelType)) {
+ changePixel(pixelMap[coords[i].x][coords[i].y], pixelType[Math.floor(Math.random() * pixelType.length)]);
+ } else {
+ changePixel(pixelMap[coords[i].x][coords[i].y], pixelType);
+ }
+ }
+ }
+ }
+}
+
+elements.thorium_dioxide = {
+ color: ["#313331", "#1a1a18", "#171717", "#24231d", "#262622", "#171613"],
+ behavior: ["XX|CR:radiation%0.01|XX", "CR:radiation%0.01|XX|CR:radiation%0.01", "M2|M1|M2"],
+ reactions: {},
+ hidden: true,
+ tempHigh: 2865,
+ category: "powders",
+ state: "solid",
+ density: 10970,
+};
+
+elements.stable_thorium_dioxide = {
+ color: [blendColors("#313331", "#ff0000"), blendColors("#1a1a18", "#00ff00"), blendColors("#171717", "#0000ff"), blendColors("#24231d", "#ff0000"), blendColors("#262622", "#00ff00"), blendColors("#171613", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ hidden: true,
+ tempHigh: 2865,
+ category: "powders",
+ state: "solid",
+ density: 10970,
+};
+
+eListAddIon("THORIUMIV", "thorium_dioxide");
+eListAddIon("OXIDE", "thorium_dioxide");
+eListAdd("INSOLUBLE", "thorium_dioxide");
+eListAddIon("STABLETHORIUMIV", "stable_thorium_dioxide");
+eListAddIon("OXIDE", "stable_thorium_dioxide");
+eListAdd("INSOLUBLE", "stable_thorium_dioxide");
+
+acidReact("hydrofluoric_acid", "thorium_dioxide", "thorium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid", "stable_thorium_dioxide", "stable_thorium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "thorium_dioxide", "thorium_tetrafluoride", "fire");
+acidReact("hydrofluoric_acid_gas", "stable_thorium_dioxide", "stable_thorium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "thorium_dioxide", "thorium_tetrafluoride", "fire");
+acidReact("hydrogen_fluoride", "stable_thorium_dioxide", "stable_thorium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "thorium_dioxide", "thorium_tetrafluoride", "fire");
+acidReact("liquid_hydrogen_fluoride", "stable_thorium_dioxide", "stable_thorium_tetrafluoride", "fire");
+
+elements.thorium_tetrafluoride = {
+ color: "#e5e6e5",
+ behavior: ["XX|CR:radiation%0.01|XX", "CR:radiation%0.01|XX|CR:radiation%0.01", "M2|M1|M2"],
+ reactions: {},
+ hidden: true,
+ tempHigh: 1110,
+ category: "powders",
+ state: "solid",
+ density: 6300,
+};
+
+elements.stable_thorium_tetrafluoride = {
+ color: [blendColors("#e5e6e5", "#ff0000"), blendColors("#e5e6e5", "#00ff00"), blendColors("#e5e6e5", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ hidden: true,
+ tempHigh: 1110,
+ category: "powders",
+ state: "solid",
+ density: 6300,
+};
+
+eListAddIon("THORIUMIV", "thorium_tetrafluoride");
+eListAddIon("OXIDE", "thorium_tetrafluoride");
+eListAdd("INSOLUBLE", "thorium_tetrafluoride");
+eListAddIon("STABLETHORIUMIV", "stable_thorium_tetrafluoride");
+eListAddIon("OXIDE", "stable_thorium_tetrafluoride");
+eListAdd("INSOLUBLE", "stable_thorium_tetrafluoride");
+
+reduce("thorium_dioxide", "oxygen", "thorium");
+reduce("stable_thorium_dioxide", "oxygen", "stable_thorium");
+reduce("thorium_tetrafluoride", "fluorine", "thorium");
+reduce("stable_thorium_tetrafluoride", "fluorine", "stable_thorium");
+
+elements.stable_thorium = {
+ color: [blendColors("#599e8a", "#ff0000"), blendColors("#364d4b", "#00ff00"), blendColors("#494d4c", "#0000ff"), blendColors("#428a58", "#ff0000"), blendColors("#658d7a", "#00ff00"), blendColors("#89e0a2", "#0000ff")],
+ behavior: behaviors.WALL,
+ reactions: {
+ oxygen: { elem1: "stable_thorium_dioxide", elem2: null },
+ },
+ tempHigh: 1750,
+ category: "solids",
+ state: "solid",
+ hidden: true,
+ density: 11700,
+ hardness: 0.7,
+ conduct: 0.235,
+};
+elements.molten_stable_thorium = {
+ reactions: {
+ oxygen: { elem1: "stable_thorium_dioxide", elem2: null },
+ },
+};
+
+elements.stable_radium = {
+ color: [blendColors("#3bdeff", "#ff0000"), blendColors("#3bdeff", "#00ff00"), blendColors("#3bdeff", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ oxygen: { elem1: "radium_oxide" },
+ },
+ tempHigh: 700,
+ category: "powders",
+ state: "solid",
+ density: 5500,
+ hidden: true,
+ conduct: 0.4,
+};
+
+elements.radium_oxide = {
+ color: [blendColors("#b2d9d9", "#ff0000", 0.25), blendColors("#b2d9d9", "#00ff00", 0.25), blendColors("#b2d9d9", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ hidden: true,
+ tempHigh: 2327,
+ category: "powders",
+ state: "solid",
+ density: 12000,
+};
+
+eListAddIon("RADIUM", "radium_oxide");
+eListAddIon("OXIDE", "radium_oxide");
+eListAdd("INSOLUBLE", "radium_oxide");
+
+elements.radium_hydroxide = {
+ color: [blendColors("#f2fafa", "#ff0000", 0.25), blendColors("#f2fafa", "#00ff00", 0.25), blendColors("#f2fafa", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 600,
+ reactions: {},
+ stateHigh: "radium_oxide",
+ category: "powders",
+ state: "solid",
+ density: 12000,
+};
+
+eListAdd("BASE", "radium_hydroxide");
+eListAddIon("RADIUM", "radium_hydroxide", "base");
+eListAddIon("HYDROXIDE", "radium_hydroxide", "base");
+eListAdd("INSOLUBLE", "radium_hydroxide");
+
+createSalt("radium_chloride", "radium_chloride_solution", [blendColors("#faf3de", "#ff0000", 0.25), blendColors("#faf3de", "#00ff00", 0.25), blendColors("#faf3de", "#0000ff", 0.25)], [blendColors("#8eadef", "#ff0000", 0.25), blendColors("#8eadef", "#00ff00", 0.25), blendColors("#8eadef", "#0000ff", 0.25)], true, true, 900, -2, 102, 4900, 1050, "RADIUM", "CHLORIDE");
+
+elements.radium_chloride_solution.reactions["mercury"] = { elem1: ["stable_radium", "chlorine", "hydrogen"], charged: true, chance: 0.02 };
+
+elements.molten_stable_radium = {
+ reactions: {
+ oxygen: { elem1: "radium_oxide" },
+ },
+ conduct: 0.4,
+};
+
+runAfterLoad(function () {
+ reactList("radium_oxide", eLists.WATER, { elem1: "radium_hydroxide", elem2: null, chance: 0.01 });
+ reactList("stable_radium", eLists.WATER, { elem1: ["radium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350 });
+ reactList("molten_stable_radium", eLists.WATER, { elem1: ["radium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350 });
+});
+
+elements.stable_actinium = {
+ color: [blendColors("#e5e6e5", "#ff0000", 0.25), blendColors("#62ebf0", "#00ff00"), blendColors("#62ebf0", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ oxygen: { elem1: "actinium_oxide" },
+ },
+ hidden: true,
+ tempHigh: 1227,
+ category: "powders",
+ state: "solid",
+ density: 10000,
+ conduct: 0.225,
+};
+elements.molten_stable_actinium = {
+ reactions: {
+ oxygen: { elem1: "actinium_oxide" },
+ },
+ conduct: 0.225,
+};
+
+runAfterLoad(function () {
+ reactList("stable_actinium", eLists.WATER, { elem1: "actinium_hydroxide", elem2: "hydrogen", chance: 0.01 });
+ reactList("molten_stable_actinium", eLists.WATER, { elem1: "actinium_hydroxide", elem2: "hydrogen", chance: 0.01 });
+});
+
+elements.actinium_oxide = {
+ color: [blendColors("#ebf5f5", "#ff0000", 0.25), blendColors("#ebf5f5", "#00ff00", 0.25), blendColors("#ebf5f5", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ reactions: {
+ water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
+ salt_water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
+ sugar_water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
+ dirty_water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
+ steam: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
+ seltzer: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
+ pool_water: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
+ primordial_soup: { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 },
+ },
+ hidden: true,
+ tempHigh: 2327,
+ category: "powders",
+ state: "solid",
+ density: 12000,
+};
+
+runAfterLoad(function () {
+ reactList("actinium_oxide", eLists.WATER, { elem1: "actinium_hydroxide", elem2: null, chance: 0.01 });
+});
+
+elements.actinium_hydroxide = {
+ color: [blendColors("#f2cef2", "#ff0000", 0.25), blendColors("#f2cef2", "#00ff00", 0.25), blendColors("#f2cef2", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 350,
+ stateHigh: ["actinium_oxide", "steam"],
+ category: "powders",
+ state: "solid",
+ density: 12000,
+};
+
+eListAdd("BASE", "actinium_hydroxide");
+eListAddIon("ACTINIUM", "actinium_hydroxide", "base");
+eListAddIon("HYDROXIDE", "actinium_hydroxide", "base");
+eListAdd("INSOLUBLE", "actinium_hydroxide");
+
+reduce("actinium_oxide", "oxygen", "stable_actinium");
+
+elements.stable_protactinium = {
+ color: [blendColors("#9899a3", "#ff0000"), blendColors("#44464a", "#00ff00"), blendColors("#5a5b5e", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ oxygen: { elem1: "protactinium_v_oxide", chance: 0.01 },
+ steam: { elem1: "protactinium_hydroxide", elem2: "hydrogen", chance: 0.01 },
+ },
+
+ tempHigh: 1568,
+ category: "powders",
+ state: "solid",
+ density: 15700,
+ hardness: 0.1,
+ conduct: 0.235,
+ hidden: true,
+};
+
+elements.molten_stable_protactinium = {
+ reactions: {
+ oxygen: { elem1: "protactinium_v_oxide", chance: 0.01 },
+ steam: { elem1: "protactinium_hydroxide", elem2: "hydrogen", chance: 0.01 },
+ },
+};
+
+eListAdd("BASE", "protactinium_hydroxide");
+eListAddIon("PROTACTINIUMV", "protactinium_hydroxide", "base");
+eListAddIon("HYDROXIDE", "protactinium_hydroxide", "base");
+eListAdd("INSOLUBLE", "protactinium_hydroxide");
+
+elements.protactinium_hydroxide = {
+ color: [blendColors("#95c7c7", "#ff0000", 0.25), blendColors("#95c7c7", "#00ff00", 0.25), blendColors("#95c7c7", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 350,
+ category: "powders",
+ state: "solid",
+ stateHigh: ["protactinium_v_oxide", "steam"],
+ density: 12000,
+};
+
+elements.protactinium_v_oxide = {
+ color: [blendColors("#353b3b", "#ff0000", 0.25), blendColors("#353b3b", "#00ff00", 0.25), blendColors("#353b3b", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 2500,
+ category: "powders",
+ state: "solid",
+ density: 12000,
+ reactions: {},
+};
+
+eListAddIon("PROTACTINIUMV", "protactinium_v_oxide");
+eListAddIon("OXIDE", "protactinium_v_oxide");
+eListAdd("INSOLUBLE", "protactinium_v_oxide");
+
+acidReact("hydrofluoric_acid", "protactinium_v_oxide", "protactinium_pentafluoride", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "protactinium_v_oxide", "protactinium_pentafluoride", "fire", 0);
+acidReact("hydrogen_fluoride", "protactinium_v_oxide", "protactinium_pentafluoride", "fire", 0);
+acidReact("liquid_hydrogen_fluoride", "protactinium_v_oxide", "protactinium_pentafluoride", "fire", 0);
+
+elements.protactinium_pentafluoride = {
+ color: [blendColors("#cbf2ec", "#ff0000", 0.25), blendColors("#cbf2ec", "#00ff00", 0.25), blendColors("#cbf2ec", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 2500,
+ category: "powders",
+ state: "solid",
+ density: 12000,
+ reactions: {},
+};
+
+eListAddIon("PROTACTINIUMV", "protactinium_pentafluoride");
+eListAddIon("OXIDE", "protactinium_pentafluoride");
+eListAdd("INSOLUBLE", "protactinium_pentafluoride");
+
+reduce("protactinium_v_oxide", "oxygen", "stable_protactinium");
+reduce("protactinium_pentafluoride", "fluorine", "stable_protactinium");
+
+elements.stable_neptunium = {
+ color: [blendColors("#626580", "#ff0000"), blendColors("#3f4a61", "#00ff00"), blendColors("#4a5463", "#0000ff")],
+ behavior: behaviors.WALL,
+ reactions: {
+ oxygen: { elem1: "neptunium_dioxide", chance: 0.01 },
+ },
+ tempHigh: 639,
+ category: "solids",
+ state: "solid",
+ density: 19380,
+ hardness: 0.7,
+ conduct: 0.2,
+ hidden: true,
+};
+
+elements.molten_stable_neptunium = {
+ reactions: {
+ oxygen: { elem1: "neptunium_dioxide", chance: 0.01 },
+ },
+};
+
+elements.neptunium_dioxide = {
+ color: [blendColors("#47c94f", "#ff0000"), blendColors("#47c94f", "#00ff00"), blendColors("#47c94f", "#0000ff")],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 2600,
+ category: "powders",
+ state: "solid",
+ density: 12000,
+ reactions: {},
+};
+
+eListAddIon("NEPTUNIUMIV", "neptunium_dioxide");
+eListAddIon("OXIDE", "neptunium_dioxide");
+eListAdd("INSOLUBLE", "neptunium_dioxide");
+
+elements.neptunium_tetrafluoride = {
+ color: [blendColors("#73e67a", "#ff0000"), blendColors("#73e67a", "#00ff00"), blendColors("#73e67a", "#0000ff")],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 2550,
+ category: "powders",
+ state: "solid",
+ density: 12000,
+ reactions: {},
+};
+
+eListAddIon("NEPTUNIUMIV", "neptunium_tetrafluoride");
+eListAddIon("FLUORIDE", "neptunium_tetrafluoride");
+eListAdd("INSOLUBLE", "neptunium_tetrafluoride");
+
+acidReact("hydrofluoric_acid", "neptunium_dioxide", "neptunium_tetrafluoride", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "neptunium_dioxide", "neptunium_tetrafluoride", "fire", 0);
+acidReact("hydrogen_fluoride", "neptunium_dioxide", "neptunium_tetrafluoride", "fire", 0);
+acidReact("liquid_hydrogen_fluoride", "neptunium_dioxide", "neptunium_tetrafluoride", "fire", 0);
+
+acidReact("fluorine", "neptunium_tetrafluoride", "neptunium_hexafluoride", "fire", 0);
+acidReact("liquid_fluorine", "neptunium_tetrafluoride", "neptunium_hexafluoride", "fire", 0);
+acidReact("fluorine", "neptunium_dioxide", "neptunium_hexafluoride", "fire", 0);
+acidReact("liquid_fluorine", "neptunium_dioxide", "neptunium_hexafluoride", "fire", 0);
+
+eListAddIon("NEPTUNIUMVI", "neptunium_hexafluoride");
+eListAddIon("FLUORIDE", "neptunium_hexafluoride");
+eListAdd("INSOLUBLE", "neptunium_hexafluoride");
+
+reduce("neptunium_dioxide", "oxygen", "stable_neptunium");
+reduce("neptunium_tetrafluoride", "fluorine", "stable_neptunium");
+
+elements.neptunium_hexafluoride = {
+ color: [blendColors("#eda042", "#ff0000"), blendColors("#eda042", "#00ff00"), blendColors("#eda042", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ hydrogen: { elem1: "neptunium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+ tempHigh: 55,
+ category: "powders",
+ state: "solid",
+ density: 5000,
+ stateHighName: "neptunium_hexafluoride_gas",
+ forceAutoGen: true,
+ hidden: true,
+};
+
+elements.neptunium_hexafluoride_gas = {
+ behavior: behaviors.GAS,
+ state: "gas",
+ density: 14.591,
+ reactions: {
+ hydrogen: { elem1: "neptunium_tetrafluoride", elem2: "hydrogen_fluoride" },
+ },
+};
+
+runAfterLoad(function () {
+ reactList("neptunium_hexafluoride", eLists.WATER, { elem1: "neptunium_tetrafluoride", elem2: "hydrofluoric_acid" });
+ reactList("neptunium_hexafluoride_gas", eLists.WATER, { elem1: "neptunium_tetrafluoride", elem2: "hydrofluoric_acid" });
+});
+
+toxic("neptunium_tetrafluoride", 0.1);
+
+toxic("neptunium_hexafluoride", 0.1);
+toxic("neptunium_hexafluoride_gas", 0.1);
+
+elements.fallout.reactions = { quark_matter: { elem1: null } };
+elements.transactinide_fallout = {
+ color: ["#5ab891", "#00ff5e", "#a7ff4a", "#a2f752"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:fallout%1 AND CH:radium%0.1 AND CH:francium%0.1 AND CH:fermium%0.01 AND CH:einsteinium%0.01 AND CH:californium%0.01 AND CH:berkelium%0.01 AND CH:curium%0.01 AND CH:americium%0.01 AND CH:plutonium%0.01 AND CH:neptunium%0.01 AND CH:uranium%0.01 AND CH:protactinium%0.01 AND CH:thorium%0.01 AND CH:actinium%0.01|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M2|M1|M2"],
+ reactions: {
+ quark_matter: { elem1: null },
+ },
+ category: "energy",
+ hidden: true,
+ state: "solid",
+ density: 10000,
+ hardness: 0.9,
+ excludeRandom: true,
+};
+
+elements.copernicium = {
+ color: ["#a7fcbc", "#8cc299", "#9db9c2"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_copernicium" },
+ neutron: { elem1: "nihonium", elem2: null, chance: 0.1 },
+ },
+ tempHigh: 67,
+ tempLow: 10,
+ category: "liquids",
+ state: "liquid",
+ density: 14010,
+ hardness: 1.0,
+ conduct: 0.2,
+ stateLowName: "solid_copernicium",
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+elements.solid_copernicium = {
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_copernicium" },
+ neutron: { elem1: "nihonium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+elements.copernicium_gas = {
+ behavior: ["M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2", "M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_copernicium" },
+ neutron: { elem1: "nihonium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+ density: 11.848,
+};
+
+elements.stable_copernicium = {
+ color: [blendColors("#a7fcbc", "#ff0000"), blendColors("#8cc299", "#00ff00"), blendColors("#9db9c2", "#0000ff")],
+ behavior: behaviors.LIQUID,
+ tempHigh: 67,
+ tempLow: 10,
+ category: "liquids",
+ state: "liquid",
+ density: 14010,
+ conduct: 0.2,
+ stateLowName: "solid_stable_copernicium",
+ hidden: true,
+ reactions: {},
+};
+elements.stable_copernicium_gas = {
+ density: 11.848,
+ reactions: {
+ oxygen: { elem1: "copernicium_dioxide", elem2: null, chance: 0.01 },
+ molten_sulfur: { elem1: "copernicium_sulfide", elem2: null, tempMax: 421 },
+ sulfur_gas: { elem1: "copernicium_sulfide", elem2: null, tempMax: 421 },
+ },
+};
+
+elements.copernicium_dioxide = {
+ color: [blendColors("#e6c973", "#ff0000", 0.25), blendColors("#e6c973", "#00ff00", 0.25), blendColors("#e6c973", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 300, //made up
+ category: "powders",
+ state: "solid",
+ density: 13120, //made up
+ stateHigh: ["stable_copernicium_gas", "stable_copernicium_gas", "fire"],
+ reactions: {},
+};
+
+eListAddIon("COPERNICIUMIV", "copernicium_dioxide");
+eListAddIon("OXIDE", "copernicium_dioxide");
+eListAdd("INSOLUBLE", "copernicium_dioxide");
+
+elements.copernicium_sulfide = {
+ color: [blendColors("#9c5f4f", "#ff0000", 0.25), blendColors("#9c5f4f", "#00ff00", 0.25), blendColors("#9c5f4f", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 421, //made up
+ category: "powders",
+ state: "solid",
+ density: 13200, //made up
+ stateHigh: ["stable_copernicium_gas", "molten_sulfur"],
+ reactions: {},
+};
+
+toxic("stable_copernicium", 0.02);
+toxic("stable_copernicium_gas", 0.02);
+toxic("copernicium_dioxide", 0.02);
+toxic("copernicium_sulfide", 0.02);
+
+eListAddIon("COPERNICIUMII", "copernicium_sulfide");
+eListAddIon("SULFIDE", "copernicium_sulfide");
+eListAdd("INSOLUBLE", "copernicium_sulfide");
+
+elements.copernicium_tetrafluoride = {
+ color: [blendColors("#eff2e4", "#ff0000", 0.25), blendColors("#eff2e4", "#00ff00", 0.25), blendColors("#eff2e4", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 502, //made up
+ category: "powders",
+ state: "solid",
+ density: 12110, //made up
+ stateHigh: ["stable_copernicium_gas", "fluorine"],
+ reactions: {},
+};
+toxic("copernicium_tetrafluoride", 0.2);
+
+eListAddIon("COPERNICIUMIV", "copernicium_tetrafluoride");
+eListAddIon("FLUORIDE", "copernicium_tetrafluoride");
+eListAdd("INSOLUBLE", "copernicium_tetrafluoride");
+
+runAfterLoad(function () {
+ reactList("copernicium_tetrafluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "stable_copernicium" });
+});
+
+acidIgnore(["copernicium", "copernicium_gas", "solid_copernicium", "stable_copernicium", "stable_copernicium_gas", "solid_stable_copernicium", "copernicium_tetrafluoride"]);
+elements.fluorine.ignore.push("copernicium", "copernicium_gas", "solid_copernicium", "stable_copernicium", "stable_copernicium_gas", "solid_stable_copernicium", "copernicium_tetrafluoride");
+elements.liquid_fluorine.ignore.push("copernicium", "copernicium_gas", "solid_copernicium", "stable_copernicium", "stable_copernicium_gas", "solid_stable_copernicium", "copernicium_tetrafluoride");
+
+acidReact("copernicium_dioxide", "fluorine", "copernicium_tetrafluoride", "fire");
+acidReact("copernicium_dioxide", "liquid_fluorine", "copernicium_tetrafluoride", "fire");
+
+elements.molten_uranium.reactions["molten_calcium"] = { elem1: "copernicium", elem2: null, tempMin: 10000, chance: 0.01 };
+elements.molten_depleted_uranium.reactions["molten_calcium"] = { elem1: "copernicium", elem2: null, tempMin: 10000, chance: 0.01 };
+elements.molten_enriched_uranium.reactions["molten_calcium"] = { elem1: "copernicium", elem2: null, tempMin: 10000, chance: 0.01 };
+
+elements.nihonium = {
+ color: ["#c94a0a"], //spike viper reference
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|M1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_nihonium" },
+ neutron: { elem1: "flerovium", elem2: null, chance: 0.1 },
+ },
+ tempHigh: 430,
+ category: "powders",
+ state: "solid",
+ density: 16000,
+ hardness: 1.0,
+ conduct: 0.2,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+elements.molten_nihonium = {
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:transactinide_fallout%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_nihonium" },
+ neutron: { elem1: "flerovium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+elements.stable_nihonium = {
+ color: [blendColors("#c94a0a", "#ff0000"), blendColors("#c94a0a", "#00ff00"), blendColors("#c94a0a", "#0000ff")],
+ behavior: behaviors.STURDYPOWDER,
+ reactions: {
+ molten_stable_francium: { elem1: "francium_nihonide", elem2: null },
+ },
+ tempHigh: 430,
+ category: "powders",
+ state: "solid",
+ density: 16000,
+ conduct: 0.2,
+ hidden: true,
+};
+
+toxic("stable_nihonium", 0.02);
+
+acidReact("stable_nihonium", "nitric_acid", "nihonium_nitrate_solution", "nitrogen_dioxide");
+acidReact("stable_nihonium", "nitric_acid_gas", "nihonium_nitrate_solution", "nitrogen_dioxide");
+elements.nitric_acid.ignore.push("nihonium_nitrate");
+elements.nitric_acid_gas.ignore.push("nihonium_nitrate");
+
+acidReact("stable_nihonium", "sulfuric_acid", "nihonium_sulfate_solution", "hydrogen", 50);
+acidReact("stable_nihonium", "sulfuric_acid_gas", "nihonium_sulfate_solution", "hydrogen", 50);
+elements.sulfuric_acid.ignore.push("nihonium_sulfate_solution");
+elements.sulfuric_acid_gas.ignore.push("nihonium_sulfate_solution");
+
+createSalt("nihonium_nitrate", "nihonium_nitrate_solution", [blendColors("#fccadd", "#ff0000", 0.25), blendColors("#fccadd", "#00ff00", 0.25), blendColors("#fccadd", "#0000ff", 0.25)], [blendColors("#8f19f7", "#ff0000", 0.25), blendColors("#8f19f7", "#00ff00", 0.25), blendColors("#8f19f7", "#0000ff", 0.25)], true, true, 203, -2, 102, 9350, 1090, "NIHONIUM", "NITRATE");
+createSalt("nihonium_sulfate", "nihonium_sulfate_solution", [blendColors("#fcf1ca", "#ff0000", 0.25), blendColors("#fcf1ca", "#00ff00", 0.25), blendColors("#fcf1ca", "#0000ff", 0.25)], [blendColors("#1984f7", "#ff0000", 0.25), blendColors("#1984f7", "#00ff00", 0.25), blendColors("#1984f7", "#0000ff", 0.25)], true, true, 1305, -2, 102, 12050, 1092, "NIHONIUM", "SULFATE");
+toxic("nihonium_nitrate", 0.1);
+toxic("nihonium_nitrate_solution", 0.1);
+toxic("nihonium_sulfate", 0.02);
+toxic("nihonium_sulfate_solution", 0.02);
+
+elements.nihonium_nitrate.stateHigh = ["nihonium_oxide", "nitrogen_dioxide", "fire"];
+
+elements.nihonium_hydroxide = {
+ color: [blendColors("#ebc7c7", "#ff0000", 0.25), blendColors("#ebc7c7", "#00ff00", 0.25), blendColors("#ebc7c7", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 292, //made up
+ category: "powders",
+ state: "solid",
+ density: 10220, //made up
+ stateHigh: ["nihonium_oxide", "steam"],
+ reactions: {},
+};
+
+eListAdd("INSOLUBLE", "nihonium_hydroxide");
+eListAddIon("NIHONIUM", "nihonium_hydroxide");
+eListAddIon("HYDROXIDE", "nihonium_hydroxide");
+
+elements.nihonium_oxide = {
+ color: [blendColors("#ab9a95", "#ff0000", 0.25), blendColors("#ab9a95", "#00ff00", 0.25), blendColors("#ab9a95", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 567, //made up
+ category: "powders",
+ state: "solid",
+ density: 12370, //made up
+ reactions: {
+ steam: { elem1: "nihonium_hydroxide", elem2: null, tempMax: 292 },
+ },
+};
+
+eListAdd("INSOLUBLE", "nihonium_oxide");
+eListAddIon("NIHONIUM", "nihonium_oxide");
+eListAddIon("OXIDE", "nihonium_oxide");
+
+toxic("nihonium_hydroxide", 0.02);
+toxic("nihonium_oxide", 0.02);
+
+elements.francium_nihonide = {
+ color: [blendColors("#d6d3a9", "#ff0000"), blendColors("#d6d3a9", "#00ff00"), blendColors("#d6d3a9", "#0000ff")],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 10920, //made up
+ category: "powders",
+ state: "solid",
+ density: 13700, //made up
+ reactions: {},
+};
+
+runAfterLoad(function () {
+ reactList("francium_nihonide", eLists.WATER, { elem1: ["nihonium_hydroxide", "francium_hydroxide"], elem2: "hydrogen", temp1: 100, temp2: 100 });
+});
+
+eListAdd("INSOLUBLE", "francium_nihonide");
+eListAddIon("FRANCIUM", "francium_nihonide");
+eListAddIon("NIHONIDE", "francium_nihonide");
+
+toxic("francium_nihonide", 0.1);
+
+elements.molten_neptunium.reactions["molten_calcium"] = { elem1: "nihonium", elem2: null, tempMin: 10000, chance: 0.01 };
+
+elements.flerovium = {
+ color: ["#a8ffe2", "#7ddbcd", "#9dc2b1"],
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|M2 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_flerovium" },
+ neutron: { elem1: "moscovium", elem2: null, chance: 0.1 },
+ },
+ tempHigh: 107,
+ tempLow: -73,
+ category: "liquids",
+ state: "liquid",
+ density: 11400,
+ hardness: 1.0,
+ conduct: 0.2,
+ stateLowName: "solid_flerovium",
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+elements.solid_flerovium = {
+ behavior: ["XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX", "CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "XX|CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_flerovium" },
+ neutron: { elem1: "moscovium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+};
+
+elements.flerovium_gas = {
+ behavior: ["M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2", "M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|CH:copernicium%1|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1", "M2|M1 AND CR:neutron%1 AND CR:radiation%1 AND CR:alpha_particle%1 AND CR:rad_pop%1|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_flerovium" },
+ neutron: { elem1: "moscovium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 50;
+ },
+ excludeRandom: true,
+ density: 12.014,
+};
+
+elements.stable_flerovium = {
+ color: [blendColors("#a8ffe2", "#ff0000"), blendColors("#7ddbcd", "#00ff00"), blendColors("#9dc2b1", "#0000ff")],
+ behavior: behaviors.LIQUID,
+ reactions: {
+ molten_sulfur: { elem1: "flerovium_sulfide", elem2: null },
+ },
+ tempHigh: 107,
+ tempLow: -73,
+ category: "liquids",
+ state: "liquid",
+ density: 14010,
+ conduct: 0.2,
+ stateLowName: "solid_stable_flerovium",
+ hidden: true,
+};
+
+elements.stable_flerovium_gas = {
+ density: 12.014,
+ reactions: {
+ molten_sulfur: { elem1: "flerovium_sulfide", elem2: null },
+ },
+};
+
+elements.flerovium_sulfide = {
+ color: [blendColors("#121107", "#ff0000", 0.25), blendColors("#121107", "#00ff00", 0.25), blendColors("#121107", "#0000ff", 0.25), blendColors("#d9d8d4", "#ff0000", 0.25), blendColors("#d9d8d4", "#00ff00", 0.25), blendColors("#d9d8d4", "#0000ff", 0.25)],
+ behavior: behaviors.WALL,
+ hidden: true,
+ tempHigh: 1220, //made up
+ category: "solids",
+ state: "solid",
+ density: 14700, //made up
+ burnInto: ["flerovium_oxide", "sulfur_dioxide"],
+ burn: 1,
+};
+eListAdd("INSOLUBLE", "flerovium_sulfide");
+eListAddIon("FLEROVIUM", "flerovium_sulfide");
+eListAddIon("SULFIDE", "flerovium_sulfide");
+
+elements.flerovium_oxide = {
+ color: [blendColors("#eddb93", "#ff0000", 0.25), blendColors("#eddb93", "#00ff00", 0.25), blendColors("#eddb93", "#0000ff", 0.25)],
+ behavior: behaviors.STURDYPOWDER,
+ hidden: true,
+ reactions: {},
+ tempHigh: 1120, //made up
+ category: "powders",
+ state: "solid",
+ density: 14320, //made up
+};
+elements.molten_flerovium_oxide = {
+ reactions: {
+ charcoal: { elem1: "stable_flerovium", elem2: "carbon_dioxide" },
+ },
+};
+
+reduce("flerovium_oxide", "oxygen", "stable_flerovium");
+
+eListAdd("INSOLUBLE", "flerovium_sulfide");
+eListAddIon("FLEROVIUM", "flerovium_sulfide");
+eListAddIon("SULFIDE", "flerovium_sulfide");
+elements.molten_plutonium.reactions["molten_calcium"] = { elem1: "flerovium", elem2: null, tempMin: 10000, chance: 0.01 };
+elements.molten_depleted_plutonium.reactions["molten_calcium"] = { elem1: "flerovium", elem2: null, tempMin: 10000, chance: 0.01 };
+elements.molten_enriched_plutonium.reactions["molten_calcium"] = { elem1: "flerovium", elem2: null, tempMin: 10000, chance: 0.01 };
+
+elements.moscovium = {
+ color: ["#8a3683", "#b0339b", "#d14fcd"],
+ behavior: ["XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX", "CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|CH:nihonium%1|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2", "XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_moscovium" },
+ neutron: { elem1: "livermorium", elem2: null, chance: 0.1 },
+ },
+ tempHigh: 400,
+ category: "solids",
+ state: "solid",
+ density: 13500,
+ hardness: 1.0,
+ conduct: 0.2,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+};
+
+elements.molten_moscovium = {
+ behavior: ["XX|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|XX", "M2 AND CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2|CH:nihonium%1|CR:neutron%2 AND CR:radiation%2 AND CR:alpha_particle%2 AND CR:rad_pop%2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_moscovium" },
+ neutron: { elem1: "livermorium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+};
+
+elements.stable_moscovium = {
+ color: [blendColors("#8a3683", "#ff0000"), blendColors("#b0339b", "#00ff00"), blendColors("#d14fcd", "#0000ff")],
+ behavior: behaviors.WALL,
+ reactions: {},
+ tempHigh: 400,
+ category: "solids",
+ state: "solid",
+ density: 13500,
+ conduct: 0.2,
+ hidden: true,
+};
+
+runAfterLoad(function () {
+ reactList("stable_moscovium", eLists.WATER, { elem1: "moscovium_hydroxide_solution", elem2: "hydrogen", chance: 0.05, temp1: 100, temp2: 100 });
+});
+
+createSalt("moscovium_hydroxide", "moscovium_hydroxide_solution", [blendColors("#f5dff3", "#ff0000", 0.25), blendColors("#f5dff3", "#00ff00", 0.25), blendColors("#f5dff3", "#0000ff", 0.25)], [blendColors("#6548f7", "#ff0000", 0.25), blendColors("#6548f7", "#00ff00", 0.25), blendColors("#6548f7", "#0000ff", 0.25)], true, true, 670, -2, 102, 5620, 1092, "MOSCOVIUM", "HYDROXIDE");
+
+eListAdd("BASE", "moscovium_hydroxide");
+eListAddIon("MOSCOVIUM", "moscovium_hydroxide", "base");
+eListAddIon("HYDROXIDE", "moscovium_hydroxide", "base");
+eListAdd("BASE", "moscovium_hydroxide_solution");
+eListAddIon("MOSCOVIUM", "moscovium_hydroxide_solution", "base");
+eListAddIon("HYDROXIDE", "moscovium_hydroxide_solution", "base");
+
+elements.moscovium_fluoride = {
+ color: [blendColors("#eedff5", "#ff0000", 0.25), blendColors("#eedff5", "#00ff00", 0.25), blendColors("#eedff5", "#0000ff", 0.25)],
+ behavior: behaviors.STURDYPOWDER,
+ hidden: true,
+ tempHigh: 720, //made up
+ category: "powders",
+ state: "solid",
+ density: 6220, //made up
+ reactions: {},
+};
+toxic("moscovium_fluoride", 0.1);
+
+acidReact("stable_moscovium", "hydrofluoric_acid", "moscovium_fluoride", "fire");
+acidReact("stable_moscovium", "liquid_hydrogen_fluoride", "moscovium_fluoride", "fire");
+acidReact("stable_moscovium", "hydrofluoric_acid_gas", "moscovium_fluoride", "fire");
+acidReact("stable_moscovium", "hydrogen_fluoride", "moscovium_fluoride", "fire");
+acidReact("moscovium_hydroxide", "hydrofluoric_acid", "moscovium_fluoride", "fire");
+acidReact("moscovium_hydroxide", "liquid_hydrogen_fluoride", "moscovium_fluoride", "fire");
+acidReact("moscovium_hydroxide", "hydrofluoric_acid_gas", "moscovium_fluoride", "fire");
+acidReact("moscovium_hydroxide", "hydrogen_fluoride", "moscovium_fluoride", "fire");
+acidReact("moscovium_hydroxide_solution", "hydrofluoric_acid", "moscovium_fluoride", "fire");
+acidReact("moscovium_hydroxide_solution", "liquid_hydrogen_fluoride", "moscovium_fluoride", "fire");
+acidReact("moscovium_hydroxide_solution", "hydrofluoric_acid_gas", "moscovium_fluoride", "fire");
+acidReact("moscovium_hydroxide_solution", "hydrogen_fluoride", "moscovium_fluoride", "fire");
+
+reduce("moscovium_fluoride", "fluorine", "stable_moscovium");
+
+eListAdd("INSOLUBLE", "moscovium_fluoride");
+eListAddIon("MOSCOVIUM", "moscovium_fluoride");
+eListAddIon("FLUORIDE", "moscovium_fluoride");
+
+elements.molten_americium.reactions["molten_calcium"] = { elem1: "moscovium", elem2: null, tempMin: 10000, chance: 0.01 };
+
+elements.livermorium = {
+ color: ["#c9c26b", "#5ee04c", "#8bc253"],
+ behavior: ["XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX", "CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|CH:flerovium%1|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1", "XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX"],
+ reactions: {
+ quark_matter: { elem1: "stable_livermorium" },
+ neutron: { elem1: "tennessine", elem2: null, chance: 0.1 },
+ },
+ tempHigh: 455,
+ category: "solids",
+ state: "solid",
+ density: 12900,
+ hardness: 1.0,
+ conduct: 0.2,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+};
+
+elements.molten_livermorium = {
+ behavior: ["XX|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|XX", "M2 AND CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1|CH:flerovium%1|CR:neutron%10 AND CR:radiation%10 AND CR:alpha_particle%10 AND CR:rad_pop%10 AND CR:n_explosion%0.1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_livermorium" },
+ neutron: { elem1: "tennessine", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+};
+
+elements.stable_livermorium = {
+ color: [blendColors("#c9c26b", "#ff0000"), blendColors("#5ee04c", "#00ff00"), blendColors("#8bc253", "#0000ff")],
+ behavior: behaviors.WALL,
+ reactions: {
+ oxygen: { elem1: "livermorium_oxide", elem2: "fire", chance: 0.05 },
+ },
+ tempHigh: 455,
+ category: "solids",
+ state: "solid",
+ density: 12900,
+ conduct: 0.2,
+ hidden: true,
+ burn: 1,
+ burnInto: "livermorium_oxide",
+};
+
+elements.livermorium_oxide = {
+ color: [blendColors("#ebcb8f", "#ff0000", 0.25), blendColors("#ebcb8f", "#00ff00", 0.25), blendColors("#ebcb8f", "#0000ff", 0.25)],
+ behavior: behaviors.STURDYPOWDER,
+ reactions: {},
+ hidden: true,
+ tempHigh: 730, //made up
+ category: "powders",
+ state: "solid",
+ density: 12430, //made up
+};
+elements.molten_livermorium_oxide = {
+ reactions: {
+ charcoal: { elem1: "stable_livermorium", elem2: "carbon_dioxide" },
+ },
+};
+
+reduce("livermorium_oxide", "oxygen", "stable_livermorium");
+
+elements.molten_curium.reactions["molten_calcium"] = { elem1: "livermorium", elem2: null, tempMin: 10000, chance: 0.01 };
+
+elements.tennessine = {
+ color: ["#4f4c42"],
+ behavior: ["XX|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|XX", "CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|CH:moscovium%1|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2", "M2|M1|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_tennessine" },
+ neutron: { elem1: "oganesson", elem2: null, chance: 0.1 },
+ },
+ tempHigh: 425,
+ category: "powders",
+ state: "solid",
+ density: 7200,
+ hardness: 1.0,
+ conduct: 0.1,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+};
+
+elements.molten_tennessine = {
+ behavior: ["XX|CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|XX", "M2 AND CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2|CH:moscovium%1|M2 AND CR:neutron%15 AND CR:radiation%15 AND CR:alpha_particle%15 AND CR:rad_pop%15 AND CR:n_explosion%0.2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_tennessine" },
+ neutron: { elem1: "oganesson", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+};
+
+elements.stable_tennessine = {
+ color: [blendColors("#4f4c42", "#ff0000"), blendColors("#4f4c42", "#00ff00"), blendColors("#4f4c42", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 425,
+ category: "powders",
+ state: "solid",
+ density: 7200,
+ conduct: 0.1,
+ hidden: true,
+};
+
+acidReact("stable_tennessine", "hydrofluoric_acid", "tennessine_monofluoride", "fire");
+acidReact("stable_tennessine", "liquid_hydrogen_fluoride", "tennessine_monofluoride", "fire");
+acidReact("stable_tennessine", "hydrofluoric_acid_gas", "tennessine_monofluoride", "fire");
+acidReact("stable_tennessine", "hydrogen_fluoride", "tennessine_monofluoride", "fire");
+
+elements.tennessine_monofluoride = {
+ color: [blendColors("#4a4123", "#ff0000", 0.25), blendColors("#4a4123", "#00ff00", 0.25), blendColors("#4a4123", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ reactions: {},
+ tempHigh: 130, //made up
+ tempLow: 5,
+ category: "liquids",
+ state: "liquid",
+ density: 5200, //made up
+ hidden: true,
+ stain: 0.2,
+};
+
+elements.tennessine_monofluoride_gas = {
+ density: 13.012,
+ reactions: {},
+};
+
+acidReact("fluorine", "tennessine_monofluoride_ice", "tennessine_trifluoride", "fire");
+acidReact("liquid_fluorine", "tennessine_monofluoride_ice", "tennessine_trifluoride", "fire");
+acidReact("fluorine", "tennessine_monofluoride", "tennessine_trifluoride", "fire");
+acidReact("liquid_fluorine", "tennessine_monofluoride", "tennessine_trifluoride", "fire");
+acidReact("fluorine", "tennessine_monofluoride_gas", "tennessine_trifluoride", "fire");
+acidReact("liquid_fluorine", "tennessine_monofluoride_gas", "tennessine_trifluoride", "fire");
+
+elements.fluorine.ignore.push("tennessine_trifluoride_gas");
+elements.fluorine.ignore.push("tennessine_trifluoride_ice");
+elements.liquid_fluorine.ignore.push("tennessine_trifluoride_gas");
+elements.liquid_fluorine.ignore.push("tennessine_trifluoride_ice");
+
+elements.tennessine_trifluoride = {
+ color: [blendColors("#ffc400", "#ff0000", 0.25), blendColors("#ffc400", "#00ff00", 0.25), blendColors("#ffc400", "#0000ff", 0.25)],
+ behavior: behaviors.LIQUID,
+ reactions: {},
+ tempHigh: 105, //made up
+ tempLow: 3,
+ category: "liquids",
+ state: "liquid",
+ density: 5600, //made up
+ hidden: true,
+ stain: 0.3,
+};
+
+elements.tennessine_trifluoride_gas = {
+ density: 14.591,
+ reactions: {},
+};
+
+runAfterAutogen(function () {
+ reactList("tennessine_trifluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "tennessine_monofluoride" });
+});
+
+toxic("tennessine_monofluoride", 0.1);
+toxic("tennessine_monofluoride_gas", 0.1);
+toxic("tennessine_trifluoride", 0.1);
+toxic("tennessine_trifluoride_gas", 0.1);
+
+elements.molten_berkelium.reactions["molten_calcium"] = { elem1: "tennessine", elem2: null, tempMin: 10000, chance: 0.01 };
+
+elements.oganesson = {
+ color: ["#c4ccc6", "#9ea39f", "#8e9294"],
+ behavior: ["XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX", "CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX"],
+
+ reactions: {
+ quark_matter: { elem1: "stable_oganesson" },
+ neutron: { elem1: "ununennium", elem2: null, chance: 0.1 },
+ },
+ tempHigh: 52,
+ category: "solids",
+ state: "solid",
+ density: 7200,
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+};
+
+elements.molten_oganesson = {
+ behavior: ["XX|CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|XX", "M2 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|M2 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_oganesson" },
+ neutron: { elem1: "ununennium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ tempHigh: 177,
+ excludeRandom: true,
+};
+
+elements.oganesson_gas = {
+ behavior: ["M2|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|M2", "M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|CH:livermorium%1|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1", "M2|M1 AND CR:neutron%20 AND CR:radiation%20 AND CR:alpha_particle%20 AND CR:rad_pop%20 AND CR:n_explosion%1|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_oganesson" },
+ neutron: { elem1: "ununennium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 100;
+ },
+ excludeRandom: true,
+ density: 12.222,
+ colorOn: ["#e224ff", "#cc6c96", "#c76ccc"],
+ conduct: 0.86,
+};
+
+elements.stable_oganesson = {
+ color: [blendColors("#c4ccc6", "#ff0000"), blendColors("#9ea39f", "#00ff00"), blendColors("#8e9294", "#0000ff")],
+ behavior: behaviors.SOLID,
+ reactions: {
+ tennessine_trifluoride: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
+ tennessine_trifluoride_gas: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
+ },
+ tempHigh: 52,
+ category: "solids",
+ state: "solid",
+ density: 7200,
+ hidden: true,
+};
+elements.molten_stable_oganesson = {
+ tempLow: 52,
+ tempHigh: 177,
+ reactions: {
+ tennessine_trifluoride: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
+ tennessine_trifluoride_gas: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
+ },
+};
+elements.stable_oganesson_gas = {
+ density: 12.222,
+ reactions: {
+ tennessine_trifluoride: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
+ tennessine_trifluoride_gas: { elem1: "oganesson_tetrafluoride", elem2: "oganesson_tetratennesside" },
+ },
+ colorOn: ["#e224ff", "#cc6c96", "#c76ccc"],
+ conduct: 0.86,
+};
+
+acidReact("stable_oganesson", "hydrofluoric_acid", "oganesson_difluoride", "fire");
+acidReact("stable_oganesson", "liquid_hydrogen_fluoride", "oganesson_difluoride", "fire");
+acidReact("stable_oganesson", "hydrofluoric_acid_gas", "oganesson_difluoride", "fire");
+acidReact("stable_oganesson", "hydrogen_fluoride", "oganesson_difluoride", "fire");
+
+elements.oganesson_difluoride = {
+ color: [blendColors("#e3e2de", "#ff0000", 0.25), blendColors("#e3e2de", "#00ff00", 0.25), blendColors("#e3e2de", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 160, //made up
+ category: "powders",
+ state: "solid",
+ density: 6100, //made up
+ hidden: true,
+};
+
+acidReact("fluorine", "oganesson_difluoride", "oganesson_tetrafluoride", "fire");
+acidReact("liquid_fluorine", "oganesson_difluoride", "oganesson_tetrafluoride", "fire");
+acidReact("fluorine", "molten_oganesson_difluoride", "oganesson_tetrafluoride", "fire");
+acidReact("liquid_fluorine", "molten_oganesson_difluoride", "oganesson_tetrafluoride", "fire");
+
+elements.fluorine.ignore.push("molten_oganesson_tetrafluoride");
+elements.liquid_fluorine.ignore.push("molten_oganesson_tetrafluoride");
+
+elements.oganesson_tetrafluoride = {
+ color: [blendColors("#d6d5d2", "#ff0000", 0.25), blendColors("#d6d5d2", "#00ff00", 0.25), blendColors("#d6d5d2", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 120, //made up
+ category: "powders",
+ state: "solid",
+ density: 6300, //made up
+ hidden: true,
+};
+
+runAfterAutogen(function () {
+ reactList("oganesson_tetrafluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "oganesson_difluoride" });
+});
+
+elements.oganesson_tetratennesside = {
+ color: [blendColors("#f7f7f5", "#ff0000"), blendColors("#f7f7f5", "#00ff00"), blendColors("#f7f7f5", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 180, //made up
+ category: "powders",
+ state: "solid",
+ density: 13800, //made up
+ stateHigh: ["molten_stable_oganesson", "stable_tennessine"],
+ hidden: true,
+};
+
+toxic("oganesson_difluoride", 0.1);
+toxic("oganesson_tetrafluoride", 0.1);
+toxic("oganesson_tetratennesside", 0.1);
+
+elements.molten_californium.reactions["molten_calcium"] = { elem1: "oganesson", elem2: null, tempMin: 10000, chance: 0.01 };
+
+elements.ununennium = {
+ color: ["#c0eb9b", "#82e082", "#b8c29d"],
+ behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_ununennium" },
+ neutron: { elem1: "unbinilium", elem2: null, chance: 0.1 },
+ },
+ tempHigh: 630,
+ tempLow: 15,
+ category: "liquids",
+ state: "liquid",
+ density: 3000,
+ hardness: 1.0,
+ conduct: 0.2,
+ stateLowName: "solid_ununennium",
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ excludeRandom: true,
+};
+
+elements.solid_ununennium = {
+ behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_ununennium" },
+ neutron: { elem1: "unbinilium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ excludeRandom: true,
+};
+
+elements.ununennium_gas = {
+ behavior: ["M2|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|M2", "M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:tennessine%1|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_ununennium" },
+ neutron: { elem1: "unbinilium", elem2: null, chance: 0.1 },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ excludeRandom: true,
+ density: 12.555,
+};
+
+runAfterAutogen(function () {
+ reactList("ununennium", eLists.WATER, { elem1: "n_explosion", elem2: null });
+ reactList("solid_ununennium", eLists.WATER, { elem1: "n_explosion", elem2: null });
+ reactList("ununennium_gas", eLists.WATER, { elem1: "n_explosion", elem2: null });
+});
+
+elements.stable_ununennium = {
+ color: [blendColors("#c0eb9b", "#ff0000"), blendColors("#82e082", "#00ff00"), blendColors("#b8c29d", "#0000ff")],
+ behavior: behaviors.LIQUID,
+ reactions: {
+ steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
+ rad_steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
+ },
+ tempHigh: 630,
+ tempLow: 15,
+ category: "liquids",
+ state: "liquid",
+ density: 14010,
+ conduct: 0.2,
+ stateLowName: "solid_stable_ununennium",
+ hidden: true,
+};
+
+runAfterLoad(function () {
+ reactList("stable_ununennium", eLists.WATER, { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide });
+ reactList("stable_ununennium_gas", eLists.WATER, { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide });
+ reactList("solid_stable_ununennium", eLists.WATER, { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide });
+});
+
+elements.stable_ununennium_gas = {
+ density: 12.555,
+ reactions: {
+ steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
+ rad_steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
+ },
+};
+
+elements.solid_stable_ununennium = {
+ behavior: behaviors.POWDER,
+ reactions: {
+ steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
+ rad_steam: { elem1: "ununennium_hydroxide", elem2: [null, null, "big_pop"], func: ununenniumHydroxide },
+ },
+};
+
+function ununenniumHydroxide(pixel) {
+ elementCircle(pixel.x, pixel.y, 10, "ununennium_hydroxide", 0.1, eLists.WATER.concat(["steam", "rad_steam"]));
+}
+
+elements.hydrofluoric_acid.ignore.push("ununennium_fluoride", "ununennium_trifluoride", "ununennium_pentafluoride");
+elements.hydrofluoric_acid_gas.ignore.push("ununennium_fluoride", "ununennium_trifluoride", "ununennium_pentafluoride");
+elements.hydrogen_fluoride.ignore.push("ununennium_fluoride", "ununennium_trifluoride", "ununennium_pentafluoride");
+elements.liquid_hydrogen_fluoride.ignore.push("ununennium_fluoride", "ununennium_trifluoride", "ununennium_pentafluoride");
+
+createSalt("ununennium_fluoride", "ununennium_fluoride_solution", [blendColors("#e1e4eb", "#ff0000", 0.25), blendColors("#e1e4eb", "#00ff00", 0.25), blendColors("#e1e4eb", "#0000ff", 0.25)], [blendColors("#3061f2", "#ff0000", 0.25), blendColors("#3061f2", "#00ff00", 0.25), blendColors("#3061f2", "#0000ff", 0.25)], true, true, 1270, -2, 102, 6703, 1094, "UNUNENNIUM", "FLUORIDE");
+
+acidReact("fluorine", "ununennium_fluoride", "ununennium_trifluoride", "fire");
+acidReact("liquid_fluorine", "ununennium_fluoride", "ununennium_trifluoride", "fire");
+acidReact("fluorine", "molten_ununennium_fluoride", "ununennium_trifluoride", "fire");
+acidReact("liquid_fluorine", "molten_ununennium_fluoride", "ununennium_trifluoride", "fire");
+
+elements.fluorine.ignore.push("molten_ununennium_trifluoride");
+elements.liquid_fluorine.ignore.push("molten_ununennium_trifluoride");
+
+elements.ununennium_trifluoride = {
+ color: [blendColors("#ccb87a", "#ff0000", 0.25), blendColors("#ccb87a", "#00ff00", 0.25), blendColors("#ccb87a", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 140, //made up
+ category: "powders",
+ state: "solid",
+ density: 7200, //made up
+ hidden: true,
+};
+
+runAfterAutogen(function () {
+ reactList("ununennium_trifluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "ununennium_fluoride" });
+});
+
+acidReact("foof", "ununennium_trifluoride", "ununennium_pentafluoride", "oxygen");
+acidReact("solid_foof", "ununennium_trifluoride", "ununennium_pentafluoride", "oxygen");
+
+elements.fluorine.ignore.push("ununennium_pentafluoride");
+elements.liquid_fluorine.ignore.push("ununennium_pentafluoride");
+
+elements.ununennium_pentafluoride = {
+ color: [blendColors("#db5030", "#ff0000", 0.25), blendColors("#db5030", "#00ff00", 0.25), blendColors("#db5030", "#0000ff", 0.25)],
+ behavior: behaviors.CAUSTIC,
+ reactions: {},
+ tempHigh: 70, //made up
+ category: "powders",
+ state: "solid",
+ stateHigh: ["ununennium_trifluoride", "fluorine"],
+ density: 7250, //made up
+ hidden: true,
+ ignore: ["foof", "solid_foof", "fluorine", "liquid_fluorine", "fluorine_ice", "ununennium_trifluoride", "oxygen", "liquid_oxygen", "oxygen_ice", "ozone", "hydrofluoric_acid", "hydrofluoric_acid_gas", "hydrogen_fluoride", "liquid_hydrogen_fluoride"],
+};
+
+toxic("ununennium_trifluoride", 0.1);
+toxic("ununennium_pentafluoride", 0.1);
+
+elements.molten_einsteinium.reactions["molten_calcium"] = { elem1: "ununennium", elem2: null, tempMin: 10000, chance: 0.01 };
+
+elements.unbinilium = {
+ color: ["#faf069", "#fcf0c7", "#edcd3e"],
+ behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:oganesson%1|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M2|M1|M2"],
+ reactions: {
+ quark_matter: { elem1: "stable_unbinilium" },
+ },
+ tempHigh: 680,
+ category: "powders",
+ state: "solid",
+ density: 7000,
+ hardness: 1.0,
+ conduct: 0.2,
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ excludeRandom: true,
+};
+
+elements.molten_unbinilium = {
+ behavior: ["XX|CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|XX", "M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2|CH:oganesson%1|M2 AND CR:neutron%25 AND CR:radiation%25 AND CR:alpha_particle%25 AND CR:rad_pop%25 AND CR:n_explosion%2", "M1|M1|M1"],
+ reactions: {
+ quark_matter: { elem1: "stable_unbinilium" },
+ },
+ hardness: 1.0,
+ tick: function (pixel) {
+ pixel.temp += 150;
+ },
+ excludeRandom: true,
+};
+
+elements.stable_unbinilium = {
+ color: [blendColors("#faf069", "#ff0000"), blendColors("#fcf0c7", "#00ff00"), blendColors("#edcd3e", "#0000ff")],
+ behavior: behaviors.POWDER,
+ reactions: {
+ oxygen: { elem1: "unbinilium_oxide" },
+ },
+ tempHigh: 680,
+ category: "powders",
+ state: "solid",
+ density: 7000,
+ conduct: 0.2,
+ hidden: true,
+};
+
+elements.unbinilium_oxide = {
+ color: [blendColors("#f5f2e1", "#ff0000", 0.25), blendColors("#f5f2e1", "#00ff00", 0.25), blendColors("#f5f2e1", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ hidden: true,
+ tempHigh: 2763,
+ category: "powders",
+ state: "solid",
+ density: 15000,
+};
+
+eListAddIon("UNBINILIUM", "unbinilium_oxide");
+eListAddIon("OXIDE", "unbinilium_oxide");
+eListAdd("INSOLUBLE", "unbinilium_oxide");
+
+elements.unbinilium_hydroxide = {
+ color: [blendColors("#f9faf2", "#ff0000", 0.25), blendColors("#f9faf2", "#00ff00", 0.25), blendColors("#f9faf2", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ hidden: true,
+ tempHigh: 620,
+ reactions: {},
+ stateHigh: "unbinilium_oxide",
+ category: "powders",
+ state: "solid",
+ density: 12000,
+};
+
+eListAdd("BASE", "unbinilium_hydroxide");
+eListAddIon("UNBINILIUM", "unbinilium_hydroxide", "base");
+eListAddIon("HYDROXIDE", "unbinilium_hydroxide", "base");
+eListAdd("INSOLUBLE", "unbinilium_hydroxide");
+
+elements.molten_stable_unbinilium = {
+ reactions: {
+ oxygen: { elem1: "unbinilium_oxide" },
+ },
+ conduct: 0.2,
+};
+
+runAfterLoad(function () {
+ reactList("unbinilium_oxide", eLists.WATER, { elem1: "unbinilium_hydroxide", elem2: null, chance: 0.01 });
+ reactList("stable_unbinilium", eLists.WATER, { elem1: ["unbinilium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350 });
+ reactList("molten_stable_unbinilium", eLists.WATER, { elem1: ["unbinilium_hydroxide", "pop"], elem2: ["hydrogen", "bubble"], chance: 0.05, temp2: 350 });
+});
+
+acidReact("hydrofluoric_acid", "unbinilium_hydroxide", "unbinilium_difluoride_solution", "fire");
+acidReact("hydrofluoric_acid_gas", "unbinilium_hydroxide", "unbinilium_difluoride_solution", "fire");
+acidReact("hydrogen_fluoride", "unbinilium_hydroxide", "unbinilium_difluoride_solution", "fire");
+acidReact("liquid_hydrogen_fluoride", "unbinilium_hydroxide", "unbinilium_difluoride_solution", "fire");
+elements.hydrofluoric_acid.ignore.push("unbinilium_difluoride", "unbinilium_tetrafluoride", "unbinilium_hexafluoride");
+elements.hydrofluoric_acid_gas.ignore.push("unbinilium_difluoride", "unbinilium_tetrafluoride", "unbinilium_hexafluoride");
+elements.hydrogen_fluoride.ignore.push("unbinilium_difluoride", "unbinilium_tetrafluoride", "unbinilium_hexafluoride");
+elements.liquid_hydrogen_fluoride.ignore.push("unbinilium_difluoride", "unbinilium_tetrafluoride", "unbinilium_hexafluoride");
+
+createSalt("unbinilium_difluoride", "unbinilium_difluoride_solution", [blendColors("#e8ebe1", "#ff0000", 0.25), blendColors("#e8ebe1", "#00ff00", 0.25), blendColors("#e8ebe1", "#0000ff", 0.25)], [blendColors("#3087f2", "#ff0000", 0.25), blendColors("#3087f2", "#00ff00", 0.25), blendColors("#3087f2", "#0000ff", 0.25)], true, true, 1340, -2, 102, 6800, 1095, "UNBINILIUM", "FLUORIDE");
+
+acidReact("fluorine", "unbinilium_difluoride", "unbinilium_tetrafluoride", "fire");
+acidReact("liquid_fluorine", "unbinilium_difluoride", "unbinilium_tetrafluoride", "fire");
+acidReact("fluorine", "molten_unbinilium_difluoride", "unbinilium_tetrafluoride", "fire");
+acidReact("liquid_fluorine", "molten_unbinilium_difluoride", "unbinilium_tetrafluoride", "fire");
+
+elements.fluorine.ignore.push("molten_unbinilium_tetrafluoride");
+elements.liquid_fluorine.ignore.push("molten_unbinilium_tetrafluoride");
+
+elements.unbinilium_tetrafluoride = {
+ color: [blendColors("#e0dd12", "#ff0000", 0.25), blendColors("#e0dd12", "#00ff00", 0.25), blendColors("#e0dd12", "#0000ff", 0.25)],
+ behavior: behaviors.POWDER,
+ reactions: {},
+ tempHigh: 210, //made up
+ category: "powders",
+ state: "solid",
+ density: 7500, //made up
+ hidden: true,
+};
+
+runAfterAutogen(function () {
+ reactList("unbinilium_tetrafluoride", eLists.WATER, { elem1: "hydrofluoric_acid", elem2: "unbinilium_difluoride" });
+});
+
+acidReact("foof", "unbinilium_tetrafluoride", "unbinilium_hexafluoride", "oxygen");
+acidReact("solid_foof", "unbinilium_tetrafluoride", "unbinilium_hexafluoride", "oxygen");
+
+elements.fluorine.ignore.push("unbinilium_hexafluoride");
+elements.liquid_fluorine.ignore.push("unbinilium_hexafluoride");
+
+elements.unbinilium_hexafluoride = {
+ color: [blendColors("#ffca7a", "#ff0000", 0.25), blendColors("#ffca7a", "#00ff00", 0.25), blendColors("#ffca7a", "#0000ff", 0.25)],
+ behavior: behaviors.CAUSTIC,
+ reactions: {},
+ tempHigh: 70, //made up
+ category: "powders",
+ state: "solid",
+ stateHigh: ["unbinilium_tetrafluoride", "fluorine"],
+ density: 7700, //made up
+ hidden: true,
+ ignore: ["foof", "solid_foof", "fluorine", "liquid_fluorine", "fluorine_ice", "unbinilium_tetrafluoride", "oxygen", "liquid_oxygen", "oxygen_ice", "ozone", "hydrofluoric_acid", "hydrofluoric_acid_gas", "hydrogen_fluoride", "liquid_hydrogen_fluoride"],
+};
+
+toxic("unbinilium_tetrafluoride", 0.1);
+toxic("unbinilium_hexafluoride", 0.1);
+
+elements.molten_fermium.reactions["molten_calcium"] = { elem1: "unbinilium", elem2: null, tempMin: 10000, chance: 0.01 };
+
+let defaultBaseReactions = {
+ grape: { elem2: "juice", color1: "#291824" },
+ sodium: { elem1: "pop" },
+ meat: { elem2: "rotten_meat", elem1: null, chance: 0.5 },
+ grease: { elem2: "soap", elem1: null },
+ fat: { elem2: "soap", elem1: null },
+};
+
+let defaultBaseGasReactions = {
+ rain_cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ snow_cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ hail_cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ pyrocumulus: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ fire_cloud: { elem1: null, elem2: "base_cloud", chance: 0.4, y: [0, 12], setting: "clouds" },
+ grape: { elem2: "juice", color1: "#291824" },
+ sodium: { elem1: "pop" },
+ meat: { elem2: "rotten_meat", elem1: null, chance: 0.4 },
+ grease: { elem2: "soap", elem1: null },
+ fat: { elem2: "soap", elem1: null },
+};
+
+elements["base_cloud"] = {
+ color: "#78636a",
+ behavior: ["XX|XX|XX", "XX|CH:generic_base%0.05|M1%2.5 AND BO", "XX|XX|XX"],
+ reactions: {
+ fire_cloud: { elem1: "electric", elem2: "fire" },
+ smoke: { elem2: "pyrocumulus", chance: 0.05, y: [0, 12], setting: "clouds" },
+ ash: { elem2: "pyrocumulus", chance: 0.05, y: [0, 12], setting: "clouds" },
+ balloon: { elem2: "pop" },
+ },
+ category: "gases",
+ burn: 15,
+ burnTime: 5,
+ state: "gas",
+ density: 0.7,
+ ignoreAir: true,
+};
+for (let i = 0; i < eLists.ACID.length; i++) {
+ elements[eLists.ACID[i]].reactions["base_cloud"] = { elem1: "rain_cloud", elem2: null, chance: 0.05 };
+}
+for (let i = 0; i < eLists.ACIDGAS.length; i++) {
+ elements[eLists.ACIDGAS[i]].reactions["base_cloud"] = { elem1: "rain_cloud", elem2: null, chance: 0.05 };
+}
+acidIgnore(["base_cloud"]);
+
+createAcid("francium_hydroxide", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), [blendColors("#863bff", "#ff0000"), blendColors("#4d00ca", "#00ff00"), blendColors("#897b9e", "#0000ff")], true, true, 100, 100, 0, 1000, 1200, 1, "FRANCIUM", { compound: "base" });
+
+elements.francium_hydroxide.ignore.push("francium_nihonide", "nihonium_hydroxide", "hydrogen", "steam");
+elements.francium_hydroxide_gas.ignore.push("francium_nihonide", "nihonium_hydroxide", "hydrogen", "steam");
+
+eListAddIon("HYDROXIDE", ["francium_hydroxide", "francium_hydroxide_gas"], "base");
+
+eListAdd("BASE", []);
+
+function acidNeutralize(base) {
+ for (let i = 0; i < eLists.ACID.length; i++) {
+ elements[eLists.ACID[i]].reactions[base] = { elem1: "neutral_acid", elem2: null };
+ }
+ for (let i = 0; i < eLists.ACIDGAS.length; i++) {
+ elements[eLists.ACIDGAS[i]].reactions[base] = { elem1: "hydrogen", elem2: null };
+ }
+ eLists.BASE.push(base);
+ if (eLists.HYDROGEN.indexOf(base) >= 0) {
+ eLists.HYDROGEN.splice(eLists.HYDROGEN.indexOf(base), 1);
+ }
+ if (elements[base].salt)
+ for (let i in elements[base].salt) {
+ if (elements[base].salt[i]) {
+ if (elements[base].salt[i].components.indexOf("HYDROGEN") >= 0) {
+ elements[base].salt[i].components.splice(elements[base].salt[i].components.indexOf("HYDROGEN"), 1);
+ }
+ }
+ }
+}
+
+createAcid("generic_base", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), "#d48092", true, true, 110, 100, -10, 400, 1020, 1, undefined, { compound: "base" });
+elements.generic_base.name = "base";
+elements.generic_base_gas.name = "base_gas";
+
+acidNeutralize("generic_base");
+acidNeutralize("generic_base_gas");
+
+acidNeutralize("radium_hydroxide");
+acidNeutralize("actinium_hydroxide");
+acidNeutralize("protactinium_hydroxide");
+acidNeutralize("unbinilium_hydroxide");
+
+elements.caustic_soda = {
+ color: "#ffe8ff",
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ tempHigh: 323,
+ state: "solid",
+ density: 2130,
+ hidden: true,
+ alias: "sodium hydroxide powder",
+};
+
+acidNeutralize("sodium_hydride");
+
+acidNeutralize("sodium_methoxide");
+acidNeutralize("molten_sodium_methoxide");
+
+elements.francium_hydroxide_powder = {
+ color: [blendColors("#e8ede8", "#ff0000"), blendColors("#e8ede8", "#00ff00"), blendColors("#e8ede8", "#0000ff")],
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ tempHigh: 251, //made up
+ state: "solid",
+ density: 5100, //made up
+ hidden: true,
+ reactions: {},
+ ignore: [],
+};
+elements.francium_hydroxide_powder.ignore.push("francium_nihonide", "nihonium_hydroxide", "hydrogen", "steam");
+
+elements.francium.breakInto = "francium";
+elements.molten_francium.breakInto = "molten_francium";
+elements.stable_francium.breakInto = "stable_francium";
+elements.molten_stable_francium.breakInto = "molten_stable_francium";
+elements.francium_hydroxide_gas.breakInto = "francium_hydroxide_gas";
+elements.francium_hydroxide_powder.breakInto = "francium_hydroxide_powder";
+elements.molten_francium_hydroxide_powder = { breakInto: "molten_francium_hydroxide_powder" };
+elements.francium_hydroxide_gas.stateHigh = ["francium_hydroxide_powder", "steam"];
+elements.francium_hydroxide.ignore.push("fire", "smoke", "smog", "steam");
+elements.francium_hydroxide_gas.ignore.push("fire", "smoke", "smog", "steam");
+acidNeutralize("francium_hydroxide");
+acidNeutralize("francium_hydroxide_gas");
+acidNeutralize("francium_hydroxide_powder");
+eLists.WATER.push("francium_hydroxide");
+
+elements.francium_hydroxide_powder.ignore = elements.francium_hydroxide.ignore;
+acidIgnore(["francium_hydroxide_powder"]);
+
+eListAddIon("FRANCIUM", ["francium_hydroxide_powder", "molten_francium_hydroxide_powder"], "base");
+eListAddIon("HYDROXIDE", ["francium_hydroxide_powder", "molten_francium_hydroxide_powder"], "base");
+
+runAfterLoad(function () {
+ for (let i = 0; i < eLists.WATER.length; i++) {
+ delete elements["francium_hydroxide"].reactions[eLists.WATER[i]];
+ delete elements["francium_hydroxide_gas"].reactions[eLists.WATER[i]];
+ }
+ reactList("francium_hydroxide_powder", eLists.WATER, { elem1: "francium_hydroxide", elem2: null });
+});
+
+createAcid("ununennium_hydroxide", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), [blendColors("#eb3bff", "#ff0000"), blendColors("#eb3bff", "#00ff00"), blendColors("#eb3bff", "#0000ff")], true, true, 100, 100, 0, 1000, 1200, 1, "UNUNENNIUM", { compound: "base" });
+
+eListAddIon("HYDROXIDE", ["ununennium_hydroxide", "ununennium_hydroxide_gas"], "base");
+
+elements.ununennium_hydroxide_powder = {
+ color: [blendColors("#c8cdc8", "#ff0000"), blendColors("#c8cdc8", "#00ff00"), blendColors("#c8cdc8", "#0000ff")],
+ behavior: behaviors.CAUSTIC,
+ category: "powders",
+ tempHigh: 271, //made up
+ state: "solid",
+ density: 8200, //made up
+ hidden: true,
+ reactions: {},
+ ignore: [],
+};
+
+elements.ununennium_hydroxide_gas.breakInto = "ununennium_hydroxide_gas";
+elements.ununennium_hydroxide_powder.breakInto = "ununennium_hydroxide_powder";
+elements.molten_ununennium_hydroxide_powder = { breakInto: "molten_ununennium_hydroxide_powder" };
+elements.ununennium_hydroxide_gas.stateHigh = ["ununennium_hydroxide_powder", "steam"];
+elements.ununennium_hydroxide.ignore.push("fire", "smoke", "smog", "steam", "ununennium_fluoride", "ununennium_fluoride_solution");
+elements.ununennium_hydroxide_gas.ignore.push("fire", "smoke", "smog", "steam", "ununennium_fluoride", "ununennium_fluoride_solution");
+acidNeutralize("ununennium_hydroxide");
+acidNeutralize("ununennium_hydroxide_gas");
+acidNeutralize("ununennium_hydroxide_powder");
+eLists.WATER.push("ununennium_hydroxide");
+
+elements.ununennium_hydroxide_powder.ignore = elements.ununennium_hydroxide.ignore;
+acidIgnore(["ununennium_hydroxide_powder"]);
+
+eListAddIon("UNUNENNIUM", ["ununennium_hydroxide_powder", "molten_ununennium_hydroxide_powder"], "base");
+eListAddIon("HYDROXIDE", ["ununennium_hydroxide_powder", "molten_ununennium_hydroxide_powder"], "base");
+
+runAfterLoad(function () {
+ for (let i = 0; i < eLists.WATER.length; i++) {
+ delete elements["ununennium_hydroxide"].reactions[eLists.WATER[i]];
+ delete elements["ununennium_hydroxide_gas"].reactions[eLists.WATER[i]];
+ }
+ reactList("ununennium_hydroxide_powder", eLists.WATER, { elem1: "ununennium_hydroxide", elem2: null });
+});
+
+createAcid("sodium_hydroxide", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), ["#fc3bff", "#c000ca", "#9b7b9e"], false, true, 100, 100, 0, 1000, 1050, 1, "SODIUM", { compound: "base" });
+acidNeutralize("sodium_hydroxide");
+acidNeutralize("sodium_hydroxide_gas");
+eListAddIon("HYDROXIDE", ["sodium_hydroxide", "sodium_hydroxide_gas"], "base");
+eLists.WATER.push("sodium_hydroxide");
+
+eLists.CAUSTIC.push("caustic_soda");
+acidNeutralize("caustic_soda");
+elements.caustic_soda.ignore = elements.sodium_hydroxide.ignore;
+acidIgnore(["caustic_soda"]);
+
+eListAddIon("SODIUM", ["caustic_soda", "molten_caustic_soda"], "base");
+eListAddIon("HYDROXIDE", ["caustic_soda", "molten_caustic_soda"], "base");
+eListAdd("COMPOUND", "caustic_soda");
+
+elements.caustic_soda.behavior = behaviors.CAUSTIC;
+if (!elements.caustic_soda.reactions) {
+ elements.caustic_soda.reactions = {};
+}
+runAfterLoad(function () {
+ reactList("caustic_soda", eLists.WATER, { elem1: "sodium_hydroxide", elem2: null });
+ delete elements.sodium_hydroxide.reactions["sodium_aluminate_solution"];
+ delete elements.sodium_hydroxide_gas.reactions["sodium_aluminate_solution"];
+});
+
+elements.sodium_hydroxide_gas.tempHigh = 150;
+elements.sodium_hydroxide_gas.stateHigh = ["caustic_soda", "steam"];
+
+createAcid("potassium_hydroxide", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), ["#3bc4ff", "#0062ca", "#7b949e"], false, true, 100, 100, 0, 1000, 1075, 1, "POTASSIUM", { compound: "base" });
+acidNeutralize("potassium_hydroxide");
+acidNeutralize("potassium_hydroxide_gas");
+eListAddIon("HYDROXIDE", ["potassium_hydroxide", "potassium_hydroxide_gas"], "base");
+eLists.WATER.push("potassium_hydroxide");
+
+eLists.CAUSTIC.push("caustic_potash");
+acidNeutralize("caustic_potash");
+elements.caustic_potash.ignore = elements.potassium_hydroxide.ignore;
+acidIgnore(["caustic_potash"]);
+
+eListAddIon("POTASSIUM", ["caustic_potash", "molten_caustic_potash"], "base");
+eListAddIon("HYDROXIDE", ["caustic_potash", "molten_caustic_potash"], "base");
+eListAdd("COMPOUND", "caustic_potash");
+
+elements.caustic_potash.behavior = behaviors.CAUSTIC;
+if (!elements.caustic_potash.reactions) {
+ elements.caustic_potash.reactions = {};
+}
+runAfterLoad(function () {
+ reactList("caustic_potash", eLists.WATER, { elem1: "potassium_hydroxide", elem2: null });
+});
+elements.potassium_hydroxide_gas.tempHigh = 150;
+elements.potassium_hydroxide_gas.stateHigh = ["caustic_potash", "steam"];
+
+createAcid("red_mud", structuredClone(defaultBaseReactions), structuredClone(defaultBaseGasReactions), ["#ab3d24", "#cc5d2d", "#a81b1b"], true, true, 1600, 1600, 0, Infinity, 5200, 3, "REDMUD", { compound: "base" });
+acidNeutralize("red_mud");
+acidNeutralize("red_mud_gas");
+elements.red_mud.viscosity = 1000000;
+
+runAfterLoad(function () {
+ reactList("red_mud", eLists.WATER, { elem2: "dirty_water" });
+ delete elements.red_mud.reactions["dirty_water"];
+ delete elements.red_mud.reactions["sodium_aluminate_solution"];
+});
+
+acidReact("potassium_hydroxide", "fertilizer", "niter", "ammonia", 10);
+acidReact("potassium_hydroxide_gas", "fertilizer", "niter", "ammonia", 10);
+
+acidReact("potassium_hydroxide", "carbon_dioxide", "potassium_carbonate", null, 10);
+acidReact("potassium_hydroxide_gas", "carbon_dioxide", "potassium_carbonate", null, 10);
+elements.potassium_hydroxide.ignore.push("carbon_dioxide", "potassium_carbonate");
+elements.potassium_hydroxide_gas.ignore.push("carbon_dioxide", "potassium_carbonate");
+
+elements.salt_water.reactions["mercury"] = { elem1: ["sodium_hydroxide", "chlorine", "hydrogen"], charged: true, chance: 0.02 };
+elements.sodium_hydroxide.ignore.push("mercury", "chlorine", "salt_water");
+elements.sodium_hydroxide_gas.ignore.push("mercury", "chlorine", "salt_water");
+elements.potassium_salt_water.reactions["mercury"] = { elem1: ["potassium_hydroxide", "chlorine", "hydrogen"], charged: true, chance: 0.02 };
+elements.potassium_hydroxide.ignore.push("mercury", "chlorine", "potassium_salt_water");
+elements.potassium_hydroxide_gas.ignore.push("mercury", "chlorine", "potassium_salt_water");
+
+acidReact("sodium_hydroxide", "bauxite", "sodium_aluminate_solution", "red_mud", 10);
+acidReact("sodium_hydroxide_gas", "bauxite", "sodium_aluminate_solution", "red_mud", 10);
+elements.red_mud.ignore.push("sodium_aluminate_solution_ice", "sodium_aluminate", "molten_sodium_aluminate", "sodium_carbonate_solution", "spent_sodium_aluminate_solution", "spent_sodium_aluminate_solution_ice", "aluminum_hydroxide", "alumina", "molten_alumina");
+elements.red_mud_gas.ignore.push("sodium_aluminate_solution_ice", "sodium_aluminate", "molten_sodium_aluminate", "sodium_carbonate_solution", "spent_sodium_aluminate_solution", "spent_sodium_aluminate_solution_ice", "aluminum_hydroxide", "alumina", "molten_alumina");
+elements.sodium_hydroxide.ignore.push("sodium_aluminate_solution_ice", "sodium_aluminate", "molten_sodium_aluminate", "sodium_carbonate_solution", "spent_sodium_aluminate_solution", "spent_sodium_aluminate_solution_ice", "aluminum_hydroxide", "alumina", "molten_alumina");
+elements.sodium_hydroxide_gas.ignore.push("sodium_aluminate_solution_ice", "sodium_aluminate", "molten_sodium_aluminate", "sodium_carbonate_solution", "spent_sodium_aluminate_solution", "spent_sodium_aluminate_solution_ice", "aluminum_hydroxide", "alumina", "molten_alumina");
+
+//Cryolite
+acidReact("hydrofluoric_acid", "sodium_aluminate", "cryolite", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "sodium_aluminate", "cryolite", "fire", 0);
+
+acidReact("hydrogen_fluoride", "sodium_aluminate", "cryolite", "fire", 0);
+acidReact("liquid_hydrogen_fluoride", "sodium_aluminate", "cryolite", "fire", 0);
+
+elements.hydrofluoric_acid.ignore.push("molten_cryolite", "molten_sodium_aluminate");
+elements.hydrofluoric_acid_gas.ignore.push("molten_cryolite", "molten_sodium_aluminate");
+elements.hydrogen_fluoride.ignore.push("molten_cryolite", "molten_sodium_aluminate");
+elements.liquid_hydrogen_fluoride.ignore.push("molten_cryolite", "molten_sodium_aluminate");
+
+acidReact("hexafluorosilicic_acid", "sodium_aluminate", "cryolite", "sand", 0);
+acidReact("hexafluorosilicic_acid_gas", "sodium_aluminate", "cryolite", "sand", 0);
+elements.hexafluorosilicic_acid.ignore.push("molten_cryolite", "molten_sodium_aluminate");
+elements.hexafluorosilicic_acid_gas.ignore.push("molten_cryolite", "molten_sodium_aluminate");
+
+//Aluminum trifluoride
+acidReact("hydrofluoric_acid", "alumina", "aluminum_trifluoride", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "alumina", "aluminum_trifluoride", "fire", 0);
+
+acidReact("hydrogen_fluoride", "alumina", "aluminum_trifluoride", "fire", 0);
+acidReact("liquid_hydrogen_fluoride", "alumina", "aluminum_trifluoride", "fire", 0);
+
+elements.hydrofluoric_acid.ignore.push("molten_alumina", "aluminum_trifluoride_gas");
+elements.hydrofluoric_acid_gas.ignore.push("molten_alumina", "aluminum_trifluoride_gas");
+elements.hydrogen_fluoride.ignore.push("molten_alumina", "aluminum_trifluoride_gas");
+elements.liquid_hydrogen_fluoride.ignore.push("molten_alumina", "aluminum_trifluoride_gas");
+
+acidReact("hydrofluoric_acid", "aluminum_hydroxide", "aluminum_trifluoride", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "aluminum_hydroxide", "aluminum_trifluoride", "fire", 0);
+
+acidReact("hydrogen_fluoride", "aluminum_hydroxide", "aluminum_trifluoride", "fire", 0);
+acidReact("liquid_hydrogen_fluoride", "aluminum_hydroxide", "aluminum_trifluoride", "fire", 0);
+
+acidReact("hydrofluoric_acid", "sodium_hydroxide", "sodium_fluoride_solution", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "sodium_hydroxide", "sodium_fluoride_solution", "fire", 0);
+acidReact("hydrofluoric_acid", "sodium_hydroxide_gas", "sodium_fluoride_solution", "fire", 0);
+acidReact("hydrofluoric_acid_gas", "sodium_hydroxide_gas", "sodium_fluoride_solution", "fire", 0);
+
+acidReact("acid", "sodium_hydroxide", "salt_water", null, 0);
+acidReact("acid_gas", "sodium_hydroxide", "salt_water", null, 0);
+acidReact("acid", "sodium_hydroxide_gas", "salt_water", null, 0);
+acidReact("acid_gas", "sodium_hydroxide_gas", "salt_water", null, 0);
+
+acidReact("acid", "potassium_hydroxide", "potassium_salt_water", null, 0);
+acidReact("acid_gas", "potassium_hydroxide", "potassium_salt_water", null, 0);
+acidReact("acid", "potassium_hydroxide_gas", "potassium_salt_water", null, 0);
+acidReact("acid_gas", "potassium_hydroxide_gas", "potassium_salt_water", null, 0);
+
+elements.sodium_hydroxide.ignore.push("sodium_methoxide", "methanol");
+elements.sodium_hydroxide_gas.ignore.push("sodium_methoxide", "methanol");
+elements.sodium_hydroxide.ignore.push("sodium_methoxide", "methanol");
+elements.sodium_hydroxide_gas.ignore.push("sodium_methoxide", "methanol");
+
+acidReact("fluoroboric_acid", "sodium_hydroxide", "sodium_tetrafluoroborate", null, 50);
+acidReact("fluoroboric_acid_gas", "sodium_hydroxide", "sodium_tetrafluoroborate", null, 50);
+acidReact("fluoroboric_acid", "sodium_hydroxide_gas", "sodium_tetrafluoroborate", null, 50);
+acidReact("fluoroboric_acid_gas", "sodium_hydroxide_gas", "sodium_tetrafluoroborate", null, 50);
+
+//nihonium
+
+acidReact("sodium_hydroxide", "nihonium_sulfate_solution", "sodium_sulfate_solution", "nihonium_hydroxide");
+acidReact("sodium_hydroxide_gas", "nihonium_sulfate_solution", "sodium_sulfate_solution", "nihonium_hydroxide");
+acidReact("sodium_hydroxide", "nihonium_sulfate", "sodium_sulfate_solution", "nihonium_hydroxide");
+acidReact("sodium_hydroxide_gas", "nihonium_sulfate", "sodium_sulfate_solution", "nihonium_hydroxide");
+
+acidReact("potassium_hydroxide", "nihonium_sulfate_solution", "potassium_sulfate_solution", "nihonium_hydroxide");
+acidReact("potassium_hydroxide_gas", "nihonium_sulfate_solution", "potassium_sulfate_solution", "nihonium_hydroxide");
+acidReact("potassium_hydroxide", "nihonium_sulfate", "potassium_sulfate_solution", "nihonium_hydroxide");
+acidReact("potassium_hydroxide_gas", "nihonium_sulfate", "potassium_sulfate_solution", "nihonium_hydroxide");
+
+acidReact("potassium_hydroxide", "nihonium_nitrate_solution", "niter_solution", "nihonium_hydroxide");
+acidReact("potassium_hydroxide_gas", "nihonium_nitrate_solution", "niter_solution", "nihonium_hydroxide");
+acidReact("potassium_hydroxide", "nihonium_nitrate", "niter_solution", "nihonium_hydroxide");
+acidReact("potassium_hydroxide_gas", "nihonium_nitrate", "niter_solution", "nihonium_hydroxide");
+
+elements.bless.reactions["foof"] = { elem2: "oxygen" };
+elements.bless.reactions["solid_foof"] = { elem2: "oxygen" };
+elements.bless.reactions["fluorine"] = { elem2: null };
+elements.bless.reactions["liquid_fluorine"] = { elem2: null };
+elements.bless.reactions["fluorine_ice"] = { elem2: null };
+elements.bless.reactions["hydrogen_fluoride"] = { elem2: "hydrogen" };
+elements.bless.reactions["liquid_hydrogen_fluoride"] = { elem2: "hydrogen" };
+elements.bless.reactions["hydrogen_fluoride_ice"] = { elem2: "hydrogen" };
+elements.bless.reactions["hydrofluoric_acid"] = { elem2: "hydrogen" };
+elements.bless.reactions["hydrofluoric_acid_ice"] = { elem2: "hydrogen" };
+elements.bless.reactions["francium"] = { elem2: null };
+elements.bless.reactions["molten_francium"] = { elem2: null };
+elements.bless.reactions["astatine"] = { elem2: null };
+elements.bless.reactions["molten_astatine"] = { elem2: null };
+elements.bless.reactions["astatine_gas"] = { elem2: null };
+elements.bless.reactions["big_pop"] = { elem2: null };
+elements.bless.reactions["rad_pop"] = { elem2: null };
+elements.bless.reactions["radon"] = { elem2: null };
+elements.bless.reactions["polonium"] = { elem2: null };
+elements.bless.reactions["molten_polonium"] = { elem2: null };
+elements.bless.reactions["neutronium"] = { elem2: "neutron" };
+elements.bless.reactions["liquid_neutronium"] = { elem2: "neutron" };
+elements.bless.reactions["quark_matter"] = { elem2: ["neutron", "proton"] };
+elements.bless.reactions["gamma_ray_burst"] = { elem2: null };
+elements.bless.reactions["nitrogen_dioxide"] = { elem2: "oxygen" };
+elements.bless.reactions["liquid_nitrogen_dioxide"] = { elem2: "oxygen" };
+elements.bless.reactions["sulfur_dioxide"] = { elem2: "oxygen" };
+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["bromine"] = { elem2: [null, null, null, "soy_sauce"] };
+elements.bless.reactions["bromine_gas"] = { elem2: [null, null, null, "soy_sauce"] };
+elements.bless.reactions["bromine_ice"] = { elem2: [null, null, null, "soy_sauce"] };
+elements.bless.reactions["rocket_fuel"] = { elem2: null };
+elements.bless.reactions["diborane"] = { elem2: "hydrogen" };
+elements.bless.reactions["pentaborane"] = { elem2: "hydrogen" };
+elements.bless.reactions["decaborane"] = { elem2: "hydrogen" };
+elements.bless.reactions["sodium_hydride"] = { elem2: "hydrogen" };
+elements.bless.reactions["sodium_borohydride"] = { elem2: "hydrogen" };
+elements.bless.reactions["sodium_borohydride_solution"] = { elem2: "water" };
+elements.bless.reactions["uraninite"] = { elem2: "rock" };
+elements.bless.reactions["yellowcake_solution"] = { elem2: ["rock", "hydrogen", "rock", "hydrogen", "rock", "hydrogen", "baked_batter", "hydrogen"] };
+elements.bless.reactions["yellowcake"] = { elem2: ["rock", "rock", "rock", "baked_batter"] };
+elements.bless.reactions["depleted_uranium"] = { elem2: "rock" };
+elements.bless.reactions["enriched_uranium"] = { elem2: "rock" };
+elements.bless.reactions["uranium_dioxide"] = { elem2: "rock" };
+elements.bless.reactions["depleted_uranium_dioxide"] = { elem2: "rock" };
+elements.bless.reactions["enriched_uranium_dioxide"] = { elem2: "rock" };
+elements.bless.reactions["uranium_tetrafluoride"] = { elem2: "rock" };
+elements.bless.reactions["depleted_uranium_tetrafluoride"] = { elem2: "rock" };
+elements.bless.reactions["enriched_uranium_tetrafluoride"] = { elem2: "rock" };
+elements.bless.reactions["uranium_hexafluoride"] = { elem2: "rock" };
+elements.bless.reactions["depleted_uranium_hexafluoride"] = { elem2: "rock" };
+elements.bless.reactions["enriched_uranium_hexafluoride"] = { elem2: "rock" };
+elements.bless.reactions["stable_uranium_hexafluoride"] = { elem2: "stable_uranium" };
+elements.bless.reactions["molten_depleted_uranium"] = { elem2: "magma" };
+elements.bless.reactions["molten_enriched_uranium"] = { elem2: "magma" };
+elements.bless.reactions["molten_uranium_dioxide"] = { elem2: "magma" };
+elements.bless.reactions["molten_depleted_uranium_dioxide"] = { elem2: "magma" };
+elements.bless.reactions["molten_enriched_uranium_dioxide"] = { elem2: "magma" };
+elements.bless.reactions["molten_uranium_tetrafluoride"] = { elem2: "magma" };
+elements.bless.reactions["molten_depleted_uranium_tetrafluoride"] = { elem2: "magma" };
+elements.bless.reactions["molten_enriched_uranium_tetrafluoride"] = { elem2: "magma" };
+elements.bless.reactions["uranium_hexafluoride_gas"] = { elem2: "rock" };
+elements.bless.reactions["depleted_uranium_hexafluoride_gas"] = { elem2: "rock" };
+elements.bless.reactions["enriched_uranium_hexafluoride_gas"] = { elem2: "rock" };
+elements.bless.reactions["stable_uranium_hexafluoride_gas"] = { elem2: "stable_uranium" };
+elements.bless.reactions["neptunium"] = { elem2: "rock" };
+elements.bless.reactions["molten_neptunium"] = { elem2: "rock" };
+elements.bless.reactions["enriched_uranium_hexafluoride_gas"] = { elem2: "rock" };
+elements.bless.reactions["radium"] = { elem2: null };
+elements.bless.reactions["molten_radium"] = { elem2: null };
+elements.bless.reactions["actinium"] = { elem2: null };
+elements.bless.reactions["molten_actinium"] = { elem2: null };
+elements.bless.reactions["thorium"] = { elem2: "rock" };
+elements.bless.reactions["molten_thorium"] = { elem2: "magma" };
+elements.bless.reactions["thorium_dioxide"] = { elem2: "rock" };
+elements.bless.reactions["molten_thorium_dioxide"] = { elem2: "magma" };
+elements.bless.reactions["thorium_tetrafluoride"] = { elem2: "rock" };
+elements.bless.reactions["molten_thorium_tetrafluoride"] = { elem2: "magma" };
+elements.bless.reactions["protactinium"] = { elem2: "rock" };
+elements.bless.reactions["molten_protactinium"] = { elem2: "magma" };
+elements.bless.reactions["neptunium"] = { elem2: "rock" };
+elements.bless.reactions["molten_neptunium"] = { elem2: "magma" };
+elements.bless.reactions["neptunium_hexafluoride"] = { elem2: "stable_neptunium" };
+elements.bless.reactions["neptunium_hexafluoride_gas"] = { elem2: "stable_neptunium" };
+elements.bless.reactions["plutonium"] = { elem2: "rock" };
+elements.bless.reactions["molten_plutonium"] = { elem2: "magma" };
+elements.bless.reactions["plutonium_dioxide"] = { elem2: "rock" };
+elements.bless.reactions["molten_plutonium_dioxide"] = { elem2: "magma" };
+elements.bless.reactions["plutonium_tetrafluoride"] = { elem2: "rock" };
+elements.bless.reactions["molten_plutonium_tetrafluoride"] = { elem2: "magma" };
+elements.bless.reactions["plutonium_hexafluoride"] = { elem2: "rock" };
+elements.bless.reactions["plutonium_hexafluoride_gas"] = { elem2: "magma" };
+elements.bless.reactions["stable_plutonium_hexafluoride"] = { elem2: "stable_plutonium" };
+elements.bless.reactions["stable_plutonium_hexafluoride_gas"] = { elem2: "stable_plutonium" };
+elements.bless.reactions["americium"] = { elem2: "rock" };
+elements.bless.reactions["molten_americium"] = { elem2: "magma" };
+elements.bless.reactions["curium"] = { elem2: "rock" };
+elements.bless.reactions["molten_curium"] = { elem2: "magma" };
+elements.bless.reactions["berkelium"] = { elem2: "rock" };
+elements.bless.reactions["molten_berkelium"] = { elem2: "magma" };
+elements.bless.reactions["californium"] = { elem2: "rock" };
+elements.bless.reactions["molten_californium"] = { elem2: "magma" };
+elements.bless.reactions["einsteinium"] = { elem2: "rock" };
+elements.bless.reactions["molten_einsteinium"] = { elem2: "magma" };
+elements.bless.reactions["fermium"] = { elem2: "rock" };
+elements.bless.reactions["molten_fermium"] = { elem2: "magma" };
+
+elements.bless.reactions["copernicium"] = { elem2: "rock" };
+elements.bless.reactions["copernicium_gas"] = { elem2: "magma" };
+elements.bless.reactions["solid_copernicium"] = { elem2: "rock" };
+elements.bless.reactions["copernicium_tetrafluoride"] = { elem2: "stable_copernicium" };
+elements.bless.reactions["nihonium"] = { elem2: "rock" };
+elements.bless.reactions["molten_nihonium"] = { elem2: "magma" };
+elements.bless.reactions["francium_nihonide"] = { elem2: "stable_nihonium" };
+elements.bless.reactions["flerovium"] = { elem2: "rock" };
+elements.bless.reactions["flerovium_gas"] = { elem2: "magma" };
+elements.bless.reactions["solid_flerovium"] = { elem2: "rock" };
+elements.bless.reactions["moscovium"] = { elem2: "rock" };
+elements.bless.reactions["molten_moscovium"] = { elem2: "magma" };
+elements.bless.reactions["livermorium"] = { elem2: "rock" };
+elements.bless.reactions["molten_livermorium"] = { elem2: "magma" };
+elements.bless.reactions["tennessine"] = { elem2: null };
+elements.bless.reactions["molten_tennessine"] = { elem2: null };
+elements.bless.reactions["stable_tennessine"] = { elem2: null };
+elements.bless.reactions["molten_stable_tennessine"] = { elem2: null };
+elements.bless.reactions["tennessine_monofluoride"] = { elem2: null };
+elements.bless.reactions["tennessine_monofluoride_ice"] = { elem2: null };
+elements.bless.reactions["tennessine_monofluoride_gas"] = { elem2: null };
+elements.bless.reactions["tennessine_trifluoride"] = { elem2: null };
+elements.bless.reactions["tennessine_trifluoride_ice"] = { elem2: null };
+elements.bless.reactions["tennessine_trifluoride_gas"] = { elem2: null };
+elements.bless.reactions["molten_oganesson"] = { elem2: null };
+elements.bless.reactions["oganesson_gas"] = { elem2: null };
+elements.bless.reactions["oganesson"] = { elem2: null };
+elements.bless.reactions["oganesson_difluoride"] = { elem2: "stable_oganesson" };
+elements.bless.reactions["molten_oganesson_difluoride"] = { elem2: "stable_oganesson" };
+elements.bless.reactions["oganesson_tetrafluoride"] = { elem2: "stable_oganesson" };
+elements.bless.reactions["molten_oganesson_tetrafluoride"] = { elem2: "stable_oganesson" };
+elements.bless.reactions["oganesson_tetratennesside"] = { elem2: "stable_oganesson" };
+elements.bless.reactions["ununennium"] = { elem2: null };
+elements.bless.reactions["ununennium_gas"] = { elem2: null };
+elements.bless.reactions["solid_ununennium"] = { elem2: null };
+elements.bless.reactions["stable_ununennium"] = { elem2: null };
+elements.bless.reactions["stable_ununennium_gas"] = { elem2: null };
+elements.bless.reactions["solid_stable_ununennium"] = { elem2: null };
+elements.bless.reactions["ununennium_trifluoride"] = { elem2: null };
+elements.bless.reactions["molten_ununennium_trifluoride"] = { elem2: null };
+elements.bless.reactions["ununennium_pentafluoride"] = { elem2: null };
+elements.bless.reactions["unbinilium"] = { elem2: null };
+elements.bless.reactions["molten_unbinilium"] = { elem2: null };
+elements.bless.reactions["unbinilium_tetrafluoride"] = { elem2: null };
+elements.bless.reactions["molten_unbinilium_tetrafluoride"] = { elem2: null };
+elements.bless.reactions["unbinilium_hexafluoride"] = { elem2: null };
+
+elements.foof.ignore.push("foof_grass", "foof_grass_seed");
+elements.solid_foof.ignore.push("foof_grass", "foof_grass_seed");
+elements.fluorine.ignore.push("foof_grass", "foof_grass_seed");
+elements.liquid_fluorine.ignore.push("foof_grass", "foof_grass_seed");
+
+elements.foof_grass = {
+ color: ["#980909", "#8b2708", "#852a11", "#7b1212", "#6d1d13"],
+ tick: function (pixel) {
+ if (!tryMove(pixel, pixel.x, pixel.y + 1)) {
+ if (pixel.h < 2 && Math.random() < 0.0005 && isEmpty(pixel.x, pixel.y - 1)) {
+ createPixel(pixel.element, pixel.x, pixel.y - 1);
+ pixelMap[pixel.x][pixel.y - 1].h = pixel.h + 1;
+ }
+ var coords = [
+ [pixel.x + 1, pixel.y],
+ [pixel.x - 1, pixel.y],
+ [pixel.x + 1, pixel.y + 1],
+ [pixel.x - 1, pixel.y + 1],
+ ];
+ for (var i = 0; i < coords.length; i++) {
+ if (Math.random() < 0.005 && isEmpty(coords[i][0], coords[i][1])) {
+ if (!isEmpty(coords[i][0], coords[i][1] + 1, true)) {
+ var soil = pixelMap[coords[i][0]][coords[i][1] + 1];
+ if (eLists.SOIL.indexOf(soil.element) !== -1) {
+ createPixel(pixel.element, coords[i][0], coords[i][1]);
+ }
+ }
+ }
+ }
+ }
+ doDefaults(pixel);
+ },
+ properties: {
+ h: 0,
+ },
+ reactions: {
+ vinegar: { elem1: "explosion", elem2: null, chance: 0.035 },
+ mercury: { elem1: "explosion", elem2: null, chance: 0.01 },
+ },
+ temp: -120,
+ tempHigh: -57,
+ stateHigh: ["oxygen", "fluorine", "explosion"],
+ tempLow: -200,
+ stateLow: "solid_foof",
+ burn: 50,
+ burnTime: 20,
+ breakInto: "foof",
+ category: "life",
+ state: "solid",
+ density: 1400,
+ hidden: true,
+ seed: "foof_grass_seed",
+};
+
+elements.foof_grass_seed = {
+ color: ["#980909", "#8b2708", "#852a11", "#7b1212", "#6d1d13"],
+ behavior: ["XX|M2%0.05|XX", "XX|L2:foof_grass|XX", "XX|M1|XX"],
+ temp: -120,
+ tempHigh: -57,
+ stateHigh: ["oxygen", "fluorine", "explosion"],
+ tempLow: -200,
+ stateLow: "solid_foof",
+ burn: 50,
+ burnTime: 20,
+ category: "life",
+ state: "solid",
+ density: 1400,
+ breakInto: "foof",
+ hidden: true,
+ cooldown: defaultCooldown,
+ seed: true,
+};
+
+elements.centrifuge = {
+ color: "#89888f",
+ category: "machines",
+ tempHigh: 1455.5,
+ stateHigh: "molten_steel",
+ tick: function (pixel) {
+ if (!pixel.del) {
+ for (let i = 0; i < 10; i++) {
+ for (let j = 1; j < 10; j++) {
+ let x = [pixel.x + i, pixel.x - j, pixel.x - i, pixel.x + j];
+ let y = [pixel.y + j, pixel.y + i, pixel.y - j, pixel.y - i];
+ var oob = outOfBounds(x[0], y[0]) || outOfBounds(x[1], y[1]) || outOfBounds(x[2], y[2]) || outOfBounds(x[3], y[3]);
+ if (!oob) {
+ let pixels = [null, null, null, null];
+ let immovable = false;
+ for (let k = 0; k < 4; k++) {
+ pixels[k] = !isEmpty(x[k], y[k], true) ? pixelMap[x[k]][y[k]] : null;
+ if (pixels[k] && !elements[pixels[k].element].movable) {
+ immovable = true;
+ }
+ }
+ if (!immovable) {
+ for (let k = 0; k < 4; k++) {
+ if (pixelMap[x[k]][y[k]]) {
+ delete pixelMap[x[k]][y[k]];
+ }
+ }
+ for (let k = 0; k < 4; k++) {
+ if (pixels[k] && !pixels[k].del) {
+ pixels[k].x = x[(k + 1) % 4];
+ pixels[k].y = y[(k + 1) % 4];
+ movePixel(pixels[k], x[(k + 1) % 4], y[(k + 1) % 4]);
+ }
+ }
+
+ for (let k = 0; k < 4; k++) {
+ if (pixels[k] && elements[pixels[k].element].onCentrifuge) {
+ elements[pixels[k].element].onCentrifuge(pixels[k]);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ doDefaults(pixel);
+ },
+ movable: false,
+};
+eLists.LIVING_SPARK = ["electric", "positron"];
+
+elements.living_spark = {
+ hidden: true,
+ behaviorOn: [
+ ["XX", "CR:electric%25", "XX"],
+ ["CR:electric%25", "XX", "CR:electric%25"],
+ ["XX", "CR:electric%25", "XX"],
+ ],
+ conduct: 0.1,
+ insulate: true,
+ color: "#fff86b",
+ lifeState: 1, //0: survived a generation. 1: newly created. 2: will die next generation
+ tick: function (pixel) {
+ if (pixel.charge) {
+ pixelTick(pixel);
+ }
+ let count = 0;
+ for (let i = -1; i <= 1; i++) {
+ for (let j = -1; j <= 1; j++) {
+ if (!(i === 0 && j === 0)) {
+ if (!isEmpty(pixel.x + i, pixel.y + j, true) && ((pixelMap[pixel.x + i][pixel.y + j].element === "living_spark" && (pixelMap[pixel.x + i][pixel.y + j].lifeState === 0 || pixelMap[pixel.x + i][pixel.y + j].lifeState === 2)) || pixelMap[pixel.x + i][pixel.y + j].on || eLists.LIVING_SPARK.includes(pixelMap[pixel.x + i][pixel.y + j].element))) {
+ count++;
+ } else if (!isEmpty(pixel.x + i, pixel.y + j, true) && pixelMap[pixel.x + i][pixel.y + j].element !== "living_spark") {
+ pixel2 = pixelMap[pixel.x + i][pixel.y + j];
+ // One loop that repeats 5 times if shiftDown else 1 time
+ var con = elements[pixel2.element].conduct;
+ if (pixel2.temp <= elements[pixel2.element].superconductAt) {
+ con = 1;
+ }
+ if (con == undefined) {
+ continue;
+ }
+ if (Math.random() < con) {
+ // If random number is less than conductivity
+ if (!pixel2.charge && !pixel2.chargeCD) {
+ pixel2.charge = 1;
+ if (elements[pixel2.element].colorOn) {
+ pixel2.color = pixelColorPick(pixel2);
+ }
+ pixel.lifeState = 2;
+ }
+ }
+ } else if (isEmpty(pixel.x + i, pixel.y + j, false)) {
+ count2 = false;
+ for (let i2 = -1; i2 <= 1; i2++) {
+ for (let j2 = -1; j2 <= 1; j2++) {
+ if (!(i2 === 0 && j2 === 0)) {
+ i3 = i2 + i;
+ j3 = j2 + j;
+ if (!isEmpty(pixel.x + i3, pixel.y + j3, true) && ((pixelMap[pixel.x + i3][pixel.y + j3].element === "living_spark" && (pixelMap[pixel.x + i3][pixel.y + j3].lifeState === 0 || pixelMap[pixel.x + i3][pixel.y + j3].lifeState === 2)) || pixelMap[pixel.x + i3][pixel.y + j3].on || eLists.LIVING_SPARK.includes(pixelMap[pixel.x + i3][pixel.y + j3].element))) {
+ count2++;
+ }
+ if (count2 > 3) {
+ break;
+ }
+ }
+ }
+ if (count2 > 3) {
+ break;
+ }
+ }
+ if (count2 == 3) {
+ createPixel("living_spark", pixel.x + i, pixel.y + j);
+ }
+ }
+ }
+ }
+ }
+ if (count < 2 || count > 3) {
+ pixel.lifeState = 2;
+ }
+ doDefaults(pixel);
+ },
+ category: "energy",
+ state: "gas",
+ density: 2.1,
+ insulate: true,
+ ignoreAir: true,
+};
+
+runEveryTick(function () {
+ for (let i = currentPixels.length - 1; i >= 0; i--) {
+ if (currentPixels[i].element === "living_spark") {
+ if (currentPixels[i].lifeState === 2) {
+ deletePixel(currentPixels[i].x, currentPixels[i].y);
+ } else {
+ currentPixels[i].lifeState = 0;
+ }
+ }
+ }
+});
+
+for (let i = 0; i < eLists.INSOLUBLE.length; i++) {
+ eListAdd("COMPOUND", eLists.INSOLUBLE[i]);
+}
+
+eListAdd("COMPOUND", "water");
+eListAddIon("HYDROGEN", "water");
+eListAddIon("HYDROXIDE", "water");
+
+eListAdd("COMPOUND", "methanol");
+eListAddIon("HYDROGEN", "methanol");
+eListAddIon("METHOXIDE", "methanol");
+
+eListAdd("COMPOUND", "vinegar");
+eListAdd("ACID", "vinegar");
+eListAddIon("HYDROGEN", "vinegar", "acid");
+eListAddIon("ACETATE", "vinegar", "acid");
+
+createSalt("baking_soda", "baking_soda_solution", ["#f2f2f2", "#e0e0e0"], "#7494db", false, true, 292, -2, 102, 3980, 1026, "SODIUM", "BICARBONATE");
+
+delete elements["molten_baking_soda"];
+
+eListAdd("COMPOUND", "baking_soda");
+eListAdd("BASE", "baking_soda");
+eListAdd("COMPOUND", "baking_soda_solution");
+eListAdd("BASE", "baking_soda_solution");
+eListAddIon("SODIUM", "baking_soda", "base");
+eListAddIon("BICARBONATE", "baking_soda", "base");
+eListAddIon("SODIUM", "baking_soda_solution", "base");
+eListAddIon("BICARBONATE", "baking_soda_solution", "base");
+
+elements["baking_soda"].reactions["sodium_hydroxide"] = { elem1: "sodium_carbonate_solution", elem2: null };
+elements["baking_soda"].reactions["sodium_hydroxide_gas"] = { elem1: "sodium_carbonate_solution", elem2: null };
+elements["baking_soda_solution"].reactions["sodium_hydroxide"] = { elem1: "sodium_carbonate_solution", elem2: null };
+elements["baking_soda_solution"].reactions["sodium_hydroxide_gas"] = { elem1: "sodium_carbonate_solution", elem2: null };
+
+createSalt("sodium_acetate", "sodium_acetate_solution", ["#f2f2f2", "#e0e0e0"], "#7ea2f2", false, true, 292, -2, 102, 3980, 1028, "SODIUM", "ACETATE");
+
+eListAdd("ACID", "seltzer");
+eListAddIon("HYDROGEN", "seltzer", "acid");
+eListAddIon("CARBONATE", "seltzer", "acid");
+eListAddIon("HYDROGEN", "seltzer", "bicarbonate");
+eListAddIon("BICARBONATE", "seltzer", "bicarbonate");
+
+eListAdd("ACID", "soda");
+eListAddIon("HYDROGEN", "soda", "acid");
+eListAddIon("CARBONATE", "soda", "acid");
+eListAddIon("HYDROGEN", "soda", "bicarbonate");
+eListAddIon("BICARBONATE", "soda", "bicarbonate");
+
+eListAdd("ACID", "pilk");
+eListAddIon("HYDROGEN", "pilk", "acid");
+eListAddIon("CARBONATE", "pilk", "acid");
+eListAddIon("HYDROGEN", "pilk", "bicarbonate");
+eListAddIon("BICARBONATE", "pilk", "bicarbonate");
+
+eListAdd("COMPOUND", "copper_sulfate");
+eListAddIon("COPPERII", "copper_sulfate");
+eListAddIon("SULFATE", "copper_sulfate");
+
+eListAddIon("COPPERII", "molten_copper_sulfate");
+eListAddIon("SULFATE", "molten_copper_sulfate");
+
+function listMatching(list) {
+ let result = [];
+ for (let i in elements) {
+ let valid = false;
+ if (elements[i].salt) {
+ for (let ii in elements[i].salt) {
+ let valid2 = true;
+
+ for (let j = 0; j < list.length; j++) {
+ if (!elements[i].salt[ii].components.includes(list[j])) {
+ valid2 = false;
+ continue;
+ }
+ }
+
+ for (let j = 0; j < elements[i].salt[ii].components.length; j++) {
+ if (!list.includes(elements[i].salt[ii].components[j])) {
+ valid2 = false;
+ continue;
+ }
+ }
+ valid = valid || valid2;
+ }
+ }
+ if (valid) {
+ result.push(i);
+ }
+ }
+ return result;
+}
+
+function listMatching2(list, elem) {
+ let result = [];
+ for (let i = 0; i < elem.length; i++) {
+ let valid = true;
+ for (let j = 0; j < list.length; j++) {
+ if (!eLists[list[j]].includes(elem[i])) {
+ valid = false;
+ break;
+ }
+ }
+ if (valid) {
+ result.push(elem[i]);
+ }
+ }
+ return result;
+}
+
+runAfterAutogen(function () {
+ water_salt = eLists.WATER.concat(eLists.SOLUBLE);
+ for (let ii = 0; ii < eLists.WATER.length; ii++) {
+ let i = eLists.WATER[ii];
+ if (!elements[i]) {
+ continue;
+ }
+ if (!elements[i].reactions) {
+ elements[i].reactions = {};
+ }
+ for (let jj = 0; jj < water_salt.length; jj++) {
+ let j = water_salt[jj];
+ if (i != j && elements[i].salt && elements[j].salt) {
+ let priorityA = -Infinity;
+ let priorityB = -Infinity;
+ for (let iii in elements[i].salt) {
+ if (priorityA > elements[i].salt[iii].priority) {
+ continue;
+ }
+ for (let jjj in elements[j].salt) {
+ if (priorityB > elements[j].salt[jjj].priority) {
+ continue;
+ }
+ if (elements[i].salt[iii].components.length > 1 && elements[j].salt[jjj].components.length > 1) {
+ let match1 = listMatching([elements[i].salt[iii].components[0], elements[j].salt[jjj].components[1]]);
+ let match2 = listMatching([elements[i].salt[iii].components[1], elements[j].salt[jjj].components[0]]);
+ let match3 = listMatching([elements[i].salt[iii].components[0], elements[j].salt[jjj].components[0]]);
+ let match4 = listMatching([elements[i].salt[iii].components[1], elements[j].salt[jjj].components[1]]);
+
+ let water1 = listMatching2(["WATER"], match1);
+ let water2 = listMatching2(["WATER"], match2);
+ let water3 = listMatching2(["WATER"], match3);
+ let water4 = listMatching2(["WATER"], match4);
+ let salt1 = listMatching2(["INSOLUBLE"], match1);
+ let salt2 = listMatching2(["INSOLUBLE"], match2);
+ let salt3 = listMatching2(["INSOLUBLE"], match3);
+ let salt4 = listMatching2(["INSOLUBLE"], match4);
+
+ let productsA = [];
+ let productsB = [];
+
+ if (water1.length > 0 && salt2.length > 0) {
+ productsA = productsA.concat(water1);
+ productsB = productsB.concat(salt2);
+ }
+ if (water2.length > 0 && salt1.length > 0) {
+ productsA = productsA.concat(water2);
+ productsB = productsB.concat(salt1);
+ }
+
+ if (water3.length > 0 && salt4.length > 0) {
+ productsA = productsA.concat(water3);
+ productsB = productsB.concat(salt4);
+ }
+ if (water4.length > 0 && salt3.length > 0) {
+ productsA = productsA.concat(water4);
+ productsB = productsB.concat(salt3);
+ }
+
+ if (productsA.length > 0 && productsB.length > 0) {
+ acidReact(i, j, productsA, productsB, 0);
+ // console.log("precipitate");
+ // console.log(i);
+ // console.log(j);
+ // console.log(productsA);
+ // console.log(productsB);
+ priorityA = elements[i].salt[iii].priority;
+ priorityB = elements[j].salt[jjj].priority;
+ continue;
+ }
+
+ // if (elements[i].salt[iii].components[0] == elements[j].salt[jjj].components[0] || elements[i].salt[iii].components[1] == elements[j].salt[jjj].components[1] || elements[i].salt[iii].components[1] == elements[j].salt[jjj].components[0] || elements[i].salt[iii].components[0] == elements[j].salt[jjj].components[1]) {
+ // continue;
+ // }
+
+ // productsA = [];
+ // productsB = [];
+
+ // if (water1.length > 0 && water2.length > 0) {
+ // productsA = productsA.concat(water1);
+ // productsB = productsB.concat(water2);
+ // }
+
+ // if (water3.length > 0 && water4.length > 0) {
+ // productsA = productsA.concat(water3);
+ // productsB = productsB.concat(water4);
+ // }
+
+ // if (productsA.length > 0 && productsB.length > 0) {
+ // elements[i].reactions[j] = { elem1: productsA, elem2: productsB, chance: 0.001, oneway: true };
+ // console.log(i);
+ // console.log(j);
+ // console.log(productsA);
+ // console.log(productsB);
+ // priorityA = elements[i].salt[iii].priority;
+ // priorityB = elements[j].salt[jjj].priority;
+ // }
+ }
+ }
+ }
+ }
+ }
+ }
+ let acids = eLists.ACID.concat(eLists.ACIDGAS).concat(eLists.AMPHOTERIC);
+ for (let ii = 0; ii < acids.length; ii++) {
+ let i = acids[ii];
+ if (!elements[i]) {
+ continue;
+ }
+ if (!elements[i].reactions) {
+ elements[i].reactions = {};
+ }
+ let bases = eLists.BASE.concat(eLists.AMPHOTERIC);
+ for (let jj = 0; jj < bases.length; jj++) {
+ let j = bases[jj];
+ if (i != j && elements[i].salt && elements[j].salt && elements[i].salt["acid"].components.length > 1 && elements[j].salt["base"].components.length > 1) {
+ let productsA = [];
+ let productsB = [];
+
+ let match = [listMatching([elements[i].salt["acid"].components[0], elements[j].salt["base"].components[1]]), listMatching([elements[i].salt["acid"].components[1], elements[j].salt["base"].components[0]]), listMatching([elements[i].salt["acid"].components[0], elements[j].salt["base"].components[0]]), listMatching([elements[i].salt["acid"].components[1], elements[j].salt["base"].components[1]])];
+
+ let compounds = [listMatching2(["COMPOUND"], match[0]), listMatching2(["COMPOUND"], match[1]), listMatching2(["COMPOUND"], match[2]), listMatching2(["COMPOUND"], match[3])];
+
+ for (let n = 0; n < compounds.length; n++) {
+ let m = n - 1;
+ if (n % 2 == 0) {
+ m = n + 1;
+ }
+ if (compounds[n].includes("water")) {
+ let water1 = listMatching2(["WATER"], match[m]);
+ if (water1.length > 0) {
+ compounds[m] = water1;
+ compounds[n].splice(compounds[n].indexOf("water"), 1);
+ if (compounds[n].length == 0) compounds[n] = [null];
+ }
+ }
+ }
+
+ if (compounds[0].length > 0 && compounds[1].length > 0) {
+ productsA = productsA.concat(compounds[0]);
+ productsB = productsB.concat(compounds[1]);
+ }
+ if (compounds[2].length > 0 && compounds[3].length > 0) {
+ productsA = productsA.concat(compounds[2]);
+ productsB = productsB.concat(compounds[3]);
+ }
+ if (productsA.length > 0 && productsB.length > 0) {
+ let reactionTemp = 0;
+ if (elements[i].salt["acid"].components.includes("FLUORIDE") && elements[i].salt["acid"].components.includes("HYDROGEN")) {
+ if (productsB[0] === null && productsB.length === 1) {
+ productsB = ["fire"];
+ } else {
+ productsB.push("fire");
+ }
+ }
+ if ((elements[i].salt["acid"].components.includes("SULFATE") || elements[i].salt["acid"].components.includes("CHLORIDE")) && elements[i].salt["acid"].components.includes("HYDROGEN")) {
+ reactionTemp = 50;
+ }
+
+ if (elements[i].reactions && elements[i].reactions[j]) {
+ delete elements[i].reactions[j];
+ }
+ if (elements[j].reactions && elements[j].reactions[i]) {
+ delete elements[j].reactions[i];
+ }
+ acidReact(i, j, productsA, productsB, reactionTemp);
+ for (let k = 0; k < productsA.length; k++) {
+ if (productsA[k] == "water") {
+ continue;
+ }
+ if (elements[j].reactions && elements[j].reactions[productsA[k]]) {
+ delete elements[j].reactions[productsA[k]];
+ }
+ if (elements[i].reactions && elements[i].reactions[productsA[k]]) {
+ delete elements[i].reactions[productsA[k]];
+ }
+ }
+ for (let k = 0; k < productsB.length; k++) {
+ if (productsB[k] == "water") {
+ continue;
+ }
+ if (elements[j].reactions && elements[j].reactions[productsB[k]]) {
+ delete elements[j].reactions[productsB[k]];
+ }
+ if (elements[i].reactions && elements[i].reactions[productsB[k]]) {
+ delete elements[i].reactions[productsB[k]];
+ }
+ }
+ // console.log("neutral");
+ // console.log(i);
+ // console.log(j);
+ // console.log(compounds);
+ // console.log(productsA);
+ // console.log(productsB);
+ }
+ }
+ if (elements[i].salt) {
+ let acidType = eLists[elements[i].salt["acid"].components[0]];
+ for (let jj = 0; jj < acidType.length; jj++) {
+ let j = acidType[jj];
+ if (elements[i].reactions && elements[i].reactions[j] && elements[i].reactions[j].elem2 === "dirty_water") {
+ delete elements[i].reactions[j];
+ }
+ }
+ }
+ }
+
+ let acidType = eLists["NITRATE"];
+ for (let jj = 0; jj < acidType.length; jj++) {
+ let j = acidType[jj];
+ if (elements["nitrogen_dioxide"].reactions[j] && elements["nitrogen_dioxide"].reactions[j].elem2 === "nitric_acid") {
+ delete elements["nitrogen_dioxide"].reactions[j];
+ }
+ if (elements["liquid_nitrogen_dioxide"].reactions[j] && elements["liquid_nitrogen_dioxide"].reactions[j].elem2 === "nitric_acid") {
+ delete elements["liquid_nitrogen_dioxide"].reactions[j];
+ }
+ }
+
+ acidType = eLists["SULFATE"];
+ for (let jj = 0; jj < acidType.length; jj++) {
+ let j = acidType[jj];
+ if (elements["sulfur_dioxide"].reactions[j] && elements["sulfur_dioxide"].reactions[j].elem2 === "sulfuric_acid") {
+ delete elements["sulfur_dioxide"].reactions[j];
+ }
+ }
+ delete elements["molten_iodine_ice"];
+ delete elements["molten_nihonium_nitrate"];
+ for (let i in elements) {
+ if (elements[i].ignore) {
+ elements[i].ignore = [...new Set(elements[i].ignore)];
+ elements[i].ignore = elements[i].ignore.filter(x => typeof x === 'string' || x instanceof String);
+ }
+ }
+ }
+});
diff --git a/mods/cherries.js b/mods/cherries.js
index 1d4b786d..aebd93e2 100644
--- a/mods/cherries.js
+++ b/mods/cherries.js
@@ -1,139 +1,350 @@
var modName = "mods/cherries.js";
-var onTryMoveIntoMod = "mods/onTryMoveInto.js";
-var libraryMod = "mods/code_library.js";
+// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
+// var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
- randomNumberFromOneToThree = function() {
- return 1 + Math.floor(Math.random() * 3)
- };
-
- debugSpeedGrowth = false;
- logLeaves = false;
- cherryAttachWhitelist = ["cherry_log","cherry_branch_1","cherry_branch_2","blossom","cherry_leaf","cherry_plant_top","cherry"];
-
- cherryDirtElements = ["dirt","mud","sand","wet_sand","clay_soil","mycelium","grass"];
+function scale (number, inMin, inMax, outMin, outMax) {
+ return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
+}
- function logPixelCoords(pixel) {
- return `(${pixel.x}, ${pixel.y})`
- };
+randomNumberFromOneToThree = function() {
+ return 1 + Math.floor(Math.random() * 3)
+};
- function hasPixel(x,y,elementInput) {
- if(isEmpty(x,y,true)) { //if empty, it can't have a pixel
- return false;
+debugSpeedGrowth = false;
+logLeaves = false;
+cherryAttachWhitelist = ["cherry_log","cherry_branch_1","cherry_branch_2","blossom","cherry_leaf","cherry_plant_top","cherry"];
+
+cherryDirtElements = ["dirt","mud","sand","wet_sand","clay_soil","mycelium","grass"];
+
+function logPixelCoords(pixel) {
+ return `(${pixel.x}, ${pixel.y})`
+};
+
+function hasPixel(x,y,elementInput) {
+ if(isEmpty(x,y,true)) { //if empty, it can't have a pixel
+ return false;
+ } else {
+ if(elementInput.includes(",")) { //CSTA
+ elementInput = elementInput.split(",");
+ };
+ if(Array.isArray(elementInput)) { //if element list
+ return elementInput.includes(pixelMap[x][y].element);
+ } else { //if single element
+ return pixelMap[x][y].element === elementInput;
+ };
+ };
+};
+
+elements.cherry_seed = {
+ color: "#8b4513",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if (isEmpty(pixel.x,pixel.y+1)) {
+ movePixel(pixel,pixel.x,pixel.y+1);
} else {
- if(elementInput.includes(",")) { //CSTA
- elementInput = elementInput.split(",");
- };
- if(Array.isArray(elementInput)) { //if element list
- return elementInput.includes(pixelMap[x][y].element);
- } else { //if single element
- return pixelMap[x][y].element === elementInput;
- };
- };
- };
-
- elements.cherry_seed = {
- color: "#8b4513",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- if (isEmpty(pixel.x,pixel.y+1)) {
- movePixel(pixel,pixel.x,pixel.y+1);
- } else {
- if (Math.random() < (debugSpeedGrowth ? 0.09 : 0.03) && pixel.age > (debugSpeedGrowth ? 20 : 50) && pixel.temp < 100) {
- if (!outOfBounds(pixel.x,pixel.y+1)) {
- var dirtPixel = pixelMap[pixel.x][pixel.y+1];
- if (cherryDirtElements.includes(dirtPixel.element)) {
- changePixel(dirtPixel,"root");
- };
+ if (Math.random() < (debugSpeedGrowth ? 0.09 : 0.03) && pixel.age > (debugSpeedGrowth ? 20 : 50) && pixel.temp < 100) {
+ if (!outOfBounds(pixel.x,pixel.y+1)) {
+ var dirtPixel = pixelMap[pixel.x][pixel.y+1];
+ if (cherryDirtElements.includes(dirtPixel.element)) {
+ changePixel(dirtPixel,"root");
};
- if (isEmpty(pixel.x,pixel.y-1)) {
- movePixel(pixel,pixel.x,pixel.y-1);
- createPixel("cherry_log",pixel.x,pixel.y+1);
- pixelMap[pixel.x][pixel.y+1].cherryRange = pixel.cherryRange; //pass cherry range down to log
- };
- } else if (pixel.age > (debugSpeedGrowth ? 500 : 1000)) {
- changePixel(pixel,"cherry_plant_top");
};
- pixel.age++;
- };
- if(Math.random() < 0.01 && pixel.age > 200) {
+ if (isEmpty(pixel.x,pixel.y-1)) {
+ movePixel(pixel,pixel.x,pixel.y-1);
+ createPixel("cherry_log",pixel.x,pixel.y+1);
+ pixelMap[pixel.x][pixel.y+1].cherryRange = pixel.cherryRange; //pass cherry range down to log
+ };
+ } else if (pixel.age > (debugSpeedGrowth ? 500 : 1000)) {
changePixel(pixel,"cherry_plant_top");
};
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- //"cherryRange": null, //apparently this is suddenly, in an illogical, never-before-seen, completely new, unprecedented incident of bad behavior, evaluated before being put into the property database, so RNG has to be done in tick
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- cooldown: defaultCooldown,
- };
+ pixel.age++;
+ };
+ if(Math.random() < 0.01 && pixel.age > 200) {
+ changePixel(pixel,"cherry_plant_top");
+ };
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ //"cherryRange": null, //apparently this is suddenly, in an illogical, never-before-seen, completely new, unprecedented incident of bad behavior, evaluated before being put into the property database, so RNG has to be done in tick
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+ cooldown: defaultCooldown,
+};
- elements.cherry_log = {
- hidden: true,
- color: "#310a0b",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
+elements.cherry_log = {
+ hidden: true,
+ color: "#310a0b",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 60 && pixel.temp < 100 && !pixel.grewPeduncle) {
+ var peduncleOffsets = [-1, 1]; //placed to the left, placed to the right
+ for(i = 0; i < peduncleOffsets.length; i++) {
+ if (isEmpty(pixel.x+peduncleOffsets[i],pixel.y,false)) {
+ if (Math.random() < 0.005) {
+ createPixel("cherry_branch_1",pixel.x+peduncleOffsets[i],pixel.y);
+ pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].dir = Math.sign(peduncleOffsets[i]);
+ pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].cherryRange = pixel.cherryRange; //pass cherry range down to branch
+ if(Math.random() < 0.8) { pixel.grewPeduncle = true; } //20% chance to not mark as true, allowing for a chance to try another branch
+ };
+ };
};
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ "grewPeduncle": false,
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
- if (pixel.age > 60 && pixel.temp < 100 && !pixel.grewPeduncle) {
- var peduncleOffsets = [-1, 1]; //placed to the left, placed to the right
- for(i = 0; i < peduncleOffsets.length; i++) {
- if (isEmpty(pixel.x+peduncleOffsets[i],pixel.y,false)) {
- if (Math.random() < 0.005) {
- createPixel("cherry_branch_1",pixel.x+peduncleOffsets[i],pixel.y);
- pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].dir = Math.sign(peduncleOffsets[i]);
- pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].cherryRange = pixel.cherryRange; //pass cherry range down to branch
- if(Math.random() < 0.8) { pixel.grewPeduncle = true; } //20% chance to not mark as true, allowing for a chance to try another branch
+elements.cherry = {
+ color: "#f7022a",
+ tick: function(pixel) {
+ if(pixel.attached) {
+ var attachCoords = [pixel.x+Math.sign(pixel.attachDirection), pixel.y];
+ if(isEmpty(attachCoords[0],attachCoords[1],false)) {
+ pixel.attached = false;
+ };
+ } else { //Move if not attached
+ if (!tryMove(pixel, pixel.x, pixel.y+1)) {
+ if(Math.random() < 0.9) {
+ if (Math.random() < 0.5) {
+ if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
+ tryMove(pixel, pixel.x-1, pixel.y+1);
+ };
+ } else {
+ if (!tryMove(pixel, pixel.x-1, pixel.y+1)) {
+ tryMove(pixel, pixel.x+1, pixel.y+1);
};
};
};
};
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- "grewPeduncle": false,
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.cherry = {
- color: "#f7022a",
- tick: function(pixel) {
- if(pixel.attached) {
- var attachCoords = [pixel.x+Math.sign(pixel.attachDirection), pixel.y];
- if(isEmpty(attachCoords[0],attachCoords[1],false)) {
- pixel.attached = false;
+ };
+ doDefaults(pixel);
+ var shouldSpoil = true; //spoil by default
+ if(pixel.attached) { //if it's attached
+ if(!isEmpty(attachCoords[0],attachCoords[1],true)) { //if the attachment coords are a pixel and not OOB
+ var attachPixel = pixelMap[attachCoords[0]][attachCoords[1]];
+ var attachElement = attachPixel.element;
+ if(cherryAttachWhitelist.includes(attachElement)) {//if the element is a whitelisted "don't spoil" element
+ shouldSpoil = false; //then don't spoil
};
- } else { //Move if not attached
+ };
+ };
+ if(shouldSpoil) { //spoil if not attached
+ if(pixel.temp > -14 && pixel.temp <= 4) { //(no spoiling below 14C)
+ pixel.spoilage += Math.max(Math.min(scale(pixel.temp,-14,4,0,9),9),0)
+ } else if(pixel.temp > 4) {
+ pixel.spoilage += Math.max(Math.min(scale(pixel.temp,4,20,9,30),40),0)
+ };
+ };
+ if(pixel.spoilage > 14400) { //3600 = 120 ticks at 20C
+ if(Math.random() < 0.05) {
+ changePixel(pixel,"spoiled_cherry");
+ };
+ };
+ },
+ properties: {
+ "spoilage":0,
+ "attached": false,
+ "attachDirection": (!Math.floor(Math.random() * 2)) ? 1 : -1,
+ },
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+ onMoveInto: function(pixel,otherPixel) {
+ var otherInfo = elements[otherPixel.element]
+ if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
+ pixel.attached = false;
+ };
+ },
+ category: "food",
+ breakInto: "juice",
+ breakIntoColor: "#A20205"
+};
+
+elements.cherry_branch_1 = {
+ hidden: true,
+ name: "cherry branch (offshoot)",
+ color: "#310a0b",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 20 && pixel.temp < 100) {
+ var peduncleCoords1 = [pixel.x + pixel.dir, pixel.y];
+ var peduncleCoords2 = [pixel.x + pixel.dir, pixel.y + 1];
+ if(isEmpty(peduncleCoords1[0],peduncleCoords1[1],false) && isEmpty(peduncleCoords2[0],peduncleCoords2[1],false)) {
+ if(Math.random() < 0.5) {
+ createPixel(pixel.element,peduncleCoords1[0],peduncleCoords1[1]);
+ pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].dir = pixel.dir;
+ pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].cherryRange = pixel.cherryRange; //pass cherry range down to next pixel of branch horizontal
+ } else {
+ createPixel("cherry_branch_2",peduncleCoords2[0],peduncleCoords2[1]);
+ pixelMap[peduncleCoords2[0]][peduncleCoords2[1]].cherryRange = pixel.cherryRange; //pass cherry range down to diagonal offshoot
+ };
+ };
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "dir": (!Math.floor(Math.random() * 2)) ? 1 : -1,
+ "age": 0,
+ //"cherryRange": (1 + (Math.floor(Math.random() * 3))), //1-3
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+elements.cherry_branch_2 = {
+ hidden: true,
+ name: "cherry branch (hanging)",
+ color: "#310a0b",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ // Grow/Flower
+ if (pixel.age > 20 && pixel.temp < 100) {
+ var growthCoords = [pixel.x, pixel.y + 1];
+ if(isEmpty(...growthCoords)) {
+ if(Math.random() < 0.9) {
+ createPixel(pixel.element,...growthCoords);
+ pixelMap[growthCoords[0]][growthCoords[1]].cherryRange = pixel.cherryRange; //pass cherry range down to next pixel of branch vertical
+ } else {
+ createPixel("blossom",...growthCoords); // cherry flower
+ };
+ };
+ };
+
+ //Make cherries
+ if (pixel.age > 40 && pixel.temp < 100) {
+ var cherryOffsets = [-1, 1]; //placed to the left, placed to the right
+ for(i = 0; i < cherryOffsets.length; i++) {
+ //console.log(`Looping through left and right positions: ${cherryOffsets}`);
+ for(j = 1; j < pixel.cherryRange + 1; j++) { //for max cherry distance, using the cherry range
+ //console.log(`Looping through cherry offset multipliers: ${j}`);
+ if (isEmpty(pixel.x+(j * cherryOffsets[i]),pixel.y,false)) { //if there's an empty space
+ //console.log(`Cherry position is empty: [${j * cherryOffsets[i]}, 0]\nTrying cherry at (${pixel.x+(j * cherryOffsets[i])},${pixel.y})`);
+ if (Math.random() < (debugSpeedGrowth ? 0.05 : 0.005)) { //try to place the cherry
+ //console.log(`Placing cherry`);
+ createPixel("cherry",pixel.x+(j * cherryOffsets[i]),pixel.y);
+ pixelMap[pixel.x+(j * cherryOffsets[i])][pixel.y].attached = true;
+ pixelMap[pixel.x+(j * cherryOffsets[i])][pixel.y].attachDirection = -1 * Math.sign(cherryOffsets[i]); //attach dir is the opposite of placement dir so it attaches towards the stem
+ } else {
+ //console.log(`NOT placing cherry`);
+ };
+ //console.log(`Cherry tried, stopping iteration`);
+ break; //and then stop iteration
+ } else {
+ //console.log(`Cherry position is NOT empty: [${j * cherryOffsets[i]}, 0]\nSkipping this offset`);
+ continue; //if not empty, skip that pixel and move on the next distance
+ };
+ //console.log(`====End of side try====`);
+ };
+ //console.log(`####End of side iterator####`);
+ };
+ //console.log(`>>>>End of cherry iterator<<<<`);
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ //console.log(`\nEnd of branch tick\n`);
+ },
+ properties: {
+ "age": 0,
+ //"cherryRange": (1 + (Math.floor(Math.random() * 3))), //1-3
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+elements.spoiled_cherry = {
+ hidden: true,
+ color: "#594b29",
+ behavior: [
+ "XX|CR:stench,fly%0.1|XX",
+ "M2%0.5|CH:dirty_water,fly,fly%0.007|M2%0.5",
+ "M2|M1|M2"
+ ],
+ stain: 0.01,
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+};
+
+elements.fly.reactions.spoiled_cherry = { "elem2":null, chance:0.15, func:behaviors.FEEDPIXEL };
+
+elements.cherry_leaf = {
+ hidden: true,
+ color: "#9df24e",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if(pixel.attached) {
+ var attachCoords = [pixel.x + pixel.attachOffsets[0], pixel.y + pixel.attachOffsets[1]];
+ if(isEmpty(attachCoords[0],attachCoords[1],false)) { //consider OOB full
+ pixel.attached = false;
+ };
+ } else { //Move if not attached
+ if(Math.random() < 0.2) {
if (!tryMove(pixel, pixel.x, pixel.y+1)) {
- if(Math.random() < 0.9) {
+ if(Math.random() < 0.4) {
if (Math.random() < 0.5) {
if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
tryMove(pixel, pixel.x-1, pixel.y+1);
@@ -146,398 +357,193 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
};
};
};
- doDefaults(pixel);
- var shouldSpoil = true; //spoil by default
- if(pixel.attached) { //if it's attached
- if(!isEmpty(attachCoords[0],attachCoords[1],true)) { //if the attachment coords are a pixel and not OOB
- var attachPixel = pixelMap[attachCoords[0]][attachCoords[1]];
- var attachElement = attachPixel.element;
- if(cherryAttachWhitelist.includes(attachElement)) {//if the element is a whitelisted "don't spoil" element
- shouldSpoil = false; //then don't spoil
- };
+ };
+ doDefaults(pixel);
+ },
+ properties: {
+ "attached": false,
+ "attachOffsets": [(!Math.floor(Math.random() * 2)) ? 1 : -1, 0],
+ "cherryRange": null,
+ },
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+ onMoveInto: function(pixel,otherPixel) { //Move through
+ var otherElement = otherPixel.element; //var element for readability
+
+ var otherInfo = elements[otherElement]; //var info
+
+ var otherState = "solid"; //consider things solid by default
+ if(typeof(otherInfo.state) === "string") {
+ otherState = otherInfo.state; //get actual state if it exists
+ };
+
+ var otherDensity = 1000; //consider density 1000 by default
+ if(typeof(otherInfo.density) === "number") {
+ otherDensity = otherInfo.density; //get actual density if it exists
+ };
+
+ var react = false; //default to no reaction
+ if(typeof(otherInfo.reactions) === "object") { //look for reactions
+ if(typeof(otherInfo.reactions[pixel.element]) === "object") { //look for reactions involving this element
+ react = true; //if there are any, set reaction flag to true
+ };
+ };
+
+ if(otherElement.endsWith("head") || otherElement.endsWith("body")) {
+ //i don't want to make general MPL handling so I'll just try to exclude them;
+ if(otherElement !== "antibody") {
+ //exclude antibody from exclusion
+ return false;
+ };
+ };
+
+ if(otherElement !== pixel.element) { //allow this element from piling on itself
+ if(logLeaves) { console.log("Other element is not cherry leaves") }; //yes, this code is for cherry leaves
+ if(react) { //if there was a reaction in that previous step
+ if(logLeaves) { console.log("Reacting pixels") };
+ reactPixels(otherPixel,pixel); //react
+ } else { //if no such reaction existed, move through
+ if(logLeaves) { console.log("Moving pixels") };
+ if((otherState !== "solid") || (otherState === "solid" && otherDensity > 100)) { //admit any non-solid, or any solid with a density over 100
+ var pX = pixel.x; //var pixel coords for no particular reason
+ var pY = pixel.y;
+ var oX = otherPixel.x; //var other pixel's coords for no particular reason
+ var oY = otherPixel.y;
+ if(logLeaves) { console.log(`${otherElement} pixel (${oX},${oY}) trying to move info leaf block (${pX},${pY})`) };
+ var dX = oX - pX; //get the difference between this's X and other's X; if the other pixel is moving from the space immediately to the right, this dX value should be 1
+ var dY = oY - pY;
+ var iDX = -1 * dX; //get the additive inverse; if we want to move such a pixel from the right to the left, we would change its +1 X offset to a -1 X offset for the coord sto move it to
+ var iDY = -1 * dY;
+ if(logLeaves) { console.log(`Old offset (relative to leaf): [${dX},${dY}], new offset [${iDX},${iDY}]`) };
+ var fX = pX + iDX; //combine this pixel's X with the inverted offset we just made;
+ //assuming this pixel is (23,31) and the other pixel is trying to move in to the left into this from (24,31),
+ //the dX would be [1, 0], signifying that the other pixel is 1 pixel to the right of this
+ //the space to the left of this, where it would go, is (22,31), and the offset for that pixel relative to this is [-1, 0]
+ //to get the [-1, 0], we'd need to flip that [1, 0] offset (lmao flip that the song by loona), hence the inverse
+ var fY = pY + iDY;
+ if(logLeaves) { console.log(`Calculated final position: (${fX},${fY}), moving other pixel from (${oX},${oY})`) };
+ tryMove(otherPixel,fX,fY);
};
};
- if(shouldSpoil) { //spoil if not attached
- if(pixel.temp > -14 && pixel.temp <= 4) { //(no spoiling below 14C)
- pixel.spoilage += Math.max(Math.min(scale(pixel.temp,-14,4,0,9),9),0)
- } else if(pixel.temp > 4) {
- pixel.spoilage += Math.max(Math.min(scale(pixel.temp,4,20,9,30),40),0)
- };
- };
- if(pixel.spoilage > 14400) { //3600 = 120 ticks at 20C
- if(Math.random() < 0.05) {
- changePixel(pixel,"spoiled_cherry");
- };
- };
- },
- properties: {
- "spoilage":0,
- "attached": false,
- "attachDirection": (!Math.floor(Math.random() * 2)) ? 1 : -1,
- },
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- onTryMoveInto: function(pixel,otherPixel) {
- var otherInfo = elements[otherPixel.element]
- if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
- pixel.attached = false;
- };
- },
- };
-
- elements.cherry_branch_1 = {
- hidden: true,
- name: "cherry branch (offshoot)",
- color: "#310a0b",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- if (pixel.age > 20 && pixel.temp < 100) {
- var peduncleCoords1 = [pixel.x + pixel.dir, pixel.y];
- var peduncleCoords2 = [pixel.x + pixel.dir, pixel.y + 1];
- if(isEmpty(peduncleCoords1[0],peduncleCoords1[1],false) && isEmpty(peduncleCoords2[0],peduncleCoords2[1],false)) {
- if(Math.random() < 0.5) {
- createPixel(pixel.element,peduncleCoords1[0],peduncleCoords1[1]);
- pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].dir = pixel.dir;
- pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].cherryRange = pixel.cherryRange; //pass cherry range down to next pixel of branch horizontal
- } else {
- createPixel("cherry_branch_2",peduncleCoords2[0],peduncleCoords2[1]);
- pixelMap[peduncleCoords2[0]][peduncleCoords2[1]].cherryRange = pixel.cherryRange; //pass cherry range down to diagonal offshoot
- };
- };
- };
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "dir": (!Math.floor(Math.random() * 2)) ? 1 : -1,
- "age": 0,
- //"cherryRange": (1 + (Math.floor(Math.random() * 3))), //1-3
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.cherry_branch_2 = {
- hidden: true,
- name: "cherry branch (hanging)",
- color: "#310a0b",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- // Grow/Flower
- if (pixel.age > 20 && pixel.temp < 100) {
- var growthCoords = [pixel.x, pixel.y + 1];
- if(isEmpty(...growthCoords)) {
- if(Math.random() < 0.9) {
- createPixel(pixel.element,...growthCoords);
- pixelMap[growthCoords[0]][growthCoords[1]].cherryRange = pixel.cherryRange; //pass cherry range down to next pixel of branch vertical
- } else {
- createPixel("blossom",...growthCoords); // cherry flower
- };
- };
- };
-
- //Make cherries
- if (pixel.age > 40 && pixel.temp < 100) {
- var cherryOffsets = [-1, 1]; //placed to the left, placed to the right
- for(i = 0; i < cherryOffsets.length; i++) {
- //console.log(`Looping through left and right positions: ${cherryOffsets}`);
- for(j = 1; j < pixel.cherryRange + 1; j++) { //for max cherry distance, using the cherry range
- //console.log(`Looping through cherry offset multipliers: ${j}`);
- if (isEmpty(pixel.x+(j * cherryOffsets[i]),pixel.y,false)) { //if there's an empty space
- //console.log(`Cherry position is empty: [${j * cherryOffsets[i]}, 0]\nTrying cherry at (${pixel.x+(j * cherryOffsets[i])},${pixel.y})`);
- if (Math.random() < (debugSpeedGrowth ? 0.05 : 0.005)) { //try to place the cherry
- //console.log(`Placing cherry`);
- createPixel("cherry",pixel.x+(j * cherryOffsets[i]),pixel.y);
- pixelMap[pixel.x+(j * cherryOffsets[i])][pixel.y].attached = true;
- pixelMap[pixel.x+(j * cherryOffsets[i])][pixel.y].attachDirection = -1 * Math.sign(cherryOffsets[i]); //attach dir is the opposite of placement dir so it attaches towards the stem
- } else {
- //console.log(`NOT placing cherry`);
- };
- //console.log(`Cherry tried, stopping iteration`);
- break; //and then stop iteration
- } else {
- //console.log(`Cherry position is NOT empty: [${j * cherryOffsets[i]}, 0]\nSkipping this offset`);
- continue; //if not empty, skip that pixel and move on the next distance
- };
- //console.log(`====End of side try====`);
- };
- //console.log(`####End of side iterator####`);
- };
- //console.log(`>>>>End of cherry iterator<<<<`);
- };
- pixel.age++;
- doDefaults(pixel);
- //console.log(`\nEnd of branch tick\n`);
- },
- properties: {
- "age": 0,
- //"cherryRange": (1 + (Math.floor(Math.random() * 3))), //1-3
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.spoiled_cherry = {
- hidden: true,
- color: "#594b29",
- behavior: [
- "XX|CR:stench,fly%0.1|XX",
- "M2%0.5|CH:dirty_water,fly,fly%0.007|M2%0.5",
- "M2|M1|M2"
- ],
- stain: 0.01,
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- };
-
- elements.fly.reactions.spoiled_cherry = { "elem2":null, chance:0.15, func:behaviors.FEEDPIXEL };
-
- elements.cherry_leaf = {
- hidden: true,
- color: "#9df24e",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- if(pixel.attached) {
- var attachCoords = [pixel.x + pixel.attachOffsets[0], pixel.y + pixel.attachOffsets[1]];
- if(isEmpty(attachCoords[0],attachCoords[1],false)) { //consider OOB full
- pixel.attached = false;
- };
- } else { //Move if not attached
- if(Math.random() < 0.2) {
- if (!tryMove(pixel, pixel.x, pixel.y+1)) {
- if(Math.random() < 0.4) {
- if (Math.random() < 0.5) {
- if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
- tryMove(pixel, pixel.x-1, pixel.y+1);
- };
- } else {
- if (!tryMove(pixel, pixel.x-1, pixel.y+1)) {
- tryMove(pixel, pixel.x+1, pixel.y+1);
- };
- };
- };
- };
- };
- };
- doDefaults(pixel);
- },
- properties: {
- "attached": false,
- "attachOffsets": [(!Math.floor(Math.random() * 2)) ? 1 : -1, 0],
- "cherryRange": null,
- },
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- onTryMoveInto: function(pixel,otherPixel) { //Move through
- var otherElement = otherPixel.element; //var element for readability
-
- var otherInfo = elements[otherElement]; //var info
-
- var otherState = "solid"; //consider things solid by default
- if(typeof(otherInfo.state) === "string") {
- otherState = otherInfo.state; //get actual state if it exists
- };
-
- var otherDensity = 1000; //consider density 1000 by default
- if(typeof(otherInfo.density) === "number") {
- otherDensity = otherInfo.density; //get actual density if it exists
- };
-
- var react = false; //default to no reaction
- if(typeof(otherInfo.reactions) === "object") { //look for reactions
- if(typeof(otherInfo.reactions[pixel.element]) === "object") { //look for reactions involving this element
- react = true; //if there are any, set reaction flag to true
- };
- };
-
- if(otherElement.endsWith("head") || otherElement.endsWith("body")) {
- //i don't want to make general MPL handling so I'll just try to exclude them;
- if(otherElement !== "antibody") {
- //exclude antibody from exclusion
- return false;
- };
- };
-
- if(otherElement !== pixel.element) { //allow this element from piling on itself
- if(logLeaves) { console.log("Other element is not cherry leaves") }; //yes, this code is for cherry leaves
- if(react) { //if there was a reaction in that previous step
- if(logLeaves) { console.log("Reacting pixels") };
- reactPixels(otherPixel,pixel); //react
- } else { //if no such reaction existed, move through
- if(logLeaves) { console.log("Moving pixels") };
- if((otherState !== "solid") || (otherState === "solid" && otherDensity > 100)) { //admit any non-solid, or any solid with a density over 100
- var pX = pixel.x; //var pixel coords for no particular reason
- var pY = pixel.y;
- var oX = otherPixel.x; //var other pixel's coords for no particular reason
- var oY = otherPixel.y;
- if(logLeaves) { console.log(`${otherElement} pixel (${oX},${oY}) trying to move info leaf block (${pX},${pY})`) };
- var dX = oX - pX; //get the difference between this's X and other's X; if the other pixel is moving from the space immediately to the right, this dX value should be 1
- var dY = oY - pY;
- var iDX = -1 * dX; //get the additive inverse; if we want to move such a pixel from the right to the left, we would change its +1 X offset to a -1 X offset for the coord sto move it to
- var iDY = -1 * dY;
- if(logLeaves) { console.log(`Old offset (relative to leaf): [${dX},${dY}], new offset [${iDX},${iDY}]`) };
- var fX = pX + iDX; //combine this pixel's X with the inverted offset we just made;
- //assuming this pixel is (23,31) and the other pixel is trying to move in to the left into this from (24,31),
- //the dX would be [1, 0], signifying that the other pixel is 1 pixel to the right of this
- //the space to the left of this, where it would go, is (22,31), and the offset for that pixel relative to this is [-1, 0]
- //to get the [-1, 0], we'd need to flip that [1, 0] offset (lmao flip that the song by loona), hence the inverse
- var fY = pY + iDY;
- if(logLeaves) { console.log(`Calculated final position: (${fX},${fY}), moving other pixel from (${oX},${oY})`) };
- tryMove(otherPixel,fX,fY);
- };
- };
- };
- },
- };
-
- /*if(!elements.diamond.reactions) { //test reaction
- elements.diamond.reactions = {};
- };
-
- elements.diamond.reactions.cherry_leaf = { "elem2": "dead_plant" };*/
-
- elements.cherry_plant_top = {
- hidden: true,
- color: "#310a0b",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- if (pixel.age > 30 && pixel.temp < 100) {
- if(!pixel.grewLeftLeaves) {
- for(i = (0 - pixel.leafRange); i < 0; i++) { //left half
- if(i == 0) {
- continue;
- };
-
- var leafOffset = i; //readability
- var leafX = pixel.x + leafOffset; //set X to cherry_plant_top pixel's X + offset/index
- var leafAttachOffset = [1, 0]; //difference 1: attaches rightwards (+) for leaves left (-) of center
- var leafY = pixel.y; //set Y to default cherry_plant_top pixel's Y
- if(Math.abs(leafOffset) == pixel.leafRange) {
- leafY++; //place edge leaves 1 pixel downwards;
- leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
- };
-
- if(outOfBounds(leafX,leafY)) {
- continue;
- };
-
- if (isEmpty(leafX,leafY,false)) {
- createPixel("cherry_leaf",leafX,leafY);
- pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
- pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
- pixelMap[leafX][leafY].cherryRange = pixel.cherryRange;
- pixel.grewLeftLeaves = true; //difference 2: separate flag for left side
- } else {
- break;
- };
- };
- };
-
- if(!pixel.grewRightLeaves) {
- for(i = 1; i < (pixel.leafRange + 1); i++) { //right half
- if(i == 0) {
- continue;
- };
-
- var leafOffset = i; //readability
- var leafX = pixel.x + leafOffset; //set X to cherry_plant_top pixel's X + offset/index
- var leafAttachOffset = [-1, 0]; //difference 1: attaches leftwards (-) for leaves right (+) of center
- var leafY = pixel.y; //set Y to default cherry_plant_top pixel's Y
- if(Math.abs(leafOffset) == pixel.leafRange) {
- leafY++; //place edge leaves 1 pixel downwards;
- leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
- };
-
- if(outOfBounds(leafX,leafY)) {
- continue;
- };
-
- if (isEmpty(leafX,leafY,false)) {
- createPixel("cherry_leaf",leafX,leafY);
- pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
- pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
- pixelMap[leafX][leafY].cherryRange = pixel.cherryRange;
- pixel.grewRightLeaves = true; //difference 2: separate flag for right side
- } else {
- break;
- };
- };
- };
- };
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- "leafRange": 2 + (Math.floor(Math.random() * 3)), //2-4
- "grewLeftLeaves": false,
- "grewRightLeaves": false,
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
-
- /*elements.cocoa_bean = {
- color: ["#f2ede9", "#f0dfce", "#e8cfb5"],
- behavior: behaviors.SOLID,
- category: "liquids",
- viscosity: 100000,
- state: "liquid",
- density: 593,
- tick: functi
- };*/
-} else {
- enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
+ };
+ },
};
+
+/*if(!elements.diamond.reactions) { //test reaction
+ elements.diamond.reactions = {};
+};
+
+elements.diamond.reactions.cherry_leaf = { "elem2": "dead_plant" };*/
+
+elements.cherry_plant_top = {
+ hidden: true,
+ color: "#310a0b",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 30 && pixel.temp < 100) {
+ if(!pixel.grewLeftLeaves) {
+ for(i = (0 - pixel.leafRange); i < 0; i++) { //left half
+ if(i == 0) {
+ continue;
+ };
+
+ var leafOffset = i; //readability
+ var leafX = pixel.x + leafOffset; //set X to cherry_plant_top pixel's X + offset/index
+ var leafAttachOffset = [1, 0]; //difference 1: attaches rightwards (+) for leaves left (-) of center
+ var leafY = pixel.y; //set Y to default cherry_plant_top pixel's Y
+ if(Math.abs(leafOffset) == pixel.leafRange) {
+ leafY++; //place edge leaves 1 pixel downwards;
+ leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
+ };
+
+ if(outOfBounds(leafX,leafY)) {
+ continue;
+ };
+
+ if (isEmpty(leafX,leafY,false)) {
+ createPixel("cherry_leaf",leafX,leafY);
+ pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
+ pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
+ pixelMap[leafX][leafY].cherryRange = pixel.cherryRange;
+ pixel.grewLeftLeaves = true; //difference 2: separate flag for left side
+ } else {
+ break;
+ };
+ };
+ };
+
+ if(!pixel.grewRightLeaves) {
+ for(i = 1; i < (pixel.leafRange + 1); i++) { //right half
+ if(i == 0) {
+ continue;
+ };
+
+ var leafOffset = i; //readability
+ var leafX = pixel.x + leafOffset; //set X to cherry_plant_top pixel's X + offset/index
+ var leafAttachOffset = [-1, 0]; //difference 1: attaches leftwards (-) for leaves right (+) of center
+ var leafY = pixel.y; //set Y to default cherry_plant_top pixel's Y
+ if(Math.abs(leafOffset) == pixel.leafRange) {
+ leafY++; //place edge leaves 1 pixel downwards;
+ leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
+ };
+
+ if(outOfBounds(leafX,leafY)) {
+ continue;
+ };
+
+ if (isEmpty(leafX,leafY,false)) {
+ createPixel("cherry_leaf",leafX,leafY);
+ pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
+ pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
+ pixelMap[leafX][leafY].cherryRange = pixel.cherryRange;
+ pixel.grewRightLeaves = true; //difference 2: separate flag for right side
+ } else {
+ break;
+ };
+ };
+ };
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ "leafRange": 2 + (Math.floor(Math.random() * 3)), //2-4
+ "grewLeftLeaves": false,
+ "grewRightLeaves": false,
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+
+/*elements.cocoa_bean = {
+ color: ["#f2ede9", "#f0dfce", "#e8cfb5"],
+ behavior: behaviors.SOLID,
+ category: "liquids",
+ viscosity: 100000,
+ state: "liquid",
+ density: 593,
+ tick: functi
+};*/
+
+// enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
+// enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
+// localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
+// alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
+
diff --git a/mods/chess.js b/mods/chess.js
index 83be06f1..773f7a74 100644
--- a/mods/chess.js
+++ b/mods/chess.js
@@ -1435,7 +1435,7 @@ runAfterLoadList.push(() => {
if (!localStorage.getItem("chessjs-tutorial")) {
// "might break"
// i know damn well it will 100% break on mobile
- alert("To start or restart chess board press 'u'. Might break on different resolutions and on mobile.");
+ promptText("To start or restart chess board press 'u'. Might break on different resolutions and on mobile.");
localStorage.setItem("chessjs-tutorial", true);
}
})
diff --git a/mods/colonies.js b/mods/colonies.js
index 215cb3d0..622b8bee 100644
--- a/mods/colonies.js
+++ b/mods/colonies.js
@@ -1,7 +1,7 @@
var modName = "mods/colonies.js";
-var exoplanetMod = "mods/exoplanet.js";
+// var exoplanetMod = "mods/exoplanet.js";
-if(enabledMods.includes(exoplanetMod)) {
+dependOn("exoplanet.js", function(){
window.addEventListener("load", () => {
document.getElementById("elementButton-base")?.remove()
@@ -567,8 +567,4 @@ elements.arriving_rocket = {
cooldown: defaultCooldown
}
-} else {
- enabledMods.splice(enabledMods.indexOf(modName),0,exoplanetMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The ${exoplanetMod} mod is required and has been automatically inserted (reload for this to take effect).`)
-};
+}, true);
\ No newline at end of file
diff --git a/mods/color_tools.js b/mods/color_tools.js
index a16ac231..a3abd1d1 100644
--- a/mods/color_tools.js
+++ b/mods/color_tools.js
@@ -1,7 +1,7 @@
var modName = "mods/color_tools.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
var colorToolCounter = 0;
saturationAmount = 1;
saturationOp = "add";
@@ -290,8 +290,4 @@ if(enabledMods.includes(libraryMod)) {
excludeRandom: true,
desc: "Click here to configure the element filter (applies to all color tools). ",
}
-} else {
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
- alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/cubesstuff.js b/mods/cubesstuff.js
index 78ae1661..856ac3b0 100644
--- a/mods/cubesstuff.js
+++ b/mods/cubesstuff.js
@@ -1,7 +1,7 @@
/*
Use intellisense for sandboxels modding here:
to show availavle functions and show global variables
- https://github.com/Cube14yt/sandboxels-types
+ https://github.com/R74nCom/sandboxels-types
*/
@@ -619,37 +619,6 @@ elements.glow_stick_ice = {
state: "solid"
}
-// Add TPS keybind
-keybinds["KeyT"] = function () {
- tpsPrompt()
-}
-
-function addRowWhenReady() {
- const table = document.getElementById("controlsTable");
-
- if (!table) {
- // Table not ready yet, try again in 100ms
- setTimeout(addRowWhenReady, 100);
- return;
- }
-
- // Table exists, add the row
- const rowCount = table.rows.length;
- const newRow = table.insertRow(rowCount - 1);
-
- const cell1 = newRow.insertCell(0);
- const cell2 = newRow.insertCell(1);
-
- cell1.textContent = "Change TPS";
- cell2.innerHTML = "T ";
-
- console.log("Row added successfully!");
-}
-
-// Start the process
-addRowWhenReady();
-
-
elements.randomizer = {
buttonColor: rainbowColor,
excludeRandom: true,
@@ -794,32 +763,32 @@ elements.rgb_led = {
stateHigh: ["molten_glass", "molten_glass", "molten_glass", "molten_gallium"],
onSelect: () => {
- promptInput("Enter red value (0-255):", function (r_inp) {
- r_inp = parseInt(r_inp);
+ promptInput("Enter red value (0-255):", function (old_r_inp) {
+ let r_inp = parseInt(old_r_inp);
if (r_inp > 255 || r_inp < 0 || isNaN(r_inp)) {
logMessage("Red value is invalid, using default/last red value: " + globals.red);
} else {
globals.red = r_inp;
}
- promptInput("Enter green value (0-255):", function (g_inp) {
- g_inp = parseInt(g_inp);
+ promptInput("Enter green value (0-255):", function (old_g_inp) {
+ let g_inp = parseInt(old_g_inp);
if (g_inp > 255 || g_inp < 0 || isNaN(g_inp)) {
logMessage("Green value is invalid, using default/last green value: " + globals.green);
} else {
globals.green = g_inp;
}
- promptInput("Enter blue value (0-255):", function (b_inp) {
- b_inp = parseInt(b_inp);
+ promptInput("Enter blue value (0-255):", function (old_b_inp) {
+ let b_inp = parseInt(old_b_inp);
if (b_inp > 255 || b_inp < 0 || isNaN(b_inp)) {
logMessage("Blue value is invalid, using default/last blue value: " + globals.blue);
} else {
globals.blue = b_inp;
}
- }, "Blue Value", globals.blue); // optional default input
- }, "Green Value", globals.green);
- }, "Red Value", globals.red);
+ }, "Blue Value", String(globals.blue)); // optional default input
+ }, "Green Value", String(globals.green));
+ }, "Red Value", String(globals.red));
},
onPlace: (pixel) => {
@@ -1763,7 +1732,7 @@ globals.heatAmount = 2
elements.adjustable_heater = {
color: "#ff0000",
- category: "deprecated",
+ category: "machines",
insulate: true,
behavior: behaviors.WALL,
@@ -1846,7 +1815,7 @@ globals.coolAmount = 2; // adjustable step
elements.adjustable_cooler = {
color: "#0000ff",
- category: "deprecated",
+ category: "machines",
insulate: true,
behavior: behaviors.WALL,
@@ -2374,6 +2343,7 @@ elements.cacao_stem = {
// --- audio setup ---
+// @ts-ignore
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
function playNote(frequency, duration = 1, type = "sine", volume = 0.1) {
@@ -2738,13 +2708,18 @@ globals.rCircle = false
globals.rRGBLed = false
globals.rCustomBomb = false
dependOn("betterSettings.js", () => {
+ // @ts-ignore
var Reset = new SettingsTab("Reset");
+ // @ts-ignore
var resetCircle = new Setting("Reset circle value and radius on reset", "Reset circle", settingType.BOOLEAN, false, defaultValue = false);
+ // @ts-ignore
var resetRGBLed = new Setting("Reset RGB Led value on reset", "Reset RGB Led", settingType.BOOLEAN, false, defaultValue = false);
+ // @ts-ignore
var resetCustomBomb = new Setting("Reset Custom Bomb value on reset", "Reset Custom Bomb", settingType.BOOLEAN, false, defaultValue = false);
Reset.registerSettings("Reset", resetRGBLed)
Reset.registerSettings("Reset", resetCircle)
Reset.registerSettings("Reset", resetCustomBomb)
+ // @ts-ignore
settingsManager.registerTab(Reset);
runEveryTick(() => {
if (resetCircle.value == true) {
@@ -3032,7 +3007,7 @@ elements.calculator = {
logMessage("Error")
return;
}
- logMessage(Number(ans.toFixed(10)))
+ logMessage(ans.toFixed(10))
}
catch (e) {
logMessage("Invalid Characters Detected")
@@ -3065,8 +3040,9 @@ elements.random_teleporter = {
} else pixel.fadeTo = "orange";
}
- for (var i = 0; i < squareCoords.length; i++) {
- let coord = squareCoords[i];
+ shuffleArray(squareCoordsShuffle)
+ for (var i = 0; i < squareCoordsShuffle.length; i++) {
+ let coord = squareCoordsShuffle[i];
let x = pixel.x + coord[0];
let y = pixel.y + coord[1];
if (!isEmpty(x, y)) {
@@ -3248,56 +3224,6 @@ elements.element_line = {
}
}
-function getSquareCoords(pixel) {
- let x, y;
- for (let i = 0; i < squareCoords.length; i++) {
- let coord = squareCoords[i];
- x = pixel.x + coord[0];
- y = pixel.y + coord[1];
- }
- return { x, y }
-}
-
-function getAdjacentCoords(pixel) {
- let x, y;
- for (let i = 0; i < adjacentCoords.length; i++) {
- x = pixel.x + adjacentCoords[i][0];
- y = pixel.y + adjacentCoords[i][1];
- }
- return { x, y }
-}
-
-function getSquareCoordsShuffle(pixel) {
- shuffleArray(squareCoordsShuffle);
- let x, y;
- for (var i = 0; i < squareCoordsShuffle.length; i++) {
- var coord = squareCoordsShuffle[i];
- x = pixel.x + coord[0];
- y = pixel.y + coord[1];
- }
- return { x, y }
-}
-
-function getAdjacentCoordsShuffle(pixel) {
- shuffleArray(adjacentCoordsShuffle)
- let x, y
- for (var i = 0; i < adjacentCoordsShuffle.length; i++) {
- x = pixel.x + adjacentCoordsShuffle[i][0];
- y = pixel.y + adjacentCoordsShuffle[i][1];
- }
- return { x, y }
-}
-
-function getScreenCoords() {
- let coords = []
- for (let x = 0; x <= width; x++) {
- for (let y = 0; y <= height; y++) {
- coords.push([x, y])
- }
- }
- return coords
-}
-
globals.replaceElem = "wood"
elements.replace_all_of_element = {
color: ["#35008a", "#000000"],
@@ -3325,5 +3251,51 @@ elements.replace_all_of_element = {
}
}
+/**
+ *
+ * @param {(pixel: Pixel | undefined) => void} callback
+ */
+function forEachPixel(callback) {
+ for (let x = 0; x <= width; x++) {
+ for (let y = 0; y <= height; y++) {
+ callback(pixelMap[x][y])
+ }
+ }
+}
-
+elements["🐔poolnoodle"] = {
+ category: "extras",
+ color: ["#7700ff", "#90ff90", "#ff0000", "#f700ff"],
+ buttonColor: rainbowColor,
+ behavior: behaviors.STURDYPOWDER,
+ density: 30,
+ properties: {
+ panic: 0,
+ panicTimer: 0
+ },
+ onClicked(pixel) {
+ pixel.panic = 1
+ pixel.panicTimer = 60
+ },
+ tick(pixel) {
+ if (Math.random() < 0.002) {
+ if (Math.random() <= 0.1 && (getPixel(pixel.x, pixel.y - 1) || outOfBounds(pixel.x, pixel.y + 1))) {
+ tryMove(pixel, pixel.x, pixel.y - 2) // 2 to coutneract gravity
+ }
+ Math.random() < 0.5
+ ? tryMove(pixel, pixel.x + 1, pixel.y)
+ : tryMove(pixel, pixel.x - 1, pixel.y);
+ }
+ if (!pixel.panic) return
+ if (pixel.panicTimer <= 0) {
+ pixel.panic = 0
+ }
+ pixel.panicTimer--
+ if (Math.random() <= 0.1 && (getPixel(pixel.x, pixel.y - 1) || outOfBounds(pixel.x, pixel.y + 1))) {
+ tryMove(pixel, pixel.x, pixel.y - 2) // same as above
+ }
+ if (Math.random() <= 0.7) {
+ Math.random() <= 0.5 ? tryMove(pixel, pixel.x + 1, pixel.y) : tryMove(pixel, pixel.x - 1, pixel.y)
+ }
+ }
+}
diff --git a/mods/delete_all_of_element.js b/mods/delete_all_of_element.js
index 8080074f..670eb6e9 100644
--- a/mods/delete_all_of_element.js
+++ b/mods/delete_all_of_element.js
@@ -12,6 +12,6 @@ elements.delete_all_of_element = {
}
}
},
- category: "tools",
+ category: "edit",
excludeRandom: true,
};
diff --git a/mods/devsnacks.js b/mods/devsnacks.js
index 74add79e..c6e24571 100644
--- a/mods/devsnacks.js
+++ b/mods/devsnacks.js
@@ -190,4 +190,18 @@ elements.spicy_water = {
};
elements.broth.reactions.spice = { color1:"#ef713f", tempMin:70, chance:0.05 };
elements.broth.reactions.spicy_water = { color1:"#ef713f", tempMin:70, chance:0.05 };
-elements.meat.reactions.spicy_water = { elem2:"broth", color2:"#ef713f", tempMin:70 };
\ No newline at end of file
+elements.meat.reactions.spicy_water = { elem2:"broth", color2:"#ef713f", tempMin:70 };
+
+elements.nut_spread = {
+ color: "#7B4528",
+ behavior: behaviors.LIQUID,
+ viscosity: 200000,
+ tempHigh: 232,
+ stateHigh: ["smoke","smoke","smoke","smoke","salt"],
+ category: "food",
+ state: "liquid",
+ density: 1090.5,
+ isFood: true,
+ hidden: true
+}
+elements.nut_meat.reactions.chocolate_powder = { elem1:"nut_spread", elem2:"nut_spread" }
\ No newline at end of file
diff --git a/mods/drills.js b/mods/drills.js
index a360c5b6..4575d2b0 100644
--- a/mods/drills.js
+++ b/mods/drills.js
@@ -65,19 +65,19 @@
// info element
-elements.drills_info = {
- color: "#000000",
- name: "drills.js",
- category: "Mods",
- behavior: behaviors.SELFDELETE,
- maxSize: 1,
- tool: function(pixel) {},
- onSelect: function(pixel) {
- let mod_info = "The drills.js mod adds different kinds of drills to a new 'drills' category.\n\nMod made by: Necrotic_Phantom. \n With help from: voidapex11."
- alert(mod_info)
- return
- },
-};
+// elements.drills_info = {
+// color: "#000000",
+// name: "drills.js",
+// category: "Mods",
+// behavior: behaviors.SELFDELETE,
+// maxSize: 1,
+// tool: function(pixel) {},
+// onSelect: function(pixel) {
+// let mod_info = "The drills.js mod adds different kinds of drills to a new 'drills' category.\n\nMod made by: Necrotic_Phantom. \n With help from: voidapex11."
+// alert(mod_info)
+// return
+// },
+// };
diff --git a/mods/dry_acid.js b/mods/dry_acid.js
new file mode 100644
index 00000000..337a63ed
--- /dev/null
+++ b/mods/dry_acid.js
@@ -0,0 +1,34 @@
+elements.dry_acid = {
+ name:"Anhydrous acid",
+ desc:"It's pretty much just acid without water in it.",
+ color: ["#62e36f", "#a5d9aa", "#b3c9b6"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ reactions: {
+ "water": { elem1:"dry_acid", elem2:"acid", temp2:37.22},
+ "dirty_water": { elem1:null, elem2:"acid", temp2:37.22}
+ },
+ density: 1.522
+}
+
+if (elements.acid) {
+ if (!elements.acid.ignore) {
+ elements.acid.ignore = [];
+ }
+ elements.acid.ignore.push('dry_acid');
+}
+
+// Ensure the reactions object exists for the element
+if (!elements.acid.reactions) {
+ elements.acid.reactions = {};
+}
+
+// Add the new reaction
+elements.acid.reactions["dirty_water"] = {
+ elem1: "acid", // What this element turns into
+ elem2: "acid", // What the other element turns into
+}
+
+delete elements.acid.reactions.water
+delete elements.water.reactions.acid
\ No newline at end of file
diff --git a/mods/haseulite.js b/mods/haseulite.js
index a326fb56..dd901f1c 100644
--- a/mods/haseulite.js
+++ b/mods/haseulite.js
@@ -1152,7 +1152,7 @@ if(enabledMods.includes(loonaMod) && enabledMods.includes(fireMod) && enabledMod
burnTime: 600,
tempHigh: 200,
stateHigh: ["steam", "ash"],
- onTryMoveInto: function(pixel,otherPixel) {
+ onMoveInto: function(pixel,otherPixel) {
var otherInfo = elements[otherPixel.element]
if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
pixel.attached = false;
diff --git a/mods/heatglow.js b/mods/heatglow.js
index b37bdfde..c781878d 100644
--- a/mods/heatglow.js
+++ b/mods/heatglow.js
@@ -5,13 +5,13 @@ function tempToRGB(temp){
if (temp <= 6500){
return{
r: 255,
- g: Math.max(-325.757*Math.pow(0.999581, temp)+272.879, 0),
- b: Math.max(-571.403*Math.pow(0.999675, temp)+321.955, 0)
+ g: Math.trunc(Math.max(-325.757*Math.pow(0.999581, temp)+272.879, 0)),
+ b: Math.trunc(Math.max(-571.403*Math.pow(0.999675, temp)+321.955, 0))
}
} else {
return {
- r: Math.max(604.879*Math.pow(0.999697, temp)+169.618, 0),
- g: Math.max(719.488*Math.pow(0.999599, temp)+201.788, 0),
+ r: Math.trunc(Math.max(604.879*Math.pow(0.999697, temp)+169.618, 0)),
+ g: Math.trunc(Math.max(719.488*Math.pow(0.999599, temp)+201.788, 0)),
b: 255
}
}
@@ -27,7 +27,7 @@ function oldtempToRgb(temp, pixel){
}
if (ctemp <= 0.5){
return{
- r: (510*ctemp),
+ r: Math.trunc(510*ctemp),
g: 0,
b: 0,
opacity: (ctemp/1.3)
@@ -35,8 +35,8 @@ function oldtempToRgb(temp, pixel){
} else {
return {
r: 255,
- g: ((510*ctemp)-255),
- b: ((280*ctemp)-140),
+ g: Math.trunc((510*ctemp)-255),
+ b: Math.trunc((280*ctemp)-140),
opacity: (ctemp/1.3)
}
}
diff --git a/mods/human_edit.js b/mods/human_edit.js
index 1cdf42b1..83a8d0c6 100644
--- a/mods/human_edit.js
+++ b/mods/human_edit.js
@@ -1,5 +1,4 @@
var modName = "mods/human_edit.js";
-var onTryMoveIntoMod = "mods/onTryMoveInto.js";
if(typeof(breakPixel) == "undefined") {
function breakPixel(pixel,changetemp=false,defaultBreakIntoDust=false) {
var info = elements[pixel.element];
@@ -33,693 +32,686 @@ function hasPixel(x,y,elementInput) {
};
};
-if(enabledMods.includes(onTryMoveIntoMod)) {
- elements.brain = {
- color: ["#fce3e3","#deb6c5","#f5ced5","#e87b8f"],
- behavior: [
- "XX|XX|XX",
- "XX|CH:rotten_meat%1|XX",
- "M2|M1|M2",
- ],
- reactions: {
- "dirty_water": { "elem1":"rotten_meat", "chance":0.1 },
- "fly": { "elem1":"rotten_meat", "chance":0.2 },
- "dioxin": { "elem1":"rotten_meat", "elem2":null, "chance":0.1 },
- "uranium": { "elem1":"rotten_meat", "chance":0.1 },
- "cancer": { "elem1":"rotten_meat", "chance":0.1 },
- "plague": { "elem1":"rotten_meat", "elem2":null, "chance":0.3 },
- "ant": { "elem1":"rotten_meat", "chance":0.1 },
- "worm": { "elem1":"rotten_meat", "chance":0.1 },
- "rat": { "elem1":"rotten_meat", "chance":0.3 },
- "mushroom_spore": { "elem1":"rotten_meat", "chance":0.1 },
- "mushroom_stalk": { "elem1":"rotten_meat", "chance":0.1 },
- "mercury": { "elem1":"rotten_meat", "elem2":null, "chance":0.2 },
- "mercury_gas": { "elem1":"rotten_meat", "elem2":null, "chance":0.1 },
- "virus": { "elem1":"rotten_meat", "chance":0.1 },
- "poison": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
- "infection": { "elem1":"rotten_meat", "elem2":null, "chance":0.1 },
- "ink": { "elem1":"rotten_meat", "elem2":null, "chance":0.1 },
- "acid": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
- "acid_gas": { "elem1":"rotten_meat", "chance":0.4 },
- "cyanide": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
- },
- tempHigh: 100,
- stateHigh: "cooked_meat",
- tempLow: -18,
- stateLow: "frozen_meat",
- category:"life",
- hidden: true,
- breakInto: ["meat", "blood"],
- burn:10,
- burnTime:200,
- burnInto:["cooked_meat","steam","steam","salt"],
- state: "solid",
- density: 1081,
- conduct: 1,
+elements.brain = {
+ color: ["#fce3e3","#deb6c5","#f5ced5","#e87b8f"],
+ behavior: [
+ "XX|XX|XX",
+ "XX|CH:rotten_meat%1|XX",
+ "M2|M1|M2",
+ ],
+ reactions: {
+ "dirty_water": { "elem1":"rotten_meat", "chance":0.1 },
+ "fly": { "elem1":"rotten_meat", "chance":0.2 },
+ "dioxin": { "elem1":"rotten_meat", "elem2":null, "chance":0.1 },
+ "uranium": { "elem1":"rotten_meat", "chance":0.1 },
+ "cancer": { "elem1":"rotten_meat", "chance":0.1 },
+ "plague": { "elem1":"rotten_meat", "elem2":null, "chance":0.3 },
+ "ant": { "elem1":"rotten_meat", "chance":0.1 },
+ "worm": { "elem1":"rotten_meat", "chance":0.1 },
+ "rat": { "elem1":"rotten_meat", "chance":0.3 },
+ "mushroom_spore": { "elem1":"rotten_meat", "chance":0.1 },
+ "mushroom_stalk": { "elem1":"rotten_meat", "chance":0.1 },
+ "mercury": { "elem1":"rotten_meat", "elem2":null, "chance":0.2 },
+ "mercury_gas": { "elem1":"rotten_meat", "elem2":null, "chance":0.1 },
+ "virus": { "elem1":"rotten_meat", "chance":0.1 },
+ "poison": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
+ "infection": { "elem1":"rotten_meat", "elem2":null, "chance":0.1 },
+ "ink": { "elem1":"rotten_meat", "elem2":null, "chance":0.1 },
+ "acid": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
+ "acid_gas": { "elem1":"rotten_meat", "chance":0.4 },
+ "cyanide": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
+ },
+ tempHigh: 100,
+ stateHigh: "cooked_meat",
+ tempLow: -18,
+ stateLow: "frozen_meat",
+ category:"life",
+ hidden: true,
+ breakInto: ["meat", "blood"],
+ burn:10,
+ burnTime:200,
+ burnInto:["cooked_meat","steam","steam","salt"],
+ state: "solid",
+ density: 1081,
+ conduct: 1,
+};
+
+elements.cerebrospinal_fluid = {
+ color: "#ced7db",
+ behavior: behaviors.LIQUID,
+ state: "liquid",
+ tempHigh: 100,
+ stateHigh: "steam",
+ breakInto: "steam",
+ reactions: JSON.parse(JSON.stringify(elements.water.reactions)),
+};
+
+function validatePanic(pixel) {
+ //console.log(`validatePanic: validatePanic called on pixel ${pixel.element} at (${pixel.x},${pixel.y}) with panic level ${pixel.panic || 0}`);
+ if(pixel.element.endsWith("body")) {
+ //console.log("validatePanic called on body pixel (panic is stored in the head)");
};
-
- elements.cerebrospinal_fluid = {
- color: "#ced7db",
- behavior: behaviors.LIQUID,
- state: "liquid",
- tempHigh: 100,
- stateHigh: "steam",
- breakInto: "steam",
- reactions: JSON.parse(JSON.stringify(elements.water.reactions)),
+ if(Number.isNaN(pixel.panic)) {
+ //console.log("NaN case: panic set to 0");
+ pixel.panic = 0;
};
+ //console.log(`Bounding code running from value of ${pixel.panic}`);
+ pixel.panic = Math.max(0,Math.min(1,pixel.panic));
+ //console.log(`Validation result: Panic set to ${pixel.panic}`);
- function validatePanic(pixel) {
- //console.log(`validatePanic: validatePanic called on pixel ${pixel.element} at (${pixel.x},${pixel.y}) with panic level ${pixel.panic || 0}`);
- if(pixel.element.endsWith("body")) {
- //console.log("validatePanic called on body pixel (panic is stored in the head)");
- };
- if(Number.isNaN(pixel.panic)) {
- //console.log("NaN case: panic set to 0");
- pixel.panic = 0;
- };
- //console.log(`Bounding code running from value of ${pixel.panic}`);
- pixel.panic = Math.max(0,Math.min(1,pixel.panic));
- //console.log(`Validation result: Panic set to ${pixel.panic}`);
-
- if(Number.isNaN(pixel.mood)) {
- //console.log("NaN case: panic set to 0");
- pixel.mood = 0;
- };
- //console.log(`Bounding code running from value of ${pixel.panic}`);
- pixel.mood = Math.max(-3,Math.min(3,pixel.mood));
- //console.log(`Validation result: Panic set to ${pixel.panic}`);
+ if(Number.isNaN(pixel.mood)) {
+ //console.log("NaN case: panic set to 0");
+ pixel.mood = 0;
};
+ //console.log(`Bounding code running from value of ${pixel.panic}`);
+ pixel.mood = Math.max(-3,Math.min(3,pixel.mood));
+ //console.log(`Validation result: Panic set to ${pixel.panic}`);
+};
- goodPixels = {
- silver: { panicChange: 0.01, panicChangeChance: 0.1, moodChange: 0.004 },
- gold: { panicChange: 0.02, panicChangeChance: 0.15, moodChange: 0.01 },
- diamond: { panicChange: 0.03, panicChangeChance: 0.2, moodChange: 0.02 },
- }; //effectively, the difference is that good pixels don't make the human flip direction (run away);
- badPixels = {
- rotten_meat: { panicChange: 0.02, panicChangeChance: 0.15, moodChange: -0.015 },
- blood: { panicChange: 0.06, panicChangeChance: 0.2, moodChange: -0.006 },
- brain: { panicChange: 0.1, panicChangeChance: 0.3, moodChange: -0.005 },
- fire: { panicChange: 0.1, panicChangeChance: 0.1, moodChange: 0 },
- poison: { panicChange: 0.2, panicChangeChance: 0.05, moodChange: -0.01 },
- grenade: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.3 },
- bomb: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.3 },
- tnt: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: 0 },
- dynamite: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.3 },
- anti_bomb: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.3 },
- cluster_bomb: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.4 },
- landmine: { panicChange: 0.25, panicChangeChance: 0.1, moodChange: -0.3 },
- fireball: { panicChange: 0.25, panicChangeChance: 0.45, moodChange: -0.35 },
- magma: { panicChange: 0.3, panicChangeChance: 0.2, moodChange: 0 },
- plasma: { panicChange: 0.3, panicChangeChance: 0.2, moodChange: 0 },
- nuke: { panicChange: 1, panicChangeChance: 1, moodChange: -1 }, //insta-panic
- cluster_nuke: { panicChange: 1, panicChangeChance: 1, moodChange: -1 }, //insta-panic
- }; //testing
- otherPixels = ["head","body"]; //do custom code here
+goodPixels = {
+ silver: { panicChange: 0.01, panicChangeChance: 0.1, moodChange: 0.004 },
+ gold: { panicChange: 0.02, panicChangeChance: 0.15, moodChange: 0.01 },
+ diamond: { panicChange: 0.03, panicChangeChance: 0.2, moodChange: 0.02 },
+}; //effectively, the difference is that good pixels don't make the human flip direction (run away);
+badPixels = {
+ rotten_meat: { panicChange: 0.02, panicChangeChance: 0.15, moodChange: -0.015 },
+ blood: { panicChange: 0.06, panicChangeChance: 0.2, moodChange: -0.006 },
+ brain: { panicChange: 0.1, panicChangeChance: 0.3, moodChange: -0.005 },
+ fire: { panicChange: 0.1, panicChangeChance: 0.1, moodChange: 0 },
+ poison: { panicChange: 0.2, panicChangeChance: 0.05, moodChange: -0.01 },
+ grenade: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.3 },
+ bomb: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.3 },
+ tnt: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: 0 },
+ dynamite: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.3 },
+ anti_bomb: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.3 },
+ cluster_bomb: { panicChange: 0.2, panicChangeChance: 0.4, moodChange: -0.4 },
+ landmine: { panicChange: 0.25, panicChangeChance: 0.1, moodChange: -0.3 },
+ fireball: { panicChange: 0.25, panicChangeChance: 0.45, moodChange: -0.35 },
+ magma: { panicChange: 0.3, panicChangeChance: 0.2, moodChange: 0 },
+ plasma: { panicChange: 0.3, panicChangeChance: 0.2, moodChange: 0 },
+ nuke: { panicChange: 1, panicChangeChance: 1, moodChange: -1 }, //insta-panic
+ cluster_nuke: { panicChange: 1, panicChangeChance: 1, moodChange: -1 }, //insta-panic
+}; //testing
+otherPixels = ["head","body"]; //do custom code here
- var initialTransparencyArray = ["glass","water","salt_water","sugar_water","steam","oxygen","nitrogen","neon","methane","propane","anesthesia","ammonia","carbon_dioxide","helium","hydrogen","ozone","radiation","pool_water"];
- for(transparentElementIndex = 0; transparentElementIndex < initialTransparencyArray.length; transparentElementIndex++) {
- var transparentElement = initialTransparencyArray[i];
- if(typeof(elements[transparentElement]) !== "undefined") {
- elements[transparentElement].transparent = true;
- };
+var initialTransparencyArray = ["glass","water","salt_water","sugar_water","steam","oxygen","nitrogen","neon","methane","propane","anesthesia","ammonia","carbon_dioxide","helium","hydrogen","ozone","radiation","pool_water"];
+for(transparentElementIndex = 0; transparentElementIndex < initialTransparencyArray.length; transparentElementIndex++) {
+ var transparentElement = initialTransparencyArray[i];
+ if(typeof(elements[transparentElement]) !== "undefined") {
+ elements[transparentElement].transparent = true;
};
+};
- elements.body.properties = {
- dead: false,
- dir: 1,
- extremePanicStart: null,
+elements.body.properties = {
+ dead: false,
+ dir: 1,
+ extremePanicStart: null,
+};
+elements.body.tick = function(pixel) {
+ if(typeof(pixel.extremePanicStart) == "undefined") {
+ //console.log("oops");
+ pixel.extremePanicStart = null
};
- elements.body.tick = function(pixel) {
- if(typeof(pixel.extremePanicStart) == "undefined") {
- //console.log("oops");
- pixel.extremePanicStart = null
- };
- if (tryMove(pixel, pixel.x, pixel.y+1)) { // Fall
- if (!isEmpty(pixel.x, pixel.y-2, true)) { // Drag head down
- var headpixel = pixelMap[pixel.x][pixel.y-2];
- if (headpixel.element == "head") {
- if (isEmpty(pixel.x, pixel.y-1)) {
- movePixel(pixelMap[pixel.x][pixel.y-2], pixel.x, pixel.y-1);
- }
- else {
- swapPixels(pixelMap[pixel.x][pixel.y-2], pixelMap[pixel.x][pixel.y-1]);
- }
+ if (tryMove(pixel, pixel.x, pixel.y+1)) { // Fall
+ if (!isEmpty(pixel.x, pixel.y-2, true)) { // Drag head down
+ var headpixel = pixelMap[pixel.x][pixel.y-2];
+ if (headpixel.element == "head") {
+ if (isEmpty(pixel.x, pixel.y-1)) {
+ movePixel(pixelMap[pixel.x][pixel.y-2], pixel.x, pixel.y-1);
+ }
+ else {
+ swapPixels(pixelMap[pixel.x][pixel.y-2], pixelMap[pixel.x][pixel.y-1]);
}
}
}
- doHeat(pixel);
- doBurning(pixel);
- doElectricity(pixel);
- if (pixel.dead) {
- // Turn into rotten_meat if pixelTicks-dead > 500
- if (pixelTicks-pixel.dead > 200) {
- changePixel(pixel,"rotten_meat");
+ }
+ doHeat(pixel);
+ doBurning(pixel);
+ doElectricity(pixel);
+ if (pixel.dead) {
+ // Turn into rotten_meat if pixelTicks-dead > 500
+ if (pixelTicks-pixel.dead > 200) {
+ changePixel(pixel,"rotten_meat");
+ }
+ return
+ }
+
+ // Find the head
+ if (!isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "head") {
+ var head = pixelMap[pixel.x][pixel.y-1];
+ if (head.dead) { // If head is dead, kill body
+ pixel.dead = head.dead;
+ }
+ }
+ else { var head = null }
+
+ if (isEmpty(pixel.x, pixel.y-1)) {
+ // create blood if decapitated 10% chance
+ if (Math.random() < 0.1) {
+ createPixel("blood", pixel.x, pixel.y-1);
+ // set dead to true 15% chance
+ if (Math.random() < 0.15) {
+ pixel.dead = pixelTicks;
}
+ }
+ }
+ if (head == null) { return };
+
+ if (Math.random() < (0.1 + head.panic)) { // Move 10% chance, varying depending on panic value
+ var movesToTry = [
+ [1*pixel.dir,0],
+ [1*pixel.dir,-1],
+ ];
+ // While movesToTry is not empty, tryMove(pixel, x, y) with a random move, then remove it. if tryMove returns true, break.
+ while (movesToTry.length > 0) {
+ var move = movesToTry.splice(Math.floor(Math.random() * movesToTry.length), 1)[0];
+ /*
+ console.log(move);
+ console.log("Body X:", pixel.x, "to", pixel.x+move[0]);
+ console.log("Body Y:", pixel.y, "to", pixel.y+move[1]);
+ console.log("Head X:",head.x, "to", head.x+move[0]);
+ console.log("Head Y:", head.y, "to", head.y+move[1]);
+ */
+ //If head coords are empty
+ if (isEmpty(pixel.x+move[0], pixel.y+move[1]) && isEmpty(head.x+move[0], head.y+move[1])) {
+ //console.log("Head target coords are empty");
+ if (tryMove(pixel, pixel.x+move[0], pixel.y+move[1])) {
+ movePixel(head, head.x+move[0], head.y+move[1]);
+ //console.log(`Moved body to (${pixel.x},${pixel.y}) and head to (${head.x},${head.y})`);
+ //console.log(`Head-body offset (should always be [0,-1]): [${head.x-pixel.x},${head.y-pixel.y}]`)
+ break;
+ }
+ }
+ }
+ // 15% chance to change direction
+ if(!head.dirLocked) {
+ if (Math.random() < 0.15) {
+ pixel.dir *= -1;
+ //console.log("*turns around cutely to face ${pixel.dir < 0 ? 'left' : 'right'}*");
+ };
+ };
+ };
+
+ //if not flagged for extreme panic
+ //extreme panic will not be flagged in good moods, just to be nice
+ if(pixel.extremePanicStart == null && head.panic > 0.8 && head.mood <= 0) {
+ //flag extreme panic
+ pixel.extremePanicStart = pixelTicks;
+ }
+ //if flagged for extreme panic and panic is still extreme
+ else if(pixel.extremePanicStart != null && (head.panic > 0.8 && head.mood <= 0)) {
+ //if extreme panic lasts too long
+ if(pixelTicks - pixel.extremePanicStart > 350) {
+ //random chance to die from exhaustion/a heart attack/whatever
+ if(Math.random() < 0.01) {
+ pixel.dead = true;
+ };
+ };
+ }
+ //if flagged for extreme panic and extreme panic is no longer extreme
+ else if(pixel.extremePanicStart != null && (head.panic <= 0.8 || head.mood > 0)) {
+ //unflag
+ pixel.extremePanicStart = null;
+ };
+
+};
+
+elements.body.onMoveInto = function(pixel,otherPixel) {
+ var pX = pixel.x;
+ var pY = pixel.y;
+ if(!pixel.dead && hasPixel(pX,pY-1,"head")) { //if this body pixel is alive and has a head
+ var head = pixelMap[pX][pY-1];
+ var otherElement = otherPixel.element;
+ var oX = otherPixel.x;
+ var oY = otherPixel.y;
+ if(oY !== (pY - 1)) { //exclude the head above this body
+ if(otherElement === "head") { //if the pixel hitting this body is a head
+ if(hasPixel(oX,oY+1,"body")) { //if the pixel hitting this pixel has a body under it
+ var otherBody = pixelMap[oX][oY+1];
+ if(otherPixel.dead || otherBody.dead) { //if either part of that human is dead
+ head.panic += 0.08; //being hit by a dead ******* body is terrifying
+ } else {
+ if(otherPixel.panic > 0.04 && otherPixel.mood <= 0) { head.panic += 0.04 }; //living, normal, bodied heads scare only if that incoming human is already scared
+ };
+ } else { //if it's a severed head
+ if(otherPixel.dead) { //if the head is dead
+ head.panic += 0.08; //being hit by a /severed ******* head/ is terrifying
+ } else {
+ head.panic += 0.1; //being hit by a //******* severed head that's still alive// is even worse
+ };
+ };
+ } else if(otherElement === "body") { //if the pixel hitting this body is a body
+ if(hasPixel(oX,oY-1,"head")) { //if the pixel hitting this pixel has a head on it
+ var otherHead = pixelMap[oX][oY-1];
+ if(otherPixel.dead || otherHead.dead) { //if either part of that human is dead
+ head.panic += 0.06; //dead whole body case
+ } else {
+ if(otherHead.panic > 0.04) { head.panic += 0.04 }; //living, normal, bodied heads scare only if that incoming human is already scared
+ };
+ } else { //severed body case
+ if(otherPixel.dead) { //if the body is dead
+ head.panic += 0.08; //imagine being hit by a severed human without the head
+ } else {
+ head.panic += 0.1; //imagine the above but the heart is still beating
+ };
+ };
+ };
+ };
+ };
+};
+
+elements.head.properties = {
+ dead: false,
+ dirLocked: false,
+ panic: 0,
+};
+
+elements.head.tick = function(pixel) {
+ doHeat(pixel);
+ doBurning(pixel);
+ doElectricity(pixel);
+ if (pixel.dead) {
+ // Turn into rotten_meat if pixelTicks-dead > 500
+ if (pixelTicks-pixel.dead > 200) {
+ changePixel(pixel,"rotten_meat");
return
}
+ }
- // Find the head
- if (!isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "head") {
- var head = pixelMap[pixel.x][pixel.y-1];
- if (head.dead) { // If head is dead, kill body
- pixel.dead = head.dead;
+ // Find the body
+ if (!isEmpty(pixel.x, pixel.y+1, true) && pixelMap[pixel.x][pixel.y+1].element == "body") {
+ var body = pixelMap[pixel.x][pixel.y+1];
+ if (body.dead) { // If body is dead, kill head
+ pixel.dead = body.dead;
+ }
+ }
+ else { var body = null }
+
+ if (isEmpty(pixel.x, pixel.y+1)) {
+ tryMove(pixel, pixel.x, pixel.y+1);
+ // create blood if severed 10% chance
+ if (isEmpty(pixel.x, pixel.y+1) && !pixel.dead && Math.random() < 0.1) {
+ createPixel("blood", pixel.x, pixel.y+1);
+ // set dead to true 15% chance
+ if (Math.random() < 0.15) {
+ pixel.dead = pixelTicks;
}
}
- else { var head = null }
+ }
+
+ pixel.mood ??= 0;
- if (isEmpty(pixel.x, pixel.y-1)) {
- // create blood if decapitated 10% chance
- if (Math.random() < 0.1) {
- createPixel("blood", pixel.x, pixel.y-1);
- // set dead to true 15% chance
- if (Math.random() < 0.15) {
- pixel.dead = pixelTicks;
- }
- }
- }
- if (head == null) { return };
-
- if (Math.random() < (0.1 + head.panic)) { // Move 10% chance, varying depending on panic value
- var movesToTry = [
- [1*pixel.dir,0],
- [1*pixel.dir,-1],
- ];
- // While movesToTry is not empty, tryMove(pixel, x, y) with a random move, then remove it. if tryMove returns true, break.
- while (movesToTry.length > 0) {
- var move = movesToTry.splice(Math.floor(Math.random() * movesToTry.length), 1)[0];
- /*
- console.log(move);
- console.log("Body X:", pixel.x, "to", pixel.x+move[0]);
- console.log("Body Y:", pixel.y, "to", pixel.y+move[1]);
- console.log("Head X:",head.x, "to", head.x+move[0]);
- console.log("Head Y:", head.y, "to", head.y+move[1]);
- */
- //If head coords are empty
- if (isEmpty(pixel.x+move[0], pixel.y+move[1]) && isEmpty(head.x+move[0], head.y+move[1])) {
- //console.log("Head target coords are empty");
- if (tryMove(pixel, pixel.x+move[0], pixel.y+move[1])) {
- movePixel(head, head.x+move[0], head.y+move[1]);
- //console.log(`Moved body to (${pixel.x},${pixel.y}) and head to (${head.x},${head.y})`);
- //console.log(`Head-body offset (should always be [0,-1]): [${head.x-pixel.x},${head.y-pixel.y}]`)
- break;
- }
- }
- }
- // 15% chance to change direction
- if(!head.dirLocked) {
- if (Math.random() < 0.15) {
- pixel.dir *= -1;
- //console.log("*turns around cutely to face ${pixel.dir < 0 ? 'left' : 'right'}*");
- };
- };
- };
-
- //if not flagged for extreme panic
- //extreme panic will not be flagged in good moods, just to be nice
- if(pixel.extremePanicStart == null && head.panic > 0.8 && head.mood <= 0) {
- //flag extreme panic
- pixel.extremePanicStart = pixelTicks;
- }
- //if flagged for extreme panic and panic is still extreme
- else if(pixel.extremePanicStart != null && (head.panic > 0.8 && head.mood <= 0)) {
- //if extreme panic lasts too long
- if(pixelTicks - pixel.extremePanicStart > 350) {
- //random chance to die from exhaustion/a heart attack/whatever
- if(Math.random() < 0.01) {
- pixel.dead = true;
- };
- };
- }
- //if flagged for extreme panic and extreme panic is no longer extreme
- else if(pixel.extremePanicStart != null && (head.panic <= 0.8 || head.mood > 0)) {
- //unflag
- pixel.extremePanicStart = null;
- };
-
- };
-
- elements.body.onTryMoveInto = function(pixel,otherPixel) {
+ if((pixelTicks-pixel.start) % 5 === 0) {
+ //Vision loop
var pX = pixel.x;
var pY = pixel.y;
- if(!pixel.dead && hasPixel(pX,pY-1,"head")) { //if this body pixel is alive and has a head
- var head = pixelMap[pX][pY-1];
- var otherElement = otherPixel.element;
- var oX = otherPixel.x;
- var oY = otherPixel.y;
- if(oY !== (pY - 1)) { //exclude the head above this body
- if(otherElement === "head") { //if the pixel hitting this body is a head
- if(hasPixel(oX,oY+1,"body")) { //if the pixel hitting this pixel has a body under it
- var otherBody = pixelMap[oX][oY+1];
- if(otherPixel.dead || otherBody.dead) { //if either part of that human is dead
- head.panic += 0.08; //being hit by a dead ******* body is terrifying
- } else {
- if(otherPixel.panic > 0.04 && otherPixel.mood <= 0) { head.panic += 0.04 }; //living, normal, bodied heads scare only if that incoming human is already scared
- };
- } else { //if it's a severed head
- if(otherPixel.dead) { //if the head is dead
- head.panic += 0.08; //being hit by a /severed ******* head/ is terrifying
- } else {
- head.panic += 0.1; //being hit by a //******* severed head that's still alive// is even worse
- };
+ if(pixel.dir === -1) {
+ for(i = -4; i < 4+1; i++) {
+ var oY = i;
+ //console.log(`Starting row look at row ${pY+oY}`)
+ for(j = (-1); j > (-16 - 1); j--) {
+ var oX = j;
+ var nX = pX+oX;
+ var nY = pY+oY;
+ if(outOfBounds(nX,nY)) {
+ //console.log(`Stopping row look at pixel (${nX},${nY}) due to OoB`)
+ break;
};
- } else if(otherElement === "body") { //if the pixel hitting this body is a body
- if(hasPixel(oX,oY-1,"head")) { //if the pixel hitting this pixel has a head on it
- var otherHead = pixelMap[oX][oY-1];
- if(otherPixel.dead || otherHead.dead) { //if either part of that human is dead
- head.panic += 0.06; //dead whole body case
- } else {
- if(otherHead.panic > 0.04) { head.panic += 0.04 }; //living, normal, bodied heads scare only if that incoming human is already scared
- };
- } else { //severed body case
- if(otherPixel.dead) { //if the body is dead
- head.panic += 0.08; //imagine being hit by a severed human without the head
- } else {
- head.panic += 0.1; //imagine the above but the heart is still beating
- };
+ if(isEmpty(nX,nY)) {
+ //console.log(`Skipping pixel (${nX},${nY}) (empty)`)
+ continue;
};
- };
- };
- };
- };
-
- elements.head.properties = {
- dead: false,
- dirLocked: false,
- panic: 0,
- };
-
- elements.head.tick = function(pixel) {
- doHeat(pixel);
- doBurning(pixel);
- doElectricity(pixel);
- if (pixel.dead) {
- // Turn into rotten_meat if pixelTicks-dead > 500
- if (pixelTicks-pixel.dead > 200) {
- changePixel(pixel,"rotten_meat");
- return
- }
- }
-
- // Find the body
- if (!isEmpty(pixel.x, pixel.y+1, true) && pixelMap[pixel.x][pixel.y+1].element == "body") {
- var body = pixelMap[pixel.x][pixel.y+1];
- if (body.dead) { // If body is dead, kill head
- pixel.dead = body.dead;
- }
- }
- else { var body = null }
-
- if (isEmpty(pixel.x, pixel.y+1)) {
- tryMove(pixel, pixel.x, pixel.y+1);
- // create blood if severed 10% chance
- if (isEmpty(pixel.x, pixel.y+1) && !pixel.dead && Math.random() < 0.1) {
- createPixel("blood", pixel.x, pixel.y+1);
- // set dead to true 15% chance
- if (Math.random() < 0.15) {
- pixel.dead = pixelTicks;
- }
- }
- }
-
- pixel.mood ??= 0;
-
- if((pixelTicks-pixel.start) % 5 === 0) {
- //Vision loop
- var pX = pixel.x;
- var pY = pixel.y;
- if(pixel.dir === -1) {
- for(i = -4; i < 4+1; i++) {
- var oY = i;
- //console.log(`Starting row look at row ${pY+oY}`)
- for(j = (-1); j > (-16 - 1); j--) {
- var oX = j;
- var nX = pX+oX;
- var nY = pY+oY;
- if(outOfBounds(nX,nY)) {
- //console.log(`Stopping row look at pixel (${nX},${nY}) due to OoB`)
- break;
- };
- if(isEmpty(nX,nY)) {
- //console.log(`Skipping pixel (${nX},${nY}) (empty)`)
- continue;
- };
- if(!isEmpty(nX,nY,true)) {
- var newPixel = pixelMap[nX][nY];
- var newElement = newPixel.element;
- if(Object.keys(goodPixels).includes(newElement)) {
- //no dir flip
- if(Math.random() > goodPixels[newElement].panicChangeChance) {
- pixel.panic += goodPixels[newElement].panicChange;
- pixel.mood += goodPixels[newElement].moodChange; //like if there was a pretty painting item, it would make you feel better but you wouldn't necessarily feel the need to run towards it
- };
- pixel.dirLocked = true;
- } else if(Object.keys(badPixels).includes(newElement)) {
- body.dir = 1; //flip dir
- if(Math.random() > badPixels[newElement].panicChangeChance) {
- pixel.panic += badPixels[newElement].panicChange;
- pixel.mood += badPixels[newElement].moodChange;
- };
- pixel.dirLocked = true;
- }; //good and bad should be mutually exclusive; good will be evaulated first because one inevitably has to be considered first
- if(otherPixels.includes(newElement)) {
- //specific custom code
- if(newElement === "head") {
- if(hasPixel(nX,nY+1,"body")) {
- var newBody = pixelMap[nX][nY+1];
- if(newPixel.dead || newBody.dead) {
- pixel.panic += 0.02; //if it's seeing a whole human, it's likely to see the dead head and the dead body, thus double-executing
- //it would be nice if there was a way to avoid double/multiple detection of the same human
- if(hasPixel(pX,pY+1,"body")) { //mix error-proofing
- var body = pixelMap[pX][pY+1];
- body.dir = 1; //run away
- };
- } else {
- if(newPixel.panic > 0.04) {
- if(newPixel.panic > 0.8) {
- pixel.panic += 0.015; //it will add up
- } else if(newPixel.panic > 0.6) {
- pixel.panic += 0.012;
- } else if(newPixel.panic > 0.4) {
- pixel.panic += 0.009;
- } else if(newPixel.panic > 0.2) {
- pixel.panic += 0.006;
- } else {
- pixel.panic += 0.003;
- };
-
- //the vision loop is in the head, and this is in the "seeing head" case, then this will happen when the head sees another head, and heads store panic; this is in the "other head" is panicking case so this will ultimately be the code that runs when its human sees another human panicking
- if(Math.random() < 0.5) {
- //run in same direction as panicking person
- pixel.dir = newPixel.dir
- };
- };
- };
- } else { //severed head
- newPixel.dead ? pixel.panic += 0.03 : pixel.panic += 0.04;
- if(hasPixel(pX,pY+1,"body")) {
- var body = pixelMap[pX][pY+1];
- body.dir = 1; //run away
- };
- };
- } else if(newElement === "body") {
- if(hasPixel(nX,nY-1,"head")) {
- var newHead = pixelMap[nX][nY-1];
- if(newPixel.dead || newHead.dead) {
- pixel.panic += 0.02;
- if(hasPixel(pX,pY+1,"body")) {
- var body = pixelMap[pX][pY+1];
- body.dir = 1; //run away
- };
- } else {
- if(newHead.panic > 0.04) {
- if(newHead.panic > 0.8) {
- pixel.panic += 0.014; //it will add up
- } else if(newHead.panic > 0.6) {
- pixel.panic += 0.011;
- } else if(newHead.panic > 0.4) {
- pixel.panic += 0.008;
- } else if(newHead.panic > 0.2) {
- pixel.panic += 0.005;
- } else {
- pixel.panic += 0.002;
- };
- };
- };
- } else { //severed body
- newPixel.dead ? pixel.panic += 0.025 : pixel.panic += 0.035;
+ if(!isEmpty(nX,nY,true)) {
+ var newPixel = pixelMap[nX][nY];
+ var newElement = newPixel.element;
+ if(Object.keys(goodPixels).includes(newElement)) {
+ //no dir flip
+ if(Math.random() > goodPixels[newElement].panicChangeChance) {
+ pixel.panic += goodPixels[newElement].panicChange;
+ pixel.mood += goodPixels[newElement].moodChange; //like if there was a pretty painting item, it would make you feel better but you wouldn't necessarily feel the need to run towards it
+ };
+ pixel.dirLocked = true;
+ } else if(Object.keys(badPixels).includes(newElement)) {
+ body.dir = 1; //flip dir
+ if(Math.random() > badPixels[newElement].panicChangeChance) {
+ pixel.panic += badPixels[newElement].panicChange;
+ pixel.mood += badPixels[newElement].moodChange;
+ };
+ pixel.dirLocked = true;
+ }; //good and bad should be mutually exclusive; good will be evaulated first because one inevitably has to be considered first
+ if(otherPixels.includes(newElement)) {
+ //specific custom code
+ if(newElement === "head") {
+ if(hasPixel(nX,nY+1,"body")) {
+ var newBody = pixelMap[nX][nY+1];
+ if(newPixel.dead || newBody.dead) {
+ pixel.panic += 0.02; //if it's seeing a whole human, it's likely to see the dead head and the dead body, thus double-executing
+ //it would be nice if there was a way to avoid double/multiple detection of the same human
if(hasPixel(pX,pY+1,"body")) { //mix error-proofing
var body = pixelMap[pX][pY+1];
body.dir = 1; //run away
};
- };
- };
- };
- //code outside of those three if blocks will be applied to pixels of all elements
- if(!elements[newElement].transparent) {
- break; //can't see through humans
- };
- };
- };
- };
- } else if(pixel.dir === 1) {
- for(i = -4; i < 4+1; i++) {
- var oY = i;
- //console.log(`Starting row look at row ${pY+oY}`)
- for(j = 1; j < 16 + 1; j++) {
- var oX = j;
- var nX = pX+oX;
- var nY = pY+oY;
- if(outOfBounds(nX,nY)) {
- //console.log(`Stopping row look at pixel (${nX},${nY}) due to OoB`)
- break;
- };
- if(isEmpty(nX,nY)) {
- //console.log(`Skipping pixel (${nX},${nY}) (empty)`)
- continue;
- };
- if(!isEmpty(nX,nY,true)) {
- var newPixel = pixelMap[nX][nY];
- var newElement = newPixel.element;
- if(Object.keys(goodPixels).includes(newElement)) {
- //no dir flip
- if(Math.random() > goodPixels[newElement].panicChangeChance) {
- pixel.panic += goodPixels[newElement].panicChange;
- pixel.mood += goodPixels[newElement].moodChange;
- };
- pixel.dirLocked = true;
- } else if(Object.keys(badPixels).includes(newElement)) {
- if(hasPixel(pX,pY+1,"body")) {
- var body = pixelMap[pX][pY+1];
- body.dir = -1; //run away
- };
- if(Math.random() > badPixels[newElement].panicChangeChance) {
- pixel.panic += badPixels[newElement].panicChange;
- pixel.mood += badPixels[newElement].moodChange;
- };
- pixel.dirLocked = true;
- }; //good and bad should be mutually exclusive; good will be evaulated first because one inevitably has to be considered first
- if(otherPixels.includes(newElement)) {
- if(newElement === "head") {
- if(hasPixel(nX,nY+1,"body")) {
- var newBody = pixelMap[nX][nY+1];
- if(newPixel.dead || newBody.dead) {
- pixel.panic += 0.02; //if it's seeing a whole human, it's likely to see the dead head and the dead body, thus double-executing
- //it would be nice if there was a way to avoid double/multiple detection of the same human
- if(hasPixel(pX,pY+1,"body")) {
- var body = pixelMap[pX][pY+1];
- body.dir = -1; //run away
+ } else {
+ if(newPixel.panic > 0.04) {
+ if(newPixel.panic > 0.8) {
+ pixel.panic += 0.015; //it will add up
+ } else if(newPixel.panic > 0.6) {
+ pixel.panic += 0.012;
+ } else if(newPixel.panic > 0.4) {
+ pixel.panic += 0.009;
+ } else if(newPixel.panic > 0.2) {
+ pixel.panic += 0.006;
+ } else {
+ pixel.panic += 0.003;
};
- } else {
- if(newPixel.panic > 0.04) {
- if(newPixel.panic > 0.8) {
- pixel.panic += 0.015; //it will add up
- } else if(newPixel.panic > 0.6) {
- pixel.panic += 0.012;
- } else if(newPixel.panic > 0.4) {
- pixel.panic += 0.009;
- } else if(newPixel.panic > 0.2) {
- pixel.panic += 0.006;
- } else {
- pixel.panic += 0.003;
- };
+
+ //the vision loop is in the head, and this is in the "seeing head" case, then this will happen when the head sees another head, and heads store panic; this is in the "other head" is panicking case so this will ultimately be the code that runs when its human sees another human panicking
+ if(Math.random() < 0.5) {
+ //run in same direction as panicking person
+ pixel.dir = newPixel.dir
};
};
- } else { //severed head
- newPixel.dead ? pixel.panic += 0.03 : pixel.panic += 0.04;
+ };
+ } else { //severed head
+ newPixel.dead ? pixel.panic += 0.03 : pixel.panic += 0.04;
+ if(hasPixel(pX,pY+1,"body")) {
+ var body = pixelMap[pX][pY+1];
+ body.dir = 1; //run away
+ };
+ };
+ } else if(newElement === "body") {
+ if(hasPixel(nX,nY-1,"head")) {
+ var newHead = pixelMap[nX][nY-1];
+ if(newPixel.dead || newHead.dead) {
+ pixel.panic += 0.02;
if(hasPixel(pX,pY+1,"body")) {
var body = pixelMap[pX][pY+1];
- body.dir = -1; //run away
+ body.dir = 1; //run away
+ };
+ } else {
+ if(newHead.panic > 0.04) {
+ if(newHead.panic > 0.8) {
+ pixel.panic += 0.014; //it will add up
+ } else if(newHead.panic > 0.6) {
+ pixel.panic += 0.011;
+ } else if(newHead.panic > 0.4) {
+ pixel.panic += 0.008;
+ } else if(newHead.panic > 0.2) {
+ pixel.panic += 0.005;
+ } else {
+ pixel.panic += 0.002;
+ };
};
};
- } else if(newElement === "body") {
- if(hasPixel(nX,nY-1,"head")) {
- var newHead = pixelMap[nX][nY-1];
- if(newPixel.dead || newHead.dead) {
- pixel.panic += 0.02;
- if(hasPixel(pX,pY+1,"body")) {
- var body = pixelMap[pX][pY+1];
- body.dir = -1; //run away
- };
- } else {
- if(newHead.panic > 0.04) {
- if(newHead.panic > 0.8) {
- pixel.panic += 0.014; //it will add up
- } else if(newHead.panic > 0.6) {
- pixel.panic += 0.011;
- } else if(newHead.panic > 0.4) {
- pixel.panic += 0.008;
- } else if(newHead.panic > 0.2) {
- pixel.panic += 0.005;
- } else {
- pixel.panic += 0.002;
- };
- };
- };
- } else { //severed body
- newPixel.dead ? pixel.panic += 0.025 : pixel.panic += 0.035;
- if(hasPixel(pX,pY+1,"body")) {
- var body = pixelMap[pX][pY+1];
- body.dir = -1; //run away
- };
+ } else { //severed body
+ newPixel.dead ? pixel.panic += 0.025 : pixel.panic += 0.035;
+ if(hasPixel(pX,pY+1,"body")) { //mix error-proofing
+ var body = pixelMap[pX][pY+1];
+ body.dir = 1; //run away
};
};
};
- //code outside of those three if blocks will be applied to pixels of all elements
- if(!elements[newElement].transparent) {
- break; //can't see through humans
- };
+ };
+ //code outside of those three if blocks will be applied to pixels of all elements
+ if(!elements[newElement].transparent) {
+ break; //can't see through humans
};
};
};
};
- };
-
- validatePanic(pixel);
-
- if(Math.random() < 0.01) { //1% chance each tick to lose interest
- pixel.dirLocked = false;
- //console.log("Meh.");
- };
-
- if(Math.random() < ((pixel.panic) > 0.8 ? 0.04 : 0.02)) { //2% chance each tick to decrease panic (4% if the panic is extreme)
- //console.log("Decreasing panic");
- pixel.panic < 0.05 ? pixel.panic = 0 : pixel.panic -= 0.05;
- };
-
- };
- elements.head.breakInto = ["bone","brain","brain","cerebrospinal_fluid","blood","blood","meat"];
-
- elements.head.onTryMoveInto = function(pixel,otherPixel) {
- var pX = pixel.x;
- var pY = pixel.y;
- if(!pixel.dead) {
- var otherElement = otherPixel.element;
- var oX = otherPixel.x;
- var oY = otherPixel.y;
- if(oY !== (pY + 1)) { //exclude the body under this head
- if(otherElement === "head") { //if the pixel hitting this head is also a head
- //console.log("head.onTryMoveInto: Head has tried to move into head");
- if(hasPixel(oX,oY+1,"body")) { //if the pixel hitting this pixel has a body under it
- var otherBody = pixelMap[oX][oY+1];
- if(otherPixel.dead || otherBody.dead) { //if either part of that human is dead
- pixel.panic += 0.08; //being hit by a dead ******* body is terrifying
- //console.log("head.onTryMoveInto: panic increase, case: head hit by dead whole body (head's code branch)");
- } else {
- //if(otherPixel.panic > 0.04) { pixel.panic += 0.04; console.log("head.onTryMoveInto: panic increase, case: head hit by panicked whole body (head's code branch)"); }; //living, normal, headed bodies scare only if that incoming human is already scared
- };
- } else { //if it's a severed head
- if(otherPixel.dead) { //if the head is dead
- pixel.panic += 0.08; //being hit by a /severed ******* head/ is terrifying
- //console.log("head.onTryMoveInto: panic increase, case: head hit by dead severed head");
- } else {
- pixel.panic += 0.1; //being hit by a //******* severed head that's still alive// is even worse
- //console.log("head.onTryMoveInto: panic increase, case: head hit by living severed head");
- };
+ } else if(pixel.dir === 1) {
+ for(i = -4; i < 4+1; i++) {
+ var oY = i;
+ //console.log(`Starting row look at row ${pY+oY}`)
+ for(j = 1; j < 16 + 1; j++) {
+ var oX = j;
+ var nX = pX+oX;
+ var nY = pY+oY;
+ if(outOfBounds(nX,nY)) {
+ //console.log(`Stopping row look at pixel (${nX},${nY}) due to OoB`)
+ break;
};
- } else if(otherElement === "body") { //if the pixel hitting this head is a body
- if(hasPixel(oX,oY-1,"head")) { //if the body hitting this pixel has a head on it
- var otherHead = pixelMap[oX][oY-1];
- if(otherPixel.dead || otherHead.dead) { //if either part of that human is dead
- pixel.panic += 0.03; //dead whole body case
- //console.log("head.onTryMoveInto: panic increase, case: head hit by dead whole body (body's code branch)");
- } else {
- if(otherHead.panic > 0.04) {
- pixel.panic += 0.03;
- //console.log("head.onTryMoveInto: panic increase, case: head crushed by panicked whole body (body's code branch)");
- } else {
- pixel.panic += 0.02;
- //console.log("head.onTryMoveInto: panic increase, case: head crushed by whole body (body's code branch)");
+ if(isEmpty(nX,nY)) {
+ //console.log(`Skipping pixel (${nX},${nY}) (empty)`)
+ continue;
+ };
+ if(!isEmpty(nX,nY,true)) {
+ var newPixel = pixelMap[nX][nY];
+ var newElement = newPixel.element;
+ if(Object.keys(goodPixels).includes(newElement)) {
+ //no dir flip
+ if(Math.random() > goodPixels[newElement].panicChangeChance) {
+ pixel.panic += goodPixels[newElement].panicChange;
+ pixel.mood += goodPixels[newElement].moodChange;
};
- };
- } else { //severed body case
- if(otherPixel.dead) { //if the body is dead
- pixel.panic += 0.04; //imagine being hit by a severed human without the head
- //console.log("head.onTryMoveInto: panic increase, case: head hit by dead severed body");
- } else {
- pixel.panic += 0.05; //imagine the above but the heart is still beating
- //console.log("head.onTryMoveInto: panic increase, case: head hit by living severed body");
- };
- };
- } else {
- if(oX === pX && oY === pY-1) {
- var otherInfo = elements[otherElement];
- var otherState; typeof(otherInfo.state) === "undefined" ? otherState = null : otherState = otherInfo.state;
- var otherDensity = typeof(otherInfo.density) === "undefined" ? otherDensity = null : otherDensity = otherInfo.density;
- if(otherState === "solid") {
- if(otherDensity > 5000) {
- var chance = (0.1 + (otherDensity/50000)) / 5;
- if(Math.random() < chance) {
- breakPixel(pixel);
+ pixel.dirLocked = true;
+ } else if(Object.keys(badPixels).includes(newElement)) {
+ if(hasPixel(pX,pY+1,"body")) {
+ var body = pixelMap[pX][pY+1];
+ body.dir = -1; //run away
+ };
+ if(Math.random() > badPixels[newElement].panicChangeChance) {
+ pixel.panic += badPixels[newElement].panicChange;
+ pixel.mood += badPixels[newElement].moodChange;
+ };
+ pixel.dirLocked = true;
+ }; //good and bad should be mutually exclusive; good will be evaulated first because one inevitably has to be considered first
+ if(otherPixels.includes(newElement)) {
+ if(newElement === "head") {
+ if(hasPixel(nX,nY+1,"body")) {
+ var newBody = pixelMap[nX][nY+1];
+ if(newPixel.dead || newBody.dead) {
+ pixel.panic += 0.02; //if it's seeing a whole human, it's likely to see the dead head and the dead body, thus double-executing
+ //it would be nice if there was a way to avoid double/multiple detection of the same human
+ if(hasPixel(pX,pY+1,"body")) {
+ var body = pixelMap[pX][pY+1];
+ body.dir = -1; //run away
+ };
+ } else {
+ if(newPixel.panic > 0.04) {
+ if(newPixel.panic > 0.8) {
+ pixel.panic += 0.015; //it will add up
+ } else if(newPixel.panic > 0.6) {
+ pixel.panic += 0.012;
+ } else if(newPixel.panic > 0.4) {
+ pixel.panic += 0.009;
+ } else if(newPixel.panic > 0.2) {
+ pixel.panic += 0.006;
+ } else {
+ pixel.panic += 0.003;
+ };
+ };
+ };
+ } else { //severed head
+ newPixel.dead ? pixel.panic += 0.03 : pixel.panic += 0.04;
+ if(hasPixel(pX,pY+1,"body")) {
+ var body = pixelMap[pX][pY+1];
+ body.dir = -1; //run away
+ };
+ };
+ } else if(newElement === "body") {
+ if(hasPixel(nX,nY-1,"head")) {
+ var newHead = pixelMap[nX][nY-1];
+ if(newPixel.dead || newHead.dead) {
+ pixel.panic += 0.02;
+ if(hasPixel(pX,pY+1,"body")) {
+ var body = pixelMap[pX][pY+1];
+ body.dir = -1; //run away
+ };
+ } else {
+ if(newHead.panic > 0.04) {
+ if(newHead.panic > 0.8) {
+ pixel.panic += 0.014; //it will add up
+ } else if(newHead.panic > 0.6) {
+ pixel.panic += 0.011;
+ } else if(newHead.panic > 0.4) {
+ pixel.panic += 0.008;
+ } else if(newHead.panic > 0.2) {
+ pixel.panic += 0.005;
+ } else {
+ pixel.panic += 0.002;
+ };
+ };
+ };
+ } else { //severed body
+ newPixel.dead ? pixel.panic += 0.025 : pixel.panic += 0.035;
+ if(hasPixel(pX,pY+1,"body")) {
+ var body = pixelMap[pX][pY+1];
+ body.dir = -1; //run away
+ };
};
- } else if(otherDensity >= 500) {
- pixel.panic += (0.01 * (otherDensity / 500));
- } else if(otherDensity >= 100) {
- pixel.panic += (0.001 * (otherDensity / 100));
};
};
+ //code outside of those three if blocks will be applied to pixels of all elements
+ if(!elements[newElement].transparent) {
+ break; //can't see through humans
+ };
};
};
};
};
};
- //Worldgen preset for testing
+ validatePanic(pixel);
- worldgentypes.basalt_dirt = {
- layers: [
- [0, "basalt", 0.05],
- [0, "dirt"]
- ]
+ if(Math.random() < 0.01) { //1% chance each tick to lose interest
+ pixel.dirLocked = false;
+ //console.log("Meh.");
};
- kep1er = [
- ["first_impact", ["#664482","#cf4ba3","#c15ca9","#f0a669"]],
- ["doublast", ["#2b98fd","#d0e26d","#e6f049","#dce4b3"]],
- ["fly-up", ["#f2f2f2","#15a667","#de0180"]],
- ["troubleshooter", ["#291923","#ed3fb6","#fee6f8","#64c5e0","#d6cdca","#330d25"]],
- ["fly-by", ["#e7e6dd","#fcf0ef","#efa1ba","#8d7cb6","#5e74ba","#2b5db5","#e292b7"]],
- ["lovestruck", ["#bfd9f0","#bfd9f0","#fef792","#c36475","#edd1d6"]],
- ];
-
- for(index in kep1er) {
- index = parseInt(index);
- var newName = kep1er[index][0];
- var newColor = kep1er[index][1];
- var newDisplayName = newName.replaceAll("_"," ").replaceAll("-"," - ").split(" ").map(x => x.substring(0,1).toUpperCase() + x.substring(1)).join(" ").replace(" - ","-");
- elements[newName] = {
- name: newDisplayName,
- color: newColor,
- tempHigh: 200,
- stateHigh: ["ash","molten_plastic"],
- density: 332, //based off of First Impact: https://www.amazon.com/Kep1er-IMPACT-Contents-Tracking-Connect/dp/B09MQMNZ62
- tick: function(pixel) {
- if(!(tryMove(pixel,pixel.x,pixel.y+1))) {
- var directions = [];
- if(isEmpty(pixel.x-1,pixel.y+1) && isEmpty(pixel.x-1,pixel.y+2)) {
- directions.push(-1)
- };
- if(isEmpty(pixel.x+1,pixel.y+1) && isEmpty(pixel.x+1,pixel.y+2)) {
- directions.push(1)
- };
- if(directions.length > 0) {
- tryMove(pixel,pixel.x+directions[Math.floor(Math.random() * directions.length)],pixel.y)
- };
- }
- },
- reactions: {
- water: { elem1: ["plastic","cellulose","cellulose"], elem2: ["water","water","cellulose",null,null], chance: 0.8 }
- },
- burn: 40,
- burnTime: 150,
- burnInto: ["ash","molten_plastic","carbon_dioxide","smoke"],
- category: "other"
- };
-
- goodPixels[newName] = { panicChange: 0.01, panicChangeChance: 0.2, moodChange: 0.035 };
+ if(Math.random() < ((pixel.panic) > 0.8 ? 0.04 : 0.02)) { //2% chance each tick to decrease panic (4% if the panic is extreme)
+ //console.log("Decreasing panic");
+ pixel.panic < 0.05 ? pixel.panic = 0 : pixel.panic -= 0.05;
};
-
-} else {
- enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The ${onTryMoveIntoMod} mod is required and has been automatically inserted (reload for this to take effect).`)
+
+};
+elements.head.breakInto = ["bone","brain","brain","cerebrospinal_fluid","blood","blood","meat"];
+
+elements.head.onMoveInto = function(pixel,otherPixel) {
+ var pX = pixel.x;
+ var pY = pixel.y;
+ if(!pixel.dead) {
+ var otherElement = otherPixel.element;
+ var oX = otherPixel.x;
+ var oY = otherPixel.y;
+ if(oY !== (pY + 1)) { //exclude the body under this head
+ if(otherElement === "head") { //if the pixel hitting this head is also a head
+ //console.log("head.onMoveInto: Head has tried to move into head");
+ if(hasPixel(oX,oY+1,"body")) { //if the pixel hitting this pixel has a body under it
+ var otherBody = pixelMap[oX][oY+1];
+ if(otherPixel.dead || otherBody.dead) { //if either part of that human is dead
+ pixel.panic += 0.08; //being hit by a dead ******* body is terrifying
+ //console.log("head.onMoveInto: panic increase, case: head hit by dead whole body (head's code branch)");
+ } else {
+ //if(otherPixel.panic > 0.04) { pixel.panic += 0.04; console.log("head.onMoveInto: panic increase, case: head hit by panicked whole body (head's code branch)"); }; //living, normal, headed bodies scare only if that incoming human is already scared
+ };
+ } else { //if it's a severed head
+ if(otherPixel.dead) { //if the head is dead
+ pixel.panic += 0.08; //being hit by a /severed ******* head/ is terrifying
+ //console.log("head.onMoveInto: panic increase, case: head hit by dead severed head");
+ } else {
+ pixel.panic += 0.1; //being hit by a //******* severed head that's still alive// is even worse
+ //console.log("head.onMoveInto: panic increase, case: head hit by living severed head");
+ };
+ };
+ } else if(otherElement === "body") { //if the pixel hitting this head is a body
+ if(hasPixel(oX,oY-1,"head")) { //if the body hitting this pixel has a head on it
+ var otherHead = pixelMap[oX][oY-1];
+ if(otherPixel.dead || otherHead.dead) { //if either part of that human is dead
+ pixel.panic += 0.03; //dead whole body case
+ //console.log("head.onMoveInto: panic increase, case: head hit by dead whole body (body's code branch)");
+ } else {
+ if(otherHead.panic > 0.04) {
+ pixel.panic += 0.03;
+ //console.log("head.onMoveInto: panic increase, case: head crushed by panicked whole body (body's code branch)");
+ } else {
+ pixel.panic += 0.02;
+ //console.log("head.onMoveInto: panic increase, case: head crushed by whole body (body's code branch)");
+ };
+ };
+ } else { //severed body case
+ if(otherPixel.dead) { //if the body is dead
+ pixel.panic += 0.04; //imagine being hit by a severed human without the head
+ //console.log("head.onMoveInto: panic increase, case: head hit by dead severed body");
+ } else {
+ pixel.panic += 0.05; //imagine the above but the heart is still beating
+ //console.log("head.onMoveInto: panic increase, case: head hit by living severed body");
+ };
+ };
+ } else {
+ if(oX === pX && oY === pY-1) {
+ var otherInfo = elements[otherElement];
+ var otherState; typeof(otherInfo.state) === "undefined" ? otherState = null : otherState = otherInfo.state;
+ var otherDensity = typeof(otherInfo.density) === "undefined" ? otherDensity = null : otherDensity = otherInfo.density;
+ if(otherState === "solid") {
+ if(otherDensity > 5000) {
+ var chance = (0.1 + (otherDensity/50000)) / 5;
+ if(Math.random() < chance) {
+ breakPixel(pixel);
+ };
+ } else if(otherDensity >= 500) {
+ pixel.panic += (0.01 * (otherDensity / 500));
+ } else if(otherDensity >= 100) {
+ pixel.panic += (0.001 * (otherDensity / 100));
+ };
+ };
+ };
+ };
+ };
+ };
+};
+
+//Worldgen preset for testing
+
+worldgentypes.basalt_dirt = {
+ layers: [
+ [0, "basalt", 0.05],
+ [0, "dirt"]
+ ]
+};
+
+kep1er = [
+ ["first_impact", ["#664482","#cf4ba3","#c15ca9","#f0a669"]],
+ ["doublast", ["#2b98fd","#d0e26d","#e6f049","#dce4b3"]],
+ ["fly-up", ["#f2f2f2","#15a667","#de0180"]],
+ ["troubleshooter", ["#291923","#ed3fb6","#fee6f8","#64c5e0","#d6cdca","#330d25"]],
+ ["fly-by", ["#e7e6dd","#fcf0ef","#efa1ba","#8d7cb6","#5e74ba","#2b5db5","#e292b7"]],
+ ["lovestruck", ["#bfd9f0","#bfd9f0","#fef792","#c36475","#edd1d6"]],
+];
+
+for(index in kep1er) {
+ index = parseInt(index);
+ var newName = kep1er[index][0];
+ var newColor = kep1er[index][1];
+ var newDisplayName = newName.replaceAll("_"," ").replaceAll("-"," - ").split(" ").map(x => x.substring(0,1).toUpperCase() + x.substring(1)).join(" ").replace(" - ","-");
+ elements[newName] = {
+ name: newDisplayName,
+ color: newColor,
+ tempHigh: 200,
+ stateHigh: ["ash","molten_plastic"],
+ density: 332, //based off of First Impact: https://www.amazon.com/Kep1er-IMPACT-Contents-Tracking-Connect/dp/B09MQMNZ62
+ tick: function(pixel) {
+ if(!(tryMove(pixel,pixel.x,pixel.y+1))) {
+ var directions = [];
+ if(isEmpty(pixel.x-1,pixel.y+1) && isEmpty(pixel.x-1,pixel.y+2)) {
+ directions.push(-1)
+ };
+ if(isEmpty(pixel.x+1,pixel.y+1) && isEmpty(pixel.x+1,pixel.y+2)) {
+ directions.push(1)
+ };
+ if(directions.length > 0) {
+ tryMove(pixel,pixel.x+directions[Math.floor(Math.random() * directions.length)],pixel.y)
+ };
+ }
+ },
+ reactions: {
+ water: { elem1: ["plastic","cellulose","cellulose"], elem2: ["water","water","cellulose",null,null], chance: 0.8 }
+ },
+ burn: 40,
+ burnTime: 150,
+ burnInto: ["ash","molten_plastic","carbon_dioxide","smoke"],
+ category: "other"
+ };
+
+ goodPixels[newName] = { panicChange: 0.01, panicChangeChance: 0.2, moodChange: 0.035 };
};
diff --git a/mods/life_eater.js b/mods/life_eater.js
index 0ca0d1b1..7b7fd185 100644
--- a/mods/life_eater.js
+++ b/mods/life_eater.js
@@ -1,11 +1,7 @@
var modName = "mods/life_eater.js";
var fireMod = "mods/fire_mod.js";
-if(!enabledMods.includes(fireMod)) {
- enabledMods.splice(enabledMods.indexOf(modName),0,fireMod);
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The ${fireMod} mod is required and has been automatically inserted (reload for this to take effect).`);
-} else {
+dependOn("fire_mod.js", function() {
var lifeEaterCategories = ["life","auto creepers","food","fantastic creatures","fey","auto_fey"];
var lifeEaterBlacklist = ["life_eater_virus","life_eater_slurry","life_eater_infected_dirt"];
@@ -166,4 +162,4 @@ if(!enabledMods.includes(fireMod)) {
stateHigh: elements.metal_scrap.stateHigh.concat("life_eater_virus","life_eater_virus","life_eater_virus"),
};
-}
+}, true);
diff --git a/mods/metals.js b/mods/metals.js
index 855fb790..f16362a8 100644
--- a/mods/metals.js
+++ b/mods/metals.js
@@ -1,29 +1,27 @@
-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);
-}
+// 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 modName = "mods/metals.js";
-var changeTempMod = "mods/changeTempReactionParameter.js";
-var runAfterAutogenMod = "mods/runAfterAutogen2.js";
+// var changeTempMod = "mods/changeTempReactionParameter.js";
+// var runAfterAutogenMod = "mods/runAfterAutogen2.js";
var libraryMod = "mods/code_library.js";
-var onTryMoveIntoMod = "mods/onTryMoveInto.js";
-if(enabledMods.includes(changeTempMod) && enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod) && enabledMods.includes(onTryMoveIntoMod)) {
- whenAvailable(["runAfterAutogen"], function() {
+dependOn("code_library.js", function(){
elements.iron.hardness = 0.74
//https://www.engineeringtoolbox.com/bhn-brinell-hardness-number-d_1365.html
//https://en.wikipedia.org/wiki/Hardnesses_of_the_elements_(data_page)
@@ -483,7 +481,7 @@ if(enabledMods.includes(changeTempMod) && enabledMods.includes(runAfterAutogenMo
properties: {
oldColor: null,
},
- onTryMoveInto: function(pixel,otherPixel) {
+ onMoveInto: function(pixel,otherPixel) {
neutronAbsorbency(pixel,otherPixel);
},
tick: function(pixel) {
@@ -500,7 +498,7 @@ if(enabledMods.includes(changeTempMod) && enabledMods.includes(runAfterAutogenMo
density: 5803,
tempHigh: 4409,
behavior: behaviors.MOLTEN,
- onTryMoveInto: function(pixel,otherPixel) {
+ onMoveInto: function(pixel,otherPixel) {
neutronAbsorbency(pixel,otherPixel);
},
tick: function(pixel) {
@@ -512,7 +510,7 @@ if(enabledMods.includes(changeTempMod) && enabledMods.includes(runAfterAutogenMo
elements.zirconium_gas = {
density: 3, //Unknown/Unmeasured value
behavior: behaviors.GAS,
- onTryMoveInto: function(pixel,otherPixel) {
+ onMoveInto: function(pixel,otherPixel) {
neutronAbsorbency(pixel,otherPixel);
},
tick: function(pixel) {
@@ -781,11 +779,4 @@ if(enabledMods.includes(changeTempMod) && enabledMods.includes(runAfterAutogenMo
conduct: 0.35,
hardness: 0.7, //idk lol
};
-});
-} else {
- if(!enabledMods.includes(changeTempMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,changeTempMod) };
- if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
- if(!enabledMods.includes(onTryMoveIntoMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod) };
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The "${changeTempMod}", "${runAfterAutogenMod}" and "${onTryMoveIntoMod}" mods are required; any missing mods in this list have been automatically inserted (reload for this to take effect).`);
-};
+},true)
\ No newline at end of file
diff --git a/mods/mixtureIII.js b/mods/mixtureIII.js
new file mode 100644
index 00000000..1b7a2872
--- /dev/null
+++ b/mods/mixtureIII.js
@@ -0,0 +1,360 @@
+function getName(elementList)
+{
+ if(elementList.filter(function(item, pos, self) {
+ return self.indexOf(item) == pos;
+ }).length == 1)
+ {
+ return elementList[0];
+ }
+ let name = elementList.join("_") + "_mixture";
+ if(nameList[name])
+ {
+ name = nameList[name];
+ };
+ return name;
+}
+
+
+function makeColors(elementList)
+{
+ return elementList.map((c) => elements[c].color instanceof Array ? elements[c].color : [elements[c].color]);
+}
+
+
+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;
+ if(indexStateHigh >= 0)
+ {
+ if(stateHigh instanceof Array)
+ {
+ elementHigh = [];
+ for(let i = 0; i < stateHigh.length; i++)
+ {
+ elementList2[indexStateHigh] = stateHigh[i];
+ elementHigh.push(mixture(elementList2));
+ }
+ }
+ else
+ {
+ elementList2[indexStateHigh] = stateHigh;
+ elementHigh = mixture(elementList2);
+ }
+ }
+
+ let elementList3 = elementList.slice();
+ let elementLow = null;
+ if(indexStateLow >= 0)
+ {
+ if(stateLow instanceof Array)
+ {
+ elementLow = [];
+ for(let i = 0; i < stateLow.length; i++)
+ {
+ elementList3[indexStateLow] = stateLow[i];
+ elementLow.push(mixture(elementList3));
+ }
+ }
+ else
+ {
+ elementList3[indexStateLow] = stateLow;
+ elementLow = mixture(elementList3);
+ }
+ }
+
+ 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 || elements[c].movable === undefined);
+
+ 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;
+
+ let states = elementList.map((c) => elements[c].state);
+ if(states.includes("gas"))
+ {
+ state = "gas";
+ density = 0;
+ }
+ else if(!movable)
+ {
+ state = "solid";
+ }
+ else if(states.includes("liquid"))
+ {
+ state = "liquid";
+ }
+ else
+ {
+ state = "solid";
+ }
+ addElement(name, {
+ color: colors2.length == 1 ? colors2[0] : colors2,
+ colorObject: colors2.length == 1 ? toObject(colors2[0]) :colors2.map((c) => toObject(c)),
+ tick: function(pixel) {
+ mixtureBehavior(pixel, elementList);
+ },
+ tempHigh: minTempHigh,
+ stateHigh: elementHigh,
+ tempLow: maxTempLow,
+ stateLow: elementLow,
+ temp: temp,
+ category: "mixture",
+ mixture: elementList,
+ movable: movable,
+ density: density,
+ state: state,
+ stain: stain,
+ reactions: {},
+ isGas: state === "gas"
+ });
+
+ for(let i in elements)
+ {
+ for(let j = 0; j < elementList.length; j++)
+ {
+ if(elements[i].reactions && elements[i].reactions[elementList[j]] !== undefined)
+ {
+ if(name === i)
+ {
+ continue;
+ }
+ elements[i].reactions[name] = {elem2: name, func: function(a,b){mixtureReact(b,a,elementList)}}
+ }
+ if(elements[elementList[j]].reactions && elements[elementList[j]].reactions[i] !== undefined)
+ {
+ if(name === i)
+ {
+ continue;
+ }
+ elements[name].reactions[i] = {elem2: i, func: function(a,b){mixtureReact(a,b,elementList)}}
+ }
+ }
+ }
+ }
+ return name;
+}
+
+function mixtureBehavior(pixel, elementList)
+{
+ let prevCol = pixel.color;
+ let previous = pixel.element;
+ let elem = elementList[Math.floor(Math.random()*elementList.length)];
+ if (elements[elem].tick) { // Run tick function if it exists
+ elements[elem].tick(pixel);
+ }
+
+ if (pixel.del) {return}
+
+ if (elements[elem].behavior) { // Parse behavior if it exists
+ pixelTick(pixel,elements[elem].behavior);
+ }
+ if(pixel.element === previous)
+ {
+ pixel.color = prevCol;
+ }
+}
+
+
+function mixtureReact(pixel, pixel2, elementList)
+{
+ elementList = elementList.slice();
+ shuffleArray(elementList);
+ let previous = pixel.element;
+ let prevCol = pixel.color;
+ let previous2 = pixel2.element;
+ let prevCol2 = pixel2.color;
+ for(let i = 0; i < elementList.length; i++)
+ {
+ let elem = elementList[i];
+ if(pixel.del)
+ {
+ return;
+ }
+ changePixel(pixel,elem, false);
+ let rr1 = false;
+ if (elements[elem].reactions !== undefined && elements[elem].reactions[pixel2.element] !== undefined) {
+ rr1 = reactPixels(pixel,pixel2);
+ }
+ if (!rr1 && elements[pixel2.element].reactions !== undefined && elements[pixel2.element].reactions[elem] !== undefined && !elements[pixel2.element].reactions[elem].oneway) {
+ reactPixels(pixel2,pixel);
+ }
+ if(pixel2.element === previous2)
+ {
+ pixel2.color = prevCol2;
+ }
+ if(!pixel.del && pixel.element === elem)
+ {
+ }
+ else if(pixel.del)
+ {
+ elementList.splice(elementList.indexOf(elem),1);
+ createPixel(mixture(elementList),pixel.x,pixel.y);
+ currentPixels[currentPixels.length-1].temp = pixel.temp;
+ return;
+ }
+ else
+ {
+ elementList.splice(elementList.indexOf(elem),1)
+ changePixel(pixel, mixture(elementList.concat([pixel.element])), false);
+ return;
+ }
+ if(pixel2.del)
+ {
+ return;
+ }
+ }
+ changePixel(pixel, previous, false);
+ pixel.color = prevCol;
+}
+
+nameList = [];
+
+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;
+}
+
+elements.mixer2 = {
+ color: "#999999",
+ ignore: ["mixer2"],
+ category:"machines",
+ insulate:true,
+ hardness: 1,
+ tick: function(pixel) {
+ if (!isEmpty(pixel.x-1,pixel.y,true) && !isEmpty(pixel.x+1,pixel.y,true) && isEmpty(pixel.x,pixel.y+1,false))
+ {
+ if(elements.mixer2.ignore.includes(pixelMap[pixel.x-1][pixel.y].element) || elements.mixer2.ignore.includes(pixelMap[pixel.x+1][pixel.y].element))
+ {
+ return;
+ }
+ else
+ {
+ createPixel(mixture([pixelMap[pixel.x-1][pixel.y].element,pixelMap[pixel.x+1][pixel.y].element]),pixel.x,pixel.y+1);
+ deletePixel(pixel.x-1,pixel.y);
+ deletePixel(pixel.x+1,pixel.y);
+ }
+ }
+ doDefaults(pixel);
+ },
+ maxSize: 1
+};
\ No newline at end of file
diff --git a/mods/more_art_states.js b/mods/more_art_states.js
index d2bca247..80899bdf 100644
--- a/mods/more_art_states.js
+++ b/mods/more_art_states.js
@@ -1,6 +1,7 @@
/*
A mod that adds some extra states of the art element.
-(c) ACrazyPencil 2025
+And thanks to the people who helped me with the code in the discord server.
+(c) ACrazyPencil 2025-2026
*/
elements.powder_art = {
@@ -15,12 +16,18 @@ elements.powder_art = {
canPlace: true,
customColor: true,
category: "powders",
- related: ["art", "liquid_art", "gas_art", "breakable_art"],
+ related: ["art", "liquid_art", "gas_art", "breakable_art", "radiated_art"],
burn: false,
hardness: 1,
conduct: false,
stain: 0,
- state: "powder"
+ state: "powder",
+ reactions: {
+ "radiation": { func:function(pixel, pixel2) {
+ pixel.element = "gas_art"
+ pixel2.element = "radiated_art"
+ }}
+ },
}
elements.liquid_art = {
@@ -34,7 +41,7 @@ elements.liquid_art = {
canPlace: true,
customColor: true,
category: "liquids",
- related: ["art", "powder_art", "breakable_art", "gas_art"],
+ related: ["art", "powder_art", "breakable_art", "gas_art", "radiated_art"],
burn: false,
hardness: 1,
conduct: false,
@@ -53,7 +60,7 @@ elements.gas_art = {
canPlace: true,
customColor: true,
category: "gases",
- related: ["art", "powder_art", "liquid_art", "breakable_art"],
+ related: ["art", "powder_art", "liquid_art", "breakable_art", "radiated_art"],
burn: false,
hardness: 1,
conduct: false,
@@ -72,7 +79,7 @@ elements.breakable_art = {
canPlace: true,
customColor: true,
category: "solids",
- related: ["art", "powder_art", "liquid_art"],
+ related: ["art", "powder_art", "liquid_art", "radiated_art", "gas_art"],
burn: false,
conduct: false,
stain: 0,
@@ -83,7 +90,31 @@ elements.breakable_art = {
stateHigh: "gas_art",
breakInto: "powder_art",
breakIntoColorMultiplier: [1,1,1],
+},
+
+elements.radiated_art = {
+ name: "Radiated Art",
+ color: "#ffffff",
+ behavior: [
+ "XX|XX|XX",
+ "XX|RL:radiation%1|XX",
+ "M2|M1|M2"
+ ],
+ tool: function(pixel) {
+ if (pixel.element === "paper") {
+ deletePixel(pixel.x,pixel.y)
+ }
+ },
+ canPlace: true,
+ customColor: true,
+ category: "powders",
+ related: ["art", "liquid_art", "gas_art", "breakable_art", "powder_art"],
+ burn: false,
+ hardness: 1,
+ conduct: false,
+ stain: 0,
+ state: "powder",
}
-elements.art.related = ["powder_art", "liquid_art", "gas_art", "breakable_art"]
+elements.art.related = ["powder_art", "liquid_art", "gas_art", "breakable_art", "radiated_art"]
elements.art.hardness = 1
diff --git a/mods/neutronium_compressor.js b/mods/neutronium_compressor.js
index 106fb506..d8464c4d 100644
--- a/mods/neutronium_compressor.js
+++ b/mods/neutronium_compressor.js
@@ -1,27 +1,8 @@
-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 modName = "mods/neutronium_compressor.js";
-var runAfterAutogenMod = "mods/runAfterAutogen2.js";
-var libraryMod = "mods/code_library.js";
+// var runAfterAutogenMod = "mods/runAfterAutogen2.js";
+// var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)) {
- whenAvailable(["urlParams","runAfterAutogen"], function() {
+dependOn("code_library.js", function(){
var singularityColorTemplate = ["#202020", "#505050", "#b0b0b0", "#c7c7c7"];
singularityNumber = 10000;
@@ -406,11 +387,5 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
};
//Post-generation tasks
-
- });
-} else {
- if(!enabledMods.includes(runAfterAutogenMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,runAfterAutogenMod) };
- if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
- alert(`The "${runAfterAutogenMod}" and "${libraryMod}" mods are required; any missing mods in this list have been automatically inserted (reload for this to take effect).`)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+
+}, true);
\ No newline at end of file
diff --git a/mods/nograssgrow.js b/mods/nograssgrow.js
index 4670082f..cc0910a4 100644
--- a/mods/nograssgrow.js
+++ b/mods/nograssgrow.js
@@ -1,4 +1,4 @@
-elements.grass.tick = null;
+delete elements.grass.tick;
elements.grass.behavior = [
["XX", "XX", "XX"],
["XX", "XX", "XX"],
diff --git a/mods/nousersthings.js b/mods/nousersthings.js
index 2479903e..3596c831 100644
--- a/mods/nousersthings.js
+++ b/mods/nousersthings.js
@@ -2794,6 +2794,9 @@ elements.ray_emitter = {
pixelMap[lx][ly].rColor = pixel.color
pixelMap[lx][ly].color = pixel.color
}
+ if (["pointer", "flash", "explosion"].includes(pixel.rayElement)){
+ pixelMap[lx][ly].color = pixel.color
+ }
} else if (!isEmpty(lx, ly, true)){
if (pixelMap[lx][ly].element != pixel.rayElement && pixel.rayStoppedByWalls){
break;
@@ -2901,7 +2904,7 @@ elements.specific_ray_emitter = {
}
},
hoverStat: function(pixel){
- return (pixel.rayElement.toUpperCase() || "unset") + ", " + (pixel.rayStoppedByWalls.toString().toUpperCase() || "unset") + ", " + (pixel.specificRayStart || "unset") + ", " + (pixel.specificRayEnd || "unset") + ", " + (pixel.specificRayAngle || "unset")
+ return (pixel.rayElement || "unset").toUpperCase() + ", " + (pixel.rayStoppedByWalls || "unset").toString().toUpperCase() + ", " + (pixel.specificRayStart || "unset") + ", " + (pixel.specificRayEnd || "unset") + ", " + (pixel.specificRayAngle || "unset")
},
tick: function(pixel){
if (pixelTicks == pixel.start){
@@ -2973,6 +2976,9 @@ elements.specific_ray_emitter = {
pixelMap[lx][ly].life = pixel.life
pixelMap[lx][ly].maxLife = pixel.life
}
+ if (["pointer", "flash", "explosion"].includes(pixel.rayElement)){
+ pixelMap[lx][ly].color = pixel.color
+ }
} else if (!isEmpty(lx, ly, true)){
if ((pixelMap[lx][ly].element != pixel.rayElement && pixel.rayStoppedByWalls) || pixelMap[lx][ly].element == pixel.stopAtElement){
break;
diff --git a/mods/pizzasstuff.js b/mods/pizzasstuff.js
index fe9f6ae8..1429846e 100644
--- a/mods/pizzasstuff.js
+++ b/mods/pizzasstuff.js
@@ -3,7 +3,7 @@ removeMod("pizzasstuff.js");
reload(); */
-alert("THIS MOD IS NO LONGER SUPPORTED!\nThe mod 'pizzasstuff.s' and all of its contents have been moved to mossstuff.js.\nPlease install mossstuff.js to continue getting updates.");
+// alert("THIS MOD IS NO LONGER SUPPORTED!\nThe mod 'pizzasstuff.s' and all of its contents have been moved to mossstuff.js.\nPlease install mossstuff.js to continue getting updates.");
elements.freeze_ray = {
diff --git a/mods/portal.js b/mods/portal.js
index aa9caaef..f27ab076 100644
--- a/mods/portal.js
+++ b/mods/portal.js
@@ -1,8 +1,8 @@
var modName = "mods/portal.js";
-var onTryMoveIntoMod = "mods/onTryMoveInto.js";
+// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
//https://stackoverflow.com/a/60922255
if(!enabledMods.includes("mods/mobs.js")) {
headBodyObject = {
@@ -17,7 +17,7 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
_correspondingPortals: null,
},
insulate: true,
- onTryMoveInto: function(pixel,otherPixel) {
+ onMoveInto: function(pixel,otherPixel) {
if(pixel._correspondingPortals == null) {
return;
};
@@ -112,9 +112,8 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
state: "solid",
insulate: true,
}
-} else {
- if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
- if(!enabledMods.includes(onTryMoveIntoMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod) };
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The "${libraryMod}" and "${onTryMoveIntoMod}" mods are all required; any missing mods in this list have been automatically inserted (reload for this to take effect).`)
-};
+}, true);
+ // if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
+ // if(!enabledMods.includes(onTryMoveIntoMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod) };
+ // localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
+ // alert(`The "${libraryMod}" and "${onTryMoveIntoMod}" mods are all required; any missing mods in this list have been automatically inserted (reload for this to take effect).`)
diff --git a/mods/prompt.js b/mods/prompt.js
index dcfba5af..0b9596b2 100644
--- a/mods/prompt.js
+++ b/mods/prompt.js
@@ -3,7 +3,7 @@ var variablesMod = "mods/prop and prompt variables.js";
var promptInputNullishes = ["null","none","","n/a"];
var eightSpaces = " ".repeat(8);
-if(enabledMods.includes(variablesMod)) {
+dependOn("prop and prompt variables.js", function(){
commandHelpObject = {
"set": "Sets properties for every pixel of a given type.\nUsage: set [property] [element] [value] \nDon't include framing characters []<>.\nThe element can be \"all\" to set the property for every pixel.\nNote: Strings can't have spaces because spaces are the separator used in the parsing split().\nArguments in [brackets] are required and ones in are optional.",
@@ -1208,8 +1208,4 @@ Make sure to save your command in a file if you want to add this preset again.`
desc: "Click here or press Shift+1 to open the command prompt. ",
category:"special",
};
-} else {
- alert(`The ${variablesMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- enabledMods.splice(enabledMods.indexOf(modName),0,variablesMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/prop.js b/mods/prop.js
index 6a3e690a..cac7a02a 100644
--- a/mods/prop.js
+++ b/mods/prop.js
@@ -1,7 +1,7 @@
var modName = "mods/prop.js";
var variablesMod = "mods/prop and prompt variables.js";
-if(enabledMods.includes(variablesMod)) {
+dependOn("prop and prompt variables.js", function(){
propProperty = "element";
propValue = "sand";
propType = "string";
@@ -212,7 +212,7 @@ if(enabledMods.includes(variablesMod)) {
};
pixelTempCheck(pixel);
},
- category: "tools",
+ category: "edit",
desc: `Sets properties of pixels. Currently setting ${propProperty} to ${propValue} (${propType}).Press [,] or click here to open the property tool prompt.`,
};
@@ -452,15 +452,11 @@ if(enabledMods.includes(variablesMod)) {
pixelTempCheck(pixel);
};
},
- category: "tools",
+ category: "edit",
desc: `Changes properties of pixels. Currently ${numberAdjusterVerb} ${numberAdjusterValue} ${numberAdjusterPreposition} ${numberAdjusterProperty}.Press [Shift+,] or click here to open the adjuster tool prompt.`,
};
function updateNumberAdjusterDescription() {
elements.number_adjuster.desc = numberAdjusterReverseOrder ? `Changes numeric properties of pixels. Currently ${numberAdjusterVerb} ${numberAdjusterProperty} ${numberAdjusterPreposition} ${numberAdjusterValue}.Press [Shift+,] or click here to open the adjuster tool prompt.` : `Changes numeric properties of pixels. Currently ${numberAdjusterVerb} ${numberAdjusterValue} ${numberAdjusterPreposition} ${numberAdjusterProperty}.Press [Shift+,] or click here to open the adjuster tool prompt.`;
};
-} else {
- alert(`The ${variablesMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- enabledMods.splice(enabledMods.indexOf(modName),0,variablesMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/pullers.js b/mods/pullers.js
index 085871ed..4b59320f 100644
--- a/mods/pullers.js
+++ b/mods/pullers.js
@@ -48,18 +48,18 @@ behaviors.SELFDELETE = [
pullerColour = '#e0adb6'
-elements.pullersDesc = {
- color: pullerColour,
- name: 'pullers.js',
- category: "Mods",
- behavior: behaviors.SELFDELETE,
- tool: function(pixel) {},
- onSelect: function(pixel) {
- let info1stMod = `pullers.js is a mod made by voidapex11 that adds pullers to sandboxels`
- alert(info1stMod)
- return
- },
-};
+// elements.pullersDesc = {
+// color: pullerColour,
+// name: 'pullers.js',
+// category: "Mods",
+// behavior: behaviors.SELFDELETE,
+// tool: function(pixel) {},
+// onSelect: function(pixel) {
+// let info1stMod = `pullers.js is a mod made by voidapex11 that adds pullers to sandboxels`
+// alert(info1stMod)
+// return
+// },
+// };
// for the inator reference: if you know you know
elements.immovable_inator = {
diff --git a/mods/random_liquids.js b/mods/random_liquids.js
index 85623c61..f824a9f2 100644
--- a/mods/random_liquids.js
+++ b/mods/random_liquids.js
@@ -1,7 +1,7 @@
var modName = "mods/random_liquids.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
if(urlParams.get('liquidAmount') != null) { //null check
liquidAmount = urlParams.get('liquidAmount')
if(isNaN(liquidAmount) || liquidAmount === "" || liquidAmount === null) { //NaN check
@@ -213,8 +213,4 @@ if(enabledMods.includes(libraryMod)) {
if(makeLiquidString == true) {
console.log(`Liquids added to liquidString (length ${liquidString.length})`)
}
-} else {
- alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/random_rocks.js b/mods/random_rocks.js
index b2a14b1a..afddc296 100644
--- a/mods/random_rocks.js
+++ b/mods/random_rocks.js
@@ -1,7 +1,7 @@
var modName = "mods/random_rocks.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
if(urlParams.get('rockAmount') != null) { //null check
rockAmount = urlParams.get('rockAmount')
if(isNaN(rockAmount) || rockAmount === "" || rockAmount === null) { //NaN check
@@ -157,8 +157,4 @@ if(enabledMods.includes(libraryMod)) {
if(makeRockString == true) {
console.log(`Rocks added to rockString (length ${rockString.length})`)
}
-} else {
- alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/randomness.js b/mods/randomness.js
index dcd4a053..4bfec787 100644
--- a/mods/randomness.js
+++ b/mods/randomness.js
@@ -1,7 +1,7 @@
var modName = "mods/randomness.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
//i made some stupid things
//TPT reference
@@ -723,8 +723,4 @@ if(enabledMods.includes(libraryMod)) {
}
}
});
-} else {
- if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
- alert(`The "${libraryMod}" mod is required and has been automatically inserted (reload for this to take effect).`)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/rays.js b/mods/rays.js
index 0b039664..d8ee75d2 100644
--- a/mods/rays.js
+++ b/mods/rays.js
@@ -1,28 +1,27 @@
-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);
-}
+// 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 modName = "mods/rays.js";
-var runAfterAutogenMod = "mods/runAfterAutogen2.js";
-var libraryMod = "mods/code_library.js";
+// var runAfterAutogenMod = "mods/runAfterAutogen2.js";
+// var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)) {
-whenAvailable(["raaLoaded","libraryLoaded"], function() {
+dependOn("code_library.js", function(){
runAfterAutogen(function() {
snowAndIceCache = Object.keys(elements).filter(function(name) {
return name.endsWith("snow") || name.endsWith("ice") || name == "rime"
@@ -455,10 +454,4 @@ whenAvailable(["raaLoaded","libraryLoaded"], function() {
}
}
};
-});
-} else {
- if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
- if(!enabledMods.includes(runAfterAutogenMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,runAfterAutogenMod) };
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The "${runAfterAutogenMod}" and "${libraryMod}" mods are required and have been automatically inserted (reload for this to take effect).`);
-};
+},true);
\ No newline at end of file
diff --git a/mods/replace.js b/mods/replace.js
index eaf374c4..fa791b1f 100644
--- a/mods/replace.js
+++ b/mods/replace.js
@@ -49,7 +49,7 @@ elements.replace = {
changePixel(pixel,replaceTo,true);
};
},
- category: "tools",
+ category: "edit",
desc: "Changes pixels of a specified type to another specified type. Currently replacing \"" + replaceFrom + "\" with \"" + replaceTo + "\".Press [\"] or click here to open the replace prompt.",
};
@@ -60,7 +60,7 @@ elements.alt_replace = {
pixel.element = replaceTo;
};
},
- category: "tools",
+ category: "edit",
desc: "Changes pixels of a specified type to another specified type, but keeping their non-element-based properties. Currently replacing \"" + replaceFrom + "\" with \"" + replaceTo + "\".Press [\"] or click here to open the replace prompt.",
hidden: true,
};
@@ -73,7 +73,7 @@ elements.alt_alt_replace = {
pixel.color = pixelColorPick(pixel);
};
},
- category: "tools",
+ category: "edit",
desc: "Changes pixels of a specified type to another specified type, but keeping their non-element-based properties except for color. Currently replacing \"" + replaceFrom + "\" with \"" + replaceTo + "\".Press [\"] or click here to open the replace prompt.",
hidden: true,
};
diff --git a/mods/roseyiede.js b/mods/roseyiede.js
index 8ea22616..2e5210da 100644
--- a/mods/roseyiede.js
+++ b/mods/roseyiede.js
@@ -1,7 +1,7 @@
var modName = "mods/roseyiede.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
/*
//arbitrarily picked
binitialArrayL = ["m","n","p","t","ch","k","b","d","j","g","f","th","s","sh","h","l","r","y","w","z"] //:eggTF:
@@ -356,8 +356,4 @@ if(enabledMods.includes(libraryMod)) {
density: 956,
temp: 120,
}
-} else {
- alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/solid_rock.js b/mods/solid_rock.js
index c65d290b..702be315 100644
--- a/mods/solid_rock.js
+++ b/mods/solid_rock.js
@@ -1,74 +1,71 @@
var modName = "mods/random_rocks.js";
-var onTryMoveIntoMod = "mods/onTryMoveInto.js";
-var libraryMod = "mods/code_library.js";
+// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
+// var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
- elements.solid_rock = {
- color: ["#808080","#4f4f4f","#949494"],
- behavior: behaviors.WALL,
- reactions: {
- "water": {elem1: "wet_sand", chance: 0.00035},
- "salt_water": {elem1: "wet_sand", chance: 0.0005},
- "sugar_water": {elem1: "wet_sand", chance: 0.0004},
- "seltzer": {elem1: "wet_sand", chance: 0.0004},
- "dirty_water": {elem1: "wet_sand", chance: 0.0004},
- "soda": {elem1: "wet_sand", chance: 0.0004},
- "lichen": {elem1: "dirt", chance: 0.0025},
- "grape": {elem2: "juice", chance: 0.1, color2: "#291824"},
- "root": {elem1: "sand", chance: 0.0004},
- "wheat": {elem2: "flour"},
- "primordial_soup": {elem1: "wet_sand", chance: 0.001}
- },
- onTryMoveInto: function(pixel,otherPixel) {
- if(elements[otherPixel.element].category === "corruption") {
- if(Math.random() < 0.05) {
- changePixel(pixel,"corrupt_solid_rock");
- return;
- };
- } else {
- reactionStealer(pixel,otherPixel,"rock");
+dependOn("code_library.js", function(){
+
+elements.solid_rock = {
+ color: ["#808080","#4f4f4f","#949494"],
+ behavior: behaviors.WALL,
+ reactions: {
+ "water": {elem1: "wet_sand", chance: 0.00035},
+ "salt_water": {elem1: "wet_sand", chance: 0.0005},
+ "sugar_water": {elem1: "wet_sand", chance: 0.0004},
+ "seltzer": {elem1: "wet_sand", chance: 0.0004},
+ "dirty_water": {elem1: "wet_sand", chance: 0.0004},
+ "soda": {elem1: "wet_sand", chance: 0.0004},
+ "lichen": {elem1: "dirt", chance: 0.0025},
+ "grape": {elem2: "juice", chance: 0.1, color2: "#291824"},
+ "root": {elem1: "sand", chance: 0.0004},
+ "wheat": {elem2: "flour"},
+ "primordial_soup": {elem1: "wet_sand", chance: 0.001}
+ },
+ onMoveInto: function(pixel,otherPixel) {
+ if(elements[otherPixel.element].category === "corruption") {
+ if(Math.random() < 0.05) {
+ changePixel(pixel,"corrupt_solid_rock");
+ return;
};
- },
- tempHigh: 950,
- stateHigh: "magma",
- category: "land",
- state: "solid",
- density: 2600,
- hardness: 0.55,
- breakInto: "rock",
- }
+ } else {
+ reactionStealer(pixel,otherPixel,"rock");
+ };
+ },
+ tempHigh: 950,
+ stateHigh: "magma",
+ category: "land",
+ state: "solid",
+ density: 2600,
+ hardness: 0.55,
+ breakInto: "rock",
+}
- if(enabledMods.includes("mods/fey_and_more.js")) {
- elements.corrupt_solid_rock = {
- color: ["#514c78","#514c78","#2a264d","#2a264d","#514c78","#514c78"],
- behavior: behaviors.WALL,
- tempHigh: 1200,
- category: "corruption",
- state: "solid",
- density: 1250,
- breakInto: "corrupt_rock",
- tick: function(pixel) {
- var randomNeighborOffset = adjacentCoords[Math.floor(Math.random() * adjacentCoords.length)];
- var rfX = pixel.x+randomNeighborOffset[0];
- var rfY = pixel.y+randomNeighborOffset[1];
- if(!isEmpty(rfX,rfY,true)) {
- var otherPixel = pixelMap[rfX][rfY];
- if(otherPixel.element === "solid_rock") {
- if(Math.random() < 0.05) {
- changePixel(otherPixel,"corrupt_solid_rock")
- };
+if(enabledMods.includes("mods/fey_and_more.js")) {
+ elements.corrupt_solid_rock = {
+ color: ["#514c78","#514c78","#2a264d","#2a264d","#514c78","#514c78"],
+ behavior: behaviors.WALL,
+ tempHigh: 1200,
+ category: "corruption",
+ state: "solid",
+ density: 1250,
+ breakInto: "corrupt_rock",
+ tick: function(pixel) {
+ var randomNeighborOffset = adjacentCoords[Math.floor(Math.random() * adjacentCoords.length)];
+ var rfX = pixel.x+randomNeighborOffset[0];
+ var rfY = pixel.y+randomNeighborOffset[1];
+ if(!isEmpty(rfX,rfY,true)) {
+ var otherPixel = pixelMap[rfX][rfY];
+ if(otherPixel.element === "solid_rock") {
+ if(Math.random() < 0.05) {
+ changePixel(otherPixel,"corrupt_solid_rock")
};
};
- },
- };
-
- runAfterLoad(function() {
- elements.corrupt_solid_rock.reactions = elements.corrupt_land.reactions;
- });
- }
-} else {
- if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
- if(!enabledMods.includes(onTryMoveIntoMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod) };
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The "${libraryMod}" and "${onTryMoveIntoMod}" mods are all required; any missing mods in this list have been automatically inserted (reload for this to take effect).`)
-};
+ };
+ },
+ };
+
+ runAfterLoad(function() {
+ elements.corrupt_solid_rock.reactions = elements.corrupt_land.reactions;
+ });
+}
+
+},true);
\ No newline at end of file
diff --git a/mods/sponge_edit.js b/mods/sponge_edit.js
index 8fd24da6..2672d903 100644
--- a/mods/sponge_edit.js
+++ b/mods/sponge_edit.js
@@ -1,8 +1,10 @@
var modName = "mods/sponge_edit.js";
-var onTryMoveIntoMod = "mods/onTryMoveInto.js";
+// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
+
+
+dependOn("code_library.js", function(){
elements.sponge.properties ??= {};
elements.sponge.properties.maxAbsorb = 250;
@@ -34,7 +36,7 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
};
};
- elements.sponge.onTryMoveInto = function(pixel,otherPixel) {
+ elements.sponge.onMoveInto = function(pixel,otherPixel) {
var absorbedElements = Object.keys(pixel.absorbed);
if(absorbedElements.length == 0) {
return false;
@@ -68,9 +70,4 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
};
};
};
-} else {
- enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
-};
+}, true);
\ No newline at end of file
diff --git a/mods/stripe_paint.js b/mods/stripe_paint.js
index 977e9544..89cb25cf 100644
--- a/mods/stripe_paint.js
+++ b/mods/stripe_paint.js
@@ -1,7 +1,7 @@
var modName = "mods/color_tools.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
stripeFixedDefaultProperties = {
color2: "rgb(0,0,0)",
phase: 0,
@@ -103,8 +103,4 @@ if(enabledMods.includes(libraryMod)) {
},
desc: stripePaintDesc
};
-} else {
- alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true);
\ No newline at end of file
diff --git a/mods/structure_test.js b/mods/structure_test.js
index 6d00aefe..2427268e 100644
--- a/mods/structure_test.js
+++ b/mods/structure_test.js
@@ -1,10 +1,7 @@
var modName = "mods/structure_test.js";
var libraryMod = "mods/code_library.js";
-if(!enabledMods.includes(libraryMod)) {
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
- alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`);
-} else {
+dependOn("code_library.js", function(){
arrayLoaderVoids = ["air", "null", null];
buildingOneSegmentDoor = ["concrete","wood_plank","concrete","wood_plank","concrete"];
buildingOneSegmentWindows = ["concrete","glass_pane","concrete","glass_pane","concrete"];
@@ -752,4 +749,4 @@ if(!enabledMods.includes(libraryMod)) {
worldgentypes.desert.layers.shift();
};
};
-};
+}, true);
\ No newline at end of file
diff --git a/mods/survival.js b/mods/survival.js
index 2ce79fb7..f6282eb9 100644
--- a/mods/survival.js
+++ b/mods/survival.js
@@ -76,13 +76,19 @@ runAfterAutogen(function(){
for (var element in elements) {
if (elements[element].category !== "tools") {
elements[element].hidden = true;
- elements[element].category = "inventory";
+ if (!settings.survival || Object.keys(settings.survival).length < 25) {
+ elements[element].category = "inventory";
+ }
}
if (elements[element].onShiftSelect) delete elements[element].onShiftSelect;
}
for (var element in settings.survival) {
if (!elements[element]) { continue; }
if (elements[element].category === "tools") { continue; }
+ if (!elements[element].colorObject) {
+ elements[element].color = "#ffffff";
+ elements[element].colorObject = {"r": 255,"g": 255,"b": 255};
+ }
createElementButton(element);
document.getElementById("elementButton-"+element).innerHTML += "("+settings.survival[element]+")";
}
@@ -120,7 +126,7 @@ elements.cloner.ignore = elements.cloner.ignore.concat(["gold","gold_coin","molt
elements.cloner.desc = "You can only clone one element at a time!"
elements.smash.tool = function(pixel) {
- if (elements[pixel.element].seed === true && pixel.element !== "cactus") { return }
+ if (elements[pixel.element].seed === true) { return }
if (elements[pixel.element].breakInto !== undefined || (elements[pixel.element].seed !== undefined && elements[pixel.element].seed !== true)) {
// times 0.25 if not shiftDown else 1
if (Math.random() < (elements[pixel.element].hardness || 1) * (shiftDown ? 1 : 0.25)) {
diff --git a/mods/wifi.js b/mods/wifi.js
index bdc94a21..bf6e527c 100644
--- a/mods/wifi.js
+++ b/mods/wifi.js
@@ -1,7 +1,7 @@
var modName = "mods/wifi.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
//https://stackoverflow.com/a/60922255
elements.wifi = {
color: "#bfff7f",
@@ -155,8 +155,4 @@ if(enabledMods.includes(libraryMod)) {
state: "solid",
}
-} else {
- if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The "${libraryMod}" mods is required; and has been automatically inserted (reload for this to take effect).`)
-};
+}, true);
\ No newline at end of file
diff --git a/mods/wirelike_test.js b/mods/wirelike_test.js
index 222099ae..447df508 100644
--- a/mods/wirelike_test.js
+++ b/mods/wirelike_test.js
@@ -1,7 +1,7 @@
var modName = "mods/wirelike_test.js";
var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(libraryMod)) {
+dependOn("code_library.js", function(){
//The CMYK is symbolic
elements.start_test = {
color: "#dddddd",
@@ -674,8 +674,4 @@ if(enabledMods.includes(libraryMod)) {
};
},
};
-} else {
- alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
-};
+}, true)
\ No newline at end of file
diff --git a/mods/yumcherries.js b/mods/yumcherries.js
index 1d4b786d..6c54ead0 100644
--- a/mods/yumcherries.js
+++ b/mods/yumcherries.js
@@ -1,139 +1,347 @@
var modName = "mods/cherries.js";
-var onTryMoveIntoMod = "mods/onTryMoveInto.js";
-var libraryMod = "mods/code_library.js";
+// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
+// var libraryMod = "mods/code_library.js";
-if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
- randomNumberFromOneToThree = function() {
- return 1 + Math.floor(Math.random() * 3)
- };
-
- debugSpeedGrowth = false;
- logLeaves = false;
- cherryAttachWhitelist = ["cherry_log","cherry_branch_1","cherry_branch_2","blossom","cherry_leaf","cherry_plant_top","cherry"];
-
- cherryDirtElements = ["dirt","mud","sand","wet_sand","clay_soil","mycelium","grass"];
+dependOn("code_library.js", function(){
+randomNumberFromOneToThree = function() {
+ return 1 + Math.floor(Math.random() * 3)
+};
- function logPixelCoords(pixel) {
- return `(${pixel.x}, ${pixel.y})`
- };
+debugSpeedGrowth = false;
+logLeaves = false;
+cherryAttachWhitelist = ["cherry_log","cherry_branch_1","cherry_branch_2","blossom","cherry_leaf","cherry_plant_top","cherry"];
- function hasPixel(x,y,elementInput) {
- if(isEmpty(x,y,true)) { //if empty, it can't have a pixel
- return false;
+cherryDirtElements = ["dirt","mud","sand","wet_sand","clay_soil","mycelium","grass"];
+
+function logPixelCoords(pixel) {
+ return `(${pixel.x}, ${pixel.y})`
+};
+
+function hasPixel(x,y,elementInput) {
+ if(isEmpty(x,y,true)) { //if empty, it can't have a pixel
+ return false;
+ } else {
+ if(elementInput.includes(",")) { //CSTA
+ elementInput = elementInput.split(",");
+ };
+ if(Array.isArray(elementInput)) { //if element list
+ return elementInput.includes(pixelMap[x][y].element);
+ } else { //if single element
+ return pixelMap[x][y].element === elementInput;
+ };
+ };
+};
+
+elements.cherry_seed = {
+ color: "#8b4513",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if (isEmpty(pixel.x,pixel.y+1)) {
+ movePixel(pixel,pixel.x,pixel.y+1);
} else {
- if(elementInput.includes(",")) { //CSTA
- elementInput = elementInput.split(",");
- };
- if(Array.isArray(elementInput)) { //if element list
- return elementInput.includes(pixelMap[x][y].element);
- } else { //if single element
- return pixelMap[x][y].element === elementInput;
- };
- };
- };
-
- elements.cherry_seed = {
- color: "#8b4513",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- if (isEmpty(pixel.x,pixel.y+1)) {
- movePixel(pixel,pixel.x,pixel.y+1);
- } else {
- if (Math.random() < (debugSpeedGrowth ? 0.09 : 0.03) && pixel.age > (debugSpeedGrowth ? 20 : 50) && pixel.temp < 100) {
- if (!outOfBounds(pixel.x,pixel.y+1)) {
- var dirtPixel = pixelMap[pixel.x][pixel.y+1];
- if (cherryDirtElements.includes(dirtPixel.element)) {
- changePixel(dirtPixel,"root");
- };
+ if (Math.random() < (debugSpeedGrowth ? 0.09 : 0.03) && pixel.age > (debugSpeedGrowth ? 20 : 50) && pixel.temp < 100) {
+ if (!outOfBounds(pixel.x,pixel.y+1)) {
+ var dirtPixel = pixelMap[pixel.x][pixel.y+1];
+ if (cherryDirtElements.includes(dirtPixel.element)) {
+ changePixel(dirtPixel,"root");
};
- if (isEmpty(pixel.x,pixel.y-1)) {
- movePixel(pixel,pixel.x,pixel.y-1);
- createPixel("cherry_log",pixel.x,pixel.y+1);
- pixelMap[pixel.x][pixel.y+1].cherryRange = pixel.cherryRange; //pass cherry range down to log
- };
- } else if (pixel.age > (debugSpeedGrowth ? 500 : 1000)) {
- changePixel(pixel,"cherry_plant_top");
};
- pixel.age++;
- };
- if(Math.random() < 0.01 && pixel.age > 200) {
+ if (isEmpty(pixel.x,pixel.y-1)) {
+ movePixel(pixel,pixel.x,pixel.y-1);
+ createPixel("cherry_log",pixel.x,pixel.y+1);
+ pixelMap[pixel.x][pixel.y+1].cherryRange = pixel.cherryRange; //pass cherry range down to log
+ };
+ } else if (pixel.age > (debugSpeedGrowth ? 500 : 1000)) {
changePixel(pixel,"cherry_plant_top");
};
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- //"cherryRange": null, //apparently this is suddenly, in an illogical, never-before-seen, completely new, unprecedented incident of bad behavior, evaluated before being put into the property database, so RNG has to be done in tick
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- cooldown: defaultCooldown,
- };
+ pixel.age++;
+ };
+ if(Math.random() < 0.01 && pixel.age > 200) {
+ changePixel(pixel,"cherry_plant_top");
+ };
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ //"cherryRange": null, //apparently this is suddenly, in an illogical, never-before-seen, completely new, unprecedented incident of bad behavior, evaluated before being put into the property database, so RNG has to be done in tick
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+ cooldown: defaultCooldown,
+};
- elements.cherry_log = {
- hidden: true,
- color: "#310a0b",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
+elements.cherry_log = {
+ hidden: true,
+ color: "#310a0b",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 60 && pixel.temp < 100 && !pixel.grewPeduncle) {
+ var peduncleOffsets = [-1, 1]; //placed to the left, placed to the right
+ for(i = 0; i < peduncleOffsets.length; i++) {
+ if (isEmpty(pixel.x+peduncleOffsets[i],pixel.y,false)) {
+ if (Math.random() < 0.005) {
+ createPixel("cherry_branch_1",pixel.x+peduncleOffsets[i],pixel.y);
+ pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].dir = Math.sign(peduncleOffsets[i]);
+ pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].cherryRange = pixel.cherryRange; //pass cherry range down to branch
+ if(Math.random() < 0.8) { pixel.grewPeduncle = true; } //20% chance to not mark as true, allowing for a chance to try another branch
+ };
+ };
};
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ "grewPeduncle": false,
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
- if (pixel.age > 60 && pixel.temp < 100 && !pixel.grewPeduncle) {
- var peduncleOffsets = [-1, 1]; //placed to the left, placed to the right
- for(i = 0; i < peduncleOffsets.length; i++) {
- if (isEmpty(pixel.x+peduncleOffsets[i],pixel.y,false)) {
- if (Math.random() < 0.005) {
- createPixel("cherry_branch_1",pixel.x+peduncleOffsets[i],pixel.y);
- pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].dir = Math.sign(peduncleOffsets[i]);
- pixelMap[pixel.x+peduncleOffsets[i]][pixel.y].cherryRange = pixel.cherryRange; //pass cherry range down to branch
- if(Math.random() < 0.8) { pixel.grewPeduncle = true; } //20% chance to not mark as true, allowing for a chance to try another branch
+elements.cherry = {
+ color: "#f7022a",
+ tick: function(pixel) {
+ if(pixel.attached) {
+ var attachCoords = [pixel.x+Math.sign(pixel.attachDirection), pixel.y];
+ if(isEmpty(attachCoords[0],attachCoords[1],false)) {
+ pixel.attached = false;
+ };
+ } else { //Move if not attached
+ if (!tryMove(pixel, pixel.x, pixel.y+1)) {
+ if(Math.random() < 0.9) {
+ if (Math.random() < 0.5) {
+ if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
+ tryMove(pixel, pixel.x-1, pixel.y+1);
+ };
+ } else {
+ if (!tryMove(pixel, pixel.x-1, pixel.y+1)) {
+ tryMove(pixel, pixel.x+1, pixel.y+1);
};
};
};
};
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- "grewPeduncle": false,
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.cherry = {
- color: "#f7022a",
- tick: function(pixel) {
- if(pixel.attached) {
- var attachCoords = [pixel.x+Math.sign(pixel.attachDirection), pixel.y];
- if(isEmpty(attachCoords[0],attachCoords[1],false)) {
- pixel.attached = false;
+ };
+ doDefaults(pixel);
+ var shouldSpoil = true; //spoil by default
+ if(pixel.attached) { //if it's attached
+ if(!isEmpty(attachCoords[0],attachCoords[1],true)) { //if the attachment coords are a pixel and not OOB
+ var attachPixel = pixelMap[attachCoords[0]][attachCoords[1]];
+ var attachElement = attachPixel.element;
+ if(cherryAttachWhitelist.includes(attachElement)) {//if the element is a whitelisted "don't spoil" element
+ shouldSpoil = false; //then don't spoil
};
- } else { //Move if not attached
+ };
+ };
+ if(shouldSpoil) { //spoil if not attached
+ if(pixel.temp > -14 && pixel.temp <= 4) { //(no spoiling below 14C)
+ pixel.spoilage += Math.max(Math.min(scale(pixel.temp,-14,4,0,9),9),0)
+ } else if(pixel.temp > 4) {
+ pixel.spoilage += Math.max(Math.min(scale(pixel.temp,4,20,9,30),40),0)
+ };
+ };
+ if(pixel.spoilage > 14400) { //3600 = 120 ticks at 20C
+ if(Math.random() < 0.05) {
+ changePixel(pixel,"spoiled_cherry");
+ };
+ };
+ },
+ properties: {
+ "spoilage":0,
+ "attached": false,
+ "attachDirection": (!Math.floor(Math.random() * 2)) ? 1 : -1,
+ },
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+ onMoveInto: function(pixel,otherPixel) {
+ var otherInfo = elements[otherPixel.element]
+ if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
+ pixel.attached = false;
+ };
+ },
+ category: "food",
+ breakInto: "juice",
+ breakIntoColor: "#A20205"
+};
+
+elements.cherry_branch_1 = {
+ hidden: true,
+ name: "cherry branch (offshoot)",
+ color: "#310a0b",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 20 && pixel.temp < 100) {
+ var peduncleCoords1 = [pixel.x + pixel.dir, pixel.y];
+ var peduncleCoords2 = [pixel.x + pixel.dir, pixel.y + 1];
+ if(isEmpty(peduncleCoords1[0],peduncleCoords1[1],false) && isEmpty(peduncleCoords2[0],peduncleCoords2[1],false)) {
+ if(Math.random() < 0.5) {
+ createPixel(pixel.element,peduncleCoords1[0],peduncleCoords1[1]);
+ pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].dir = pixel.dir;
+ pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].cherryRange = pixel.cherryRange; //pass cherry range down to next pixel of branch horizontal
+ } else {
+ createPixel("cherry_branch_2",peduncleCoords2[0],peduncleCoords2[1]);
+ pixelMap[peduncleCoords2[0]][peduncleCoords2[1]].cherryRange = pixel.cherryRange; //pass cherry range down to diagonal offshoot
+ };
+ };
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "dir": (!Math.floor(Math.random() * 2)) ? 1 : -1,
+ "age": 0,
+ //"cherryRange": (1 + (Math.floor(Math.random() * 3))), //1-3
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+elements.cherry_branch_2 = {
+ hidden: true,
+ name: "cherry branch (hanging)",
+ color: "#310a0b",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ // Grow/Flower
+ if (pixel.age > 20 && pixel.temp < 100) {
+ var growthCoords = [pixel.x, pixel.y + 1];
+ if(isEmpty(...growthCoords)) {
+ if(Math.random() < 0.9) {
+ createPixel(pixel.element,...growthCoords);
+ pixelMap[growthCoords[0]][growthCoords[1]].cherryRange = pixel.cherryRange; //pass cherry range down to next pixel of branch vertical
+ } else {
+ createPixel("blossom",...growthCoords); // cherry flower
+ };
+ };
+ };
+
+ //Make cherries
+ if (pixel.age > 40 && pixel.temp < 100) {
+ var cherryOffsets = [-1, 1]; //placed to the left, placed to the right
+ for(i = 0; i < cherryOffsets.length; i++) {
+ //console.log(`Looping through left and right positions: ${cherryOffsets}`);
+ for(j = 1; j < pixel.cherryRange + 1; j++) { //for max cherry distance, using the cherry range
+ //console.log(`Looping through cherry offset multipliers: ${j}`);
+ if (isEmpty(pixel.x+(j * cherryOffsets[i]),pixel.y,false)) { //if there's an empty space
+ //console.log(`Cherry position is empty: [${j * cherryOffsets[i]}, 0]\nTrying cherry at (${pixel.x+(j * cherryOffsets[i])},${pixel.y})`);
+ if (Math.random() < (debugSpeedGrowth ? 0.05 : 0.005)) { //try to place the cherry
+ //console.log(`Placing cherry`);
+ createPixel("cherry",pixel.x+(j * cherryOffsets[i]),pixel.y);
+ pixelMap[pixel.x+(j * cherryOffsets[i])][pixel.y].attached = true;
+ pixelMap[pixel.x+(j * cherryOffsets[i])][pixel.y].attachDirection = -1 * Math.sign(cherryOffsets[i]); //attach dir is the opposite of placement dir so it attaches towards the stem
+ } else {
+ //console.log(`NOT placing cherry`);
+ };
+ //console.log(`Cherry tried, stopping iteration`);
+ break; //and then stop iteration
+ } else {
+ //console.log(`Cherry position is NOT empty: [${j * cherryOffsets[i]}, 0]\nSkipping this offset`);
+ continue; //if not empty, skip that pixel and move on the next distance
+ };
+ //console.log(`====End of side try====`);
+ };
+ //console.log(`####End of side iterator####`);
+ };
+ //console.log(`>>>>End of cherry iterator<<<<`);
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ //console.log(`\nEnd of branch tick\n`);
+ },
+ properties: {
+ "age": 0,
+ //"cherryRange": (1 + (Math.floor(Math.random() * 3))), //1-3
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+elements.spoiled_cherry = {
+ hidden: true,
+ color: "#594b29",
+ behavior: [
+ "XX|CR:stench,fly%0.1|XX",
+ "M2%0.5|CH:dirty_water,fly,fly%0.007|M2%0.5",
+ "M2|M1|M2"
+ ],
+ stain: 0.01,
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+};
+
+elements.fly.reactions.spoiled_cherry = { "elem2":null, chance:0.15, func:behaviors.FEEDPIXEL };
+
+elements.cherry_leaf = {
+ hidden: true,
+ color: "#9df24e",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if(pixel.attached) {
+ var attachCoords = [pixel.x + pixel.attachOffsets[0], pixel.y + pixel.attachOffsets[1]];
+ if(isEmpty(attachCoords[0],attachCoords[1],false)) { //consider OOB full
+ pixel.attached = false;
+ };
+ } else { //Move if not attached
+ if(Math.random() < 0.2) {
if (!tryMove(pixel, pixel.x, pixel.y+1)) {
- if(Math.random() < 0.9) {
+ if(Math.random() < 0.4) {
if (Math.random() < 0.5) {
if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
tryMove(pixel, pixel.x-1, pixel.y+1);
@@ -146,398 +354,188 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
};
};
};
- doDefaults(pixel);
- var shouldSpoil = true; //spoil by default
- if(pixel.attached) { //if it's attached
- if(!isEmpty(attachCoords[0],attachCoords[1],true)) { //if the attachment coords are a pixel and not OOB
- var attachPixel = pixelMap[attachCoords[0]][attachCoords[1]];
- var attachElement = attachPixel.element;
- if(cherryAttachWhitelist.includes(attachElement)) {//if the element is a whitelisted "don't spoil" element
- shouldSpoil = false; //then don't spoil
- };
+ };
+ doDefaults(pixel);
+ },
+ properties: {
+ "attached": false,
+ "attachOffsets": [(!Math.floor(Math.random() * 2)) ? 1 : -1, 0],
+ "cherryRange": null,
+ },
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ tempHigh: 200,
+ stateHigh: ["steam", "ash"],
+ onMoveInto: function(pixel,otherPixel) { //Move through
+ var otherElement = otherPixel.element; //var element for readability
+
+ var otherInfo = elements[otherElement]; //var info
+
+ var otherState = "solid"; //consider things solid by default
+ if(typeof(otherInfo.state) === "string") {
+ otherState = otherInfo.state; //get actual state if it exists
+ };
+
+ var otherDensity = 1000; //consider density 1000 by default
+ if(typeof(otherInfo.density) === "number") {
+ otherDensity = otherInfo.density; //get actual density if it exists
+ };
+
+ var react = false; //default to no reaction
+ if(typeof(otherInfo.reactions) === "object") { //look for reactions
+ if(typeof(otherInfo.reactions[pixel.element]) === "object") { //look for reactions involving this element
+ react = true; //if there are any, set reaction flag to true
+ };
+ };
+
+ if(otherElement.endsWith("head") || otherElement.endsWith("body")) {
+ //i don't want to make general MPL handling so I'll just try to exclude them;
+ if(otherElement !== "antibody") {
+ //exclude antibody from exclusion
+ return false;
+ };
+ };
+
+ if(otherElement !== pixel.element) { //allow this element from piling on itself
+ if(logLeaves) { console.log("Other element is not cherry leaves") }; //yes, this code is for cherry leaves
+ if(react) { //if there was a reaction in that previous step
+ if(logLeaves) { console.log("Reacting pixels") };
+ reactPixels(otherPixel,pixel); //react
+ } else { //if no such reaction existed, move through
+ if(logLeaves) { console.log("Moving pixels") };
+ if((otherState !== "solid") || (otherState === "solid" && otherDensity > 100)) { //admit any non-solid, or any solid with a density over 100
+ var pX = pixel.x; //var pixel coords for no particular reason
+ var pY = pixel.y;
+ var oX = otherPixel.x; //var other pixel's coords for no particular reason
+ var oY = otherPixel.y;
+ if(logLeaves) { console.log(`${otherElement} pixel (${oX},${oY}) trying to move info leaf block (${pX},${pY})`) };
+ var dX = oX - pX; //get the difference between this's X and other's X; if the other pixel is moving from the space immediately to the right, this dX value should be 1
+ var dY = oY - pY;
+ var iDX = -1 * dX; //get the additive inverse; if we want to move such a pixel from the right to the left, we would change its +1 X offset to a -1 X offset for the coord sto move it to
+ var iDY = -1 * dY;
+ if(logLeaves) { console.log(`Old offset (relative to leaf): [${dX},${dY}], new offset [${iDX},${iDY}]`) };
+ var fX = pX + iDX; //combine this pixel's X with the inverted offset we just made;
+ //assuming this pixel is (23,31) and the other pixel is trying to move in to the left into this from (24,31),
+ //the dX would be [1, 0], signifying that the other pixel is 1 pixel to the right of this
+ //the space to the left of this, where it would go, is (22,31), and the offset for that pixel relative to this is [-1, 0]
+ //to get the [-1, 0], we'd need to flip that [1, 0] offset (lmao flip that the song by loona), hence the inverse
+ var fY = pY + iDY;
+ if(logLeaves) { console.log(`Calculated final position: (${fX},${fY}), moving other pixel from (${oX},${oY})`) };
+ tryMove(otherPixel,fX,fY);
};
};
- if(shouldSpoil) { //spoil if not attached
- if(pixel.temp > -14 && pixel.temp <= 4) { //(no spoiling below 14C)
- pixel.spoilage += Math.max(Math.min(scale(pixel.temp,-14,4,0,9),9),0)
- } else if(pixel.temp > 4) {
- pixel.spoilage += Math.max(Math.min(scale(pixel.temp,4,20,9,30),40),0)
- };
- };
- if(pixel.spoilage > 14400) { //3600 = 120 ticks at 20C
- if(Math.random() < 0.05) {
- changePixel(pixel,"spoiled_cherry");
- };
- };
- },
- properties: {
- "spoilage":0,
- "attached": false,
- "attachDirection": (!Math.floor(Math.random() * 2)) ? 1 : -1,
- },
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- onTryMoveInto: function(pixel,otherPixel) {
- var otherInfo = elements[otherPixel.element]
- if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
- pixel.attached = false;
- };
- },
- };
-
- elements.cherry_branch_1 = {
- hidden: true,
- name: "cherry branch (offshoot)",
- color: "#310a0b",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- if (pixel.age > 20 && pixel.temp < 100) {
- var peduncleCoords1 = [pixel.x + pixel.dir, pixel.y];
- var peduncleCoords2 = [pixel.x + pixel.dir, pixel.y + 1];
- if(isEmpty(peduncleCoords1[0],peduncleCoords1[1],false) && isEmpty(peduncleCoords2[0],peduncleCoords2[1],false)) {
- if(Math.random() < 0.5) {
- createPixel(pixel.element,peduncleCoords1[0],peduncleCoords1[1]);
- pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].dir = pixel.dir;
- pixelMap[peduncleCoords1[0]][peduncleCoords1[1]].cherryRange = pixel.cherryRange; //pass cherry range down to next pixel of branch horizontal
- } else {
- createPixel("cherry_branch_2",peduncleCoords2[0],peduncleCoords2[1]);
- pixelMap[peduncleCoords2[0]][peduncleCoords2[1]].cherryRange = pixel.cherryRange; //pass cherry range down to diagonal offshoot
- };
- };
- };
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "dir": (!Math.floor(Math.random() * 2)) ? 1 : -1,
- "age": 0,
- //"cherryRange": (1 + (Math.floor(Math.random() * 3))), //1-3
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.cherry_branch_2 = {
- hidden: true,
- name: "cherry branch (hanging)",
- color: "#310a0b",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- // Grow/Flower
- if (pixel.age > 20 && pixel.temp < 100) {
- var growthCoords = [pixel.x, pixel.y + 1];
- if(isEmpty(...growthCoords)) {
- if(Math.random() < 0.9) {
- createPixel(pixel.element,...growthCoords);
- pixelMap[growthCoords[0]][growthCoords[1]].cherryRange = pixel.cherryRange; //pass cherry range down to next pixel of branch vertical
- } else {
- createPixel("blossom",...growthCoords); // cherry flower
- };
- };
- };
-
- //Make cherries
- if (pixel.age > 40 && pixel.temp < 100) {
- var cherryOffsets = [-1, 1]; //placed to the left, placed to the right
- for(i = 0; i < cherryOffsets.length; i++) {
- //console.log(`Looping through left and right positions: ${cherryOffsets}`);
- for(j = 1; j < pixel.cherryRange + 1; j++) { //for max cherry distance, using the cherry range
- //console.log(`Looping through cherry offset multipliers: ${j}`);
- if (isEmpty(pixel.x+(j * cherryOffsets[i]),pixel.y,false)) { //if there's an empty space
- //console.log(`Cherry position is empty: [${j * cherryOffsets[i]}, 0]\nTrying cherry at (${pixel.x+(j * cherryOffsets[i])},${pixel.y})`);
- if (Math.random() < (debugSpeedGrowth ? 0.05 : 0.005)) { //try to place the cherry
- //console.log(`Placing cherry`);
- createPixel("cherry",pixel.x+(j * cherryOffsets[i]),pixel.y);
- pixelMap[pixel.x+(j * cherryOffsets[i])][pixel.y].attached = true;
- pixelMap[pixel.x+(j * cherryOffsets[i])][pixel.y].attachDirection = -1 * Math.sign(cherryOffsets[i]); //attach dir is the opposite of placement dir so it attaches towards the stem
- } else {
- //console.log(`NOT placing cherry`);
- };
- //console.log(`Cherry tried, stopping iteration`);
- break; //and then stop iteration
- } else {
- //console.log(`Cherry position is NOT empty: [${j * cherryOffsets[i]}, 0]\nSkipping this offset`);
- continue; //if not empty, skip that pixel and move on the next distance
- };
- //console.log(`====End of side try====`);
- };
- //console.log(`####End of side iterator####`);
- };
- //console.log(`>>>>End of cherry iterator<<<<`);
- };
- pixel.age++;
- doDefaults(pixel);
- //console.log(`\nEnd of branch tick\n`);
- },
- properties: {
- "age": 0,
- //"cherryRange": (1 + (Math.floor(Math.random() * 3))), //1-3
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
- elements.spoiled_cherry = {
- hidden: true,
- color: "#594b29",
- behavior: [
- "XX|CR:stench,fly%0.1|XX",
- "M2%0.5|CH:dirty_water,fly,fly%0.007|M2%0.5",
- "M2|M1|M2"
- ],
- stain: 0.01,
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- };
-
- elements.fly.reactions.spoiled_cherry = { "elem2":null, chance:0.15, func:behaviors.FEEDPIXEL };
-
- elements.cherry_leaf = {
- hidden: true,
- color: "#9df24e",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- if(pixel.attached) {
- var attachCoords = [pixel.x + pixel.attachOffsets[0], pixel.y + pixel.attachOffsets[1]];
- if(isEmpty(attachCoords[0],attachCoords[1],false)) { //consider OOB full
- pixel.attached = false;
- };
- } else { //Move if not attached
- if(Math.random() < 0.2) {
- if (!tryMove(pixel, pixel.x, pixel.y+1)) {
- if(Math.random() < 0.4) {
- if (Math.random() < 0.5) {
- if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
- tryMove(pixel, pixel.x-1, pixel.y+1);
- };
- } else {
- if (!tryMove(pixel, pixel.x-1, pixel.y+1)) {
- tryMove(pixel, pixel.x+1, pixel.y+1);
- };
- };
- };
- };
- };
- };
- doDefaults(pixel);
- },
- properties: {
- "attached": false,
- "attachOffsets": [(!Math.floor(Math.random() * 2)) ? 1 : -1, 0],
- "cherryRange": null,
- },
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- tempHigh: 200,
- stateHigh: ["steam", "ash"],
- onTryMoveInto: function(pixel,otherPixel) { //Move through
- var otherElement = otherPixel.element; //var element for readability
-
- var otherInfo = elements[otherElement]; //var info
-
- var otherState = "solid"; //consider things solid by default
- if(typeof(otherInfo.state) === "string") {
- otherState = otherInfo.state; //get actual state if it exists
- };
-
- var otherDensity = 1000; //consider density 1000 by default
- if(typeof(otherInfo.density) === "number") {
- otherDensity = otherInfo.density; //get actual density if it exists
- };
-
- var react = false; //default to no reaction
- if(typeof(otherInfo.reactions) === "object") { //look for reactions
- if(typeof(otherInfo.reactions[pixel.element]) === "object") { //look for reactions involving this element
- react = true; //if there are any, set reaction flag to true
- };
- };
-
- if(otherElement.endsWith("head") || otherElement.endsWith("body")) {
- //i don't want to make general MPL handling so I'll just try to exclude them;
- if(otherElement !== "antibody") {
- //exclude antibody from exclusion
- return false;
- };
- };
-
- if(otherElement !== pixel.element) { //allow this element from piling on itself
- if(logLeaves) { console.log("Other element is not cherry leaves") }; //yes, this code is for cherry leaves
- if(react) { //if there was a reaction in that previous step
- if(logLeaves) { console.log("Reacting pixels") };
- reactPixels(otherPixel,pixel); //react
- } else { //if no such reaction existed, move through
- if(logLeaves) { console.log("Moving pixels") };
- if((otherState !== "solid") || (otherState === "solid" && otherDensity > 100)) { //admit any non-solid, or any solid with a density over 100
- var pX = pixel.x; //var pixel coords for no particular reason
- var pY = pixel.y;
- var oX = otherPixel.x; //var other pixel's coords for no particular reason
- var oY = otherPixel.y;
- if(logLeaves) { console.log(`${otherElement} pixel (${oX},${oY}) trying to move info leaf block (${pX},${pY})`) };
- var dX = oX - pX; //get the difference between this's X and other's X; if the other pixel is moving from the space immediately to the right, this dX value should be 1
- var dY = oY - pY;
- var iDX = -1 * dX; //get the additive inverse; if we want to move such a pixel from the right to the left, we would change its +1 X offset to a -1 X offset for the coord sto move it to
- var iDY = -1 * dY;
- if(logLeaves) { console.log(`Old offset (relative to leaf): [${dX},${dY}], new offset [${iDX},${iDY}]`) };
- var fX = pX + iDX; //combine this pixel's X with the inverted offset we just made;
- //assuming this pixel is (23,31) and the other pixel is trying to move in to the left into this from (24,31),
- //the dX would be [1, 0], signifying that the other pixel is 1 pixel to the right of this
- //the space to the left of this, where it would go, is (22,31), and the offset for that pixel relative to this is [-1, 0]
- //to get the [-1, 0], we'd need to flip that [1, 0] offset (lmao flip that the song by loona), hence the inverse
- var fY = pY + iDY;
- if(logLeaves) { console.log(`Calculated final position: (${fX},${fY}), moving other pixel from (${oX},${oY})`) };
- tryMove(otherPixel,fX,fY);
- };
- };
- };
- },
- };
-
- /*if(!elements.diamond.reactions) { //test reaction
- elements.diamond.reactions = {};
- };
-
- elements.diamond.reactions.cherry_leaf = { "elem2": "dead_plant" };*/
-
- elements.cherry_plant_top = {
- hidden: true,
- color: "#310a0b",
- tick: function(pixel) {
- if(pixel.cherryRange === null) {
- pixel.cherryRange = randomNumberFromOneToThree();
- };
-
- if (pixel.age > 30 && pixel.temp < 100) {
- if(!pixel.grewLeftLeaves) {
- for(i = (0 - pixel.leafRange); i < 0; i++) { //left half
- if(i == 0) {
- continue;
- };
-
- var leafOffset = i; //readability
- var leafX = pixel.x + leafOffset; //set X to cherry_plant_top pixel's X + offset/index
- var leafAttachOffset = [1, 0]; //difference 1: attaches rightwards (+) for leaves left (-) of center
- var leafY = pixel.y; //set Y to default cherry_plant_top pixel's Y
- if(Math.abs(leafOffset) == pixel.leafRange) {
- leafY++; //place edge leaves 1 pixel downwards;
- leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
- };
-
- if(outOfBounds(leafX,leafY)) {
- continue;
- };
-
- if (isEmpty(leafX,leafY,false)) {
- createPixel("cherry_leaf",leafX,leafY);
- pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
- pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
- pixelMap[leafX][leafY].cherryRange = pixel.cherryRange;
- pixel.grewLeftLeaves = true; //difference 2: separate flag for left side
- } else {
- break;
- };
- };
- };
-
- if(!pixel.grewRightLeaves) {
- for(i = 1; i < (pixel.leafRange + 1); i++) { //right half
- if(i == 0) {
- continue;
- };
-
- var leafOffset = i; //readability
- var leafX = pixel.x + leafOffset; //set X to cherry_plant_top pixel's X + offset/index
- var leafAttachOffset = [-1, 0]; //difference 1: attaches leftwards (-) for leaves right (+) of center
- var leafY = pixel.y; //set Y to default cherry_plant_top pixel's Y
- if(Math.abs(leafOffset) == pixel.leafRange) {
- leafY++; //place edge leaves 1 pixel downwards;
- leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
- };
-
- if(outOfBounds(leafX,leafY)) {
- continue;
- };
-
- if (isEmpty(leafX,leafY,false)) {
- createPixel("cherry_leaf",leafX,leafY);
- pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
- pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
- pixelMap[leafX][leafY].cherryRange = pixel.cherryRange;
- pixel.grewRightLeaves = true; //difference 2: separate flag for right side
- } else {
- break;
- };
- };
- };
- };
- pixel.age++;
- doDefaults(pixel);
- },
- properties: {
- "age": 0,
- "leafRange": 2 + (Math.floor(Math.random() * 3)), //2-4
- "grewLeftLeaves": false,
- "grewRightLeaves": false,
- "cherryRange": null,
- },
- tempHigh: 100,
- stateHigh: "dead_plant",
- tempLow: -2,
- stateLow: "frozen_plant",
- burn: 5,
- burnInto: ["steam", "ash"],
- burnTime: 600,
- category: "life",
- state: "solid",
- density: 1500,
- };
-
-
- /*elements.cocoa_bean = {
- color: ["#f2ede9", "#f0dfce", "#e8cfb5"],
- behavior: behaviors.SOLID,
- category: "liquids",
- viscosity: 100000,
- state: "liquid",
- density: 593,
- tick: functi
- };*/
-} else {
- enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
- enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
- localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
- alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
+ };
+ },
};
+
+/*if(!elements.diamond.reactions) { //test reaction
+ elements.diamond.reactions = {};
+};
+
+elements.diamond.reactions.cherry_leaf = { "elem2": "dead_plant" };*/
+
+elements.cherry_plant_top = {
+ hidden: true,
+ color: "#310a0b",
+ tick: function(pixel) {
+ if(pixel.cherryRange === null) {
+ pixel.cherryRange = randomNumberFromOneToThree();
+ };
+
+ if (pixel.age > 30 && pixel.temp < 100) {
+ if(!pixel.grewLeftLeaves) {
+ for(i = (0 - pixel.leafRange); i < 0; i++) { //left half
+ if(i == 0) {
+ continue;
+ };
+
+ var leafOffset = i; //readability
+ var leafX = pixel.x + leafOffset; //set X to cherry_plant_top pixel's X + offset/index
+ var leafAttachOffset = [1, 0]; //difference 1: attaches rightwards (+) for leaves left (-) of center
+ var leafY = pixel.y; //set Y to default cherry_plant_top pixel's Y
+ if(Math.abs(leafOffset) == pixel.leafRange) {
+ leafY++; //place edge leaves 1 pixel downwards;
+ leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
+ };
+
+ if(outOfBounds(leafX,leafY)) {
+ continue;
+ };
+
+ if (isEmpty(leafX,leafY,false)) {
+ createPixel("cherry_leaf",leafX,leafY);
+ pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
+ pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
+ pixelMap[leafX][leafY].cherryRange = pixel.cherryRange;
+ pixel.grewLeftLeaves = true; //difference 2: separate flag for left side
+ } else {
+ break;
+ };
+ };
+ };
+
+ if(!pixel.grewRightLeaves) {
+ for(i = 1; i < (pixel.leafRange + 1); i++) { //right half
+ if(i == 0) {
+ continue;
+ };
+
+ var leafOffset = i; //readability
+ var leafX = pixel.x + leafOffset; //set X to cherry_plant_top pixel's X + offset/index
+ var leafAttachOffset = [-1, 0]; //difference 1: attaches leftwards (-) for leaves right (+) of center
+ var leafY = pixel.y; //set Y to default cherry_plant_top pixel's Y
+ if(Math.abs(leafOffset) == pixel.leafRange) {
+ leafY++; //place edge leaves 1 pixel downwards;
+ leafAttachOffset[1] = -1; //compensate by subtracting 1 from Y attach offset (less Y = higher position, so they attach diagonally up-right or up-left)
+ };
+
+ if(outOfBounds(leafX,leafY)) {
+ continue;
+ };
+
+ if (isEmpty(leafX,leafY,false)) {
+ createPixel("cherry_leaf",leafX,leafY);
+ pixelMap[leafX][leafY].attached = true; //set leaf's attached to true
+ pixelMap[leafX][leafY].attachOffsets = leafAttachOffset; //array of 2 numbers
+ pixelMap[leafX][leafY].cherryRange = pixel.cherryRange;
+ pixel.grewRightLeaves = true; //difference 2: separate flag for right side
+ } else {
+ break;
+ };
+ };
+ };
+ };
+ pixel.age++;
+ doDefaults(pixel);
+ },
+ properties: {
+ "age": 0,
+ "leafRange": 2 + (Math.floor(Math.random() * 3)), //2-4
+ "grewLeftLeaves": false,
+ "grewRightLeaves": false,
+ "cherryRange": null,
+ },
+ tempHigh: 100,
+ stateHigh: "dead_plant",
+ tempLow: -2,
+ stateLow: "frozen_plant",
+ burn: 5,
+ burnInto: ["steam", "ash"],
+ burnTime: 600,
+ category: "life",
+ state: "solid",
+ density: 1500,
+};
+
+
+/*elements.cocoa_bean = {
+ color: ["#f2ede9", "#f0dfce", "#e8cfb5"],
+ behavior: behaviors.SOLID,
+ category: "liquids",
+ viscosity: 100000,
+ state: "liquid",
+ density: 593,
+ tick: functi
+};*/
+}, true);
diff --git a/mods/zoom.js b/mods/zoom.js
index da7a037b..a2fe035a 100644
--- a/mods/zoom.js
+++ b/mods/zoom.js
@@ -1,322 +1,606 @@
-const zoom_levels = [
- 0.5,
- 1,
- 2,
- 3,
- 6,
- 12
-]
-window.zoom_data_div = null
-window.zoom_level = 1
-window.zoom_panning = [0,0]
-
-let colour_setting;
-
-dependOn("betterSettings.js", () => {
- const settings_tab = new SettingsTab("zoom.js");
- colour_setting = new Setting(
- "Canvas background",
- "canvas_bkg",
- settingType.COLOR,
- false,
- defaultValue="#252525"
- );
-
- settings_tab.registerSettings(undefined, colour_setting)
- settingsManager.registerTab(settings_tab)
-})
-
-function handle_zoom(direction){
- switch (direction){
- case "in":
- if (!(zoom_level+1 in zoom_levels)) { break; }
- window.zoom_level += 1
- break;
- case "out":
- if (!(zoom_level-1 in zoom_levels)) { break; }
- window.zoom_level -= 1
- break;
- }
- rescale()
-}
-
-function handle_pan(direction, speed){
- switch (direction){
- case "right":
- zoom_panning[0] -= speed
- break;
- case "left":
- zoom_panning[0] += speed
- break;
- case "up":
- zoom_panning[1] += speed
- break;
- case "down":
- zoom_panning[1] -= speed
- break;
- }
- rescale()
-}
-
-function gen_button(row, col, html, click, nopos, id){
- const elem = document.createElement("button")
-
-
- if (!nopos){
- elem.style.gridColumn = row
- elem.style.gridRow = col
+// zoom.js
+"use strict";
+(() => {
+ // src/custom_setting_types.ts
+ var def_classes = () => {
+ class Numlist2 extends Setting {
+ step;
+ input_container = null;
+ push_btn = null;
+ pop_btn = null;
+ constructor(name, storage_name, desc, options) {
+ super(
+ name,
+ storage_name,
+ [5, 0],
+ options.disabled,
+ options.default_values,
+ desc,
+ options.custom_validator
+ );
+ this.step = options.step ?? 1;
+ }
+ #new_input(value, i) {
+ const elem = document.createElement("input");
+ elem.type = "number";
+ elem.value = value.toString();
+ elem.step = this.step.toString();
+ elem.onchange = (ev) => {
+ const parsed = Number.parseFloat(ev.target.value);
+ if (!Number.isNaN(parsed)) {
+ this.value[i] = parsed;
+ this.set(this.value);
+ }
+ };
+ return elem;
+ }
+ #push_pop_btns() {
+ this.push_btn = document.createElement("button");
+ this.push_btn.style.color = "#0F0";
+ this.push_btn.innerText = "+";
+ this.pop_btn = document.createElement("button");
+ this.pop_btn.style.color = "#F00";
+ this.pop_btn.innerText = "-";
+ this.push_btn.onclick = () => {
+ this.value.push(1);
+ this.input_container.append(this.#new_input(1, this.value.length));
+ };
+ this.pop_btn.onclick = () => {
+ this.value.pop();
+ if (this.input_container.lastChild) {
+ this.input_container.removeChild(this.input_container.lastChild);
+ }
+ };
+ return [this.push_btn, this.pop_btn];
+ }
+ disable() {
+ this.push_btn?.setAttribute("disabled", "true");
+ this.pop_btn?.setAttribute("disabled", "true");
+ }
+ enable() {
+ this.push_btn?.removeAttribute("disabled");
+ this.pop_btn?.removeAttribute("disabled");
+ }
+ build() {
+ const value = this.get();
+ const container = document.createElement("span");
+ container.classList.add("setting-span", "zm_nml_setting");
+ const l_container = document.createElement("span");
+ const label = document.createElement("span");
+ label.innerText = this.name;
+ const btn_container = document.createElement("span");
+ btn_container.classList.add("zm_nml_btn_container");
+ btn_container.append(...this.#push_pop_btns());
+ l_container.append(label, document.createElement("br"), btn_container);
+ this.input_container = document.createElement("span");
+ this.input_container.classList.add("zm_nml_icontainer");
+ const elems = [];
+ value.forEach((x, i) => {
+ elems.push(this.#new_input(x, i));
+ });
+ this.input_container.append(...elems);
+ container.append(l_container, this.input_container);
+ return container;
+ }
}
- if (id) { elem.id = id }
-
- // Table for the data-pos to assign (row major). If null, don't add.
- const data_pos_map = [
- ["tl", null, "tr"],
- [null, null, null],
- ["bl", null, "br"]
- ]
-
- elem.innerHTML = html
- elem.onclick = click
-
- if (data_pos_map[row-1][col-1] !== null) {
- elem.dataset.pos = data_pos_map[row-1][col-1]
+ class MultiSetting extends Setting {
+ settings;
+ elements = [];
+ multi_input_name;
+ rows = [];
+ constructor(name, storage_name, extra_opts, ...settings) {
+ super(
+ name,
+ storage_name,
+ [255],
+ extra_opts.disabled,
+ extra_opts.default_value ?? 0,
+ extra_opts.desc,
+ void 0
+ );
+ this.settings = settings;
+ this.multi_input_name = crypto.randomUUID();
+ }
+ build() {
+ const container = document.createElement("span");
+ this.settings.forEach((setting, i) => {
+ const row_container = document.createElement("div");
+ row_container.classList.add("zm_ms_row");
+ this.rows.push(row_container);
+ const select_btn = document.createElement("button");
+ select_btn.classList.add("zm_ms_selbtn");
+ select_btn.innerText = "#";
+ const built_item = setting.build();
+ built_item.classList.add("zm_ms_item");
+ built_item.dataset.index = i.toString();
+ row_container.dataset.current = i == this.value ? "true" : "false";
+ select_btn.onclick = () => {
+ this.set(i);
+ setting.enable();
+ for (const setting2 of this.settings) setting2.disable();
+ for (const row of this.rows) {
+ row.dataset.current = "false";
+ row.querySelectorAll(".zm_ms_item input").forEach((x) => x.setAttribute("disabled", "true"));
+ }
+ built_item.querySelectorAll("input").forEach((x) => x.removeAttribute("disabled"));
+ row_container.dataset.current = "true";
+ };
+ row_container.append(select_btn, built_item);
+ container.appendChild(row_container);
+ });
+ return container;
+ }
}
-
- return elem
-}
-
-function add_css(){
- const CSS = `
- #zm_data_div { margin-bottom: 10px }
- #canvasDiv { overflow: hidden; background-color: var(--opac-85) }
-
- @media(pointer=coarse){
- #zm_floater_container#zm_floater_container {
- width: 40%;
- height: auto;
+ class SettingGroup extends Setting {
+ settings;
+ constructor(settings) {
+ super(
+ "",
+ "",
+ [2763],
+ false
+ );
+ this.settings = settings;
+ }
+ enable() {
+ for (const x of Object.values(this.settings)) {
+ x.enable();
}
- #zm_floater_container:has(#zm_collapse[data-collapsed="true"]){
- width: calc(40% / 3);
+ }
+ disable() {
+ for (const x of Object.values(this.settings)) {
+ x.disable();
}
- }
-
- @media(pointer:coarse) and (orientation:landscape){
- #zm_floater_container#zm_floater_container {
- width: auto;
- top: 5px;
- }
- #zm_floater_container:has(#zm_collapse[data-collapsed="true"]){
- width: calc(40% / 3);
+ }
+ build() {
+ const container = document.createElement("div");
+ for (const x of Object.values(this.settings)) {
+ container.appendChild(x.build());
}
+ return container;
+ }
+ get() {
+ return this.settings;
+ }
+ // Override these so the defaults don't do anything
+ set() {
+ }
+ update() {
+ }
+ onUpdate() {
+ }
}
+ return {
+ Numlist: Numlist2,
+ MultiSetting,
+ SettingGroup
+ };
+ };
- #colorSelector { z-index: 1; right: 5px }
- #zm_floater_container {
- position: absolute;
- display: grid;
-
- right: 5px;
- bottom: 5px;
- height: 100px;
- aspect-ratio: 1;
-
- max-width: 200px;
- max-height: 200px;
-
- border: 2px solid white;
- background-color: black;
- font-size: 120%;
-
- button { text-align: center; border: 0px solid white }
-
- button:where([data-pos="tl"]) { border-width: 0px 2px 2px 0px };
- button:where([data-pos="tr"]) { border-width: 2px 2px 0px 0px };
- button:where([data-pos="bl"]) { border-width: 0px 0px 2px 2px };
- button:where([data-pos="br"]) { border-width: 2px 0px 0px 2px };
- }
- #zm_floater_container:has(#zm_collapse[data-collapsed="true"]) {
- height: 50px;
-
- button:not(#zm_collapse) {
- display: none;
- }
- }
- #canvasDiv:has(#colorSelector[style *= "block"]) #zm_floater_container {
- bottom: 50px;
- }
-
- .zm_corner { border: 2px solid white; }
-
- #zm_collapse {
- grid-row: 3;
- grid-column: 3;
- }
- #zm_collapse[data-collapsed="true"] {
- grid-row: 1;
- grid-column: 1;
- border-width: 0px;
- }
- `
-
- const style_div = document.createElement("style")
- style_div.innerHTML = CSS
-
- document.head.appendChild(style_div)
-}
-
-function add_zoom_floaters(){
- const container = document.createElement("div")
- container.id = "zm_floater_container"
-
- // Pan mode selector (C: Coarse F: Fine)
- const pan_mode_sel = gen_button(
- 1,3, "C",
- (evt) => {
- evt.target.dataset.mode = evt.target.dataset.mode == "F" ? "C" : "F"
- evt.target.innerText = evt.target.dataset.mode
- },
+ // src/custom_settings.ts
+ var CustomSettingsManager = class {
+ canvas_bkg;
+ zoom;
+ unl_zoom;
+ fpan_speed;
+ cpan_speed;
+ upan_speed;
+ use_ijkl;
+ show_floater;
+ pan_zeroing_en;
+ zoom_zeroing_en;
+ constructor(on_edit) {
+ const { Numlist: Numlist2, MultiSetting, SettingGroup } = def_classes();
+ const settings_tab = new SettingsTab("zoom.js");
+ const validator = () => {
+ on_edit.cb(this);
+ return true;
+ };
+ this.canvas_bkg = new Setting(
+ "Canvas background",
+ "canvas_bkg",
+ settingType.COLOR,
false,
- "zm_panmode_sel"
- )
-
- const speed = () =>
- (window.zoom_level > 3 ? 5 : 10) * // More granular at higher zoom levels
- (pan_mode_sel.dataset.mode == "F" ? 0.25 : 1) // Increase granularity in fine mode
-
- container.append(
- // Direction buttons
- gen_button(2,1, "↑", () => handle_pan("up" ,speed())),
- gen_button(1,2, "←", () => handle_pan("left" ,speed())),
- gen_button(3,2, "→", () => handle_pan("right" ,speed())),
- gen_button(2,3, "↓", () => handle_pan("down" ,speed())),
-
- // Zoom buttons
- gen_button(1,1, "+", () => handle_zoom("in")),
- gen_button(3,1, "-", () => handle_zoom("out")),
-
- // Collapse button
- gen_button(
- 3,3, "#",
- (evt) => {
- evt.target.dataset.collapsed = evt.target.dataset.collapsed == "true"
- ? "false"
- : "true"
- },
- true,
- "zm_collapse"
+ "#252525",
+ "The colour for the area around the canvas",
+ validator
+ );
+ this.cpan_speed = new Setting(
+ "Coarse pan speed",
+ "cpan_speed",
+ settingType.NUMBER,
+ false,
+ 10,
+ "The default pan speed",
+ validator
+ );
+ this.fpan_speed = new Setting(
+ "Fine pan speed",
+ "fpan_speed",
+ settingType.NUMBER,
+ false,
+ 3,
+ "The pan speed when holding shift (F in the floater)",
+ validator
+ );
+ this.upan_speed = new Setting(
+ "Ultrafine pan speed",
+ "upan_speed",
+ settingType.NUMBER,
+ false,
+ 1,
+ "The pan speed when holding alt (U in the floater)",
+ validator
+ );
+ this.show_floater = new Setting(
+ "Show floater",
+ "show_floater",
+ settingType.BOOLEAN,
+ false,
+ true,
+ "Whether to show the floater or not",
+ validator
+ );
+ this.use_ijkl = new Setting(
+ "Use IJKL",
+ "use_ijkl",
+ settingType.BOOLEAN,
+ false,
+ false,
+ "Makes the mod use IJKL instead of WASD for panning (requires refresh)",
+ validator
+ );
+ this.pan_zeroing_en = new Setting(
+ "Enable pan zeroing",
+ "en_pzero",
+ settingType.BOOLEAN,
+ false,
+ true,
+ "Allows the Q key to reset pan (requires refresh)",
+ validator
+ );
+ this.zoom_zeroing_en = new Setting(
+ "Enable zoom zeroing",
+ "en_zzero",
+ settingType.BOOLEAN,
+ false,
+ true,
+ "Allows the P key to reset zoom. Doesn't work with set zoom levels (requires refresh)",
+ validator
+ );
+ const zoom_levels = new Numlist2(
+ "Zoom levels",
+ "zoom_levels",
+ "Zoom levels",
+ {
+ default_values: [0.5, 1, 2, 3, 6, 12],
+ step: 0.1,
+ custom_validator: validator
+ }
+ );
+ this.unl_zoom = new SettingGroup({
+ speed: new Setting(
+ "Zoom speed",
+ "unl_zoom_speed",
+ settingType.NUMBER,
+ false,
+ 2,
+ "The zoom magnitude (as the multiplier to the zoom level every time zoom is used)",
+ validator
),
- pan_mode_sel
- )
-
- const canvas_div = document.getElementById("canvasDiv")
- canvas_div.style.backgroundColor = colour_setting?.value ?? "#252525"
- canvas_div.appendChild(container)
-}
-
-function rescale(){
- log_info()
-
- const scale = zoom_levels[zoom_level]
- const x = zoom_panning[0] * (pixelSize * scale)
- const y = zoom_panning[1] * (pixelSize * scale)
-
- gameCanvas.style.transform = `translate(${x}px, ${y}px) translateX(-50%) scale(${scale})`
-}
-
-function log_info(){
- // Values are negated to make them more intuitive
- const x_pan = (-zoom_panning[0]).toString().padEnd(4)
- const y_pan = (-zoom_panning[1]).toString().padEnd(4)
-
- if (zoom_data_div === null){ return; }
-
- zoom_data_div.innerText = ""
- zoom_data_div.innerText += `Scale: ${zoom_levels[zoom_level]}x\n`
- zoom_data_div.innerText += `Pan : ${x_pan}, ${y_pan}`
-}
-
-function patch_keybinds(){
- // Be more granular at higher zoom levels
- const speed_a = () => zoom_level > 3 ? 5 : 10
- const speed_b = () => zoom_level > 3 ? 10 : 20
-
- keybinds["9"] = () => handle_zoom("in")
- keybinds["0"] = () => handle_zoom("out")
-
- keybinds["w"] = () => handle_pan("up", speed_a())
- keybinds["a"] = () => handle_pan("left", speed_a())
- keybinds["s"] = () => handle_pan("down", speed_a())
- keybinds["d"] = () => handle_pan("right", speed_a())
-
- keybinds["W"] = () => handle_pan("up", speed_b())
- keybinds["A"] = () => handle_pan("left", speed_b())
- keybinds["S"] = () => handle_pan("down", speed_b())
- keybinds["D"] = () => handle_pan("right", speed_b())
-}
-
-function patch_ui(){
- add_css()
- add_zoom_floaters()
-
- zoom_data_div = document.createElement("div")
- zoom_data_div.id = "zm_data_div"
- document.getElementById("logDiv").prepend(zoom_data_div)
-
- const controls_table = document.getElementById("controlsTable").lastElementChild
- controls_table.insertAdjacentHTML("beforeBegin",`
-
- Zoom in/out
-
- 9 /
- 0
-
-
-
- Pan
-
- W
- A
- S
- D
-
-
-
- Pan (fast)
-
- Shift +
- W
- A
- S
- D
-
-
- `)
-}
-
-// Redefine to give correct numbers when zoomed
-window.getMousePos = (canvas, evt) => {
- if (evt.touches) {
- evt.preventDefault();
- evt = evt.touches[0];
- isMobile = true;
+ min: new Setting(
+ "Zoom limit (min)",
+ "unl_zlim_min",
+ settingType.NUMBER,
+ false,
+ 0.25,
+ "The lower zoom limit (reducing may lead to rounding error coming back from very low levels)",
+ validator
+ ),
+ max: new Setting(
+ "Zoom limit (max)",
+ "unl_zlim_max",
+ settingType.NUMBER,
+ false,
+ 25,
+ "The upper zoom limit (reducing may lead to rounding error coming back from very high levels)",
+ validator
+ )
+ });
+ this.zoom = new MultiSetting(
+ "Zoom mode",
+ "zoom_mode",
+ {},
+ zoom_levels,
+ this.unl_zoom
+ );
+ settings_tab.registerSettings(
+ void 0,
+ this.canvas_bkg
+ );
+ settings_tab.registerSettings(
+ "Controls",
+ this.use_ijkl,
+ this.show_floater,
+ this.pan_zeroing_en,
+ this.zoom_zeroing_en
+ );
+ settings_tab.registerSettings(
+ "Zoom",
+ this.zoom
+ );
+ settings_tab.registerSettings(
+ "Panning",
+ this.cpan_speed,
+ this.fpan_speed,
+ this.upan_speed
+ );
+ settingsManager.registerTab(settings_tab);
}
- const rect = canvas.getBoundingClientRect();
+ };
- let x = (evt.clientX - rect.left) / zoom_levels[zoom_level];
- let y = (evt.clientY - rect.top) / zoom_levels[zoom_level];
+ // src/handler.ts
+ var Handler = class {
+ settings;
+ patcher;
+ zoom_panning = [0, 0];
+ zoom_level;
+ constructor(settings, patcher) {
+ this.settings = settings;
+ this.patcher = patcher;
+ this.zoom_level = 1;
+ this.patch_keybinds();
+ this.patch_floater();
+ window.getMousePos = (canvas2, evt) => {
+ if (evt.touches) {
+ evt.preventDefault();
+ evt = evt.touches[0];
+ isMobile = true;
+ }
+ const rect = canvas2.getBoundingClientRect();
+ const clx = evt.clientX;
+ const cly = evt.clientY;
+ let x = (clx - rect.left) / this.scale();
+ let y = (cly - rect.top) / this.scale();
+ x = Math.floor(x / canvas2.clientWidth * (width + 1));
+ y = Math.floor(y / canvas2.clientHeight * (height + 1));
+ return { x, y };
+ };
+ runAfterReset(() => {
+ this.zoom_level = 1;
+ this.zoom_panning = [0, 0];
+ this.update();
+ });
+ }
+ handle_zoom(direction) {
+ if (this.settings.zoom.value == 0) {
+ switch (direction) {
+ case "in":
+ if (!(this.zoom_level + 1 in this.settings.zoom.settings[0].value)) {
+ break;
+ }
+ this.zoom_level += 1;
+ break;
+ case "out":
+ if (!(this.zoom_level - 1 in this.settings.zoom.settings[0].value)) {
+ break;
+ }
+ this.zoom_level -= 1;
+ break;
+ }
+ } else {
+ const settings = this.settings.zoom.settings[1].settings;
+ const speed = settings.speed.value;
+ const min = settings.min.value;
+ const max = settings.max.value;
+ switch (direction) {
+ case "in":
+ if (this.zoom_level * speed > max) break;
+ this.zoom_level *= speed;
+ break;
+ case "out":
+ if (this.zoom_level / speed < min) break;
+ this.zoom_level /= speed;
+ break;
+ }
+ this.zoom_level = Number(this.zoom_level.toPrecision(3));
+ }
+ this.update();
+ }
+ handle_pan(direction, speed) {
+ switch (direction) {
+ case "right":
+ this.zoom_panning[0] -= speed;
+ break;
+ case "left":
+ this.zoom_panning[0] += speed;
+ break;
+ case "up":
+ this.zoom_panning[1] += speed;
+ break;
+ case "down":
+ this.zoom_panning[1] -= speed;
+ break;
+ }
+ this.update();
+ }
+ scale() {
+ return this.settings.zoom.value == 0 ? this.settings.zoom.settings[0].value[this.zoom_level] : this.zoom_level;
+ }
+ update() {
+ this.log_info();
+ const x = this.zoom_panning[0] * (pixelSize * this.scale());
+ const y = this.zoom_panning[1] * (pixelSize * this.scale());
+ canvas.style.transform = `translate(${x}px, ${y}px) translateX(-50%) scale(${this.scale()})`;
+ }
+ log_info() {
+ const x_pan = (-this.zoom_panning[0]).toString().padEnd(4);
+ const y_pan = (-this.zoom_panning[1]).toString().padEnd(4);
+ this.patcher.zoom_data_div.innerText = "";
+ this.patcher.zoom_data_div.innerText += `Scale: ${this.scale()}x
+`;
+ this.patcher.zoom_data_div.innerText += `Pan : ${x_pan}, ${y_pan}`;
+ }
+ kbd_speed_noshift(ev) {
+ return ev.altKey ? this.settings.upan_speed.value : this.settings.cpan_speed.value;
+ }
+ patch_keybinds() {
+ const pan_keys = this.settings.use_ijkl.value ? ["i", "j", "k", "l"] : ["w", "a", "s", "d"];
+ const pan_keys_upper = this.settings.use_ijkl.value ? ["I", "J", "K", "L"] : ["W", "A", "S", "D"];
+ keybinds["9"] = () => this.handle_zoom("in");
+ keybinds["0"] = () => this.handle_zoom("out");
+ keybinds[pan_keys[0]] = (ev) => this.handle_pan("up", this.kbd_speed_noshift(ev));
+ keybinds[pan_keys[1]] = (ev) => this.handle_pan("left", this.kbd_speed_noshift(ev));
+ keybinds[pan_keys[2]] = (ev) => this.handle_pan("down", this.kbd_speed_noshift(ev));
+ keybinds[pan_keys[3]] = (ev) => this.handle_pan("right", this.kbd_speed_noshift(ev));
+ keybinds[pan_keys_upper[0]] = () => this.handle_pan("up", this.settings.fpan_speed.value);
+ keybinds[pan_keys_upper[1]] = () => this.handle_pan("left", this.settings.fpan_speed.value);
+ keybinds[pan_keys_upper[2]] = () => this.handle_pan("down", this.settings.fpan_speed.value);
+ keybinds[pan_keys_upper[3]] = () => this.handle_pan("right", this.settings.fpan_speed.value);
+ if (this.settings.pan_zeroing_en.value) {
+ keybinds["q"] = () => {
+ this.zoom_panning = [0, 0];
+ this.update();
+ };
+ }
+ if (this.settings.zoom_zeroing_en.value) {
+ keybinds["p"] = () => {
+ if (this.settings.zoom.value == 1) this.zoom_level = 1;
+ this.update();
+ };
+ }
+ }
+ floater_speed() {
+ switch (this.patcher.panmode_sel.innerText) {
+ case "C":
+ return this.settings.cpan_speed.value;
+ case "F":
+ return this.settings.fpan_speed.value;
+ case "U":
+ return this.settings.upan_speed.value;
+ default:
+ return 0;
+ }
+ }
+ patch_floater() {
+ function patch(id, fn) {
+ document.getElementById(id).onclick = fn;
+ }
+ patch("zm_floater_zi", () => this.handle_zoom("in"));
+ patch("zm_floater_zo", () => this.handle_zoom("out"));
+ patch("zm_floater_u", () => this.handle_pan("up", this.floater_speed()));
+ patch("zm_floater_d", () => this.handle_pan("down", this.floater_speed()));
+ patch("zm_floater_l", () => this.handle_pan("left", this.floater_speed()));
+ patch("zm_floater_r", () => this.handle_pan("right", this.floater_speed()));
+ }
+ };
- x = Math.floor((x / canvas.clientWidth) * (width+1));
- y = Math.floor((y / canvas.clientHeight) * (height+1));
+ // assets/numlist.css
+ var numlist_default = "#settingsMenu .zm_nml_btn_container button { font-size: 2em; padding: 0px; margin: 0px;}\r\n#settingsMenu .zm_nml_icontainer { align-self: center }\r\n#settingsMenu .zm_nml_setting { display: grid; grid-template-columns: 7em 1fr;}\r\n\r\n#settingsMenu .zm_nml_setting span {\r\n input { width: 2em; margin-right: 4px; margin-bottom: 4px;}\r\n \r\n input:focus {\r\n outline: none;\r\n box-shadow: none;\r\n border-color: white;\r\n }\r\n}";
- return {x:x, y:y};
+ // assets/main.css
+ var main_default = '#zm_data_div { margin-bottom: 10px }\r\n#canvasDiv { overflow: hidden; background-color: var(--opac-85) }\r\n\r\n@media(pointer=coarse){\r\n #zm_floater_container#zm_floater_container { \r\n width: 40%;\r\n height: auto;\r\n }\r\n #zm_floater_container:has(#zm_collapse[data-collapsed="true"]){\r\n width: calc(40% / 3);\r\n }\r\n}\r\n\r\n@media(pointer:coarse) and (orientation:landscape){\r\n #zm_floater_container#zm_floater_container {\r\n width: auto;\r\n top: 5px;\r\n }\r\n #zm_floater_container:has(#zm_collapse[data-collapsed="true"]){\r\n width: calc(40% / 3);\r\n }\r\n}\r\n\r\n#colorSelector { z-index: 1; right: 5px }\r\n#zm_floater_container {\r\n position: absolute;\r\n display: grid;\r\n\r\n right: 5px;\r\n bottom: 5px;\r\n height: 100px;\r\n aspect-ratio: 1;\r\n\r\n max-width: 200px;\r\n max-height: 200px;\r\n\r\n border: 2px solid white;\r\n background-color: black;\r\n font-size: 120%;\r\n\r\n button { text-align: center; border: 0px solid white }\r\n\r\n button:where([data-pos="tl"]) { border-width: 0px 2px 2px 0px };\r\n button:where([data-pos="tr"]) { border-width: 2px 2px 0px 0px };\r\n button:where([data-pos="bl"]) { border-width: 0px 0px 2px 2px };\r\n button:where([data-pos="br"]) { border-width: 2px 0px 0px 2px };\r\n}\r\n#zm_floater_container:has(#zm_collapse[data-collapsed="true"]) {\r\n height: 50px;\r\n \r\n button:not(#zm_collapse) { display: none; }\r\n}\r\n#canvasDiv:has(#colorSelector[style *= "block"]) #zm_floater_container {\r\n bottom: 50px;\r\n}\r\n\r\n.zm_corner { border: 2px solid white; }\r\n\r\n#zm_collapse {\r\n grid-row: 3;\r\n grid-column: 3;\r\n}\r\n#zm_collapse[data-collapsed="true"] {\r\n grid-row: 1;\r\n grid-column: 1;\r\n border-width: 0px;\r\n}';
+
+ // assets/multisetting.css
+ var multisetting_default = '.zm_ms_row {\r\n display: grid;\r\n grid-template-columns: 2.2em 1fr; \r\n}\r\n\r\n.zm_ms_row[data-current="false"] {\r\n .zm_ms_selbtn { color: transparent }\r\n}\r\n\r\n.zm_ms_selbtn.zm_ms_selbtn:not(#_) {\r\n height: 100%;\r\n width: calc(100% - 10px);\r\n\r\n margin-right: 2px;\r\n padding: 0px;\r\n\r\n border: 2px solid var(--theme);\r\n font-size: 1.5em;\r\n}';
+
+ // assets/ctrl_info.html
+ var ctrl_info_default = "\r\n Zoom in/out \r\n \r\n 9 /\r\n 0 \r\n \r\n \r\n\r\n Pan \r\n \r\n W \r\n A \r\n S \r\n D \r\n \r\n \r\n\r\n Pan (fast) \r\n \r\n Shift + \r\n W \r\n A \r\n S \r\n D \r\n \r\n ";
+
+ // assets/floater.html
+ var floater_default = '\r\n ↑ \r\n ↓ \r\n ← \r\n → \r\n \r\n + \r\n - \r\n\r\n # \r\n C \r\n
';
+
+ // assets/nlist_spinner.png
+ var nlist_spinner_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAYCAYAAADH2bwQAAAAcklEQVQokcWSXQrAIAyDv8oOoPe/49wJzB7coIg/jA2WPhQ1TdOiATsThNmjJ8QV4XjdokIkRHqiEAF2NAgoSw8GlCuD3K3zYEzgFdSQBbA15LaYQN1i9lU+3y16CgDqjSl/MKBoMIk5DyNk46sf9SfhBITwI86iGhy9AAAAAElFTkSuQmCC";
+
+ // assets/spinner.css.ts
+ var CSS = `
+#betterSettings\\/div\\/zoom\\.js input::-webkit-inner-spin-button,
+#betterSettings\\/div\\/zoom\\.js input::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ width: 0.75em;
+ background: #000 url(${nlist_spinner_default}) no-repeat center center;
+ background-size: 100%;
+ border-left: 2px solid var(--theme);
+ image-rendering: pixelated;
+ opacity: 0.8;
}
+#betterSettings\\/div\\/zoom\\.js input::-webkit-inner-spin-button:hover,
+#betterSettings\\/div\\/zoom\\.js input::-webkit-outer-spin-button:active {
+ border-left: 2px solid white;
+ opacity: 1;
+}
+`;
+ var spinner_css_default = CSS;
-runAfterReset(() => {
- window.zoom_level = 1
- rescale()
-})
+ // src/patcher.ts
+ var Patcher = class {
+ zoom_data_div;
+ floater_div;
+ canvas_div;
+ settings;
+ panmode_sel;
+ constructor(settings) {
+ this.settings = settings;
+ const style_div = document.createElement("style");
+ style_div.innerHTML = main_default;
+ document.head.appendChild(style_div);
+ dependOn("betterSettings.js", () => {
+ const style_div2 = document.createElement("style");
+ style_div2.innerHTML = numlist_default + multisetting_default + spinner_css_default;
+ document.head.appendChild(style_div2);
+ });
+ this.canvas_div = document.getElementById("canvasDiv");
+ this.canvas_div.insertAdjacentHTML("beforeend", floater_default);
+ this.floater_div = document.getElementById("zm_floater_container");
+ this.panmode_sel = document.getElementById("zm_panmode_sel");
+ this.panmode_sel.onclick = () => {
+ switch (this.panmode_sel.innerText) {
+ case "C":
+ this.panmode_sel.innerText = "F";
+ break;
+ case "F":
+ this.panmode_sel.innerText = "U";
+ break;
+ case "U":
+ this.panmode_sel.innerText = "C";
+ break;
+ }
+ };
+ const collapse_btn = document.getElementById("zm_collapse");
+ collapse_btn.onclick = () => {
+ collapse_btn.dataset.collapsed = collapse_btn.dataset.collapsed == "true" ? "false" : "true";
+ };
+ this.zoom_data_div = document.createElement("div");
+ this.zoom_data_div.id = "zm_data_div";
+ document.getElementById("logDiv")?.prepend(this.zoom_data_div);
+ document.getElementById("controlsTable")?.lastElementChild?.insertAdjacentHTML("beforebegin", ctrl_info_default);
+ this.update_from_settings();
+ runAfterLoad(() => {
+ const cb = this.update_from_settings.bind(this);
+ for (const elem of document.querySelectorAll("#betterSettings\\/div\\/zoom\\.js span.setting-span input")) {
+ elem.addEventListener(elem.classList.contains("toggleInput") ? "click" : "change", cb);
+ }
+ });
+ }
+ update_from_settings() {
+ this.floater_div.style.display = this.settings.show_floater.value ? "grid" : "none";
+ this.canvas_div.style.backgroundColor = this.settings.canvas_bkg.value ?? "#252525";
+ }
+ };
-runAfterLoad(() => {
- patch_keybinds()
- patch_ui()
-})
+ // src/main.ts
+ dependOn("betterSettings.js", () => {
+ const on_change = { cb: () => {
+ } };
+ const settings_manager = new CustomSettingsManager(on_change);
+ runAfterLoad(() => {
+ const patcher = new Patcher(settings_manager);
+ const handler = new Handler(settings_manager, patcher);
+ });
+ }, true);
+})();
diff --git a/mods/zoom_legacy.js b/mods/zoom_legacy.js
new file mode 100644
index 00000000..28016110
--- /dev/null
+++ b/mods/zoom_legacy.js
@@ -0,0 +1,322 @@
+const zoom_levels = [
+ 0.5,
+ 1,
+ 2,
+ 3,
+ 6,
+ 12
+]
+window.zoom_data_div = null
+window.zoom_level = 1
+window.zoom_panning = [0,0]
+
+let colour_setting;
+
+dependOn("betterSettings.js", () => {
+ const settings_tab = new SettingsTab("zoom.js");
+ colour_setting = new Setting(
+ "Canvas background",
+ "canvas_bkg",
+ settingType.COLOR,
+ false,
+ defaultValue="#252525"
+ );
+
+ settings_tab.registerSettings(undefined, colour_setting)
+ settingsManager.registerTab(settings_tab)
+})
+
+function handle_zoom(direction){
+ switch (direction){
+ case "in":
+ if (!(zoom_level+1 in zoom_levels)) { break; }
+ window.zoom_level += 1
+ break;
+ case "out":
+ if (!(zoom_level-1 in zoom_levels)) { break; }
+ window.zoom_level -= 1
+ break;
+ }
+ rescale()
+}
+
+function handle_pan(direction, speed){
+ switch (direction){
+ case "right":
+ zoom_panning[0] -= speed
+ break;
+ case "left":
+ zoom_panning[0] += speed
+ break;
+ case "up":
+ zoom_panning[1] += speed
+ break;
+ case "down":
+ zoom_panning[1] -= speed
+ break;
+ }
+ rescale()
+}
+
+function gen_button(row, col, html, click, nopos, id){
+ const elem = document.createElement("button")
+
+
+ if (!nopos){
+ elem.style.gridColumn = row
+ elem.style.gridRow = col
+ }
+ if (id) { elem.id = id }
+
+ // Table for the data-pos to assign (row major). If null, don't add.
+ const data_pos_map = [
+ ["tl", null, "tr"],
+ [null, null, null],
+ ["bl", null, "br"]
+ ]
+
+ elem.innerHTML = html
+ elem.onclick = click
+
+ if (data_pos_map[row-1][col-1] !== null) {
+ elem.dataset.pos = data_pos_map[row-1][col-1]
+ }
+
+ return elem
+}
+
+function add_css(){
+ const CSS = `
+ #zm_data_div { margin-bottom: 10px }
+ #canvasDiv { overflow: hidden; background-color: var(--opac-85) }
+
+ @media(pointer=coarse){
+ #zm_floater_container#zm_floater_container {
+ width: 40%;
+ height: auto;
+ }
+ #zm_floater_container:has(#zm_collapse[data-collapsed="true"]){
+ width: calc(40% / 3);
+ }
+ }
+
+ @media(pointer:coarse) and (orientation:landscape){
+ #zm_floater_container#zm_floater_container {
+ width: auto;
+ top: 5px;
+ }
+ #zm_floater_container:has(#zm_collapse[data-collapsed="true"]){
+ width: calc(40% / 3);
+ }
+ }
+
+ #colorSelector { z-index: 1; right: 5px }
+ #zm_floater_container {
+ position: absolute;
+ display: grid;
+
+ right: 5px;
+ bottom: 5px;
+ height: 100px;
+ aspect-ratio: 1;
+
+ max-width: 200px;
+ max-height: 200px;
+
+ border: 2px solid white;
+ background-color: black;
+ font-size: 120%;
+
+ button { text-align: center; border: 0px solid white }
+
+ button:where([data-pos="tl"]) { border-width: 0px 2px 2px 0px };
+ button:where([data-pos="tr"]) { border-width: 2px 2px 0px 0px };
+ button:where([data-pos="bl"]) { border-width: 0px 0px 2px 2px };
+ button:where([data-pos="br"]) { border-width: 2px 0px 0px 2px };
+ }
+ #zm_floater_container:has(#zm_collapse[data-collapsed="true"]) {
+ height: 50px;
+
+ button:not(#zm_collapse) {
+ display: none;
+ }
+ }
+ #canvasDiv:has(#colorSelector[style *= "block"]) #zm_floater_container {
+ bottom: 50px;
+ }
+
+ .zm_corner { border: 2px solid white; }
+
+ #zm_collapse {
+ grid-row: 3;
+ grid-column: 3;
+ }
+ #zm_collapse[data-collapsed="true"] {
+ grid-row: 1;
+ grid-column: 1;
+ border-width: 0px;
+ }
+ `
+
+ const style_div = document.createElement("style")
+ style_div.innerHTML = CSS
+
+ document.head.appendChild(style_div)
+}
+
+function add_zoom_floaters(){
+ const container = document.createElement("div")
+ container.id = "zm_floater_container"
+
+ // Pan mode selector (C: Coarse F: Fine)
+ const pan_mode_sel = gen_button(
+ 1,3, "C",
+ (evt) => {
+ evt.target.dataset.mode = evt.target.dataset.mode == "F" ? "C" : "F"
+ evt.target.innerText = evt.target.dataset.mode
+ },
+ false,
+ "zm_panmode_sel"
+ )
+
+ const speed = () =>
+ (window.zoom_level > 3 ? 5 : 10) * // More granular at higher zoom levels
+ (pan_mode_sel.dataset.mode == "F" ? 0.25 : 1) // Increase granularity in fine mode
+
+ container.append(
+ // Direction buttons
+ gen_button(2,1, "↑", () => handle_pan("up" ,speed())),
+ gen_button(1,2, "←", () => handle_pan("left" ,speed())),
+ gen_button(3,2, "→", () => handle_pan("right" ,speed())),
+ gen_button(2,3, "↓", () => handle_pan("down" ,speed())),
+
+ // Zoom buttons
+ gen_button(1,1, "+", () => handle_zoom("in")),
+ gen_button(3,1, "-", () => handle_zoom("out")),
+
+ // Collapse button
+ gen_button(
+ 3,3, "#",
+ (evt) => {
+ evt.target.dataset.collapsed = evt.target.dataset.collapsed == "true"
+ ? "false"
+ : "true"
+ },
+ true,
+ "zm_collapse"
+ ),
+ pan_mode_sel
+ )
+
+ const canvas_div = document.getElementById("canvasDiv")
+ canvas_div.style.backgroundColor = colour_setting?.value ?? "#252525"
+ canvas_div.appendChild(container)
+}
+
+function rescale(){
+ log_info()
+
+ const scale = zoom_levels[zoom_level]
+ const x = zoom_panning[0] * (pixelSize * scale)
+ const y = zoom_panning[1] * (pixelSize * scale)
+
+ gameCanvas.style.transform = `translate(${x}px, ${y}px) translateX(-50%) scale(${scale})`
+}
+
+function log_info(){
+ // Values are negated to make them more intuitive
+ const x_pan = (-zoom_panning[0]).toString().padEnd(4)
+ const y_pan = (-zoom_panning[1]).toString().padEnd(4)
+
+ if (zoom_data_div === null){ return; }
+
+ zoom_data_div.innerText = ""
+ zoom_data_div.innerText += `Scale: ${zoom_levels[zoom_level]}x\n`
+ zoom_data_div.innerText += `Pan : ${x_pan}, ${y_pan}`
+}
+
+function patch_keybinds(){
+ // Be more granular at higher zoom levels
+ const speed_a = () => zoom_level > 3 ? 5 : 10
+ const speed_b = () => zoom_level > 3 ? 10 : 20
+
+ keybinds["9"] = () => handle_zoom("in")
+ keybinds["0"] = () => handle_zoom("out")
+
+ keybinds["w"] = () => handle_pan("up", speed_a())
+ keybinds["a"] = () => handle_pan("left", speed_a())
+ keybinds["s"] = () => handle_pan("down", speed_a())
+ keybinds["d"] = () => handle_pan("right", speed_a())
+
+ keybinds["W"] = () => handle_pan("up", speed_b())
+ keybinds["A"] = () => handle_pan("left", speed_b())
+ keybinds["S"] = () => handle_pan("down", speed_b())
+ keybinds["D"] = () => handle_pan("right", speed_b())
+}
+
+function patch_ui(){
+ add_css()
+ add_zoom_floaters()
+
+ zoom_data_div = document.createElement("div")
+ zoom_data_div.id = "zm_data_div"
+ document.getElementById("logDiv").prepend(zoom_data_div)
+
+ const controls_table = document.getElementById("controlsTable").lastElementChild
+ controls_table.insertAdjacentHTML("beforeBegin",`
+
+ Zoom in/out
+
+ 9 /
+ 0
+
+
+
+ Pan
+
+ W
+ A
+ S
+ D
+
+
+
+ Pan (fast)
+
+ Shift +
+ W
+ A
+ S
+ D
+
+
+ `)
+}
+
+// Redefine to give correct numbers when zoomed
+window.getMousePos = (canvas, evt) => {
+ if (evt.touches) {
+ evt.preventDefault();
+ evt = evt.touches[0];
+ isMobile = true;
+ }
+ const rect = canvas.getBoundingClientRect();
+
+ let x = (evt.clientX - rect.left) / zoom_levels[zoom_level];
+ let y = (evt.clientY - rect.top) / zoom_levels[zoom_level];
+
+ x = Math.floor((x / canvas.clientWidth) * (width+1));
+ y = Math.floor((y / canvas.clientHeight) * (height+1));
+
+ return {x:x, y:y};
+}
+
+runAfterReset(() => {
+ window.zoom_level = 1
+ rescale()
+})
+
+runAfterLoad(() => {
+ patch_keybinds()
+ patch_ui()
+})
\ No newline at end of file
diff --git a/weaponsRewrite.js b/weaponsRewrite.js
new file mode 100644
index 00000000..397f519a
--- /dev/null
+++ b/weaponsRewrite.js
@@ -0,0 +1,233 @@
+dependOn("betterSettings.js", () => {
+ const tabweapons = new SettingsTab("weapons.js");
+ enablestartupprompt = new Setting("Startup prompt", "startup_prompt", settingType.BOOLEAN, false, defaultValue=true, "The prompt requesting you to add velocity.js, (unavailable for steam edition)");
+
+ tabweapons.registerSetting(enablestartupprompt);
+ settingsManager.registerTab(tabweapons);
+
+ runAfterLoad(async () => {
+ window.setTimeout(async () => {
+ if (!enabledMods.includes("mods/velocity.js") && standaloneType !== "steam" && enablestartupprompt.value === true){
+ _jaydalert("velocity.js is recommended for weapons.js to function in its intended way.");
+ }
+ },)
+})
+},true)
+async function _weaponsjsprompt(message, defaultValue = "") {
+ return new Promise(resolve => {
+ promptInput(message, (result) => {
+ resolve(result);
+ }, "weapons.js is asking you...", defaultValue);
+
+ })
+}
+async function _jaydalert(message) {
+ promptText(message, undefined, "Jayd:");
+}
+async function _weaponsjsdir(message) {
+ promptDir(message, undefined, "weapons.js is asking you...");
+}
+
+elements.tsar_bomba = {
+ color: "#969696",
+ tick: (pixel) => {
+ tryMove(pixel, pixel.x, pixel.y+1)
+ for (var y = 1; y < 4; y++) {
+ if (!isEmpty(pixel.x, pixel.y + y, false)) {
+ explodeAt(pixel.x,pixel.y,150,"plasma")
+ }
+ }
+ },
+ category: "weapons.js",
+ state: "solid",
+ density: 1300,
+ excludeRandom: true,
+ cooldown: defaultCooldown
+},
+elements.missile_left = {
+ color: "#313131",
+ category: "weapons.js",
+ state: "solid",
+ behavior: [
+ "EX:20>missile_shrapnel|XX|XX|XX|XX|XX|CR:smoke"
+ ],
+ ignore: "missile_left",
+ tick: function(pixel) {
+ var circlec = circleCoords(pixel.x, pixel.y, 3)
+ for (var i = 0; i < circlec.length; i++){
+ var coord = circlec[i]
+ var x = coord.x
+ var y = coord.y
+ if (!(isEmpty(x, y, true) || (x == pixel.x && y == pixel.y) || elements[pixelMap[x][y].element].state == "gas" || pixelMap[x][y].element == "missile_left")){
+ explodeAt(pixel.x,pixel.y,20,"missile_shrapnel")
+ }
+ }
+ for (var i=0; i<3; i++) {
+ tryMove(pixel, pixel.x-1, pixel.y)
+ }
+ },
+ density: 1300,
+ excludeRandom: true,
+ cooldown: defaultCooldown
+},
+elements.missile_right = {
+ color: "#313131",
+ category: "weapons.js",
+ state: "solid",
+ behavior: [
+ "CR:smoke|XX|XX|XX|XX|XX|EX:20>missile_shrapnel"
+ ],
+ ignore: "missile_right",
+ tick: function(pixel) {
+ var circlec = circleCoords(pixel.x, pixel.y, 3)
+ for (var i = 0; i < circlec.length; i++){
+ var coord = circlec[i]
+ var x = coord.x
+ var y = coord.y
+ if (!(isEmpty(x, y, true) || (x == pixel.x && y == pixel.y) || elements[pixelMap[x][y].element].state == "gas")){
+ explodeAt(pixel.x,pixel.y,20,"missile_shrapnel")
+ }
+ }
+ for (var i=0; i<3; i++) {
+ tryMove(pixel, pixel.x+1, pixel.y)
+ }
+ },
+ density: 1300,
+ excludeRandom: true,
+ cooldown: defaultCooldown
+}
+var target = [,];
+var tgt = "head";
+elements.tracking_missile = {
+ color: "#323232",
+ category: "weapons.js",
+ behavior: [
+ "XX","XX","CR:smoke"
+ ],
+ onSelect: async () => {
+ var answer1 = await _weaponsjsprompt("Please input the target.",(tgt||undefined));
+ if (!answer1) {return}
+ tgt = answer1;
+ },
+ tick: (pixel) => {
+ var circlec = circleCoords(pixel.x, pixel.y, 3)
+ for (var i = 0; i < circlec.length; i++){
+ var coord = circlec[i]
+ var xe = coord.x
+ var ye = coord.y
+ if (!(isEmpty(xe, ye, true) || (xe == pixel.x && ye == pixel.y) || elements[pixelMap[xe][ye].element].state == "gas" || pixelMap[xe][ye].element == "tracking_missile")){
+ explodeAt(pixel.x,pixel.y,20,"missile_shrapnel")
+ }
+ }
+ for (var x = 1; x < width; x++) {
+ for (var y = 1; y < height; y++) {
+ if (!isEmpty(x,y)) {
+ if (pixelMap[x][y].element===tgt) {
+ target = [pixelMap[x][y].x, pixelMap[x][y].y];
+ }
+ }
+ }
+ }
+ if (pixel.x != target[0] || pixel.y != target[1]) {
+ let {x, y} = pixel;
+ const empty = checkForEmptyPixels(x, y);
+ const [tX, tY] = target;
+ let bestVal = Math.sqrt(Math.pow(tX - x, 2) + Math.pow(tY - y, 2));
+ let best = null;
+ for (const pixelPair of empty) {
+ const [x_, y_] = [x + pixelPair[0], y + pixelPair[1]];
+ const c = Math.sqrt(Math.pow(tX - x_, 2) + Math.pow(tY - y_, 2));
+ if (c < bestVal) {
+ bestVal = c;
+ best = pixelPair;
+ }
+ }
+ if (best) {
+ tryMove(pixel, x + best[0]*2, y + best[1]*2, undefined, true);
+ }
+ }
+ }
+},
+elements.missile_shrapnel = {
+ color: "#979ea3",
+ behavior: [
+ "XX|XX|XX",
+ "XX|EX:5 %20|XX",
+ "M2%20|M1%20|M2%20",
+ ],
+ burn: 90,
+ burnTime: 100,
+ density: 2000,
+ conduct: 1,
+ state: "solid",
+ category: "weapons.js"
+},
+elements.cluster_nuke = {
+ color: "#323232",
+ category: "weapons.js",
+ behavior: behaviors.POWDER,
+ maxSize: 1,
+ cooldown: defaultCooldown,
+ tick: (pixel) => {
+ for (var y = 1; y < 25; y++) {
+ if (!isEmpty(pixel.x, pixel.y + y, false)) {
+ explodeAt(pixel.x,pixel.y,25,["dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","dirty_bomb","nuke",])
+ }
+ }
+ }
+}
+// let ammo1 = 1;
+// let rdir = 1;
+// let ammoLoaded = "";
+// elements.railgun = {
+// category: "weapons.js",
+// behavior: behaviors.WALL,
+// onSelect: async (pixel) => {
+// var answer1 = await _weaponsjsprompt("Please input the ammo type. \n \n <1 for Armor-Piercing ammo> \n <2 for High-Explosive ammo.>",(ammo1||undefined));
+// if (!answer1) {return}
+// ammo1 = answer1;
+// var answer2 = await _weaponsjsdir("Please input the direction.",(rdir||undefined));
+// if (!answer2) {
+// console.log(answer2)
+// return}
+// rdir = answer2;
+// },
+// tick: async (pixel) => {
+// ammoLoaded = "armor_piercing_shell";
+// if(ammo1 === 1){
+// ammoLoaded = "armor_piercing_shell"
+// }
+// else if (ammo1 === 2){
+// ammoLoaded = "high_explosive_shell"
+// }
+
+// if (pixel.charge){
+// if(rdir === 1){
+// createPixel(ammoLoaded, pixel.x, pixel.y-1);
+// }
+// if (rdir === 2){
+// createPixel(ammoLoaded, pixel.x, pixel.y+1);
+// }
+// if (rdir === 3){
+// createPixel(ammoLoaded, pixel.x-1, pixel.y);
+// }
+// if (rdir === 4){
+// createPixel(ammoLoaded, pixel.x+1, pixel.y);
+// }
+// }
+// doDefaults(pixel);
+// },
+// color: "#c9c9c9",
+// conduct: 1,
+// hardness: 8,
+// },
+// elements.armor_piercing_shell = {
+// category: "ammunition",
+// color: "#ffc954",
+// hardness: 0.9,
+// }
+// elements.high_explosive_shell = {
+// category: "ammunition",
+// color: "#ffc954",
+// hardness: 0.6,
+// }