Merge branch 'main' into patch-2

This commit is contained in:
slweeb 2024-04-04 20:23:44 -04:00 committed by GitHub
commit e8ef9be2b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 7371 additions and 1014 deletions

View File

@ -15667,6 +15667,10 @@ window.onload = function() {
}
}
}
// if the user is in an input, return
if (document.activeElement.tagName === "INPUT" || document.activeElement.tagName === "TEXTAREA") {
return;
}
// [ or - = decrease the mouse size by 2
if (e.keyCode == 219 || e.keyCode == 189) {
if (shiftDown) {mouseSize = 1}
@ -16219,7 +16223,21 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span> <input type="button" value="O
</optgroup>
</select></p>
<p>Email us at <a href="mailto:contact@R74n.com">contact@R74n.com</a> for advertising, help, or education!</p>
<iframe id="newsletteriframe" width="450" height="250" style="border:1px solid #EEE; background:black; max-width:90%" frameborder="0" scrolling="no"></iframe>
<div id="newsletterFrame">Be notified when Sandboxels and other R74n projects are updated, along with ramblings from the developer!<br><br>
<form action="https://news.r74n.com/api/v1/free?nojs=true" method="post" class="form _form_1mxvn_6" novalidate="" target="_blank"><input type="hidden" name="first_url" value="https://news.r74n.com/embed"><input type="hidden" name="first_referrer"><input type="hidden" name="current_url" value="https://news.r74n.com/embed"><input type="hidden" name="current_referrer"><input type="hidden" name="referral_code"><input type="hidden" name="source" value="embed"><input type="hidden" name="referring_pub_id"><input type="hidden" name="additional_referring_pub_ids">
<input type="email" placeholder="Type your email..." name="email" style="padding:15px"><input type="submit" value="Subscribe" style="background: rgb(23, 166, 255); padding:15px; border-radius: 20px"></input>
</div>
<style>
#newsletterFrame {
max-width: 600px;
margin: auto;
padding: 5px;
padding-top: 15px;
padding-bottom: 15px;
border: white solid 2px;
}
</style>
<!-- <iframe id="newsletteriframe" width="450" height="250" style="border:1px solid #EEE; background:black; max-width:90%" frameborder="0" scrolling="no"></iframe>
<script>
window.addEventListener('load', function() {
document.getElementById("newsletteriframe").src = "https://news.r74n.com/embed";
@ -16231,7 +16249,7 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span> <input type="button" value="O
document.getElementById("langCredit").style.display = "block";
}
})
</script>
</script> -->
<p>Support development by subscribing on <a href="https://www.patreon.com/R74n" rel="me" target="_blank">our Patreon</a>! Many benefits!!</p>
</div>

View File

@ -167,7 +167,7 @@
"clay":"agyag",
"clay_soil":"agyagos_talaj",
"brick":"tégla",
"ruins":"romok",
"ruins":"romos_tégla",
"porcelain":"porcelán",
"sapling":"csemete",
"pinecone":"toboz",
@ -452,7 +452,7 @@
"nuke":"atombomba",
"h_bomb":"hidrogénbomba",
"dirty_bomb":"piszkos_bomba",
"emp_bomb":"EMI-bomba",
"emp_bomb":"EMP-bomba",
"nitro":"nitroglicerin",
"greek_fire":"görögtűz",
"fireball":"tűzgolyó",

View File

@ -523,21 +523,21 @@
"molten_potassium_salt":"stopiona_sól_potasowa",
"molten_sodium_acetate":"stopiony_octan_sodu",
"frozen_nitro":"zamrożona_nitrogliceryna",
"cured_meat": "",
"cured_meat": "wędzone_mięso",
"nut_oil": "olej z orzechów",
"grease": "",
"grease": "smar",
"fat": "tłuszcz",
"potassium": "potas",
"molten_potassium": "roztopiony_potas",
"magnesium": "",
"molten_magnesium": "",
"magnesium": "magnez",
"molten_magnesium": "stopiony_magnez",
"sandstorm": "burza_piaskowa",
"caustic_potash": "",
"antibomb": "",
"antibomb": "antybomba",
"tornado": "tornado",
"earthquake": "trzęsienie_ziemi",
"tsunami": "tsunami",
"blaster": "promień",
"propane_ice": "",
"propane_ice": "lód_propanowy",
"molten_caustic_potash": ""
}

File diff suppressed because it is too large Load Diff

View File

@ -110,6 +110,7 @@
<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>Adds back FOOLS Mode</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>fools24.js</td><td>Adds back the 2024 Multiversal Update (v5.9.1)</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>smooth_water.js</td><td>Changes water mechanics so that it flows in one direction until it bounces off of something</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>spring.js</td><td>Many nature elements, like sakura trees, butterflies, beehives, and more</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
<tr><td>survival.js</td><td>With limited resources, you must craft, sell, and buy to progress</td><td><a href="https://R74n.com" class="R74nLink">R74n</a></td></tr>
@ -153,6 +154,7 @@
<!----><tr><td class="modCat" colspan="3">Science & Chemistry</td></tr><!---->
<tr><td>alcohol.js</td><td>Adds methanol, (iso-)propanol, and butanol</td><td>Alice</td></tr>
<tr><td>alkahest.js</td><td>Adds the alkahest, a liquid which dissolves anything</td><td>Alice</td></tr>
<tr><td>aScientistsWish.js</td><td>Adds things that related to science, especially radiation</td><td>Carbon Monoxide, CPU</td></tr>
<tr><td>bigger_star_spawners.js</td><td>Adds spawners for larger stars</td><td>Alice</td></tr>
<tr><td>bioooze_and_pyrogens.js</td><td>Adds Bio-Ooze from <a herf="https://frackinuniverse.miraheze.org/wiki/Main_Page">Frackin Universe</a> and several heat-producing materials from various games mods</td><td>Alice</td></tr>
<tr><td>boiling_things.js</td><td>Allows for various elements to be vaporized</td><td>Alice</td></tr>
@ -178,6 +180,7 @@
<tr><td>Neutronium Mod.js</td><td>Variety of scientific elements<br>Explosions</td><td>StellarX20</td></tr>
<tr><td>neutronium_compressor.js</td><td>Adds a compressor (in reference to Minecrafts Avaritia mod) that compresses 10,000 pixels of an element into a “singularity”</td><td>Alice</td></tr>
<tr><td>noblegas.js</td><td>Adds the missing noble gases</td><td>nousernamefound</td></tr>
<tr><td>radioactive.js</td><td>Adds every radioactive elements on the periodic table (WIP)</td><td>kaeud</td></tr>
<tr><td>random_rocks.js</td><td>Randomly generates rocks on game load</td><td>Alice</td></tr>
<tr><td>roseyiede.js</td><td>Adds several variants of a substance called roseyiede</td><td>Alice</td></tr>
<tr><td>some_tf_liquids.js</td><td>Adds various liquids from the Thermal Foundation Minecraft mod</td><td>Alice</td></tr>
@ -196,13 +199,13 @@
<tr><td>nousersthings.js</td><td>Destroyable machines, pipe variants, filters, and more</td><td>nousernamefound</td></tr>
<tr><td>portal.js</td><td>Adds portals that can teleport pixels</td><td>Alice</td></tr>
<tr><td>pushers.js</td><td>Adds pixels that push elements away from them</td><td>Alice</td></tr>
<tr><td>spouts.js</td><td>Adds spouts for all liquids</td><td>Alice</td></tr>
<tr><td>spouts.js</td><td>Adds spouts for all liquids</td><td>kaeud</td></tr>
<tr><td>state_voids.js</td><td>Adds several elements that each delete a specific state of matter (and combinations thereof)</td><td>Alice</td></tr>
<tr><td>switches.js</td><td>Adds electrical switches that can be toggled</td><td>Alice</td></tr>
<tr><td>ticking_temp_stuff.js</td><td>Adds more heaters and coolers</td><td>Alice</td></tr>
<tr><td>video.js</td><td>Adds a video player</td><td>ggod</td></tr>
<tr><td>waterspout.js</td><td>Adds back the old Water Spout</td><td>mollthecoder</td></tr>
<tr><td>WhisperingTheory.js</td><td>Add powder and gas variant of heater and cooler</td><td>kaeud</td></tr>
<tr><td>WhisperingTheory.js</td><td>Adds many more variants of heater and cooler</td><td>kaeud</td></tr>
<!----><tr><td class="modCat" colspan="3">Weapons</td></tr><!---->
<tr><td>aircrafts.js</td><td>Adds aircraft and aircraft part pixels</td><td>Jayd</td></tr>
@ -215,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 food and animals</td><td>SquareScreamYT and RealerRaddler</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>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>
@ -227,7 +230,6 @@
<tr><td>weAllScreamFor.js</td><td>Adds ice cream toppings</td><td>rottenEgghead</td></tr>
<!----><tr><td class="modCat" colspan="3">Life & Nature</td></tr><!---->
<tr><td>aChefsDream.js</td><td>Adds more food and animals</td><td>SquareScreamYT and RealerRaddler</td></tr>
<tr><td>advanced_colonies.js</td><td>Adds davlers, creatures with complex colonies</td><td>DaviStudios</td></tr>
<tr><td>apioforms_pre.js</td><td>An incomplete implementation of elements from the <a href="https://osmarks.net/apioform/">Apioform Game</a></td><td>Alice</td></tr>
<tr><td>bacteria_mod.js</td><td>Adds content from the <a href="https://www.curseforge.com/minecraft/mc-mods/bacterium">Bacterium Mod</a>: (Bacteria, Replacer B., Jammer Block)</td><td>Alice</td></tr>
@ -244,12 +246,13 @@
<tr><td>fwibblen.js</td><td>Adds a flying creature that turns nickel into itself, and a second creature that does the same to the first one</td><td>Alice</td></tr>
<tr><td>human_edit.js</td><td>Improvements to humans</td><td>Alice</td></tr>
<tr><td>kopalstuff.js</td><td>Adds creatures, spirits, DNA, foods, and more</td><td>DaviStudios</td></tr>
<tr><td>lost_souls.js</td><td>Adds souls and related elements, the mod can also be found <a href="url">https://github.com/HACKERPRO908/lost_souls.js</a></td><td>pixelegend4, SquareScreamYT, salmonfishy</td></tr>
<tr><td>lost_souls.js</td><td>Adds souls and related elements, the mod can also be found <a href="https://github.com/HACKERPRO908/lost_souls.js">on Github</a></td><td>pixelegend4, SquareScreamYT, salmonfishy</td></tr>
<tr><td>miscible_psoup_and_birthpool.js</td><td>Makes Primordial Soup and Birthpool mix instead of the birthpool settling to the bottom. Will be deprecated upon the release of Magical Menagerie</td><td>Alice</td></tr>
<tr><td>mobs.js</td><td>Adds Creepers, Zombies, and Skeletons</td><td>Alice</td></tr>
<tr><td>nocancer.js</td><td>Removes cancer from the game one tick after it is created</td><td>mollthecoder</td></tr>
<tr><td>nocancer2.js</td><td>Removes cancer from the game altogether. May be incompatible with other mods that spawn cancer</td><td>mollthecoder</td></tr>
<tr><td>nograssgrow.js</td><td>Prevents Grass from growing</td><td>mollthecoder</td></tr>
<tr><td>ocean.js</td><td>Adds many Marine life</td><td>SquareScreamYT</td></tr>
<tr><td>pizzasstuff.js</td><td>New animals, foods, and plants</td><td>_ilikepizza_</td></tr>
<tr><td>plants.js</td><td>Adds a wide variety of new plants and fruits</td><td>Adora</td></tr>
<tr><td>primordial_birthpool.js</td><td>A cross between Primordial Soup and Birthpool. Requires F&M</td><td>Alice</td></tr>
@ -266,6 +269,7 @@
<tr><td>citybuilding.js</td><td>Adds seeds that create miniature buildings and other city-related items</td><td>SquareScreamYT</td></tr>
<tr><td>collab_mod.js</td><td>Created by multiple people, adds random things</td><td>mrapple, ilikepizza, stefanblox</td></tr>
<tr><td>elem3.js</td><td>Adds all elements and combinations from Elemental 3 [Very Large]</td><td>Sophie</td></tr>
<tr><td>fools+.js</td><td>improves and makes fools.js EXTREMELY annoying.</td><td>SquareScreamYT</td></tr>
<tr><td>funny elements 2022-11-15.js</td><td>Adds a few curated randomly-generated elements</td><td>Alice</td></tr>
<tr><td>funny_solid.js</td><td>Adds feces</td><td>Alice</td></tr>
<tr><td>haseulite.js</td><td>Adds Loona-related materials with various properties</td><td>Alice</td></tr>
@ -283,6 +287,7 @@
<tr><td>sus.js</td><td>Adds an Among Us crewmate</td><td>Nv7</td></tr>
<tr><td>triggerable_random_powders.js</td><td>Adds powders with different abilities, such as heating and cooling</td><td>Alice</td></tr>
<tr><td>troll.js</td><td>Adds various dumb elements that iterate randomly on the entire screen</td><td>Alice</td></tr>
<tr><td>WhisperingTheory.js</td><td>Adds powder and gas variant of heater and cooler</td><td>kaeud</td></tr>
<!----><tr><td class="modCat" colspan="3">Visual Effects</td></tr><!---->
<tr><td>acid_and_shapes.js</td><td>Weird visual effects. Enable in Settings</td><td>Alice</td></tr>

53
mods/10kelements.js Normal file
View File

@ -0,0 +1,53 @@
var color = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e","f"]
var states = ["solid", "liquid", "gas"]
var total = 0
var dangerouselements = ["supernova", "n_explosion", "pn_explosion", "armageddon", "nuke", "h_bomb"]
var elementslist = []
for (elementi in elements){
elementslist.push(elementi)
}
function randomIntFromInterval(min, max) { // min and max included
return Math.floor(Math.random() * (max - min + 1) + min)
}
var randomProperty = function (obj) {
var keys = Object.keys(obj);
return obj[keys[ keys.length* Math.random() << 0]];
};
for (var i = 1; i <= 10000; i++){
var f = Math.random() < 0.2
var co = Math.random() < 0.2
elements["element_"+i] = {
color: "#" + color[Math.floor(Math.random()*color.length)] + color[Math.floor(Math.random()*color.length)] + color[Math.floor(Math.random()*color.length)] + color[Math.floor(Math.random()*color.length)] + color[Math.floor(Math.random()*color.length)] + color[Math.floor(Math.random()*color.length)],
category: "random",
behavior: randomProperty(behaviors),
state: states[Math.floor(Math.random()*states.length)],
reactions: {},
density: randomIntFromInterval(1, 10000)
}
total = i
if (f){
elements["element_"+i].tempHigh = 20 + randomIntFromInterval(10, 6000)
elements["element_"+i].stateHigh = elementslist[Math.floor(Math.random()*elementslist.length)]
}
if (co){
elements["element_"+i].tempLow = 20 - randomIntFromInterval(10, 270)
elements["element_"+i].stateLow = elementslist[Math.floor(Math.random()*elementslist.length)]
}
for (r = 0; r < 10; r++){
elements["element_"+i].reactions[elementslist[Math.floor(Math.random()*elementslist.length)]] = { elem1: elementslist[Math.floor(Math.random()*elementslist.length)], elem2: elementslist[Math.floor(Math.random()*elementslist.length)]}
}
// console.log(i + " is done!")
// console.log(i)
// console.log(elements["element_"+i].behavior)
if (elements["element_" + i].density == i){
console.log(i + "is unique because its density is the same as its id!")
}
for (var reaction in elements["element_" + i].reactions){
if (dangerouselements.includes(elements["element_" + i].reactions[reaction].elem1)|| dangerouselements.includes(elements["element_" + i].reactions[reaction].elem2)){
console.log(i + " is scary due to its reaction with " + reaction)
if (!elements["element_"+i].desc){
elements["element_" + i].desc = "This is scary! Don't let it touch " + reaction
}else(elements["element_"+i].desc += (" or " + reaction))
}
}
}

View File

