Merge branch 'main' of https://github.com/R74nCom/sandboxels
This commit is contained in:
commit
f5eaee7c1c
|
|
@ -0,0 +1,5 @@
|
|||
Translation updates to this GitHub repo are no longer accepted!
|
||||
|
||||
If you'd like to contribute translations, you must use the new Crowdin system here: https://crowdin.com/editor/sandboxels
|
||||
|
||||
For more information, see the Translation Page: https://sandboxels.r74n.com/translate
|
||||
|
|
@ -188,6 +188,7 @@
|
|||
<tr><td>boiling_things.js</td><td>Allows for various elements to be vaporized</td><td>Alice</td></tr>
|
||||
<tr><td>bouncing_balls.js</td><td>Adds new types of balls that bounce accurately and roll.</td><td>Nekonico</td></tr>
|
||||
<tr><td>chalcopyrite.js</td><td>Adds the chalcopyrite ore</td><td>Sophie</td></tr>
|
||||
<tr><td>charsonsmoduno.js</td><td>Adds Arsenic, Beryllium, Silicon, compounds, and some non-realistic stuff, such as Aresium and Nahnium</td><td>CharsonBurensen</td></tr>
|
||||
<tr><td>chem.js</td><td>Adds several chemistry and physics-related elements</td><td>lllllllllwith10ls</td></tr>
|
||||
<tr><td>clf3.js</td><td>Adds Chlorine Trifluoride</td><td>Alice</td></tr>
|
||||
<tr><td>debrisable.js</td><td>Expands the number of breakable elements, changes erosion, and adds way to craft certain elements from breaking other elements. </td><td>Nekonico</td></tr>
|
||||
|
|
@ -203,6 +204,7 @@
|
|||
<tr><td>jaydstuff.js</td><td>Adds various chemicals and compounds</td><td>Jayd</td></tr>
|
||||
<tr><td>laetium.js</td><td>Adds several fictional elements</td><td>Alice</td></tr>
|
||||
<tr><td>liquid_energy.js</td><td>Adds liquid versions of the elements in the Energy category</td><td>Alice</td></tr>
|
||||
<tr><td>liquid_mixing.js</td><td>Allows liquids to mix colors dynamically</td><td>Nekonico</td></tr>
|
||||
<tr><td>lye.js</td><td>Adds lye</td><td>BatteRaquette58</td></tr>
|
||||
<tr><td>mars.js</td><td>Adds some things from Mars with 2 minerals to smelt.</td><td>charcoal_afterlife</td></tr>
|
||||
<tr><td>metals.js</td><td>Adds several metals</td><td>Alice</td></tr>
|
||||
|
|
@ -341,14 +343,15 @@
|
|||
<tr><td>haseulite.js</td><td>Adds Loona-related materials with various properties</td><td>Alice</td></tr>
|
||||
<tr><td>lactose_intolerance_and_celiac.js</td><td>Makes humans explode on contact with milk, wheat, bread, or toast</td><td>Nubo318</td></tr>
|
||||
<tr><td>lattice_filler.js</td><td>Adds a combination of lattice and filler and adds a destructive variant</td><td>Suss</td></tr>
|
||||
<tr><td>liquid_mixing.js</td><td>Allows liquids to mix colors dynamically</td><td>Nekonico</td></tr>
|
||||
<tr><td>lone_urea.js</td><td>Adds urea without the rest of the piss mod</td><td>Alice</td></tr>
|
||||
<tr><td>maze.js</td><td>Adds a solvable maze generator</td><td>ggod</td></tr>
|
||||
<tr><td>memelists.js</td><td>Makes it so you must select elements through a list at the bottom of the page.<br>We like lists</td><td>mollthecoder</td></tr>
|
||||
<tr><td>minecraft.js</td><td>Adds several things from Minecraft</td><td>StellarX20, nousernamefound</td></tr>
|
||||
<tr><td>minesweeper.js</td><td>A subpar implementation of Minesweeper</td><td>Alice</td></tr>
|
||||
<tr><td>musicalfruit.js</td><td>Humans get gas from eating Beans</td><td>mollthecoder</td></tr>
|
||||
<tr><td>nekonicos_stuff.js</td><td>Some random stuff like graphite and oobleck.</td><td>Nekonico</td></tr>
|
||||
<tr><td>prideflags.js</td><td>Adds some pride flags to the game.</td><td>Adora</td></tr>
|
||||
<tr><td>nekonicos_stuff.js</td><td>Some random stuff like graphite, oobleck, and red ice</td><td>Nekonico</td></tr>
|
||||
<tr><td>prideflags.js</td><td>Adds some pride flags to the game</td><td>Adora</td></tr>
|
||||
<tr><td>random_elems.js</td><td>Curated randomly generated elements</td><td>Alice</td></tr>
|
||||
<tr><td>random_liquids.js</td><td>Randomly generates liquids on game load</td><td>Alice</td></tr>
|
||||
<tr><td>sbmixup.js</td><td>Adds silly elements from a <a href="https://R74n.com/mix/" target="_blank">Mix-Up!</a> game</td><td>stefanblox</td>
|
||||
|
|
@ -368,6 +371,7 @@
|
|||
<tr><td>invisible_dye.js</td><td>Adds elements like Dye and Spray Paint that take the color of the background</td><td>Alice</td></tr>
|
||||
<tr><td>invisible_wall.js</td><td>Adds an element like Wall that takes the color of the background</td><td>Alice</td></tr>
|
||||
<tr><td>lightmap.js</td><td>Makes light sources glow</td><td>RedBirdly</td></tr>
|
||||
<tr><td>liquid_mixing.js</td><td>Allows liquids to mix colors dynamically</td><td>Nekonico</td></tr>
|
||||
<tr><td>moreViews.js</td><td>Many new rendering modes</td><td>ggod</td></tr>
|
||||
<tr><td>nicer_flame.js</td><td>Makes fire visually pleasing</td><td>RedBirdly</td></tr>
|
||||
<tr><td>occlusion.js</td><td>Adds realistic shadows (similar to Terraria's lighting)</td><td>RedBirdly</td></tr>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ elements.rf_transmitter = {
|
|||
// RF Receiver Element
|
||||
elements.rf_receiver = {
|
||||
color: "#142c47",
|
||||
category: "Machines",
|
||||
category: "machines",
|
||||
behaviors: behaviors.WALL,
|
||||
tempHigh: 250,
|
||||
stateHigh: "dirt",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
var modName = "mods/../a_mod_by_alice.js" //can't do "alice's mod" because the apostrophe will fuck up code, be too confusing, or both
|
||||
//Version ω0.2 [???]
|
||||
//Version ω0.3 [Corium update]
|
||||
var dependencies = ["mods/libhooktick.js", "mods/chem.js", "mods/minecraft.js", "mods/Neutronium Mod.js", "mods/fey_and_more.js", "mods/velocity.js", "mods/ketchup_mod.js", "mods/moretools.js", "mods/aChefsDream.js", "mods/nousersthings.js"]; //thanks to mollthecoder, PlanetN9ne, StellarX20 (3), MelecieDiancie, R74n, Nubo318, Sightnado, SquareScreamYT, and NoUsernameFound
|
||||
var dependencyExistence = dependencies.map(x => enabledMods.includes(x));
|
||||
var allDependenciesExist = dependencyExistence.reduce(function(a,b) { return a && b });
|
||||
|
|
@ -2695,11 +2695,12 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
|||
booleanSynonyms = [ "boolean", "bool", "boole", "boo", "bo", "bl", "b" ];
|
||||
arraySynonyms = [ "arr", "a", "ar", "list" ];
|
||||
defaultStringTypeValues = ["element","color","clone","changeTo","void","type","spawn"];
|
||||
defaultNumberTypeValues = ["x","y","charge","temp","start","vx","vy","chargeCD","start","burnStart","dir","panic","r","frequency","length","delay","volume","debounce","debounceLength","speed","fall","penetrateCounter","chargeCounter","spawnCounter","spawnTime","squadiusX","squadiusY","spawnTries","counter","attachDirection","value","range","xSpacing","ySpacing","maxPixels","explosionRadius","circleRadius","breakAroundRadius"];
|
||||
defaultNumberTypeValues = ["x","y","charge","temp","start","vx","vy","chargeCD","start","burnStart","dir","panic","r","frequency","length","delay","volume","debounce","debounceLength","speed","fall","penetrateCounter","chargeCounter","spawnCounter","spawnTime","squadiusX","squadiusY","spawnTries","counter","attachDirection","value","range","xSpacing","ySpacing","maxPixels","explosionRadius","circleRadius","breakAroundRadius","radiation"];
|
||||
defaultBooleanTypeValues = ["burning","dead","hissing","following","dirLocked","del","didChargeBlueTinted","shooting","del","spawnAtPixelTemp","overwrite"];
|
||||
defaultArrayTypeValues = ["attachOffsets"];
|
||||
synonymsOfTrue = ["true", "t", "1", "yes"];
|
||||
synonymsOfFalse = ["false", "f", "0", "no"];
|
||||
//FORCE DATA FOOTER TO 2 LINES SO IT NEVER HIDES INFO
|
||||
//ENABLE RUNNING CODE AFTER STATE ELEMENT AUTOGENERATION (runAfterAutogen) ##
|
||||
resizeCanvas = function(newHeight,newWidth,newPixelSize,clear) {
|
||||
var gameCanvas = document.getElementById("game");
|
||||
|
|
@ -4405,6 +4406,12 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
|||
pixel1[key] = r.attr1[key];
|
||||
}
|
||||
}
|
||||
if (r.propAdds1) { // add value to each attribute to pixel1
|
||||
for (var key in r.propAdds1) {
|
||||
pixel1[key] ??= 0;
|
||||
pixel1[key] += r.propAdds1[key]
|
||||
}
|
||||
}
|
||||
if (r.stain1) { stainPixel(pixel1,r.stain1,0.05); }
|
||||
if (r.elem2 !== undefined) {
|
||||
// if r.elem2 is an array, set elem2 to a random element from the array, otherwise set it to r.elem2
|
||||
|
|
@ -4429,6 +4436,12 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
|||
pixel2[key] = r.attr2[key];
|
||||
}
|
||||
}
|
||||
if (r.propAdds2) { // add value to each attribute to pixel2
|
||||
for (var key in r.propAdds2) {
|
||||
pixel2[key] ??= 0;
|
||||
pixel2[key] += r.propAdds2[key]
|
||||
}
|
||||
}
|
||||
if (r.stain2) { stainPixel(pixel2,r.stain2,0.05); }
|
||||
if(r.func && pixel1 && pixel2) {
|
||||
r.func(pixel1,pixel2);
|
||||
|
|
@ -4653,7 +4666,7 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
|||
color: ["#daff21","#a6ff00","#ffff00"],
|
||||
behavior: [
|
||||
"XX|CR:radiation%0.1|XX",
|
||||
"CR:radiation%0.1|XX|CR:radiation%0.1",
|
||||
"CR:radiation%0.1|DEL%0.02 AND CH:rad_smoke%0.2|CR:radiation%0.1",
|
||||
"XX|CR:radiation%0.1|XX",
|
||||
],
|
||||
tick: function(pixel) {
|
||||
|
|
@ -5691,7 +5704,7 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
|||
canvasLayersPostRenderers = [];
|
||||
drawLayers = function(includeBackground) {
|
||||
//console.log("dl tick");
|
||||
if (ctx === null) return
|
||||
if (ctx === null || ctx === undefined) return
|
||||
clearLayers();
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
findColorPulseTimerSubTimer++;
|
||||
|
|
@ -5759,6 +5772,38 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
|||
}
|
||||
clearInterval(renderInterval);
|
||||
renderInterval = window.setInterval(drawLayers, 1000/60);
|
||||
viewInfo[4] = {
|
||||
name: 'element',
|
||||
pixel: function(pixel,ctx) {
|
||||
var data = elements[pixel.element];
|
||||
var _color = data.color;
|
||||
if(Array.isArray(_color)) {
|
||||
_color = _color[Math.floor(pixelTicks / 10) % _color.length]
|
||||
};
|
||||
drawSquare(ctx,_color,pixel.x,pixel.y,undefined,1 - (data.alpha ?? 0))
|
||||
}
|
||||
};
|
||||
viewInfo[5] = {
|
||||
name: 'velocity',
|
||||
pixel: function(pixel,ctx) {
|
||||
var data = elements[pixel.element];
|
||||
var vx = pixel.vx ?? 0;
|
||||
var vy = pixel.vy ?? 0;
|
||||
var _color = null;
|
||||
if(vx === 0 && vy === 0) {
|
||||
_color = "rgb(15,15,15)"
|
||||
} else {
|
||||
var magnitude = Math.sqrt ((vx ** 2) + (vy ** 2));
|
||||
var direction = Math.atan2(pixel.vy ?? 0,pixel.vx ?? 0)*180/Math.PI;
|
||||
if(direction < 0) { direction = scale(direction,-180,0,360,180) };
|
||||
hue = direction;
|
||||
sat = 100;
|
||||
lig = bound(scale(magnitude,0,100,10,100),0,100);
|
||||
_color = "hsl("+hue+","+sat+"%,"+lig+"%)";
|
||||
};
|
||||
drawSquare(ctx,_color,pixel.x,pixel.y,undefined,1 - (data.alpha ?? 0))
|
||||
}
|
||||
};
|
||||
canvasLayers.pressure = document.createElement("canvas");
|
||||
canvasLayersPre.push(canvasLayers.pressure);
|
||||
function drawPressure() {
|
||||
|
|
@ -11735,6 +11780,7 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
|||
};
|
||||
elements.planet_cracker = {
|
||||
color: "#ffc8ba",
|
||||
excludeRandom: true,
|
||||
behavior: behaviors.WALL,
|
||||
properties: {
|
||||
active: true,
|
||||
|
|
@ -13614,7 +13660,7 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
};
|
||||
var displayTemp = Math.round(_temp);
|
||||
if(displayTemp > 999999999) {
|
||||
var shrinkage = (10 ** (Math.floor(Math.log10(_temp)) - 4));
|
||||
var shrinkage = (10 ** (Math.floor(Math.log10(_temp)) - 2));
|
||||
displayTemp = [Math.floor(_temp/shrinkage),"e",Math.log10(shrinkage),suffix].join("");
|
||||
} else {
|
||||
displayTemp = Math.round(_temp).toString() + suffix;
|
||||
|
|
@ -13684,6 +13730,9 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
statsDiv.style["font-size"] = "75%"
|
||||
}
|
||||
}
|
||||
//Force stats bar to be 2 lines tall so it never hides info
|
||||
var statsBar = document.getElementById("stats");
|
||||
statsBar.style.height = "3em";
|
||||
}
|
||||
//Moved to window.onload where gameDiv should be guaranteed to exist
|
||||
} catch (error) {
|
||||
|
|
@ -15232,6 +15281,7 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
};
|
||||
elements.light_petroleum_fuel_gas = { //it's not liquified, and sandboxels doesn't even have a pressure system, and there is no generic name for uncompressed, gaseous "L"PG, so we need a different name
|
||||
burn: 100,
|
||||
burnTime: 10,
|
||||
color: "#b5b5b3",
|
||||
density: 3.5,
|
||||
tempLow: -44,
|
||||
|
|
@ -15241,10 +15291,17 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
pixel.burnStart = pixelTicks;
|
||||
}
|
||||
},
|
||||
burnInto: "explosion,explosion,fire,fire,fire,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","),
|
||||
burnInto: "explosion,explosion,ignited_gas,fire,fire,fire,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","),
|
||||
state: "gas",
|
||||
behavior: behaviors.GAS,
|
||||
};
|
||||
elements.liquid_light_petroleum_fuel = {
|
||||
burn: 50,
|
||||
burnTime: 165,
|
||||
fireElement: ["light_petroleum_fuel_gas","fire","fire"],
|
||||
burnInto: "ignited_gas,fire,fire,smoke,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,carbon_dioxide,steam,steam,steam,steam,steam".split(","),
|
||||
tempLow: -180 //based off of ethane
|
||||
}
|
||||
elements.lamp_oil.tempHigh = 170;
|
||||
elements.lamp_oil.stateHigh = "lamp_oil_gas";
|
||||
elements.lamp_oil.density = 810;
|
||||
|
|
@ -18482,7 +18539,27 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
density: 6520,
|
||||
conduct: 0.19,
|
||||
hardness: 0.5,
|
||||
forceAutoGen: true
|
||||
},
|
||||
eLists.NUCLEARFUEL = ['uranium', 'molten_uranium', 'enriched_uranium', 'molten_enriched_uranium', 'uranium_dioxide', 'enriched_uranium_dioxide', 'molten_uranium_dioxide', 'molten_enriched_uranium_dioxide', 'uranium233', 'uranium235', 'uranium_gas', 'plutonium', 'molten_plutonium', 'enriched_plutonium', 'molten_enriched_plutonium', 'plutonium_dioxide', 'molten_plutonium_dioxide', 'enriched_plutonium_dioxide', 'molten_enriched_plutonium_dioxide', 'uranium_gas', 'plutonium_gas'];
|
||||
elements.molten_zirconium = {
|
||||
tick: function(pixel) {
|
||||
var neighbors = getVonNeumannNeighbors(pixel);
|
||||
var lavaNeighbors = neighbors.filter(p => (eLists.MAGMA.includes(p.element)) || p.element.includes("molten_dirt"));
|
||||
var fuelNeighbors = neighbors.filter(p => (eLists.NUCLEARFUEL.includes(p.element)));
|
||||
if((lavaNeighbors.length > 0) && (fuelNeighbors.length > 0)) {
|
||||
var aLavaNeighbor = randomChoice(lavaNeighbors);
|
||||
var aFuelNeighbor = randomChoice(fuelNeighbors);
|
||||
var coria = [pixel,aLavaNeighbor,aFuelNeighbor];
|
||||
for(var i = 0; i < coria.length; i++) {
|
||||
var newPixel = coria[i];
|
||||
if(!newPixel) { continue };
|
||||
changePixel(newPixel,"corium",false);
|
||||
if(newPixel.temp < elements.corium.temp) { newPixel.temp = elements.corium.temp }; //changeTemp upwards only
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
newPowder("zirconia",["#F0ECDB","#FBF8EC"],5680,2715)
|
||||
elements.solid_zirconia = newPowder("zirconia",["#F0ECDB","#FBF8EC"],5680,2715,null,"zirconia",0.85,true);
|
||||
elements.molten_magnesium ??= {}; elements.molten_magnesium.tempHigh = 1090;
|
||||
|
|
@ -18539,7 +18616,226 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
};
|
||||
elements.neutron.state = "gas";
|
||||
elements.neutron.ignoreAir = "true";
|
||||
neighbors = [[-1,0],[0,-1],[1,0],[0,1]]
|
||||
neighbors = [[-1,0],[0,-1],[1,0],[0,1]];
|
||||
|
||||
function coriumSteamExpHeat(pixel,x,y,radius,fire,smoke,power,damage) {
|
||||
var distance = pyth(x,y,pixel.x,pixel.y);
|
||||
var closeness = Math.abs(radius - distance);
|
||||
var closenessProportion = closeness / radius;
|
||||
pixel.temp += 25;
|
||||
if(Math.random() < Math.sqrt(closenessProportion)) {
|
||||
if(pixel.element.endsWith("water")) {
|
||||
pixel.temp += 325;
|
||||
pixelTempCheck(pixel)
|
||||
}
|
||||
};
|
||||
|
||||
//double velocity
|
||||
if (!elements[pixel.element].excludeRandom && !elements[pixel.element].excludeVelocity) {
|
||||
var angle = Math.atan2(pixel.y-y,pixel.x-x);
|
||||
pixel.vx = Math.round((pixel.vx|0) + Math.cos(angle) * (radius * power/10));
|
||||
pixel.vy = Math.round((pixel.vy|0) + Math.sin(angle) * (radius * power/10));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//and the reason I added zirconium in the first place
|
||||
elements.corium = {
|
||||
color: ["#F4D851","#A9B335","#E1710F"],
|
||||
behavior: behaviors.MOLTEN,
|
||||
tick: function(pixel) {
|
||||
pixel.radiation ??= 150;
|
||||
var range = Math.ceil(Math.log(((pixel.radiation ?? 50) ** (0.583)) + 1))
|
||||
if(isNaN(pixel.radiation)) { pixel.temp += 10; pixel.radiation = 150 };
|
||||
if(isNaN(pixel.temp)) { pixel.temp = 2400 };
|
||||
pixel.temp += (pixel.radiation / 75);
|
||||
if(pixel.radiation > 0) {
|
||||
for(var dx = -range; dx <= range; dx++) {
|
||||
for(var dy = -range; dy <= range; dy++) {
|
||||
if(Math.random() < (pixel.radiation * 0.003)) {
|
||||
var distance = Math.sqrt((Math.abs(dx)**2) + (Math.abs(dy)**2));
|
||||
if(distance > range) { continue };
|
||||
var x = pixel.x + dx;
|
||||
var y = pixel.y + dy;
|
||||
if(isEmpty(x,y,false)) {
|
||||
createPixelReturn("radiation",x,y).temp = pixel.temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
pixel.radiation *= 0.99975;
|
||||
},
|
||||
reactions: {
|
||||
"magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"felsic_magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"intermediate_felsic_magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"intermediate_magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"ultramafic_magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"crimson_magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"blackpinkinitic_magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"rainbow_magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"nellish_magma": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_slag": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_steel": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_zirconium": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_zirconia": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_carbon": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_dirt": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_tuff": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_glass": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"molten_silica": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"fallout": { func(pixel1,pixel2) {
|
||||
changePixel(pixel2,"corium",false); pixel2.radiation = pixel1.radiation / 2; pixel1.radiation = pixel1.radiation / 2 }, chance: 0.02
|
||||
},
|
||||
"iodine": { elem2: null },
|
||||
"caesium": { elem2: null },
|
||||
"barium": { elem2: null },
|
||||
"ash": { elem2: null },
|
||||
"liquid_irradium": { elem2: ["liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium",null], temp1: 1.5, propAdds1: { radiation: 10 } },
|
||||
"pure_water": { elem1: "intermediate_magma", elem2: "pure_water", changeTemp: true },
|
||||
"chilly_water": { elem1: "intermediate_magma", elem2: "pure_water", temp1: -500, temp2: -100 }
|
||||
},
|
||||
hoverStat: function(pixel) { return "rad.lvl. " + (pixel.radiation ?? 150).toLocaleString(undefined,{maximumFractionDigits: 1}) },
|
||||
temp: 2400,
|
||||
tempLow: 1400, //made up
|
||||
stateLow: "solidified_corium",
|
||||
tempHigh: 4400, //made up
|
||||
viscosity: 8, //bad guesstrapolation from https://www.kns.org/files/pre_paper/36/16A-362%EA%B9%80%EC%9B%85%EA%B8%B0.pdf
|
||||
category: "liquids",
|
||||
state: "liquid",
|
||||
density: 7058 //assuming a 0.456 U-Zr ratio, and with uranium dioxide's density of 10970 subject to Sandboxels's standard molten density approximation of -10% because no data is available, and 4700 for liquid ZrO2, but this doesn't account for the variety of other s*** that gets in corium
|
||||
};
|
||||
|
||||
/*for(var key in elements.corium.reactions) {
|
||||
var r = elements.corium.reactions[key]
|
||||
if(r.elem1 !== "corium") { continue };
|
||||
elements[key] ??= {};
|
||||
elements[key].reactions ??= {};
|
||||
elements[key].reactions.corium ;
|
||||
}*/
|
||||
|
||||
elements.solidified_corium = {
|
||||
color: ["#5D4D36","#535F30","#414137"],
|
||||
behavior: behaviors.POWDER,
|
||||
tick: function(pixel) {
|
||||
pixel.radiation ??= 10;
|
||||
var range = Math.ceil(Math.log(((pixel.radiation ?? 10) ** (0.583)) + 1))
|
||||
pixel.temp += 2;
|
||||
if(isNaN(pixel.radiation)) { pixel.temp += 3; pixel.radiation = 150 };
|
||||
for(var dx = -range; dx <= range; dx++) {
|
||||
for(var dy = -range; dy <= range; dy++) {
|
||||
if(Math.random() < 0.03 + (pixel.radiation * 0.0025)) {
|
||||
var distance = Math.sqrt((Math.abs(dx)**2) + (Math.abs(dy)**2));
|
||||
if(distance > range) { continue };
|
||||
var x = pixel.x + dx;
|
||||
var y = pixel.y + dy;
|
||||
if(isEmpty(x,y,false)) {
|
||||
createPixelReturn("radiation",x,y).temp = pixel.temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
pixel.radiation *= 0.9998;
|
||||
},
|
||||
hoverStat: elements.corium.hoverStat,
|
||||
reactions: {
|
||||
"pure_water": { elem1: "andesite", elem2: "pure_water", changeTemp: true },
|
||||
"chilly_water": { elem1: "solidified_corium", elem2: ["chilly_water","steam"], temp1: -500, temp2: -100 },
|
||||
"liquid_irradium": { elem2: ["liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium",null], temp1: 1.5, propAdds1: { radiation: 10 } }
|
||||
},
|
||||
temp: 50,
|
||||
tempHigh: 1400, //made up
|
||||
stateHigh: "corium",
|
||||
category: "solids",
|
||||
state: "solid",
|
||||
density: 11800 //assuming a 0.456 U-Zr ratio, and with uranium dioxide's density of 10970 subject to Sandboxels's standard molten density approximation of -10% because no data is available, and 4700 for liquid ZrO2, but this doesn't account for the variety of other s*** that gets in corium
|
||||
};
|
||||
|
||||
if(eLists.WATER) {
|
||||
for(var i = 0; i < eLists.WATER.length; i++) {
|
||||
var water = eLists.WATER[i];
|
||||
if(water == "chilly_water" || water == "pure_water") { continue };
|
||||
elements.corium.reactions[water] = { func(pixel1,pixel2) {
|
||||
explodeAt(pixel1.x,pixel1.y,5,"fire,rad_steam,rad_steam,rad_steam,steam,steam,radiation","steam,radiation",null,coriumSteamExpHeat)
|
||||
}, temp1: 50, chance: 0.01 }
|
||||
}
|
||||
};
|
||||
|
||||
elements.corium_gas = {
|
||||
tick: elements.corium.tick,
|
||||
hoverStat: elements.corium.hoverStat,
|
||||
reactions: {
|
||||
"liquid_irradium": { elem2: ["liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium","liquid_irradium",null], temp1: 1.5, propAdds1: { radiation: 10 } },
|
||||
"pure_water": { elem1: "intermediate_magma", elem2: "pure_water", changeTemp: true },
|
||||
"chilly_water": { elem1: "solidified_corium", elem2: "steam", temp1: -500, temp2: -100 }
|
||||
},
|
||||
density: 20
|
||||
};
|
||||
|
||||
elements.pure_water.reactions.dirty_water = elements.pure_water.reactions.water
|
||||
|
||||
radiationIncreaseOverrides = {
|
||||
molten_uranium238: 1,
|
||||
molten_actinium: 5,
|
||||
molten_protactinium: 3,
|
||||
molten_americium: 3,
|
||||
molten_berkelium: 3,
|
||||
molten_californium: 3,
|
||||
molten_einsteinium: 5,
|
||||
molten_fermium: 5,
|
||||
molten_nihonium: 5,
|
||||
molten_moscovium: 10,
|
||||
molten_livermorium: 10,
|
||||
molten_tennessine: 10,
|
||||
molten_oganesson: 10,
|
||||
molten_nihonium_oxide: 10,
|
||||
molten_flerovium_oxide: 10,
|
||||
molten_livermorium_oxide: 10,
|
||||
"molten_p9-leeseocid": 10,
|
||||
}
|
||||
var radioactives = eLists.NUCLEARFUEL; radioactives.push("molten_uranium","molten_uranium238","molten_neptunium","molten_uranium238","molten_actinium","molten_protactinium","molten_americium","molten_berkelium","molten_californium","molten_einsteinium","molten_fermium","molten_nihonium","molten_moscovium","molten_livermorium","molten_tennessine","molten_oganesson","molten_nihonium_oxide","molten_flerovium_oxide","molten_livermorium_oxide","molten_p9-leeseocid")
|
||||
for(var i = 0; i < radioactives.length; i++) {
|
||||
var radioactive = radioactives[i];
|
||||
elements.corium.reactions[radioactive] ??= { elem2: null, temp1: 1, chance: 0.1, propAdds1: { radiation: radiationIncreaseOverrides[radioactive] ?? 2 } }
|
||||
}
|
||||
|
||||
//Non-element: Liquid ammonia
|
||||
elements.liquid_ammonia = {
|
||||
color: "#bab6a9",
|
||||
|
|
@ -21561,7 +21857,7 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
elements[name] = {
|
||||
behavior: itsActuallySolidNotPowderLol ? behaviors.WALL : behaviors.POWDER,
|
||||
color: color,
|
||||
category: "solids",
|
||||
category: itsActuallySolidNotPowderLol ? "solids" : "powders",
|
||||
state: "solid",
|
||||
density: density ?? 1000,
|
||||
};
|
||||
|
|
@ -23164,6 +23460,7 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
stain: 0.01,
|
||||
_data: [particulateInfo._data[0], particulateInfo._data[1], "suspension"],
|
||||
}
|
||||
if(eLists.WATER) { eLists.WATER.push(suspensionName) };
|
||||
elements[suspensionName].reactions[suspensionName] = { "elem1":"water", "elem2":sedimentName, "chance": 0.001 },
|
||||
elements[suspensionName].reactions[particulateName] = { "elem1": "water", "elem2":sedimentName, "chance": 0.0005 },
|
||||
//Sediment element where lithification code resides
|
||||
|
|
@ -23241,6 +23538,8 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
};
|
||||
};
|
||||
};
|
||||
if(!eLists.WATER) { console.error(38309309) };
|
||||
if(eLists.WATER) { eLists.WATER.push("swamp_water","heavy_water","radioactive_water","milk") };
|
||||
newPowder("calcite","#f5ecd0",2711,825,["carbon_dioxide","quicklime"],"calcium_carbonate_dust");
|
||||
newPowder("aragonite","#e3c58d",2830,825,["carbon_dioxide","quicklime"],"calcium_carbonate_dust");
|
||||
newPowder("vaterite","#e8ebd8",2540,825,["carbon_dioxide","quicklime"],"calcium_carbonate_dust");
|
||||
|
|
@ -23277,6 +23576,8 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
};
|
||||
};
|
||||
runAfterLoad(function() {
|
||||
eLists.MAGMA = Object.keys(elements).filter(x => x.includes("magma") && !(x.includes("vaporized")) && !(x.includes("cloud")))
|
||||
|
||||
for(i = 0; i < sands.length; i++) {
|
||||
switch(sands[i]) {
|
||||
case "dirt":
|
||||
|
|
@ -25916,7 +26217,6 @@ Pixel size (rendering only): <input id="pixelSize"> (Use if the save looks cut o
|
|||
goldenZirconColors = ["#e99209","#fcb111","#d88208","#b97605"];
|
||||
//heatTreated 0 = untreated, 1 = inertly (blue), 2 = with oxygen (golden)
|
||||
elements.zircon = {
|
||||
//Corundum with different impurities, so I can copy/paste everything but the color
|
||||
color: ["#37130b","#a9301a","#3c1810"],
|
||||
properties: {
|
||||
heatTreated: 0
|
||||
|
|
@ -27959,9 +28259,16 @@ ${eightSpaces}Example full decor definition: bird:0.04:10:#FF0000,#FFFF00,#00FF0
|
|||
console.error("pixelsize: supplied pixel size was zero or negative");
|
||||
return false;
|
||||
} else {
|
||||
document.querySelector('span[setting="pixelsize"]').querySelector("select").selectedIndex = pixelSizeSettingDropdownOtherOptionIndex;
|
||||
settings.pixelsize = argPixelSize;
|
||||
resizeCanvas(ctx.canvas.height,ctx.canvas.width,settings.pixelsize,false)
|
||||
var confirmation = confirm("Due to changes in the game, this command must reset the canvas. Proceed?")
|
||||
if(confirmation) {
|
||||
document.querySelector('span[setting="pixelsize"]').querySelector("select").selectedIndex = pixelSizeSettingDropdownOtherOptionIndex;
|
||||
settings.pixelsize = argPixelSize;
|
||||
resizeCanvas(ctx.canvas.height,ctx.canvas.width,settings.pixelsize,false);
|
||||
clearAll();
|
||||
return argPixelSize
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
};
|
||||
} else {
|
||||
alert(pixelSize);
|
||||
|
|
@ -28733,7 +29040,8 @@ Make sure to save your command in a file if you want to add this preset again.`
|
|||
elements.smash_ray = {
|
||||
color: ["#ff9999", "#8c8279"],
|
||||
tick: function(pixel) {
|
||||
if(pixel.done) { deletePixel(pixel); return };
|
||||
if(!pixel) { return };
|
||||
if(pixel?.done) { deletePixel(pixel.x,pixel.y); return };
|
||||
var x = pixel.x;
|
||||
for (var y = pixel.y; y < height; y++) {
|
||||
if (outOfBounds(x, y)) {
|
||||
|
|
@ -35763,6 +36071,7 @@ Make sure to save your command in a file if you want to add this preset again.`
|
|||
};
|
||||
elements.amba_tsunami = {
|
||||
color: ["#2449d1","#4b6adb","#8093d9"],
|
||||
excludeRandom: true,
|
||||
behavior: behaviors.WALL,
|
||||
properties: {
|
||||
active: true,
|
||||
|
|
@ -35842,6 +36151,7 @@ Make sure to save your command in a file if you want to add this preset again.`
|
|||
elements.megatsunami = {
|
||||
color: ["#1f2aa3","#2641c9","#3a57c9"],
|
||||
behavior: behaviors.WALL,
|
||||
excludeRandom: true,
|
||||
properties: {
|
||||
active: true,
|
||||
},
|
||||
|
|
@ -35922,6 +36232,7 @@ Make sure to save your command in a file if you want to add this preset again.`
|
|||
elements.lava_tsunami = {
|
||||
color: ["#ff370a","#e84a23","#e67740"],
|
||||
behavior: behaviors.WALL,
|
||||
excludeRandom: true,
|
||||
properties: {
|
||||
active: true,
|
||||
},
|
||||
|
|
@ -36012,6 +36323,7 @@ Make sure to save your command in a file if you want to add this preset again.`
|
|||
elements.lava_megatsunami = {
|
||||
color: ["#b32b10","#c24d1f","#d66924"],
|
||||
behavior: behaviors.WALL,
|
||||
excludeRandom: true,
|
||||
properties: {
|
||||
active: true,
|
||||
},
|
||||
|
|
@ -39929,7 +40241,7 @@ Make sure to save your command in a file if you want to add this preset again.`
|
|||
};
|
||||
});
|
||||
function propPrompt() {
|
||||
propProperty = prompt("Enter the property you want to set");
|
||||
propProperty = prompt("(Prop) Enter the property you want to set");
|
||||
propValue = prompt("Enter the value you want to set to");
|
||||
//special check: element
|
||||
if(propProperty === "element") {
|
||||
|
|
@ -40108,7 +40420,7 @@ Make sure to save your command in a file if you want to add this preset again.`
|
|||
if(oldProperty === null) {
|
||||
oldProperty = "temp";
|
||||
};
|
||||
numberAdjusterProperty = prompt("Enter the property you want to change");
|
||||
numberAdjusterProperty = prompt("(Number adjuster) Enter the value you want to change");
|
||||
if(numberAdjusterProperty === null) {
|
||||
numberAdjusterProperty = oldProperty;
|
||||
return false;
|
||||
|
|
@ -44735,7 +45047,7 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa
|
|||
};
|
||||
//NO GAMMA RAY SPAWNERS OR FILLERS IN RANDOM ##
|
||||
runAfterLoad(function() {
|
||||
randomBlacklist = ["quark_matter", "liquid_neutronium", "molten_neutronium", "neutronium", "neutronium_gas", "colored_fi ller", "copycat_filler", "insulating_filler"];
|
||||
randomBlacklist = ["quark_matter", "liquid_neutronium", "molten_neutronium", "neutronium", "neutronium_gas", "colored_filler", "copycat_filler", "insulating_filler"];
|
||||
for(i = 0; i < randomBlacklist.length; i++) {
|
||||
var element = randomBlacklist[i];
|
||||
if(elements[element]) { elements[element].excludeRandom = true };
|
||||
|
|
@ -45678,7 +45990,10 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa
|
|||
|
||||
//END ##
|
||||
console.log("Mod loaded");
|
||||
logMessage("a_mod_by_alice.js requires many other mods. Many of the elements and features added with it installed are actually added by the other mods it depends on.")
|
||||
window.addEventListener("load",function() {
|
||||
logMessage("a_mod_by_alice.js requires many other mods. Many of the elements and features added with it installed are actually added by the other mods it depends on.")
|
||||
logMessage('These mods are libhooktick.js, chem.js, minecraft.js, Neutronium Mod.js, fey_and_more.js, velocity.js, ketchup_mod.js, moretools.js, aChefsDream.js, nousersthings.js. They were enabled automatically')
|
||||
})
|
||||
} catch (error) {
|
||||
alert(`Load failed (try reloading).\nThis is likely a sporadic failure caused by inconsistencies in how mods are loaded, and will likely fix itself in a refresh or two. If it persists, then it's an issue.\nError: ${error.stack}`);
|
||||
console.error(error)
|
||||
|
|
|
|||
2527
mods/biology.js
2527
mods/biology.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,80 @@
|
|||
// Clouds.js beta version
|
||||
|
||||
// Biased random
|
||||
function randomGaussian(A, B, biasFactor=2) {
|
||||
let u = Math.random();
|
||||
let v = Math.random();
|
||||
let num = Math.sqrt(-2.0 * Math.log(u)) * Math.cos(2.0 * Math.PI * v);
|
||||
|
||||
let mean = (A + B) / 2;
|
||||
let stdDev = (B - A) / biasFactor;
|
||||
|
||||
let result = mean + num * stdDev;
|
||||
|
||||
return Math.min(Math.max(result, A), B);
|
||||
}
|
||||
|
||||
// Spawn clouds
|
||||
var clouds = [];
|
||||
setTimeout(() => {
|
||||
for (var i = 0;i < 50;i++) {
|
||||
var w = (Math.random() * 13) + 7;
|
||||
var h = (Math.random() * 9) + 4;
|
||||
|
||||
// Higher clouds = faster
|
||||
var y = randomGaussian(0, height * 0.75, 5);
|
||||
var speedFactor = (1 - (y / (height * 0.75)));
|
||||
|
||||
clouds.push({
|
||||
x: Math.random() * (width - w),
|
||||
y: y,
|
||||
w: w,
|
||||
h: h,
|
||||
dx: ((Math.random() - 0.5) * 0.05) * (0.5 + speedFactor * 2),
|
||||
type: Math.random() > 0.5 ? 1 : 0
|
||||
});
|
||||
}
|
||||
}, 200);
|
||||
|
||||
function renderClouds(ctx) {
|
||||
ctx.strokeStyle = "transparent";
|
||||
ctx.globalAlpha = 1.0;
|
||||
|
||||
for (var i = 0;i < clouds.length;i++) {
|
||||
var cloud = clouds[i];
|
||||
|
||||
var gradient = ctx.createLinearGradient(
|
||||
cloud.x * pixelSize, cloud.y * pixelSize,
|
||||
cloud.x * pixelSize, (cloud.y + cloud.h) * pixelSize
|
||||
);
|
||||
|
||||
var cloudColor = cloud.type == 1 ? "255,255,255" : "220,220,210"
|
||||
gradient.addColorStop(0, `RGBA(${cloudColor},0.1)`);
|
||||
gradient.addColorStop(1, `RGBA(${cloudColor},0.2)`);
|
||||
|
||||
ctx.filter = "blur(1px)";
|
||||
ctx.fillStyle = gradient;
|
||||
ctx.fillRect(cloud.x * pixelSize, cloud.y * pixelSize, cloud.w * pixelSize, cloud.h * pixelSize);
|
||||
ctx.filter = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function updateClouds() {
|
||||
if (paused) {return;}
|
||||
|
||||
for (var i = 0;i < clouds.length;i++) {
|
||||
var cloud = clouds[i];
|
||||
|
||||
cloud.x += cloud.dx;
|
||||
|
||||
// Wrap around
|
||||
if (cloud.x > width) {
|
||||
cloud.x = -cloud.w;
|
||||
} else if (cloud.x + cloud.w < 0) {
|
||||
cloud.x = width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
renderPrePixel(renderClouds);
|
||||
runEveryTick(updateClouds);
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
// By Nekonico!
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
for (var element in elements) {
|
||||
if (elements[element].state === "liquid" && elements[element].behavior !== behaviors.MOLTEN) {
|
||||
elements[element].renderer = function(pixel, ctx) { // this part used nouseramefounds code, props to him!
|
||||
if (!pixel.rSeed){pixel.rSeed = [Math.random(), Math.random(), Math.random(), Math.random()]}
|
||||
if (typeof pixel.color == "object"){
|
||||
let selectedColor = pixel.color[Math.floor(pixel.rSeed[1]*elements[pixel.element].color.length)]
|
||||
let rgb = {
|
||||
r: parseInt(selectedColor.match(/\d+/g)[0]),
|
||||
g: parseInt(selectedColor.match(/\d+/g)[1]),
|
||||
b: parseInt(selectedColor.match(/\d+/g)[2])
|
||||
}
|
||||
for (let c in rgb){
|
||||
rgb[c] += Math.floor(pixel.rSeed[0] * (pixel.rSeed[2] > 0.5 ? -1 : 1) * pixel.rSeed[3] * 15);
|
||||
rgb[c] = Math.max(0, Math.min(255, rgb[c]));
|
||||
}
|
||||
if (elements[pixel.element].glow || elements[pixel.element].isGas){
|
||||
drawPlus(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y, 1);
|
||||
} else {
|
||||
drawSquare(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y);
|
||||
}
|
||||
} else {
|
||||
let rgb = {
|
||||
r: parseInt(pixel.color.match(/\d+/g)[0]),
|
||||
g: parseInt(pixel.color.match(/\d+/g)[1]),
|
||||
b: parseInt(pixel.color.match(/\d+/g)[2])
|
||||
}
|
||||
for (let c in rgb){
|
||||
rgb[c] += Math.floor(pixel.rSeed[0] * (pixel.rSeed[2] > 0.5 ? -1 : 1) * pixel.rSeed[3] * 15);
|
||||
rgb[c] = Math.max(0, Math.min(255, rgb[c]));
|
||||
}
|
||||
if (elements[pixel.element].glow || elements[pixel.element].isGas){
|
||||
drawPlus(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y, 1);
|
||||
} else {
|
||||
drawSquare(ctx, "rgb("+rgb.r+","+rgb.g+","+rgb.b+")", pixel.x, pixel.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (elements[element].id === elements.cement.id || elements[element].id === elements.beans.id || elements[element].id === elements.algae.id || elements[element].id === elements.cellulose.id) {
|
||||
elements[element].miscible = false
|
||||
}
|
||||
if (elements[element].id === elements.midas_touch.id || elements[element].id === elements.cement.id || elements[element].id === elements.beans.id || elements[element].id === elements.algae.id || elements[element].id === elements.cellulose.id || elements[element].id === elements.primordial_soup.id || elements[element].id === elements.cyanide.id || elements[element].id === elements.poison.id || elements[element].id === elements.antidote.id || elements[element].id === elements.mercury.id || elements[element].id === elements.liquid_oxygen.id || elements[element].id === elements.liquid_nitrogen.id) {
|
||||
elements[element].soluble = false
|
||||
}
|
||||
if (elements[element].id === elements.midas_touch.id || elements[element].id === elements.molasses.id || elements[element].id === elements.grease.id || elements[element].id === elements.oil.id || elements[element].id === elements.lamp_oil.id || elements[element].id === elements.nut_oil.id|| elements[element].id === elements.honey.id || elements[element].id === elements.sap.id || elements[element].id === elements.caramel.id) {
|
||||
elements[element].polar = 2
|
||||
}
|
||||
else if (elements[element].id === elements.soap.id) {
|
||||
elements[element].polar = 3
|
||||
}
|
||||
else {
|
||||
elements[element].polar = 1
|
||||
}
|
||||
if (elements[element].stain === undefined || !elements[element].stain) {
|
||||
elements[element].stain = 0.000000001
|
||||
elements[element].mixstain = 0.3
|
||||
}
|
||||
else if (elements[element].stain < 0.66 && elements[element].stain > -0.249 && (elements[element].mixstain === undefined || !elements[element].mixstain)) {
|
||||
elements[element].mixstain = (elements[element].stain + 0.25)
|
||||
}
|
||||
else if (elements[element].stain < 0.66 && elements[element].stain > -0.35 && (elements[element].mixstain === undefined || !elements[element].mixstain)) {
|
||||
elements[element].mixstain = (Math.abs(elements[element].stain) - 0.1)
|
||||
}
|
||||
else if (elements[element].stain < 0.66 && elements[element].stain < -0.35 && (elements[element].mixstain === undefined || !elements[element].mixstain)) {
|
||||
elements[element].mixstain = 0.1
|
||||
}
|
||||
else if (elements[element].stain < 0.66 && elements[element].stain < -0.249 && (elements[element].mixstain === undefined || !elements[element].mixstain)) {
|
||||
elements[element].mixstain = 0.125
|
||||
}
|
||||
else {
|
||||
elements[element].mixstain = (0.66)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
doStaining = function(pixel) {
|
||||
if (settings.stain===0) { return }
|
||||
var stain = elements[pixel.element].stain;
|
||||
var mixstain = elements[pixel.element].mixstain;
|
||||
if (stain > 0) {
|
||||
var newColor = pixel.color.match(/\d+/g);
|
||||
}
|
||||
else {
|
||||
var newColor = null;
|
||||
}
|
||||
if (mixstain > 0) {
|
||||
var mixnewColor = pixel.color.match(/\d+/g);
|
||||
}
|
||||
else {
|
||||
var mixnewColor = null;
|
||||
}
|
||||
|
||||
for (var i = 0; i < adjacentCoords.length; i++) {
|
||||
var x = pixel.x+adjacentCoords[i][0];
|
||||
var y = pixel.y+adjacentCoords[i][1];
|
||||
if (!isEmpty(x,y,true)) {
|
||||
var newPixel = pixelMap[x][y];
|
||||
if (elements[pixel.element].ignore && elements[pixel.element].ignore.indexOf(newPixel.element) !== -1) {
|
||||
continue;
|
||||
}
|
||||
if ((elements[newPixel.element].id !== elements[pixel.element].id || elements[newPixel.element].stainSelf) && (solidStates[elements[newPixel.element].state] || elements[newPixel.element].id === elements[pixel.element].id)) {
|
||||
if (Math.random() < Math.abs(stain)) {
|
||||
if (stain < 0) {
|
||||
if (newPixel.origColor) {
|
||||
newColor = newPixel.origColor;
|
||||
}
|
||||
else { continue; }
|
||||
}
|
||||
else if (!newPixel.origColor) {
|
||||
newPixel.origColor = newPixel.color.match(/\d+/g);
|
||||
}
|
||||
// if newPixel.color doesn't start with rgb, continue
|
||||
if (!newPixel.color.match(/^rgb/)) { continue; }
|
||||
// parse rgb color string of newPixel rgb(r,g,b)
|
||||
var rgb = newPixel.color.match(/\d+/g);
|
||||
if (elements[pixel.element].stainSelf && elements[newPixel.element].id === elements[pixel.element].id) {
|
||||
// if rgb and newColor are the same, continue
|
||||
if (rgb[0] === newColor[0] && rgb[1] === newColor[1] && rgb[2] === newColor[2]) { continue; }
|
||||
var avg = [];
|
||||
for (var j = 0; j < rgb.length; j++) {
|
||||
avg[j] = Math.round((rgb[j]*(1-Math.abs(stain))) + (newColor[j]*Math.abs(stain)));
|
||||
}
|
||||
}
|
||||
else {
|
||||
// get the average of rgb and newColor, more intense as stain reaches 1
|
||||
var avg = [];
|
||||
for (var j = 0; j < rgb.length; j++) {
|
||||
avg[j] = Math.floor((rgb[j]*(1-Math.abs(stain))) + (newColor[j]*Math.abs(stain)));
|
||||
}
|
||||
}
|
||||
// set newPixel color to avg
|
||||
newPixel.color = "rgb("+avg.join(",")+")";
|
||||
}
|
||||
}
|
||||
if ((elements[newPixel.element].id === elements[pixel.element].id || elements[newPixel.element].state === "liquid") && elements[pixel.element].state === "liquid" && elements[pixel.element].miscible !== false && elements[newPixel.element].miscible !== false) {
|
||||
if (mixstain === undefined || !mixstain) {
|
||||
var mixstain = 0.5
|
||||
}
|
||||
if (Math.random() < mixstain) {
|
||||
if (elements[newPixel.element].polar === elements[pixel.element].polar || elements[newPixel.element].polar === 3) {
|
||||
if (!newPixel.origColor) {
|
||||
newPixel.origColor = newPixel.color.match(/\d+/g);
|
||||
}
|
||||
// if newPixel.color doesn't start with rgb, continue
|
||||
if (!newPixel.color.match(/^rgb/)) { continue; }
|
||||
// parse rgb color string of newPixel rgb(r,g,b)
|
||||
var rgb = newPixel.color.match(/\d+/g);
|
||||
if (elements[newPixel.element].id === elements[pixel.element].id) {
|
||||
// if rgb and newColor are the same, continue
|
||||
if (rgb[0] === mixnewColor[0] && rgb[1] === mixnewColor[1] && rgb[2] === mixnewColor[2]) { continue; }
|
||||
var avg = [];
|
||||
for (var j = 0; j < rgb.length; j++) {
|
||||
avg[j] = Math.round((rgb[j]*(1- mixstain)) + (mixnewColor[j] * mixstain));
|
||||
}
|
||||
}
|
||||
else {
|
||||
// get the average of rgb and newColor, more intense as stain reaches 1
|
||||
var avg = [];
|
||||
for (var j = 0; j < rgb.length; j++) {
|
||||
avg[j] = Math.floor((rgb[j]*(1- mixstain)) + (mixnewColor[j] * mixstain));
|
||||
}
|
||||
}
|
||||
if (Math.random() > 0.9 && elements[newPixel.element].soluble === true && elements[pixel.element].soluble === true && newPixel.color === pixel.color && elements[newPixel.element].density > (elements[pixel.element].density - 20) && elements[newPixel.element].density < (elements[pixel.element].density + 40) && elements[pixel.element].density > (elements[newPixel.element].density - 20) && elements[pixel.element].density < (elements[newPixel.element].density + 40) ) {
|
||||
if (elements[newPixel.element].density < elements[pixel.element].density) {
|
||||
newPixel.element = pixel.element
|
||||
}
|
||||
else if (elements[newPixel.element].density > elements[pixel.element].density) {
|
||||
pixel.element = newPixel.element
|
||||
}
|
||||
else if (elements[newPixel.element].density == elements[pixel.element].density) {
|
||||
newPixel.element = pixel.element
|
||||
}
|
||||
}
|
||||
// set newPixel color to avg
|
||||
newPixel.color = "rgb("+avg.join(",")+")";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// By Nekonico!
|
||||
41
mods/mars.js
41
mods/mars.js
|
|
@ -17,7 +17,9 @@ elements.mars_dust = {
|
|||
stateHigh: "molten_mars",
|
||||
tempLow: -170,
|
||||
stateLow: "mars_rock",
|
||||
extraInfo: "Dust Samples from mars. Can freeze into Mars Rock."
|
||||
extraInfo: "Dust Samples from mars. Can freeze into Mars Rock.",
|
||||
hardness: 0.991,
|
||||
breakInto: "mars_debris"
|
||||
}
|
||||
elements.molten_mars = {
|
||||
color: "#ffc338",
|
||||
|
|
@ -42,6 +44,16 @@ elements.mars_rock = {
|
|||
stateLow: "mars_rock_wall",
|
||||
extraInfo: "The Freezing of Mars Dust. Can be used for normal land."
|
||||
}
|
||||
elements.mars_debris = {
|
||||
color: "#ff9999",
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "mars",
|
||||
state: "solid",
|
||||
density: 1605,
|
||||
burn: 94,
|
||||
burnTime: 45,
|
||||
burnInto: "ash"
|
||||
}
|
||||
elements.support_mars_rock = {
|
||||
color: ["#a51002","#bd1102"],
|
||||
behavior: behaviors.SUPPORTPOWDER,
|
||||
|
|
@ -88,12 +100,14 @@ elements.mars_ironheart = {
|
|||
density: 1500,
|
||||
tempHigh: 2500,
|
||||
hardness: 1,
|
||||
stateHigh: "molten_mars",
|
||||
stateHigh: "ironheart",
|
||||
extraInfo: "Mars Stuff.",
|
||||
hidden: "true",
|
||||
reactions: {
|
||||
"mars_furnace": { elem1: "ironheart", elem2: "ironheart" },
|
||||
"nosmoker": { elem1: "ironheart", elem2: "ironheart" }, },
|
||||
"nosmoker": { elem1: "ironheart", elem2: "ironheart" },
|
||||
"ironheart": { elem1: "ironheart", elem2: "ironheart" , chance:0.1 }
|
||||
},
|
||||
}
|
||||
elements.mars_furnace = {
|
||||
color: ["#870002","#870507"],
|
||||
|
|
@ -106,14 +120,20 @@ elements.mars_furnace = {
|
|||
state: "solid",
|
||||
hardness: 0.6,
|
||||
stateHigh: "molten_mars",
|
||||
extraInfo: "Used to turn Ironheart into Ironheart Solids"
|
||||
extraInfo: "Used to turn Ironheart into Ironheart Solids",
|
||||
tempHigh: "550",
|
||||
stateHigh: "molten_mars",
|
||||
breakInto: ["ironheart", "mars_ironheart", "ironheart_ore", "gunk"]
|
||||
}
|
||||
elements.nosmoker = {
|
||||
color: ["#870002", "#870507"],
|
||||
behavior: behaviors.WALL,
|
||||
category: "mars",
|
||||
state: "solid",
|
||||
extraInfo: "Used to turn Ironheart into Ironheart Solids"
|
||||
extraInfo: "Used to turn Ironheart into Ironheart Solids",
|
||||
tempHigh: "350",
|
||||
stateHigh: "molten_mars",
|
||||
breakInto: ["ironheart", "mars_ironheart", "ironheart_ore", "antigunk"]
|
||||
}
|
||||
elements.ironheart = {
|
||||
color: "#e9825a",
|
||||
|
|
@ -197,9 +217,12 @@ elements.o2_tank = {
|
|||
],
|
||||
category: "mars",
|
||||
state: "solid",
|
||||
|
||||
tempHigh: "600",
|
||||
stateHigh: "molten_copper",
|
||||
breakInto: ["copper", "oxygen"]
|
||||
}
|
||||
// 1.4.7
|
||||
|
||||
// 1.6.11
|
||||
// most elements done :D
|
||||
// iron heart ore
|
||||
// iron heart
|
||||
|
|
@ -215,3 +238,7 @@ elements.o2_tank = {
|
|||
// im putting in the archive
|
||||
// lil changes
|
||||
// inroducing oxygen tanks!
|
||||
// machines are smashable. please smash them.
|
||||
// also heatable
|
||||
// O2 BE YOU
|
||||
// ironheart faster
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ elements.dark_brown_sugar = {
|
|||
behavior: behaviors.SUPPORTPOWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel", //am i an idiot for taking this long to figure out how to edit my code? yes. i am.
|
||||
reactions: {
|
||||
"water": { elem1: "sugar_water", elem2: null },
|
||||
}
|
||||
|
|
@ -81,6 +82,7 @@ elements.icing_sugar = {
|
|||
behavior: behaviors.SUPPORTPOWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel",
|
||||
reactions: {
|
||||
"water": { elem1: null , elem2: "icing" },
|
||||
}
|
||||
|
|
@ -92,6 +94,7 @@ elements.golden_caster_sugar = {
|
|||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel",
|
||||
reactions: {
|
||||
"water": { elem1: "sugar_water" , elem2: null },
|
||||
}
|
||||
|
|
@ -104,6 +107,7 @@ elements.caster_sugar = {
|
|||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel",
|
||||
reactions: {
|
||||
"water": { elem1: "sugar_water" , elem2: null },
|
||||
}
|
||||
|
|
@ -114,6 +118,7 @@ elements.light_brown_sugar = {
|
|||
behavior: behaviors.SUPPORTPOWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel",
|
||||
reactions: {
|
||||
"water": { elem1: "sugar_water" , elem2: null },
|
||||
}
|
||||
|
|
@ -125,6 +130,7 @@ elements.demerara_sugar = {
|
|||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel",
|
||||
reactions: {
|
||||
"water": { elem1: "sugar_water" , elem2: null },
|
||||
}
|
||||
|
|
@ -136,6 +142,7 @@ elements.dark_muscovado_sugar = {
|
|||
behavior: behaviors.SUPPORTPOWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel",
|
||||
reactions: {
|
||||
"water": { elem1: "sugar_water" , elem2: null },
|
||||
}
|
||||
|
|
@ -148,6 +155,7 @@ elements.granulated_sugar = {
|
|||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel",
|
||||
reactions: {
|
||||
"water": { elem1: "sugar_water" , elem2: null },
|
||||
}
|
||||
|
|
@ -159,7 +167,67 @@ elements.icing = {
|
|||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "powder",
|
||||
stateHigh: "caramel",
|
||||
viscosity: 2000,
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
elements.Hazel = {
|
||||
color: ["#189BCC",],
|
||||
behavior: behaviors.SUPERFLUID,
|
||||
category: "joke",
|
||||
state: "liquid",
|
||||
viscosity: 0,
|
||||
};
|
||||
|
||||
elements.guhguhgugu = {
|
||||
color: ["#a73acf", "#9e26c9", "#be5ee0",],
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "joke",
|
||||
state: "liquid",
|
||||
stateLow: "frozen_guhguhgugu",
|
||||
tempLow: -150,
|
||||
stateHigh: "solid_guhguhgugu",
|
||||
tempHigh: 150,
|
||||
};
|
||||
|
||||
elements.solid_guhguhgugu = {
|
||||
color: ["#a73acf", "#9e26c9", "#be5ee0",],
|
||||
behavior: behaviors.SOLID,
|
||||
category: "joke",
|
||||
state: "solid",
|
||||
stateLow: "guhguhgugu",
|
||||
tempLow: 150,
|
||||
stateHigh: "liquid_guhguhgugu",
|
||||
tempHigh: 250,
|
||||
};
|
||||
|
||||
elements.liquid_guhguhgugu = {
|
||||
color: ["#a73acf", "#9e26c9", "#be5ee0",],
|
||||
behavior: behaviors.MOLTEN,
|
||||
category: "molten",
|
||||
state: "molten",
|
||||
tempLow: "250",
|
||||
stateLow: "solid_guhguhgugu",
|
||||
stateHigh: "liquid_guhguhgugu",
|
||||
tempHigh: 500,
|
||||
};
|
||||
|
||||
elements.boil_guhguhgugu = {
|
||||
color: ["#a73acf", "#9e26c9", "#be5ee0",],
|
||||
behavior: behaviors.DGAS,
|
||||
category: "joke",
|
||||
state: "gas",
|
||||
tempLow: "500",
|
||||
stateLow: "liquid_guhguhgugu",
|
||||
|
||||
};
|
||||
|
||||
elements.frozen_guhguhgugu = {
|
||||
color: ["#a73acf", "#9e26c9", "#be5ee0",],
|
||||
behavior: behaviors.SOLID,
|
||||
category: "joke",
|
||||
state: "solid",
|
||||
stateHigh: "guhguhgugu",
|
||||
tempHigh: 15,
|
||||
};
|
||||
|
|
@ -1575,8 +1575,6 @@ elements.blackhole_storage = {
|
|||
tick: function(pixel) {
|
||||
if (!pixel.bhcontents){
|
||||
pixel.bhcontents = [];
|
||||
} else {
|
||||
pixel.decidedcontent = pixel.bhcontents[Math.floor(Math.random()*pixel.bhcontents.length)];
|
||||
}
|
||||
for (var i = 0; i < squareCoords.length; i++) {
|
||||
var coord = squareCoords[i];
|
||||
|
|
@ -1588,15 +1586,15 @@ elements.blackhole_storage = {
|
|||
pixel.bhcontents.push(otherPixel);
|
||||
deletePixel(otherPixel.x, otherPixel.y);
|
||||
}
|
||||
} else if (pixel.charge && isEmpty(x,y) && pixel.decidedcontent){
|
||||
var otherPixel = pixelMap[x][y];
|
||||
pixel.decidedcontent.x = x;
|
||||
pixel.decidedcontent.y = y;
|
||||
delete pixel.decidedcontent.del;
|
||||
otherPixel = pixel.decidedcontent;
|
||||
currentPixels.push(pixel.decidedcontent);
|
||||
pixel.bhcontents.splice(pixel.bhcontents.indexOf(pixel.decidedcontent), 1);
|
||||
pixel.decidedcontent = pixel.bhcontents[Math.floor(Math.random()*pixel.bhcontents.length)];
|
||||
} else if (pixel.charge && isEmpty(x,y) && pixel.bhcontents.length){
|
||||
let randomindex = Math.floor(Math.random()*pixel.bhcontents.length);
|
||||
let releasedPixel = pixel.bhcontents[randomindex]
|
||||
pixel.bhcontents.splice(randomindex, 1)
|
||||
delete releasedPixel.del
|
||||
releasedPixel.x = x
|
||||
releasedPixel.y = y
|
||||
pixelMap[x][y] = releasedPixel
|
||||
currentPixels.push(releasedPixel)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -3905,4 +3903,73 @@ elements.false_vacuum = {
|
|||
},
|
||||
movable: false,
|
||||
hardness: 1
|
||||
}
|
||||
let signInput = "Hello World!";
|
||||
elements.sign = {
|
||||
color: "#FFFFFF",
|
||||
darkText: true,
|
||||
category: "special",
|
||||
onSelect: function(){
|
||||
let signi = prompt("What text should the sign display?", signInput||"Hello World!")
|
||||
signInput = signi;
|
||||
},
|
||||
renderer: function(pixel, ctx){
|
||||
if (!pixel.sign){pixel.sign = signInput}
|
||||
},
|
||||
movable: false
|
||||
}
|
||||
elements.e_sign = {
|
||||
color: "#f3ff88",
|
||||
darkText: true,
|
||||
category: "special",
|
||||
movable: false,
|
||||
onSelect: () => {
|
||||
let signi = prompt("What text should the sign display?", signInput||"Hello World!")
|
||||
signInput = signi;
|
||||
},
|
||||
renderer: function(pixel, ctx){
|
||||
if (!pixel.sign){pixel.sign=signInput}
|
||||
},
|
||||
conduct: 1
|
||||
}
|
||||
renderPostPixel(function(ctx){
|
||||
for (pixel of currentPixels){
|
||||
if ((pixel.element == "sign") && pixel.sign){
|
||||
ctx.font = `12pt Arial`
|
||||
ctx.fillStyle = pixel.color;
|
||||
ctx.fillText(pixel.sign, canvasCoord(pixel.x), canvasCoord(pixel.y))
|
||||
} else if (pixel.element == "e_sign" && pixel.sign){
|
||||
if (pixel.charge || pixel.chargeCD){
|
||||
ctx.font = `12pt Arial`
|
||||
ctx.fillStyle = pixel.color;
|
||||
ctx.fillText(pixel.sign, canvasCoord(pixel.x), canvasCoord(pixel.y))
|
||||
} else {
|
||||
drawSquare(ctx, pixel.color, pixel.x, pixel.y)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
let machinemodName = "nousersthings.js"
|
||||
elements.mod_dectector = {
|
||||
color: "#54681d",
|
||||
behavior: behaviors.WALL,
|
||||
category: "machines",
|
||||
movable: false,
|
||||
excludeRandom: true,
|
||||
onSelect: () => {
|
||||
let newMod = prompt("What mod should this machine detect?", "nousersthings.js"||modName)
|
||||
machinemodName = newMod
|
||||
},
|
||||
tick: (pixel) => {
|
||||
if (!pixel.mod){pixel.mod = machinemodName}
|
||||
if (enabledMods.includes("mods/" + pixel.mod)){
|
||||
for (let i = 0; i < adjacentCoords.length; i++){
|
||||
let x = adjacentCoords[i][0] + pixel.x;
|
||||
let y = adjacentCoords[i][1] + pixel.y;
|
||||
if (!isEmpty(x, y, true) && elements[pixelMap[x][y].element].conduct){
|
||||
pixelMap[x][y].charge = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
if (!settings.survival) {
|
||||
settings.survival = {
|
||||
"wall": 999,
|
||||
"dirt": 999,
|
||||
"dirt": 9999,
|
||||
"sapling": 1,
|
||||
"seeds": 5,
|
||||
"ice": 25,
|
||||
|
|
@ -154,7 +154,7 @@ elements.smash.tool = function(pixel) {
|
|||
|
||||
elementWorth = {
|
||||
"gold_coin": 1,
|
||||
"diamond": 10000,
|
||||
"diamond": 10000000,
|
||||
"ketchup": 15,
|
||||
"jelly": 10,
|
||||
"soda": 10,
|
||||
|
|
@ -183,7 +183,7 @@ elementWorth = {
|
|||
"vine": 0.1,
|
||||
"cactus": 0.1,
|
||||
"cloner": 0,
|
||||
"wall": 0,
|
||||
"wall": 100000,
|
||||
"fire": 0,
|
||||
"smoke": 0,
|
||||
"plasma": 0,
|
||||
|
|
@ -194,7 +194,7 @@ elementWorth = {
|
|||
"radiation": 0,
|
||||
"petal": -1,
|
||||
"cell": -1,
|
||||
"cancer": -1,
|
||||
"cancer": 1000000000,
|
||||
"foam": -1,
|
||||
}
|
||||
elements.sell = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue