Merge branch 'R74nCom:main' into main

This commit is contained in:
JustAGenericUsername 2024-04-09 18:35:19 -04:00 committed by GitHub
commit c79050cff6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 2081 additions and 64 deletions

View File

@ -109,6 +109,12 @@
<p>The original <a href="https://sandboxels.r74n.com/changelog.txt">plain text version</a> of this is still maintained.</p>
</div>
<h2 id="1.9.4.1">[Version 1.9.4.1 - April 8, 2024 - Eclipse Special]</h2>
<ul>
<li>+ Attempting to place Rock Wall on top of Sun begins a solar eclipse</li>
<li>+ Sun can draw over Light pixels</li>
</ul>
<h2 id="1.9.4">[Version 1.9.4 - March 17, 2024 - Natural Disasters]</h2>
<ul>
<li>+ Tornado</li>

View File

@ -7,6 +7,10 @@ See sneak peaks for upcoming updates on the Discord: https://discord.gg/ejUc6YPQ
A fancier version of this changelog can be found here: https://sandboxels.R74n.com/changelog
[Version 1.9.4.1 - April 8, 2024 - Eclipse Special]
+ Attempting to place Rock Wall on top of Sun begins a solar eclipse
+ Sun can draw over Light pixels
[Version 1.9.4 - March 17, 2024 - Natural Disasters]
+ Tornado
+ Earthquake

View File