@ -1,24 +1,25 @@
// this is a epic mod
let heatSen = null;
heatSen = null;
elements.heatSensor = {
color: "#ff0000",
conduct: 1,
conduct: 0.1,
category:"test",
behavior: behaviors.WALL,
onSelect: function(pixel){
setTemp = parseInt(prompt("Enter the temperature you want it to sense. zero will not work", (heatSen || undefined)));
heatSen = prompt("Enter the temperature you want it to sense" );
},
tick: function(pixel) {
if (pixel.temp >= heatSen ) {
pixel.charge = 1;
}
@ -26,15 +27,13 @@ elements.heatSensor = {
};
let itemA = "steam";
elements.SteamTurbine = {
behavior: behaviors.WALL,
desc: "When steam touches it, it conducts electricity and the steam pixel is deleted",
color: "#826c6e",
color: "#826c6e",
tick: function(pixel) {
if(pixel.start == pixelTicks){
pixel.clone = itemA;
}
for (var i = 0; i < adjacentCoords.length; i++) {
var coords = adjacentCoords[i];
@ -42,7 +41,7 @@ elements.SteamTurbine = {
var y = pixel.y + coords[1];
if (!isEmpty(x,y,true)) {
var sensed = pixelMap[x][y];
if (sensed.element == pixel.clone) {
if (sensed.element == 'steam' ||sensed.element == 'rad_steam' ) {
deletePixel(x,y);
pixel.charge = 5;
break;
@ -131,15 +130,13 @@ elements.gasoline = {
stain: -0.25,
}
let itemB = "light";
elements.solar_panel = {
behavior: behaviors.WALL,
desc: "When light touches it, it conducts electricity and the light pixel is deleted",
color: "#bebfa3",
tick: function(pixel) {
if(pixel.start == pixelTicks){
pixel.clone = itemB;
}
for (var i = 0; i < adjacentCoords.length; i++) {
var coords = adjacentCoords[i];
@ -147,7 +144,7 @@ elements.solar_panel = {
var y = pixel.y + coords[1];
if (!isEmpty(x,y,true)) {
var sensed = pixelMap[x][y];
if (sensed.element == pixel.clone) {
if (sensed.element == 'light') {
deletePixel(x,y);
pixel.charge = 5;
break;
@ -367,9 +364,10 @@ elements.Android = {
elements.AndroidBody = {
color: ["#a1ada5","#ebf5ee","#bac2bc","#848a86","#505251"],
category: "life",
breakInto: ["oil","metal_scrap","explosion"],
breakInto: ["oil","metal_scrap","pop"],
properties: {
dead: false,
dir: 1,
@ -395,7 +393,7 @@ elements.AndroidBody = {
if (pixel.dead) {
// Turn into rotten_meat if pixelTicks-dead > 500
if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) {
changePixel(pixel,"rotten_meat");
changePixel(pixel,"rust");
}
return
}
@ -465,7 +463,7 @@ elements.AndroidHead = {
state: "solid",
conduct: .05,
temp: 69,
breakInto: ["oil","metal_scrap","explosion"],
breakInto: ["oil","metal_scrap","pop"],
};
listPipes = "pipe"
@ -506,71 +504,10 @@ elements.ajustableHeater = {
insulate:true
};
//old grinder
// elements.grinder = {
// color: ["#a1ada5","#ebf5ee","#bac2bc","#848a86","#505251"],
// category: "machines",
// density: 1080,
// state: "solid",
// conduct: 1,
// movable: false,
// ignore: "grinder",
// tick: function(pixel) {
// for (var i = 0; i < adjacentCoords.length; i++) {
// var coords = adjacentCoords[i];
// var x = pixel.x + coords[0];
// var y = pixel.y + coords[1];
// if (!isEmpty(x,y,true)) {
// var sensed = pixelMap[x][y];
// if (sensed.con || elements[sensed.element].movable && pixel.charge > 0) {
// breakPixel(sensed);
// }
// }
// }
// doDefaults(pixel);
// },
// insulate:true
// };
elements.dead_plant.conduct = 1;
// let compact = "dead_plant";
// elements.compacter = {
// behavior: behaviors.WALL,
// color: "#bebfa3",
// tick: function(pixel) {
// if(pixel.start == pixelTicks){
// pixel.clone = compact;
// }
// for (var i = 0; i < adjacentCoords.length; i++) {
// var coords = adjacentCoords[i];
// var x = pixel.x + coords[0];
// var y = pixel.y + coords[1];
// if (!isEmpty(x,y,true)) {
// var sensed = pixelMap[x][y];
// if (sensed.element == pixel.clone && pixel.charge > 0) {
// sensed.element = "coal"
// sensed.color = elements.coal.color
// break;
// }
// }
// }
// doDefaults(pixel);
// },
// conduct: 1,
// movable: false,
// category:"machines",
// darkText: true,
// hardness: 1,
// }
compactPi = "dead_plant";
compactPi2 = "coal";
elements.compacter = {
@ -703,60 +640,66 @@ elements.compacter = {
// thx to nousersthings mod for the filter
// only adding this bc my freind told me so
// im not good at javascript and coding so yeah
// new and improved version which is not 100% copied from nouser but only about 5-10%
filterTypeVar = 0;
elements.filter = {
color: "#599fc2",
desc: "A filter made by nouser",
onSelect: function() {
logMessage("Needs to be 1 pixel thick");
var answer4 = prompt("Please input the desired element of this filter. It is case senstive.",(filterTypeVar||undefined));
if (!answer4) { return }
filterTypeVar = answer4;
},
color: "#414c4f",
tick: function(pixel) {
if (pixel.start === pixelTicks) {
pixel.filterType = filterTypeVar
}
if (1 === 2) {
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)) {
// createPixel("brick",x,y);
// pixelMap[x][y].color = pixelColorPick(pixel,"#808080");
}
}
// pixel.stage = 1;
}
else if (1 === 2) { //uninitialized
for (var i = 0; i < adjacentCoords.length; i++) {
var coord = adjacentCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (isEmpty(x,y)) {
// pixel.stage = 2; //blue
// pixel.color = pixelColorPick(pixel,"#000036");
break;
}
}
}
else if (1 === 1) { //initialized
if (!pixel.stage && pixelTicks-pixel.start > 60) {
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) && listPipes.includes(pixelMap[x][y].element)) {
// delete this bc it makes the pipe walls
// if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
// deletePixel(x,y)
// }
// if (isEmpty(x,y)) {
// createPixel("pipe_wall",x,y);
// }
}
pixel.stage = 2;
}
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
for (var i = 0; i < adjacentCoords.length; i++) {
var coord = adjacentCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
pixel.stage = 2;
// this makes the thing blue and keep pixel.stage = 2 cuz without it it breaks the code
// if (isEmpty(x,y)) {
// pixel.stage = 2; //blue
// pixel.color = pixelColorPick(pixel,"#000036");
// break;
// }
}
}
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
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) && pixelMap[x][y].element === "pipe") {
var newPixel = pixelMap[x][y];
if (newPixel.stage === 1) {
var newColor;
switch (pixel.stage) {
// case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
// case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
// case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
}
// newPixel.color = pixelColorPick(newPixel,newColor);
newPixel.color = pixelColorPick(newPixel,newColor);
}
}
}
@ -768,14 +711,12 @@ elements.filter = {
var y = pixel.y+coord[1];
if (!isEmpty(x,y,true)) {
var newPixel = pixelMap[x][y];
if (listPipes.includes(newPixel.element)) {
if (newPixel.element === "pipe") {
var nextStage;
switch (pixel.stage) {
// case 2: nextStage = 4; break; //green
// case 3: nextStage = 2; break; //red
// case 4: nextStage = 3; break; //blue
}
if (pixel.con && !newPixel.con) { //transfer to adjacent pipe
if (pixel.con && !newPixel.con && newPixel.stage === nextStage) { //transfer to jacent pipe
newPixel.con = pixel.con;
newPixel.con.x = newPixel.x;
newPixel.con.y = newPixel.y;
@ -784,18 +725,14 @@ elements.filter = {
break;
}
}
else if (!pixel.con ) { //suck up pixel
if (newPixel.element == pixel.filterType ) {
else if (!pixel.con && elements[newPixel.element].movable && newPixel.element == filterTypeVar) { //suck up pixel
pixel.con = newPixel;
deletePixel(newPixel.x,newPixel.y);
pixel.con.x = pixel.x;
pixel.con.y = pixel.y;
pixel.con.del;
moved = true;
break;
}
}
}
}
@ -804,7 +741,7 @@ elements.filter = {
var coord = squareCoordsShuffle[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (isEmpty(x,y)) {
if (isEmpty(x,y)) {
delete pixel.con.del;
pixel.con.x = x;
pixel.con.y = y;
@ -813,9 +750,9 @@ elements.filter = {
pixel.con = null;
break;
}
if (!isEmpty(x,y,true) && listPipes.includes(pixelMap[x][y].element)) {
if (!isEmpty(x,y,true) && pixelMap[x][y].element === "pipe") {
var newPixel = pixelMap[x][y];
if (pixel.con && !newPixel.con) {
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
newPixel.con = pixel.con;
newPixel.con.x = newPixel.x;
newPixel.con.y = newPixel.y;
@ -831,8 +768,6 @@ elements.filter = {
category: "machines",
movable: false,
canContain: true,
noMix: true,
insulate: true,
}
filterTypeVar2 = 0;
@ -926,11 +861,7 @@ elements.Destructive_Filter = {
moved = true;
break;
}
else if(!(newPixel.element == "filter") && !(newPixel.element == "Destructive_Filter") && !doNotEF.includes(newPixel.element) ) {
deletePixel(newPixel.x, newPixel.y);
break;
}
}
}
}
@ -1256,6 +1187,7 @@ elements.Acid_Bomb = {
}
elements.E_Spout = {
name: "E-Spout",
color: "#606378",
behavior: behaviors.WALL,
behaviorOn: [
@ -1269,7 +1201,6 @@ elements.E_Spout = {
conduct: 1,
}
elements.DestroyableWire = {
color: "#4d0a03",
behavior: behaviors.WALL,
@ -1356,54 +1287,6 @@ elements.pusherRight = {
},
category: "tools",
};
elements.missile = {
behavior: behaviors.WALL,
maxSize: 1,
properties: {
luanched : false,
},
ignore: "pushTest",
tick: function(pixel) {
for (var i = 0; i < adjacentCoords.length; i++) {
var coords = adjacentCoords[i];
var x = pixel.x + coords[0];
var y = pixel.y + coords[1];
if (!isEmpty(x,y,true)) {
let sensed = pixelMap[x][y];
if (!(sensed.element == "missile") && sensed.element && !(sensed.element == "fire") && !(sensed.element == "smoke") && pixel.luanched == true || pixel.y ==1 ||outOfBounds(pixel.x,pixel.y) ) {
explodeAt(x, y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
explodeAt(x, y, 5, "molten_metal_scrap");
deletePixel(pixel.x,pixel.y);
}
} else if(pixel.temp >= 100) {
pixel.luanched = true;
pixel.clone = "fire";
var newX = pixel.x ;
var newY = pixel.y - 0.5;
let test = createPixel("fire",pixel.x,pixel.y+2);
tryMove(pixel,newX,newY,test);
}
}
doDefaults(pixel);
},
conduct: 1,
movable: true,
category:"weapons",
darkText: true,
hardness: 1,
}
elements.NewWater = {
color: elements.water.color,
behavior : behaviors.LIQUID,
@ -1645,78 +1528,209 @@ elements.guided_missile = {
},
properties: {
luanched : false,
speed :1,
speed :2,
AtY : false,
},
tick: function(pixel) {
if(pixel.start == pixelTicks){
if(pixel.temp >= 100) {
pixel.luanched = true;
pixel.clone = "fire";
var newX = pixel.x ;
var newY = pixel.y - pixel.speed;
}
for (var i = 0; i < adjacentCoords.length; i++) {
var coords = adjacentCoords[i];
var x = pixel.x + coords[0];
var y = pixel.y + coords[1];
if (!isEmpty(x,y,true)) {
let sensed = pixelMap[x][y];
if (!(sensed.element == "missile") &&!(sensed.element == "guided_missile") && sensed.element && !(sensed.element == "fire") && !(sensed.element == "smoke") && pixel.luanched == true || pixel.y ==1 ||outOfBounds(pixel.x,pixel.y)) {
explodeAt(x, y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
explodeAt(x, y, 5, "molten_metal_scrap");
deletePixel(pixel.x,pixel.y);
}
} else if(pixel.temp >= 100) {
pixel.luanched = true;
pixel.clone = "fire";
var newX = pixel.x ;
var newY = pixel.y - pixel.speed;
if (!(pixel.y == tarY) && pixel.y > tarY ) {
let test = createPixel("fire",pixel.x,pixel.y+2);
tryMove(pixel,newX,newY,test);
pixel.AtY = true;
}
else if(!(pixel.y == tarY) && pixel.y < tarY ){
let test = createPixel("fire",pixel.x,pixel.y-2);
tryMove(pixel,pixel.x,pixel.y + pixel.speed,test);
pixel.AtY = true;
if (!(pixel.y == tarY) && pixel.y > tarY ) {
if((!tarY-pixel.y === 1) || (!tarY-pixel.y === -1)) {
let test = createPixel("fire",pixel.x,pixel.y+3);
if(isEmpty(newX,newY)) {
tryMove(pixel,newX,newY,);
} else {
explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
}
else if(pixel.AtY = true) {
if(pixel.x > tarX) {
let test = createPixel("fire",pixel.x,pixel.y);
tryMove(pixel,pixel.x-pixel.speed,pixel.y,test);
deletePixel(pixel.x,pixel.y);
}
pixel.AtY = true;
} else {
pixel.speed = 1;
let test = createPixel("fire",pixel.x,pixel.y+3);
if(isEmpty(newX,newY)) {
tryMove(pixel,newX,newY,);
} else {
explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y);
}
//pixel.AtY = true;
}
}
else if(!(pixel.y == tarY) && pixel.y < tarY ){
if((!tarY-pixel.y === 1) || (!tarY-pixel.y === -1)) {
let test = createPixel("fire",pixel.x,pixel.y-3);
if(isEmpty(pixel.x,pixel.y+pixel.speed)) {
tryMove(pixel,pixel.x,pixel.y + pixel.speed,);
} else {
explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y);
}
else if(pixel.x < tarX) {
let test = createPixel("fire",pixel.x,pixel.y);
tryMove(pixel,pixel.x+pixel.speed,pixel.y,test);
pixel.AtY = true;
} else {
pixel.speed = 1;
let test = createPixel("fire",pixel.x,pixel.y-3);
if(isEmpty(pixel.x,pixel.y+pixel.speed)) {
tryMove(pixel,pixel.x,pixel.y - pixel.speed,);
} else {
explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y);
}
else if (pixel.x == tarX){
explodeAt(x, y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
explodeAt(x, y, 5, "molten_metal_scrap");
deletePixel(pixel.x,pixel.y);
}
//pixel.AtY = true;
}
}
}
else if(pixel.AtY = true) {
if(pixel.x > tarX) {
pixel.speed = 2;
let test = createPixel("fire",pixel.x,pixel.y);
if(isEmpty(pixel.x-1,pixel.y)) {
tryMove(pixel,pixel.x-pixel.speed,pixel.y,test);
} else {
explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y);
}
}
else if(pixel.x < tarX) {
pixel.speed = 2;
let test = createPixel("fire",pixel.x,pixel.y);
if(isEmpty(pixel.x+2,pixel.y)) {
tryMove(pixel,pixel.x+pixel.speed,pixel.y,test );
} else {
explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y);
}
}
else if (pixel.x == tarX){
explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y);
}
if(tarX-pixel.x == 1 || tarX-pixel.x == -1) {
explodeAt(pixel.x, pixel.y, 13, ["fire","fire","plasma","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y);
}
}
}
doDefaults(pixel);
}
},
conduct: 1,
movable: true,
category:"test",
darkText: true,
hardness: 1,
}
elements.room_temp.category = "tools"
elements.uncharge.category = "tools"
elements.unburn.category = "tools"
textures.Reniforced_Titanuim = {
REINFORCEDTITANIUM: [
"GiGgggGiGGg",
"gggGGGGgggg",
"iiiiiiiiiii",
"GgGGggggGGg",
"GggGGgggGGg",
"igGGGgggggi",
"GggggggGGGG",
"GggGGgggggg",
"Ggggggggggg",
"ggggggGGggg",
"Ggggggggggg",
"iiiiiiiiiii",],
}
elements.Reniforced_Titanuim = {
color: "#787878",
colorPattern: textures.Reniforced_Titanuim.REINFORCEDTITANIUM,
colorKey: {
"g": "#787878",
"G": "#606060",
"i": "#332f2f"},
behavior: behaviors.WALL,
tempHigh: 4000,
stateHigh : "molten_titanium",
category: "solids",
state: "solid",
density: 5000,
hardness:1,
noMix: true
}
elements.Missile_Up = {
maxSize: 1,
properties: {
luanched : false,
},
tick: function(pixel) {
if(pixel.temp >= 100) {
pixel.luanched = true;
if(isEmpty(pixel.x,pixel.y-1) ) {
let exguast = createPixel("fire",pixel.x,pixel.y + 3)
tryMove(pixel,pixel.x,pixel.y-2,);
} else if(!isEmpty(pixel.x, pixel.y-1)) {
explodeAt(pixel.x,pixel.y, 13 ,["fire","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y)
if(!(pixelMap[pixel.x][pixel.y-1] == "Missile_Down") || !(pixelMap[pixel.x][pixel.y-1] == "fire") ) {
explodeAt(pixel.x,pixel.y, 13 ,["fire","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y)
}
}
}
},
conduct: 1,
movable: true,
category:"weapons",
@ -1726,7 +1740,286 @@ elements.guided_missile = {
}
elements.room_temp.category = "tools"
elements.uncharge.category = "tools"
elements.unburn.category = "tools"
elements.Missile_Down = {
maxSize: 1,
properties: {
luanched : false,
},
tick: function(pixel) {
if(pixel.temp >= 100) {
pixel.luanched = true;
if(isEmpty(pixel.x,pixel.y+2) ) {
let exguast = createPixel("fire",pixel.x,pixel.y - 3)
tryMove(pixel,pixel.x,pixel.y+2,);
} else if(!isEmpty(pixel.x, pixel.y+1)) {
explodeAt(pixel.x,pixel.y, 13 ,["fire","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y)
if(!(pixelMap[pixel.x][pixel.y+1] == "Missile_Down") || !(pixelMap[pixel.x][pixel.y-1] == "fire") ) {
explodeAt(pixel.x,pixel.y, 13 ,["fire","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y)
}
}
}
},
conduct: 1,
movable: true,
category:"weapons",
darkText: true,
hardness: 1,
}
elements.Missile_Left = {
maxSize: 1,
properties: {
luanched : false,
},
tick: function(pixel) {
if(pixel.temp >= 100) {
pixel.luanched = true;
if(isEmpty(pixel.x-1,pixel.y) ) {
let exguast = createPixel("fire",pixel.x+3,pixel.y)
tryMove(pixel,pixel.x-2,pixel.y);
} else if( !isEmpty(pixel.x-1, pixel.y) && !isEmpty(pixel.x-2, pixel.y) && !outOfBounds(pixel.x-1,pixel.y) && !outOfBounds(pixel.x-2,pixel.y) ) {
explodeAt(pixel.x,pixel.y, 13 ,["fire","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y)
if(!(pixelMap[pixel.x-1][pixel.y] == "Missile_Down") || !(pixelMap[pixel.x][pixel.y-1] == "fire") ) {
explodeAt(pixel.x,pixel.y, 13 ,["fire","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y)
}
}
}
},
conduct: 1,
movable: true,
category:"weapons",
darkText: true,
hardness: 1,
}
elements.Missile_Right = {
maxSize: 1,
properties: {
luanched : false,
},
tick: function(pixel) {
if(pixel.temp >= 100) {
pixel.luanched = true;
if(isEmpty(pixel.x+1,pixel.y) ) {
let exguast = createPixel("fire",pixel.x-3,pixel.y)
tryMove(pixel,pixel.x+2,pixel.y);
} else if( !isEmpty(pixel.x+1, pixel.y) && !isEmpty(pixel.x+2, pixel.y) && !outOfBounds(pixel.x+1,pixel.y) && !outOfBounds(pixel.x+2,pixel.y) ) {
explodeAt(pixel.x,pixel.y, 13 ,["fire","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y)
if(!(pixelMap[pixel.x+1][pixel.y] == "Missile_Down") || !(pixelMap[pixel.x][pixel.y+1] == "fire") ) {
explodeAt(pixel.x,pixel.y, 13 ,["fire","plasma","plasma","plasma"]);
deletePixel(pixel.x,pixel.y)
}
}
}
},
conduct: 1,
movable: true,
category:"weapons",
darkText: true,
hardness: 1,
}
elements.pancho = {
tempHigh: 300,
stateHigh: "steam",
color: ["#bd8e0d","#0ec930","#ff0000","#fcf800"],
singleColor: true,
behavior: behaviors.STURDYPOWDER,
category: "food",
state: "liquid"
};
//imma finnish rest later
elements.pesticide = {
category: "test",
state: "liquid",
color: elements.plant.color,
behavior:behaviors.LIQUID,
reactions : {
"plant": { elem1: "dead_plant" },
"algae": { elem1: "dead_plant" },
"cactus": { elem1: "dead_plant" },
"hive": { elem1: "dead_plant" },
"sapling": { elem1: "dead_plant" },
"pinecone": { elem1: "dead_plant" },
"evergreen": { elem1: "dead_plant" },
"hyphae": { elem1: "dead_plant" },
"petal": { elem1: "dead_plant" },
"pistil": { elem1: "dead_plant" },
"tree_branch": { elem1: "wood" },
}
}
elements.uranium_particles = {
color: ["#599e61","#364d3c","#494d4a","#6c8a42","#798d65","#b5e089"],
tick: behaviors.BOUNCY,
reactions: {
"uranium_particles": { elem1:null, elem2:"supernova", chance:0.000001}
},
category: "???????",
}
elements.air_filter = {
color: "#414c4f",
tick: function(pixel) {
if (!pixel.stage && pixelTicks-pixel.start > 60) {
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
// delete this bc it makes the pipe walls
// if (!isEmpty(x,y,true) && elements[pixelMap[x][y].element].movable) {
// deletePixel(x,y)
// }
// if (isEmpty(x,y)) {
// createPixel("pipe_wall",x,y);
// }
}
pixel.stage = 2;
}
else if (pixel.stage === 1 && pixelTicks-pixel.start > 70) { //uninitialized
for (var i = 0; i < adjacentCoords.length; i++) {
var coord = adjacentCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
pixel.stage = 2;
// this makes the thing blue and keep pixel.stage = 2 cuz without it it breaks the code
// if (isEmpty(x,y)) {
// pixel.stage = 2; //blue
// pixel.color = pixelColorPick(pixel,"#000036");
// break;
// }
}
}
else if (pixel.stage > 1 && pixelTicks % 3 === pixel.stage-2) { //initialized
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) && pixelMap[x][y].element === "pipe") {
var newPixel = pixelMap[x][y];
if (newPixel.stage === 1) {
var newColor;
switch (pixel.stage) {
case 2: newPixel.stage = 3; newColor = "#003600"; break; //green
case 3: newPixel.stage = 4; newColor = "#360000"; break; //red
case 4: newPixel.stage = 2; newColor = "#000036"; break; //blue
}
newPixel.color = pixelColorPick(newPixel,newColor);
}
}
}
var moved = false;
shuffleArray(squareCoordsShuffle);
for (var i = 0; i < squareCoordsShuffle.length; i++) {
var coord = squareCoordsShuffle[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (!isEmpty(x,y,true)) {
var newPixel = pixelMap[x][y];
if (newPixel.element === "pipe") {
var nextStage;
switch (pixel.stage) {
}
if (pixel.con && !newPixel.con && newPixel.stage === nextStage) { //transfer to jacent pipe
newPixel.con = pixel.con;
newPixel.con.x = newPixel.x;
newPixel.con.y = newPixel.y;
pixel.con = null;
moved = true;
break;
}
}
else if (!pixel.con && (newPixel.element == "smoke" || newPixel.element == "carbon_dioxide" || newPixel.element == "smog" || newPixel.element == "rad_steam" || newPixel.element == "oxygen" )) { //suck up pixel
changePixel(newPixel,"oxygen");
pixel.con = newPixel;
deletePixel(newPixel.x,newPixel.y);
pixel.con.x = pixel.x;
pixel.con.y = pixel.y;
pixel.con.del;
moved = true;
break;
}
}
}
if (pixel.con && !moved) { // move to same stage if none other
for (var i = 0; i < squareCoordsShuffle.length; i++) {
var coord = squareCoordsShuffle[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (isEmpty(x,y)) {
delete pixel.con.del;
pixel.con.x = x;
pixel.con.y = y;
pixelMap[x][y] = pixel.con;
currentPixels.push(pixel.con);
pixel.con = null;
break;
}
if (!isEmpty(x,y,true) && pixelMap[x][y].element === "pipe") {
var newPixel = pixelMap[x][y];
if (pixel.con && !newPixel.con && newPixel.stage === pixel.stage) {
newPixel.con = pixel.con;
newPixel.con.x = newPixel.x;
newPixel.con.y = newPixel.y;
pixel.con = null;
break;
}
}
}
}
}
doDefaults(pixel);
},
category: "machines",
movable: false,
canContain: true,
}

View File

@ -27,6 +27,13 @@ elements.roomtemper = {
movable: false,
};
elements.cold_fire.behavior = [
"M1|M1|M1",
"M2|DL%8|M2",
"XX|M2|XX",
];
// powder
elements.powder_heater = {
category: "machines",
behavior: [
@ -60,7 +67,7 @@ elements.powder_superheater = {
insulate: true,
};
elements.powder_freeze = {
elements.powder_freezer = {
category: "machines",
behavior: [
"XX|CO:10|XX",
@ -71,12 +78,7 @@ elements.powder_freeze = {
insulate: true,
};
elements.cold_fire.behavior = [
"M1|M1|M1",
"M2|DL%8|M2",
"XX|M2|XX",
];
// gas
elements.gas_heater = {
color: "#881111",
behavior: [
@ -88,17 +90,6 @@ elements.gas_heater = {
insulate: true,
};
elements.gas_superheater = {
color: "#dd1111",
behavior: [
"M2|M1 AND HT:10|M2",
"M1 AND HT:10|XX|M1 AND HT:10",
"M2|M1 AND HT:10|M2",
],
category: "machines",
insulate: true,
};
elements.gas_cooler = {
color: "#111188",
behavior: [
@ -110,6 +101,17 @@ elements.gas_cooler = {
insulate: true,
};
elements.gas_superheater = {
color: "#dd1111",
behavior: [
"M2|M1 AND HT:10|M2",
"M1 AND HT:10|XX|M1 AND HT:10",
"M2|M1 AND HT:10|M2",
],
category: "machines",
insulate: true,
};
elements.gas_freezer = {
color: "#1111dd",
behavior: [
@ -120,3 +122,92 @@ elements.gas_freezer = {
category: "machines",
insulate: true,
};
// antipowder
elements.anti_heater = {
color: "#881111",
behavior: [
"M2|M1 AND HT:2|M2",
"HT:2|XX|HT:2",
"XX|HT:2|XX",
],
category: "special",
insulate: true,
};
elements.anti_cooler = {
color: "#111188",
behavior: [
"M2|M1 AND CO:2|M2",
"CO:2|XX|CO:2",
"XX:CO:2|XX",
],
category: "special",
insulate: true,
};
elements.anti_superheater = {
color: "#881111",
behavior: [
"M2|M1 AND HT:10|M2",
"HT:10|XX|HT:10",
"XX|HT:10|XX",
],
category: "special",
insulate: true,
};
elements.anti_freezer = {
color: "#1111dd",
behavior: [
"M2|M1 AND CO:10|M2",
"CO:10|XX|CO:10",
"XX:CO:10|XX",
],
category: "special",
insulate: true,
};
elements.heater_gas = {
color: "#881111",
behavior: [
"M2|M1 AND HT:2|M2",
"M1 AND HT:2|XX|M1 AND HT:2",
"M2|M1 aND HT:2|M2",
],
category: "special",
insulate: true,
}
elements.cooler_gas = {
color: "#111188",
behavior: [
"M2|M1 AND CO:2|M2",
"M1 AND CO:2|XX|M1 AND CO:2",
"M2|M1 A ND CO:2|M2",
],
category: "special",
insulate: true,
}
elements.superheater_gas = {
color: "#881111",
behavior: [
"M2|M1 AND H1:10|M2",
"M1 AND HT:10|XX|M1 AND HT:10",
"M2|M1 AND HT:10|M2",
],
category: "special",
insulate: true,
}
elements.freezer_gas = {
color: "#1111dd",
behavior: [
"M2|M1 AND CO:10|M2",
"M1 AND CO:10|XX|M1 AND CO:10",
"M2|M1 AND CO:10|M2",
],
category: "special",
insulate: true,
}

View File

@ -1,14 +1,15 @@
/*
Created by SquareScreamYT/sqec <@918475812884344852>
Thanks to RealerRaddler <@914371295561535508>, Alice <@697799964985786450>, nousernamefound <@316383921346707468>, Adora the Transfem <@778753696804765696> and Fioushemastor <@738828785482203189> for helping :)
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
v1.10.8
v1.12.4
you can support me at my youtube: https://youtube.com/@sqec
Upcoming Features:
- cinnamon
- spring onions
- soy sauce/wasabi
- white rice noodles
- matcha leaves, powder, tea
- cacao pods
@ -21,7 +22,6 @@ Upcoming Features:
- hot chocolate
- cows and beef
- celery
- marshmallows, normal, cooked and burnt
- kiwis
- guavas
- lychees
@ -43,6 +43,9 @@ 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
@ -368,6 +371,54 @@ Changelog (v1.10.8)
Changelog (v1.11)
- unhid carrot
- unhid turnip
Changelog (v1.12)
- added whisk
- added egg white
- added hard egg white
- added whisked egg white
- added marshmallows
- added cooked marshmallows
- added burnt marshmallows
- improved soup (from nousersthings.js)
- added food coloring (color may fade)
- added eat tool
- added drink tool
Changelog (v1.12.1)
- removed coral, can still be found in ocean.js
- updated food coloring
Changelog (v1.12.2)
- updated cooked meat behavior
Changelog (v1.12.4)
- added cake batter
- added condensed milk
- added wasabi
- added beans
- added baked beans
- added fermented beans/natto
- added soy sauce
*/
/*
@ -377,6 +428,8 @@ elements.test = {
}
*/
console.log("Thanks for using aChefsDream.js! -sqec")
function interpolateRgb(rgb1, rgb2, ratio) {
const interpolatedRgb = {
r: Math.round(rgb1.r + (rgb2.r - rgb1.r) * ratio),
@ -388,7 +441,13 @@ function interpolateRgb(rgb1, rgb2, ratio) {
function getRGB(rgb){
let rgb2 = rgb.replace(")", "").replace("rgb(", "").replace(/,/g, "r").split("r")
return { r: parseInt(rgb2[0]), g: parseInt(rgb2[1]), b: parseInt(rgb2[2]) };
}
}
behaviors.STURDYPOWDER2 = [
"XX|XX|XX",
"XX|XX|XX",
"M2%30|M1|M2%30",
],
elements.knife = {
color: "#adb5bd",
@ -428,7 +487,33 @@ elements.knife = {
canPlace: false,
desc: "Use on pixels to cut them, if possible."
}
elements.whisk = {
color: ["#a4a7b0","#a4a7b0","#a4a7b0","#bfc2c9","#e9eaf0","#bfc2c9","#a4a7b0"],
// other needed properties
tool: (pixel) => {
//store whiskInto as a variable for legibility
var whiskInto = elements[pixel.element].whiskInto;
//if theres no whiskInto, it should equal undefined, which is falsey and !undefined = true
if (!whiskInto) { return };
//if whiskInto is an array, randomly pick one of its elements
if(whiskInto instanceof Array) {whiskInto = whiskInto[Math.floor(Math.random() * whiskInto.length)] };
//change pixel into the (chosen) element
//changePixel(pixel, whiskInto)
if (shiftDown) {
if (Math.random() < 0.5) {
changePixel(pixel, whiskInto)
}
}
else if (!shiftDown) {
if (Math.random() < 0.1) {
changePixel(pixel, whiskInto)
}
}
},
category:"tools",
canPlace: false,
desc: "Use on pixels to whisk them, if possible."
}
elements.freeze_dry = {
color: "#3a65b5",
tool: function(pixel) {
@ -456,6 +541,27 @@ elements.freeze_dry = {
desc: "Use on pixels to freeze dry them, if possible."
}
elements.eat = {
color: ["#ffba79","#efff79"],
tool: function(pixel) {
if (elements[pixel.element].isFood || elements[pixel.element].category === "food" || eLists.JUICEMIXABLE.includes(pixel.element) || elements[pixel.element].id === elements.uranium.id || elements[pixel.element].id === elements.mercury.id) {
deletePixel(pixel.x, pixel.y);
}
},
category: "tools",
desc: "Eats pixels."
}
elements.drink = {
color: ["#03c6fc","#03a1fc"],
tool: function(pixel) {
if (elements[pixel.element].state === "liquid") {
deletePixel(pixel.x, pixel.y);
}
},
category: "tools",
desc: "Drinks pixels."
}
eLists.JUICEMIXABLE = ["juice"];
elements.chicken = {
@ -522,11 +628,7 @@ elements.chicken = {
elements.chicken_egg = {
color: ["#e0d3ab","#d9cdb5"],
behavior: [
"XX|XX|XX",
"XX|FX%5|XX",
"M2%30|M1|M2%30",
],
behavior: behaviors.STURDYPOWDER2,
tick: function(pixel) {
if (Math.random() < 0.1 && pixel.temp > 20 && pixel.temp < 35) {
changePixel(pixel,"chick")
@ -655,7 +757,47 @@ elements.soup = {
conduct: 0.03,
stain: -0.01,
isFood: true,
hidden: true,
//thanks to nouser
onMix: function(soup,ingredient) {
if (elements[ingredient.element].id !== elements.soup.id && elements[ingredient.element].id !== elements.broth.id) {
if (elements[ingredient.element].isFood || elements[ingredient.element].category === "food" || elements[ingredient.element].category === "liquids") {
var rgb1 = soup.color.match(/\d+/g);
var rgb2 = ingredient.color.match(/\d+/g);
// average the colors
var rgb = [
Math.round((parseInt(rgb1[0])+parseInt(rgb2[0]))/2),
Math.round((parseInt(rgb1[1])+parseInt(rgb2[1]))/2),
Math.round((parseInt(rgb1[2])+parseInt(rgb2[2]))/2)
];
if (!soup.elemlist){
soup.elemlist = [];
}
soup.decidedHigh = soup.elemlist[Math.floor(Math.random()*soup.elemlist.length)];
soup.elemlist.push(ingredient.element)
soup.stateHigh = soup.elemlist;
changePixel(ingredient, "soup");
var hex = RGBToHex(rgb);
soup.color = pixelColorPick(soup, hex);
if (Math.random() < 0.5) { deletePixel(ingredient.x, ingredient.y); }
else {
ingredient.color = pixelColorPick(ingredient, hex);
}
}
}
},
tick: function(pixel) {
if (!pixel.decidedHigh){
pixel.decidedHigh = "steam";
}
if (pixel.temp > 100){
if (Math.random() < 0.5) {
changePixel(pixel, "steam");
}
else {
changePixel(pixel, pixel.decidedHigh)
}
}
},
}
if (!elements.broth.reactions) elements.broth.reactions = {};
@ -1654,77 +1796,6 @@ elements.salmon = {
cutInto: "raw_salmon"
}
elements.coral_stem = {
color: "#4a5e49",
behavior: [
"CR:coral_stem,coral%2|CR:coral,coral_stem,coral,coral%2|CR:coral_stem,coral%2",
"XX|XX|XX",
"XX|XX|XX",
],
tick: function(pixel) {
if (!pixel.fColor) {
pixel.fColor = "hsl(" + Math.floor(Math.random()*360) + ",100%,50%)";
}
var coordsToCheck = [
[pixel.x-1,pixel.y],
[pixel.x+1,pixel.y],
[pixel.x,pixel.y-1],
[pixel.x,pixel.y+1],
]
for (var i = 0; i < coordsToCheck.length; i++) {
var coord = coordsToCheck[i];
if (isEmpty(coord[0],coord[1])) {
createPixel("coral",coord[0],coord[1]);
pixelMap[coord[0]][coord[1]].color = pixel.fColor;
}
}
doDefaults(pixel)
},
tempHigh: 100,
stateHigh: "dead_coral",
tempLow: -30,
stateLow: "dead_coral",
category: "life",
burn: 40,
burnTime: 50,
burnInto: [,"ember","charcoal"],
hidden: true,
state: "solid",
density: 1500,
hardness: 0.15,
hidden: true,
}
elements.coral = {
color: ["#ff0000","#ff8800","#ffff00","#88ff00","#00ff00","#00ff88","#00ffff","#0088ff","#0000ff","#8800ff","#ff00ff"],
behavior: [
"XX|XX|XX",
"XX|XX|XX",
"XX|XX|XX",
],
reactions: {
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035}
},
category:"life",
tempHigh: 100,
stateHigh: "dead_plant",
tempLow: -1.66,
stateLow: "frozen_plant",
burn:65,
burnTime:60,
burnInto: "dead_plant",
breakInto: "dead_plant",
state: "solid",
density: 1050,
hidden: true,
properties:{
"colored": false
}
}
elements.raw_salmon = {
color: ["#FD7E19", "#FE842F", "#FD8F45"],
behavior: behaviors.STURDYPOWDER,
@ -2773,7 +2844,6 @@ elements.carrot = {
breakInto: "carrot_juice",
state: "solid",
density: 1050,
hidden: true,
freezeDryInto: "freeze_dried_fruits",
freezeDryIntoColor: "#ba8125",
}
@ -2942,7 +3012,6 @@ elements.turnip = {
breakInto: "turnip_juice",
state: "solid",
density: 1050,
hidden: true,
freezeDryInto: "freeze_dried_fruits",
freezeDryIntoColor: "#79097d",
}
@ -4932,11 +5001,7 @@ elements.snail.reactions.nut_oil = { elem1: "escargot", chance:30, tempMin:50 }
elements.escargot = {
color: "#ab924d",
behavior: [
"XX|XX|XX",
"XX|XX|",
"M2%10|M1|M2%10",
],
behavior: behaviors.STURDYPOWDER2,
tempHigh: 120,
stateHigh: "steam",
breakInto: "quicklime",
@ -6909,3 +6974,278 @@ elements.durian_seed = {
"XX|M1|XX",
],
};
elements.egg_white = {
color: "#edece8",
behavior: behaviors.LIQUID,
tempHigh: 100,
stateHigh: "hard_egg_white",
tempLow: 0,
stateLow: "hard_egg_white",
category: "food",
state: "liquid",
density: 1027.5,
viscosity: 270,
isFood: true,
whiskInto: "whisked_egg_white",
}
elements.hard_egg_white = {
color: "#dedddc",
behavior: behaviors.STURDYPOWDER,
tempHigh: 400,
stateHigh: "smoke",
category: "food",
hidden: true,
isFood: true,
state: "solid",
density: 1031
}
elements.milk.whiskInto = "cream";
elements.cream.whiskInto = "whipped_cream";
elements.egg.breakInto = ["egg_white","egg_white","yolk"]
elements.whisked_egg_white ={
color: "#fefefe",
behavior: behaviors.LIQUID,
reactions: {
"corn_syrup": { elem1: "marshmallow", elem2: null, chance: 2 },
"sugar": { elem1: "marshmallow", elem2: null, chance: 2 },
},
viscosity: 1.5,
tempHigh: 1000,
stateHigh: ["smoke","steam"],
category: "food",
hidden: true,
isFood: true,
state: "liquid",
density: 959.97,
}
elements.marshmallow = {
color: "#fafafa",
behavior: [
"XX|XX|XX",
"ST:wood|XX|ST:wood",
"XX|M1|XX",
],
viscosity: 1.5,
tempHigh: 70,
stateHigh: "cooked_marshmallow",
category: "food",
isFood: true,
state: "solid",
density: 959.97,
}
elements.cooked_marshmallow = {
color: "#f0dbb6",
behavior: [
"XX|XX|XX",
"ST:wood|XX|ST:wood",
"XX|M1|XX",
],
viscosity: 1.5,
tempHigh: 150,
stateHigh: "burnt_marshmallow",
category: "food",
isFood: true,
state: "solid",
density: 959.97,
hidden:true
}
elements.burnt_marshmallow = {
color: "#29231a",
behavior: [
"XX|XX|XX",
"ST:wood|XX|ST:wood",
"XX|M1|XX",
],
viscosity: 1.5,
tempHigh: 1000,
stateHigh: ["steam","caramel"],
category: "food",
isFood: true,
state: "solid",
density: 959.97,
hidden:true
}
eLists.FOODCOLORINGIGNORE = ["glass", "porcelain", "wall","iron","steel","copper","silver","aluminum","tungsten","gold","plastic"];
elements.food_coloring = {
color: ["#ff0000", "#ff8800", "#ffff00", "#00ff00", "#00ffff", "#0000ff", "#ff00ff"],
behavior: behaviors.LIQUID,
customColor: true,
stain: 0.5,
tempHigh: 100,
stateHigh: "steam",
category: "food",
state: "liquid",
density: 998,
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) {
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)) {
if (pixelMap[x][y].element === "water" || pixelMap[x][y].element === "salt_water" || pixelMap[x][y].element === "sugar_water" || pixelMap[x][y].element === "seltzer" || pixelMap[x][y].element === "dirty_water" || pixelMap[x][y].element === "pool_water") {
changePixel(pixelMap[x][y], "food_coloring");
let newrgb = interpolateRgb(getRGB(pixel.color), getRGB(pixelMap[x][y].color), 0.5);
pixel.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`;
pixelMap[x][y].color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`;
}
else {
if (!outOfBounds(pixelMap[x][y])) {
if (!eLists.FOODCOLORINGIGNORE.includes(pixelMap[x][y].element) && pixelMap[x][y].element !== "glass" && pixelMap[x][y].element !== "porcelain" && pixelMap[x][y].element !== "wall" && pixelMap[x][y].element !== "plastic") {
let newrgb2 = interpolateRgb(getRGB(pixel.color), getRGB(pixelMap[x][y].color), 0.9);
pixelMap[x][y].color = `rgb(${parseInt(newrgb2.r)},${parseInt(newrgb2.g)},${parseInt(newrgb2.b)})`;
if (Math.random() < 0.002) {
deletePixel(pixel.x,pixel.y)
}
}
}
}
}
}
},
onSelect: function () {
logMessage("Tip: You can spread food coloring using water.");
},
}
elements.cooked_meat.behavior = behaviors.SUPPORT;
elements.cake_batter = {
color: "#d4bc85",
behavior: behaviors.LIQUID,
onMix: function(batter,ingredient) {
if (elements[ingredient.element].isFood && elements[ingredient.element].id !== elements.batter.id && elements[ingredient.element].id !== elements.flour.id && elements[ingredient.element].id !== elements.yolk.id && elements[ingredient.element].id !== elements.dough.id && elements[ingredient.element].id !== elements.baked_batter.id && elements[ingredient.element].id !== elements.cake.id && elements[ingredient.element].id !== elements.cake_batter.id) {
var rgb1 = batter.color.match(/\d+/g);
var rgb2 = ingredient.color.match(/\d+/g);
// average the colors
var rgb = [
Math.round((parseInt(rgb1[0])*10+parseInt(rgb2[0]))/11),
Math.round((parseInt(rgb1[1])*10+parseInt(rgb2[1]))/11),
Math.round((parseInt(rgb1[2])*10+parseInt(rgb2[2]))/11)
];
// convert rgb to hex
var hex = RGBToHex(rgb);
batter.color = pixelColorPick(batter, hex);
if ((elements[ingredient.element].density > elements.batter.density || shiftDown) && Math.random() < 0.05) {
// 50% change to delete ingredient
if (Math.random() < 0.5) { deletePixel(ingredient.x, ingredient.y); }
else {
ingredient.color = pixelColorPick(ingredient, hex);
}
}
}
},
reactions: {
"cream": { elem2:"cake_batter", tempMin:40, chance:0.01 },
},
category: "food",
tempHigh: 94,
stateHigh: "cake",
stateHighColorMultiplier: 0.9,
burn:40,
burnTime:25,
burnInto:"ash",
state: "liquid",
viscosity: 10000,
density: 1001,
hidden: true,
isFood: true
}
elements.batter.whiskInto = "cake_batter";
elements.milk.stateHigh = ["steam","steam","condensed_milk"];
elements.condensed_milk = {
color: "#f2f0df",
behavior: behaviors.LIQUID,
reactions: {
"cell": { elem1:"yogurt", chance:0.1 },
"dirt": { elem1: null, elem2: "mud" },
"sand": { elem1: null, elem2: "wet_sand" },
"clay_soil": { elem1: null, elem2: "clay" },
"caramel": { color1:"#C8B39A", elem2:null, chance:0.05 },
"sugar": { color1:"#fffbf0", elem2:null, chance:0.5},
},
tempLow: 0,
stateLow: "ice_cream",
stateLowColorMultiplier: [0.97,0.93,0.87],
tempHigh: 500,
stateHigh: ["smoke","smoke","smoke","quicklime"],
viscosity: 1500,
category: "food",
state: "liquid",
density: 1036.86,
isFood: true,
alias: "evaporated_milk"
}
elements.wasabi = {
color: ["#82b55b","#6cad50","#7dcc5c"],
behavior: behaviors.STURDYPOWDER2,
reactions: {
"dirt": { elem1: null, elem2: "mud" },
"sand": { elem1: null, elem2: "wet_sand" },
"clay_soil": { elem1: null, elem2: "clay" },
"melted_chocolate": { color1:"#664934", elem2:null },
"chocolate": { color1:"#664934", elem2:"melted_chocolate", chance:0.05 },
"juice": { elem1:"fruit_milk", elem2:null, chance:0.05 },
"soda": { elem1:"pilk", elem2:null, chance:0.1 },
"yolk": { elem1:"#eggnog", elem2:null, chance:0.1 },
"caramel": { color1:"#C8B39A", chance:0.05 },
"sugar": { elem2:null, chance:0.005},
},
viscosity: 1.5,
tempHigh: 1000,
stateHigh: ["smoke","smoke","smoke","steam","steam"],
category: "food",
isFood: true,
state: "solid",
density: 959.97,
}
// extremely confused part
elements.beans.name = "baked_beans";
elements.real_beans = {
name: "beans",
color: ["#e8dfc5","#d1c7ab"],
behavior: behaviors.POWDER,
category: "food",
tempHigh: 350,
stateHigh: ["fire","fire","ash"],
burn:3,
burnTime:500,
burnInto: ["fire","smoke","smoke","steam","ash"],
reactions: {
"sauce": { elem1: "beans", elem2: "beans" },
"yeast": { elem1: "fermented_beans", elem2: null, chance:0.5 }
},
state: "solid",
density: 721,
isFood: true,
alias: "soy_beans"
}
elements.fermented_beans = {
color:"#ada386",
behavior: behaviors.POWDER,
category: "food",
tempHigh: 350,
stateHigh: ["fire","fire","ash"],
burn:3,
burnTime:500,
burnInto: ["fire","smoke","smoke","steam","ash"],
state: "solid",
density: 721,
breakInto: "soy_sauce",
isFood: true,
alias: "natto"
}
elements.soy_sauce = {
color: "#480601",
behavior: behaviors.LIQUID,
tempLow: -5,
tempHigh: 105,
stateHigh: ["steam","steam","salt"],
state: "liquid",
category:"food",
density: 1200,
};
// end of confused part

239
mods/aScientistsWish.js Normal file
View File

@ -0,0 +1,239 @@
elements.carbon_monoxide = {
color: "#b5b5b5",
behavior: behaviors.GAS,
behaviorOn: [
"XX|XX|XX",
"XX|CH:fire|XX",
"XX|XX|XX",
],
category: "gases",
state: "gas",
density: 1.14,
burn: 75,
tempHigh: 609,
stateHigh: "fire",
tempLow: -192,
stateLow: "liquid_carbon_monoxide",
burntime: 5,
fireColor: "#ebba34",
reactions: {
"head": { elem1:"rotten_meat", chance:0.5 },
"body": { elem1:"rotten_meat", chance:0.5 },
"human": { elem1:"rotten_meat", chance:0.5 },
}
};
elements.liquid_carbon_monoxide = {
color: "#b5b5b5",
behavior: behaviors.LIQUID,
category: "liquids",
state: "liquid",
density: 1.14,
tempHigh: -190,
temp: -192,
tempLow: -199,
stateLow: "ice_carbon_monoxide",
stateHigh: "carbon_monoxide",
};
elements.ice_carbon_monoxide = {
color: "#b5b5b5",
behavior: behaviors.WALL,
category: "solids",
state: "solid",
temp: -199,
density: 1.14,
tempHigh: -192,
stateHigh: "liquid_carbon_monoxide",
};
elements.carbon_monoxide_detector = {
behavior: behaviors.WALL,
desc: "give red light and electric when found Carbon Monoxide touch",
color: "#ffffff",
reactions: {
"carbon_monoxide": {"charge1":1},
},
conduct: 1,
tempHigh: 1550,
stateHigh: ["molten_metal_scrap","electric","molten_plastic"],
colorOn: "#ff0000",
movable: false,
insulate: true,
noMix: true,
category:"machines",
darkText: true,
hardness: 1,
};
elements.cpu = {
color: "#575757",
behavior: behaviors.SOLID,
category: "machines",
state: "solid",
insulate: true,
movable: false,
noMix: true,
density: 75,
tempHigh: 1414,
stateHigh: ["explosion","metal_scrap"],
reactions: {
"virus": { elem1 : null , elem2:"malware", chance:0.9 },
"metal_scrap": { elem2:"computer" },
}
};
elements.computer = {
color: "#2b2b2a",
behavior: behaviors.SOLID,
category: "machines",
state: "solid",
density: 8908,
insulate: true,
noMix: true,
movable: false,
tempHigh: 1414,
stateHigh: ["explosion","metal_scrap"],
reactions: {
"virus": { elem1 : null , elem2:"malware", chance:0.9 },
"water": { elem1: null , elem2: "electric" },
}
}
elements.electrons = {
color: "#b80606",
behavior: [
"XX|SH|XX", // shocks (adds charge)
"SH|DL%0.25|SH",
"XX|SH|XX",
],
tick: behaviors.BOUNCY,
reactions: {},
temp: 20,
category: "energy",
state: "gas",
density: 0.000003,
ignoreAir: true,
};
elements.gelatin = {
behavior: behaviors.SOLID,
category: "food",
state: "solid",
color: "#faf8ca",
breakInto: "gelatin_powder",
ignoreAir: true,
isFood: true,
};
elements.gelatin_powder = {
behavior: behaviors.POWDER,
category: "food",
state: "powder",
color: "#edeb9f",
hidden: true,
ignoreAir: true,
isFood: true,
};
elements.blueberries = {
behavior: behaviors.POWDER,
category: "food",
state: "solid",
color: ["#464196","#2e2b64"],
breakInto: "blueberries_juice",
ignoreAir: true,
isFood: true,
reactions: {
"sugar": { elem1: "blueberries_jam" },
},
};
elements.blueberries_juice = {
behavior: behaviors.LIQUID,
category: "food",
state: "liquid",
color: "#1f1c42",
hidden: true,
tempHigh: 170,
stateHigh: ["steam","sugar"],
reactions: {
ignoreAir: true,
isFood: true,
"gelatin": { elem1: "blueberries_jelly", elem2: null },
"gelatin_powder": { elem1: "blueberries_jelly", elem2: null },
},
};
elements.blueberries_jam = {
behavior: behaviors.LIQUID,
category: "food",
viscosity: 5000,
state: "liquid",
tempHigh: 200,
stateHigh: ["smoke","sugar"],
color: "#080629",
hidden: true,
ignoreAir: true,
isFood: true,
};
elements.blueberries_jelly = {
behavior: behaviors.LIQUID,
category: "food",
viscosity: 200000,
state: "liquid",
color: "#59559e",
hidden: true,
tempHigh: 200,
stateHigh: ["smoke","sugar"],
tempLow: -5,
stateLow: ["sugar_ice","sugar_ice","juice_ice"],
ignoreAir: true,
isFood: true,
};
elements.fallout_drum = {
behavior: behaviors.WALL,
category: "radiated",
state: "solid",
density: 9000,
color: "#e3cc34",
breakInto: ["fallout","fallout"],
reactions: {
"water": { elem1:"fallout_drum", elem2:"radiated_water" },
}
};
elements.radiated_water = {
behavior: behaviors.LIQUID,
category: "radiated",
state:"liquid",
density :1300,
color: ["#23d959","#29d65d"],
hidden: true,
reactions: {
"human": { elem2:"rotten_meat" },
"body": { elem2:"rotten_meat" },
"head": { elem2:"ash" },
"bird": { elem2:"rotten_meat"},
"cell": { elem2:"cancer"},
}
};
elements.polluted_air = {
behavior: behaviors.GAS,
category: "radiated",
state:"gas",
density :10,
color: ["#60f53b","#65ba50"],
reactions: {
"body": { elem2:"rotten_meat" },
"head": { elem2:"rotten_meat" },
"human": { elem2:"rotten_meat" },
"bird": { elem2:"rotten_meat" },
"cell": { elem2:"cancer"},
}
};
elements.siren = {
desc: "Detecting Nuclear Radiation Residues",
behavior: behaviors.WALL,
category: "machines",
state:"solid",
density :500,
color: "#808080",
reactions: {
"fallout": {"charge1":1},
"radiated_water": {"charge1":1},
"polluted_air": {"charge1":1},
}
}

164
mods/blocks.js Normal file
View File

@ -0,0 +1,164 @@
elements.zogron = {
color: ["#ebde34", "#34dbeb", "#ebe834"],
colorPattern: [
"00055400",
"01111120",
"02111210",
"41152110",
"01121110",
"01211410",
"02151113",
"00000000",
],
colorKey: {
"0": "#ebde34",
"1": "#dbeb34",
"2": "#ebe834",
"3": "#3d34eb",
"4": "#34dbeb",
"5": "#34ebb7",
},
behavior: behaviors.WALL,
category: "Blocks",
}
elements.roro = {
color: ["#000000", "#F00000"],
colorPattern: [
"10000001",
"01111000",
"00111100",
"00011110",
"00001111",
"00011110",
"00111100",
"01111000",
],
colorKey: {
"0": "#000000",
"1": "#F00000"
},
behavior: behaviors.WALL,
category: "Blocks",
}
elements.foldtos = {
color: ["#00FF00", "#0000FF"],
colorPattern: [
"00100010",
"00100010",
"01111110",
"00100010",
"00100010",
"00100010",
"01111110",
"00100010"
],
colorKey: {
"0": "#00FF00",
"1": "#0000FF"
},
behavior: behaviors.WALL,
category: "Blocks"
};
elements.toyus = {
color: ["#FFFF00", "#00FF00", "#FFA500"],
colorPattern: [
"02101210",
"01210102",
"02101210",
"00120210",
"01201012",
"01021021",
"02101210",
"00120210"
],
colorKey: {
"0": "#FFFF00",
"1": "#00FF00",
"2": "#FFA500"
},
behavior: behaviors.WALL,
category: "Blocks"
};
elements.slingus = {
color: ["#800080", "#0000FF", "#ADD8E6", "#FF69B4"],
colorPattern: [
"01233210",
"12310213",
"23012301",
"30121230",
"12302312",
"23101203",
"30120123",
"01233210"
],
colorKey: {
"0": "#800080",
"1": "#0000FF",
"2": "#ADD8E6",
"3": "#FF69B4"
},
behavior: behaviors.WALL,
category: "Blocks"
};
elements.slingus_maximus = {
color: ["#800080", "#0000FF", "#ADD8E6", "#FF69B4"],
colorPattern: [
"11111223",
"11112233",
"11122233",
"11222233",
"12222333",
"22223333",
"22233333",
"22333333"
],
colorKey: {
"0": "#800080",
"1": "#0000FF",
"2": "#ADD8E6",
"3": "#FF69B4"
},
behavior: behaviors.WALL,
category: "Blocks"
};
elements.slinkusy = {
color: ["#4B0082", "#0000FF", "#6495ED", "#FF1493"],
colorPattern: [
"01223201",
"01223102",
"01022301",
"01022301",
"01223102",
"01223201",
"01223201",
"01223102"
],
colorKey: {
"0": "#4B0082",
"1": "#0000FF",
"2": "#6495ED",
"3": "#FF1493"
},
behavior: behaviors.WALL,
category: "Blocks"
};
worldgentypes.Mixy_blocks1 = {
layers: [
[0.75, "slinkusy"],
[0.15, "toyus"],
[0.05, "foldtos"],
[0.0, "roro"],
],
decor: [
["zogron", 0.04, 20],
["slingus_maximus", 0.25, 30],
],
baseHeight: 0.25
}

164
mods/community_desserts.js Normal file
View File

@ -0,0 +1,164 @@
/*
* Mod created by Tisquares
* Every dessert idea is provided by the community.
* Don't see your favorite dessert? Let me know!
*
* Got questions? Contact tisqbisque on Discord!
*/
// Dulce de leche items - BASE COMPLETE
elements.dulce_de_leche = {
color: ["#c56600","#f7a204","#ca6400","#893604"],
category: "Community",
behavior: behaviors.STURDYPOWDER,
tempHigh: 250,
stateHigh: ["fragrance","smoke","smoke"],
hidden: true,
desc: "Added in the first version of the mod. From undexconocidox_26419.\n"
}
elements.sweetened_condensed_milk = {
color: ["#ffe9ba","#fbd396","#fde2a9"],
category: "Community",
behavior: behaviors.LIQUID,
tempHigh: 175,
stateHigh: "dulce_de_leche",
hidden: true,
desc: "Added in the first version of the mod. Made by mixing Milk and Sugar at 85°C+.\n",
}
// Chocotorta items - BASE COMPLETE
elements.cream_cheese = {
color: ["#ebe9ea","#e4dfdd","#eeeeee"],
category: "Community",
behavior: behaviors.SUPPORTPOWDER,
hidden: true,
desc: "Added in the first version of the mod. Made by mixing Acid with Milk or Cream.\n",
}
elements.cocoa_bean = {
color: ["#e16f51","#e28e67","#e18550","#84574d"],
category: "Community",
behavior: behaviors.STURDYPOWDER,
breakInto: "cocoa_powder",
desc: "Added in the first version of the mod.\n",
}
elements.cocoa_powder = {
color: ["#855344","#6d4c41","#40271d"],
behavior: behaviors.POWDER,
onMix: function(powder, doughcheck) {
if (doughcheck.name == "dough" && shiftDown && Math.random() < 0.01) {
changePixel(powder,"chocolate_biscuit_dough");
changePixel(doughcheck,"chocolate_biscuit_dough");
}
},
reactions: {
"dough": { elem1:null, elem2:"chocolate_biscuit_dough" },
},
category: "Community",
hidden: true,
desc: "Added in the first version of the mod. Made by Smashing Cocoa Bean.\n",
}
elements.chocolate_biscuit_dough = {
name: "choco_Biscuit_Dough",
color: "#623727",
category: "Community",
behavior: behaviors.STURDYPOWDER,
tempHigh: 94,
stateHigh: "chocolate_biscuit",
burn: 40,
burnTime: 25,
burnInto: "ash",
state: "solid",
density: 526.9,
isFood: true,
hidden: true,
desc: "Added in the first version of the mod. Made by mixing Cocoa Powder with Dough.\n",
}
elements.chocolate_biscuit = {
name: "choco_Biscuit",
color: "#864B36",
behavior: behaviors.STURDYPOWDER,
tempHigh: 550,
stateHigh: ["smoke","smoke","smoke","ash"],
breakInto: "crumb",
state: "solid",
density: 233.96,
isFood: true,
category: "Community",
hidden: true,
desc: "Added in the first version of the mod. Made by cooking Choco Biscuit Dough at 94°C+. Can be layered with other items to make chocotorta, from undexconocidox_26419.\n",
}
// Haupia items - BASE COMPLETE
elements.coconut = {
color: ["#793b1e","#995c31","#5f3015"],
behavior: behaviors.POWDER,
breakInto: ["coconut_milk","tinder"],
category: "Community",
desc: "Added in the first version of the mod.\n",
}
elements.coconut_milk = {
color: ["#f3f3f3","#e4ddcb","#f8f8f8"],
behavior: behaviors.LIQUID,
category: "Community",
reactions: {
"sugar": { elem1:null, elem2:"haupia_mix", tempMin:90 },
},
density: 1031.33,
hidden: true,
desc: "Added in the first version of the mod. Made by smashing Coconut.\n",
}
elements.haupia_mix = {
color: ["#f3f3f3","#e4ddcb","#f8f8f8"],
behavior: behaviors.LIQUID,
tempLow: 3,
category: "Community",
stateLow: "haupia",
density: 1242.67,
hidden: true,
desc: "Added in the first version of the mod. Made by mixing Coconut Milk and Sugar at 90°C+.\n",
}
elements.haupia = {
color: ["#ffffff","#f8f8f8","#f7f9f8"],
behavior: behaviors.SUPPORT,
density: 1300,
category: "Community",
hidden: true,
desc: "Added in the first version of the mod. Made by cooling Haupia Mix at 3°C-. From tisqbisque.\n"
}
// Adjusting existing elements here
elements.milk.reactions = {
"melted_chocolate": { elem1:"chocolate_milk", elem2:null },
"chocolate": { elem1:"chocolate_milk", elem2:"melted_chocolate", chance:0.05 },
"coffee_ground": { elem1:"chocolate_milk", chance:0.05 },
"juice": { elem1:"fruit_milk", elem2:null, chance:0.05 },
"soda": { elem1:"pilk", elem2:null, chance:0.1 },
"yolk": { elem1:"eggnog", elem2:null, chance:0.1 },
"cell": { elem1:"yogurt", chance:0.1 },
"ash": { elem1:"soap", chance:0.1 },
"dirt": { elem1: null, elem2: "mud" },
"sand": { elem1: null, elem2: "wet_sand" },
"clay_soil": { elem1: null, elem2: "clay" },
"caramel": { color1:"#C8B39A", elem2:null, chance:0.05 },
// Start mod items here
"sugar": { elem1:"sweetened_condensed_milk", elem2:null, chance:0.05, tempMin:85 },
"acid": { elem1:null, elem2:"cream_cheese", chance:0.8 },
}
elements.cream.reactions = {
"dirt": { elem1: null, elem2: "mud" },
"sand": { elem1: null, elem2: "wet_sand" },
"clay_soil": { elem1: null, elem2: "clay" },
"melted_chocolate": { color1:"#664934", elem2:null },
"chocolate": { color1:"#664934", elem2:"melted_chocolate", chance:0.05 },
"juice": { elem1:"fruit_milk", elem2:null, chance:0.05 },
"soda": { elem1:"pilk", elem2:null, chance:0.1 },
"yolk": { elem1:"#eggnog", elem2:null, chance:0.1 },
"caramel": { color1:"#C8B39A", chance:0.05 },
"sugar": { elem2:null, chance:0.005},
// Start mod items here
"acid": { elem1:null, elem2:"cream_cheese", chance:0.8 },
}
// Mod items first
elements.acid.ignore = ["cream_cheese","cream","milk",
"glass","rad_glass","glass_shard","rad_shard","stained_glass","baked_clay","acid_gas","neutral_acid","acid_cloud","water","salt_water","sugar_water","dirty_water","copper","gold","porcelain","plastic","bead","microplastic","molten_plastic","pool_water","chlorine","hydrogen","gold_coin","silver","nickel","calcium","bone"];

142
mods/drugs.js Normal file
View File

@ -0,0 +1,142 @@
elements.methamphetamine = {
category: "powders",
color: ["#b6ccd8", "#c5cfd6", "#cbd5db", "#6da5e0"],
state: "solid",
behavior: behaviors.POWDER,
temp: 20,
tempHigh: 1700,
stateHigh: "molten_methamphetamine",
reactions: {
"water": {elem1: null, elem2: "dirty_water"},
"cell": {elem1: "methamphetamine", elem2: "plague", chance: 0.001},
"plant": {elem1: "methamphetamine", elem2: "dead_plant", chance: 0.005},
},
};
elements.molten_methamphetamine = {
category: "states",
color: ["#fb7300", "#f93100", "#e05a1d", "#d65611"],
state: "liquid",
behavior: behaviors.RADMOLTEN,
tempLow: 1700,
stateLow: "methamphetamine",
};
elements.morphine = {
category: "powders",
color: "#c4dcf2",
state: "solid",
behavior: behaviors.POWDER,
tempHigh: 10000,
stateHigh: "n_explosion",
reactions: {
"head": {elem1: "n_explosion", elem2: "n_explosion", chance: 0.00008},
"body": {elem1: "n_explosion", elem2: "n_explosion", chance: 0.00008},
},
};
elements.cigarette = {
category: "solids",
color: ["#754531", "#e1e1dd"],
state: "solid",
behavior: [
"XX|CR:smoke%1 AND CR:carbon_dioxide%0.5|XX",
"CR:smoke%1 AND CR:carbon_dioxide%0.5|XX|CR:smoke%1 AND CR:carbon_dioxide%0.5",
"XX|CR:smoke%1 AND CR:carbon_dioxide%0.5|XX",
],
tempHigh: 233,
stateHigh: ["ash", "fire"],
breakInto: ["dust", "ash", "ash", "ash", "charcoal"],
};
elements.cannabis = {
category: "powders",
state: "solid",
tempHigh: 100,
stateHigh: "dead_plant",
burn: 15,
burnTime: 60,
burnInto: "dead_plant",
breakInto: "dead_plant",
behavior: behaviors.POWDER,
color: ["#2C7415", "#1D5F00", "#B2DC29", "#B2DC29", "#2C7415"],
reactions: {
"head": { elem1: null, elem2: "fly" }
},
}
elements.cannabis_seed = {
category: "life",
state: "solid",
tempHigh: 120,
stateHigh: "dead_plant",
breakInto: "cannabis",
behavior: [
"CR:cannabis_branch%2|CR:cannabis_branch%2|CR:cannabis_branch%2",
"XX|XX|XX",
"XX|M1|XX",
],
color: "#57272C",
}
elements.cannabis_branch = {
category: "life",
hidden: true,
state: "solid",
tempHigh: 120,
stateHigh: "dead_plant",
breakInto: "dead_plant",
behavior: [
"CR:cannabis_branch%0.7|CR:cannabis_branch%3|CR:cannabis_branch%0.7",
"CR:cannabis%4|XX|CR:cannabis%4",
"CR:cannabis%4|XX|CR:cannabis%4",
],
color: "#57272C",
}
elements.weed = {
category: "powders",
behavior: behaviors.POWDER,
state: "solid",
tempHigh: 150,
stateHigh: "dead_plant",
breakInto: "dead_plant",
burn: 15,
burnTime: 60,
burnInto: "dead_plant",
color: ["#71B441", "#416201", "#426D06", "#91CA6F"]
}
elements.weed_seed = {
category: "life",
state: "solid",
tempHigh: 150,
stateHigh: "dead_plant",
breakInto: "weed",
burn: 10,
burnTime: 60,
burnInto: "dead_plant",
color: "#5c4532",
behavior: [
"CR:weed_branch%0.2|CR:weed_branch%0.2|CR:weed_branch%0.2",
"XX|XX|XX",
"XX|M1|XX",
],
}
elements.weed_branch = {
category: "life",
hidden: true,
state: "solid",
tempHigh: 150,
stateHigh: "dead_plant",
breakInto: "weed",
burn: 10,
burnTime: 60,
color: "#5c4532",
behavior: [
"CR:weed_branch%0.7|CR:weed_branch%3|CR:weed_branch%0.7",
"CR:cannabis%4|XX|CR:cannabis%4",
"CR:cannabis%4|XX|CR:cannabis%4"
],
}

158
mods/extrasaveslots.js Normal file
View File

@ -0,0 +1,158 @@
//extrasaveslots
function showSaves() {
var savesParent = document.getElementById("savesParent");
var saveSlotList = document.getElementById("saveSlotList");
saveSlotList.innerHTML = "";
// loop 12 times, checking if local storage SandboxelsSaves/x exists
// <span class="saveSlot">Slot 1 <span disabled="true">Clear</span> <span disabled="true">Load</span> <span onclick="saveSlot(2)">Save</span></span>
// <span class="saveSlot">Unnamed <span onclick="clearSlot(2)">Clear</span> <span onclick="loadSlot(2)">Load</span> <span onclick="saveSlot(2)">Save</span></span>
for (var i = 1; i < 101; i++) {
var save = localStorage.getItem("SandboxelsSaves/"+i);
var name = "Slot "+i;
if (save) {
name = JSON.parse(save).meta.name || "Unnamed";
name = name.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
// truncate
if (name.length > 16) { name = name.substring(0,16)+"..."; }
saveSlotList.innerHTML += "<span id='saveSlot"+i+"' data-name='"+name+"' class='saveSlot'><span class='saveSlotName'>"+name+"</span> <span onclick='clearSlot("+i+")' class='saveOption'>Clear</span> <span onclick='loadSlot("+i+")' class='saveOption'>Load</span> <span onclick='saveSlot("+i+")' class='saveOption'>Save</span></span>";
}
else {
saveSlotList.innerHTML += "<span id='saveSlot"+i+"' data-name='"+name+"' class='saveSlot'><span class='saveSlotName'>"+name+"</span> <span disabled='true' class='saveOption'>Clear</span> <span disabled='true' class='saveOption'>Load</span> <span onclick='saveSlot("+i+")' class='saveOption'>Save</span></span>";
}
}
savesParent.style.display = "block";
showingMenu = "saves";
}
function saveSlot(i) {
savingState = {slot:i};
document.getElementById("saveName").value = document.getElementById("saveSlot"+i).getAttribute("data-name") || "Slot "+i;
showSavePrompt();
}
function loadSlot(i) {
var save = localStorage.getItem("SandboxelsSaves/"+i);
if (save) {
loadSave(JSON.parse(save));
closeMenu();
}
}
function clearSlot(i) {
if (!confirm("Are you sure you want to erase this save slot?")) { return }
localStorage.removeItem("SandboxelsSaves/"+i);
showSaves();
}
function confirmSave() {
if (!savingState) { return }
var saveName = document.getElementById("saveName").value || "Unnamed";
var saveTemp = document.getElementById("saveTemp").getAttribute("state") === "1";
var saveColors = document.getElementById("saveColors").getAttribute("state") === "1";
var saveMods = document.getElementById("saveMods").getAttribute("state") === "1";
var saveSettings = document.getElementById("saveSettings").getAttribute("state") === "1";
var saveRaw = document.getElementById("saveRaw").getAttribute("state") === "1";
var saveAuthor = document.getElementById("saveAuthor").value || "";
if (saveAuthor && !currentSaveData) {
setSetting("authorName",saveAuthor)
}
var saveDesc = document.getElementById("saveDesc").value || "";
var config = {name:saveName,temp:saveTemp,mods:saveMods,settings:saveSettings,raw:saveRaw,keep:[],author:saveAuthor,desc:saveDesc};
if (saveTemp) { config.keep.push("temp") }
if (saveColors) { config.keep.push("color") }
if (savingState.slot) {
// save stringified generateSave() to localStorage SandboxelsSaves/i
localStorage.setItem("SandboxelsSaves/"+savingState.slot, JSON.stringify(generateSave(undefined,config)));
closeMenu();
showSaves();
}
else {
// save to <name>.sbxls
var save = generateSave(undefined,config);
var blob = new Blob([JSON.stringify(save)], {type: "application/json"});
var url = URL.createObjectURL(blob);
var a = document.createElement("a");
a.href = url;
a.download = saveName+".sbxls";
document.body.appendChild(a);
a.click();
setTimeout(function() {
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}, 0);
closeMenu();
}
}
function saveToFile() {
savingState = {slot:null};
document.getElementById("saveName").value = "";
document.getElementById("saveAuthor").value = "";
document.getElementById("saveDesc").value = "";
showSavePrompt();
}
function loadFromFile() {
var input = document.createElement("input");
input.type = "file";
// input.accept = ".sbxls,.json,.txt,text/*,application/json";
input.addEventListener("change", function(e) {
var file = e.target.files[0];
var reader = new FileReader();
reader.readAsText(file,"UTF-8");
reader.onload = readerEvent => {
var content = readerEvent.target.result;
loadSave(JSON.parse(content));
}
closeMenu();
});
input.click();
}
function showSavePrompt() {
closeMenu();
var savePromptParent = document.getElementById("savePromptParent");
var saveWarning = document.getElementById("saveWarning");
if (currentSaveData) {
document.getElementById("saveName").value = currentSaveData.name || "";
document.getElementById("saveAuthor").value = currentSaveData.author || "";
document.getElementById("saveDesc").value = currentSaveData.desc || "";
}
else if (settings.authorName) {
document.getElementById("saveAuthor").value = settings.authorName;
}
saveWarning.innerHTML = "<br>"
var menuTitle = document.querySelector("#savePromptMenu .menuTitle");
if (savingState.slot === null) {
menuTitle.innerHTML = "Save to File";
}
else {
menuTitle.innerHTML = "Save to Slot";
if (localStorage["SandboxelsSaves/"+savingState.slot]) {
saveWarning.innerHTML += "<br>This will overwrite the save in slot "+savingState.slot+"!";
}
}
var saveMods = document.getElementById("saveMods");
if (enabledMods.length !== 0) {
saveMods.style.display = "inline-block";
saveWarning.innerHTML += "<br>Mods might not be necessary to include, and may annoy the user!";
}
else { saveMods.style.display = "none"; }
savePromptParent.style.display = "block";
showingMenu = "savePrompt";
document.getElementById("saveName").focus();
}
function showSettings() {
var settingsParent = document.getElementById("settingsParent");
settingsParent.style.display = "block";
showingMenu = "settings";
}
function setSetting(setting,value) {
settings[setting] = value;
saveSettings();
}
function toggleInput(input,setting,updateText) {
if (input.getAttribute("state") === "0") {
input.setAttribute("state","1");
if (updateText !== false) { input.value = "ON"; }
if (setting) { setSetting(setting,1); }
}
else {
input.setAttribute("state","0");
if (updateText !== false) { input.value = "OFF"; }
if (setting) { setSetting(setting,0); }
}
}

299
mods/fools+.js Normal file
View File

@ -0,0 +1,299 @@
// all the credits go to R74n
// made worse by sqec
// i'm sorry, here's some poorly made ascii art bleach for your eyes
// tbh most of it was copied from index.html or fools.js
// moss inspired
// code messy don't read
/*
_____
| |
|--------.
| \
| |\ \
| | \ \
| \ \ \
| \_| .
| |
| BLEACH |
| 12floz |
| |
|_____________|
*/
behaviors.CRASH = [
"XX|XX|XX",
"XX|EX:100000>flash|XX",
"XX|XX|XX",
]
fonts = ["Webdings","Comic Sans MS","Times New Roman","Monospace","Wingdings","Courier New",
"Papyrus","Impact","Curlz MT","Jokerman","Segoe Script","Bradley Hand ITC"]
funnysavenames = ["identity theft","the saveinator","Save 95","nuclear reactor","stomach man",
"calculator","potato chip","bread bowl","more gun","error 704 save not found","fortnite dance",
"foghorn","Unknown","mixup save","balls 🏀","sbave","the moss field","uhhhh",
"Grumman f-14 tomcat fighter jet","mcdonnell douglas f-15 eagle fighter jet",
"untextured unrigged blender brick","rebar","the giant enemy spider",
"statue of ryan","🟩","🟥","the temple of ryan","🌳 🌳 🌳","R74n ripoff",
"the powder toy","tpt save","save from tpt","sand:box save","sandspiel save",
"cool plane","big mac with uranium","nyc","mountain thing","Slot NaN","Slot 1",
"Slot 1.5","Slot pi","Slot golden ratio","Slot Infinity","Computer thing","Pro Kitchen",
"Airport","Coconut Plantation","Eiffel Tower","car"]
allproperties = {}
skipproperties = ["color", "colorOn", "forceAutoGen", "name", "category", "colorObject", "hidden", "tempHigh", "tempLow", "stateHigh", "stateLow"]
goodproperties = ["behavior","tick"]
elements.molten_rad_glass.color = "#ffffff"
for (element in elements) {
var elementdata = elements[element]
if (elementdata.category === "tools") { continue }
for (property in elementdata) {
//if (skipproperties.indexOf(property) !== -1) { continue }
// only use properties that are in goodproperties
if (goodproperties.indexOf(property) === -1) { continue }
if (!allproperties[property]) {
allproperties[property] = []
}
allproperties[property].push(elementdata[property])
}
}
// delete all properties from elements except skipproperties
for (element in elements) {
var elementdata = elements[element]
if (elementdata.category === "tools") { continue }
for (property in elementdata) {
//if (skipproperties.indexOf(property) === -1) {
// only delete properties that are in goodproperties
if (goodproperties.indexOf(property) !== -1) {
delete elementdata[property]
}
}
}
// make a randomized shuffled list of all elements
var elementlist = Object.keys(elements)
elementlist.sort(function() { return 0.5 - Math.random() })
// randomly assign properties to elements
for (property in allproperties) {
// list of values for this property
var propertyvalues = allproperties[property]
// loop through elements, assigning values until we run out
for (var i = 0; i < elementlist.length; i++) {
if (i >= propertyvalues.length) { break }
var element = elementlist[i]
var elementdata = elements[element]
elementdata[property] = propertyvalues[i]
}
// reshuffle the list of elements
elementlist.sort(function() { return 0.5 - Math.random() })
}
// choose random values for properties
for (element in elements) {
elementdata = elements[element]
if (elementdata.category === "tools") { continue }
// set tempHigh to a random value between 0 and 10000
elementdata.tempHigh = Math.floor(Math.random() * 10000)
// set tempLow to a random value between -273 and 0
elementdata.tempLow = Math.floor(Math.random() * 273) - 273
if (elementdata.stateHigh) {
elementdata.stateHigh = elementlist[Math.floor(Math.random() * elementlist.length)]
}
if (elementdata.stateLow) {
elementdata.stateLow = elementlist[Math.floor(Math.random() * elementlist.length)]
}
if (elementdata.reactions) {
for (reactant in elementdata.reactions) {
elementdata.reactions[reactant].elem1 = elementlist[Math.floor(Math.random() * elementlist.length)]
elementdata.reactions[reactant].elem2 = elementlist[Math.floor(Math.random() * elementlist.length)]
elementdata.reactions[elementlist[Math.floor(Math.random() * elementlist.length)]] = elementdata.reactions[reactant]
delete elementdata.reactions[reactant]
}
}
}
// Generate random hex color codes
function getRandomHexColor() {
let hex = '#';
for (let i = 0; i < 6; i++) {
hex += Math.floor(Math.random() * 16).toString(16);
}
return hex;
}
//random word generator
function generateRandomWord() {
let word = '';
const letters = 'abcdefghijklmnopqrstuvwxyz';
// Generate random word
for(let i = 0; i < Math.floor(Math.random() * 20); i++) {
word += letters.charAt(Math.floor(Math.random() * letters.length));
}
// Randomly add spaces
for(let i = 0; i < word.length; i++) {
if(Math.random() < 0.2) {
word = word.slice(0, i) + ' ' + word.slice(i);
}
}
return word;
}
// Set random colors
for (let element in elements) {
let elementData = elements[element];
if (Math.random() < 0.3) {
elementData.color = [getRandomHexColor(),getRandomHexColor(),getRandomHexColor()];
}
else if (Math.random() < 0.5) {
elementData.color = [getRandomHexColor(),getRandomHexColor()];
}
else if (Math.random() < 0.8) {
elementData.color = getRandomHexColor();
}
else {
elementData.color = [getRandomHexColor(),getRandomHexColor(),getRandomHexColor(),getRandomHexColor(),getRandomHexColor()];
}
}
// Set random category
for (let element in elements) {
let elementData = elements[element];
if (elementData.category === "tools") { continue }
elementData.category = generateRandomWord();
}
runAfterLoad(function() {
pixelTempCheckTemp = pixelTempCheck
pixelTempCheck = function(pixel) {
try {
pixelTempCheckTemp(pixel)
}
catch (e) {}
}
})
var fonttouse = fonts[Math.floor(Math.random() * fonts.length)]
runAfterLoad(function() {
//inverts scroll direction
if (navigator.platform.toUpperCase().indexOf('MAC')>=0) {
settings.invertscroll = false;
}
else {
settings.invertscroll = true;
}
// change every font to to random
var css = document.createElement("style")
css.innerHTML = "* { font-family: "+fonttouse+" !important; font-size: 32px !important;}"
document.body.appendChild(css)
// randomize background color
document.body.style.backgroundColor = "rgb(" + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) + ")"
document.body.style.color = "rgb(" + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) + ")"
document.body.style.textShadow = "20px 0px "+getRandomHexColor();
// replace choose element so it's impossible to find any element
chooseElementPrompt = function() {
alert("This feature is disabled for April Fools Day :)")
}
//showSaves = function() {
// alert("This feature is disabled for April Fools Day :)")
//}
showSaves = function() {
var savesParent = document.getElementById("savesParent");
var saveSlotList = document.getElementById("saveSlotList");
saveSlotList.innerHTML = "";
// loop 12 times, checking if local storage SandboxelsSaves/x exists
// <span class="saveSlot">Slot 1 <span disabled="true">Clear</span> <span disabled="true">Load</span> <span onclick="saveSlot(2)">Save</span></span>
// <span class="saveSlot">Unnamed <span onclick="clearSlot(2)">Clear</span> <span onclick="loadSlot(2)">Load</span> <span onclick="saveSlot(2)">Save</span></span>
for (var i = 1; i < 13; i++) {
var save = localStorage.getItem("SandboxelsSaves/"+i);
var name = funnysavenames[Math.floor(Math.random() * funnysavenames.length)];
if (save) {
name = JSON.parse(save).meta.name || "Unnamed";
name = name.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
// truncate
if (name.length > 16) { name = name.substring(0,16)+"..."; }
saveSlotList.innerHTML += "<span id='saveSlot"+i+"' data-name='"+name+"' class='saveSlot'><span class='saveSlotName'>"+name+"</span> <span onclick='clearSlot("+i+")' class='saveOption'>Clear</span> <span onclick='loadSlot("+i+")' class='saveOption'>Load</span> <span onclick='saveSlot("+i+")' class='saveOption'>Save</span></span>";
}
else {
saveSlotList.innerHTML += "<span id='saveSlot"+i+"' data-name='"+name+"' class='saveSlot'><span class='saveSlotName'>"+name+"</span> <span disabled='true' class='saveOption'>Clear</span> <span disabled='true' class='saveOption'>Load</span> <span onclick='saveSlot("+i+")' class='saveOption'>Save</span></span>";
}
}
savesParent.style.display = "block";
showingMenu = "saves";
}
// set zoom to 110%. it doesn't do anything but apparently offsets the brush? what.
document.body.style.zoom = "110%";
// set background (game background not page background) to a random color
setSetting('bg',getRandomHexColor());
// no more pause for you!
togglePause = function() {
alert("This feature is disabled for April Fools Day :)")
}
// Get all element keys
const elementsList = Object.keys(elements);
// Shuffle the keys randomly
elementsList.sort(() => Math.random() - 0.5);
// Create new shuffled elements object
const shuffledElements = {};
// Add elements to new object in shuffled order
elementsList.forEach(key => {
shuffledElements[key] = elements[key];
// blurs page
document.body.style.filter = "blur(0.8px)";
});
// Replace original with shuffled version
elements = shuffledElements;
})
// generate random element
function selectRandomElement() {
const elementKeys = Object.keys(elements);
const randomIndex = Math.floor(Math.random() * elementKeys.length);
const randomElementKey = elementKeys[randomIndex];
return elements[randomElementKey].name;
}
// randomly increases or decreases mouse size
setInterval(function(){
if (Math.random() < 0.5) {
if (Math.random() < 0.5) {
mouseSize = mouseSize + 1;
}
else {
mouseSize = mouseSize - 1;
}
}
if (Math.random() < 0.05) {
selectElement(selectRandomElement());
}
// evil random popup
if (Math.random() < 0.005) {
alert("funny popup");
}
// useless prompt
if (Math.random() < 0.005) {
var funnyuselessprompt = prompt("funny prompt");
}
if (Math.random() < 0.2) {
tps = tps + Math.round(Math.random()*4)-2;
}
if (Math.random() < 0.005) {
tps = 1000
}
if (Math.random() < 0.05) {
tps = 30
}
// every once in a while, everythign randomises
if (Math.random() < 0.1) {
document.body.style.color = getRandomHexColor();
document.body.style.textShadow = "20px 0px "+getRandomHexColor();
document.body.style.backgroundColor = "rgb(" + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) + ")"
setSetting('bg',getRandomHexColor());
}
}, 200);

842
mods/fools24.js Normal file
View File

@ -0,0 +1,842 @@
/*
[Version 5.9.1 - April 1, 2024 - Multiversal Update]
+ Multiverse Time Travel
+ Use Timeline controls to navigate multidimensional space
+ Split off from your current timeline
+ Eat tool
+ Mirror Dimension
+ Access by throwing a test subject into a Mirror Portal
+ Moon
+ Moon Rock (Hidden)
+ Freeze tool
+ Freeze Ray
+ Air
+ UFO
+ Life Force
+ Carbon
+ Photon
+ Electron
+ BBQ Sauce
+ Mustard
+ Holy Grenade
+ Ice Ten
+ Love (Amends anuran ailments)
+ Love Bomb
+ Dirt Bomb
+ Cluster Cluster Bomb
+ Cherry
+ Blueberry
+ Olive
+ Blue Cheese
+ Toad
+ Mouse
+ Basketball
+ Baseball
+ Tennis Ball
+ Quirky Paint
+ Pen tool
+ Cursor
+ Powder
+ Footprint
+ Light Ice (Hidden)
+ Big Bang (Hidden)
[Changes]
+ 68% of Humans are lactose intolerant
+ 1% of Humans are gluten intolerant
+ Humans now drink Water
- Removed Gender Binary
+ Fireflies have a distinct sound
+ Bless converts Antimatter and Strange Matter to Normal Matter
+ Bless removes money, the root of all evil
+ Bless converts Plastic to eco-friendly Paper
+ Bless converts Water to Wine
+ Pb&J recipe
+ Helium can freeze again
+ Helium increases pitch of Human voice
- Removed Blood
~ Birds have been recolored as tribute
~ Udders produce many kinds of Milk
~ Cheerful Mode now hides ALL weapons
~ Moved Firework to Machines
~ Moved Ball to Special
~ Renamed Gray Goo to Grey Goo
~ Renamed Molten Tin to Moltin
~ Unhid Supernova
+ Re-added Cluster Bomb
[Bug Fixes]
~ Fixed: Water is not wet
*/
currentversion = "5.9.1"
if (!elements.bless.reactions) { elements.bless.reactions = {}; }
elements.bless.reactions.gold_coin = { elem2:null }
elements.bless.reactions.plastic = { elem2:"paper" }
elements.bless.reactions.bead = { elem2:"sawdust" }
elements.bless.reactions.water = { elem2:"alcohol", color2:"#722F37" }
if (!elements.lead.reactions) { elements.lead.reactions = {}; }
elements.lead.reactions.grape = { elem1:"nut_butter", elem2:"jelly" }
elements.lead.reactions.jelly = { elem1:"nut_butter" }
elements.head.tempTick = elements.head.tick
elements.head.tick = function(pixel) {
elements.head.tempTick(pixel);
if (!pixel.sus) { // susceptibility to disease
pixel.sus = Math.random();
}
}
if (!elements.head.reactions) { elements.head.reactions = {}; }
var lactoseReaction = function(pixel) {
if (pixel.sus < 0.68) { changePixel(pixel,"explosion") }
}
var glutenReaction = function(pixel) {
if (pixel.sus < 0.01) { changePixel(pixel,"explosion") }
}
elements.head.reactions.milk = { chance:0.1, func:lactoseReaction }
elements.head.reactions.cheese = { chance:0.1, func:lactoseReaction }
elements.head.reactions.butter = { chance:0.1, func:lactoseReaction }
elements.head.reactions.melted_cheese = { chance:0.1, func:lactoseReaction }
elements.head.reactions.melted_butter = { chance:0.1, func:lactoseReaction }
elements.head.reactions.yogurt = { chance:0.1, func:lactoseReaction }
elements.head.reactions.ice_cream = { chance:0.1, func:lactoseReaction }
elements.head.reactions.cream = { chance:0.1, func:lactoseReaction }
elements.head.reactions.frozen_yogurt = { chance:0.1, func:lactoseReaction }
elements.head.reactions.wheat = { chance:0.1, func:glutenReaction }
elements.head.reactions.bread = { chance:0.1, func:glutenReaction }
elements.head.reactions.toast = { chance:0.1, func:glutenReaction }
elements.head.reactions.gingerbread = { chance:0.1, func:glutenReaction }
elements.head.reactions.batter = { chance:0.1, func:glutenReaction }
elements.head.reactions.flour = { chance:0.1, func:glutenReaction }
elements.head.reactions.baked_batter = { chance:0.1, func:glutenReaction }
elements.head.reactions.water = { elem2:null, chance:0.1 }
elements.head.reactions.sugar_water = { elem2:null, chance:0.1 }
elements.head.reactions.seltzer = { elem2:null, chance:0.1 }
elements.body.color = "#069469";
elements.firework.category = "machines";
elements.normal_matter = {
color: "#9ba89b",
behavior: [
"M2|M2|M2",
"M1|XX|M1",
"M1|M1|M1",
],
category: "special",
state: "gas",
density: 2.1,
hidden: true
};
elements.bless.reactions.antimatter = { elem2:"normal_matter" }
elements.bless.reactions.strange_matter = { elem2:"normal_matter" }
elements.ice_ten = {
color: ["#84d0ff","#85daff","#80ffff"],
behavior: [
"XX|XX|XX",
"XX|CH:ice%0.5|XX",
"M2|M1|M2",
],
reactions: {
"ice_ten": { func:function(pixel1,pixel2){
var pixels = currentPixels.slice();
for (var i = 0; i < pixels.length; i++) {
var pixel = pixels[i];
pixel.temp = -10000;
pixelTempCheck(pixel);
}
}, elem1:null, elem2:null },
},
temp:-100,
category: "special",
state: "solid",
density: 917,
excludeRandom: true
};
elements.gray_goo.name = "grey_goo";
elements.big_bang = {
color: ["#ffebeb","#ffc9c9","#ffabab"],
behavior: [
"XX|XX|XX",
"XX|EX:200>hydrogen,neutron,proton,electric AND CH:void|XX",
"XX|XX|XX",
],
temp: 1000000000000000,
category: "energy",
state: "gas",
density: 1000,
hardness: 1,
hidden: true,
excludeRandom: true,
maxSize: 1,
cooldown: defaultCooldown,
noMix: true
};
elements.blood.name = "life_force";
elements.blood.color = ["#99ff00","#d9ff00"];
delete elements.blood_ice.color;
elements.blood_ice.name = "life_force_ice";
elements.holy_grenade = {
color: "#fffd6a",
behavior: [
"XX|EX:10>bless|XX",
"XX|XX|XX",
"M2|M1 AND EX:10>bless|M2",
],
category: "weapons",
state: "solid",
density: 1300,
excludeRandom: true,
cooldown: defaultCooldown
}
elements.love = {
color: ["#fccbff","#ff9edf","#ff5cb6"],
behavior: [
"M2|M1|M2",
"M1|DL%25|M1",
"M2|M1|M2",
],
temp:20,
state: "gas",
density: 0.001,
canPlace: true,
category: "energy",
stain: -0.5
};
elements.love.reactions = elements.bless.reactions;
elements.love.tool = elements.bless.tool;
if (!elements.frog.reactions) { elements.frog.reactions = {}; }
elements.frog.reactions.love = { elem1:"human" }
if (!elements.bomb.reactions) { elements.bomb.reactions = {}; }
elements.bomb.reactions.love = { elem1:"love_bomb" }
if (!elements.grenade.reactions) { elements.grenade.reactions = {}; }
elements.grenade.reactions.love = { elem1:"love_bomb" }
elements.love_bomb = {
color: "#ff84f1",
behavior: [
"XX|EX:10>love|XX",
"XX|XX|XX",
"M2|M1 AND EX:10>love|M2",
],
category: "weapons",
state: "solid",
density: 1300,
excludeRandom: true,
cooldown: defaultCooldown
}
elements.dirt_bomb = {
color: "#694805",
behavior: [
"XX|EX:10>dirt|XX",
"XX|XX|XX",
"M2|M1 AND EX:10>dirt|M2",
],
category: "weapons",
state: "solid",
density: 1300,
excludeRandom: true,
cooldown: defaultCooldown
}
elements.cluster_bomb = {
color: "#7d776d",
behavior: [
"XX|EX:10>smoke,smoke,smoke,smoke,smoke,grenade%1|XX",
"XX|XX|XX",
"M2|M1 AND EX:10>smoke,smoke,smoke,smoke,smoke,grenade%1|M2",
],
category: "weapons",
state: "solid",
density: 1300,
tempHigh: 1455.5,
stateHigh: "molten_steel",
excludeRandom: true,
cooldown: defaultCooldown
}
elements.cluster_cluster_bomb = {
color: "#c1b7a5",
behavior: [
"XX|EX:10>smoke,smoke,smoke,smoke,smoke,cluster_bomb%1|XX",
"XX|XX|XX",
"M2|M1 AND EX:10>smoke,smoke,smoke,smoke,smoke,cluster_bomb%1|M2",
],
category: "weapons",
state: "solid",
density: 1300,
tempHigh: 1455.5,
stateHigh: "molten_steel",
excludeRandom: true,
cooldown: defaultCooldown
}
elements.bbq_sauce = {
color: "#571E1A",
behavior: behaviors.LIQUID,
viscosity: 50000,
tempHigh: 260,
stateHigh: ["carbon_dioxide","methane","steam","salt","sugar"],
category:"liquids",
state: "liquid",
density: 1235,
stain: 0.05,
isFood: true
}
if (!elements.ketchup.reactions) { elements.ketchup.reactions = {}; }
elements.ketchup.reactions.molasses = { elem1:"bbq_sauce", elem2:"bbq_sauce" }
elements.mustard = {
color: "#e1ad01",
behavior: behaviors.LIQUID,
viscosity: 50000,
tempHigh: 260,
stateHigh: ["carbon_dioxide","methane","steam","sugar"],
category:"liquids",
state: "liquid",
density: 1235,
stain: 0.05,
isFood: true
}
elements.cherry = {
color: ["#ff295b","#ff212c","#ff1f1f","#ff4e33"],
behavior: behaviors.POWDER,
reactions: {
"rock": { elem1:"juice", chance:0.1, color1:"#8e0000" },
"concrete": { elem1:"juice", chance:0.1, color1:"#8e0000" },
"basalt": { elem1:"juice", chance:0.1, color1:"#8e0000" },
"limestone": { elem1:"juice", chance:0.1, color1:"#8e0000" },
"tuff": { elem1:"juice", chance:0.1, color1:"#8e0000" },
"water": { elem2:"juice", chance:0.005, color2:"#8e0000" },
"sugar_water": { elem2:"juice", chance:0.025, color2:"#8e0000" },
"acid": { elem1:"juice", color1:"#8e0000" },
"acid_gas": { elem1:"juice", color1:"#8e0000" },
},
tempHigh: 256,
stateHigh: ["steam","sugar"],
category: "food",
state: "solid",
density: 1154,
breakInto: "juice",
breakIntoColor: "#8e0000",
ignoreAir: true,
isFood: true
}
elements.blueberry = {
color: ["#4929ff","#5821ff","#221cc8","#2406a0"],
behavior: behaviors.POWDER,
reactions: {
"rock": { elem1:"juice", chance:0.1, color1:"#1b1259" },
"concrete": { elem1:"juice", chance:0.1, color1:"#1b1259" },
"basalt": { elem1:"juice", chance:0.1, color1:"#1b1259" },
"limestone": { elem1:"juice", chance:0.1, color1:"#1b1259" },
"tuff": { elem1:"juice", chance:0.1, color1:"#1b1259" },
"water": { elem2:"juice", chance:0.005, color2:"#1b1259" },
"sugar_water": { elem2:"juice", chance:0.025, color2:"#1b1259" },
"acid": { elem1:"juice", color1:"#1b1259" },
"acid_gas": { elem1:"juice", color1:"#1b1259" },
},
tempHigh: 256,
stateHigh: ["steam","sugar"],
category: "food",
state: "solid",
density: 1154,
breakInto: "juice",
breakIntoColor: "#1b1259",
ignoreAir: true,
isFood: true
}
elements.olive = {
color: ["#808000","#91912c","#a1a148","#686800"],
behavior: behaviors.POWDER,
reactions: {
"rock": { elem1:"juice", chance:0.1, color1:"#ebeb55" },
"concrete": { elem1:"juice", chance:0.1, color1:"#ebeb55" },
"basalt": { elem1:"juice", chance:0.1, color1:"#ebeb55" },
"limestone": { elem1:"juice", chance:0.1, color1:"#ebeb55" },
"tuff": { elem1:"juice", chance:0.1, color1:"#ebeb55" },
"water": { elem2:"juice", chance:0.005, color2:"#ebeb55" },
"sugar_water": { elem2:"juice", chance:0.025, color2:"#ebeb55" },
"acid": { elem1:"juice", color1:"#ebeb55" },
"acid_gas": { elem1:"juice", color1:"#ebeb55" },
},
tempHigh: 256,
stateHigh: ["steam","sugar"],
category: "food",
state: "solid",
density: 1154,
breakInto: "juice",
breakIntoColor: "#ebeb55",
ignoreAir: true,
isFood: true
}
elements.carbon = elements.charcoal;
elements.photon = elements.light;
elements.electron = elements.electric;
elements.blue_cheese = {
color: "#0352fc",
behavior: behaviors.STURDYPOWDER,
tempHigh: 54,
stateHigh: "melted_cheese",
category: "food",
state: "solid",
density: 477.62,
isFood: true
};
if (elements.cheese.reactions) { elements.blue_cheese.reactions = elements.cheese.reactions; }
elements.moon = {
color: ["#b9b9b9","#8e8e8e","#b9b9b9"],
behavior: behaviors.WALL,
tempHigh: 100,
stateHigh: "melted_cheese",
category: "special",
state: "solid",
density: 3300,
insulate: true,
noMix: true,
alias: "satellite",
movable: false,
hardness: 0.8,
breakInto: "moon_rock"
};
if (!elements.light.reactions) { elements.light.reactions = {}; }
elements.light.reactions.moon = { color1:"#ffffff" }
elements.light.reactions.moon_rock = { color1:"#ffffff" }
elements.moon_rock = {
color: ["#b9b9b9","#a3a3a3","#898989"],
behavior: behaviors.POWDER,
tempHigh: 100,
stateHigh: "melted_cheese",
category: "land",
state: "solid",
density: 3300,
hardness: 0.25,
breakInto: "dust",
hidden: true,
alias: "lunar_rock"
};
if (elements.rock.reactions) { elements.moon_rock.reactions = elements.rock.reactions; }
elements.toad = elements.frog;
elements.mouse = {
color: ["#aaaaaa","#8a8a8a","#cdcdcd"],
behavior: [
"XX|M2%1.5|M2%5",
"XX|FX%2|M2 AND BO",
"XX|M1|M2",
],
egg: "mouse",
category: "life",
temp: 37.6,
tempHigh: 120,
stateHigh: "cooked_meat",
tempLow: -18,
stateLow: "frozen_meat",
breakInto: "blood",
burn:80,
burnTime:150,
state: "solid",
density: 1450,
conduct: 0.25
};
elements.bless.reactions.rat = { elem2:"mouse" }
elements.ball.hidden = false;
elements.basketball = {
color: "#d14b17",
behavior: [
"XX|XX|XX",
"XX|FY:0%5|XX",
"XX|M1 AND BO|XX",
],
tempHigh: 250,
stateHigh: "molten_plastic",
category: "special",
flipY: false,
flippableY: true,
};
elements.baseball = {
color: "#d7d7d7",
behavior: [
"XX|XX|XX",
"XX|FY:0%5|XX",
"XX|M1 AND BO|XX",
],
tempHigh: 250,
stateHigh: "molten_plastic",
category: "special",
flipY: false,
flippableY: true,
};
elements.tennis_ball = {
color: "#c2ff48",
behavior: [
"XX|XX|XX",
"XX|FY:0%5|XX",
"XX|M1 AND BO|XX",
],
tempHigh: 250,
stateHigh: "molten_plastic",
category: "special",
flipY: false,
flippableY: true,
};
elements.supernova.hidden = false;
elements.quirky_paint = {
color: ["#b1b1b1","#9dc270","#c170c2","#107f10","#442f21","#ff6e6e","#34555f"],
tool: function(pixel) {
var hexcode = "#"+(Math.floor(Math.random()*16777215).toString(16).padStart(6,"0"));
pixel.color = pixelColorPick(pixel,hexcode);
delete pixel.origColor;
},
category: "special",
canPlace: false,
desc: "Use on pixels to change color randomly."
};
elements.bird.color = "#1DA1F2";
elements.freeze = {
color: ["#b1e5ff","#6e89ec"],
tool: function(pixel) {
pixel.temp -= 1000;
pixelTempCheck(pixel);
},
category: "energy",
excludeRandom: true
};
elements.freeze_ray = {
color: ["#00aaff","#0037ff"],
tick: function(pixel) {
var x = pixel.x;
for (var y = pixel.y; y < height; y++) {
if (outOfBounds(x, y)) {
break;
}
if (isEmpty(x, y)) {
if (Math.random() > 0.05) { continue }
createPixel("flash", x, y);
pixelMap[x][y].color = "#00aaff";
pixelMap[x][y].temp = -200;
}
else {
if (elements[pixelMap[x][y].element].isGas) { continue }
if (elements[pixelMap[x][y].element].id === elements.heat_ray.id) { break }
pixelMap[x][y].temp -= 100;
pixelTempCheck(pixelMap[x][y]);
break;
}
}
deletePixel(pixel.x, pixel.y);
},
temp: -200,
category: "energy",
state: "gas",
density: 1,
excludeRandom: true,
noMix: true
};
elements.ufo = {
color: "#9ddfa3",
behavior: [
"XX|XX|XX",
"XX|FX%5|M1%50",
"XX|XX|XX"
],
tick: function(pixel) {
if (pixel.ray) {
if (isEmpty(pixel.x,pixel.y+1)) {
createPixel(pixel.ray,pixel.x,pixel.y+1);
}
if (Math.random() < 0.1) {
pixel.ray = null;
}
}
else if (Math.random() < 0.1) {
var rays = ["heat_ray","freeze_ray","god_ray"];
pixel.ray = rays[Math.floor(Math.random()*rays.length)];
}
},
breakInto: ["metal_scrap","slime"],
category: "special"
};
elements.udder.tick = function(pixel) {
if (Math.random() <= 0.025 && isEmpty(pixel.x,pixel.y+1)) {
var milks = ["milk","pilk","chocolate_milk","fruit_milk","eggnog"];
var milk = milks[Math.floor(Math.random()*milks.length)];
createPixel(milk,pixel.x,pixel.y+1);
pixelMap[pixel.x][pixel.y+1].temp = 38;
}
doDefaults(pixel);
};
elements.liquid_light.tempLow = -1000;
elements.liquid_light.stateLowName = "light_ice";
elements.light_ice = {
behavior: behaviors.WALL,
state: "solid",
}
fireflySound = null;
elements.firefly.onSelect = function() {
fireflySound = new Audio("https://archive.org/download/09Fireflies/09%20Fireflies.mp3");
}
elements.firefly.onMouseDown = function() {
if (fireflySound) { fireflySound.play(); }
}
elements.pen = {
color: "#000000",
tool: function(pixel) {
if (pixel.element === "paper") {
pixel.color = pixelColorPick(pixel,"#000000");
}
},
category: "special",
desc: "Draws on Paper."
}
elements.eat = {
color: ["#ffba79","#efff79"],
tool: function(pixel) {
if (elements[pixel.element].isFood) {
deletePixel(pixel.x,pixel.y);
}
},
category: "tools",
desc: "Consumes edible pixels."
}
elements.molten_tin.name = "moltin";
elements.ball.category = "energy";
elements.liquid_helium.tempLow = -272;
elements.cursor = {
color: ["#000000","#00ff00"],
behavior: behaviors.WALL,
tick: function(pixel) {
if (pixelTicks % 60 < 30) {
pixel.color = "#000000";
}
else {
pixel.color = "#00ff00";
}
},
category: "special",
related: "pointer"
}
elements.pointer.related = "cursor";
elements.footprint = {
color: ["#73777A","#B3B7BA","#F3F7FA"],
colorPattern: [
"00000001",
"01111112",
"01111112",
"01111112",
"01111112",
"01111112",
"01111112",
"12222222",
],
colorKey: {
"0": "#73777A",
"1": "#B3B7BA",
"2": "#F3F7FA",
},
behavior: behaviors.WALL,
category: "special"
}
elements.air = {
color: "#000000",
tool: function(){},
category: "gases"
}
elements.powder = {
color: "#ffffff",
colorPattern: ["F"],
colorKey: { "F": "#ffffff" },
behavior: behaviors.POWDER,
category: "powders",
state: "solid",
}
inMirrorDimension = false;
function getMousePos(canvas, evt) {
// If evt.touches is defined, use the first touch
if (evt.touches) {
evt.preventDefault();
evt = evt.touches[0];
isMobile = true;
}
var rect = canvas.getBoundingClientRect();
return {
// Round to nearest pixel
x: Math.round((evt.clientX - rect.left)/pixelSize-0.5),
y: Math.round((evt.clientY - rect.top)/pixelSize-0.5)
};
}
oldGetMousePos = getMousePos;
elements.mirror_portal = {
color: ["#e07aff","#693778","#4b2843","#1f0f1b"],
behavior: [
"XX|SW:mirror_portal%10|XX",
"SW:mirror_portal%10|XX|SW:mirror_portal%10",
"XX|SW:mirror_portal%10|XX"
],
category: "special",
reactions: {
"body": {
func: function() {
if (!inMirrorDimension) {
inMirrorDimension = true;
for (var i = 0; i < currentPixels.length; i++) {
var pixel = currentPixels[i];
if (pixel.element === "mirror_portal") {
deletePixel(pixel.x,pixel.y);
i--;
}
}
document.head.insertAdjacentHTML("beforeend",`
<style id="mirrorDimensionStyle">
#game {-moz-transform: scale(-1, -1);
-o-transform: scale(-1, -1);
-webkit-transform: scale(-1, -1);
transform: scale(-1, -1);
filter: invert(100%);}
.elementButton {filter: invert(100%);}
.pagetitle::after { content:" Bandsoxels" }
</style>
`);
// invert the math in getMousePos
getMousePos = function(canvas, evt) {
if (evt.touches) {
evt.preventDefault();
evt = evt.touches[0];
isMobile = true;
}
var rect = canvas.getBoundingClientRect();
return {
x: Math.round((rect.right - evt.clientX)/pixelSize-0.5),
y: Math.round((rect.bottom - evt.clientY)/pixelSize-0.5)
};
}
}
else {
inMirrorDimension = false;
document.getElementById("mirrorDimensionStyle").remove();
for (var i = 0; i < currentPixels.length; i++) {
var pixel = currentPixels[i];
if (pixel.element === "mirror_portal") {
deletePixel(pixel.x,pixel.y);
i--;
}
}
getMousePos = oldGetMousePos;
}
},
}
},
}
for (var element in elements) {
var info = elements[element];
if (info.category === "weapons") {
info.nocheer = true
}
}
multiverseTimelines = [];
multiverseIndex = 0;
function saveTimeline() {
// save at current index
multiverseTimelines[multiverseIndex] = generateSave(undefined,{keep:["temp","color"]});
}
function splitTimeline() {
saveTimeline();
var newSave = generateSave(undefined,{keep:["temp","color"]});
// add new timeline one after current
multiverseTimelines.splice(multiverseIndex+1,0,newSave);
loadTimeline(multiverseIndex+1);
}
function newTimeline() {
// add new timeline at end
saveTimeline();
clearAll();
multiverseIndex = multiverseTimelines.length;
saveTimeline();
loadTimeline(multiverseIndex);
}
function loadTimeline(i) {
multiverseIndex = i;
loadSave(multiverseTimelines[i]);
document.getElementById("timelineIndex").textContent = i;
}
function nextTimeline() {
saveTimeline();
if (multiverseIndex === multiverseTimelines.length-1) {
newTimeline();
return
}
loadTimeline(multiverseIndex+1);
}
function prevTimeline() {
saveTimeline();
if (multiverseIndex === 0) {
return
}
loadTimeline(multiverseIndex-1);
}
function redoTimeline() {
loadTimeline(multiverseIndex);
}
function deleteTimeline() {
multiverseTimelines.splice(multiverseIndex,1);
if (multiverseIndex === multiverseTimelines.length) {
multiverseIndex--;
}
if (multiverseTimelines.length < 1) {
newTimeline();
}
loadTimeline(multiverseIndex);
}
window.addEventListener("load", function() {
absoluteZero = -Infinity;
this.document.getElementById("elementControls").insertAdjacentHTML("afterend",`
<div style="display:block; padding:5px; font-size:13px">
<button onclick="location.search = '?fools=false'">Return to Normalcy</button>
</div>
`);
this.document.getElementById("elementControls").insertAdjacentHTML("afterend",`
<div style="display:block; padding:5px; font-size:13px">
Timeline-<span id="timelineIndex">0</span>:<button onclick="splitTimeline()">Split</button><button onclick="newTimeline()">New</button><button onclick="prevTimeline()">&lt;</button><button onclick="nextTimeline()">&gt;</button><button onclick="redoTimeline()">Redo</button><button onclick="deleteTimeline()">Delete</button>
</div>
`);
this.document.getElementById("thanksTo").insertAdjacentHTML("beforeend",`, and the friends we made along the way`);
})
window.addEventListener("keydown", function(e) {
if (e.ctrlKey || e.metaKey) {
return
}
})

View File

@ -74,6 +74,14 @@ class Type {
this.temp = undefined;
this.reactions = undefined;
this.viscosity = undefined;
this.conduct = undefined;
this.burn = undefined;
this.burning = undefined;
this.burnTime = undefined;
this.burnInto = undefined;
this.breakInto = undefined;
this.properties = undefined;
this.maxSize = undefined;
}
setColor(color) {
@ -87,38 +95,80 @@ class Type {
}
}
function createPowders() {
function createNirmics() {
const Ni = new Type("nirme");
Ni.setColor("22b14c");
Ni.setColor(["#5fcf80", "#22b14c", "#157330"]);
Ni.behavior = bb.POWDER;
Ni.category = cat.POWDERS;
Ni.state = state.SOLID;
Ni.density = 1752;
Ni.tempHigh = 365;
Ni.stateHigh = "nirliquid";
Ni.reactions = {
"water": { elem1: "dull_nirme", elem2: null },
"salt_water": { elem1: "dull_nirme", elem2: null },
"sugar_water": { elem1: "dull_nirme", elem2: null },
"seltzer": { elem1: "dull_nirme", elem2: null },
"dirty_water": { elem1: "dull_nirme", elem2: null },
"pool_water": { elem1: "dull_nirme", elem2: null },
"slush": { elem1: "dull_nirme", elem2: null },
"diamond": { elem2: "emerald", chance: 0.002 },
"sulfur": { elem1: "pop", elem2: null },
}
Ni.Add();
const DNi = new Type("dull_nirme");
DNi.setColor("5c916c");
DNi.setColor(["#518a62", "#487355"]);
DNi.behavior = bb.STURDYPOWDER;
DNi.category = cat.STATES;
DNi.state = state.SOLID;
DNi.density = 1752;
DNi.tempHigh = 365;
DNi.stateHigh = "nirliquid";
DNi.hidden = true;
DNi.Add();
const Em = new Type("emerald");
Em.setColor(["#00f49f", "#2fe094", "#b3ffd6", "#5fd9c5"]);
Em.behavior = bb.POWDER;
Em.category = cat.POWDERS;
Em.state = state.SOLID;
Em.density = 2750;
Em.Add();
const Nl = new Type("nirliquid");
Nl.setColor(["#68cc86", "#60b378", "#579c6b"]);
Nl.behavior = bb.LIQUID;
Nl.category = cat.LIQUIDS;
Nl.state = state.LIQUID;
Nl.density = 1711;
Nl.tempLow = -17;
Nl.stateLow = "nirme";
Nl.Add();
const Nr = new Type("nirmoll");
Nr.setColor("22b14c");
Nr.behavior = [
"M2%2 |XX|M2%2 ",
"M2%10|XX|M2%10",
"M1%25|M1|M1%25",
]
Nr.category = cat.LIFE;
Nr.state = state.SOLID;
Nr.density = 40;
Nr.tempHigh = 50;
Nr.stateHigh = "nirme";
Nr.tempHigh = 0;
Nr.stateHigh = "nirme";
Nr.breakInto = ["nirme", "nirme", "blood"];
Nr.reactions = {
"water": { elem1: "nirme" },
"salt_water": { elem1: "nirme" },
"sugar_water": { elem1: "nirme" },
"seltzer": { elem1: "nirme" },
"dirty_water": { elem1: "nirme" },
"pool_water": { elem1: "nirme" },
"slush": { elem1: "nirme" },
"acid": { elem1: "nirme" },
"poison": { elem1: "nirme" },
"egg": { elem2: "nirmoll", chance: 0.001 },
}
Nr.Add();
}
function createMetals() {
function createMinerals() {
const Tg = new Type("thingite");
Tg.setColor("4f5263");
Tg.behavior = bb.WALL;
@ -127,6 +177,7 @@ function createMetals() {
Tg.density = 9408;
Tg.tempHigh = 700;
Tg.stateHigh = "molten_thingite";
Tg.conduct = 0.41;
Tg.Add();
const MTg = new Type("molten_thingite");
@ -149,6 +200,7 @@ function createMetals() {
Or.density = 12403;
Or.tempHigh = 1600;
Or.stateHigh = "molten_orangium";
Or.conduct = 0.26;
Or.Add();
const MOr = new Type("molten_orangium");
@ -162,7 +214,59 @@ function createMetals() {
MOr.stateLow = "orangium";
MOr.hidden = true;
MOr.Add();
const Em = new Type("emerald");
Em.setColor(["#30e389", "#3ac98c", "#b3ffd6", "#5fd9c5"]);
Em.behavior = bb.POWDER;
Em.category = cat.POWDERS;
Em.state = state.SOLID;
Em.density = 2750;
Em.Add();
}
createPowders();
createMetals();
function createOther() {
const Fw = new Type("firewall");
Fw.setColor(["#ff6b21","#ffa600","#ff4000"]);
Fw.behavior = bb.WALL;
Fw.category = cat.SOLIDS;
Fw.state = state.SOLID;
Fw.density = 100;
Fw.temp = 600;
Fw.tempLow = 100;
Fw.stateLow = "wall";
Fw.tempHigh = 7000;
Fw.stateHigh = "plasma";
Fw.breakInto = "fire";
Fw.reactions = {
"water": { elem1: "wall", chance: 0.2 },
"steam": { elem1: "wall", chance: 0.2 },
"carbon_dioxide": { elem1: "wall", chance: 0.2 },
"foam": { elem1: "wall", chance: 0.2 },
"dirty_water": { elem1: "wall", chance: 0.2 },
"salt_water": { elem1: "wall", chance: 0.2 },
"sugar_water": { elem1: "wall", chance: 0.2 },
"seltzer": { elem1: "wall", chance: 0.2 },
"pool_water": { elem1: "wall", chance: 0.2 },
},
Fw.Add();
const Nz = new Type("nirmizer");
Nz.setColor("425949");
Nz.behavior = [
"XX |CH:nirme>nirmoll%10|XX ",
"CH:nirme>nirmoll%10|XX |CH:nirme>nirmoll%10",
"XX |CH:nirme>nirmoll%10|XX ",
]
Nz.category = cat.MACHINES;
Nz.state = state.SOLID;
Nz.density = 1220;
Nz.tempLow = -273;
Nz.stateLow = "nirme";
Nz.tempHigh = 3000;
Nz.stateHigh = "nirliquid";
Nz.Add();
}
createNirmics();
createMinerals();
createOther();

View File

@ -72,13 +72,46 @@ elements.subzero_grass = {
stateHigh: "dead_plant",
density:1400
},
elements.ruthenium = {
color: ["#ffffff","#c9c9c9","#b1b1b1","#9e9e9e","#888888"],
behavior: behaviors.STURDYPOWDER,
category: "powders",
state: "liquid",
tempHigh: 2334,
stateHigh: "molten_ruthenium",
density: 12370,
}
elements.molten_ruthenium = {
color: ["#ffc251", "#dd562c", "#e9a423", "#d8722e"],
behavior: behaviors.MOLTEN,
category: "states",
state: "liquid",
hidden: true,
density: 10650,
tempLow: 2330,
stateLow: "ruthenium"
}
elements.acid.ignore.push("ruthenium"),
elements.acid.ignore.push("molten_ruthenium"),
elements.acid_gas.ignore.push("ruthenium"),
elements.acid_gas.ignore.push("molten_ruthenium")
elements.technetium = {
color: ["#e7d9bb", "#bab195", "#8f8a70", "#66654e"],
behavior: [
"XX|XX|XX",
"XX|CH:neutron%0.07|XX",
"XX|XX|XX",
],
behavior: behaviors.WALL,
tick: function(pixel){
if(Math.random() < 0.0007){
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)){
createPixel("positron", x, y)
break;
}
}
changePixel(pixel, "ruthenium", false);
}
},
category: "solids",
state: "solid",
tempHigh: 2157,
@ -88,14 +121,24 @@ elements.technetium = {
},
elements.molten_technetium = {
color: ["#d16b42", "#da904c", "#dfb360", "#e2d57f"],
behavior: behaviors.LIQUID,
tick: function(pixel) {
if (Math.random() < 0.0007) {
changePixel(pixel, "neutron", false);
}
},
behavior: behaviors.MOLTEN,
tick: function(pixel){
if(Math.random() < 0.0007){
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)){
createPixel("positron", x, y)
break;
}
}
changePixel(pixel, "ruthenium", false);
}
},
category: "states",
state: "liquid",
hidden: true,
tempLow: 2140,
temp: 2200,
stateLow: "technetium",

130
mods/ocean.js Normal file
View File

@ -0,0 +1,130 @@
// made by sqec
elements.coral_stem = {
color: "#4a5e49",
behavior: [
"CH:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup>coral_stem,coral,coral%2|CH:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup>coral,coral_stem,coral,coral%2|CH:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup>coral_stem,coral,coral%2",
"XX|XX|XX",
"XX|XX|XX",
],
tick: function(pixel) {
if (!pixel.fColor) {
pixel.fColor = "hsl(" + Math.floor(Math.random()*360) + ",100%,50%)";
}
var coordsToCheck = [
[pixel.x-1,pixel.y],
[pixel.x+1,pixel.y],
[pixel.x,pixel.y-1],
[pixel.x,pixel.y+1],
]
for (var i = 0; i < coordsToCheck.length; i++) {
var coord = coordsToCheck[i];
if (isEmpty(coord[0],coord[1])) {
createPixel("coral",coord[0],coord[1]);
pixelMap[coord[0]][coord[1]].color = pixel.fColor;
}
}
doDefaults(pixel)
},
tempHigh: 100,
stateHigh: "dead_coral",
tempLow: -30,
stateLow: "dead_coral",
category: "life",
burn: 40,
burnTime: 50,
burnInto: [,"ember","charcoal"],
hidden: true,
state: "solid",
density: 1500,
hardness: 0.15,
hidden: true,
}
elements.coral = {
color: ["#ff0000","#ff8800","#ffff00","#88ff00","#00ff00","#00ff88","#00ffff","#0088ff","#0000ff","#8800ff","#ff00ff"],
behavior: [
"XX|XX|XX",
"XX|XX|XX",
"XX|XX|XX",
],
reactions: {
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035}
},
category:"life",
tempHigh: 100,
stateHigh: "dead_plant",
tempLow: -1.66,
stateLow: "frozen_plant",
burn:65,
burnTime:60,
burnInto: "dead_plant",
breakInto: "dead_plant",
state: "solid",
density: 1050,
hidden: true,
properties:{
"colored": false
}
}
elements.coral_egg = {
color: "#4a5e49",
behavior: [
"XX|XX|XX",
"XX|XX|XX",
"XX|M1 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup|XX",
],
tick: function(pixel) {
if (!isEmpty(pixel.x,pixel.y+1)) {
if (!outOfBounds(pixel.x,pixel.y+1)) {
var dirtPixel = pixelMap[pixel.x][pixel.y+1];
if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") {
changePixel(dirtPixel,"root");
changePixel(pixel,"coral_stem");
}
}
}
if (pixel.age > 100) {
changePixel(pixel,"coral_stem");
}
pixel.age++;
doDefaults(pixel)
},
tempHigh: 100,
stateHigh: "dead_coral",
tempLow: -30,
stateLow: "dead_coral",
category: "life",
burn: 40,
hidden: true,
state: "solid",
density: 1500,
hardness: 0.15,
properties:{
age:0
}
}
elements.dead_coral = {
color: "#ababab",
behavior: [
"XX|XX|XX",
"XX|XX|XX",
"XX|XX|XX",
],
reactions: {
"vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 },
"baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 },
"bleach": { elem1:"dead_plant", elem2:null, chance:0.05 },
"alcohol": { elem1:"dead_plant", elem2:null, chance:0.035}
},
stateHigh:"quicklime",
tempHigh:400,
category:"life",
burn:65,
breakInto: "quicklime",
state: "solid",
density: 1050,
hidden: true,
}

250
mods/pullers.js Normal file
View File

@ -0,0 +1,250 @@
// made by voidapex11
// a sandboxels mod that adds pullers
/*
==CHANGELOG==
Version 1.1.1#
@voidapex11
~initial comit
+pullersDesc
+imovable_inator& movable_inator
+imovable wall, steel & insulation
+L, R, U & D pullers
+void light&dark
~don't comit without permision as you may disrupt other dev's hard work
~update changelog with newer updates first
~Version format is:
rewrites.major updates.paches&minor feechers
put a '#' at end of version format if it has not been pushed to the github
~for change-log
'~' means notes/changes '+' means aditions and '-' is removals
*/
behaviors.SELFDELETE = [
"XX|XX|XX",
"XX|DL|XX",
"XX|XX|XX",
];
pullerColour = '#e0adb6'
elements.pullersDesc = {
color: pullerColour,
name: 'pullers.js',
category: "mods",
behavior: behaviors.SELFDELETE,
tool: function(pixel) {},
onSelect: function(pixel) {
let info1stMod = `pullers.js is a mod made by voidapex11 that adds pullers to sandboxels`
alert(info1stMod)
return
},
};
// for the inator reference: if you know you know
elements.imovable_inator = {
color: "#525252",
tool: function(pixel) {
pixel.imovable = true
},
category: "tools",
}
elements.movable_inator = {
color: "#a8a8a8",
tool: function(pixel) {
pixel.imovable = false
},
category: 'tools',
}
elements.imovable_wall = {
color: "#808080",
behavior: behaviors.WALL,
category: "solids",
insulate: true,
hardness: 1,
noMix: true,
properties: {
imovable: true
}
}
elements.imovable_steel = {
color: "#71797e",
behavior: behaviors.WALL,
reactions: {
"water": { elem1:"rust", chance:0.002 },
"salt_water": { elem1:"rust", chance:0.004 },
"dirty_water": { elem1:"rust", chance:0.03 },
"pool_water": { elem1:"rust", chance:0.03 },
"sugar_water": { elem1:"rust", chance:0.003 },
"seltzer": { elem1:"rust", chance:0.005 },
"salt": { elem1:"rust", chance:0.003 },
"blood": { elem1:"rust", chance:0.002 },
"infection": { elem1:"rust", chance:0.002 },
"antibody": { elem1:"rust", chance:0.002 },
},
tempHigh: 1455.5,
category: "solids",
density: 7850,
conduct: 0.42,
hardness: 0.8,
properties: {
imovable: true
}
}
elements.imovable_insulation = {
color: "#b8aea5",
behavior: behaviors.WALL,
category: "solids",
insulate: true,
state: "solid",
noMix: true,
properties: {
imovable: true
}
}
elements.left_puller = {
color: pullerColour,
properties: {
range: 10,
pushStrength: 1,
},
tick: function(pixel) {
pixel.range ??= 10;
pixel.pushStrength ??= 1;
for(h = pixel.pushStrength; h >= pixel.pushStrength; h--) {
for (i = 1; i <= pixel.range; i++) {
if (!isEmpty(pixel.x + i, pixel.y, true)) {
if (pixelMap[pixel.x+i][pixel.y]['imovable']) {break}
else {
tryMove(pixelMap[pixel.x + i][pixel.y], pixel.x + i - 1, pixel.y);
}
}
}
};
doDefaults(pixel);
},
category: "machines",
breakInto: ["metal_scrap", "steel", "iron", "glass", "uranium", "tin"],
tempHigh: 2400,
stateHigh: ["molten_aluminum", "molten_steel", "molten_iron", "molten_glass", "molten_uranium", "molten_tin"],
density: 10000,
hardness: 0.85,
conduct: 1,
state: "solid",
}
elements.right_puller = {
color: pullerColour,
properties: {
range: 10,
pushStrength: 1,
},
tick: function(pixel) {
pixel.range ??= 10;
pixel.pushStrength ??= 1;
for(h = pixel.pushStrength; h >= pixel.pushStrength; h--) {
for (i = 1; i <= pixel.range; i++) {
if (!isEmpty(pixel.x - i, pixel.y, true)) {
if (pixelMap[pixel.x-i][pixel.y]['imovable']) {break}
else {
tryMove(pixelMap[pixel.x - i][pixel.y], pixel.x - i + 1, pixel.y);
}
}
}
};
doDefaults(pixel);
},
category: "machines",
breakInto: ["metal_scrap", "steel", "iron", "glass", "uranium", "tin"],
tempHigh: 2400,
stateHigh: ["molten_aluminum", "molten_steel", "molten_iron", "molten_glass", "molten_uranium", "molten_tin"],
density: 10000,
hardness: 0.85,
conduct: 1,
state: "solid",
}
elements.down_puller = {
color: pullerColour,
properties: {
range: 10,
pushStrength: 1,
},
tick: function(pixel) {
pixel.range ??= 10;
pixel.pushStrength ??= 1;
for(h = pixel.pushStrength; h >= pixel.pushStrength; h--) {
for (i = 1; i <= pixel.range; i++) {
if (!isEmpty(pixel.x, pixel.y - i, true)) {
if (pixelMap[pixel.x][pixel.y - i]['imovable']) {break}
else {
tryMove(pixelMap[pixel.x][pixel.y - i], pixel.x, pixel.y - i + 1);
}
}
}
};
doDefaults(pixel);
},
category: "machines",
breakInto: ["metal_scrap", "steel", "iron", "glass", "uranium", "tin"],
tempHigh: 2400,
stateHigh: ["molten_aluminum", "molten_steel", "molten_iron", "molten_glass", "molten_uranium", "molten_tin"],
density: 10000,
hardness: 0.85,
conduct: 1,
state: "solid",
}
elements.up_puller = {
color: pullerColour,
properties: {
range: 10,
pushStrength: 1,
},
tick: function(pixel) {
pixel.range ??= 10;
pixel.pushStrength ??= 1;
for(h = pixel.pushStrength; h >= pixel.pushStrength; h--) {
for (i = 1; i <= pixel.range; i++) {
if (!isEmpty(pixel.x, pixel.y + i, true)) {
if (pixelMap[pixel.x][pixel.y + i]['imovable']){
break
}
else {
tryMove(pixelMap[pixel.x][pixel.y + i], pixel.x, pixel.y + i - 1);
}
}
}
};
doDefaults(pixel);
},
category: "machines",
breakInto: ["metal_scrap", "steel", "iron", "glass", "uranium", "tin"],
tempHigh: 2400,
stateHigh: ["molten_aluminum", "molten_steel", "molten_iron", "molten_glass", "molten_uranium", "molten_tin"],
density: 10000,
hardness: 0.85,
conduct: 1,
state: "solid",
}
if (enabledMods.includes("pushers.js")) {
console.info('compatibility with pushers.js and imovable objects coming in a later update of the pullers.js')
}

File diff suppressed because it is too large Load Diff

135
mods/radioactive.js Normal file
View File

@ -0,0 +1,135 @@
elements.technetium = {
category: "powders",
state: "solid",
color: "#D3D3D3",
tempHigh: 2157,
stateHigh: "molten_technetium",
density: 11359,
temp: 20,
behavior: [
"XX|CR:radiation%3 AND CR:fallout%0.2|XX",
"CR:radiation%3 AND CR:fallout%0.2|XX|CR:radiation%3 AND CR:fallout%0.2",
"M1|CR:radiation%3 AND M2 AND CR:fallout%0.2|M1",
],
reactions: {
"water": { elem1: null, elem2: "dirty_water" },
},
}
elements.molten_technetium = {
category: "states",
hidden: true,
state: "liquid",
color: ["#F2F2E5", "#E0C29F", "#D0CFC7", "#BDB7B0", "#A0958C", "#FFB300", "#F0E68C", "#BD10E0", "#FFF0F5"],
behavior: [
"XX|CR:radiation%3 AND CR:fallout%0.2 AND CR:plasma,fire,fire,fire,fire%0.5|XX",
"M2 AND CR:radiation%3 AND CR:fallout%0.2 AND CR:plasma,fire,fire,fire,fire%0.5|XX|M2 AND CR:radiation%3 AND CR:fallout%0.2 AND CR:plasma,fire,fire,fire,fire%0.5",
"M1|M1 AND CR:radiation%3 AND CR:fallout%0.2|M1",
],
tempLow: 2157,
stateLow: "technetium",
density: 11359,
}
elements.francium = {
category: "powders",
state: "solid",
color: ["#DE0047", "#4169E1", "#007FFF", "#9ACD32", "#FFD700", "#C800C8"],
behavior: [
"XX|CR:radiation%1.5|XX",
"CR:radiation%1.5|XX|CR:radiation%1.5",
"M2|M1 AND CR:radiation%1.5|M2",
],
tempHigh: 27,
stateHigh: "molten_francium",
density: 2480,
}
elements.molten_francium = {
category: "states",
hidden: true,
tempLow: 27,
stateLow: "francium",
density: 2480,
color: ["#C71585", "#FF00FF", "#A020F0", "#4B0082", "#EE82EE", "#FF9933", "#F97A3E", "#F05945"],
behavior: [
"XX|CR:fire,fire,fire,fire,plasma%2 AND CR:radiation%0.6|XX",
"M2 AND CR:fire,fire,fire,fire,plasma%2 AND CR:radiation%0.6|XX|M2 AND CR:fire,fire,fire,fire,plasma%2 AND CR:radiation%0.6",
"M1|M1 AND CR:fire,fire,fire,fire,plasma%2 AND CR:radiation%0.6|M1",
],
}
elements.radium = {
category: "powders",
tempHigh: 700,
stateHigh: "molten_radium",
density: 5500,
state: "solid",
color: ["#F0F0F0", "#C0C0C0", "#A9A9A9", "#707070", "#303030"],
behavior: [
"XX|CR:radiation%3|XX",
"CR:radiation%3|XX|CR:radiation%3",
"M2|M1 AND CR:radiation%3|M2",
],
}
elements.molten_radium = {
category: "states",
hidden: true,
tempLow: 700,
density: 5500,
stateLow: "radium",
color: ["#F0E0D6", "#D3B29E", "#B78473", "#A0534A", "#FFB300", "#F05945"],
behavior: [
"XX|CR:fire,fire,fire,fire,plasma%1 AND CR:radiation%3|XX",
"M2 AND CR:fire,fire,fire,fire,plasma%1 AND CR:radiation%3|XX|M2 AND CR:fire,fire,fire,fire,plasma%1 AND CR:radiation%3",
"M1|M1 AND CR:fire,fire,fire,fire,plasma%1 AND CR:radiation%3|M1",
],
}
elements.rutherfordium = {
category: "powders",
state: "solid",
tempHigh: 2100,
stateHigh: "molten_rutherfordium",
density: 17000,
color: ["#C0C0C0", "#B3B3B3", "#A6A6A6", "#8C8C8C", "#737373"],
behavior: [
"XX|CR:radiation%5 AND CR:fallout%0.3|XX",
"CR:radiation%5 AND CR:fallout%0.3|XX|CR:radiation%5 AND CR:fallout%0.3",
"M2|M1 AND CR:radiation%5 AND CR:fallout%0.3|M2",
],
}
elements.molten_rutherfordium = {
category: "states",
state: "liquid",
hidden: true,
tempLow: 2100,
stateLow: "rutherfordium",
density: 17000,
}
elements.dubnium = {
category: "solids",
state: "solid",
density: 21600,
color: ["#495057", "#dee2e6", "#ced4da", "#a61e4d"],
behavior: [
"XX|CR:radiation%1|XX",
"CR:radiation%1|XX|CR:radiation%1",
"XX|CR:radiation%1|XX",
],
}
elements.seaborgium = {
category: "solids",
state: "solid",
density: 23500,
color: ["#ced4da", "#adb5bd", "#868e96", "#339af0", "#4dabf7", "#4263eb", "#3b5bdb", "#1864ab"],
behavior: [
"XX|CR:radiation%1|XX",
"CR:radiation%1|XX|CR:radiation%1",
"XX|CR:radiation%1|XX",
],
}

View File

@ -0,0 +1,32 @@
elements.scissor = {
color: ["#CCCCCC","#999999","#808080","#71797E"],
category: "weapons",
behavior: behaviors.STURDYPOWDER,
state: "solid",
density: 7850,
tempHigh: 1455.5,
stateHigh: "molten_steel",
reactions: {
"rock": { elem1:null },
"paper": { elem2:null },
"head": { elem2:["blood","meat"], chance:0.005 },
"body": { elem2:["blood","meat"], chance:0.005 },
},
hardness: 0.75,
conduct: 0.32,
}
elements.rock.reactions = {
"fly": { elem2:"dead_bug", chance:0.25, oneway:true },
"firefly": { elem2:"dead_bug", chance:0.2, oneway:true },
"stink_bug": { elem2:"dead_bug", chance:0.15, oneway:true },
"bee": { elem2:"dead_bug", chance:0.1, oneway:true },
"bird": { elem2:"feather", chance:0.025, oneway:true },
"egg": { elem2:"yolk", oneway:true },
"bone": { elem2:"oil", tempMin:300, chance:0.005, oneway:true },
"dead_plant": { elem2:"charcoal", tempMin:200, chance:0.005, oneway:true },
"charcoal": { elem2:"diamond", tempMin:800, tempMax:900, chance:0.005, oneway:true },
"sand": { elem2:"packed_sand", tempMin:500, chance:0.005, oneway:true },
"wet_sand": { elem2:"packed_sand", chance:0.005, oneway:true },
"paper": { elem1:null },
}

715
mods/spouts.js Normal file
View File

@ -0,0 +1,715 @@
elements.salt_water_spout = {
category: "spouts",
state: "solid",
color: "#4d85ff",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:salt_water|XX",
"CR:salt_water|XX|CR:salt_water",
"XX|CR:salt_water|XX",
],
}
elements.sugar_water_spout = {
category: "spouts",
state: "solid",
color: "#8eaae6",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:sugar_water|XX",
"CR:sugar_water|XX|CR:sugar_water",
"XX|CR:sugar_water|XX",
],
}
elements.seltzer_spout = {
category: "spouts",
state: "solid",
color: ["#8eaae6","#82a4ed","#b5c5e8","#8eaae6","#82a4ed"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:seltzer|XX",
"CR:seltzer|XX|CR:seltzer",
"XX|CR:seltzer|XX",
],
}
elements.dirty_water_spout = {
category: "spouts",
state: "solid",
color: ["#0e824e","#07755a","#0c6934"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:dirty_water|XX",
"CR:dirty_water|XX|CR:dirty_water",
"XX|CR:dirty_water|XX",
],
}
elements.pool_water_spout = {
category: "spouts",
state: "solid",
color: "#a8d2e3",
tempHigh: 1455.5,
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",
],
}
elements.slush_spout = {
category: "spouts",
state: "solid",
color: "#81bcd4",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:slush|XX",
"CR:slush|XX|CR:slush",
"XX|CR:slush|XX",
],
}
elements.magma_spout = {
category: "spouts",
state: "solid",
color: ["#ff6f00","#ff8c00","#ff4d00"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:magma|XX",
"CR:magma|XX|CR:magma",
"XX|CR:magma|XX",
],
}
elements.slime_spout = {
category: "spouts",
state: "solid",
color: "#81cf63",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:slime|XX",
"CR:slime|XX|CR:slime",
"XX|CR:slime|XX",
],
}
elements.cement_spout = {
category: "spouts",
state: "solid",
color: "#b5b5b5",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:cement|XX",
"CR:cement|XX|CR:cement",
"XX|CR:cement|XX",
],
}
elements.oil_spout = {
category: "spouts",
state: "solid",
color: "#470e00",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:oil|XX",
"CR:oil|XX|CR:oil",
"XX|CR:oil|XX",
],
}
elements.lamp_oil_spout = {
category: "spouts",
state: "solid",
color: "#b3b38b",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:lamp_oil|XX",
"CR:lamp_oil|XX|CR:lamp_oil",
"XX|CR:lamp_oil|XX",
],
}
elements.foam_spout = {
category: "spouts",
state: "solid",
color: "#cad2e3",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:foam|XX",
"CR:foam|XX|CR:foam",
"XX|CR:foam|XX",
],
}
elements.acid_spout = {
category: "spouts",
state: "solid",
color: ["#b5cf91","#a1ff5e","#288f2a"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:acid|XX",
"CR:acid|XX|CR:acid",
"XX|CR:acid|XX",
],
}
elements.neutral_acid_spout = {
category: "spouts",
state: "solid",
color: ["#c8d9b0","#c1d9b0","#b8dbb9"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:neutral_acid|XX",
"CR:neutral_acid|XX|CR:neutral_acid",
"XX|CR:neutral_acid|XX",
],
}
elements.glue_spout = {
category: "spouts",
state: "solid",
color: "#f0f0f0",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:glue|XX",
"CR:glue|XX|CR:glue",
"XX|CR:glue|XX",
],
}
elements.soda_spout = {
category: "spouts",
state: "solid",
color: "#422016",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:soda|XX",
"CR:soda|XX|CR:soda",
"XX|CR:soda|XX",
],
}
elements.melted_wax_spout = {
category: "spouts",
state: "solid",
color: "#d4c196",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:melted_wax|XX",
"CR:melted_wax|XX|CR:melted_wax",
"XX|CR:melted_wax|XX",
],
}
elements.juice_spout = {
category: "spouts",
state: "solid",
color: "#f0bf3d",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:juice|XX",
"CR:juice|XX|CR:juice",
"XX|CR:juice|XX",
],
}
elements.milk_spout = {
category: "spouts",
state: "solid",
color: "#fafafa",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:milk|XX",
"CR:milk|XX|CR:milk",
"XX|CR:milk|XX",
],
}
elements.chocolate_milk_spout = {
category: "spouts",
state: "solid",
color: "#664934",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:chocolate_milk|XX",
"CR:chocolate_milk|XX|CR:chocolate_milk",
"XX|CR:chocolate_milk|XX",
],
}
elements.fruit_milk_spout = {
category: "spouts",
state: "solid",
color: "#c9988f",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:fruit_milk|XX",
"CR:fruit_milk|XX|CR:fruit_milk",
"XX|CR:fruit_milk|XX",
],
}
elements.pilk_spout = {
category: "spouts",
state: "solid",
color: "#e9cba3",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:pilk|XX",
"CR:pilk|XX|CR:pilk",
"XX|CR:pilk|XX",
],
}
elements.eggnog_spout = {
category: "spouts",
state: "solid",
color: "#ddbf98",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:eggnog|XX",
"CR:eggnog|XX|CR:eggnog",
"XX|CR:eggnog|XX",
],
}
elements.cream_spout = {
category: "spouts",
state: "solid",
color: "#f7f7f7",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:cream|XX",
"CR:cream|XX|CR:cream",
"XX|CR:cream|XX",
],
}
elements.cream_spout = {
category: "spouts",
state: "solid",
color: "#f7f7f7",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:cream|XX",
"CR:cream|XX|CR:cream",
"XX|CR:cream|XX",
],
}
elements.nut_milk_spout = {
category: "spouts",
state: "solid",
color: "#D7D1C3",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:nut_milk|XX",
"CR:nut_milk|XX|CR:nut_milk",
"XX|CR:nut_milk|XX",
],
}
elements.vinegar_spout = {
category: "spouts",
state: "solid",
color: "#ffecb3",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:vinegar|XX",
"CR:vinegar|XX|CR:vinegar",
"XX|CR:vinegar|XX",
],
}
elements.alcohol_spout = {
category: "spouts",
state: "solid",
color: "#c9c5b1",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:alcohol|XX",
"CR:alcohol|XX|CR:alcohol",
"XX|CR:alcohol|XX",
],
}
elements.soap_spout = {
category: "spouts",
state: "solid",
color: "#f2f2f2",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:soap|XX",
"CR:soap|XX|CR:soap",
"XX|CR:soap|XX",
],
}
elements.bleach_spout = {
category: "spouts",
state: "solid",
color: "#ffffff",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:bleach|XX",
"CR:bleach|XX|CR:bleach",
"XX|CR:bleach|XX",
],
}
elements.ink_spout = {
category: "spouts",
state: "solid",
color: "#171717",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:ink|XX",
"CR:ink|XX|CR:ink",
"XX|CR:ink|XX",
],
}
elements.mercury_spout = {
category: "spouts",
state: "solid",
color: ["#53574b","#65686a"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:mercury|XX",
"CR:mercury|XX|CR:mercury",
"XX|CR:mercury|XX",
],
}
elements.blood_spout = {
category: "spouts",
state: "solid",
color: ["#ff0000","#ee0000"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:blood|XX",
"CR:blood|XX|CR:blood",
"XX|CR:blood|XX",
],
}
elements.vaccine_spout = {
category: "spouts",
state: "solid",
color: "#e0d0ad",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:vaccine|XX",
"CR:vaccine|XX|CR:vaccine",
"XX|CR:vaccine|XX",
],
}
elements.antibody_spout = {
category: "spouts",
state: "solid",
color: "#ff4040",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:antibody|XX",
"CR:antibody|XX|CR:antibody",
"XX|CR:antibody|XX",
],
}
elements.infection_spout = {
category: "spouts",
state: "solid",
color: ["#cf005d","#be004c"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:infection|XX",
"CR:infection|XX|CR:infection",
"XX|CR:infection|XX",
],
}
elements.poison_spout = {
category: "spouts",
state: "solid",
color: "#00ff00",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:poison|XX",
"CR:poison|XX|CR:poison",
"XX|CR:poison|XX",
],
}
elements.antidote_spout = {
category: "spouts",
state: "solid",
color: "#c9b836",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:antidote|XX",
"CR:antidote|XX|CR:antidote",
"XX|CR:antidote|XX",
],
}
elements.tea_spout = {
category: "spouts",
state: "solid",
color: "#6c4317",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:tea|XX",
"CR:tea|XX|CR:tea",
"XX|CR:tea|XX",
],
}
elements.coffee_spout = {
category: "spouts",
state: "solid",
color: "#24100b",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:coffee|XX",
"CR:coffee|XX|CR:coffee",
"XX|CR:coffee|XX",
],
}
elements.honey_spout = {
category: "spouts",
state: "solid",
color: ["#f6ce1a","#e79001","#bb5503"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:honey|XX",
"CR:honey|XX|CR:honey",
"XX|CR:honey|XX",
],
}
elements.sap_spout = {
category: "spouts",
state: "solid",
color: ["#b67f18","#c86305","#cf7a19","#e4ae3a"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:sap|XX",
"CR:sap|XX|CR:sap",
"XX|CR:sap|XX",
],
}
elements.caramel_spout = {
category: "spouts",
state: "solid",
color: "#e89a51",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:caramel|XX",
"CR:caramel|XX|CR:caramel",
"XX|CR:caramel|XX",
],
}
elements.molasses_spout = {
category: "spouts",
state: "solid",
color: ["#210c06","#170804"],
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:molasses|XX",
"CR:molasses|XX|CR:molasses",
"XX|CR:molasses|XX",
],
}
elements.ketchup_spout = {
category: "spouts",
state: "solid",
color: "#ff3119",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:ketchup|XX",
"CR:ketchup|XX|CR:ketchup",
"XX|CR:ketchup|XX",
],
}
elements.mayo_spout = {
category: "spouts",
state: "solid",
color: "#fcffbd",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:mayo|XX",
"CR:mayo|XX|CR:mayo",
"XX|CR:mayo|XX",
],
}
elements.grease_spout = {
category: "spouts",
state: "solid",
color: "#cf9251",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:grease|XX",
"CR:grease|XX|CR:grease",
"XX|CR:grease|XX",
],
}
elements.liquid_oxygen_spout = {
category: "spouts",
state: "solid",
color: "#00ad99",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
temp: -184,
behavior: [
"XX|CR:liquid_oxygen|XX",
"CR:liquid_oxygen|XX|CR:liquid_oxygen",
"XX|CR:liquid_oxygen|XX",
],
}
elements.liquid_hydrogen_spout = {
category: "spouts",
state: "solid",
color: "#97afcf",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
temp: -254,
behavior: [
"XX|CR:liquid_hydrogen|XX",
"CR:liquid_hydrogen|XX|CR:liquid_hydrogen",
"XX|CR:liquid_hydrogen|XX",
],
}
elements.perfume_spout = {
category: "spouts",
state: "solid",
color: "#9656e3",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:perfume|XX",
"CR:perfume|XX|CR:perfume",
"XX|CR:perfume|XX",
],
}
elements.cyanide_spout = {
category: "spouts",
state: "solid",
color: "#b6ccb6",
tempHigh: 1455.5,
stateHigh: "molten_steel",
conduct: 0.42,
behavior: [
"XX|CR:cyanide|XX",
"CR:cyanide|XX|CR:cyanide",
"XX|CR:cyanide|XX",
],
}

91
mods/tech.js Normal file
View File

@ -0,0 +1,91 @@
elements.monitor_case = {
color: "#4a4848",
behavior: behaviors.SOLID,
category: "tech",
state: "solid",
density: 500,
};
elements.pc_core = {
color: "#f0cd43",
behavior: [
"XX|SH|XX",
"SH|XX|SH",
"XX|SH|XX",
],
category: "tech",
tempHigh: 8000,
stateHigh: ["molten_steel","explosion","molten_iron"],
reactions: {
"poison": { elem1: "malfunctioned_wire", elem2: "null" },
"salt_water": { elem1: "malfunctioned_wire", elem2: "null" },
"water": { elem1: "explosion", elem2: "null" },
"malware": { elem1: "null", elem2: "null" },
},
breakInto: ["rust", "electrogalvanized"],
};
elements.malfunctioned_wire = {
color: "#6d32a8",
behavior: behaviors.WALL,
category: "tech",
conduct: 999,
noMix: true
};
elements.red_wire = {
color: "#ff3d1f",
behavior: behaviors.WALL,
category: "tech",
insulate: true,
conduct: 1,
noMix: true,
reactions: {
"acid": { elem1: "malfunctioned_wire", elem2: "null" },
"poison": { elem1: "malfunctioned_wire", elem2: "null" },
"salt_water": { elem1: "malfunctioned_wire", elem2: "null" },
"water": { elem1: "malfunctioned_wire", elem2: "null" },
},
breakInto: ["plastic", "copper"],
};
elements.green_wire = {
color: "#66c22d",
behavior: behaviors.WALL,
category: "tech",
insulate: true,
conduct: 1,
noMix: true,
reactions: {
"acid": { elem1: "malfunctioned_wire", elem2: "null" },
"poison": { elem1: "malfunctioned_wire", elem2: "null" },
"salt_water": { elem1: "malfunctioned_wire", elem2: "null" },
"water": { elem1: "malfunctioned_wire", elem2: "null" },
},
breakInto: ["plastic", "copper"],
};
elements.blue_wire = {
color: "#1f81cc",
behavior: behaviors.WALL,
category: "tech",
insulate: true,
conduct: 1,
noMix: true,
reactions: {
"acid": { elem1: "malfunctioned_wire", elem2: "null" },
"poison": { elem1: "malfunctioned_wire", elem2: "null" },
"water": { elem1: "malfunctioned_wire", elem2: "null" },
"salt_water": { elem1: "malfunctioned_wire", elem2: "null" },
},
breakInto: ["plastic", "copper"],
};
elements.electrogalvanized = {
color: "#6c6e70",
behavior: behaviors.WALL,
category: "tech",
state: "solid",
conduct: 2,
density: 7850,
};

63
mods/the_snail.js Normal file
View File

@ -0,0 +1,63 @@
elements.the_snail = {
color: "#5c3104",
behavior: [
"XX|XX|XX",
"XX|FX%0.25|M2%0.5 AND BO",
"XX|M1|XX",
],
reactions: {
"salt": { elem1: "quicklime", elem2: null },
"dirty_water": { elem2:"water", chance:0.05, func:behaviors.FEEDPIXEL },
"broth": { elem2:"water", chance:0.05, func:behaviors.FEEDPIXEL },
"tea": { elem2:"water", chance:0.05, func:behaviors.FEEDPIXEL },
"plant": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"evergreen": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"cactus": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"dead_plant": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"worm": { elem2:null, chance:0.01, func:behaviors.FEEDPIXEL },
"mushroom_spore": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"grass": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"herb": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"lettuce": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"grass_seed": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"algae": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"mushroom_cap": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"mushroom_stalk": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"mushroom_gill": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"lichen": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"hyphae": { elem2:"dirt", chance:0.05, func:behaviors.FEEDPIXEL },
"mycelium": { elem2:"dirt", chance:0.05, func:behaviors.FEEDPIXEL },
"pumpkin": { elem2:null, chance:0.01, func:behaviors.FEEDPIXEL },
"calcium": { elem2:null, chance:0.01, func:behaviors.FEEDPIXEL },
"limestone": { elem2:null, chance:0.001, func:behaviors.FEEDPIXEL },
"quicklime": { elem2:null, chance:0.01, func:behaviors.FEEDPIXEL },
"slaked_lime": { elem2:null, chance:0.01, func:behaviors.FEEDPIXEL },
"paper": { elem2:null, chance:0.01, func:behaviors.FEEDPIXEL },
"pickle": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
"grape": { elem2:null, chance:0.01, func:behaviors.FEEDPIXEL },
"body": { elem1:"crasher" },
"head": { elem1:"crasher" },
},
category: "special",
state: "solid",
hardness: 1,
conduct: 0.16,
alias: "The Immortal Snail",
};
elements.crasher = {
onSelect: function() {
logMessage("WARNING: DO NOT PLACE THIS! This WILL crash your game and is only used for the immortal snail.");
},
color: "#FFFFFF",
behavior: [
"XX|CL|XX",
"CL|EX:10000000000>flash|CL",
"XX|CL|XX",
],
category: "special",
insulate: true,
hardness: 1,
noMix: true,
hidden: true,
};

View File

@ -469,7 +469,7 @@ button, input { /*Disable double tap zoom on mobile devices*/
touch-action: manipulation;
color-scheme: dark;
}
select, .toggleInput, #settingsMenu input[type="number"], #settingsMenu input[type="text"], #savePromptMenu input {
select, .toggleInput, #settingsMenu input[type="number"], #settingsMenu input[type="text"], #savePromptMenu input, input[type="email"] {
background-color: black;
vertical-align: middle;
margin-left: 5px;