Merge branch 'main' of https://github.com/JustAGenericUsername/sandboxelsmodding
This commit is contained in:
commit
3e7ae9401e
Binary file not shown.
|
After Width: | Height: | Size: 588 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
28
index.html
28
index.html
|
|
@ -64,7 +64,7 @@
|
|||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": ["VideoGame","MobileApplication","WebApplication"],
|
||||
"gamePlatform":"Web Browser",
|
||||
"gamePlatform":["Web Browser","Windows","macOS"],
|
||||
"image":"https://sandboxels.r74n.com/icons/icon.png",
|
||||
"url": "https://sandboxels.r74n.com",
|
||||
"name":"Sandboxels",
|
||||
|
|
@ -78,19 +78,22 @@
|
|||
"availability":"https://schema.org/InStock"
|
||||
},
|
||||
"genre": "Falling-sand game",
|
||||
"softwareVersion":"1.10.2",
|
||||
"softwareVersion":"1.11.2",
|
||||
"datePublished":"2021-12-15",
|
||||
"dateCreated":"2021-12-15",
|
||||
"gameTip":"https://sandboxels.r74n.com/controls",
|
||||
"softwareHelp":"https://sandboxels.r74n.com/controls",
|
||||
"releaseNotes":"https://sandboxels.r74n.com/changelog",
|
||||
"screenshot": "https://sandboxels.r74n.com/icons/wallpaper.png",
|
||||
"screenshot": "https://sandboxels.r74n.com/icons/cover-3840x1240px-text.png",
|
||||
"softwareRequirements": "HTML5",
|
||||
"archivedAt": "https://web.archive.org/web/20230519005427/https://sandboxels.r74n.com/",
|
||||
"copyrightYear": 2024,
|
||||
"copyrightNotice": "©2021-2024. All Rights Reserved. R74n",
|
||||
"copyrightYear": 2021,
|
||||
"copyrightNotice": "©2021-2025. All Rights Reserved. R74n",
|
||||
"license": "https://sandboxels.r74n.com/license.txt",
|
||||
"discussionUrl": "https://r74n.com/discord/",
|
||||
"discussionUrl": ["https://r74n.com/discord/","https://www.reddit.com/r/Sandboxels/","https://steamcommunity.com/app/3664820/discussions/"],
|
||||
"downloadUrl": "https://store.steampowered.com/app/3664820/Sandboxels/",
|
||||
"installUrl": "https://store.steampowered.com/app/3664820/Sandboxels/",
|
||||
"trailer": "https://www.youtube.com/watch?v=TgHnD-KRieM",
|
||||
"educationalUse": "Hands-on lab experiments and learning",
|
||||
"headline": "Sandboxels",
|
||||
"isAccessibleForFree": true,
|
||||
|
|
@ -121,6 +124,9 @@
|
|||
console.log("Can't access? Join our Discord: https://R74n.com/discord/");
|
||||
console.log("Found this on another website? Let us know!");
|
||||
console.log("©2021-" + new Date().getFullYear() + ". All Rights Reserved. https://sandboxels.R74n.com/license.txt");
|
||||
|
||||
isOnSite = location.hostname === "sandboxels.r74n.com";
|
||||
|
||||
// If settings is in localStorage, load it. If not, create an empty object.
|
||||
settings = localStorage.getItem("settings") ? JSON.parse(localStorage.getItem("settings")) : {};
|
||||
// URL query handling
|
||||
|
|
@ -12976,6 +12982,11 @@ if (standalone) {
|
|||
var script = document.createElement('script');
|
||||
script.src = "mods/glow.js";
|
||||
document.head.appendChild(script);
|
||||
if (standaloneType === "steam") {
|
||||
var script = document.createElement('script');
|
||||
script.src = "mods/steam_port.js";
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
}
|
||||
|
||||
var currentMonth = new Date().getMonth();
|
||||
|
|
@ -15894,7 +15905,7 @@ behaviorRules = {
|
|||
ctx.drawImage(placingImage,0,0,newWidth,newHeight);
|
||||
var newImage = ctx.getImageData(0,0,newWidth,newHeight);
|
||||
var elem = (settings.imageelem || "wood");
|
||||
if ((!elements[elem] || elements[elem].tool || elements[elem].canPlace===false) && elem !== "paint") { elem = "wood";}
|
||||
if ((!elements[elem] || elements[elem].tool || elements[elem].canPlace===false) && elem !== "paint" && !elements[elem].canPlace) { elem = "wood";}
|
||||
// loop through each pixel in the ImageData
|
||||
for (var x = 0; x < newWidth; x++) {
|
||||
for (var y = 0; y < newHeight; y++) {
|
||||
|
|
@ -16240,7 +16251,7 @@ behaviorRules = {
|
|||
if (r) autoResizeCanvas();
|
||||
focusGame();
|
||||
},
|
||||
html: standalone ? null : `<br><br><p style="text-align:center"><input id="playlightButton" class="button" type="button" onclick="loadPlaylight();" value="Play More Games" style=""></input></p>`,
|
||||
html: (standalone || !isOnSite) ? null : `<br><br><p style="text-align:center"><input id="playlightButton" class="button" type="button" onclick="loadPlaylight();" value="Play More Games" style=""></input></p>`,
|
||||
type: "confirm",
|
||||
wasPaused: pause
|
||||
}
|
||||
|
|
@ -19100,6 +19111,7 @@ if (document.referrer && document.referrer.indexOf("r74n.") === -1) {
|
|||
}
|
||||
|
||||
function loadPlaylight() {
|
||||
if (!isOnSite) { location.href = "https://r74n.com"; return }
|
||||
if (typeof playlightSDK === "undefined") {
|
||||
document.getElementById("playlightButton").value = "Loading...";
|
||||
document.head.insertAdjacentHTML("beforeend",`<link rel="stylesheet" href="https://sdk.playlight.dev/playlight-sdk.css">`);
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@
|
|||
<tr><td>classic_explosives.js</td><td>Re-adds 4 explosives removed in v1.9.3</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||
<tr><td>classic_textures.js</td><td>Use textures from early versions of the game</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||
<tr><td>color_everything.js</td><td>Allows every element to have a custom color</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||
<tr><td>death_count.js</td><td>Messages counting when Humans die</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||
<tr><td>devtests.js</td><td>Experimental features from the Sandboxels developer</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||
<tr><td>edible_everything.js</td><td>Allows every element to be mixed into Batter and Dough</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||
<tr><td>fools.js</td><td>Re-adds FOOLS Mode</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
|
||||
|
|
@ -189,9 +190,11 @@
|
|||
<tr><td>boiling_things.js</td><td>Various elements can be vaporized</td><td>Alice</td></tr>
|
||||
<tr><td>bouncing_balls.js</td><td>New types of balls that bounce accurately and roll</td><td>Nekonico</td></tr>
|
||||
<tr><td>chalcopyrite.js</td><td>The chalcopyrite ore</td><td>Sophie</td></tr>
|
||||
<tr><td>chalk.js</td><td>Chalk</td><td>CharsonBurensen</td></tr>
|
||||
<tr><td>charsonsmoduno.js</td><td>Arsenic, Beryllium, Silicon, compounds, and some fake elements</td><td>CharsonBurensen</td></tr>
|
||||
<tr><td>chem.js</td><td>Several chemistry and physics-related elements</td><td>lllllllllwith10ls</td></tr>
|
||||
<tr><td>clf3.js</td><td>Chlorine Trifluoride</td><td>Alice</td></tr>
|
||||
<tr><td>cmur.js</td><td>CharsonsModUno (???)</td><td>CharsonBurensen</td></tr>
|
||||
<tr><td>debrisable.js</td><td>Expands the number of breakable elements, changes erosion, and adds way to craft certain elements from breaking other elements</td><td>Nekonico</td></tr>
|
||||
<tr><td>fire_extinguisher.js</td><td>Fire extinguisher blocks and realistic firefighting foam to put out nearly anything</td><td>Dr_Lego</td></tr>
|
||||
<tr><td>fire_mod.js</td><td>Various properties to change fire behavior and radioactive fire</td><td>Alice</td></tr>
|
||||
|
|
@ -248,6 +251,7 @@
|
|||
<tr><td>spouts.js</td><td>Spouts for all liquids</td><td>kaeud</td></tr>
|
||||
<tr><td>state_voids.js</td><td>Several elements that delete specific states of matter</td><td>Alice</td></tr>
|
||||
<tr><td>switches.js</td><td>Electrical switches that can be toggled</td><td>Alice</td></tr>
|
||||
<tr><td>thiquovite.js</td><td>Thiquovite and wall builders</td><td>CharsonBurensen</td></tr>
|
||||
<tr><td>ticking_temp_stuff.js</td><td>Heater and Cooler variants</td><td>Alice</td></tr>
|
||||
<tr><td>video.js</td><td>Video player</td><td>ggod</td></tr>
|
||||
<tr><td>waterspout.js</td><td>Re-adds the old Water Spout</td><td>mollthecoder</td></tr>
|
||||
|
|
@ -296,6 +300,7 @@
|
|||
<tr><td>cat.js</td><td>Cats and cat food</td><td>SquareScreamYT</td></tr>
|
||||
<tr><td>cells.js</td><td>Several experimental edits of the Cell element</td><td>Alice</td></tr>
|
||||
<tr><td>children.js</td><td>Pesky little gremlins</td><td>Taterbob</td></tr>
|
||||
<tr><td>coldblooded.js</td><td>Lizards, axolotls, snakes, and more</td><td>Cube14yt</td></tr>
|
||||
<tr><td>colonies.js</td><td>Rockets that contain settlers to terraform a planet</td><td>Nekonico</td></tr>
|
||||
<tr><td>crimson.js</td><td>Elements relating to the Crimson from Terraria</td><td>Alice</td></tr>
|
||||
<tr><td>dogs.js</td><td>Simple dog and dog food</td><td>hedera-ivy</td></tr>
|
||||
|
|
@ -363,6 +368,7 @@
|
|||
<tr><td>sports_beta.js</td><td>Several sports items</td><td>BluBun5193</td></tr>
|
||||
<tr><td>star_wars.js</td><td>Various items from Star Wars by Disney</td><td>SeaPickle754</td>
|
||||
<tr><td>sus.js</td><td>Among Us crewmate</td><td>Nv7</td></tr>
|
||||
<tr><td>thiquovite.js</td><td>Thiquovite and wall builders</td><td>CharsonBurensen</td></tr>
|
||||
<tr><td>triggerable_random_powders.js</td><td>Powders with different abilities, such as heating and cooling</td><td>Alice</td></tr>
|
||||
<tr><td>troll.js</td><td>Various dumb elements that iterate randomly on the entire screen</td><td>Alice</td></tr>
|
||||
<tr><td>WhisperingTheory.js</td><td>Powder and gas variant of heater and cooler</td><td>kaeud</td></tr>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
elements.ultra_heat = {
|
||||
color: "#ff0000",
|
||||
category: "Temperature+",
|
||||
tool: function(pixel) {
|
||||
pixel.temp += 500;
|
||||
}
|
||||
}
|
||||
|
||||
elements.infinite_heat = {
|
||||
color: "#ff0000",
|
||||
category: "Temperature+",
|
||||
tool: function(pixel) {
|
||||
pixel.temp += Infinity;
|
||||
}
|
||||
}
|
||||
|
||||
elements.ultra_freeze = {
|
||||
color: "#00ccff",
|
||||
category: "Temperature+",
|
||||
tool: function(pixel) {
|
||||
pixel.temp -= 500;
|
||||
}
|
||||
}
|
||||
|
||||
elements.infinite_freeze = {
|
||||
color: "#00ccff",
|
||||
category: "Temperature+",
|
||||
tool: function(pixel) {
|
||||
pixel.temp -= Infinity;
|
||||
}
|
||||
}
|
||||
|
||||
elements.absolute_zero = {
|
||||
color: "#66ccff",
|
||||
category: "Temperature+",
|
||||
tool: function(pixel) {
|
||||
pixel.temp = -273.15;
|
||||
}
|
||||
}
|
||||
|
||||
elements.neutralize = {
|
||||
color: "#cccccc",
|
||||
category: "Temperature+",
|
||||
tool: function(pixel) {
|
||||
pixel.temp = 20;
|
||||
}
|
||||
}
|
||||
|
|
@ -1134,7 +1134,7 @@ elements.dry_icing = {
|
|||
|
||||
elements.cream.reactions.baked_batter = {elem2: "cake" }
|
||||
|
||||
elements.sugar.breakInto = {elem1: "icing_sugar"}
|
||||
elements.sugar.breakInto = "icing_sugar"
|
||||
|
||||
elements.boiler = {
|
||||
color: "#73fff8",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,222 @@
|
|||
elements.luigi = {
|
||||
color: "#4cbb17",
|
||||
behavior: behaviors.WALL,
|
||||
category: "special",
|
||||
state: "solid",
|
||||
density: 985
|
||||
}
|
||||
elements.luigi_ball = {
|
||||
color: "#3dae0a",
|
||||
behavior: behaviors.BOUNCY,
|
||||
category: "special",
|
||||
state: "solid",
|
||||
density: 666.67
|
||||
}
|
||||
elements.pickle_juice = {
|
||||
color: "#edff75",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
density: 1050,
|
||||
tempLow:-21,
|
||||
stateLow:"pickle_juice_ice",
|
||||
reactions: {
|
||||
"cucumber": {elem2:"pickle"},
|
||||
}
|
||||
};
|
||||
elements.pickle_juice_ice = {
|
||||
color: "#f4ff86",
|
||||
behavior: behaviors.WALL,
|
||||
category: "states",
|
||||
state: "solid",
|
||||
density: 962,
|
||||
tempHigh:-21,
|
||||
stateHigh:"pickle_juice"
|
||||
}
|
||||
elements.cucumber = {
|
||||
color: "#04540c",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
density: 410,
|
||||
reactions: {
|
||||
"salt_water": {elem1:"pickle",elem2:"pickle_juice"},
|
||||
"vinegar": {elem1:"pickle",elem2:"pickle_juice"},
|
||||
"yogurt": {elem1:null,elem2:"tzatziki"},
|
||||
}
|
||||
};
|
||||
elements.tzatziki = {
|
||||
color: "#ebf2ec",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
density: 1014.421,
|
||||
alias:["cacık","tarator"]
|
||||
}
|
||||
elements.argon = {
|
||||
color: "#efd7f7",
|
||||
behavior: behaviors.GAS,
|
||||
category: "gases",
|
||||
state: "gas",
|
||||
density: 1.784,
|
||||
tempLow:-186,
|
||||
stateLow:"liquid_argon"
|
||||
}
|
||||
elements.liquid_argon = {
|
||||
color: "#f5defa",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
density: 1395.4,
|
||||
tempLow:-189,
|
||||
stateLow:"argon_ice",
|
||||
tempHigh:-186,
|
||||
stateHigh:"argon"
|
||||
}
|
||||
elements.argon_ice = {
|
||||
color: "#f5e5ff",
|
||||
behavior: behaviors.WALL,
|
||||
category: "states",
|
||||
state: "solid",
|
||||
density: 1648,
|
||||
tempHigh:-189,
|
||||
stateHigh:"liquid_argon"
|
||||
}
|
||||
elements.krypton = {
|
||||
color: "#fae5c0",
|
||||
behavior: behaviors.GAS,
|
||||
category: "gases",
|
||||
state: "gas",
|
||||
density: 3.749,
|
||||
tempLow:-153,
|
||||
stateLow:"liquid_krypton"
|
||||
}
|
||||
elements.liquid_krypton = {
|
||||
color: "#fcebc6",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
density: 2413,
|
||||
tempLow:-157,
|
||||
stateLow:"krypton_ice",
|
||||
tempHigh:-153,
|
||||
stateHigh:"krypton"
|
||||
}
|
||||
elements.krypton_ice = {
|
||||
color: "#feeecb",
|
||||
behavior: behaviors.WALL,
|
||||
category: "states",
|
||||
state: "solid",
|
||||
density: 2800,
|
||||
tempHigh:-157,
|
||||
stateHigh:"liquid_krypton"
|
||||
}
|
||||
elements.xenon = {
|
||||
color: "#c9bae3",
|
||||
behavior: behaviors.GAS,
|
||||
category: "gases",
|
||||
state: "gas",
|
||||
density: 5.894,
|
||||
tempLow:-108,
|
||||
stateLow:"liquid_xenon"
|
||||
}
|
||||
elements.liquid_xenon = {
|
||||
color: "#cdbfe8",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
density: 2942,
|
||||
tempLow:-112,
|
||||
stateLow:"xenon_ice",
|
||||
tempHigh:-108,
|
||||
stateHigh:"xenon"
|
||||
}
|
||||
elements.xenon_ice = {
|
||||
color: "#daceee",
|
||||
behavior: behaviors.WALL,
|
||||
category: "states",
|
||||
state: "solid",
|
||||
density: 3408,
|
||||
tempHigh:-112,
|
||||
stateHigh:"liquid_xenon"
|
||||
}
|
||||
elements.NaK = {
|
||||
color: "#575050",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
density: 866,
|
||||
reactions: {
|
||||
"water": {elem1:["caustic_potash","hydrogen"],elem2:"fire"}
|
||||
}
|
||||
};
|
||||
elements.obsidian = {
|
||||
color: ["#020202","#3d2856","#281f3f","#110d1d","#06030c"],
|
||||
behavior: behaviors.WALL,
|
||||
category: "solids",
|
||||
state: "solid",
|
||||
density: 2400,
|
||||
tempHigh:900,
|
||||
stateHigh:"magma"
|
||||
}
|
||||
elements.polonium={
|
||||
color: "#1ff2dd",
|
||||
category:"solids",
|
||||
customColor: false,
|
||||
hidden:false,
|
||||
state: "solid",
|
||||
density: 9320,
|
||||
behavior: [
|
||||
"XX|CR:radiation%4|XX",
|
||||
"CR:radiation%5|CH:lead%1.444|CR:radiation%5",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
canPlace: true,
|
||||
glow: true,
|
||||
reactions: {
|
||||
"acid": {elem1:null,elem2:"pink_polonium_solution"},
|
||||
"neutral_acid": {elem1:null,elem2:"pink_polonium_solution"},
|
||||
"vinegar": {elem1:null,elem2:"pink_polonium_solution"}
|
||||
}
|
||||
};
|
||||
elements.stable_polonium={
|
||||
color: "#18ecd5",
|
||||
category:"solids",
|
||||
customColor: false,
|
||||
hidden:false,
|
||||
state: "solid",
|
||||
density: 9320,
|
||||
canPlace: true,
|
||||
glow: true,
|
||||
reactions: {
|
||||
"acid": {elem1:null,elem2:"pink_polonium_solution"},
|
||||
"neutral_acid": {elem1:null,elem2:"pink_polonium_solution"},
|
||||
"vinegar": {elem1:null,elem2:"pink_polonium_solution"}
|
||||
}
|
||||
};
|
||||
elements.pink_polonium_solution={
|
||||
color: "#ed95dd",
|
||||
category:"liquids",
|
||||
customColor: false,
|
||||
hidden:false,
|
||||
state: "liquid",
|
||||
canPlace: true,
|
||||
behavior: [
|
||||
"CH:light%1|CH:light%2|CH:light%1",
|
||||
"XX|CH:yellow_polonium_solution%3.5|XX",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
glow: false
|
||||
};
|
||||
elements.yellow_polonium_solution={
|
||||
color: "#f2f538",
|
||||
category:"liquids",
|
||||
customColor: false,
|
||||
hidden:false,
|
||||
state: "liquid",
|
||||
canPlace: true,
|
||||
glow: false
|
||||
}
|
||||
elements.water.reactions.pickle = {elem1:"pickle_juice", elem2:"pickle"}
|
||||
elements.salt_water.reactions.pickle = {elem1:"pickle_juice", elem2:"pickle"}
|
||||
elements.sodium.reactions.potassium = {elem1:"NaK",elem2:null}
|
||||
|
|
@ -0,0 +1,499 @@
|
|||
elements.calcium_chloride = {
|
||||
color: ["#D3DDE8", "#C6CCD5", "#BCC7D3", "#DDE4EB"],
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "powders",
|
||||
hidden: false,
|
||||
breakInto: ["calcium", "chlorine"],
|
||||
state: "solid",
|
||||
tempHigh: 772,
|
||||
reactions: {
|
||||
"sodium_carbonate": { elem1:"foam", elem2:["colour_pick_chalk_powder","chalk_powder1","chalk_powder3","chalk_powder2","chalk_powder4","chalk_powder5","chalk_powder6","chalk_powder7","chalk_powder8","chalk_powder9",] },
|
||||
"sodium": { elem1:"salt", elem2:"calcium" },
|
||||
"ice": { elem2:"water", chance: 0.5 },
|
||||
"dust": { elem2: null, chance: 0.5 },
|
||||
"water": { elem2: null, chance: 0.8 },
|
||||
"rotten_meat": { elem2: "meat" },
|
||||
"laser": { elem1: ["calcium","chlorine"] },
|
||||
}
|
||||
};
|
||||
|
||||
if (!elements.sodium.reactions) { // Include this block once
|
||||
elements.sodium.reactions = {} // This creates the property if it doesn't exist
|
||||
}
|
||||
elements.sodium.reactions.carbon_dioxide = { elem1: "sodium_carbonate" }
|
||||
|
||||
|
||||
|
||||
|
||||
elements.sodium_carbonate = {
|
||||
color: "#ffffff",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
hidden: false,
|
||||
breakInto: ["sodium", "carbon_dioxide"],
|
||||
state: "solid",
|
||||
tempHigh: 851,
|
||||
reactions: {
|
||||
"calcium_chloride": { elem1:"foam", elem2:"colour_pick_chalk" },
|
||||
"chlorine": { elem1:"salt", elem2:"carbon_dioxide" },
|
||||
"laser": { elem1: ["carbon_dioxide","sodium"] },
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if (!elements.calcium.reactions) { // Include this block once
|
||||
elements.calcium.reactions = {} // This creates the property if it doesn't exist
|
||||
}
|
||||
elements.calcium.reactions.chlorine = { elem1: "calcium_chloride" }
|
||||
|
||||
elements.colour_pick_chalk = {
|
||||
color: ["#FF4DFF", "#B24DFF", "#4D52FF", "#4DB0FF", "#4DFFDF", "#64FF4D", "#FFE74D", "#FF994D", "#FF5B4D", "#FF794D", "#FFB14D", "#A8FF4D", "#4DFF85", "#4DD6FF"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: true,
|
||||
category: "chalk",
|
||||
breakInto: "colour_pick_chalk_powder",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk1 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#ffaaaa"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder1",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
elements.rainbow_chalk = {
|
||||
name: "Rainbow Chalk",
|
||||
onPlace: behaviors.DO_TICK,
|
||||
tick: function(pixel) {
|
||||
if (pixel.start-1 <= pixelTicks) {
|
||||
if (pixel.colorstart === undefined) {
|
||||
pixel.colorstart = pixel.start;
|
||||
}
|
||||
pixel.color = "hsl(" + pixel.colorstart + ",100%,65%)";
|
||||
}
|
||||
},
|
||||
color: ["#ff4d4d","#ffac4d","#ffff4d","#4dff4d","#4dffff","#4d4dff","#ff4dff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder_r",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk2 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#ff80aa"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder2",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk3 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#ffffaa"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder3",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk4 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#80ffaa"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder4",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk5 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#aaff80"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder5",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk6 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#aaffff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder6",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk7 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#aa80ff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder7",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk8 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#80aaff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder8",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk9 = {
|
||||
name: "Chalk",
|
||||
behavior: behaviors.WALL,
|
||||
color: ["#ffaaff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
breakInto: "chalk_powder9",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder1 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#ffaaaa"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
elements.chalk_powder_r = {
|
||||
name: "Rainbow Chalk Powder",
|
||||
onPlace: behaviors.DO_TICK,
|
||||
tick: function(pixel) {
|
||||
behaviors.POWDER(pixel);
|
||||
if (pixel.start-1 <= pixelTicks) {
|
||||
if (pixel.colorstart === undefined) {
|
||||
pixel.colorstart = pixel.start;
|
||||
}
|
||||
pixel.color = "hsl(" + pixel.colorstart + ",100%,65%)";
|
||||
}
|
||||
},
|
||||
color: ["#ff4d4d","#ffac4d","#ffff4d","#4dff4d","#4dffff","#4d4dff","#ff4dff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder2 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#ff80aa"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder3 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#ffffaa"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder4 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#80ffaa"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder5 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#aaff80"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder6 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#aaffff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder7 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#aa80ff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder8 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#80aaff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.chalk_powder9 = {
|
||||
name: "Chalk Powder",
|
||||
behavior: behaviors.POWDER,
|
||||
color: ["#ffaaff"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.colour_pick_chalk_powder = {
|
||||
color: ["#FF4DFF", "#B24DFF", "#4D52FF", "#4DB0FF", "#4DFFDF", "#64FF4D", "#FFE74D", "#FF994D", "#FF5B4D", "#FF794D", "#FFB14D", "#A8FF4D", "#4DFF85", "#4DD6FF"],
|
||||
stain: 0.3,
|
||||
behavior: behaviors.POWDER,
|
||||
stainSelf: true,
|
||||
customColor: true,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "ash",
|
||||
};
|
||||
|
||||
elements.i_chalk_powder = {
|
||||
name: "Incendiary Chalk Powder",
|
||||
behavior: [
|
||||
"XX|CR:fire%5 AND CR:ember%0.1|XX",
|
||||
"XX|CH:pop,ember%0.05 AND HT:5%2|XX",
|
||||
"M2|M1|M2",
|
||||
],
|
||||
color: ["#ffb37d"],
|
||||
stain: 0.5,
|
||||
stainSelf: true,
|
||||
temp: 70,
|
||||
canContain: true,
|
||||
related: ["art", "calcium", "calcium_chloride", "sodium_carbonate"],
|
||||
customColor: false,
|
||||
hidden: false,
|
||||
category: "chalk",
|
||||
state: "solid",
|
||||
tempHigh: 590,
|
||||
stateHigh: "flashbang",
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,465 @@
|
|||
/* changelog
|
||||
v 0.1 added snake
|
||||
v 0.11 "axolotl" eats fish
|
||||
v 0.2 crocodiles scales and axolotls actually eat fish now
|
||||
|
||||
thats it for now
|
||||
*/
|
||||
|
||||
// Only run this if the human, head, and body elements exist
|
||||
if (elements.human && elements.head && elements.body) {
|
||||
// Human
|
||||
const oldHumanTick = elements.human.tick;
|
||||
elements.human.tick = function (pixel) {
|
||||
if (oldHumanTick) oldHumanTick(pixel);
|
||||
if (pixel.poisoned !== undefined) {
|
||||
pixel.poisoned--;
|
||||
if (pixel.poisoned <= 0) {
|
||||
deletePixel(pixel.x, pixel.y);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Head
|
||||
const oldHeadTick = elements.head.tick;
|
||||
elements.head.tick = function (pixel) {
|
||||
if (oldHeadTick) oldHeadTick(pixel);
|
||||
if (pixel.poisoned !== undefined) {
|
||||
pixel.poisoned--;
|
||||
if (pixel.poisoned <= 0) {
|
||||
deletePixel(pixel.x, pixel.y);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Body
|
||||
const oldBodyTick = elements.body.tick;
|
||||
elements.body.tick = function (pixel) {
|
||||
if (oldBodyTick) oldBodyTick(pixel);
|
||||
if (pixel.poisoned !== undefined) {
|
||||
pixel.poisoned--;
|
||||
if (pixel.poisoned <= 0) {
|
||||
deletePixel(pixel.x, pixel.y);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function eatBee(pixel1, pixel2) {
|
||||
pixel1.color = "#5c138a";
|
||||
pixel1.poisoned ??= 30;
|
||||
}
|
||||
|
||||
function poisonOther(pixel1, pixel2) {
|
||||
if (!pixel2) return;
|
||||
pixel2.color = "#5c138a";
|
||||
pixel2.poisoned ??= 30;
|
||||
}
|
||||
|
||||
elements.human.reactions.snake =
|
||||
{ attr1: { panic: 5 } }
|
||||
|
||||
elements.fish.reactions.toad_tadpole =
|
||||
{ elem2: null, chance: 0.25, func: behaviors.FEEDPIXEL },
|
||||
|
||||
elements.glue.reactions.scale =
|
||||
{ elem1: null, elem2: "scale_plate" },
|
||||
|
||||
elements.lizard = {
|
||||
color: ["#00ff1a", "#038f11"],
|
||||
behavior: [
|
||||
["XX", "XX", "M2%1"],
|
||||
["XX", "FX%5", "M1%15"],
|
||||
["M2", "M1", "M2"],
|
||||
],
|
||||
category: "life",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"fly": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||
"ant": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.3 },
|
||||
"termite": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.3 },
|
||||
"worm": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"bee": { elem2: null, func: eatBee, chance: 0.05 },
|
||||
"firefly": { elem2: null, func: eatBee, chance: 0.4 },
|
||||
"fish": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 },
|
||||
"pool_water": { chance: 0.001, elem1: "rotten_meat" },
|
||||
"dirty_water": { chance: 0.0001, elem1: "rotten_meat" },
|
||||
"radiation": { elem1: ["ash", "meat", "cooked_meat", "rotten_meat", "snake", "crocodile", null], chance: 0.4 },
|
||||
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
||||
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"chlorine": { elem1: "meat", chance: 0.1 },
|
||||
"alcohol": { elem1: "meat", chance: 0.025 },
|
||||
"vinegar": { elem1: "rotten_meat", chance: 0.001 },
|
||||
"poison": { elem1: "rotten_meat", elem2: null }
|
||||
},
|
||||
foodNeed: 5,
|
||||
temp: 20,
|
||||
tempHigh: 120,
|
||||
stateHigh: ["cooked_meat", "scale"],
|
||||
tempLow: -20,
|
||||
stateLow: "frozen_meat",
|
||||
breakInto: ["blood", "scale"],
|
||||
density: 1050,
|
||||
eggColor: "#ffffff",
|
||||
tick: function (pixel) {
|
||||
if (pixel.poisoned !== undefined) {
|
||||
pixel.poisoned--;
|
||||
if (pixel.poisoned <= 0) {
|
||||
deletePixel(pixel.x, pixel.y);
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
elements.toad = {
|
||||
color: ["#693800", "#945a18"],
|
||||
behavior: [
|
||||
["XX", "XX", "M2%3 AND SW:water, salt_water, dirty_water, pool_water, seltzer%5"],
|
||||
["XX", "FX%25", "M2%6 AND SW:water, salt_water, dirty_water, pool_water, seltzer%8"],
|
||||
["M2", "M1 AND SW:water, salt_water, dirty_water, pool_water, seltzer%8", "M2 AND SW:water, salt_water, dirty_water, pool_water, seltzer%8"],
|
||||
],
|
||||
|
||||
category: "life",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"fly": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||
"ant": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||
"termite": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||
"worm": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||
"spider": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"dead_bug": { elem2: null, chance: 0.2, func: behaviors.FEEDPIXEL },
|
||||
"bee": { elem2: null, func: eatBee, chance: 0.1 },
|
||||
"firefly": { elem2: null, func: eatBee, chance: 0.4 },
|
||||
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 },
|
||||
"algae": { elem2: null, chance: 0.1, func: behaviors.FEEDPIXEL },
|
||||
"kelp": { elem2: "water", chance: 0.1, func: behaviors.FEEDPIXEL },
|
||||
"snail": { elem2: "limestone", func: behaviors.FEEDPIXEL, chance: 0.05 },
|
||||
"slug": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"pool_water": { chance: 0.005, elem1: "rotten_meat" },
|
||||
"dirty_water": { chance: 0.0001, elem1: "rotten_meat" },
|
||||
"radiation": { elem1: ["ash", "meat", "rotten_meat", "cooked_meat", "toad_tadpole", "tadpole", "frog", null], chance: 0.4 },
|
||||
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
||||
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"chlorine": { elem1: "meat", chance: 0.1 },
|
||||
"alcohol": { elem1: "meat", chance: 0.025 },
|
||||
"vinegar": { elem1: "rotten_meat", chance: 0.001 },
|
||||
"poison": { elem1: "rotten_meat", elem2: null }
|
||||
},
|
||||
foodNeed: 10,
|
||||
baby: "toad_tadpole",
|
||||
temp: 18,
|
||||
tempHigh: 100,
|
||||
stateHigh: "cooked_meat",
|
||||
tempLow: -20,
|
||||
stateLow: "frozen_meat",
|
||||
breakInto: "slime",
|
||||
density: 1200,
|
||||
tick: function (pixel) {
|
||||
if (pixel.poisoned !== undefined) {
|
||||
pixel.poisoned--;
|
||||
if (pixel.poisoned <= 0) {
|
||||
deletePixel(pixel.x, pixel.y);
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
elements.toad_tadpole = {
|
||||
color: "#87b574",
|
||||
behavior: [
|
||||
"XX|XX|M2%25 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%14",
|
||||
"XX|FX%0.5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%14",
|
||||
"M2|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%14",
|
||||
],
|
||||
reactions: {
|
||||
"algae": { elem2: null, chance: 0.25 },
|
||||
"kelp": { elem2: "water", chance: 0.25 },
|
||||
"pool_water": { chance: 0.70, elem1: null },
|
||||
"dirty_water": { chance: 0.70, elem1: null },
|
||||
"bleach": { elem1: null, chance: 0.05 },
|
||||
"poison": { elem1: null },
|
||||
"radiation": { elem1: ["toad", "toad", "frog", "worm", null], chance: 0.4 },
|
||||
},
|
||||
tempHigh: 100,
|
||||
stateHigh: "steam",
|
||||
tempLow: -10,
|
||||
stateLow: "ice",
|
||||
breakInto: ["slime", null],
|
||||
category: "life",
|
||||
hidden: true,
|
||||
state: "solid",
|
||||
density: 1450,
|
||||
conduct: 0.2,
|
||||
tick: function (pixel) {
|
||||
|
||||
if (pixelTicks - pixel.start > 500 && Math.random() <= 0.05) {
|
||||
changePixel(pixel, "toad");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
elements.newt = {
|
||||
color: ["#db8727", "#945a18"],
|
||||
behavior: [
|
||||
["XX", "XX", "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%15"],
|
||||
["XX", "FX%5", "M2%25 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%15"],
|
||||
["M2", "M1 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%15", "M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%15"],
|
||||
],
|
||||
category: "life",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"fly": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"termite": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"ant": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"worm": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"slug": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"snail": { elem2: "limestone", func: behaviors.FEEDPIXEL },
|
||||
"pool_water": { chance: 0.70, elem1: null },
|
||||
"dirty_water": { chance: 0.70, elem1: null },
|
||||
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 },
|
||||
"radiation": { elem1: ["ash", "meat", "cooked_meat", "rotten_meat", "axolotl", null], chance: 0.4 },
|
||||
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
||||
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"chlorine": { elem1: "meat", chance: 0.1 },
|
||||
"alcohol": { elem1: "meat", chance: 0.025 },
|
||||
"vinegar": { elem1: "rotten_meat", chance: 0.001 }
|
||||
},
|
||||
foodNeed: 10,
|
||||
temp: 18,
|
||||
tempHigh: 100,
|
||||
stateHigh: "cooked_meat",
|
||||
tempLow: -20,
|
||||
stateLow: "frozen_meat",
|
||||
breakInto: "slime",
|
||||
density: 1200,
|
||||
eggColor: "#ffeeab",
|
||||
};
|
||||
|
||||
elements.axolotl = {
|
||||
color: ["#ff99ff", "#ffe100", "#785705"],
|
||||
behavior: [
|
||||
["XX", "XX", "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%10"],
|
||||
["XX", "FX", "M2%15 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%10"],
|
||||
["M2", "M1", "M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%10"],
|
||||
],
|
||||
category: "life",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"fly": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"termite": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"ant": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"worm": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"slug": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"snail": { elem2: "limestone", func: behaviors.FEEDPIXEL },
|
||||
"fish": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||
"pool_water": { chance: 0.70, elem1: null },
|
||||
"dirty_water": { chance: 0.70, elem1: null },
|
||||
"radiation": { elem1: ["ash", "meat", "cooked_meat", "rotten_meat", "newt"], chance: 0.4 },
|
||||
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
||||
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"chlorine": { elem1: "meat", chance: 0.1 },
|
||||
"alcohol": { elem1: "meat", chance: 0.025 },
|
||||
"vinegar": { elem1: "rotten_meat", chance: 0.001 },
|
||||
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 }
|
||||
},
|
||||
foodNeed: 20,
|
||||
temp: 18,
|
||||
tempHigh: 90,
|
||||
stateHigh: "cooked_meat",
|
||||
tempLow: -20,
|
||||
stateLow: "frozen_meat",
|
||||
breakInto: ["slime", "blood"],
|
||||
density: 1000,
|
||||
eggColor: ["#dcdcdc", "#a9a9a9", "#2b2b2b"],
|
||||
tick: function (pixel) {
|
||||
pixel.lifetime ??= 900;
|
||||
|
||||
let up = pixel.y > 0 ? pixelMap[pixel.x][pixel.y - 1] : null;
|
||||
let down = pixel.y < pixelMap[0].length - 1 ? pixelMap[pixel.x][pixel.y + 1] : null;
|
||||
let left = pixel.x > 0 ? pixelMap[pixel.x - 1][pixel.y] : null;
|
||||
let right = pixel.x < pixelMap.length - 1 ? pixelMap[pixel.x + 1][pixel.y] : null;
|
||||
|
||||
if (
|
||||
(up && up.element === "water") ||
|
||||
(down && down.element === "water") ||
|
||||
(left && left.element === "water") ||
|
||||
(right && right.element === "water")) {
|
||||
pixel.lifetime = 900;
|
||||
} else {
|
||||
pixel.lifetime--;
|
||||
if (pixel.lifetime <= 0 && Math.random() <= 0.1) {
|
||||
deletePixel(pixel.x, pixel.y);
|
||||
createPixel("meat", pixel.x, pixel.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
elements.snake = {
|
||||
color: ["#006400", "#90ee90", "#00ff00"],
|
||||
behavior: [
|
||||
["XX", "XX", "XX"],
|
||||
["XX", "FX%15", "M2%10"],
|
||||
["M2", "M1", "M1"],
|
||||
],
|
||||
reactions: {
|
||||
"frog": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"toad": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"lizard": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"worm": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"slug": { elem2: null, func: behaviors.FEEDPIXEL },
|
||||
"snail": { elem2: "limestone", func: behaviors.FEEDPIXEL },
|
||||
"egg": {
|
||||
elem2: "egg",
|
||||
func: function (pixel1, pixel2) {
|
||||
if (pixel2.animal === "snake") return; // Don't eat own egg
|
||||
behaviors.FEEDPIXEL(pixel1, pixel2);
|
||||
}
|
||||
},
|
||||
"radiation": { elem1: ["ash", "meat", "cooked_meat", "rotten_meat", "lizard", "crocodile", null], chance: 0.4 },
|
||||
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 },
|
||||
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
||||
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"chlorine": { elem1: "meat", chance: 0.1 },
|
||||
"alcohol": { elem1: "meat", chance: 0.025 },
|
||||
"vinegar": { elem1: "rotten_meat", chance: 0.001 },
|
||||
"poison": { elem1: null }
|
||||
},
|
||||
category: "life",
|
||||
state: "solid",
|
||||
density: 1050,
|
||||
temp: 20,
|
||||
tempHigh: 120,
|
||||
stateHigh: "cooked_meat",
|
||||
tempLow: -10,
|
||||
stateLow: "frozen_meat",
|
||||
breakInto: "blood",
|
||||
|
||||
tick: function (pixel) {
|
||||
const directions = [
|
||||
[0, -1], [-1, -1], [1, -1],
|
||||
[-1, 0], [1, 0],
|
||||
[0, 1], [-1, 1], [1, 1]
|
||||
];
|
||||
|
||||
for (let [dx, dy] of directions) {
|
||||
let x = pixel.x + dx;
|
||||
let y = pixel.y + dy;
|
||||
if (!isEmpty(x, y)) {
|
||||
let other = pixelMap[x]?.[y];
|
||||
if (other && (other.element === "head" || other.element === "body" || other.element === "crocodile") && Math.random() <= 0.5) {
|
||||
poisonOther(pixel, other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
elements.crocodile = {
|
||||
color: ["#065e13", "#0c751c"],
|
||||
behavior: [
|
||||
["XX", "XX", "XX AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%5"],
|
||||
["XX", "FX%10", "M2%15 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%5"],
|
||||
["M2", "M1", "M1 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%5"],
|
||||
],
|
||||
category: 'life',
|
||||
state: 'solid',
|
||||
foodNeed: 10,
|
||||
reactions: {
|
||||
"fish": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"bird": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"rat": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.5 },
|
||||
"frog": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"toad": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"snake": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.4 },
|
||||
"axolotl": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"lizard": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"newt": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"body": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"head": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"human": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"slug": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"snail": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"bone": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.1 },
|
||||
"bone_marrow": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.4 },
|
||||
"homonculus": { elem2: null, func: behaviors.FEEDPIXEL, chance: 0.2 },
|
||||
"radiation": { elem1: ["ash", "meat", "cooked_meat", "rotten_meat", "lizard", "snake", null], chance: 0.4 },
|
||||
"oxygen": { elem2: "carbon_dioxide", chance: 0.5 },
|
||||
"mercury": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"bleach": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"infection": { elem1: "rotten_meat", chance: 0.025 },
|
||||
"uranium": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"cyanide": { elem1: "rotten_meat", chance: 0.1 },
|
||||
"chlorine": { elem1: "meat", chance: 0.1 },
|
||||
"alcohol": { elem1: "meat", chance: 0.025 },
|
||||
"vinegar": { elem1: "rotten_meat", chance: 0.001 },
|
||||
"poison": { elem1: null }
|
||||
},
|
||||
temp: 18,
|
||||
tempHigh: 100,
|
||||
stateHigh: ["cooked_meat", "scale"],
|
||||
tempLow: -10,
|
||||
stateLow: "frozen_meat",
|
||||
breakInto: ["blood", "scale"],
|
||||
density: 1100
|
||||
}
|
||||
|
||||
elements.scale = {
|
||||
category: "powders",
|
||||
color: ['#076607', '#1cb01c', '#0ef00e'],
|
||||
behavior: behaviors.POWDER,
|
||||
tempHigh: 900,
|
||||
stateHigh: ["ash", "ash", "ash", "smoke", "stench", "stench", "stench"],
|
||||
breakInto: "dust",
|
||||
hardness: 0.3,
|
||||
reactions: {
|
||||
"glue": {
|
||||
elem1: "scale_plate", elem2: null,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elements.scale_plate = {
|
||||
category: "solids",
|
||||
color: ['#044404', '#137a13', '#0aa00a'],
|
||||
hardness: 0.8,
|
||||
breakInto: "scale",
|
||||
tick: function (pixel) {
|
||||
// 2 temp highs
|
||||
const hot = ["scale", "dioxin", "cyanide_gas"];
|
||||
const hotter = ["ash", "ash", "ash", "smoke", "stench", "stench", "stench", "dioxin", "cyanide_gas"];
|
||||
if (pixel.temp >= 475 && pixel.temp <= 900) {
|
||||
let chosen = hot[Math.floor(Math.random() * hot.length)];
|
||||
changePixel(pixel, chosen);
|
||||
}
|
||||
if (pixel.temp >= 900) {
|
||||
let chosen = hotter[Math.floor(Math.random() * hotter.length)];
|
||||
changePixel(pixel, chosen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
document.head.insertAdjacentHTML("beforeend",`<style>
|
||||
*, button, input, input[type="button"] { cursor: url(https://r74n.com/shapes/png/cursor_full.png), auto; }
|
||||
</style>`)
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
let dc_oldOnChange = elements.head.onChange;
|
||||
let dc_oldOnDelete = elements.head.onDelete;
|
||||
let dc_oldTick = elements.head.tick;
|
||||
|
||||
let deathCount = 0;
|
||||
function announceDeath() {
|
||||
clearLog();
|
||||
deathCount++;
|
||||
logMessage(deathCount+" Humans have died.")
|
||||
}
|
||||
|
||||
runAfterReset(function() {
|
||||
deathCount = 0;
|
||||
})
|
||||
|
||||
elements.head.onChange = function(pixel) {
|
||||
dc_oldOnChange(pixel);
|
||||
|
||||
if (pixelTicks - pixel.start > 30) announceDeath();
|
||||
|
||||
}
|
||||
|
||||
elements.head.onDelete = function(pixel) {
|
||||
dc_oldOnDelete(pixel);
|
||||
|
||||
if (pixelTicks - pixel.start > 30) announceDeath();
|
||||
}
|
||||
|
||||
elements.head.tick = function(pixel) {
|
||||
dc_oldTick(pixel);
|
||||
|
||||
if (pixel.dead && pixel.deadA === undefined) {
|
||||
pixel.deadA = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
elements.pyrane = {
|
||||
color: "#fc7c19",
|
||||
behavior: [
|
||||
"M1|M1 AND CR:fire%10|M1",
|
||||
"M1|XX|M1",
|
||||
"M1|M1|M1",
|
||||
],
|
||||
hidden: true,
|
||||
category: "hydroid",
|
||||
state: "gas",
|
||||
temp: 50,
|
||||
tempLow: -20,
|
||||
stateLow: ["fyrium"],
|
||||
reactions: {
|
||||
"dirt": { elem1:"pyrane", elem2:"fire" },
|
||||
"hydrogen": { elem1:"hydroid", elem2:"hydroid" },
|
||||
}
|
||||
};
|
||||
|
||||
elements.hydroid = {
|
||||
color: "#3a0ca6",
|
||||
behavior: [
|
||||
["XX", "XX", "XX"],
|
||||
["M2", "XX", "M2"],
|
||||
["M1", "M1 AND SW:water AND CH:water>hydroid%10", "M1"]
|
||||
],
|
||||
category: "hydroid",
|
||||
state: "liquid",
|
||||
temp: 20,
|
||||
tempHigh: 100,
|
||||
tempLow: -20,
|
||||
density: 12,
|
||||
conduct: 1,
|
||||
stain: 0.7,
|
||||
desc: "this is NOT water",
|
||||
stateHigh: ["pyrane", "steam"],
|
||||
stateLow: ["hydroid_ice"],
|
||||
reactions: {
|
||||
"fire": { elem2: "explosion" },
|
||||
"body": { elem2: "hydroid", chance: 0.5 },
|
||||
"head": { elem2: "hydroid", chance: 0.5 },
|
||||
"maple_syrup": { elem2: "hydroid" },
|
||||
"magma": { elem2: "hydroid" },
|
||||
"oil": { elem2: "hydroid" },
|
||||
"juice": { elem2: "hydroid" },
|
||||
"ice": { elem2: "hydroid_ice" },
|
||||
"blood": { elem2: "hydroid" },
|
||||
"infection": { elem2: "hydroid" },
|
||||
"milk": { elem1: "lactoid", elem2: "lactoid" }
|
||||
}
|
||||
};
|
||||
|
||||
elements.lactoid = {
|
||||
color: ["#deeeff"],
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"M1 AND SW:water AND CH:water>hydroid%5 AND CH:hydroid>lactoid%1 AND CH:milk>lactoid%10|XX|M1 AND SW:water AND CH:water>hydroid%5 AND CH:hydroid>lactoid%1 AND CH:milk>lactoid%10",
|
||||
"M1|M1 AND SW:water AND CH:water>hydroid%5 AND CH:hydroid>lactoid%1 AND CH:milk>lactoid%10|M1",
|
||||
],
|
||||
category: "hydroid",
|
||||
state: "liquid",
|
||||
temp: 20,
|
||||
tempHigh: 100,
|
||||
tempLow: -25,
|
||||
density: 12,
|
||||
conduct: 1,
|
||||
stain: 0.7,
|
||||
desc: "this is NOT milk",
|
||||
stateHigh: ["pyrane", "steam", "salt"],
|
||||
stateLow: ["lactoid_ice"],
|
||||
reactions: {
|
||||
"fire": { elem2: "explosion" },
|
||||
"body": { elem2: "hydroid", chance: 0.5, func: behaviors.KILLPIXEL2 },
|
||||
"head": { elem1: null, elem2: "hydroid", chance: 0.01, func: behaviors.FEEDPIXEL },
|
||||
"maple_syrup": { elem2: "hydroid" },
|
||||
"magma": { elem2: "hydroid" },
|
||||
"oil": { elem2: "hydroid" },
|
||||
"juice": { elem2: "hydroid" },
|
||||
"ice": { elem1: "lactoid_ice", elem2: "lactoid_ice" },
|
||||
"slush": { elem1: "hydroid_milkshake", elem2: "hydroid_milkshake" },
|
||||
"blood": { elem2: "hydroid" },
|
||||
"infection": { elem2: "hydroid" },
|
||||
}
|
||||
};
|
||||
|
||||
elements.lactoid_ice = {
|
||||
color: ["#bacbe0"],
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|XX",
|
||||
"XX|M1|XX",
|
||||
],
|
||||
category: "states",
|
||||
hidden: true,
|
||||
state: "solid",
|
||||
temp: -25,
|
||||
tempHigh: -20,
|
||||
density: 12,
|
||||
stain: 0.7,
|
||||
stateHigh: ["lactoid"],
|
||||
reactions: {
|
||||
"fire": { elem2: "explosion" },
|
||||
"body": { elem2: "hydroid", chance: 0.5, func: behaviors.KILLPIXEL2 },
|
||||
"head": { elem1: null, elem2: "hydroid", chance: 0.5, func: behaviors.FEEDPIXEL },
|
||||
"maple_syrup": { elem2: "hydroid" },
|
||||
"magma": { elem2: "hydroid" },
|
||||
"oil": { elem2: "hydroid" },
|
||||
"juice": { elem2: "hydroid" },
|
||||
"ice": { elem1: "lactoid_ice", elem2: "lactoid_ice" },
|
||||
"slush": { elem1: "hydroid_milkshake", elem2: "hydroid_milkshake" },
|
||||
"blood": { elem2: "hydroid" },
|
||||
"infection": { elem2: "hydroid" },
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.hydroid_ice = {
|
||||
color: ["#316787"],
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|XX",
|
||||
"XX|M1|XX",
|
||||
],
|
||||
category: "states",
|
||||
hidden: true,
|
||||
state: "solid",
|
||||
temp: -20,
|
||||
tempHigh: -18,
|
||||
density: 12,
|
||||
stain: 0.7,
|
||||
stateHigh: ["hydroid"],
|
||||
reactions: {
|
||||
"fire": { elem2: "explosion" },
|
||||
"body": { elem2: "hydroid", chance: 0.5, func: behaviors.KILLPIXEL2 },
|
||||
"head": { elem1: null, elem2: "hydroid", chance: 0.5, func: behaviors.FEEDPIXEL },
|
||||
"maple_syrup": { elem2: "hydroid" },
|
||||
"magma": { elem2: "hydroid" },
|
||||
"oil": { elem2: "hydroid" },
|
||||
"juice": { elem2: "hydroid" },
|
||||
"ice": { elem2: "hydroid_ice" },
|
||||
"ice_cream": { elem1: "hydroid_milkshake", elem2: "hydroid_milkshake" },
|
||||
"blood": { elem2: "hydroid" },
|
||||
"infection": { elem2: "hydroid" },
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
elements.hydroid_milkshake = {
|
||||
color: ["#69acff", "#94b2d6", "#699bff"],
|
||||
behavior: [
|
||||
"XX|M1%0.1|XX",
|
||||
"M1|XX|M1",
|
||||
"M1|M1|M1",
|
||||
],
|
||||
category: "hydroid",
|
||||
state: "liquid",
|
||||
temp: 20,
|
||||
tempHigh: 100,
|
||||
tempLow: -40,
|
||||
stateLow: "hydroid_ice",
|
||||
density: 12,
|
||||
conduct: 1,
|
||||
stain: 0.7,
|
||||
desc: "somehow edible",
|
||||
stateHigh: ["pyrane", "steam", "salt", "sugar"],
|
||||
reactions: {
|
||||
"fire": { elem2: "explosion" },
|
||||
"head": { elem1: null, func: behaviors.FEEDPIXEL }
|
||||
}
|
||||
};
|
||||
|
||||
elements.cremoid = {
|
||||
color: ["#f2fffe"],
|
||||
behavior: [
|
||||
"XX|SW:milk,lactoid,butyroid,melted_butter,water AND CR:bubble%1|XX",
|
||||
"M1 AND SW:water|CH:butyroid%0.1|M1 AND SW:water",
|
||||
"M1|M1|M1",
|
||||
],
|
||||
category: "hydroid",
|
||||
state: "liquid",
|
||||
temp: 20,
|
||||
tempHigh: 100,
|
||||
tempLow: -25,
|
||||
density: 12,
|
||||
conduct: 1,
|
||||
desc: "this is NOT cream",
|
||||
stateHigh: ["pyrane", "steam"],
|
||||
stateLow: ["icecream", "hydroid_milkshake"],
|
||||
reactions: {
|
||||
"fire": { elem2: "explosion" },
|
||||
"head": { elem1: null, chance: 0.01, func: behaviors.FEEDPIXEL },
|
||||
"ice": { elem1: "lactoid_ice", elem2: "lactoid_ice" },
|
||||
"slush": { elem1: "hydroid_milkshake", elem2: "hydroid_milkshake" },
|
||||
}
|
||||
};
|
||||
|
||||
elements.butyroid = {
|
||||
color: ["#a3f1ff"],
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"M1%2|CH:butter%0.1|M1%2",
|
||||
"M1|M1|M1",
|
||||
],
|
||||
category: "hydroid",
|
||||
state: "liquid",
|
||||
temp: 20,
|
||||
tempHigh: 33,
|
||||
density: 120,
|
||||
conduct: 1,
|
||||
desc: "this is NOT cream",
|
||||
stateHigh: ["pyrane", "melted_butter"],
|
||||
reactions: {
|
||||
"fire": { elem2: "explosion" },
|
||||
"head": { elem1: null, chance: 0.01, func: behaviors.FEEDPIXEL },
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,308 @@
|
|||
// Industry, made by PogDog.
|
||||
// For that sweet sweet feeling of destroying the Ozone.
|
||||
// Thanks nouser for the help, especially with the conveyors.
|
||||
|
||||
// Conveyors!
|
||||
|
||||
|
||||
elements.conveyer_right = {
|
||||
color: "#9999ff",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "industry",
|
||||
state: "wall",
|
||||
density: 2500,
|
||||
data: {},
|
||||
movable: false,
|
||||
noMix: true,
|
||||
};
|
||||
|
||||
elements.conveyer_left = {
|
||||
color: "#9999cc",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "industry",
|
||||
state: "wall",
|
||||
density: 2500,
|
||||
data: {},
|
||||
movable: false,
|
||||
noMix: true,
|
||||
};
|
||||
|
||||
runAfterLoad(function () {
|
||||
runEveryTick(function () {
|
||||
// RIGHTWARD movement: scan right to left
|
||||
for (let x = width - 1; x >= 0; x--) {
|
||||
for (let y = height - 1; y >= 0; y--) {
|
||||
const pixel = pixelMap[x][y];
|
||||
if (pixel && pixel.element === "conveyer_right") {
|
||||
for (let dy = 1; dy <= 10; dy++) {
|
||||
const targetY = y - dy;
|
||||
if (targetY < 0) break;
|
||||
const stackPixel = pixelMap[x]?.[targetY];
|
||||
if (!stackPixel || !elements[stackPixel.element]?.movable) break;
|
||||
if (isEmpty(x + 1, targetY)) {
|
||||
movePixel(stackPixel, x + 1, targetY);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LEFTWARD movement: scan left to right
|
||||
for (let x = 0; x < width; x++) {
|
||||
for (let y = height - 1; y >= 0; y--) {
|
||||
const pixel = pixelMap[x][y];
|
||||
if (pixel && pixel.element === "conveyer_left") {
|
||||
for (let dy = 1; dy <= 10; dy++) {
|
||||
const targetY = y - dy;
|
||||
if (targetY < 0) break;
|
||||
const stackPixel = pixelMap[x]?.[targetY];
|
||||
if (!stackPixel || !elements[stackPixel.element]?.movable) break;
|
||||
if (isEmpty(x - 1, targetY)) {
|
||||
movePixel(stackPixel, x - 1, targetY);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Oven
|
||||
|
||||
elements.oven = {
|
||||
color: "#734700",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "industry",
|
||||
state: "solid",
|
||||
density: 3000,
|
||||
movable: false,
|
||||
noMix: true,
|
||||
tick: function(pixel) {
|
||||
let x = pixel.x;
|
||||
let y = pixel.y + 1;
|
||||
if (isEmpty(x, y)) {
|
||||
createPixel("heat_ray", x, y);
|
||||
let ray = pixelMap[x][y];
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Freezer
|
||||
|
||||
|
||||
elements.freezer = {
|
||||
color: "#055b61",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "industry",
|
||||
state: "solid",
|
||||
density: 3000,
|
||||
movable: false,
|
||||
noMix: true,
|
||||
tick: function(pixel) {
|
||||
let x = pixel.x;
|
||||
let y = pixel.y + 1;
|
||||
if (isEmpty(x, y)) {
|
||||
createPixel("freeze_ray", x, y);
|
||||
let ray = pixelMap[x][y];
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Exhaust
|
||||
|
||||
|
||||
elements.exhaust = {
|
||||
color: "#292929",
|
||||
category: "industry",
|
||||
state: "gas",
|
||||
density: 1.8,
|
||||
movable: false,
|
||||
noMix: true,
|
||||
tick: function(pixel) {
|
||||
const x = pixel.x;
|
||||
const y = pixel.y;
|
||||
const gasTypes = ["carbon_dioxide", "methane", "oxygen", "carbon_dioxide"]; // I am aware this isn't ideal, but it works for my purpouses.
|
||||
|
||||
for (let i = 0; i < gasTypes.length; i++) {
|
||||
let ty = y - 1 - i;
|
||||
if (ty < 0) break;
|
||||
if (isEmpty(x, ty)) {
|
||||
createPixel(gasTypes[i], x, ty);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// cancer machine!!1
|
||||
|
||||
elements.irradiator = {
|
||||
color: "#a0ff00",
|
||||
category: "industry",
|
||||
state: "solid",
|
||||
density: 3000,
|
||||
movable: false,
|
||||
noMix: true,
|
||||
tick: function(pixel) {
|
||||
const beamWidth = 1;
|
||||
const beamLength = 20; // how far down the beam goes
|
||||
const startX = pixel.x - Math.floor(beamWidth / 2);
|
||||
const endX = startX + beamWidth - 1;
|
||||
|
||||
for (let y = pixel.y + 1; y <= pixel.y + beamLength; y++) {
|
||||
if (y < 0 || y >= height) break;
|
||||
for (let x = startX; x <= endX; x++) {
|
||||
if (x < 0 || x >= width) continue;
|
||||
if (isEmpty(x, y)) {
|
||||
createPixel("radiation", x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Mixer
|
||||
|
||||
elements.mix_beam = {
|
||||
color: "#ffff99",
|
||||
category: "energy",
|
||||
state: "gas",
|
||||
density: 0.1,
|
||||
movable: false,
|
||||
noMix: true,
|
||||
tick: function(pixel) {
|
||||
const x = pixel.x;
|
||||
const y = pixel.y;
|
||||
|
||||
if (y + 1 >= height) {
|
||||
deletePixel(x, y);
|
||||
return;
|
||||
}
|
||||
|
||||
const below = pixelMap[x]?.[y + 1];
|
||||
|
||||
if (!below) {
|
||||
movePixel(pixel, x, y + 1);
|
||||
} else {
|
||||
const mixCoords = [];
|
||||
|
||||
for (let dx = -1; dx <= 1; dx++) {
|
||||
for (let dy = 0; dy <= 10; dy++) {
|
||||
const nx = x + dx;
|
||||
const ny = y + 1 + dy;
|
||||
|
||||
if (isEmpty(nx, ny)) continue;
|
||||
const p = pixelMap[nx]?.[ny];
|
||||
if (p) {
|
||||
mixCoords.push({ x: nx, y: ny, element: p.element });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Shuffle the element types
|
||||
const shuffledElements = mixCoords.map(p => p.element)
|
||||
.sort(() => Math.random() - 0.5);
|
||||
|
||||
// Assign shuffled elements back to original coordinates
|
||||
for (let i = 0; i < mixCoords.length; i++) {
|
||||
const pos = mixCoords[i];
|
||||
changePixel(pixelMap[pos.x][pos.y], shuffledElements[i]);
|
||||
}
|
||||
|
||||
deletePixel(x, y);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Mixer emitter
|
||||
|
||||
elements.beam_mixer_emitter = {
|
||||
color: "#ffcc00",
|
||||
category: "industry",
|
||||
state: "solid",
|
||||
behavior: behaviors.WALL,
|
||||
tick: function(pixel) {
|
||||
if (isEmpty(pixel.x, pixel.y + 1)) {
|
||||
createPixel("mix_beam", pixel.x, pixel.y + 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Shocker. Legit just irradiator, but a different element.
|
||||
|
||||
|
||||
|
||||
elements.charger = {
|
||||
color: "#f2f200",
|
||||
category: "industry",
|
||||
state: "solid",
|
||||
density: 3000,
|
||||
movable: false,
|
||||
noMix: true,
|
||||
tick: function(pixel) {
|
||||
const beamWidth = 1;
|
||||
const beamLength = 20; // how far down the beam goes
|
||||
const startX = pixel.x - Math.floor(beamWidth / 2);
|
||||
const endX = startX + beamWidth - 1;
|
||||
|
||||
for (let y = pixel.y + 1; y <= pixel.y + beamLength; y++) {
|
||||
if (y < 0 || y >= height) break;
|
||||
for (let x = startX; x <= endX; x++) {
|
||||
if (x < 0 || x >= width) continue;
|
||||
if (isEmpty(x, y)) {
|
||||
createPixel("electric", x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// adios beam
|
||||
|
||||
elements.deleter_beam = {
|
||||
color: "#ff4444",
|
||||
category: "energy",
|
||||
state: "gas",
|
||||
density: 0.1,
|
||||
movable: false,
|
||||
noMix: true,
|
||||
tick: function(pixel) {
|
||||
const x = pixel.x;
|
||||
const y = pixel.y;
|
||||
|
||||
if (y + 1 >= height) {
|
||||
deletePixel(x, y);
|
||||
return;
|
||||
}
|
||||
|
||||
const below = pixelMap[x]?.[y + 1];
|
||||
|
||||
if (!below) {
|
||||
movePixel(pixel, x, y + 1);
|
||||
} else {
|
||||
deletePixel(x, y);
|
||||
deletePixel(below.x, below.y);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
elements.deleter_beam_emitter = {
|
||||
color: "#ff2222",
|
||||
category: "industry",
|
||||
state: "solid",
|
||||
behavior: behaviors.WALL,
|
||||
tick: function(pixel) {
|
||||
if (isEmpty(pixel.x, pixel.y + 1)) {
|
||||
createPixel("deleter_beam", pixel.x, pixel.y + 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1491,12 +1491,10 @@ grabWeights = function(pixel){
|
|||
let result;
|
||||
if (elements[pixelMap[pixel.x][pixel.y-i].element].breakInto !== undefined) {
|
||||
if (Array.isArray(elements[pixelMap[pixel.x][pixel.y-i].element].breakInto)) {
|
||||
result = elements[pixelMap[pixel.x][pixel.y-i].element].breakInto[Math.floor(Math.random() * elements[pixel.element].breakInto.length)];
|
||||
weight += elements.result.density
|
||||
weight += elements.elements[pixelMap[pixel.x][pixel.y-i].element].breakInto[0].density
|
||||
}
|
||||
else {
|
||||
result = elements[pixelMap[pixel.x][pixel.y-i].element].breakInto;
|
||||
weight += elements.result.density
|
||||
else if (!Array.isArray(elements[pixelMap[pixel.x][pixel.y-i].element].breakInto)) {
|
||||
weight += elements.elements[pixelMap[pixel.x][pixel.y-i].element].breakInto.density
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1531,12 +1529,10 @@ grabAllWeights = function(pixel){
|
|||
let result;
|
||||
if (elements[pixelMap[pixel.x][pixel.y-i].element].breakInto !== undefined) {
|
||||
if (Array.isArray(elements[pixelMap[pixel.x][pixel.y-i].element].breakInto)) {
|
||||
result = elements[pixelMap[pixel.x][pixel.y-i].element].breakInto[Math.floor(Math.random() * elements[pixel.element].breakInto.length)];
|
||||
weight += elements.result.density
|
||||
weight += elements.elements[pixelMap[pixel.x][pixel.y-i].element].breakInto[0].density
|
||||
}
|
||||
else {
|
||||
result = elements[pixelMap[pixel.x][pixel.y-i].element].breakInto;
|
||||
weight += elements.result.density
|
||||
else if (!Array.isArray(elements[pixelMap[pixel.x][pixel.y-i].element].breakInto)) {
|
||||
weight += elements.elements[pixelMap[pixel.x][pixel.y-i].element].breakInto.density
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1894
mods/plants.js
1894
mods/plants.js
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,88 @@
|
|||
elements.reactor_water = {
|
||||
color: "#00FFCB",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "reactor_supplies",
|
||||
state: "liquid",
|
||||
density: 1050,
|
||||
tempHigh:200,
|
||||
tempLow:-40,
|
||||
stateHigh: "reactor_water_steam",
|
||||
stateLow: "reactor_water_ice",
|
||||
};
|
||||
|
||||
elements.reactor_container_body_user = {
|
||||
color: "#676767",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "reactor_supplies",
|
||||
state: "solid",
|
||||
tempHigh: 700,
|
||||
tempLow: -200,
|
||||
temp: 50,
|
||||
stateHigh: "molten_reactor_conatainer",
|
||||
stateLow: "frozen_reactor_container",
|
||||
};
|
||||
|
||||
elements.molten_reactor_container = {
|
||||
color: "#FF5000",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "reactor_supplies",
|
||||
state: "liquid",
|
||||
tempLow: 50,
|
||||
temp: 700,
|
||||
stateLow: "reactor_container_body_user",
|
||||
};
|
||||
|
||||
elements.frozen_reactor_container = {
|
||||
color: "#7FA0A8",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "reactor_supplies",
|
||||
state: "solid",
|
||||
tempHigh: 50,
|
||||
temp: -200,
|
||||
stateHigh: "reactor_container_body_user",
|
||||
};
|
||||
|
||||
elements.reactor_water_steam = {
|
||||
color: "#8CF193",
|
||||
behavior: behaviors.GAS,
|
||||
category: "reactor_supplies",
|
||||
state: "gas",
|
||||
tempLow: 150,
|
||||
temp: 200,
|
||||
stateLow: "reactor_water",
|
||||
};
|
||||
|
||||
elements.reactor_water_ice = {
|
||||
color: "#BBF5E6",
|
||||
behavior: behaviors.SOLID,
|
||||
category: "reactor_supplies",
|
||||
state: "solid",
|
||||
tempHigh: 20,
|
||||
stateHigh: "reactor_water",
|
||||
temp: -40,
|
||||
};
|
||||
|
||||
elements.the_fun_tool = {
|
||||
color: "#FF0000",
|
||||
category: "reactor_supplies",
|
||||
tool: function(pixel) {
|
||||
if (pixel.elemet == "reactor_water") {
|
||||
pixel.element = "explosion";
|
||||
};
|
||||
if (pixel.element == "reactor_water_ice") {
|
||||
pixel.element = "explosion";
|
||||
};
|
||||
if (pixel.element == "reactor_water_steam") {
|
||||
pixel.element = "explosion";
|
||||
};
|
||||
if (pixel.element == "molten_reactor_container") {
|
||||
pixel.element = "explosion";
|
||||
};
|
||||
if (pixel.element == "frozen_reactor_container") {
|
||||
pixel.element = "explosion";
|
||||
};
|
||||
if (pixel.element == "reactor_container_body_user") {
|
||||
pixel.element = "explosion";
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
"use strict";
|
||||
// Shade.ts -> Shade.js
|
||||
// Constants
|
||||
const SHADOW_UPDATE_INTERVAL = 4;
|
||||
const SHADOW_BLUR_RADIUS = 5;
|
||||
const SHADOW_INTENSITY = 128;
|
||||
// Canvases
|
||||
let shadowCanvas1;
|
||||
let shadowCanvasCtx1;
|
||||
let shadowCanvas2;
|
||||
let shadowCanvasCtx2;
|
||||
|
||||
function initializeShade() {
|
||||
shadowCanvas1 = new OffscreenCanvas(width + 1, height + 1);
|
||||
shadowCanvasCtx1 = shadowCanvas1.getContext('2d');
|
||||
shadowCanvas2 = new OffscreenCanvas(width + 1, height + 1);
|
||||
shadowCanvasCtx2 = shadowCanvas2.getContext("2d");
|
||||
}
|
||||
|
||||
function updateShadows() {
|
||||
if (pixelTicks % SHADOW_UPDATE_INTERVAL !== 0)
|
||||
return;
|
||||
const shadowCanvasImageData1 = shadowCanvasCtx1.createImageData(width + 1, height + 1);
|
||||
const shadowCanvasData1 = shadowCanvasImageData1.data;
|
||||
for (let pixel of currentPixels) {
|
||||
const exposed = getNeighbors(pixel).length !== 4;
|
||||
const alphaIndex = (pixel.y * (width + 1) + pixel.x) * 4 + 3;
|
||||
shadowCanvasData1[alphaIndex] = exposed ? 0 : SHADOW_INTENSITY;
|
||||
}
|
||||
shadowCanvasCtx1.putImageData(shadowCanvasImageData1, 0, 0);
|
||||
// Blur the shadows
|
||||
shadowCanvasCtx2.clearRect(0, 0, shadowCanvas2.width, shadowCanvas2.height);
|
||||
shadowCanvasCtx2.filter = `blur(${SHADOW_BLUR_RADIUS}px)`;
|
||||
shadowCanvasCtx2.drawImage(shadowCanvas1, 0, 0, shadowCanvas2.width, shadowCanvas2.height);
|
||||
shadowCanvasCtx2.filter = "none";
|
||||
}
|
||||
|
||||
function drawShadows(ctx) {
|
||||
ctx.globalAlpha = 1.0;
|
||||
ctx.drawImage(shadowCanvas2, 0, 0, canvas.width, canvas.height);
|
||||
}
|
||||
|
||||
// Hooks
|
||||
runAfterReset(initializeShade);
|
||||
runEveryTick(updateShadows);
|
||||
renderPostPixel(drawShadows);
|
||||
|
|
@ -62,9 +62,9 @@ elements.pool_water_spout = {
|
|||
stateHigh: "molten_steel",
|
||||
conduct: 0.42,
|
||||
behavior: [
|
||||
"XX|CR:pool_water_spout|XX",
|
||||
"CR:pool_water_spout|XX|CR:pool_water_spout",
|
||||
"XX|CR:pool_water_spout|XX",
|
||||
"XX|CR:pool_water|XX",
|
||||
"CR:pool_water|XX|CR:pool_water",
|
||||
"XX|CR:pool_water|XX",
|
||||
],
|
||||
}
|
||||
|
||||
|
|
@ -712,4 +712,4 @@ elements.cyanide_spout = {
|
|||
"CR:cyanide|XX|CR:cyanide",
|
||||
"XX|CR:cyanide|XX",
|
||||
],
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,523 @@
|
|||
elements.clump = {
|
||||
color: ["#1e0042", "#7d4db8"],
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
stateHigh: "ash",
|
||||
tempHigh: 500,
|
||||
tempLow: -45,
|
||||
stateLow: "ice",
|
||||
desc: "first element",
|
||||
}
|
||||
elements.block = {
|
||||
color: "#9e0000",
|
||||
behavior: behaviors.WALL,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"clump": { elem1: "gassed", elem2: "oil" },
|
||||
}
|
||||
}
|
||||
elements.plok = {
|
||||
color: "#d4d4d4",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "mythic",
|
||||
state: "liquid",
|
||||
}
|
||||
elements.gassed = {
|
||||
color: "#1c2a7a",
|
||||
behavior: behaviors.GAS,
|
||||
category: "mythic",
|
||||
state: "gas",
|
||||
reactions: {
|
||||
"plok": { elem1: "clump", elem2: "clump" },
|
||||
}
|
||||
}
|
||||
elements.pilnol = {
|
||||
color: "#290052",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "mythic",
|
||||
state: "liquid",
|
||||
stateHigh: "ash",
|
||||
tempHigh: 500,
|
||||
tempLow: -10,
|
||||
stateLow: "block",
|
||||
}
|
||||
elements.plox = {
|
||||
color: "#FFFFFF",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
desc: "It just... exists."
|
||||
}
|
||||
elements.philosophers_stone = {
|
||||
color: "#FFD700",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"silver": { elem1: "gold", elem2: "gold" },
|
||||
"zinc": { elem1: "gold", elem2: "gold" },
|
||||
"aluminum": { elem1: "gold", elem2: "gold" },
|
||||
"steel": { elem1: "gold", elem2: "gold" },
|
||||
"nickel": { elem1: "gold", elem2: "gold" },
|
||||
}
|
||||
}
|
||||
elements.xnopyt = {
|
||||
color: "#FF0000",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
tempHigh: 200,
|
||||
stateHigh: "n_explosion",
|
||||
desc: "Then, xnopyt, AAAAA...."
|
||||
}
|
||||
elements.midas_touch_alternate = {
|
||||
color: "#FFD700",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"head": { elem1: "gold", elem2:"gold" },
|
||||
"body": { elem1: "gold", elem2:"gold" }
|
||||
},
|
||||
desc: "This is made before the midas touch released."
|
||||
}
|
||||
elements.tainted_flesh = {
|
||||
breakInto: "dead_tainted_flesh",
|
||||
color: "#0a0014",
|
||||
behavior: behaviors.WALL,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"meat": { elem1: "rotten_meat", elem2:"rotten_meat" },
|
||||
"cheese": { elem1: "rotten_cheese", elem2: "rotten_cheese" }
|
||||
},
|
||||
}
|
||||
elements.mold = {
|
||||
color: "#347557",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
reactions: {
|
||||
"meat": { elem1: "rotten_meat", elem2:"rotten_meat" },
|
||||
"cheese": { elem1: "rotten_cheese", elem2: "rotten_cheese" }
|
||||
},
|
||||
desc: "Don't eat this, it's moldy! Ew."
|
||||
}
|
||||
elements.dead_tainted_flesh = {
|
||||
hidden: true,
|
||||
color: "#290e63",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
}
|
||||
elements.core = {
|
||||
temp: 10000,
|
||||
color: "#add8e6",
|
||||
behavior: behaviors.WALL,
|
||||
category: "mythic",
|
||||
state: "gas",
|
||||
tempHigh: 100000,
|
||||
stateHigh: "supernova",
|
||||
desc: "DO NOET HEET IT UP1!!!11!!1!1",
|
||||
}
|
||||
elements.sand_exploder = {
|
||||
color: "#ff0000",
|
||||
tool: function(pixel) {
|
||||
if (pixel.element == "sand") {
|
||||
pixel.element = "explosion"
|
||||
}
|
||||
},
|
||||
category: "tools",
|
||||
}
|
||||
elements.tainted_flesh_exploder = {
|
||||
color: "#0a0014",
|
||||
tool: function(pixel) {
|
||||
if (pixel.element == "tainted_flesh") {
|
||||
pixel.element = "explosion"
|
||||
}
|
||||
},
|
||||
category: "tools",
|
||||
}
|
||||
elements.thelm = {
|
||||
color: "#0a0014",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
tempHigh: 9000,
|
||||
stateHigh: "plok",
|
||||
desc: "ITS OVER 9000!",
|
||||
}
|
||||
elements.klome = {
|
||||
color: "#ffffff",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "mythic",
|
||||
state: "solid",
|
||||
tempHigh: 500,
|
||||
stateHigh: "thelm",
|
||||
tempLow: -50,
|
||||
stateLow: "plox",
|
||||
desc: "I don't think that's sugar.",
|
||||
}
|
||||
elements.lard = {
|
||||
color: "#f5efe9",
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
tempHigh: 50,
|
||||
stateHigh: "liquid_lard",
|
||||
burn: 50,
|
||||
burnTime: 100,
|
||||
burnInto: ["smoke", "ash"],
|
||||
isFood: true,
|
||||
}
|
||||
elements.liquid_lard = {
|
||||
color: "#fff8f6",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "steam",
|
||||
tempLow: 50,
|
||||
stateLow: "lard",
|
||||
burn: 40,
|
||||
burnTime: 80,
|
||||
burnInto: ["smoke", "steam"],
|
||||
}
|
||||
elements.vanilla_extract = {
|
||||
color: "#5C4033",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "steam",
|
||||
tempLow: 1,
|
||||
stateLow: "ice",
|
||||
reactions: {
|
||||
"soda": { elem1: "nuka_cola", elem2: "nuka_cola" }
|
||||
},
|
||||
desc: "hi, i'm vanilla extract."
|
||||
}
|
||||
elements.nuka_cola = {
|
||||
hidden: true,
|
||||
color: "#522d05",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "fallout",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "carbon_dioxide",
|
||||
tempLow: 1,
|
||||
stateLow: "ice",
|
||||
reactions: {
|
||||
"uranium": { elem1: "nuka_cola_quantum", elem2: "nuka_cola_quantum" }
|
||||
},
|
||||
desc: "A refreshing Nuka-Cola!"
|
||||
}
|
||||
elements.nuka_cola_quantum = {
|
||||
hidden: true,
|
||||
color: "#54e5ff",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "fallout",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "carbon_dioxide",
|
||||
tempLow: 1,
|
||||
stateLow: "ice",
|
||||
desc: "A refreshing Nuka-Cola Quantum!"
|
||||
}
|
||||
elements.cabbage = {
|
||||
color: ["#d0e3a8", "#dee8ca"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
tempHigh: 200,
|
||||
stateHigh: "ash",
|
||||
tempLow: 1,
|
||||
stateLow: "ice",
|
||||
isFood: true,
|
||||
reactions: {
|
||||
salt: { elem1: "sauerkraut", elem2: "sauerkraut" }
|
||||
},
|
||||
desc: "It's cabbage."
|
||||
}
|
||||
elements.sauerkraut = {
|
||||
color: ["#979704", "#999904"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
tempHigh: 200,
|
||||
stateHigh: "ash",
|
||||
tempLow: 1,
|
||||
stateLow: "ice",
|
||||
isFood: true,
|
||||
desc: "Awww, big bowl of sauerkraut! Every single morning! It was driving me crazy!"
|
||||
}
|
||||
elements.sulfuric_acid = {
|
||||
color: "#ededed",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "steam",
|
||||
tempLow: 1,
|
||||
stateLow: "ice",
|
||||
reactions: {
|
||||
pool_water: { elem1: "grey_mixture", elem2: "grey_mixture" }
|
||||
},
|
||||
}
|
||||
elements.grey_mixture = {
|
||||
color: "#808080",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
tempHigh: 100,
|
||||
stateHigh: "brown_mixture",
|
||||
tempLow: 1,
|
||||
stateLow: "ice",
|
||||
}
|
||||
elements.brown_mixture = {
|
||||
color: "#7d6648",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
tempHigh: 500,
|
||||
stateHigh: "steam",
|
||||
tempLow: 1,
|
||||
stateLow: "ice",
|
||||
reactions: {
|
||||
metal_scrap: { elem1: "brown_mixture", elem2: "brown_mixture" },
|
||||
methylamine: { elem1: "solid_blue_crystal", elem2: "solid_blue_crystal" }
|
||||
},
|
||||
}
|
||||
elements.methylamine = {
|
||||
color: "#ededed",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
tempHigh: 200,
|
||||
stateHigh: "steam",
|
||||
tempLow: 20,
|
||||
stateLow: "ice",
|
||||
}
|
||||
elements.solid_blue_crystal = {
|
||||
breakInto: "not_suspicious_blue_crystal",
|
||||
color: "#00eaff",
|
||||
behavior: behaviors.WALL,
|
||||
category: "solids",
|
||||
state: "solid",
|
||||
tempHigh: 500,
|
||||
stateHigh: "ash",
|
||||
tempLow: 20,
|
||||
stateLow: "ice",
|
||||
}
|
||||
elements.not_suspicious_blue_crystal = {
|
||||
color: ["#00eaff", "#3ddfff"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "solid",
|
||||
tempHigh: 200,
|
||||
stateHigh: "melted_blue_crystal",
|
||||
tempLow: -20,
|
||||
stateLow: "blue_crystal_ice",
|
||||
desc: "It's not what it looks like!",
|
||||
}
|
||||
elements.melted_blue_crystal = {
|
||||
color: "#00bbff",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
tempHigh: 500,
|
||||
stateHigh: "steam",
|
||||
tempLow: 20,
|
||||
stateLow: "not_suspicious_blue_crystal",
|
||||
}
|
||||
elements.blue_crystal_ice = {
|
||||
color: "#29eaff",
|
||||
behavior: behaviors.WALL,
|
||||
category: "states",
|
||||
state: "solid",
|
||||
tempHigh: 1,
|
||||
stateHigh: "not_suspicious_blue_crystal",
|
||||
}
|
||||
elements.silt = {
|
||||
color: "#a8947d",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1200,
|
||||
stateHigh: "molten_dirt",
|
||||
tempLow: -50,
|
||||
stateLow: "permafrost",
|
||||
reactions: {
|
||||
water: { elem1: "mud" },
|
||||
clay: { elem1: "silty_clay" }
|
||||
},
|
||||
}
|
||||
elements.marble = {
|
||||
breakInto: "dust",
|
||||
color: "#e5e5e5",
|
||||
behavior: behaviors.WALL,
|
||||
category: "solids",
|
||||
state: "solid",
|
||||
tempHigh: 1339,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.silty_clay = {
|
||||
hidden: true,
|
||||
color: "#a67d5a",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1700,
|
||||
stateHigh: ["molten_dirt", "molten_glass",],
|
||||
tempLow: -50,
|
||||
stateLow: "permafrost",
|
||||
reactions: {
|
||||
sand: { elem1: "loam" }
|
||||
},
|
||||
}
|
||||
elements.loam = {
|
||||
hidden: true,
|
||||
color: "#8c5a3c",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1700,
|
||||
stateHigh: ["molten_dirt", "porcelain", "molten_glass",],
|
||||
tempLow: -50,
|
||||
stateLow: "permafrost",
|
||||
reactions: {
|
||||
dead_plant: { elem1: "peat" }
|
||||
},
|
||||
}
|
||||
elements.granite = {
|
||||
color: ["#946553", "#483028", "#a99187"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1260,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.diorite = {
|
||||
color: ["#e4e5e5", "#bbbbbc", "#888888"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1300,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.andesite = {
|
||||
color: ["#666767", "#a4a796", "#87868a"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1250,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.rhyolite = {
|
||||
color: ["#917971", "#6b4b3e", "#bdaaa4"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 722,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.gabbro = {
|
||||
color: ["#353434", "#aeada1", "#95866d"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1175,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.obsidian = {
|
||||
breakInto: "obsidian_shard",
|
||||
color: ["#010101", "#3b2752", "#261d3c"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1100,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.obsidian_shard = {
|
||||
hidden: true,
|
||||
color: ["#020202", "#4e3d61", "#2d263d"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1100,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.chalk = {
|
||||
breakInto: "dust",
|
||||
color: "#FFFFFF",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1000,
|
||||
stateHigh: "dust",
|
||||
}
|
||||
elements.slate = {
|
||||
color: ["#424140", "#8b8a8d", "#434143"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 2000,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.quartz = {
|
||||
color: ["#e4dfd7", "#f7f4f3", "#b7a58e"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1678,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.sandstone = {
|
||||
breakInto: "sand",
|
||||
color: ["#D2B48C", "#e6ddae", "#d1c192", "#dad1a4"],
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"SP|XX|SP",
|
||||
"XX|M1|XX",
|
||||
],
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 1000,
|
||||
stateHigh: "sand",
|
||||
}
|
||||
elements.lignite = {
|
||||
color: "#3d3f43",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 214,
|
||||
stateHigh: "charcoal",
|
||||
}
|
||||
elements.conglomerate = {
|
||||
color: ["#9b7a5e", "#b09760", "#bdb397", "#a98a75", "#b89961", "#bab2a1"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 118,
|
||||
stateHigh: "charcoal",
|
||||
}
|
||||
elements.dacite = {
|
||||
color: ["#817a70", "#646c63", "#d6d2d4"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "land",
|
||||
state: "solid",
|
||||
tempHigh: 900,
|
||||
stateHigh: "magma",
|
||||
}
|
||||
elements.peat = {
|
||||
hidden: true,
|
||||
color: ["#5c4033", "#6e4f3a", "#4e3728"],
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "land",
|
||||
tempHigh: 100,
|
||||
stateHigh: "lignite",
|
||||
state: "solid",
|
||||
density: 500,
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,51 @@
|
|||
elements.UnCook = {
|
||||
color: ["#ffffff", "#aeefff", "#00ccff"],
|
||||
tool: function(pixel) {
|
||||
if (pixel.element == "cooked_meat") {
|
||||
changePixel(pixel, "meat")
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "hard_yolk") {
|
||||
changePixel(pixel, "yolk")
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "toast") {
|
||||
changePixel(pixel, "bread")
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "bread") {
|
||||
if (Math.random() <= 0.7) {
|
||||
changePixel(pixel, "dough")
|
||||
}
|
||||
else{
|
||||
changePixel(pixel, "yeast")
|
||||
}
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "baked_batter") {
|
||||
changePixel(pixel, "batter")
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "baked_potato") {
|
||||
changePixel(pixel, "potato")
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "caramel") {
|
||||
changePixel(pixel, "sugar")
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "nut_butter") {
|
||||
changePixel(pixel, "nut_meat")
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "nut_oil") {
|
||||
changePixel(pixel, "nut_meat")
|
||||
pixel.temp = 20
|
||||
}
|
||||
if (pixel.element == "popcorn") {
|
||||
changePixel(pixel, "corn")
|
||||
pixel.temp = 20
|
||||
}
|
||||
},
|
||||
category: "tools",
|
||||
};
|
||||
Loading…
Reference in New Issue