Merge branch 'R74nCom:main' into main

This commit is contained in:
JustAGenericUsername 2024-01-08 17:19:13 -05:00 committed by GitHub
commit 9d9fc8b07d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 953 additions and 88 deletions

View File

@ -7,8 +7,8 @@ if(allDependenciesExist) {
//COMMON VARIABLES ##
const whiteColor = {r: 255, g: 255, b: 255}
const blackColor = {r: 0, g: 0, b: 0}
const whiteColor = {r: 255, g: 255, b: 255};
const blackColor = {r: 0, g: 0, b: 0};
//ESSENTIAL COMMON FUNCTIONS (CODE LIBRARY) ##
@ -804,6 +804,10 @@ if(allDependenciesExist) {
function rgbHexCatcher(color) {
return convertColorFormats(color,"rgb");
};
function _rgbHexCatcher(color) {
return convertColorFormats(color,"rgb");
};
function averageColorObjects(color1,color2,weight1=0.5) { //misnomer, actually a linear interpolation but it's too late to rename that
@ -4460,15 +4464,66 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
ctx.fillStyle = colorOut;
}
else if (view === 2) { // thermal view
// set the color to pixel.temp, from hottest at -66 (194) hue to coldest 225 hue, with the minimum being -273, max being 7755
// set the color to pixel.temp, from hottest at -66 (294.1875) hue to coldest 225 hue, with the minimum being -273, max being 7755
var temp = pixel.temp;
if (temp < -273) {temp = -273}
var hue = 225 - (Math.min(7755,temp)/6000)*225;
var lig = 50 + ((Math.max(0,temp - 7755)) * (50/1000));
if (temp > 9255) {temp = 8755}
if (hue < 0) {hue += (360 * Math.ceil(hue / -360))}
if (temp < 0 && hue > 225) {hue = 225}
ctx.fillStyle = "hsl("+hue+",100%,"+lig+"%)";
temp = Math.min(Math.max(temp,(settings.abszero ?? -273.15)),55530);
var hue,sat,lig;
sat = 100;
lig = 50;
if(temp <= 7755) {
hue = 225 - (Math.min(7755,temp)/6000)*225;
if (hue < 0) {hue += (360 * Math.ceil(hue / -360))}
if (temp < 0 && hue > 280) {hue = 280}
} else if(temp <= 9255) {
hue = 294.1875;
lig = 50 + (Math.max(0,temp - 7755) * (50/1500));
} else if(temp <= 11255) {
hue = 294.1875;
sat = 0;
lig = 100 - (Math.max(0,temp - 9255) * (100 / 2000));
} else if(temp <= 11755) {
hue = 225;
lig = (Math.max(0,temp - 11255) * (25 / 500));
} else if(temp <= 19510) {
hue = 225 - (Math.min(19510,Math.max(0,temp - 11755))/6000)*225;
if (hue < 0) {hue += (360 * Math.ceil(hue / -360))}
lig = 25;
} else if(temp <= 20510) {
hue = 294.1875
//lig = scale(temp,19510,20010,25,75);
//hue = scale(temp,19510,20010,294.1875,585) % 360;
sat = scale(temp,19510,20510,100,50);
lig = scale(temp,19510,20510,25,75);
} else if(temp <= 28265) {
hue = scale(temp,20510,28265,294.1875,585) % 360;
sat = 50;
lig = 75;
} else if(temp <= 29265) {
hue = 225;
sat = scale(temp,28265,29265,50,40);
lig = scale(temp,28265,29265,75,87.5);
} else if(temp <= 37020) {
hue = scale(temp,29265,37020,225,654.1875) % 360;
sat = 40;
lig = 87.5;
} else if(temp <= 39020) {
hue = 294.1875;
sat = 40;
lig = scale(temp,37020,39020,87.5,50);
} else if(temp <= 46775) { //46775
hue = scale(temp,39020,46775,294.1875,585) % 360;
sat = 40;
lig = 50;
} else if(temp <= 47775) {
hue = 225;
sat = scale(temp,46775,47775,40,20);
lig = 50;
} else { //55530
hue = scale(temp,47775,55530,225,654.1875) % 360;
sat = 20;
lig = 50;
};
ctx.fillStyle = "hsl("+hue+","+sat+"%,"+lig+"%)";
}
else if (view === 4) { // smooth view, average of surrounding pixels
// E/N: i'm too scared to do smooth view
@ -4924,6 +4979,14 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
};*/
//warm is redundant due to vanilla room_temp
elements.room_temp.category = "tools";
elements.slow_cool = {
color: elements.cook.color.map(colorCode => Object.values(convertColorFormats(colorCode,"json"))).map(x => RGBToHex(x.map(y => 255 - y))),
tool: function(pixel) {
pixel.temp -= (0.5 * (1 + shiftDown));
},
category: "energy",
excludeRandom: true
};
elements.ultraheat = {
color: ["#ff0000", "#ffbf4f", "#ff0000", "#ffbf4f", "#ff0000", "#ffbf4f"],
tool: function(pixel) {
@ -19800,7 +19863,7 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
coolingFactor = 0.99999
};
//console.log(coolingFactor);
pixel.temp = ((pixel.temp + 273.15) * coolingFactor) - 273.15;
pixel.temp = ((pixel.temp - (settings.abszero ?? -273.15)) * coolingFactor) + (settings.abszero ?? -273.15);
for (var i = 0; i < adjacentCoords.length; i++) {
var x = pixel.x+adjacentCoords[i][0];
@ -24010,7 +24073,7 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
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_copper ??= {}; elements.molten_copper.tempHigh = 4700;
elements.molten_alumina ??= {};
elements.molten_alumina.tempHigh = 5400;
elements.molten_alumina.reactions ??= {};
@ -40796,7 +40859,7 @@ Make sure to save your command in a file if you want to add this preset again.`
hardness: 1,
state: "solid",
density: 3000,
temp: -273.15,
temp: (settings.abszero ?? -273.15),
behavior: behaviors.WALL,
color: "#cf9f7f",
insulate: true,
@ -40823,7 +40886,7 @@ Make sure to save your command in a file if you want to add this preset again.`
//New pixel RV
var newPixel = pixelMap[newX][newY];
//More sugar
var newPixelTempKelvin = newPixel.temp + 273.15;
var newPixelTempKelvin = newPixel.temp - (settings.abszero ?? -273.15);
//Skip pixels at or below absolute zero
if(newPixelTempKelvin <= 0) {
continue;
@ -40832,12 +40895,14 @@ Make sure to save your command in a file if you want to add this preset again.`
if(newPixelTempKelvin <= pixel.rate) {
//Special "draining" logic
pixel.temp += newPixelTempKelvin;
newPixel.temp = -273.15;
newPixel.temp = (settings.abszero ?? -273.15);
} else {
//If not, just move the temperature
pixel.temp += pixel.rate;
newPixel.temp -= pixel.rate;
};
pixelTempCheck(pixel);
pixelTempCheck(newPixel);
};
};
@ -40857,7 +40922,7 @@ Make sure to save your command in a file if you want to add this preset again.`
};
};
var pixelTempKelvin = pixel.temp + 273.15;
var pixelTempKelvin = pixel.temp - (settings.abszero ?? -273.15);
var isDraining = (pixelTempKelvin <= pixel.rate);
var effectiveRate = (isDraining ? pixelTempKelvin : pixel.rate) / availableOutputs.length;
//Actual distribution
@ -40866,7 +40931,7 @@ Make sure to save your command in a file if you want to add this preset again.`
var newPixel = pixelMap[coordPair[0]][coordPair[1]];
newPixel.temp += effectiveRate;
};
if(availableOutputs.length > 0) { isDraining ? pixel.temp = -273.15 : pixel.temp -= pixel.rate };
if(availableOutputs.length > 0) { isDraining ? pixel.temp = (settings.abszero ?? -273.15) : pixel.temp -= pixel.rate };
},
};
@ -40885,7 +40950,7 @@ Make sure to save your command in a file if you want to add this preset again.`
hardness: 1,
state: "solid",
density: 3000,
temp: -273.15,
temp: (settings.abszero ?? -273.15),
behavior: behaviors.WALL,
color: "#cf9f7f",
insulate: true,
@ -40941,6 +41006,11 @@ Make sure to save your command in a file if you want to add this preset again.`
right_and_down_to_left: {ins: [[1,0],[0,1]], outs: [[-1,0]]},
left_and_up_to_right: {ins: [[-1,0],[0,-1]], outs: [[1,0]]},
right_and_up_to_left: {ins: [[1,0],[0,-1]], outs: [[-1,0]]},
right_to_down_and_left: {ins: [[1,0]], outs: [[-1,0],[0,1]]},
right_to_up_and_left: {ins: [[1,0]], outs: [[-1,0],[0,-1]]},
left_to_down_and_right: {ins: [[-1,0]], outs: [[1,0],[0,1]]},
left_to_up_and_right: {ins: [[1,0]], outs: [[1,0],[0,-1]]},
};
for(direction in autoConduitTable) {

100
mods/cat.js Normal file
View File

@ -0,0 +1,100 @@
// made by squarescreamyt
elements.cat = {
color: ["#c05811","#cf7941","#d4ccc5","#ffe7b3","#f7b484","#ef7d51","#c15c37","#8e4024","#5f2612","#3a2930","#6b4540","#9d654f","#c68b68","#e2b98d","#ffe8aa","#292c33","#4b4f55","#76797e","#a5a6a7","#d5cfcd","#fff1e8"],
state: "solid",
behavior: [
"M2%1|M2%2|M2%1",
"M2%10|XX|M2%10",
"XX|M1|XX",
],
reactions: {
"meat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"cooked_meat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"fish": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"rat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"cat_food": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"oxygen": { elem2:"carbon_dioxide", chance:0.3 },
"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 },
"dirty_water": { elem1:"rotten_meat", chance:0.0001 },
"pool_water": { elem1:"rotten_meat", chance:0.005 },
"vinegar": { elem1:"rotten_meat", chance:0.001 },
},
egg: "kitten",
foodNeed: 10,
temp: 30,
tempHigh: 100,
stateHigh: "cooked_meat",
tempLow: -18,
stateLow: "frozen_meat",
category:"life",
breakInto: "rotten_meat",
burn:15,
burnTime:300,
state: "solid",
density: 1450,
conduct: 0.2
};
elements.kitten = {
color: ["#c05811","#cf7941","#d4ccc5","#ffe7b3","#f7b484","#ef7d51","#c15c37","#8e4024","#5f2612","#3a2930","#6b4540","#9d654f","#c68b68","#e2b98d","#ffe8aa","#292c33","#4b4f55","#76797e","#a5a6a7","#d5cfcd","#fff1e8"],
state: "solid",
behavior: [
"M2%1|M2%2|M2%1",
"M2%10|FX%5 AND CH:cat%0.1|M2%10",
"XX|M1|XX",
],
reactions: {
"meat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"cooked_meat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"fish": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"cat_food": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"rat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"oxygen": { elem2:"carbon_dioxide", chance:0.3 },
"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 },
"dirty_water": { elem1:"rotten_meat", chance:0.0001 },
"pool_water": { elem1:"rotten_meat", chance:0.005 },
"vinegar": { elem1:"rotten_meat", chance:0.001 },
},
egg: "kitten",
foodNeed: 10,
temp: 30,
tempHigh: 100,
stateHigh: "cooked_meat",
tempLow: -18,
stateLow: "frozen_meat",
category:"life",
breakInto: "rotten_meat",
burn:15,
burnTime:300,
state: "solid",
density: 1450,
conduct: 0.2
};
elements.cat_food = {
color: ["#b0853c","#c28e4a","#ab8e38","#b56845","#ab6f44","#b57f38"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
hidden: "TRUE",
tempHigh: 1000,
stateHigh: ["ash", "smoke"],
density: 820.33,
isFood: true
};
if (!elements.batter.reactions) elements.batter.reactions = {};
elements.batter.reactions.meat = { elem1: "cat_food", elem2: "cat_food" }

View File

@ -151,6 +151,7 @@ elements.dragon_scale = {
reactions: {
"fire": { elem1: null, elem2: "dragon_breath" },
"plasma": { elem1: null, elem2: "dragon_breath" },
"incinerate": { elem1: null, elem2: "ash" },
"goblins_delight": { elem1: "dragon_breath", elem2: null },
"pulsium": { elem1: "dragon_breath", elem2: null },
"oil": { elem1: null, elem2: "dragon_breath" },
@ -177,9 +178,9 @@ elements.mystic_runes = {
// 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" },
"heat_ray": { elem1: "mystic_runes", elem2: "mystic_runes" },
"god_ray": { elem1: "dragon_scale", elem2: "dragon_scale" },
"laser": { elem1: "mystic_runes", elem2: "mystic_runes" },
"helium": { elem1: null, elem2: "mystic_runes" },
"oxygen": { elem1: null, elem2: "mystic_runes" },
"sugar": { elem1: null, elem2: "mystic_runes" },
@ -198,11 +199,8 @@ elements.enchanted_wood = {
state: "solid",
density: 0.8,
weight: 60,
update: function(x, y) {
// Update the element's behavior
},
reactions: {
"fire": { elem1: null, elem2: "charcoal" },
"fire": { elem1: null, elem2: "mystic_runes" },
"plasma": { elem1: null, elem2: "charcoal" },
"water": { elem1: null, elem2: "mystic_runes" },
},
@ -210,7 +208,7 @@ elements.enchanted_wood = {
// update 1.1 below
// adds 3 more extra elements
// by hackerpro908
// by pixelegend4
// main game by R74N called sandboxels
elements.quartzium = {
@ -222,6 +220,7 @@ elements.quartzium = {
weight: 100,
reactions: {
"fire": { elem1: "quartz", elem2: "quartz" },
"plasma": { elem1: "quartz", elem2: "quartz" },
},
};
elements.quartz = {
@ -241,3 +240,142 @@ elements.moonite = {
density: 8076,
weight: 100,
};
elements.faustium = {
color: "#8B008B",
behavior: behaviors.SUPERFLUID,
category: "fantasy",
state: "liquid",
density: 800,
viscosity: 0.01,
weight: 300,
reactions: {
"water": { elem1: "moonite", elem2: "moonite" },
},
};
// update 1.2
// adds more below
// added faustium reaction
elements.nebulaflare = {
color: ["#7500FF", "#00FFFB", "#FF00FC"],
behavior: behaviors.GAS,
state: "gas",
density: 0.1,
weight: 0.1,
category: "fantasy",
reactions: {
"fire": { elem1: "moonite", elem2: "moonite" },
"moonite": { elem1: "quartzium", elem2: "quartzium" },
},
};
elements.flaro = {
color: ["#ff4d4d", "#ff9933", "#ffd11a", "#ff9933", "#ff4d4d"],
behavior: behaviors.GAS,
category: "fantasy",
state: "gas",
density: 8076,
weight: 100,
};
elements.aurorium = {
color: ["#75c0e0", "#00ff00", "#ffffff", "#00ff00", "#75c0e0"],
behavior: behaviors.GAS,
category: "fantasy",
state: "gas",
density: 55,
weight: 1,
reactions: {
"plasma": { elem1: "explosion", elem2: "explosion" },
"flaro": { elem1: "nebulaflare", elem2: "nebulaflare" },
}
};
elements.glimmerium = {
color: ["#ff3333", "#ff6666", "#ff9999", "#ffcc99", "#ff6633"],
behavior: behaviors.LIGHT,
category: "fantasy",
state: "gas",
density: 0.01,
weight: 0.5,
temperature: 3000,
reactions: {
"aurorium": { elem1: "sodium", elem2: "sodium" },
"flaro": { elem1: "nebulaflare", elem2: "nebulaflare" },
"pulsium": { elem1: "water", elem2: "water" },
}
};
elements.osmoz = {
color: "#1ff099",
behavior: behaviors.SOLID,
category: "fantasy",
state: "solid",
density: 5000,
weight: 300,
reactions: {
"fire": { elem1: "nebulaflare", elem2: "nebulaflare" },
}
};
elements.goblin = {
"color": "#2ae856",
"state": "solid",
"behavior": [
"XX|XX|DL",
"XX|FX%0.5|M2%3 AND DL",
"XX|M1|XX",
],
"category":"fantasy",
reactions: {
"goblins_delight": { elem2:null, chance:0.9 },
},
};
elements.fenzium = {
color: ["#D16587", "#FF1493"],
behavior: behaviors.GAS,
category: "fantasy",
state: "gas",
density: 99,
weight: 60,
reactions: {
"uranium": { elem1: "explosion", elem2: "explosion" },
}
};
elements.sceptrium = {
color: "#add8e6",
behavior: behaviors.SOLID,
category: "fantasy",
state: "solid",
density: 1500,
weight: 100,
reactions: {
"water": { elem1: "sceptrium", elem2: "sceptrium_dust" },
"fire": { elem1: "sceptrium", elem2: "sceptrium_dust" },
"plasma": { elem1: "sceptrium", elem2: "sceptrium_dust" },
"laser": { elem1: "sceptrium", elem2: "sceptrium_dust" },
"explosion": { elem1: "sceptrium", elem2: "sceptrium_dust" },
},
};
elements.sceptrium_dust = {
color: ["#87ceeb", "#add8e6", "#b0e0e6"],
behavior: behaviors.POWDER,
category: "fantasy",
state: "solid",
density: 0.5,
weight: 1,
reactions: {
"water": { elem1: "sceptrium_dust", elem2: "sceptrium_dust" },
"fire": { elem1: "sceptrium_dust", elem2: "sceptrium_dust" },
"plasma": { elem1: "sceptrium_dust", elem2: "sceptrium_dust" },
"laser": { elem1: "sceptrium_dust", elem2: "sceptrium_dust" },
"explosion": { elem1: "sceptrium_dust", elem2: "sceptrium_dust" },
},
};

71
mods/lemonade.js Normal file
View File

@ -0,0 +1,71 @@
elements.lemonade = {
color: "#FFEA00",
behavior: behaviors.LIQUID,
category: "liquids",
isFood: true,
state: "solid",
}
elements.head.reactions["lemonade"] = {elem2: null}
elements.head.reactions["lemons"] = {elem2: null}
elements.head.reactions["lemon_juice"] = {elem2: null}
elements.head.reactions["false_lemons"] = {elem2: "armageddon"}
elements.lemon_juice = {
color: "#FFFF00",
behavior: behaviors.LIQUID,
category: "liquids",
state: "solid",
reactions: {
"sugar_water": { elem1: null, elem2: "lemonade" },
}
};
elements.lemons = {
color: "#8B8000",
behavior: behaviors.POWDER,
category: "food",
state: "solid",
breakInto: "lemon_juice"
};
elements.false_lemons = {
color: "#8B8000",
behavior: behaviors.POWDER,
category: "special",
state: "solid",
breakInto: "armageddon"
};
elements.lemon_tree = {
category: "life",
color: "#a0522d",
tick: function(tick) {
if (!pixel.burning) {
if (!pixel.lc) { pixel.lc = "#8B8000" }
if (!pixel.wc) { pixel.wc = "#a0522d" }
if (isEmpty(pixel.x-1,pixel.y-1) && Math.random() < 0.02) {
if (Math.random() < 0.5) {
createPixel("lemons",pixel.x-1,pixel.y-1);
pixelMap[pixel.x-1][pixel.y-1].color = pixelColorPick(pixelMap[pixel.x-1][pixel.y-1], pixel.lc);
}
}
}
}
}
elements.false_lemon_tree = {
category: "life",
color: "#a0522d",
tick: function(tick) {
if (!pixel.burning) {
if (!pixel.lc) { pixel.lc = "#8B8000" }
if (!pixel.wc) { pixel.wc = "#a0522d" }
if (isEmpty(pixel.x-1,pixel.y-1) && Math.random() < 0.02) {
if (Math.random() < 0.5) {
createPixel("false_lemons",pixel.x-1,pixel.y-1);
pixelMap[pixel.x-1][pixel.y-1].color = pixelColorPick(pixelMap[pixel.x-1][pixel.y-1], pixel.lc);
}
}
}
}
}

View File

@ -1,5 +1,5 @@
//This mod was made by Alex the transfem, https://discord.com/users/778753696804765696 on discord and https://www.tiktok.com/@alextheagenenby?_t=8hoCVI3NRhu&_r=1 on tiktok.
//V1.4.1: added a mixer element and an improved sensor element.
//version 1.4.2: added incinerator, E-incinerator and improved mixer to be compatible with nousersthings.js and to have a range of effect.
function customExplosion(pixel1, pixel2, radius, list) {
let x = pixel1.x;
let y = pixel1.y;
@ -40,8 +40,6 @@ function reactPixels(pixel1,pixel2) {
if (r.radius !== undefined){
let radius = r.radius;
let list = r.explosion.split(",");
console.log(list);
console.log(pixel1, pixel2, radius, list);
customExplosion(pixel1, pixel2, radius, list);
}
}
@ -214,7 +212,7 @@ elements.magnesium = {
reactions: {
"acid": { "elem1": "hydrogen", "chance": 0.02, },
"aqua_regia": { "elem1": "hydrogen", "chance": 0.2, "elem2": "pop", },
},
behavior: behaviors.POWDER,
fireColor: "#ffffff",
@ -751,10 +749,11 @@ elements.rubidium = {
chlorine: { elem1: "rubidiumsalt" },
acid: { explosion: "fire,rubidiumsalt,water", radius: 7, },
aqua_regia: { explosion: "fire,rubidiumsalt,fire,water", radius: 8, },
acidic_water: { explosion: "water,water,water,rubidiumsalt", radius: 3.5, },
acidic_water: { explosion: "water,water,water,rubidiumsalt", radius: 3, },
nitric_acid: { explosion: "fire,fire,hydrogen", radius: 7 },
chloroauric_acid: { explosion: "fire,fire,hydrogen,gold_coin", radius: 7, },
liquid_chloroauric_acid: { explosion: "fire,fire,hydrogen,gold_coin", radius: 7, },
water: { explosion: "fire,rubidiumhydroxide", radius: 6 },
},
density: 1532,
fireColor: "#d91e1e",
@ -773,12 +772,14 @@ elements.moltenrubidium = {
chlorine: { elem1: "rubidiumsalt" },
acid: { explosion: "fire,rubidiumsalt,water", radius: 7, },
aqua_regia: { explosion: "fire,rubidiumsalt,fire,water", radius: 8, },
acidic_water: { explosion: "water,water,water,rubidiumsalt", radius: 3.5, },
acidic_water: { explosion: "water,water,water,rubidiumsalt", radius: 3, },
nitric_acid: { explosion: "fire,fire,hydrogen", radius: 7 },
chloroauric_acid: { explosion: "fire,fire,hydrogen,gold_coin", radius: 7, },
liquid_chloroauric_acid: { explosion: "fire,fire,hydrogen,gold_coin", radius: 7, },
fireColor: "#d91e1e",
water: { explosion: "fire,rubidiumhydroxide", radius: 6 },
},
fireColor: "#d91e1e",
tick: function(pixel) {
pixel.burning = true;
},
@ -857,7 +858,7 @@ elements.rubidiumhydroxide = {
chlorine: { elem1: "rubidiumsalt" },
acid: { explosion: "fire,rubidiumsalt,water", radius: 7, },
aqua_regia: { explosion: "fire,rubidiumsalt,fire,water", radius: 8, },
acidic_water: { explosion: "water,water,water,rubidiumsalt", radius: 3.5, },
acidic_water: { explosion: "water,water,water,rubidiumsalt", radius: 3, },
nitric_acid: { explosion: "fire,fire,hydrogen", radius: 7 },
chloroauric_acid: { explosion: "fire,fire,hydrogen,gold_coin", radius: 7, },
liquid_chloroauric_acid: { explosion: "fire,fire,hydrogen,gold_coin", radius: 7, },
@ -869,7 +870,7 @@ elements.rubidiumhydroxide = {
state: "liquid",
density: 2.12,
name: "RubidiumHydroxide",
stateHigh: "potassiumhydroxidecrystals",
stateHigh: "rubidiumhydroxidecrystals",
tempHigh: "1388",
}
elements.rubidiumhydroxidecrystals = {
@ -881,7 +882,7 @@ elements.rubidiumhydroxidecrystals = {
chlorine: { elem1: "rubidiumsalt" },
acid: { explosion: "fire,rubidiumsalt,water", radius: 7, },
aqua_regia: { explosion: "fire,rubidiumsalt,fire,water", radius: 8, },
acidic_water: { explosion: "water,water,water,rubidiumsalt", radius: 3.5, },
acidic_water: { explosion: "water,water,water,rubidiumsalt", radius: 3, },
nitric_acid: { explosion: "fire,fire,hydrogen", radius: 7 },
chloroauric_acid: { explosion: "fire,fire,hydrogen,gold_coin", radius: 7, },
liquid_chloroauric_acid: { explosion: "fire,fire,hydrogen,gold_coin", radius: 7, },
@ -891,8 +892,6 @@ elements.rubidiumhydroxidecrystals = {
state: "powder",
density: 2.12,
name: "RubidiumHydroxideCrystals",
stateHigh: "potassiumhydroxidecrystals",
tempHigh: "1388",
}
elements.esuperheater = {
conduct: 1,
@ -951,28 +950,26 @@ elements.esuperheater = {
],
category: "machines",
name: "e-freezer",
},
elements.mixer = {
name: "Mixer",
behavior:[
[
"SW",
"SW",
"SW"
],
[
"SW",
"XX",
"SW"
],
[
"SW",
"SW",
"SW"
]
],
}
let num = 0;
elements.morechemmixer = {
name: "MoreChemMixer",
behavior: behaviors.WALL,
category: "machines",
noMix: true,
onSelect: function(pixel) {
let item = prompt("enter range for mixing.");
if(/^\d+$/.test(item)){
num = parseInt(item);
} else {
alert("that is not an integer.");
}
},
tick: function(pixel) {
pixel.clone = `range: ${num}`;
let range = mouseRange(pixel.x, pixel.y, num);
mix(range);
}
}
let item = "";
elements.improvedsensor = {
@ -985,7 +982,7 @@ elements.improvedsensor = {
if(pixel.start == pixelTicks){
pixel.clone = item;
}
for (var i = 0; i < adjacentCoords.length; i++) {
var coords = adjacentCoords[i];
var x = pixel.x + coords[0];
@ -1005,5 +1002,91 @@ elements.improvedsensor = {
category:"machines",
darkText: true,
hardness: 1,
};
elements.eincinerator = {
conduct: 1,
color: 'rgb(255, 70, 0)',
colorObject: {
"r": 240,
"g": 10,
"b": 0
},
behavior: behaviors.WALL,
behaviorOn: [
[
"XX",
"HT:100000",
"XX"
],
[
"HT:100000",
"XX",
"HT:100000"
],
[
"XX",
"HT:100000",
"XX"
]
],
category: "machines",
name: "E-Incinerator",
noMix: true,
}
elements.incinerator = {
behavior: [
[
"XX",
"HT:100000",
"XX"
],
[
"HT:100000",
"XX",
"HT:100000"
],
[
"XX",
"HT:100000",
"XX"
]
],
name: "Incinerator",
category: "machines",
colorObject: {
"r": 255,
"g": 50,
"b": 0
},
color: 'rgb(255, 50, 0)',
noMix: true,
}
function mix(range){
let mixlist = [];
for (var i = 0; i < range.length; i++) {
var x = range[i][0];
var y = range[i][1];
if (!isEmpty(x,y,true)) {
var pixel = pixelMap[x][y];
if (elements[pixel.element].noMix !== true || shiftDown) {
mixlist.push(pixel);
}
}
}
for (var i = 0; i < mixlist.length; i++) {
var pixel1 = mixlist[Math.floor(Math.random()*mixlist.length)];
var pixel2 = mixlist[Math.floor(Math.random()*mixlist.length)];
swapPixels(pixel1,pixel2);
mixlist.splice(mixlist.indexOf(pixel1),1);
mixlist.splice(mixlist.indexOf(pixel2),1);
if (elements[pixel1.element].onMix) {
elements[pixel1.element].onMix(pixel1,pixel2);
}
if (elements[pixel2.element].onMix) {
elements[pixel2.element].onMix(pixel2,pixel1);
}
}
}

View File

@ -29,7 +29,7 @@ elements.chowder = {
};
elements.risotto = {
color: "#f8f4e9",
color: "#ffff7f",
behavior: behaviors.SUPPORTPOWDER,
category: "food",
state: "solid",
@ -43,5 +43,112 @@ elements.chowder = {
viscosity: 9
};
elements.mentos = {
color: "#a9fff9",
behavior: behaviors.POWDER,
category: "food",
state: "solid",
reactions: {
"soda": { elem1: "foam", elem2: "foam" },
"sprite": { elem1: "foam", elem2: "foam" } ,
}
};
elements.sprite = {
color: "#b2f3ad",
behavior: elements.soda.behavior,
category: "food",
state: "liquid",
};
elements.fanta = {
color: "#ffd500",
behavior: elements.soda.behavior,
category: "food",
state: "liquid",
};
elements.steampunk_soda = {
color: "#0fda2f",
behavior: [
"XX|CR:radiation,foam%2|XX",
"M2 AND CR:radiation%2|XX|M2 AND CR:radiation%2",
"M1|M1|M1",
],
category: "food",
state: "liquid",
};
elements.lime = {
color: "#b4ff15",
behavior: behaviors.POWDER,
category: "food",
state: "solid",
reactions: {
"seltzer": { elem1: null, elem2: "sprite" },
},
};
elements.orange = {
color: "#ffa500",
behavior: behaviors.POWDER,
category: "food",
state: "solid",
reactions: {
"seltzer": { elem1: null, elem2: "fanta" },
},
};
elements.steampunk_syrup = {
color: "#0fda2f",
behavior: behaviors.RADLIQUID,
category: "food",
state: "liquid",
reactions: {
"seltzer": { elem1: null, elem2: "steampunk_soda" },
"flour": { elem1: "steampunk_dough", elem2: null },
},
};
elements.steampunk_dough = {
color: "#0fda2f",
behavior: [
"XX|CR:radiation%2|XX",
"M2 AND CR:radiation%2|XX|M2 AND CR:radiation%2",
"XX|M1|XX",
],
category: "food",
state: "liquid",
tempHigh: 135,
stateHigh: "steampunk_bread",
};
elements.steampunk_bread = {
color: "#0fda2f",
behavior: behaviors.RADSOLID,
category: "food",
state: "solid",
tempHigh: 135,
stateHigh: "steampunk_syrup",
};
elements.salami = {
color: ["#bb0e0e", "#bb0e0e", "#bb0e0e", "#ffffff"],
behavior: behaviors.SOLID,
category: "food",
state: "solid",
reactions: {
"flour": { elem1: "slommi", elem2: null },
},
};
elements.slommi = {
color: ["#bb0e0e", "#ffb1b1"],
behavior: behaviors.SOLID,
category: "food",
state: "solid",
hidden: true,
};
if (!elements.milk.reactions) elements.milk.reactions = {};
elements.milk.reactions.corn = { elem1: null, elem2: "chowder" }

View File

@ -33,6 +33,7 @@ elements.moth = {
};
elements.cotton_candy = {
isFood: true,
tempHigh: 500,
stateHigh: "ash",
density: 1000,
@ -51,7 +52,7 @@ elements.mc_donalds = {
density: 69,
color: "#ff0000",
behavior: behaviors.STURDYPOWDER,
category: "food",
category: "joke",
state: "solid",
};
@ -111,7 +112,6 @@ elements.avocado = {
elements.guacamole = {
isFood: true,
hidden: true,
tempHigh: 500,
stateHigh: "ash",
color: "#a2e09d",
@ -131,9 +131,19 @@ elements.watermelon = {
state: "solid",
};
elements.watermelon_flesh = {
elements.melon = { //this one is kind of boring ngl it looks like a sponge but its food
isFood: true,
tempHigh: 500,
stateHigh: "steam",
color: "#c4bf1f",
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
};
elements.watermelon_flesh = {
hidden: true,
isFood: true,
tempHigh: 500,
stateHigh: "steam",
color: "#ff5d47",
@ -173,13 +183,12 @@ elements.green_berries = {
};
elements.meth = {
hidden: true,
hardness: 1,
tempHigh: 500,
stateHigh: "melted_meth",
color: "#0affef",
behavior: behaviors.POWDER,
category: "powders",
category: "joke",
state: "solid",
};
@ -217,14 +226,28 @@ elements.kiwi = {
state: "solid",
};
elements.peanut_butter = {
elements.lemon = {
breakInto: "lemonade",
tempHigh: 500,
stateHigh: "steam",
color: "#c9c22a",
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "liquid",
}
elements.lemon.reactions = {
"juice": { elem1: null, elem2: "lemonade" }
}
elements.lemonade = {
isFood: true,
tempHigh: 500,
stateHigh: "ash",
color: "#d4903d",
behavior: behaviors.POWDER,
category: "food",
state: "solid",
stateHigh: "steam",
color: "#fff41c",
behavior: behaviors.LIQUID,
category: "liquids",
state: "liquid",
};
elements.poop = {
@ -233,7 +256,7 @@ elements.poop = {
stateHigh: "ash",
color: "#331600",
behavior: behaviors.STURDYPOWDER,
category: "special",
category: "joke",
state: "solid",
reactions: {
"piss": { elem1: null, elem2: "bless" },
@ -241,6 +264,7 @@ elements.poop = {
};
elements.marshmallow = {
isFood: true,
tempHigh: 50,
stateHigh: "cooked_marshmallow",
color: "#ffe4e3",
@ -250,6 +274,8 @@ elements.marshmallow = {
};
elements.cooked_marshmallow = {
hidden: true,
isFood: true,
tempHigh: 150,
stateHigh: "burnt_marshmallow",
color: "#d49e9d",
@ -259,6 +285,7 @@ elements.cooked_marshmallow = {
};
elements.burnt_marshmallow = {
hidden: true,
tempHigh: 500,
stateHigh: "ash",
color: "#1c1212",
@ -268,15 +295,29 @@ elements.burnt_marshmallow = {
};
elements.ramen = {
tempHigh: 500,
stateHigh: "ash",
isFood: true,
tempHigh: 90,
stateHigh: "cooked_ramen",
color: "#fae34d",
behavior: behaviors.POWDER,
category: "food",
state: "solid",
};
elements.cooked_ramen = {
hidden: true,
density: 800,
isFood: true,
tempHigh: 500,
stateHigh: "ash",
color: "#ada24e",
behavior: behaviors.SUPPORT,
category: "food",
state: "liquid",
}
elements.cereal = {
isFood: true,
tempHigh: 500,
stateHigh: "ash",
color: ["#ba3425", "#baa31e", "#26ba1e", "#1e9dba", "#6f1eba"],
@ -286,6 +327,7 @@ elements.cereal = {
};
elements.sushi = {
isFood: true,
tempHigh: 500,
stateHigh: "ash",
color: ["#020802", "#fff0eb", "#ff6524", "#35ab26"],
@ -295,6 +337,10 @@ elements.sushi = {
};
elements.indestructible_wall = {
noMix: true,
tempHigh: 99999999999999999999999999999999,
stateHigh: "void",
hardness: 1,
color: "#7a7a7a",
behavior: behaviors.WALL,
category: "solids",
@ -307,11 +353,12 @@ elements.diamond_ore = {
breakInto: "diamond",
color: ["#525252", "#525252", "#525252", "#525252", "#525252", "#2ba3ff"],
behavior: behaviors.WALL,
category: "solids",
category: "joke",
state: "solid",
};
elements.coca_cola = {
isFood: true,
tempHigh: 500,
stateHigh: "steam",
color: "#381e13",
@ -325,11 +372,12 @@ elements.piss = {
stateHigh: "steam",
color: "#ffff00",
behavior: behaviors.LIQUID,
category: "special",
category: "joke",
state: "liquid",
};
elements.soup = {
isFood: true,
temp: 50,
tempHigh: 500,
stateHigh: "steam",
@ -340,6 +388,7 @@ elements.soup = {
};
elements.pastry = {
isFood: true,
tempHigh: 500,
stateHigh: "ash",
color: "#ba6727",
@ -349,23 +398,26 @@ elements.pastry = {
};
elements.melted_meth = {
hidden: true,
tempHigh: 100000,
stateHigh: "beans",
color: "#00a2ff",
behavior: behaviors.LIQUID,
category: "states",
category: "joke",
state: "solid",
};
elements.expired_milk = {
hidden: true,
tempHigh: 500,
stateHigh: "ash",
color: "#b8c2b4",
behavior: behaviors.LIQUID,
category: "states",
category: "liquids",
state: "solid",
reactions: {
"dirty_water": { elem1: "milk", elem2: "expired_milk" },
"milk": { elem1: "expired_milk", elem2: "milk" },
"water": { elem1: "milk", elem2: "dirty_water" },
}
};
elements.kfc = {
@ -373,7 +425,7 @@ elements.kfc = {
stateHigh: "void",
color: "#d16e11",
behavior: behaviors.STURDYPOWDER,
category: "food",
category: "joke",
state: "solid",
};
@ -382,7 +434,7 @@ elements.wendys = {
stateHigh: "void",
color: "#db1e0d",
behavior: behaviors.STURDYPOWDER,
category: "food",
category: "joke",
state: "solid",
};
@ -391,7 +443,7 @@ elements.burger_king = {
stateHigh: "void",
color: "#db660d",
behavior: behaviors.STURDYPOWDER,
category: "food",
category: "joke",
state: "solid",
};
@ -400,7 +452,7 @@ elements.pizza_hut = {
stateHigh: "void",
color: "#ed3b24",
behavior: behaviors.STURDYPOWDER,
category: "food",
category: "joke",
state: "solid",
};
@ -409,14 +461,13 @@ elements.dominos = {
stateHigh: "void",
color: ["#ed4934", "#3494ed"],
behavior: behaviors.STURDYPOWDER,
category: "food",
category: "joke",
state: "solid",
};
elements.vape = {
tempHigh: 500999,
hidden: true,
stateHigh: "beans",
color: "#999999",
behavior: [
@ -424,7 +475,7 @@ elements.vape = {
"CR:smoke|XX|CR:smoke",
"XX|CR:smoke|XX",
],
category: "special",
category: "joke",
state: "solid",
};
@ -436,7 +487,11 @@ elements.tendon = {
state: "gas",
};
elements.plasma.tempHigh = 18000
elements.plasma.stateHigh = "tendon"
elements.pea = {
isFood: true,
breakInto: "mashed_pea",
tempHigh: 500,
stateHigh: "ash",
@ -445,3 +500,244 @@ elements.pea = {
category: "food",
state: "solid",
};
elements.mashed_pea = {
hidden: true,
isFood: true,
tempHigh: 500,
stateHigh: "ash",
color: "#97f578",
behavior: behaviors.POWDER,
category: "food",
state: "liquid",
};
elements.beans = {
isFood: true,
viscosity: 1000,
density: 721,
hardness: 1,
color: ["#ff751f", "#ff411f"],
category: "food",
behavior: behaviors.LIQUID,
state: "liquid",
};
elements.chicken = {
tempHigh: 60,
stateHigh: "chicken_nugget",
color: "#cfbab0",
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
};
elements.chicken_nugget = {
hidden: true,
isFood: true,
tempHigh: 500,
stateHigh: "ash",
color: "#e0723f",
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "liquid",
};
elements.cocaine = {
tempHigh: 500,
stateHigh: "ash",
color: "#fafafa",
behavior: behaviors.POWDER,
category: "joke",
state: "liquid",
};
elements.zombie = {
viscosity: 1000,
density: 1000,
hardness: 1,
tempHigh: 500,
stateHigh: "ash",
color: "#114700",
behavior: behaviors.LIQUID,
category: "special",
state: "liquid",
};
elements.toothpaste = {
tempHigh: 500,
stateHigh: "ash",
color: ["#e8e8e8", "#ff0000", "#00b7ff"],
behavior: behaviors.STURDYPOWDER,
category: "liquids",
state: "liquid",
};
elements.radioactive_grape = {
hidden: true,
tempHigh: 1000,
stateHigh: "ash",
color: "#7d00d1",
behavior: behaviors.RADPOWDER,
category: "food",
state: "liquid",
};
elements.shampoo = {
viscosity: 1000,
density: 500,
hardness: 1,
tempHigh: 500,
stateHigh: "steam",
color: "#ccd3e0",
behavior: behaviors.FOAM,
category: "liquids",
state: "liquid",
};
elements.salami = {
density: 1000,
hardness: 1,
tempHigh: 500,
stateHigh: "ash",
color: "#de3c1d",
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "liquid",
};
elements.moon = {
density: 3344,
hardness: 1,
tempHigh: 10000,
stateHigh: "beans",
color: "#bababa",
behavior: behaviors.WALL,
category: "special",
state: "solid",
};
elements.dragon_fruit = {
breakInto: "mashed_dragon_fruit",
tempHigh: 500,
stateHigh: "ash",
color: ["#ff006f", "#ff006f", "#ff006f", "#036300", "#ff006f", "#ff006f", "#ff006f", "#ff006f"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "liquid",
};
elements.mashed_dragon_fruit = {
hidden: true,
tempHigh: 500,
stateHigh: "ash",
color: ["#e3e3e3", "#e3e3e3", "#0f0f0f", "#e3e3e3", "#e3e3e3", "#e3e3e3"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "liquid",
};
elements.chantilly = {
hardness: 1,
tempHigh: 500,
stateHigh: "steam",
color: "#cccccc",
behavior: behaviors.FOAM,
category: "liquids",
state: "liquid",
};
elements.fart = {
tempHigh: 99999999999,
stateHigh: "void",
color: "#2e4722",
behavior: behaviors.DGAS,
category: "joke",
state: "gas",
};
elements.chips = {
density: 600,
hidden: true,
tempHigh: 500,
stateHigh: "ash",
color: "#ff9a1f",
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "liquid",
};
elements.fries = {
density: 600,
hidden: true,
tempHigh: 500,
stateHigh: "ash",
color: "#d6ab0f",
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "liquid",
};
elements.mayo = {
viscosity: 2000,
density: 1200,
tempHigh: 500,
stateHigh: "steam",
color: ["#ffe896", "#fff3c7"],
behavior: behaviors.LIQUID,
category: "liquids",
state: "liquid",
};
elements.barbecue_sauce = {
viscosity: 3000,
density: 1800,
tempHigh: 500,
stateHigh: "steam",
color: "#420400",
behavior: behaviors.LIQUID,
category: "liquids",
state: "liquid",
};
elements.fried_water = {
temp: 50,
hidden: true,
tempHigh: 500,
stateHigh: "ash",
color: "#a3591c",
behavior: behaviors.POWDER,
category: "joke",
state: "liquid",
};
elements.solid_water = {
hidden: true,
tempHigh: 100,
stateHigh: "fried_water",
color: "#dfe9f5",
behavior: behaviors.STURDYPOWDER,
category: "joke",
state: "liquid",
};
elements.grape.reactions = {
"radiation": { elem1: null, elem2: "radioactive_grape" }
};
elements.egg.reactions = {
"water": { elem1: "boiled_egg", tempMin: 100 },
"steam": { elem1: "boiled_egg", tempMin: 100 }
};
elements.potato.reactions = {
"water": { elem1: "fries", tempMin: 100, chance: 50 },
"water": { elem1: "chips", tempMin: 100, chance: 50 },
"steam": { elem1: "fries", tempMin: 100, chance: 50 },
"steam": { elem1: "fries", tempMin: 100, chance: 50 },
};
elements.water.reactions = {
"cocaine": { elem1: null, elem2: "solid_water", chance: 1 }
}