@ -48,7 +48,7 @@
<meta name="twitter:creator:id" content="1436857621827530753">
<script> // versioning info
currentversion = "1.9.4";
currentversion = "1.9.4.1";
saveVersion = 2;
</script>
<style>
@ -1159,6 +1159,17 @@
"rock_wall": {
color: ["#666666","#363636","#7a7a7a"],
behavior: behaviors.WALL,
tool: function(pixel) {
if (pixel.element === "sun") {
pixel.eclipse = true;
if (Math.random() < 0.1) {
changePixel(pixel,"rock_wall");
pixel.temp = 20;
pixel.color = pixelColorPick(pixel,"#301B16")
}
}
},
canPlace: true,
tempHigh: 950,
stateHigh: "magma",
category: "land",
@ -2177,7 +2188,8 @@
tick: function(pixel) {
// minimum 1726
// maximum 7726
if (pixel.temp < 1500) { pixel.color = pixelColorPick(pixel,"#7a4e43"); var c=0 }
if (pixel.eclipse) { pixel.color = pixelColorPick(pixel,"#FD8C03"); var c=0.01}
else if (pixel.temp < 1500) { pixel.color = pixelColorPick(pixel,"#7a4e43"); var c=0 }
else if (pixel.temp < 3600) { pixel.color = pixelColorPick(pixel,"#ffbdbd"); var c=0.015 }
else if (pixel.temp < 5000) { pixel.color = pixelColorPick(pixel,"#ffd5bd"); var c=0.025 }
else if (pixel.temp < 7000) { pixel.color = pixelColorPick(pixel,"#ffffbd"); var c=0.05 }
@ -2194,16 +2206,25 @@
}
else if (!outOfBounds(x,y)) {
var newPixel = pixelMap[x][y];
if (pixel.temp!==newPixel.temp && elements[newPixel.element].id === elements.sun.id) {
var avg = (pixel.temp + newPixel.temp)/2;
pixel.temp = avg;
newPixel.temp = avg;
pixelTempCheck(pixel);
pixelTempCheck(newPixel);
if (elements[newPixel.element].id === elements.sun.id) {
if (pixel.eclipse) { newPixel.eclipse = true }
if (pixel.temp!==newPixel.temp) {
var avg = (pixel.temp + newPixel.temp)/2;
pixel.temp = avg;
newPixel.temp = avg;
pixelTempCheck(pixel);
pixelTempCheck(newPixel);
}
}
}
}
},
tool: function(pixel) {
if (pixel.element === "light") {
deletePixel(pixel.x,pixel.y);
}
},
canPlace: true,
reactions: {
"hydrogen": { elem2:"helium", temp1:5 },
"helium": { elem2:"carbon_dioxide", temp1:5, tempMax:3600 },

View File

@ -218,7 +218,7 @@
<tr><td>weapons.js</td><td>Adds some extra weapons</td><td>Jayd</td></tr>
<!----><tr><td class="modCat" colspan="3">Food & Cooking</td></tr><!---->
<tr><td>aChefsDream.js</td><td>Adds more foods, animals, tools and many other cooking related items</td><td>SquareScreamYT, RealerRaddler</td></tr>
<tr><td>aChefsDream.js</td><td>Adds more foods, animals, tools and many other cooking related items. Updates can be found in <a href="https://www.youtube.com/watch?v=pQFTtlNPODQ&list=PLWHqGb75vC8o7CLv-pMoVb56JL9BY9F0t">this YouTube Playlist</a></td><td>SquareScreamYT</td></tr>
<tr><td>bananas.js</td><td>Adds bananas and banana plants</td><td>Alice</td></tr>
<tr><td>greenitemsandmore.js</td><td>Adds various green things, including apples and more food</td><td>zonneschijn7</td>
<tr><td>ketchup_mod.js</td><td>Adds a bunch of ketchup related stuff, plus a few other condiments</td><td>Nubo318 (main dev), Devi, Alice (contributors)</td></tr>

1137
mods/Science_mod.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,25 @@
elements.thread = {
color: "#fff3e6",
behavior: behaviors.STURDYPOWDER,
behavior: behaviors.SUPPORTPOWDER,
category: "thread",
state: "solid",
tempHigh: "50",
stateHigh: "ash",
hardness: "0.2",
breakInto: "wool"
breakInto: "wool",
density: " 1314",
burn: "99",
burnTime: "40"
burnTime: "40",
burnInto: "ash",
reactions: {
"weavepowder": { elem1: null, elem2: "rope" },
};
}
}
elements.wool = {
color: "#e2e1d8",
behavior: behaviors.POWDER,
behavior: behaviors.STURDYPOWDER,
category: "thread",
state: "solid",
tempHigh: "40",
@ -25,11 +27,12 @@ elements.wool = {
hardness: "1",
density: " 1314",
burn: "90",
burnTime: "40"
burnTime: "40",
burnInto: "ash",
reactions: {
"weavepowder": { elem1: null, elem2: "thread" },
};
}
}
elements.weavepowder = {
color: "#494736",
behavior: behaviors.POWDER,
@ -40,23 +43,105 @@ elements.weavepowder = {
hardness: "1",
density: " 1314",
burn: "0",
burnTime: "0"
burnTime: "0",
burnInto: "dust",
reactions: {
"wool": { elem1: thread, elem2: "null" },
"thread": { elem1: rope, elem2: "null" },
};
"wool": { elem1: "thread", elem2: null },
"thread": { elem1: "rope", elem2: null },
}
}
elements.rope = {
color: "#ffe6cc",
behavior: behaviors.STURDYPOWDER,
behavior: behaviors.SUPPORT,
category: "thread",
state: "solid",
tempHigh: "60",
stateHigh: "ash",
hardness: "0.4",
breakInto: "thread"
breakInto: "thread",
density: " 1314",
burn: "85",
burnTime: "50"
burnTime: "50",
burnInto: "ash",
}
elements.sheep = {
color: ["#FFFFE8", "#F4FFFF", "#FFF7F2","#796464","#282828"],
behavior: [
"M2%1|M2%1|M2%1",
"M2%3|XX|M2%3",
"XX|M1|XX",
],
reactions: {
"grass": { elem2:null, chance:0.04, func:behaviors.FEEDPIXEL },
"dead_plant": { elem2:null, chance:0.04, func:behaviors.FEEDPIXEL },
"plant": { elem2:null, chance:0.04, 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 },
"body": { elem1:["wool","sheep"], chance:0.1 },
},
egg: "lamb",
foodNeed: 10,
temp: 30,
tempHigh: 100,
stateHigh: "cooked_meat",
tempLow: -18,
stateLow: "frozen_meat",
category:"life",
breakInto: ["meat", "wool"],
burn:15,
burnTime:300,
state: "solid",
density: 1450,
conduct: 0.2
};
elements.lamb = {
color: ["#FFFFE8", "#F4FFFF", "#FFF7F2","#796464","#282828"],
state: "solid",
behavior: [
"M2%1|M2%2|M2%1",
"M2%4|FX%5 AND CH:sheep%0.1|M2%4",
"XX|M1|XX",
],
reactions: {
"grass": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"dead_plant": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"plant": { elem2:null, chance:0.05, 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 },
"body": { elem1:["wool","sheep"], chance:0.1 },
},
egg: "lamb",
foodNeed: 20,
temp: 30,
tempHigh: 100,
stateHigh: "cooked_meat",
tempLow: -18,
stateLow: "frozen_meat",
category:"life",
breakInto: ["meat","wool"],
burn:15,
burnTime:300,
state: "solid",
density: 1450,
conduct: 0.2
};

156
mods/UAMM.js Normal file
View File

