diff --git a/mod-list.html b/mod-list.html
index 1312c8fc..b91092d2 100644
--- a/mod-list.html
+++ b/mod-list.html
@@ -200,6 +200,8 @@
| Food & Cooking |
| bananas.js | Adds bananas and banana plants | Alice |
| ketchup_mod.js | Adds a bunch of ketchup related stuff, plus a few other condiments | Nubo318 (main dev), Devi, Alice (contributors) |
+| pizzasstuff.js | New animals, foods, and plants | _ilikepizza_ |
+| sbstuff.js | Adds Rice | Stefan Blox |
| Life & Nature |
| apioforms_pre.js | An incomplete implementation of elements from the Apioform Game | Alice |
@@ -209,6 +211,7 @@
| crimson.js | Adds elements relating to the Crimson from Terraria | Alice |
| fairy_chain.js | Adds way too many fairies to fey_and_more.js | Alice |
| fantastic_creatures.js | Adds various animals | Melecie |
+| fantasy_elements.js | Fantasy creatures and substances | pixelegend4 |
| fey_and_more.js | Adds fairies, magic, and a lot of other things | Melecie |
| fwibblen.js | Adds a flying creature that turns nickel into itself, and a second creature that does the same to the first one | Alice |
| human_edit.js | Improvements to humans | Alice |
@@ -216,10 +219,11 @@
| mobs.js | Adds Creepers, Zombies, and Skeletons | Alice |
| nocancer.js | Removes cancer from the game one tick after it is created | mollthecoder |
| nocancer2.js | Removes cancer from the game altogether. May be incompatible with other mods that spawn cancer | mollthecoder |
+| pizzasstuff.js | New animals, foods, and plants | _ilikepizza_ |
| primordial_birthpool.js | A cross between Primordial Soup and Birthpool. Requires F&M | Alice |
| spring.js | Many nature elements, like sakura trees, butterflies, beehives, and more | R74n |
-| the_ground.js | Adds several rock types, worldgen settings, and gemstones | Alice |
| the_ground_og.js | Simplified and more stable version of the_ground.js | Alice |
+| the_ground.js | Adds several rock types, worldgen settings, and gemstones | Alice |
| toothpaste.js | Teeth and paste | Alice |
| Fun & Games |
diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js
index a55735a2..6593c196 100644
--- a/mods/a_mod_by_alice.js
+++ b/mods/a_mod_by_alice.js
@@ -274,6 +274,92 @@ if(allDependenciesExist) {
};
return false;
};
+
+ //Element name search
+ window.searchQuery = {};
+
+ function searchElements(query) {
+ if(typeof(window.searchQuery) == "undefined") { window.searchQuery = "" }; //necessary because of filter's idiotic no-argument policy
+ window.searchQuery = query;
+ var elemNames = Object.keys(elements);
+ var matches = elemNames.filter(function(name) {
+ return !!(name.match(window.searchQuery))
+ });
+ return matches
+ };
+
+ function getStateHigh(element,forceArray=false) {
+ if(!(element instanceof Array)) { element = [element] };
+ var existantElements = element.filter(function(name) { return elementExists(name) });
+ if(existantElements.length == 0) { return undefined } else { element = existantElements };
+ var results = element.map(name => elements[name].stateHigh).filter(function(nameOrUndefined) { return typeof(nameOrUndefined) !== "undefined" });
+ switch(results.length) {
+ case 0:
+ return null;
+ case 1:
+ if(!forceArray) { return results[0] };
+ default:
+ return results
+ }
+ };
+
+ function getState(element,forceArray=false) {
+ if(!(element instanceof Array)) { element = [element] };
+ var existantElements = element.filter(function(name) { return elementExists(name) });
+ if(existantElements.length == 0) { return undefined } else { element = existantElements };
+ var results = element.map(name => elements[name].state).filter(function(nameOrUndefined) { return typeof(nameOrUndefined) !== "undefined" });
+ switch(results.length) {
+ case 0:
+ return null;
+ case 1:
+ if(!forceArray) { return results[0] };
+ default:
+ return results
+ }
+ };
+
+ function getStateLow(element,forceArray=false) {
+ if(!(element instanceof Array)) { element = [element] };
+ var existantElements = element.filter(function(name) { return elementExists(name) });
+ if(existantElements.length == 0) { return undefined } else { element = existantElements };
+ var results = element.map(name => elements[name].stateLow).filter(function(nameOrUndefined) { return typeof(nameOrUndefined) !== "undefined" });
+ switch(results.length) {
+ case 0:
+ return null;
+ case 1:
+ if(!forceArray) { return results[0] };
+ default:
+ return results
+ }
+ };
+
+ function getStateAtTemp(element,temp) {
+ var data = elements[element];
+ var tl = data.tempLow;
+ var th = data.tempHigh;
+ if(typeof(tl) == "number" && temp <= tl) {
+ return data.stateLow
+ } else if(typeof(th) == "number" && temp >= th) {
+ return data.stateHigh
+ } else {
+ return element
+ }
+ };
+
+ function getBreakInto(element,forceArray=false) {
+ if(!(element instanceof Array)) { element = [element] };
+ var existantElements = element.filter(function(name) { return elementExists(name) });
+ if(existantElements.length == 0) { return undefined } else { element = existantElements };
+ var results = element.map(name => elements[name].breakInto).filter(function(nameOrUndefined) { return typeof(nameOrUndefined) !== "undefined" });
+ switch(results.length) {
+ case 0:
+ return null;
+ case 1:
+ if(!forceArray) { return results[0] };
+ default:
+ return results
+ }
+ };
//Math(s)
@@ -1273,7 +1359,8 @@ if(allDependenciesExist) {
};
};
- function createPixelReturn(element,x,y) { //sugar
+ function createPixelReturn(elementIn,x,y) { //sugar
+ var element = elementIn; while(element instanceof Array) { element = randomChoice(element) };
var newPixel = new Pixel(x, y, element);
currentPixels.push(newPixel);
checkUnlock(element);
@@ -3219,6 +3306,7 @@ color1 and color2 spread through striped paint like dye does with itself. col
selectElement(firstElementButton.getAttribute("element"));
};
+
//MORE CONFIGURABLE EXPLOSIONS (explodeAtPlus) ##
velocityBlacklist = [];
@@ -3581,8 +3669,13 @@ color1 and color2 spread through striped paint like dye does with itself. col
}
}
- //New elements
+ //No changeTemp for fire=>smoke
+ elements.fire.tick = function(pixel){
+ behaviors.UL_UR_OPTIMIZED(pixel);
+ if (!pixel.del && settings.burn===0 && (pixelTicks-pixel.start > 70) && Math.random() < 0.1 ) { changePixel(pixel,"smoke",false) }
+ };
+ //New elements
elements.cold_fire.burning = true;
elements.cold_fire.burnTempChange = -1;
elements.cold_fire.burnTime = 25;
@@ -7898,7 +7991,7 @@ color1 and color2 spread through striped paint like dye does with itself. col
behavior: behaviors.WALL,
state: "solid",
category: "rainbow variants",
- };
+ }; //7989 yay soshi!
elements.lavashimmer = {
color: ["#ff3f00","#200800","#ff3f00","#200800"],
@@ -8128,7 +8221,7 @@ color1 and color2 spread through striped paint like dye does with itself. col
}
},
reactions: {
- dye: elements.rainbow.reactions.dye, //7989 yay soshi!
+ dye: elements.rainbow.reactions.dye,
},
behavior: behaviors.WALL,
state: "solid",
@@ -9560,7 +9653,7 @@ color1 and color2 spread through striped paint like dye does with itself. col
for(y = bottomFortyPercent; y < height; y++) {
var chance = y > bottomTwentyPercent ? 0.03 : 0.01
var radius = y > bottomTwentyPercent ? 8 : 6
- if(enabledMods.includes("velocity.js") && !isEmpty(x,y,true)) {
+ if(!isEmpty(x,y,true)) {
pixelMap[x][y].vy ??= 0;
pixelMap[x][y].vy -= 20;
};
@@ -11187,10 +11280,11 @@ color1 and color2 spread through striped paint like dye does with itself. col
pixelMap: structuredClone ? structuredClone(pixelMap) : JSON.parse(JSON.stringify(pixelMap)),
width: width,
height: height,
+ pixelTicks: pixelTicks,
pixelSize: pixelSize,
settings: settings,
version: 1,
- enabledMods: localStorage.enabledMods,
+ enabledMods: localStorage.enabledMods
};
for(i = 0; i < simulationState.pixelMap.length; i++) {
var column = simulationState.pixelMap[i];
@@ -11441,6 +11535,7 @@ color1 and color2 spread through striped paint like dye does with itself. col
width = json.width;
height = json.height;
pixelSize = json.pixelSize;
+ pixelTicks = (json.pixelTicks ?? 0);
//currentPixels = json.currentPixels;
for(i = 0; i < json.pixelMap.length; i++) {
json.pixelMap[i] = json.pixelMap[i].map(x => zeroToNull(x));
@@ -12468,6 +12563,7 @@ Pixel size (rendering only): (Use if the save looks cut o
burn: 100,
burnTime: 5,
fireColor: ["#00ffff","#00ffdd"],
+ burnInto: ["fire","carbon_dioxide","carbon_dioxide","steam","steam"],
state: "gas",
density: 1.93 * airDensity,
};
@@ -12726,7 +12822,218 @@ Pixel size (rendering only): (Use if the save looks cut o
//Quintuple carbon line
- //To do
+ //Single bond
+ elements.pentane = {
+ color: "#b5685b",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 533,
+ stateHigh: "fire",
+ reactions: {
+ "head": { elem2: "rotten_meat", chance: 0.00015},
+ "body": { elem2: "rotten_meat", chance: 0.00015},
+ },
+ tempLow: 36.1,
+ burn: 85,
+ burnTime: 5,
+ burnInto: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam","steam"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 2.48 * airDensity,
+ };
+
+ elements.liquid_pentane = {
+ color: "#a62711",
+ tempLow: -130.2,
+ density: 626,
+ };
+
+ elements.isopentane = {
+ color: "#bb6c54",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 427,
+ stateHigh: "fire",
+ reactions: {
+ "head": { elem2: "rotten_meat", chance: 0.00015},
+ "body": { elem2: "rotten_meat", chance: 0.00015},
+ },
+ tempLow: -11.7,
+ burn: 85,
+ burnTime: 5,
+ burnInto: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 2.48 * airDensity,
+ };
+
+ elements.liquid_isopentane = {
+ color: "#ab320d",
+ tempLow: -160,
+ density: 616,
+ };
+
+ elements.neopentane = {
+ color: "#c1724e",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 427,
+ stateHigh: "fire",
+ reactions: {
+ "head": { elem2: "rotten_meat", chance: 0.00015},
+ "body": { elem2: "rotten_meat", chance: 0.00015},
+ },
+ tempLow: 9.5,
+ burn: 85,
+ burnTime: 5,
+ burnInto: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 3.255,
+ };
+
+ elements.liquid_neopentane = {
+ color: "#af3d08",
+ tempLow: -16.5,
+ density: 601.172,
+ };
+
+ //Double bond
+ elements.pentylene = { //pentene
+ name: "1-pentylene",
+ color: "#af5a4b",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 527,
+ stateHigh: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam"],
+ tempLow: 30,
+ temp: 40,
+ burn: 100,
+ burnTime: 5,
+ burnInto: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 2.4 * airDensity,
+ };
+
+ elements.liquid_pentylene = {
+ tempLow: -165.2,
+ density: 640,
+ };
+
+ elements.trans_2_pentylene = {
+ name: "t-pentylene-2",
+ color: "#924b3f",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 324, //Unknown
+ stateHigh: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam"],
+ tempLow: 36.3,
+ burn: 85,
+ burnTime: 5,
+ burnInto: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 2.4 * airDensity,
+ };
+
+ elements.liquid_trans_2_pentylene = {
+ tempLow: -140.2,
+ density: 643.1,
+ };
+
+ elements.cis_2_pentylene = {
+ name: "c-pentylene-2",
+ color: "#9d5143",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 324, //Unknown
+ stateHigh: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam"],
+ tempLow: 36.9,
+ burn: 85,
+ burnTime: 5,
+ burnInto: ["fire","fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","steam","steam","steam","steam","steam"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 2 * airDensity,
+ };
+
+ elements.liquid_cis_2_pentylene = {
+ tempLow: -151.4,
+ density: 655.6,
+ };
+
+ //Triple bond
+ elements.pentyne = {
+ name: "1-pentyne",
+ color: "#9d5143",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 454, //Unknown
+ stateHigh: ["fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","oxygen","oxygen","oxygen"],
+ tempLow: 40.2,
+ temp: 55,
+ burn: 100,
+ burnTime: 5,
+ burnInto: ["fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","oxygen","oxygen","oxygen"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 2.6 * airDensity, //made-up due to also unknown vapor density
+ };
+
+ elements.liquid_1_pentyne = {
+ tempLow: -105.5,
+ density: 691,
+ };
+
+ elements.pentyne_2 = {
+ name: "2-pentyne",
+ color: "#9d5143",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 454, //Unknown
+ stateHigh: ["fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","oxygen","oxygen","oxygen"],
+ tempLow: 56.5,
+ temp: 65,
+ burn: 70,
+ burnTime: 5,
+ burnInto: ["fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","oxygen","oxygen","oxygen"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 2.6 * airDensity, //made-up due to also unknown vapor density
+ };
+
+ elements.liquid_pentyne_2 = {
+ tempLow: -109,
+ density: 710,
+ };
+
+ elements.isopentyne = {
+ color: "#a6533a",
+ behavior: behaviors.GAS,
+ category: "gases",
+ tempHigh: 454, //Unknown
+ stateHigh: ["fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","oxygen","oxygen","oxygen"],
+ tempLow: 29.5,
+ temp: 40,
+ burn: 70,
+ burnTime: 5,
+ burnInto: ["fire","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_dioxide","oxygen","oxygen","oxygen"],
+ fireColor: ["#00ffff","#00ffdd"],
+ state: "gas",
+ density: 2.6 * airDensity, //made-up due to also unknown vapor density
+ };
+
+ elements.liquid_isopentyne = {
+ tempLow: -89.7,
+ density: 666,
+ };
+
+ //Alcohol
+ //Fuck no I'm not doing 8 isomers
+
+ //Benzene ver.
+ //i'm tired
//Vodka
@@ -12980,6 +13287,66 @@ Pixel size (rendering only): (Use if the save looks cut o
//Inorganic compounds
+ runAfterAutogen(function() {
+ var waters = searchElements("water").filter(function(name) { return getState(name) == "liquid" });
+ var whitelistWaters = ["hail","rime","cloud","rain_cloud","thunder_cloud","snow_cloud","hail_cloud","rain_cloud_cloud","snow_cloud_cloud","hail_cloud_cloud","cloud_cloud","heaviest_water_cloud","heaviest_snow_cloud","snow_cloud_floater","jinsoulite","jinsoulite_gas","jinsoulite_powder","molten_jinsoulite"];
+ var jvoWaters = Object.keys(jinsouliteValueObject).filter(function(name) { return !(name.includes("bomb")) });
+ var coldWaters = (getStateLow(waters,true) ?? []).filter(
+ function(name) { return typeof(name) == "string" }
+ );
+ var colderWaters = (getStateLow(coldWaters,true) ?? []).filter(
+ function(name) { return typeof(name) == "string" }
+ );
+ var hotWaters = (getStateHigh(waters,true) ?? []).filter(
+ function(name) { return typeof(name) == "string" }
+ );
+ var brokenColdWaters = (getBreakInto(coldWaters,true) ?? []).filter(
+ function(name) { return typeof(name) == "string" }
+ );
+ var coldBrokenColdWaters = (getStateLow(brokenColdWaters,true) ?? []).filter(
+ function(name) { return typeof(name) == "string" }
+ );
+ wateroids = [waters,coldWaters,colderWaters,hotWaters,brokenColdWaters,coldBrokenColdWaters,whitelistWaters,jvoWaters].flat()
+
+ //moved vivite-related code to where it happens
+ for(var i = 0; i < wateroids.length; i++) {
+ if(elements[wateroids[i]]) { elements[wateroids[i]].noViviteSlag = true };
+ };
+ });
+
+ //Hydrogen sulfide (in chem.js)
+ _h_2s = ["hydrogen_sulfide","liquid_hydrogen_sulfide","hydrogen_sulfide_ice"];
+
+ elements.hydrogen_sulfide.density = 1.19 * airDensity;
+ elements.hydrogen_sulfide.reactions ??= {};
+ elements.hydrogen_sulfide.reactions.head = { elem2: "rotten_meat", chance: 0.4};
+ elements.hydrogen_sulfide.fireColor = { elem2: "rotten_meat", chance: 0.4};
+ elements.hydrogen_sulfide.tempHigh = 1200;
+ elements.hydrogen_sulfide.stateHigh = ["sulfur_gas","steam"];
+ delete elements.sulfur_dioxide.reactions.water;
+ delete elements.sulfur_dioxide.reactions.steam;
+ delete elements.water.reactions.sulfur;
+ elements.sulfur_dioxide.tick = function(pixel) {
+ var neighbors = adjacentCoords.map(offsetPair => pixelMap[pixel.x+offsetPair[0]]?.[pixel.y+offsetPair[1]]).filter(function(pixelOrUndefined) { return typeof(pixelOrUndefined) == "object" });
+ if(neighbors.length < 2) { return };
+ var neighboringElements = neighbors.filter(function(px) { return !!px }).map(x => x.element);
+ var waterNeighbor = null;
+ var sulfideNeighbor = null;
+ for(var i = 0; i < neighboringElements.length; i++) {
+ if(_h_2s.includes(neighboringElements[i])) {
+ sulfideNeighbor = adjacentCoords[i];
+ };
+ if(wateroids.includes(neighboringElements[i])) {
+ waterNeighbor = adjacentCoords[i];
+ };
+ if(sulfideNeighbor && waterNeighbor) {
+ if(!sulfideNeighbor || isEmpty(sulfideNeighbor.x,sulfideNeighbor.y,true)) { return };
+ changePixel(sulfideNeighbor,getStateAtTemp("sulfur",pixel.temp));
+ changePixel(pixel,getStateAtTemp("water",pixel.temp));
+ }
+ }
+ };
+
//Carbon monoxide
elements.carbon_monoxide = {
@@ -13006,28 +13373,359 @@ Pixel size (rendering only): (Use if the save looks cut o
elements.steam.reactions.charcoal = { tempMin: 680, elem1: "hydrogen", elem2: "carbon_monoxide" };
elements.steam.reactions.diamond = { tempMin: 680, elem1: "hydrogen", elem2: "carbon_monoxide" };
- /* //Oil refining
- delete elements.oil.tempHigh;
+ //Oil refining
- elements.oil.tick = function(pixel) {
- if(!pixel.role) {
- var value = Math.random()
- if(value < 0.03) {
- pixel.role = "lpg";
+ delete elements.oil.tempHigh;
+
+ function liquidMoveCustomViscosity(pixel,viscosity) {
+ if (pixel.start === pixelTicks) {return}
+ if (pixel.charge && elements[pixel.element].behaviorOn) {
+ pixelTick(pixel)
+ }
+ var viscosityPass = ((Math.random()*100) < 100 / Math.pow(viscosity, 0.25));
+ if (!viscosityPass) {
+ var move1Spots = [
+ [pixel.x, pixel.y+1]
+ ]
+ }
+ else {
+ var move1Spots = [
+ [pixel.x+1, pixel.y+1],
+ [pixel.x, pixel.y+1],
+ [pixel.x-1, pixel.y+1],
+ ]
+ }
+ var moved = false;
+ for (var i = 0; i < move1Spots.length; i++) {
+ var coords = move1Spots[Math.floor(Math.random()*move1Spots.length)];
+ if (tryMove(pixel, coords[0], coords[1])) { moved = true; break; }
+ else { move1Spots.splice(move1Spots.indexOf(coords), 1); }
+ }
+ if (!moved) {
+ if (viscosityPass) {
+ if (Math.random() < 0.5) {
+ if (!tryMove(pixel, pixel.x+1, pixel.y)) {
+ tryMove(pixel, pixel.x-1, pixel.y);
+ }
+ } else {
+ if (!tryMove(pixel, pixel.x-1, pixel.y)) {
+ tryMove(pixel, pixel.x+1, pixel.y);
+ }
+ }
+ }
+ }
+ doDefaults(pixel);
};
- };
- if(pixel.role == "lpg") {
- var value = Math.random()
- //LPG composition weighted chooser
- };
+ elements.light_petroleum_fuel_gas = { //it's not liquified, and sandboxels doesn't even have a pressure system, and there is no generic name for uncompressed, gaseous "L"PG, so we need a different name
+ burn: 100,
+ color: "#b5b5b3",
+ density: 3.5,
+ tempLow: -44,
+ tick: function(pixel) {
+ if (pixel.temp >= 495 && !pixel.burning) {
+ pixel.burning = true;
+ pixel.burnStart = pixelTicks;
+ }
+ },
+ burnInto: "explosion,explosion,fire,fire,fire,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","),
+ state: "gas",
+ behavior: behaviors.GAS,
+ };
+ elements.lamp_oil.tempHigh = 170;
+ elements.lamp_oil.density = 810;
+ elements.lamp_oil.name = "kerosene";
+ elements.lamp_oil.forceAutoGen = true;
+ elements.lamp_oil.burnInto = "smoke,smoke,fire,fire,fire,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(",");
+ elements.lamp_oil_gas = {
+ name: "kerosene gas",
+ burn: 100,
+ density: 4.5,
+ tick: elements.lamp_oil.tick,
+ burnInto: "explosion,smoke,smoke,fire,fire,fire,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(",")
+ };
- if(pixel.temp > 30) { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
- //LPG change switch(pixel.role) statement
- };
- };
- */
+ elements.gasoline = {
+ color: "#d1cf9d",
+ behavior: behaviors.LIQUID,
+ tick: function(pixel) {
+ if (pixel.temp > 263 && !pixel.burning) {
+ pixel.burning = true;
+ pixel.burnStart = pixelTicks;
+ }
+ },
+ reactions: {
+ "styrofoam": { elem1: ["gasoline","gasoline","gasoline","gasoline","napalm"], elem2: null }, //the joke
+ "polystyrene": { elem1: "napalm", elem2: ["polystyrene","polystyrene",null] },
+ "molten_polystyrene": { elem1: "napalm", elem2: ["molten_polystyrene","molten_polystyrene",null] },
+ "glue": {elem2:null, chance:0.05},
+ "wax": {elem2:null, chance:0.005},
+ "melted_wax": {elem2:null, chance:0.025},
+ },
+ forceAutoGen: true,
+ category: "liquids",
+ tempHigh: 70,
+ tempLow: -60,
+ burn: 20,
+ burnTime: 500,
+ burnInto: "fire,fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","),
+ viscosity: 7.04,
+ state: "liquid",
+ density: 755,
+ alias: "petrol"
+ };
+
+ elements.gasoline_gas = {
+ burn: 100,
+ burnTime: 10,
+ density: 3.5,
+ tick: elements.gasoline.tick,
+ burnInto: "explosion,fire,fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(",")
+ };
+
+ elements.naphtha = {
+ color: "#d1d1d1",
+ behavior: behaviors.LIQUID,
+ tick: function(pixel) {
+ if (pixel.temp > 270 && !pixel.burning) {
+ pixel.burning = true;
+ pixel.burnStart = pixelTicks;
+ }
+ },
+ reactions: {
+ "styrofoam": { elem1: ["naphtha","naphtha","naphtha","naphtha","napalm"], elem2: null },
+ "polystyrene": { elem1: "napalm", elem2: ["polystyrene","polystyrene",null] },
+ "molten_polystyrene": { elem1: "napalm", elem2: ["molten_polystyrene","molten_polystyrene",null] },
+ "glue": {elem2:null, chance:0.05},
+ "wax": {elem2:null, chance:0.005},
+ "melted_wax": {elem2:null, chance:0.025},
+ },
+ category: "liquids",
+ tempHigh: 120,
+ tempLow: -30,
+ forceAutoGen: true,
+ burn: 80,
+ burnTime: 500,
+ burnInto: "fire,fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","),
+ viscosity: 5.77,
+ state: "liquid",
+ density: 740
+ };
+
+ elements.naphtha_gas = {
+ burn: 100,
+ burnTime: 10,
+ density: 3.5,
+ tick: elements.naphtha.tick,
+ burnInto: "explosion,fire,fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(",")
+ };
+
+ elements.diesel = {
+ color: "#d3d9b4",
+ behavior: behaviors.LIQUID,
+ tick: function(pixel) {
+ if (pixel.temp > 210 && !pixel.burning) {
+ pixel.burning = true;
+ pixel.burnStart = pixelTicks;
+ }
+ },
+ reactions: {
+ "glue": {elem2:null, chance:0.05},
+ "wax": {elem2:null, chance:0.005},
+ "melted_wax": {elem2:null, chance:0.025},
+ },
+ category: "liquids",
+ tempHigh: 260,
+ forceAutoGen: true,
+ tempLow: -25,
+ burn: 20,
+ burnTime: 500,
+ burnInto: "fire,fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","),
+ viscosity: 7.04,
+ state: "liquid",
+ density: 755,
+ };
+
+ elements.diesel_gas = {
+ burn: 100,
+ burnTime: 12,
+ density: 3.5,
+ tick: elements.diesel.tick,
+ burnInto: "explosion,fire,fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(",")
+ };
+
+ elements.lubricating_oil = {
+ color: "#d3d9b4",
+ behavior: behaviors.LIQUID,
+ tick: function(pixel) {
+ if (pixel.temp > 450 && !pixel.burning) {
+ pixel.burning = true;
+ pixel.burnStart = pixelTicks;
+ }
+ },
+ category: "liquids",
+ tempHigh: 350,
+ tempLow: -40,
+ burn: 20,
+ burnTime: 600,
+ forceAutoGen: true,
+ burnInto: "fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","),
+ viscosity: 7.04,
+ state: "liquid",
+ density: 800,
+ };
+
+ elements.lubricating_oil_gas = {
+ burn: 100,
+ burnTime: 13,
+ density: 3.5,
+ tick: elements.lubricating_oil.tick,
+ burnInto: "explosion,fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(",")
+ };
+
+ elements.heavy_fuel_oil = {
+ color: "#1c1a18",
+ stain: 0.3,
+ behavior: behaviors.LIQUID,
+ tick: function(pixel) {
+ if (pixel.temp > 407 && !pixel.burning) {
+ pixel.burning = true;
+ pixel.burnStart = pixelTicks;
+ };
+ if(pixel.burning && Math.random() < 0.01) {
+ var emptyNeighbors = [];
+ for(i = 0; i < adjacentCoords.length; i++) {
+ if(isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],false)) {
+ emptyNeighbors.push(adjacentCoords[i]);
+ };
+ };
+ if(emptyNeighbors.length > 0) {
+ var randomEmptyNeighbor = emptyNeighbors[Math.floor(Math.random() * emptyNeighbors.length)];
+ createPixelReturn(["smoke","carbon_dioxide"],pixel.x+randomEmptyNeighbor[0],pixel.y+randomEmptyNeighbor[1]).temp = pixel.temp
+ };
+ }
+ },
+ reactions: {
+ "polystyrene": { elem1: "napalm", elem2: "napalm", chance:0.05 }, //the joke
+ "glue": {elem2:null, chance:0.05},
+ "wax": {elem2:null, chance:0.005},
+ "melted_wax": {elem2:null, chance:0.025},
+ },
+ category: "liquids",
+ tempHigh: 300,
+ forceAutoGen: true,
+ tempLow: 0,
+ burn: 10,
+ viscosity: 700,
+ burnTime: 800,
+ fireElement: ["fire","fire","fire","smoke","smoke","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_monoxide","carbon_monoxide","carbon_monoxide","sulfur_dioxide","sulfur_trioxide_gas","poison_gas"],
+ burnInto: "fire,fire,fire,fire,fire,fire,ash,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,poison_gas".split(","),
+ viscosity: 7.04,
+ state: "liquid",
+ density: 755,
+ alias: "petrol"
+ };
+
+ elements.heavy_fuel_oil_gas = {
+ burn: 80,
+ burnTime: 60,
+ density: 2.5,
+ tick: elements.heavy_fuel_oil.tick,
+ fireElement: ["explosion","fire","fire","fire","smoke","smoke","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_monoxide","carbon_monoxide","carbon_monoxide","sulfur_dioxide","sulfur_trioxide_gas","poison_gas"],
+ burnInto: "fire,fire,fire,fire,fire,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(",")
+ };
+
+ elements.bitumen = {
+ color: "#0d0c0c",
+ maxColorOffset: 5,
+ tick: function(pixel) {
+ var viscosity = 1e16 / (1.09 ** pixel.temp);
+ liquidMoveCustomViscosity(pixel,viscosity)
+ },
+ reactions: {
+ "polystyrene": { elem1: "napalm", elem2: "napalm", chance:0.05 }, //the joke
+ "glue": {elem2:null, chance:0.05},
+ "wax": {elem2:null, chance:0.005},
+ "melted_wax": {elem2:null, chance:0.025},
+ },
+ category: "liquids",
+ tempHigh: 750,
+ stateHigh: ["bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","bitumen","fire","fire","fire","smoke","smoke","smoke","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_monoxide","carbon_monoxide","carbon_monoxide","sulfur_dioxide","sulfur_trioxide_gas","poison_gas"],
+ burn: 2,
+ burnTime: 800,
+ fireElement: ["fire","fire","fire","smoke","smoke","smoke","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_monoxide","carbon_monoxide","carbon_monoxide","sulfur_dioxide","sulfur_trioxide_gas","poison_gas"],
+ burnInto: "fire,fire,fire,fire,fire,fire,ash,ash,ash,carbon_monoxide,carbon_monoxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,poison_gas".split(","),
+ viscosity: 7.04,
+ state: "liquid",
+ density: 1050,
+ reactions: {
+ gravel: { elem1: "asphalt", elem2: "asphalt" }
+ }
+ };
+
+ elements.asphalt ={
+ color: "#191919",
+ behavior: behaviors.STURDYPOWDER,
+ tempHigh: 750,
+ stateHigh: ["asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","asphalt","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel",,"fire","fire","fire","smoke","smoke","smoke","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_monoxide","carbon_monoxide","carbon_monoxide","sulfur_dioxide","sulfur_trioxide_gas","poison_gas"],
+ category: "land",
+ state: "solid",
+ density: 2322,
+ burn: 0.5,
+ burnTime: 5000,
+ burnInto: ["gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel","gravel",,"fire","fire","fire","smoke","smoke","smoke","carbon_dioxide","carbon_dioxide","carbon_dioxide","carbon_monoxide","carbon_monoxide","carbon_monoxide","sulfur_dioxide","sulfur_trioxide_gas","poison_gas"],
+ fireElement: ["smoke","smoke","smoke","carbon_dioxide","carbon_monoxide","fire","fire","fire","fire","fire","fire"],
+ fireChance: 2,
+ hardness: 0.5,
+ breakInto: ["bitumen","gravel"],
+ reactions: {
+ light: { temp1: 0.25, elem2: null }
+ }
+ };
+
+ elements.oil.tick = function(pixel) {
+ if(!pixel.role) {
+ var value = Math.random()
+ if(value <= 0.03) {
+ pixel.role = "lpg";
+ } else if(value <= 0.45) { //42%
+ pixel.role = "gasoline";
+ } else if(value <= 0.60) { //15%
+ pixel.role = "naphtha";
+ } else if(value <= 0.70) { //10%
+ pixel.role = "kerosene"; //kerosene/lamp oil/jet fuel are apparently the same funny bunch of hydrocarbons
+ } else if(value <= 0.9) { //20%
+ pixel.role = "diesel";
+ } else if(value <= 0.91) { //1%
+ pixel.role = "lubricant";
+ } else if(value <= 0.97) { //6%
+ pixel.role = "heavy_fuel_oil"; //700 cP
+ } else if(value < 1) { //3%
+ pixel.role = "bitumen";
+ };
+ };
+
+ if(pixel.temp > 30 && pixel.role == "lpg") { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
+ changePixel(pixel,"light_petroleum_fuel_gas")
+ } else if(pixel.temp > 70 && pixel.role == "gasoline") { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
+ changePixel(pixel,"gasoline_gas")
+ } else if(pixel.temp > 120 && pixel.role == "naphtha") { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
+ changePixel(pixel,"naphtha_gas")
+ } else if(pixel.temp > 170 && pixel.role == "kerosene") { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
+ changePixel(pixel,"lamp_oil_gas")
+ } else if(pixel.temp > 270 && pixel.role == "diesel") { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
+ changePixel(pixel,"diesel_gas")
+ } else if(pixel.temp > 300 && pixel.role == "heavy_fuel_oil") { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
+ changePixel(pixel,"heavy_fuel_oil_gas")
+ } else if(pixel.temp > 350 && pixel.role == "lubricant") { //https://www.crownoil.co.uk/guides/crude-oil-fractional-distillation/: Butane and propane and other petroleum gases are formed right at the top of the distillation tower, where it is coolest, a very mild 25°C: the temperature range that forms these gases is between 25°C and 50°C. These gases are the lightest products formed in crude oil distillation and are flammable gases.
+ if(pixel.role == "lubricant") {
+ changePixel(pixel,"lubricating_oil_gas")
+ } else {
+ changePixel(pixel,"bitumen")
+ }
+ }
+ };
//UREA ##
@@ -14930,6 +15628,9 @@ Pixel size (rendering only): (Use if the save looks cut o
else if (burnInto instanceof Array) {
burnInto = burnInto[Math.floor(Math.random()*burnInto.length)];
}
+ if (burnInto == undefined) {
+ burnInto = 'fire';
+ }
changePixel(pixel,burnInto,(burnInto !== "smoke"));
if (info.fireColor != undefined && burnInto == "fire") {
pixel.color = pixelColorPick(pixel,info.fireColor);
@@ -16173,8 +16874,8 @@ Pixel size (rendering only): (Use if the save looks cut o
tick: function(pixel) {
emptyNeighborArray = []
for(i=0;i<4;i++) {
- if(isEmpty(pixel.x+neighbors[i][0],pixel.y+neighbors[i][1],true)) {
- emptyNeighborArray.push(neighbors[i])
+ if(isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],false)) {
+ emptyNeighborArray.push(adjacentCoords[i])
}
}
if(pixel.temp >= 100) {
@@ -17709,17 +18410,6 @@ Pixel size (rendering only): (Use if the save looks cut o
elements.smog.stateLow = ["water","dirty_water"];
- var wateroids = Object.keys(elements).filter(
- function(name) {
- return (
- elements[name].stateHigh == "water" ||
- elements[name].stateLow == "water" ||
- elements[name].stateHigh == "heavy_water" ||
- elements[name].stateLow == "heavy_water"
- )
- }
- );
-
/*Object.keys(elements).filter(
function(elem) {
return (
@@ -17731,10 +18421,6 @@ Pixel size (rendering only): (Use if the save looks cut o
}
);*/
- for(var i = 0; i < wateroids.length; i++) {
- if(elements[wateroids[i]]) { elements[wateroids[i]].noViviteSlag = true };
- };
-
function doViviteSlag(pixel,target) {
if(!target) { //No pixel
return false;
@@ -18457,13 +19143,13 @@ Pixel size (rendering only): (Use if the save looks cut o
tick: function(pixel) {
neighbors = [[-1,0],[0,-1],[1,0],[0,1]]
for(i = 0; i < neighbors.length; i++) {
- if(isEmpty(pixel.x+neighbors[i][0],pixel.y+neighbors[i][1],true)) {
+ if(isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],false)) {
if(Math.random() < 0.004) {
changePixel(pixel,"molten_polusium_oxide")
}
}
- if(!isEmpty(pixel.x+neighbors[i][0],pixel.y+neighbors[i][1],true)) {
- if(pixelMap[pixel.x+neighbors[i][0]][pixel.y+neighbors[i][1]].element == "salt_water") {
+ if(!isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],true)) {
+ if(pixelMap[pixel.x+adjacentCoords[i][0]][pixel.y+adjacentCoords[i][1]].element == "salt_water") {
if(Math.random() < 0.024) {
changePixel(pixel,"molten_polusium_oxide")
}
@@ -18486,13 +19172,13 @@ Pixel size (rendering only): (Use if the save looks cut o
tick: function(pixel) {
neighbors = [[-1,0],[0,-1],[1,0],[0,1]]
for(i = 0; i < neighbors.length; i++) {
- if(isEmpty(pixel.x+neighbors[i][0],pixel.y+neighbors[i][1],true)) {
+ if(isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],false)) {
if(Math.random() < 0.015) {
changePixel(pixel,"vaporized_polusium_oxide")
}
}
- if(!isEmpty(pixel.x+neighbors[i][0],pixel.y+neighbors[i][1],true)) {
- if(pixelMap[pixel.x+neighbors[i][0]][pixel.y+neighbors[i][1]].element == "salt_water") {
+ if(!isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],true)) {
+ if(pixelMap[pixel.x+adjacentCoords[i][0]][pixel.y+adjacentCoords[i][1]].element == "salt_water") {
if(Math.random() < 0.06) {
changePixel(pixel,"vaporized_polusium_oxide")
}
@@ -19161,7 +19847,7 @@ Pixel size (rendering only): (Use if the save looks cut o
//sedimentSandstoneTries++;
for(i = 0; i < adjacentCoords.length; i++) {
//sedimentSandstoneTryIterations++;
- if(isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],true)) {
+ if(isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],false)) {
validNeighborArray[i] = false;
//sedimentSandstoneNoDetects++;
} else if(!isEmpty(pixel.x+adjacentCoords[i][0],pixel.y+adjacentCoords[i][1],true)) {
@@ -19214,7 +19900,7 @@ Pixel size (rendering only): (Use if the save looks cut o
};
};
- //Previous function with adjacentPixels
+ //Previous function with adjacentCoords
function transformAdjacent(pixel,substitutionObject,reverse=false) {
for(k = 0; k < adjacentCoords.length; k++) {
@@ -21531,13 +22217,13 @@ Pixel size (rendering only): (Use if the save looks cut o
};
newPowder("sulfur_trioxide","#ededed",1995,16.9).reactions = {
- water: { elem1: "acid", elem2: "acid" }, //no H2SO4, hydronium doesn't really seem to be its own substance
- steam: { elem1: "acid", elem2: "acid" },
- ice: { elem1: "acid", elem2: "acid" },
- snow: { elem1: "acid", elem2: "acid" },
- packed_snow: { elem1: "acid", elem2: "acid" },
- slush: { elem1: "acid", elem2: "acid" },
- };
+ water: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ steam: { elem1: "sulfuric_acid", elem2: "acid" },
+ ice: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ snow: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ packed_snow: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ slush: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ }; elements.sulfur_trioxide.temp = 10;
elements.molten_sulfur_trioxide = {
color: "#c0c0c0",
@@ -21546,12 +22232,12 @@ Pixel size (rendering only): (Use if the save looks cut o
viscosity: 5, //idk idc
tempHigh: 45,
reactions: {
- water: { elem1: "acid", elem2: "acid" }, //no H2SO4, hydronium doesn't really seem to be its own substance
- steam: { elem1: "acid", elem2: "acid" },
- ice: { elem1: "acid", elem2: "acid" },
- snow: { elem1: "acid", elem2: "acid" },
- packed_snow: { elem1: "acid", elem2: "acid" },
- slush: { elem1: "acid", elem2: "acid" },
+ water: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" }, //no H2SO4, hydronium doesn't really seem to be its own substance
+ steam: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ ice: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ snow: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ packed_snow: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ slush: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
},
};
@@ -21559,12 +22245,12 @@ Pixel size (rendering only): (Use if the save looks cut o
color: "#c0c0c0",
density: 2.3, //idk idc
reactions: {
- water: { elem1: "acid", elem2: "acid" }, //no H2SO4, hydronium doesn't really seem to be its own substance
- steam: { elem1: "acid", elem2: "acid" },
- ice: { elem1: "acid", elem2: "acid" },
- snow: { elem1: "acid", elem2: "acid" },
- packed_snow: { elem1: "acid", elem2: "acid" },
- slush: { elem1: "acid", elem2: "acid" },
+ water: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" }, //no H2SO4, hydronium doesn't really seem to be its own substance
+ steam: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ ice: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ snow: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ packed_snow: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
+ slush: { elem1: "sulfuric_acid", elem2: "sulfuric_acid" },
},
};
@@ -21839,28 +22525,30 @@ Pixel size (rendering only): (Use if the save looks cut o
newConcreteTick = elements.concrete.tick;
- if(elements.hanging_concrete) {
- elements.hanging_concrete.tick = function(pixel) {
- newConcreteTick(pixel);
+ runAfterLoad(function() { //mamma mia that's some tasty spaghetti
+ if(elements.hanging_concrete) {
+ elements.hanging_concrete.tick = function(pixel) {
+ newConcreteTick(pixel);
+ };
};
- };
- if(elements.attach_concrete) {
- oldAttachConcreteTick = elements.attach_concrete.tick ;
- elements.attach_concrete.tick = function(pixel) {
- oldAttachConcreteTick(pixel);
- newConcreteTick(pixel);
+ if(elements.attach_concrete) {
+ oldAttachConcreteTick = elements.attach_concrete.tick ;
+ elements.attach_concrete.tick = function(pixel) {
+ oldAttachConcreteTick(pixel);
+ newConcreteTick(pixel);
+ };
};
- };
- if(elements.crumbling_concrete) {
- oldCrumblingConcreteTick = elements.crumbling_concrete.tick ;
- newConcreteTick = elements.concrete.tick ;
- elements.crumbling_concrete.tick = function(pixel) {
- oldCrumblingConcreteTick(pixel);
- newConcreteTick(pixel);
- };
- };
+ if(elements.crumbling_concrete) {
+ oldCrumblingConcreteTick = elements.crumbling_concrete.tick ;
+ newConcreteTick = elements.concrete.tick ;
+ elements.crumbling_concrete.tick = function(pixel) {
+ oldCrumblingConcreteTick(pixel);
+ newConcreteTick(pixel);
+ }
+ }
+ });
//Crimson
//Made-up lore: Crimson naturally drives rocks towards a somewhat mafic comp.
@@ -23318,14 +24006,20 @@ Pixel size (rendering only): (Use if the save looks cut o
breakInto: "alumina",
};
+
+ elements.molten_titanium ??= {}; elements.molten_titanium.tempHigh = 3287;
+ elements.molten_iron ??= {}; elements.molten_iron.tempHigh = 2861;
+ elements.molten_chromium ??= {}; elements.molten_chromium.tempHigh = 2671;
+ elements.molten_copper ??= {}; elements.molten_molten_copper.tempHigh = 4700;
elements.molten_alumina ??= {};
+ elements.molten_alumina.tempHigh = 5400;
elements.molten_alumina.reactions ??= {};
- elements.molten_alumina.reactions.iron_scrap = {elem1: "molten_sapphire", elem2: ["molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron",null] };
- elements.molten_alumina.reactions.molten_iron = {elem1: "molten_sapphire", elem2: ["molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron",null] };
- elements.molten_alumina.reactions.titanium_scrap = {elem1: "molten_sapphire", elem2: ["molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium",null] };
- elements.molten_alumina.reactions.molten_titanium = {elem1: "molten_sapphire", elem2: ["molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium",null] };
- elements.molten_alumina.reactions.chromium_scrap = {elem1: "molten_ruby", elem2: ["molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium",null] };
- elements.molten_alumina.reactions.molten_chromium = {elem1: "molten_ruby", elem2: ["molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium",null] };
+ elements.molten_alumina.reactions.iron_scrap = {elem1: "molten_sapphire", elem2: ["molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron",null] };
+ elements.molten_alumina.reactions.molten_iron = {elem1: "molten_sapphire", elem2: ["molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron","molten_iron",null] };
+ elements.molten_alumina.reactions.titanium_scrap = {elem1: "molten_sapphire", elem2: ["molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium",null] };
+ elements.molten_alumina.reactions.molten_titanium = {elem1: "molten_sapphire", elem2: ["molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium","molten_titanium",null] };
+ elements.molten_alumina.reactions.chromium_scrap = {elem1: "molten_ruby", elem2: ["molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium",null] };
+ elements.molten_alumina.reactions.molten_chromium = {elem1: "molten_ruby", elem2: ["molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium","molten_chromium",null] };
elements.molten_alumina.stateLow = "corundum";
//Sapphire
@@ -23341,6 +24035,16 @@ Pixel size (rendering only): (Use if the save looks cut o
hardness: 0.9,
};
+ elements.molten_sapphire ??= {}; elements.molten_sapphire.tick = function(pixel) {
+ if(pixel.temp >= 5040) {
+ if(Math.random() < 0.005) { //the real proportion of 0.01% is so low that you'd just melt sapphire and get back corundum
+ changePixel(pixel,Math.random() < 0.5 ? "titanium_gas" : "iron_gas",false)
+ } else {
+ changePixel(pixel,"alumina_gas",false)
+ }
+ };
+ };
+
standaloneBrokenFormMaker("sapphire","shard",true,"powders","auto","auto","molten_sapphire",["alumina","alumina","alumina","alumina","alumina","alumina","alumina","alumina","alumina","iron_scrap","titanium_scrap"]).hidden = true;
//Ruby
@@ -23356,6 +24060,16 @@ Pixel size (rendering only): (Use if the save looks cut o
hardness: 0.9,
};
+ elements.molten_ruby ??= {}; elements.molten_ruby.tick = function(pixel) {
+ if(pixel.temp >= 5040) {
+ if(Math.random() < 0.02) { //1% also too low
+ changePixel(pixel,"chromium_gas",false)
+ } else {
+ changePixel(pixel,"alumina_gas",false)
+ }
+ };
+ };
+
standaloneBrokenFormMaker("ruby","shard",true,"powders","auto","auto","molten_sapphire",["alumina","alumina","alumina","alumina","alumina","alumina","alumina","alumina","alumina","chromium_scrap"]).hidden = true;
//Spinel (kek)
@@ -25649,6 +26363,7 @@ Make sure to save your command in a file if you want to add this preset again.`
function changeElementPrompt() {
var cmToElement = prompt("Enter what you want to change pixels to");
+ if(cmToElement == null) { return };
// replace spaces with underscores
cmToElement = cmToElement.replace(/ /g, "_");
cmToElementS = mostSimilarElement(cmToElement);
@@ -26128,6 +26843,169 @@ Make sure to save your command in a file if you want to add this preset again.`
}
}
};
+
+ rayAbsorbElements = [];
+ rayPassElements = [];
+
+ function summonRay(element,xIn,intensity,radius) {
+ var forMin = 0 - radius;
+ var forMax = radius + 1;
+ if(intensity < 1) { return };
+ for(var i = forMin; i < forMax; i++) {
+ for(var j = 1; j < intensity + 1; j++) {
+ var pos = {x: xIn + i, y: j};
+ if(isEmpty(pos.x,pos.y)) {
+ createPixel(element,pos.x,pos.y)
+ } else {
+ if(outOfBounds(pos.x,pos.y)) {
+ break
+ } else {
+ var pixel = pixelMap[pos.x][pos.y];
+ var pElem = pixel.element;
+ var data = elements[pElem];
+ if(rayAbsorbElements.includes(pElem)) {
+ break
+ } else if(rayPassElements.includes(pElem)) {
+ continue
+ } else {
+ if(data.state == "gas") {
+ continue
+ } else {
+ break
+ }
+ }
+ }
+ }
+ }
+ }
+ };
+
+ elements.orbital_ray_beacon = {
+ color: "#ebdf91",
+ behavior: [
+ "XX|M2 AND SA|XX",
+ "SA|XX|SA",
+ "XX|M1|XX"
+ ],
+ breakInto: ["steel_scrap","iron_scrap","copper_scrap","gold_scrap","battery","sapphire","magic"],
+ temp: 0,
+ tempHigh: 5010,
+ insulate: true,
+ conduct: 1,
+ stateHigh: ["molten_steel","molten_iron","molten_copper","molten_gold","acid_gas","titanium_gas","molten_sapphire","magic"],
+ tick: function(pixel) {
+ pixelTempCheck(pixel);
+ if(!pixel.charge) { return };
+ if(pixel.charge) {
+ //var intensity = Math.max(1,Math.floor((pixel.temp + 1) / 100));
+ if(isEmpty(pixel.x,pixel.y+1,true)) { return };
+ var pixelUnder = pixelMap[pixel.x]?.[pixel.y+1];
+ if(!pixelUnder) { return };
+ switch(pixelUnder.element) {
+ case "fire":
+ summonRay("heat_ray",pixel.x,10,5);
+ break;
+ case "ultramafic_magma":
+ case "magma":
+ case "intermediate_magma":
+ case "intermediate_felsic_magma":
+ case "felsic_magma":
+ case "nellish_magma":
+ case "rainbow_magma":
+ case "crimson_magma":
+ summonRay("heat_ray",pixel.x,16,10);
+ break;
+ case "vaporized_ultramafic_magma":
+ case "vaporized_magma":
+ case "vaporized_intermediate_magma":
+ case "vaporized_intermediate_felsic_magma":
+ case "vaporized_felsic_magma":
+ case "vaporized_nellish_magma":
+ case "vaporized_rainbow_magma":
+ case "vaporized_crimson_magma":
+ summonRay("heat_ray",pixel.x,24,18);
+ break;
+ case "greek_fire":
+ summonRay("heat_ray",pixel.x,16,25);
+ break;
+ case "quark_matter":
+ summonRay("heat_ray",pixel.x,45,80);
+ break;
+ case "cold_fire":
+ summonRay("cold_ray",pixel.x,10,5);
+ break;
+ case "chilly_water":
+ summonRay("cold_ray",pixel.x,14,8);
+ break;
+ case "frostwind":
+ summonRay("cold_ray",pixel.x,20,15);
+ break;
+ case "liquid_frostwind":
+ summonRay("cold_ray",pixel.x,30,20);
+ break;
+ case "gelid_cryotheum":
+ summonRay("cold_ray",pixel.x,36,25);
+ break;
+ case "snow":
+ summonRay("freeze_ray",pixel.x,3,6);
+ break;
+ case "slush":
+ summonRay("freeze_ray",pixel.x,4,6);
+ break;
+ case "packed_snow":
+ summonRay("freeze_ray",pixel.x,4,7);
+ break;
+ case "ice":
+ summonRay("freeze_ray",pixel.x,4,8);
+ break;
+ case "alcohol_ice":
+ summonRay("freeze_ray",pixel.x,6,11);
+ break;
+ case "liquid_nitrogen":
+ summonRay("freeze_ray",pixel.x,9,18);
+ break;
+ case "nitrogen_ice":
+ summonRay("freeze_ray",pixel.x,11,19);
+ break;
+ case "liquid_hydrogen":
+ summonRay("freeze_ray",pixel.x,14,26);
+ break;
+ case "hydrogen_ice":
+ summonRay("freeze_ray",pixel.x,15,27);
+ break;
+ case "liquid_helium":
+ summonRay("freeze_ray",pixel.x,18,34);
+ break;
+ case "tectonic_petrotheum":
+ summonRay("smash_ray",pixel.x,2,10);
+ break;
+ case "bomb":
+ case "tnt":
+ summonRay("smash_ray",pixel.x,5,7);
+ break;
+ case "cluster_bomb":
+ summonRay("death_ray",pixel.x,7,11);
+ break;
+ case "nuke":
+ summonRay("annihilation_ray",pixel.x,20,40);
+ break;
+ case "cluster_nuke":
+ summonRay("annihilation_ray",pixel.x,30,60);
+ break;
+ case "armageddon":
+ summonRay("annihilation_ray",pixel.x,40,80);
+ break;
+ };
+ //if(pixelUnder) { deletePixel(pixelUnder.x,pixelUnder.y) };
+ delete pixel.charge;
+ pixel.chargeCD = 4;
+ return true;
+ }
+ },
+ conduct: 1,
+ category: "machines",
+ hardness: 0.6
+ };
//PUSHERS ##
@@ -38711,6 +39589,8 @@ Make sure to save your command in a file if you want to add this preset again.`
if(!supports) {
behaviors.POWDER(pixel);
};
+
+ elements.concrete.tick
doDefaults(pixel);
},
@@ -40830,25 +41710,25 @@ Make sure to save your command in a file if you want to add this preset again.`
}
}
};
- if(enabledMods.includes("mods/paint_event.js")) {
- randomEvents.paint = function() {
- // set the color of a random circle to a random color
- var x = Math.floor(Math.random()*(width-1))+1;
- var y = Math.floor(Math.random()*(height-1))+1;
- var randomR = Math.floor(Math.random() * 256);
- var randomG = Math.floor(Math.random() * 256);
- var randomB = Math.floor(Math.random() * 256);
- var radius = Math.floor(Math.random()*19)+1;
- var rColor = "rgb(" + randomR + "," + randomG + "," + randomB + ")";
- var coords = circleCoords(x,y,radius);
- for (var i = 0; i < coords.length; i++) {
- var coord = coords[i];
- if (!outOfBounds(coord.x,coord.y) && !isEmpty(coord.x,coord.y)) {
- pixelMap[coord.x][coord.y].color = rColor;
- };
+
+ randomEvents.paint = function() {
+ // set the color of a random circle to a random color
+ var x = Math.floor(Math.random()*(width-1))+1;
+ var y = Math.floor(Math.random()*(height-1))+1;
+ var randomR = Math.floor(Math.random() * 256);
+ var randomG = Math.floor(Math.random() * 256);
+ var randomB = Math.floor(Math.random() * 256);
+ var radius = Math.floor(Math.random()*19)+1;
+ var rColor = "rgb(" + randomR + "," + randomG + "," + randomB + ")";
+ var coords = circleCoords(x,y,radius);
+ for (var i = 0; i < coords.length; i++) {
+ var coord = coords[i];
+ if (!outOfBounds(coord.x,coord.y) && !isEmpty(coord.x,coord.y)) {
+ pixelMap[coord.x][coord.y].color = rColor;
};
};
};
+
//Buff mob events
if(typeof(maximumCreeperTries) !== "undefined") {
minimumCreeperTries = 10;
@@ -41711,7 +42591,30 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa
randomEventChoices.falling_pixel.splice(randomEventChoices.falling_pixel.indexOf(radElem),1)
}
};
- })
+
+ 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) {
+ var sim = similarity(e,s);
+ if (sim > max) {
+ max = sim;
+ maxElement = e;
+ }
+ if (elements[e].alias && elements[e].alias === s) {
+ max = 0.99;
+ maxElement = e;
+ }
+ }
+ if (max < 0.5) { return null }
+ return maxElement;
+ }
+ });
//END ##
diff --git a/mods/betterMenuScreens.js b/mods/betterMenuScreens.js
index 1c0509f1..dc18861c 100644
--- a/mods/betterMenuScreens.js
+++ b/mods/betterMenuScreens.js
@@ -106,7 +106,7 @@ const inject = () => {
/**
*
- * @param {string} menu Menu do be opened
+ * @param {string} menu Menu to be opened
* @param {boolean} [closeCurrent] Whether it should forcefully close the current screen
*/
const openMenu = (menu, closeCurrent = false) => {
@@ -130,6 +130,7 @@ class MenuScreen {
this.showCloseButton = true;
this.closeButtonText = "-";
this.closeButtonClass = "XButton";
+ this.titleId = null;
}
/**
@@ -141,6 +142,15 @@ class MenuScreen {
return this;
}
+ /**
+ * Sets screen title ID
+ * @param {string} [id] Screen title element ID
+ */
+ setTitleId(id) {
+ this.titleId = id;
+ return this;
+ }
+
/**
* Sets close button visibility. When false the close button will not be added to the menu screen
* @param {boolean} show Visibility of the close button
@@ -253,7 +263,7 @@ class MenuScreen {
const inner = document.createElement("div");
inner.className = this.innerDivClass ?? "menuScreen";
inner.innerHTML = `${this.showCloseButton ? `
-
";
+
";
this.nodes.forEach(n => inner.querySelector(".menuText").appendChild(n));
parent.appendChild(inner);
document.getElementById(id).appendChild(parent);
diff --git a/mods/chess.js b/mods/chess.js
index c5d1d0d6..83be06f1 100644
--- a/mods/chess.js
+++ b/mods/chess.js
@@ -1396,9 +1396,7 @@ class GameScreen {
}
onKey(ev) {
- if (!this.menuScreen) {
- player.update(ev);
- } else {
+ if (this.menuScreen) {
this.menuScreen.onKey(ev);
}
}
diff --git a/mods/fantasy_elements.js b/mods/fantasy_elements.js
new file mode 100644
index 00000000..87cc8f4e
--- /dev/null
+++ b/mods/fantasy_elements.js
@@ -0,0 +1,243 @@
+elements.dragon_breath = {
+ color: "#f94e4e",
+ behavior: behaviors.GAS,
+ category: "fantasy",
+ state: "gas",
+ density: 0.1,
+ weight: 1,
+ update: function(x, y) {
+ // Update the element's behavior
+ },
+ reactions: {
+ "oxygen": { elem1: "fire", elem2: "fire" },
+ "frostbite": { elem1: "pulsium", elem2: "pulsium" },
+ }
+};
+
+elements.frostbite = {
+ color: "#0000ff",
+ behavior: behaviors.SOLID,
+ category: "fantasy",
+ state: "solid",
+ density: 1.5,
+ weight: 100,
+ update: function(x, y) {
+ // Update the element's behavior
+ },
+ reactions: {
+ "water": { elem1: "ice", elem2: "ice" },
+ "dragon_breath": { elem1: "pulsium", elem2: "pulsium" },
+ }
+};
+
+elements.pulsium = {
+ color: "#ffff00",
+ behavior: behaviors.LIQUID,
+ category: "fantasy",
+ state: "liquid",
+ density: 1923,
+ weight: 100,
+ update: function(x, y) {
+ // Update the element's behavior
+ },
+ reactions: {
+ "molten_iron": { elem1: "pulsium_bar", elem2: "pulsium_bar" },
+ "molten_tin": { elem1: "pulsium_bar", elem2: "pulsium_bar" },
+ "water": { elem1: "sap", elem2: "sap" },
+ "magma": { elem1: "pulsium_bar", elem2: "pulsium_bar" },
+ }
+};
+
+elements.pulsium_bar = {
+ color: "#ffd700",
+ behavior: behaviors.SOLID,
+ category: "fantasy",
+ state: "solid",
+ density: 1700,
+ weight: 100,
+ update: function(x, y) {
+ // Update the element's behavior
+ }
+};
+
+elements.goblins_delight = {
+ color: "#00ff00",
+ behavior: behaviors.LIQUID,
+ category: "fantasy",
+ state: "solid",
+ density: 0.5,
+ weight: 50,
+ reactions: {
+ "liquid_light": { elem1: "water", elem2: "oil" },
+ "radiation": { elem1: "sauce", elem2: "sauce" },
+ }
+};
+
+elements.pheonix = {
+ color: ["#ff0000"],
+ tick: behaviors.FLY,
+ reactions: { "fire": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "salt": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "pulsium_bar": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "pulsium": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ "dragon_breath": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
+ },
+ foodNeed: 5,
+ tempHigh: 999999,
+ stateHigh: "ash",
+ tempLow: 0,
+ category:"fantasy",
+ burn:100,
+ burnTime:19,
+ state: "solid",
+ density: 850,
+ conduct: 1,
+ baby: "baby_pheonix",
+};
+
+elements.phoenix_ash = {
+ color: "#a8a8a5",
+ behavior: behaviors.POWDER,
+ category: "fantasy",
+ state: "solid",
+ density: 1.5,
+ weight: 100,
+ reactions: {
+ "water": { elem1: "pheonix", elem2: "pheonix" },
+ }
+};
+
+elements.baby_pheonix = {
+ color: ["#ffdd00"],
+ tick: behaviors.FLY,
+ foodNeed: 5,
+ tempHigh: 999999,
+ stateHigh: "ash",
+ tempLow: 0,
+ category:"fantasy",
+ burn:100,
+ burnTime:19,
+ state: "solid",
+ stateLow: "iced_pheonix",
+ breakInto: "phoenix_ash",
+ density: 850,
+ conduct: 1,
+};
+
+elements.iced_pheonix = {
+ color: "#34baeb",
+ behavior: behaviors.SOLID,
+ category: "fantasy",
+ state: "solid",
+ breakInto: "ice",
+ density: 1.5,
+ weight: 100,
+ update: function(x, y) {
+ // Update the element's behavior
+ },
+};
+
+// New Fantasy Elements with Updated Reactions
+elements.dragon_scale = {
+ color: "#8B4513",
+ behavior: behaviors.SOLID,
+ category: "fantasy",
+ state: "solid",
+ density: 0.8,
+ weight: 60,
+ update: function(x, y) {
+ // Update the element's behavior
+ },
+ reactions: {
+ "fire": { elem1: null, elem2: "dragon_breath" },
+ "plasma": { elem1: null, elem2: "dragon_breath" },
+ "goblins_delight": { elem1: "dragon_breath", elem2: null },
+ "pulsium": { elem1: "dragon_breath", elem2: null },
+ "oil": { elem1: null, elem2: "dragon_breath" },
+ "salt": { elem1: "dragon_breath", elem2: null },
+ "sap": { elem1: "dragon_breath", elem2: null },
+ "water": { elem1: "dragon_breath", elem2: null },
+ "laser": { elem1: null, elem2: "dragon_breath" },
+ "oxygen": { elem1: null, elem2: "dragon_breath" },
+ "wall": { elem1: "dragon_breath", elem2: null },
+ "glass": { elem1: null, elem2: "dragon_breath" },
+ "wood": { elem1: null, elem2: "dragon_breath" },
+ "charcoal": { elem1: null, elem2: "dragon_breath" },
+ },
+};
+
+elements.mystic_runes = {
+ color: "#9932CC",
+ behavior: behaviors.SOLID,
+ category: "fantasy",
+ state: "solid",
+ density: 0.8,
+ weight: 60,
+ update: function(x, y) {
+ // Update the element's behavior
+ },
+ reactions: {
+ "heat_ray": { elem1: null, elem2: "mystic_runes" },
+ "god_ray": { elem1: null, elem2: "mystic_runes" },
+ "laser": { elem1: null, elem2: "mystic_runes" },
+ "helium": { elem1: null, elem2: "mystic_runes" },
+ "oxygen": { elem1: null, elem2: "mystic_runes" },
+ "sugar": { elem1: null, elem2: "mystic_runes" },
+ "wall": { elem1: "mystic_runes", elem2: null },
+ "glass": { elem1: null, elem2: "mystic_runes" },
+ "wood": { elem1: null, elem2: "mystic_runes" },
+ "charcoal": { elem1: null, elem2: "mystic_runes" },
+ "diamond": { elem1: null, elem2: "mystic_runes" },
+ },
+};
+
+elements.enchanted_wood = {
+ color: "#923B70",
+ behavior: behaviors.SOLID,
+ category: "fantasy",
+ state: "solid",
+ density: 0.8,
+ weight: 60,
+ update: function(x, y) {
+ // Update the element's behavior
+ },
+ reactions: {
+ "fire": { elem1: null, elem2: "charcoal" },
+ "plasma": { elem1: null, elem2: "charcoal" },
+ "water": { elem1: null, elem2: "mystic_runes" },
+ },
+};
+
+// update 1.1 below
+// adds 3 more extra elements
+// by hackerpro908
+// main game by R74N called sandboxels
+
+elements.quartzium = {
+ color: "#51484f",
+ behavior: behaviors.SOLID,
+ category: "fantasy",
+ state: "solid",
+ density: 1065,
+ weight: 100,
+ reactions: {
+ "fire": { elem1: "quartz", elem2: "quartz" },
+ },
+};
+elements.quartz = {
+ color: "#ebedeb",
+ behavior: behaviors.SOLID,
+ category: "fantasy",
+ state: "solid",
+ density: 8076,
+ weight: 100,
+};
+
+elements.moonite = {
+ color: "#e6e6e6",
+ behavior: behaviors.SUPERFLUID,
+ category: "fantasy",
+ state: "solid",
+ density: 8076,
+ weight: 100,
+};
diff --git a/mods/jaydsmods.js b/mods/jaydsmods.js
new file mode 100644
index 00000000..1070777b
--- /dev/null
+++ b/mods/jaydsmods.js
@@ -0,0 +1,31 @@
+elements.test_element = {
+ color: "#ff0000",
+ behavior: behaviors.POWDER,
+ category: "land",
+ state: "solid",
+ reactions: {
+ "dirt": { elem1: null, elem2: "mud" },
+ }
+ },
+elements.tsar_bomba = {
+ color: "#524c41",
+ behavior: [
+ "XX|EX:150>plasma|XX",
+ "XX|XX|XX",
+ "M2|M1 AND EX:150>plasma|M2",
+ ],
+ category: "weapons",
+ state: "solid",
+ density: 1300,
+ excludeRandom: true,
+ cooldown: defaultCooldown
+}
+elements.meese = {
+ color: "#996515",
+ behavior: [
+ "XX|XX|XX",
+ "XX|FX%0.25|M2%0.5 AND BO",
+ "XX|M1|XX",
+ ],
+ category: "life"
+ }
\ No newline at end of file
diff --git a/mods/morefoodsmod.js b/mods/morefoodsmod.js
new file mode 100644
index 00000000..9791eb3b
--- /dev/null
+++ b/mods/morefoodsmod.js
@@ -0,0 +1,47 @@
+elements.chowder = {
+ color: "#c7c98b",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ reactions: {
+ "water": { elem1: null, elem2: "soup" },
+ },
+ };
+
+ elements.soup = {
+ color: "#c28719",
+ behavior: behaviors.LIQUID,
+ category: "food",
+ state: "liquid",
+ stateHigh: "chowder",
+ tempHigh: 100
+ };
+
+ elements.rice = {
+ color: "#f6f8ed",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ reactions: {
+ "broth": { elem1: "risotto", elem2: null },
+ "beans": { elem1: null, elem2: "feijoada"},
+ },
+ };
+
+ elements.risotto = {
+ color: "#f8f4e9",
+ behavior: behaviors.SUPPORTPOWDER,
+ category: "food",
+ state: "solid",
+ };
+
+ elements.feijoada = {
+ color: "#291800",
+ behavior: behaviors.LIQUID,
+ category: "food",
+ state: "liquid",
+ viscosity: 9
+ };
+
+ if (!elements.milk.reactions) elements.milk.reactions = {};
+elements.milk.reactions.corn = { elem1: null, elem2: "chowder" }
\ No newline at end of file
diff --git a/mods/nastystuff.js b/mods/nastystuff.js
new file mode 100644
index 00000000..92e4c9f0
--- /dev/null
+++ b/mods/nastystuff.js
@@ -0,0 +1,57 @@
+elements.poop = {
+ color: "#411900",
+ density: 200,
+ state: "solid",
+ burn: 5,
+ tempHigh: 400,
+ burnTime: 200,
+ burnInto: ["driedPoop"],
+ category: "gross stuff",
+}
+
+elements.driedPoop = {
+ behavior: behaviors.POWDER,
+ color: '#181100',
+ state: 'powder',
+ category: "gross stuff",
+ reactions: {
+ "water": { elem1: null, elem2: "wetPoop" },
+ "milk": { elem1: null, elem2: "poopyMilk" },
+
+ },
+ density: 10
+}
+
+elements.wetPoop = {
+ behavior: behaviors.LIQUID,
+ color: "#A9844F",
+ state: 'liquid',
+ category: 'gross stuff',
+ density: '25'
+}
+
+elements.poopyMilk = {
+ behavior: behaviors.LIQUID,
+ color: '#BEB2AD',
+ state: 'liquid',
+ category: "gross stuff",
+ density: 10
+}
+
+elements.peePee = {
+ behavior: behaviors.LIQUID,
+ color: '#f1ed00',
+ state: 'liquid',
+ category: "gross stuff",
+ tempHigh: 100,
+ stateHigh: ["ammonia", "fragrance"],
+ density: 25
+}
+
+elements.ammonia = {
+ behavior: behaviors.GAS,
+ color: '#E5E4E2',
+ category: 'gross stuff',
+ density: .86,
+ state: 'gas',
+}
\ No newline at end of file
diff --git a/mods/obsidian.js b/mods/obsidian.js
new file mode 100644
index 00000000..929e0050
--- /dev/null
+++ b/mods/obsidian.js
@@ -0,0 +1,29 @@
+elements.obsidian = {
+ color: ["#343434", "#313639"],
+ behavior: behaviors.SOLID,
+ category: "solids",
+ state: "solid",
+ reactions: {
+ "sand": { elem1: "obsidian_shard" },
+ "dirt": { elem1: "obsidian_shard" },
+ "rock": { elem1: "obsidian_shard" },
+ "mudstone": { elem1: "obsidian_shard" },
+ "packed_snow": { elem1: "obsidian_shard" },
+ "gravel": { elem1: "obsidian_shard" },
+ "clay": { elem1: "obsidian_shard" },
+ "clay_soil": { elem1: "obsidian_shard" },
+ "permafrost": { elem1: "obsidian_shard" },
+ "mulch": { elem1: "obsidian_shard" },
+ "basalt": { elem1: "obsidian_shard" },
+ "tuff": { elem1: "mud" },
+ "limestone": { elem1: "obsidian_shard" },
+ "quicklime": { elem1: "obsidian_shard" },
+ "slaked_lime": { elem1: "obsidian_shard" },
+ }
+ },
+ elements.obsidian_shard = {
+ color: ["#343434" , "#313639"],
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+ }
\ No newline at end of file
diff --git a/mods/pizzasstuff.js b/mods/pizzasstuff.js
new file mode 100644
index 00000000..f887dc5b
--- /dev/null
+++ b/mods/pizzasstuff.js
@@ -0,0 +1,332 @@
+elements.fruit_slushy = {
+ color: "#b867cf",
+ behavior: behaviors.LIQUID,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.mold = {
+ color: "#86ab29",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.chocolate_slushy = {
+ color: "#4f2e16",
+ behavior: behaviors.LIQUID,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.chocolate_sauce = {
+ color: "#754828",
+ behavior: behaviors.LIQUID,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.chocolate_ice_cream = {
+ color: "#704b3a",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.fruit_ice_cream = {
+ color: "#de6ab7",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.chocolate_yogurt = {
+ color: "#825c4b",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+ tempLow: 0,
+ stateLow: "frozen_chocolate_yogurt",
+};
+
+elements.fruit_yogurt = {
+ color: "#f587d0",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+ tempLow: 0,
+ stateLow: "frozen_fruit_yogurt",
+};
+
+elements.frozen_fruit_yogurt = {
+ color: "#ffc2ea",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.frozen_chocolate_yogurt = {
+ color: "#ad8776",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.cooking_oil = {
+ color: "#c4ab4f",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "solid",
+ reactions: {
+ "meat": { elem1: null, elem2: "chicken_nuggets" },
+ "potato": { elem1: null, elem2: "fries" },
+ }
+};
+
+elements.chicken_nuggets = {
+ color: "#967242",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.fries = {
+ color: "#ebba34",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.rose_sauce = {
+ color: "#f0340e",
+ behavior: behaviors.LIQUID,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.rose_sauce = {
+ color: "#f0340e",
+ behavior: behaviors.LIQUID,
+ category: "food",
+ state: "solid",
+ hidden: "TRUE",
+};
+
+elements.smashed_ice = {
+ color: "#c3d4e6",
+ behavior: behaviors.LIQUID,
+ category: "food",
+ state: "solid",
+ reactions: {
+ "grape": { elem1: null, elem2: "fruit_slushy" },
+ "green_grape": { elem1: null, elem2: "fruit_slushy" },
+ "cherry": { elem1: null, elem2: "fruit_slushy" },
+ "chocolate": { elem1: null, elem2: "chocolate_slushy" },
+ "juice": { elem1: null, elem2: "fruit_slushy" },
+ "chocolate_sauce": { elem1: null, elem2: "chocolate_slushy" },
+ },
+ density: 100,
+ tempHigh: 25,
+ stateHigh: "water",
+ tempLow: -100,
+ stateLow: "snow",
+};
+
+elements.moss = {
+ color: "#389639",
+ behavior: behaviors.STURDYPOWDER,
+ category: "life",
+ state: "solid",
+ burn: 5,
+ burnTime: 15,
+ density: 1400,
+ breakInto: "dead_plant",
+ tempHigh: 120,
+ stateHigh: "dead_plant",
+ tempLow: -4,
+ stateLow: "frozen_plant",
+
+ reactions: {
+ "dna": { elem1: "moth", elem2: null },
+ }
+
+};
+
+elements.moth = {
+ color: "#665233",
+ behavior: behaviors.BOUNCY,
+ category: "life",
+ state: "solid",
+ burn: 95,
+ burnTime: 25,
+ density: 600,
+ breakInto: "dead_bug",
+ tempHigh: 100,
+ stateHigh: "ash",
+ tempLow: 0,
+ stateLow: "dead_bug",
+};
+
+elements.cherry = {
+ color: "#c41428",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ breakInto: "juice",
+ tempHigh: 256,
+ stateHigh: "steam",
+ breakIntoColor: "#450008",
+};
+
+elements.orange = {
+ color: "#ff9100",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ breakInto: "juice",
+ tempHigh: 256,
+ stateHigh: "steam",
+ breakIntoColor: "#d69c4f",
+};
+
+elements.kiwi = {
+ color: "#34611a",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ breakInto: "juice",
+ tempHigh: 256,
+ stateHigh: "steam",
+ breakIntoColor: "#517a38",
+};
+
+elements.green_grape = {
+ color: "#b6eb7f",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+ breakInto: "juice",
+ breakIntoColor: "#5f8536",
+ tempHigh: 256,
+ stateHigh: "steam",
+};
+
+if (!elements.lettuce.reactions) elements.lettuce.reactions = {};
+elements.lettuce.reactions.ice_cream = { elem1: "moss", elem2: null }
+
+if (!elements.ketchup.reactions) elements.ketchup.reactions = {};
+elements.ketchup.reactions.yolk = { elem1: "rose_sauce", elem2: null }
+
+
+if (!elements.bread.reactions) elements.bread.reactions = {};
+elements.bread.reactions.rotten_cheese = { elem1: "mold", elem2: null }
+
+if (!elements.bread.reactions) elements.bread.reactions = {};
+elements.bread.reactions.dirty_water = { elem1: "mold", elem2: null }
+
+if (!elements.toast.reactions) elements.toast.reactions = {};
+elements.toast.reactions.rotten_cheese = { elem1: "mold", elem2: null }
+
+if (!elements.toast.reactions) elements.toast.reactions = {};
+elements.toast.reactions.dirty_water = { elem1: "mold", elem2: null }
+
+if (!elements.baked_batter.reactions) elements.baked_batter.reactions = {};
+elements.baked_batter.reactions.rotten_cheese = { elem1: "mold", elem2: null }
+
+if (!elements.baked_batter.reactions) elements.baked_batter.reactions = {};
+elements.baked_batter.reactions.dirty_water = { elem1: "mold", elem2: null }
+
+if (!elements.bread.reactions) elements.bread.reactions = {};
+elements.bread.reactions.worm = { elem1: "mold", elem2: null }
+
+if (!elements.bread.reactions) elements.bread.reactions = {};
+elements.bread.reactions.mud = { elem1: "mold", elem2: null }
+
+if (!elements.toast.reactions) elements.toast.reactions = {};
+elements.toast.reactions.worm = { elem1: "mold", elem2: null }
+
+if (!elements.toast.reactions) elements.toast.reactions = {};
+elements.toast.reactions.mud = { elem1: "mold", elem2: null }
+
+if (!elements.baked_batter.reactions) elements.baked_batter.reactions = {};
+elements.baked_batter.reactions.worm = { elem1: "mold", elem2: null }
+
+if (!elements.baked_batter.reactions) elements.baked_batter.reactions = {};
+elements.baked_batter.reactions.mud = { elem1: "mold", elem2: null }
+
+elements.sugar_ice.breakInto = "smashed_ice"
+
+elements.chocolate.breakInto = "chocolate_sauce"
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.juice = { elem1: "fruit_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.grape = { elem1: "fruit_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.jelly = { elem1: "fruit_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.cherry = { elem1: "fruit_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.orange = { elem1: "fruit_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.kiwi = { elem1: "fruit_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.green_grape = { elem1: "fruit_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.chocolate = { elem1: "chocolate_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.chocolate_sauce = { elem1: "chocolate_ice_cream", elem2: null }
+
+if (!elements.ice_cream.reactions) elements.ice_cream.reactions = {};
+elements.ice_cream.reactions.melted_chocolate = { elem1: "chocolate_ice_cream", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.grape = { elem1: "fruit_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.juice = { elem1: "fruit_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.green_grape = { elem1: "fruit_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.cherry = { elem1: "fruit_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.kiwi = { elem1: "fruit_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.orange = { elem1: "fruit_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.jelly = { elem1: "fruit_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.chocolate = { elem1: "chocolate_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.chocolate_sauce = { elem1: "chocolate_yogurt", elem2: null }
+
+if (!elements.yogurt.reactions) elements.yogurt.reactions = {};
+elements.yogurt.reactions.melted_chocolate = { elem1: "chocolate_yogurt", elem2: null }
diff --git a/mods/sbstuff.js b/mods/sbstuff.js
new file mode 100644
index 00000000..45bb4c84
--- /dev/null
+++ b/mods/sbstuff.js
@@ -0,0 +1,276 @@
+elements.burnt_rice = {
+ tempHigh: 999,
+ stateHigh: "ash",
+ density: 699,
+ color: "#242424",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "liquid",
+ reactions: {
+ "water": { elem1: null, elem2: "dirty_water" }
+ }
+};
+
+elements.rice = {
+ isFood: true,
+ burnInto: "burnt_rice",
+ density: 696,
+ tempHigh: 232,
+ stateHigh: "burnt_rice",
+ color: "#d1d1d1",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "liquid",
+};
+
+elements.moth = {
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#57381a",
+ behavior: behaviors.GAS,
+ category: "life",
+ state: "solid",
+};
+
+elements.moss = {
+ tempHigh: 500,
+ stateHigh: "ash",
+ density: 1000,
+ color: "#2d571a",
+ behavior: behaviors.POWDER,
+ category: "land",
+ state: "solid",
+};
+
+elements.mc_donalds = {
+ tempHigh: 6969,
+ stateHigh: "void",
+ density: 69,
+ color: "#ff0000",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.maple_syrup = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "steam",
+ density: 1333,
+ hardness: 1,
+ color: "#9c6000",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+};
+
+elements.boiled_egg = {
+ isFood: true,
+ density: 700,
+ breakInto: "yolk",
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#fff9d1",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "liquid",
+};
+
+elements.dark_oak = {
+ breakInto: "dark_oak_wood",
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#302216",
+ behavior: behaviors.WALL,
+ category: "solids",
+ state: "solid",
+};
+
+elements.dark_oak_wood = {
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#573e28",
+ behavior: behaviors.SUPPORT,
+ category: "land",
+ state: "solid",
+};
+
+elements.avocado = {
+ isFood: true,
+ tempHigh: 500,
+ breakInto: "guacamole",
+ stateHigh: "ash",
+ color: "#254a22",
+ behavior: behaviors.SUPPORTPOWDER,
+ category: "food",
+ state: "liquid",
+};
+
+elements.guacamole = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#a2e09d",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "liquid",
+};
+
+elements.watermelon = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "ash",
+ breakInto: "water_from_the_melon",
+ color: "#40993f",
+ behavior: behaviors.SUPPORT,
+ category: "food",
+ state: "solid",
+};
+
+elements.water_from_the_melon = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "steam",
+ color: "#ff5d47",
+ behavior: behaviors.LIQUID,
+ category: "liquids",
+ state: "liquid",
+};
+
+elements.nachos = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#bd7b26",
+ behavior: behaviors.SUPPORTPOWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.cherry = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#ff0f0f",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.green_cherry = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#5ce344",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.meth = {
+ hardness: 1,
+ tempHigh: 5000,
+ stateHigh: "steam",
+ color: "#0affef",
+ behavior: behaviors.POWDER,
+ category: "powders",
+ state: "solid",
+};
+
+elements.garlic = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#ffebbd",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+ reactions: {
+ "bread": { elem1: null, elem2: "garlic_bread" },
+ }
+};
+
+elements.garlic_bread = {
+ isFood: true,
+ breakInto: "crumb",
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: ["#db9b56", "#288a0c", "#db9b56", "#db9b56", "#db9b56", "#db9b56"],
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.kiwi = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: ["#0f4700", "#0f4700", "#0f4700", "#0f4700", "#0f4700", "#0f4700", "#0f4700", "#0f4700", "#0f4700", "#210a00"],
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.peanut_butter = {
+ isFood: true,
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#d4903d",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.poop = {
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#331600",
+ behavior: behaviors.STURDYPOWDER,
+ category: "special",
+ state: "solid",
+};
+
+elements.marshmallow = {
+ tempHigh: 50,
+ stateHigh: "cooked_marshmallow",
+ color: "#ffe4e3",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.cooked_marshmallow = {
+ tempHigh: 150,
+ stateHigh: "burnt_marshmallow",
+ color: "#d49e9d",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "liquid",
+};
+
+elements.burnt_marshmallow = {
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#1c1212",
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.ramen = {
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: "#fae34d",
+ behavior: behaviors.POWDER,
+ category: "food",
+ state: "solid",
+};
+
+elements.cereal = {
+ tempHigh: 500,
+ stateHigh: "ash",
+ color: ["#ba3425", "#baa31e", "#26ba1e", "#1e9dba", "#6f1eba"],
+ behavior: behaviors.STURDYPOWDER,
+ category: "food",
+ state: "liquid",
+};