@ -0,0 +1,156 @@
console.log("Thanks for using UAMM!")
elements.rubidium = {
color: ["#b5b5b5", "#c9c9c9", "#d6cccb"],
behavior: behaviors.POWDER,
category: "powders",
state: "solid",
tempHigh: 39.3,
stateHigh: "liquid_rubidium",
density: 1532,
tick: function (pixel){
var foundelem1 = false
var foundelem2 = false
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if(!isEmpty(x, y, true)){
var otherPixel = pixelMap[x][y]
if (otherPixel.element == "liquid_ammonia"){foundelem1 = true; break}
}
}
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if(!isEmpty(x, y, true)){
var otherPixel = pixelMap[x][y]
if (otherPixel.element == "oxygen"){foundelem2 = true; break}
}
}
if (foundelem1 && foundelem2){changePixel(pixel, "rubidium_peroxide", false)}
},
reactions: {
"water": {elem1: "pop", elem2: "hydrogen", temp2: 400},
"oxygen": {elem1: "rubidium_superoxide", elem2: null, chance: 0.3}
}
};
elements.liquid_rubidium = {
color: ["#cccccc", "#ebe8e8", "#f2e7e6"],
behavior: behaviors.LIQUID,
hidden: true,
state: "liquid",
tempLow: 38,
stateLow: "rubidium",
density: 1475,
reactions: {
"water": {elem1: "pop", elem2: "hydrogen", temp2: 400}
}
}
elements.rubidium_superoxide = {
color: ["#eded00", "#ffff26", "#e3e33d"],
behavior: behaviors.POWDER,
hidden: true,
state: "solid",
tempHigh: 340,
stateHigh: "rubidium_peroxide",
density: 1532,
reactions: {
"water": {elem2: null}
}
};
elements.rubidium_peroxide = {
color: ["#fffed9", "#ffffe8", "#edede4"],
behavior: behaviors.POWDER,
hidden: true,
state: "solid",
density: 1532,
reactions: {
"water": {elem2: null}
}
};
elements.cesium = {
color: ["#e3a814", "#dbab32", "#e8bc4f", "#fabf2d"],
behavior: behaviors.POWDER,
category: "powders",
state: "solid",
fireColor: "#8c21de",
burn: 1,
burnTime: 500,
tempHigh: 29,
stateHigh: "liquid_cesium",
density: 1873,
reactions: {
"water": {func: (pixel1) => {pixel1.burning=true;pixel1.burnStart=pixelTicks},
elem1: "pop", elem2: ["smoke", "fire"], temp2: 22},
"fire": {elem1: ["smoke", "pop"]}
}
};
elements.liquid_cesium = {
color: ["#ebb121", "#edbd42", "#f5cb62", "#fcd26a"],
behavior: behaviors.LIQUID,
hidden: true,
state: "liquid",
tempLow: 28,
stateLow: "cesium",
density: 1842,
reactions: {
"water": {func: (pixel1) => {pixel1.burning=true;pixel1.burnStart=pixelTicks},
elem1: "pop", elem2: ["smoke", "fire"], temp2: 22},
"radiation": {elem1: "liquid_radiocesium", elem2: "smoke", chance: 0.65}
}
};
elements.radiocesium = {
color: ["#c7bda5", "#ada287", "#99958b", "#d1ccc0"],
behavior: [
"XX|CR:radiation%1|XX",
"CR:radiation%1|XX|CR:radiation%1",
"M2|M1|M2",
],
hidden: true,
state: "solid",
fireColor: "#8c21de",
burn: 1,
burnTime: 500,
tempHigh: 29,
stateHigh: "liquid_radiocesium",
density: 1873,
reactions: {
"water": {func: (pixel1) => {pixel1.burning=true;pixel1.burnStart=pixelTicks},
elem1: ["rad_steam", "fallout"], elem2: "explosion"}
}
}
elements.liquid_radiocesium = {
color: ["#e8dcc1", "#d4c6a5", "#bfbaae", "#f5f1e9"],
behavior: behaviors.RADMOLTEN,
hidden: true,
state: "liquid",
tempLow: 28,
stateLow: "radiocesium",
density: 1842,
reactions: {
"water": {func: (pixel1) => {pixel1.burning=true;pixel1.burnStart=pixelTicks},
elem1: ["rad_steam", "fallout"], elem2: "explosion"}
}
}
elements.lithium = {
color: ["#e3a814", "#dbab32", "#e8bc4f", "#fabf2d"],
behavior: behaviors.POWDER,
category: "powders",
state: "solid",
fireColor: "#8c21de",
burn: 1,
burnTime: 500,
tempHigh: 29,
stateHigh: "liquid_cesium",
density: 534,
}

View File

@ -1,20 +1,21 @@
/*
Created by SquareScreamYT/sqec <@918475812884344852>
Thanks to RealerRaddler <@914371295561535508>, Alice <@697799964985786450>, nousernamefound <@316383921346707468>, Adora the Transfem <@778753696804765696>, ryan(R74n) <@101070932608561152> and Fioushemastor <@738828785482203189> for helping :)
Compatibility with other mods coming soon! s
Compatibility with plants.js coming soon
Works well with community_desserts.js
v1.12.4
v1.13
you can support me at my youtube: https://youtube.com/@sqec
Upcoming Features:
- extract tool
- cinnamon
- spring onions
- white rice noodles
- matcha leaves, powder, tea
- cacao pods
- more chocolate, cocoa powder, white chocolate, cocoa butter
- agar (makes juice into jelly)
- pigs, ham and bacon
- garlic
- stainless steel
@ -25,6 +26,7 @@ Upcoming Features:
- kiwis
- guavas
- lychees
- cherries (and the plasticky maraschino cherries 🤮🤮🤮)
- dragonfuits
- dates
- figs
@ -35,7 +37,6 @@ Upcoming Features:
- peaches
- cucumbers
- eggplants
- food coloring
- crabs (they eat coconuts)
- squids
- tofu
@ -43,9 +44,6 @@ Upcoming Features:
- juice reaction with milk makes average color
- juice reaction with other juices
- jackfruit
- barbecueing meats
- bbq sauce
- mustard
Changelog (v1.0)
- added chickens
@ -419,6 +417,30 @@ Changelog (v1.12.4)
Changelog (v1.13)
- added cracker and cracker dough
- added barbecue sauce
- added mustard
- added agar
- added barbecued chicken
- tweaked grape juice color
- added duck
- added duckling
- added duck eggs and frozen duck eggs
- added raw duck and cooked duck
- added fried duck
- added boiled duck
- added barbecued duck
- added smoked duck
- added steamed duck
- added cows
- added calves
- added steak and beef
- added smoked steak and barbecued steak
*/
/*
@ -745,6 +767,45 @@ elements.chick = {
}
};
elements.barbecued_chicken = {
color:["#bf743b", "#b57026","#8f5e29","#a87b11"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
temp:55,
tempHigh: 600,
stateHigh: ["ash","smoke"],
isFood: true,
hidden: true,
}
elements.barbecue_sauce = {
color: "#571e1A",
behavior: behaviors.LIQUID,
viscosity: 50000,
tempHigh: 260,
stateHigh: ["carbon_dioxide","methane","steam","salt","sugar"],
category:"food",
state: "liquid",
density: 1235,
stain: 0.05,
isFood: true,
}
if (!elements.ketchup.reactions) { elements.ketchup.reactions = {}; }
elements.ketchup.reactions.molasses = { elem1:"barbecue_sauce", elem2:"barbecue_sauce" }
elements.mustard = {
color: "#e1ad01",
behavior: behaviors.LIQUID,
viscosity: 50000,
tempHigh: 260,
stateHigh: ["carbon_dioxide","methane","steam","sugar"],
category:"food",
state: "liquid",
density: 1235,
stain: 0.05,
isFood: true
}
elements.soup = {
color: "#fbd189",
behavior: behaviors.LIQUID,
@ -830,8 +891,8 @@ elements.battered_raw_chicken = {
category: "food",
state: "solid",
temp:25,
tempHigh: 600,
stateHigh: ["ash","smoke"],
tempHigh: 125,
stateHigh: "cooked_chicken",
reactions: {
"crumb": { elem1: "raw_chicken_nugget", elem2: null },
},
@ -918,7 +979,9 @@ elements.raw_chicken = {
"smoke": {elem1: "smoked_chicken"},
"steam": {elem1: "steamed_chicken"},
"water": {elem1: "boiled_chicken", tempMin: 70},
"nut_oil": {elem1: "fried_chicken", tempMin: 70}
"nut_oil": {elem1: "fried_chicken", tempMin: 70},
"charcoal": {elem1: "barbecued_chicken", tempMin: 70},
"fire": {elem1: "barbecued_chicken"}
}
};
@ -2100,13 +2163,13 @@ eLists.JUICEMIXABLE.push("watermelon_juice");
elements.grape.breakInto = "grape_juice",
elements.grape_juice = {
color: "#6d2282",
color: "#291824",
behavior: behaviors.LIQUID,
onMix: function(pixel) {
if (shiftDown) {
if (Math.random() < 0.2) {
changePixel(pixel,"juice")
pixel.color = pixelColorPick(pixel, "#6d2282")
pixel.color = pixelColorPick(pixel, "#291824")
}
}
},
@ -3054,8 +3117,8 @@ elements.corn_starch = {
"seltzer": { elem1: "dough", elem2: null },
"pool_water": { elem1: "dough", elem2: null },
"juice": { elem1: "dough", elem2: null },
"yolk": { elem1: "cookie_dough", elem2: null, color1:"#dbd19a" },
"yogurt": { elem1: "cookie_dough", elem2: null, color1:"#dbd19a" },
"yolk": { elem1: "cracker_dough", elem2: null, color1:"#dbd19a" },
"yogurt": { elem1: "cracker_dough", elem2: null, color1:"#dbd19a" },
"broth": { elem1:"dough", elem2:null },
"soda": { elem1:"dough", elem2:null },
"tea": { elem1:"dough", elem2:null },
@ -5695,6 +5758,7 @@ elements.seaweed_stem = {
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
"mercury": { elem1:"dead_plant", elem2:null, chance:0.01 },
"stench": { elem2:null, chance:0.25 },
"alcohol": { elem1:"agar", elem2:null, chance:0.035 },
},
category:"life",
tempHigh: 100,
@ -5721,6 +5785,7 @@ elements.seaweed = {
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 },
"mercury": { elem1:"dead_plant", elem2:null, chance:0.01 },
"stench": { elem2:null, chance:0.25 },
"alcohol": { elem1:"agar", elem2:null, chance:0.035 },
},
category:"food",
tempHigh: 100,
@ -7080,7 +7145,7 @@ elements.food_coloring = {
stainSelf: true,
ignore: ["glass", "porcelain", "wall","iron","steel","copper","silver","aluminum","tungsten","gold","plastic"],
desc: "coloring for food. color may fade when diluting with water.",
tick: function (pixel) {
onMix: function (pixel) {
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x + coord[0];
@ -7249,3 +7314,445 @@ elements.soy_sauce = {
density: 1200,
};
// end of confused part
elements.ice.breakInto = "slush";
elements.cracker_dough = {
color: "#dbd19a",
behavior: behaviors.STURDYPOWDER,
category: "food",
tempHigh: 94,
stateHigh: "cracker",
stateHighColorMultiplier: 1.1,
burn:40,
burnTime:25,
burnInto:"ash",
state: "solid",
density: 526.9,
isFood: true,
hidden: true
}
elements.cracker = {
color: "#e0ddb8",
behavior: behaviors.STURDYPOWDER,
tempHigh: 605,
stateHigh: "ash",
category: "food",
burn: 30,
burnTime: 200,
burnInto: ["smoke","smoke","smoke","ash"],
breakInto: "crumb",
state: "solid",
density: 233.96,
isFood: true
}
elements.agar = {
color: "#e0e0e0",
behavior: behaviors.POWDER,
reactions: {
"ice": { elem1:null, elem2:"salt_water", chance:0.1 },
"rime": { elem1:null, elem2:"salt_water", chance:0.075 },
"snow": { elem1:null, elem2:"salt_water", chance:0.25 },
"packed_snow": { elem1:null, elem2:"salt_water", chance:0.05 },
"packed_ice": { elem1:null, elem2:"salt_water", chance:0.01 }
},
category: "food",
tempHigh: 801,
state: "solid",
density: 2160,
alias: "gelatin"
}
// thanks to adora
elements.agar.reactions.juice = { elem1:"jelly", elem2:null, chance:0.05, func: function(pixel1, pixel2){
let newrgb = interpolateRgb(getRGB('rgb(250,250,250)'), getRGB(pixel2.color), 0.7);
pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`;
}}
elements.agar.reactions.water = {elem1:"jelly",elem2:null,color1:"#e0e0e0",chance:0.05}
elements.duck = {
color: ["#826c4e", "#2b5927", "#d6d6d6", "#7d4a2c"],
behavior: [
"M2%1 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%1|M2%2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%50|M2%1 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%1",
"M2%10|XX|M2%10",
"XX|M1%33|XX",
],
category:"life",
state: "solid",
reactions: {
"meat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"chicken_nugget": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"grass": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"worm": { elem2: "crushed_worm", chance:0.3},
"cooked_meat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"fish": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
"rat": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"snail": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"frog": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"slug": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"grape": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"wheat_seed": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
"flower_seed": { elem2:null, chance:0.32, func:behaviors.FEEDPIXEL },
"corn_seed": { elem2:null, chance:0.35, func:behaviors.FEEDPIXEL },
"corn": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
"crumb": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
"potato_seed": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
"grass_seed": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"pumpkin_seed": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"pumpkin": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"nut": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"dead_bug": { elem2:null, chance:0.35, func:behaviors.FEEDPIXEL },
"bee": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"ant": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"flea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"termite": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"lichen": { 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 },
"dirty_water": { elem1:"rotten_meat", chance:0.0001 },
},
egg: "duck_egg",
foodNeed: 10,
temp: 40,
tempHigh: 75,
stateHigh: "cooked_duck",
tempLow: -18,
stateLow: "frozen_meat",
breakInto: "raw_duck",
burn:85,
burnTime:450,
state: "solid",
density: 1117,
conduct: 0.3,
cutInto: "raw_duck",
};
elements.duck_egg = {
color: "#e0d3ab",
behavior: behaviors.STURDYPOWDER2,
tick: function(pixel) {
if (Math.random() < 0.1 && pixel.temp > 20 && pixel.temp < 35) {
changePixel(pixel,"duckling")
}
doDefaults(pixel);
},
category: "food",
state: "solid",
temp: 20,
tempLow: -18,
stateLow: "frozen_duck_egg",
breakInto: ["yolk"],
tempHigh: 400,
stateHigh: ["calcium", "ash"],
burn:50,
burnTime:450,
state: "solid",
density: 900,
conduct: 0.1,
reactions: {
"water": { elem2:null, elem1:"hard_boiled_egg", chance:10, tempMin:80 }
}
};
elements.frozen_duck_egg = {
color: "#e0d3cf",
behavior: behaviors.POWDER,
category: "food",
state: "solid",
temp: -20,
tempHigh: 10,
stateHigh: "duck_egg",
breakInto: ["calcium", "hard_yolk"],
burn:50,
burnTime:450,
state: "solid",
density: 900,
conduct: 0.1,
hidden: true,
};
elements.duckling = {
color: ["#f0eba8", "#f0eba8"],
behavior: [
"M2%1|M2%2|M2%1",
"M2%10|FX%5 AND CH:duck%0.1|M2%10",
"XX|M1%33|XX",
],
category: "life",
state: "solid",
egg: "duck_egg",
foodNeed: 20,
temp: 40,
tempHigh: 75,
stateHigh: "cooked_meat",
tempLow: -18,
stateLow: "frozen_meat",
breakInto: "blood",
burn:85,
burnTime:450,
state: "solid",
density: 900,
conduct: 0.1,
reactions: {
"crushed_worm": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL},
"meat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"chicken_nugget": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"grass": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"worm": { elem2: "crushed_worm", chance:0.3},
"cooked_meat": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"fish": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
"rat": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"snail": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"frog": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"slug": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"grape": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"wheat_seed": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
"flower_seed": { elem2:null, chance:0.32, func:behaviors.FEEDPIXEL },
"corn_seed": { elem2:null, chance:0.35, func:behaviors.FEEDPIXEL },
"corn": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
"crumb": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL },
"potato_seed": { elem2:null, chance:0.4, func:behaviors.FEEDPIXEL },
"grass_seed": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"pumpkin_seed": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"pumpkin": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"nut": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"dead_bug": { elem2:null, chance:0.35, func:behaviors.FEEDPIXEL },
"bee": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"ant": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"flea": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"termite": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"lichen": { 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 },
"dirty_water": { elem1:"rotten_meat", chance:0.0001 },
}
};
elements.barbecued_duck = {
color:["#a67d2d","#9c721f"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
temp:55,
tempHigh: 600,
stateHigh: ["ash","smoke"],
isFood: true,
hidden: true,
}
elements.steamed_duck = {
color:["#e8cb7b", "#d6bf7e"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
temp:50,
tempHigh: 600,
stateHigh: ["ash","smoke"],
isFood: true,
hidden: true,
}
elements.smoked_duck = {
color:["#6b470e", "#8f5b09"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
temp:55,
tempHigh: 600,
stateHigh: ["ash","smoke"],
isFood: true,
hidden: true,
}
elements.cooked_duck = {
color: ["#a38046", "#b39652"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
temp: 40,
tempHigh: 600,
stateHigh: ["ash", "smoke"],
hidden: true,
};
elements.raw_duck = {
color: ["#d6a587", "#c99873"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
burnInto: "cooked_duck",
temp:25,
tempHigh: 600,
stateHigh: ["cooked_duck"],
reactions: {
"smoke": {elem1: "smoked_duck"},
"steam": {elem1: "steamed_duck"},
"water": {elem1: "boiled_duck", tempMin: 70},
"nut_oil": {elem1: "fried_duck", tempMin: 70},
"charcoal": {elem1: "barbecued_duck", tempMin: 70},
"fire": {elem1: "barbecued_duck"}
}
};
elements.boiled_duck = {
color: ["#e0d4a4", "#e0d4a4"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
isFood: true,
temp: 65,
tempHigh: 600,
stateHigh: ["ash", "smoke"],
hidden: true,
}
elements.fried_duck = {
color: ["#c49543", "#b88835", "#b07b20", "#996e23"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
isFood: true,
temp: 90,
tempHigh: 600,
stateHigh: ["ash", "smoke"],
hidden: true,
}
// side note: i don't eat beef
elements.cow = {
color: ["#292928", "#332b23", "#e0dfde", "#f0edeb"],
behavior: [
"M2%1|XX|M2%1",
"M2%10|XX|M2%10",
"XX|M1|XX",
],
category:"life",
state: "solid",
reactions: {
"petal": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"grass": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"grape": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"pumpkin_seed": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"pumpkin": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"nut": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"lichen": { 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 },
"dirty_water": { elem1:"rotten_meat", chance:0.0001 },
},
egg: "calf",
foodNeed: 10,
temp: 40,
tempHigh: 75,
stateHigh: "steak",
tempLow: -18,
stateLow: "frozen_meat",
breakInto: "raw_beef",
burn:85,
burnTime:450,
state: "solid",
density: 1117,
conduct: 0.3,
cutInto: "raw_beef",
};
elements.calf = {
color: ["#363535", "#bdbdbd"],
behavior: [
"M2%1|XX|M2%1",
"M2%10|FX%5 AND CH:cow%0.1|M2%10",
"XX|M1|XX",
],
category: "life",
state: "solid",
foodNeed: 20,
temp: 40,
tempHigh: 75,
stateHigh: "steak",
tempLow: -18,
stateLow: "frozen_meat",
breakInto: "blood",
burn:85,
burnTime:450,
state: "solid",
density: 900,
conduct: 0.1,
reactions: {
"petal": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"grass": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"grape": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"pumpkin_seed": { elem2:null, chance:0.3, func:behaviors.FEEDPIXEL },
"pumpkin": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
"nut": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
"lichen": { 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 },
"dirty_water": { elem1:"rotten_meat", chance:0.0001 },
},
};
elements.barbecued_steak = {
color:["#3b271a","#29180d"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
temp:55,
tempHigh: 600,
stateHigh: ["ash","smoke"],
isFood: true,
hidden: true,
}
elements.smoked_beef = {
color:["#3b1911", "#3b2719"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
temp:55,
tempHigh: 600,
stateHigh: ["ash","smoke"],
isFood: true,
hidden: true,
}
elements.steak = {
color: ["#a38046", "#b39652"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
temp: 40,
tempHigh: 600,
stateHigh: ["ash", "smoke"],
hidden: true,
alias: "cooked_beef"
};
elements.raw_beef = {
color: ["#ab5841", "#ab322e"],
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "solid",
burnInto: "steak",
temp:25,
tempHigh: 600,
stateHigh: ["steak"],
reactions: {
"smoke": {elem1: "smoked_beef"},
"charcoal": {elem1: "barbecued_beef", tempMin: 70},
"fire": {elem1: "barbecued_beef"}
}
};

View File

@ -15,6 +15,7 @@ elements.carbon_monoxide = {
tempLow: -192,
stateLow: "liquid_carbon_monoxide",
burntime: 5,
darkText: true,
fireColor: "#ebba34",
reactions: {
"head": { elem1:"rotten_meat", chance:0.5 },
@ -31,6 +32,7 @@ elements.liquid_carbon_monoxide = {
tempHigh: -190,
temp: -192,
tempLow: -199,
hidden: true,
stateLow: "ice_carbon_monoxide",
stateHigh: "carbon_monoxide",
};
@ -200,13 +202,17 @@ elements.radiated_water = {
density :1300,
color: ["#23d959","#29d65d"],
hidden: true,
tempHigh: 140,
stateHigh: "polluted_air",
tempLow: -6,
stateLow: "rad_ice",
reactions: {
"human": { elem2:"rotten_meat" },
"body": { elem2:"rotten_meat" },
"head": { elem2:"ash" },
"bird": { elem2:"rotten_meat"},
"cell": { elem2:"cancer"},
}
"cell": { elem2:"cancer"},
}
};
elements.polluted_air = {
@ -221,7 +227,8 @@ elements.polluted_air = {
"human": { elem2:"rotten_meat" },
"bird": { elem2:"rotten_meat" },
"cell": { elem2:"cancer"},
}
"water": { elem1: null, elem2: "radiated_water" },
}
};
elements.siren = {
@ -236,4 +243,28 @@ elements.siren = {
"radiated_water": {"charge1":1},
"polluted_air": {"charge1":1},
}
};
elements.radiated_metal = {
behavior: behaviors.WALL,
category: "radiated",
state:"solid",
density :2045,
color: ["#5e705a","#83ab7b","#474747"],
tempHigh: 1440,
stateHigh: ["molten_nickel","molten_iron","molten_tin","fallout"],
reactions: {
"water": { elem2:"radiated_water", chance:0.7 },
"foam": { elem1:["tin","nickel","iron"] },
}
};
elements.rad_ice = {
behavior: behaviors.WALL,
category: "radiated",
state:"solid",
density: 1905,
color: ["#81d79c","#68b899","#68abb8"],
hidden: true,
temp: -6,
}

View File

@ -45,7 +45,7 @@ const nounTemperatures = {
gas: ["#ffffff", "#eeeeee", "#dddddd", "#cccccc", "#bbbbbb"],
plasma: ["#ff9966", "#ffaa77", "#ffbb88", "#ffcc99", "#ffddaa"],
slime: ["#88cc88", "#99dd99", "#aaddaa", "#bbeebb", "#ccffcc"],
sand: ["#cccccc", "#dddddd", "#eeeeee", "#ffffff", "#eeeeee"],
sand: ["#D2B48C", "#E8D5A9", "#F0E3C4", "#DCD0BF", "#EBE4D6"],
dust: ["#aaaaaa", "#bbbbbb", "#cccccc", "#dddddd", "#eeeeee"],
rock: ["#777777", "#888888", "#999999", "#aaaaaa", "#bbbbbb"],
lava: ["#ff4400", "#ff5511", "#ff6622", "#ff7733", "#ff8844"],
@ -57,26 +57,24 @@ const nounTemperatures = {
};
const adjectiveStates = {
shiny: "solid",
glowing: "gas",
dark: "solid",
bright: "gas",
heavy: "solid",
light: "gas",
hot: "solid",
cold: "solid",
hard: "solid",
soft: "liquid",
smooth: "liquid",
rough: "solid",
round: "liquid",
sharp: "solid",
sweet: "liquid",
sour: "liquid",
bitter: "liquid",
salty: "solid",
savory: "liquid"
const nounStates = {
metal: "solid",
crystal: "solid",
stone: "solid",
powder: "liquid",
liquid: "liquid",
gas: "gas",
plasma: "gas",
slime: "liquid",
sand: "liquid",
dust: "liquid",
rock: "solid",
lava: "liquid",
ice: "solid",
vapor: "gas",
ash: "liquid",
soot: "liquid",
sludge: "liquid"
};
// Map noun to behavior
@ -100,12 +98,29 @@ const nounBehaviors = {
sludge: behaviors.LIQUID
};
const adjectiveBreakInto = {
sweet: "sugar",
salty: "salt",
};
const nounBreakInto = {
crystal: "glass_shard",
ice: "snow",
rock: ["sand", "gravel"],
};
const adjectiveColorModifiers = {
dark: 0.8, // darker
shiny: 1.2, // brighter
glowing: 1.5 // brightest
};
// Generate elements
for (const name of elementNames) {
const [adjective, noun] = name.split("_");
const baseColor = nounColors[noun];
let baseColor = nounColors[noun];
const {tempLow, tempHigh} = nounTemperatures[noun];
@ -117,14 +132,69 @@ for (const name of elementNames) {
temp /= 2;
}
if (adjective in adjectiveColorModifiers) {
const modifier = adjectiveColorModifiers[adjective];
baseColor = modifyColor(baseColor, modifier);
}
elements[name] = {
color: baseColor,
behavior: nounBehaviors[noun],
category: "random elements",
state: adjectiveStates[adjective],
state: nounStates[noun],
temp: temp,
breakInto: adjectiveBreakInto[adjective] || nounBreakInto[noun],
density: Math.random() * 100,
viscosity: Math.random() * 100
};
function modifyColor(color, modifier) {
if (color[0] === '#') {
color = color.slice(1);
}
color = String(color);
// Check for '#'
const match = color.match(/^#?(.*)$/);
if (match) {
color = match[1];
}
// Convert to RGB
let [r, g, b] = color.match(/.{1,2}/g).map(x => parseInt(x, 16));
// Apply modifier
r = Math.round(r * modifier);
g = Math.round(g * modifier);
b = Math.round(b * modifier);
// Constrain RGB values to 0-255
r = Math.max(0, Math.min(255, r));
g = Math.max(0, Math.min(255, g));
b = Math.max(0, Math.min(255, b));
// Convert back to hex
return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
}
/*
changelog only count importtant stuff and not the small details
0.1
added the mod
0.2
elements have breakInto's
elements with the adjectives "dark, shiny and glowing" are darker or brighter
elements with the nouns "crystal, ice, rock" can break into other elements like "glass_shard, snow, sand"
fixed some elements having wrong states
todo:
elements have reactions
gases dont have breakintos
what a silly little changelog! i made it literally right here!!
*/