This commit is contained in:
parent
b140b28ef9
commit
07f47bdd06
|
|
@ -376,6 +376,7 @@
|
|||
<tr><td>allliquids.js</td><td>Made all elements liquids</td><td>Orchid</td></tr>
|
||||
<tr><td>amogus.js</td><td>Small Among Us structure</td><td>Alice</td></tr>
|
||||
<tr><td>bfdi.js</td><td>Several references to Battle for Dream Island</td><td>Taterbob</td></tr>
|
||||
<tr><td>chess.js</td><td>Play chess in Sandboxels [Press U to start game]</td><td>ggod</td></tr>
|
||||
<tr><td>citybuilding.js</td><td>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>cubesstuff.js</td><td>Some random stuff like Disco Ball, Pyrite, and Nordic Gold</td><td>Cube14yt</td></tr>
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ elements.RandomGen = {
|
|||
elements.view_seed = {
|
||||
category: "edit",
|
||||
onSelect: function(){
|
||||
alert(seed);
|
||||
selectElement("dirt");
|
||||
promptText(seed, undefined, "Seed");
|
||||
selectElement(prevElement);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44986,7 +44986,6 @@ maxPixels (default 1000): Maximum amount of pixels/changes (if xSpacing and ySpa
|
|||
function editDistance(s1, s2) {s1 = s1.toLowerCase();s2 = s2.toLowerCase();var costs = new Array();for (var i = 0; i <= s1.length; i++) {var lastValue = i;for (var j = 0; j <= s2.length; j++) {if (i == 0)costs[j] = j;else {if (j > 0) {var newValue = costs[j - 1];if (s1.charAt(i - 1) != s2.charAt(j - 1))newValue = Math.min(Math.min(newValue, lastValue),costs[j]) + 1;costs[j - 1] = lastValue;lastValue = newValue;}}}if (i > 0)costs[s2.length] = lastValue;}return costs[s2.length];}
|
||||
function similarity(s1, s2) {var longer = s1;var shorter = s2;if (s1.length < s2.length) {longer = s2;shorter = s1;}var longerLength = longer.length;if (longerLength == 0) {return 1.0;}return (longerLength - editDistance(longer, shorter)) / parseFloat(longerLength);}
|
||||
function mostSimilarElement(s) {
|
||||
delete elements;
|
||||
var max = 0;
|
||||
var maxElement = "";
|
||||
for (var e in elements) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
var modName = "mods/bananas.js";
|
||||
var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
function scale (number, inMin, inMax, outMin, outMax) {
|
||||
return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
|
||||
}
|
||||
|
||||
if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
||||
randomNumberFromOneToThree = function() {
|
||||
return 1 + Math.floor(Math.random() * 3)
|
||||
};
|
||||
|
|
@ -180,12 +182,13 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
burnTime: 600,
|
||||
tempHigh: 200,
|
||||
stateHigh: ["steam", "ash"],
|
||||
onTryMoveInto: function(pixel,otherPixel) {
|
||||
onMoveInto: function(pixel,otherPixel) {
|
||||
var otherInfo = elements[otherPixel.element]
|
||||
if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
|
||||
pixel.attached = false;
|
||||
};
|
||||
},
|
||||
category: "food"
|
||||
};
|
||||
|
||||
elements.banana_peduncle_1 = {
|
||||
|
|
@ -364,7 +367,7 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
burnTime: 600,
|
||||
tempHigh: 200,
|
||||
stateHigh: ["steam", "ash"],
|
||||
onTryMoveInto: function(pixel,otherPixel) { //Move through
|
||||
onMoveInto: function(pixel,otherPixel) { //Move through
|
||||
var otherElement = otherPixel.element; //var element for readability
|
||||
|
||||
var otherInfo = elements[otherElement]; //var info
|
||||
|
|
@ -535,9 +538,8 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
density: 593,
|
||||
tick: functi
|
||||
};*/
|
||||
} else {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
|
||||
};
|
||||
|
||||
// enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
|
||||
// enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
|
||||
// localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
// alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/boiling_things.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
|
||||
//glass {
|
||||
|
||||
|
|
@ -533,8 +533,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
};
|
||||
|
||||
});
|
||||
} else {
|
||||
alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -32,7 +32,7 @@ elements.change = {
|
|||
tool: function(pixel) {
|
||||
changePixel(pixel,changeTo,true);
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
desc: "Changes any pixels it is used on to a specified type.<br/>Currently replacing pixels with \"" + changeTo + "\".<br/><span onclick=changeElementPrompt() style=\"color: #ff00ff;\";>Press [;] or click here</span> to open the change prompt.",
|
||||
};
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ elements.alt_change = {
|
|||
tool: function(pixel) {
|
||||
pixel.element = changeTo;
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
desc: "Changes any pixels it is used on to a specified type, but keeping their non-element-based properties.<br/>Currently replacing pixels with \"" + changeTo + "\".<br/><span onclick=changeElementPrompt() style=\"color: #ff00ff;\";>Press [;] or click here</span> to open the change prompt.",
|
||||
hidden: true,
|
||||
};
|
||||
|
|
@ -52,7 +52,7 @@ elements.alt_alt_change = {
|
|||
pixel.element = changeTo;
|
||||
pixel.color = pixelColorPick(pixel);
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
desc: "Changes any pixels it is used on to a specified type, but keeping their non-element-based properties except for color.<br/>Currently replacing pixels with \"" + changeTo + "\".<br/><span onclick=changeElementPrompt() style=\"color: #ff00ff;\";>Press [;] or click here</span> to open the change prompt.",
|
||||
hidden: true,
|
||||
};
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
var modName = "mods/cherries.js";
|
||||
var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
// var libraryMod = "mods/code_library.js";
|
||||
|
||||
function scale (number, inMin, inMax, outMin, outMax) {
|
||||
return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
|
||||
}
|
||||
|
||||
if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
||||
randomNumberFromOneToThree = function() {
|
||||
return 1 + Math.floor(Math.random() * 3)
|
||||
};
|
||||
|
|
@ -180,12 +183,15 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
burnTime: 600,
|
||||
tempHigh: 200,
|
||||
stateHigh: ["steam", "ash"],
|
||||
onTryMoveInto: function(pixel,otherPixel) {
|
||||
onMoveInto: function(pixel,otherPixel) {
|
||||
var otherInfo = elements[otherPixel.element]
|
||||
if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
|
||||
pixel.attached = false;
|
||||
};
|
||||
},
|
||||
category: "food",
|
||||
breakInto: "juice",
|
||||
breakIntoColor: "#A20205"
|
||||
};
|
||||
|
||||
elements.cherry_branch_1 = {
|
||||
|
|
@ -364,7 +370,7 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
burnTime: 600,
|
||||
tempHigh: 200,
|
||||
stateHigh: ["steam", "ash"],
|
||||
onTryMoveInto: function(pixel,otherPixel) { //Move through
|
||||
onMoveInto: function(pixel,otherPixel) { //Move through
|
||||
var otherElement = otherPixel.element; //var element for readability
|
||||
|
||||
var otherInfo = elements[otherElement]; //var info
|
||||
|
|
@ -535,9 +541,9 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
density: 593,
|
||||
tick: functi
|
||||
};*/
|
||||
} else {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
|
||||
};
|
||||
|
||||
// enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
|
||||
// enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
|
||||
// localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
// alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
|
||||
|
||||
|
|
|
|||
|
|
@ -1435,7 +1435,7 @@ runAfterLoadList.push(() => {
|
|||
if (!localStorage.getItem("chessjs-tutorial")) {
|
||||
// "might break"
|
||||
// i know damn well it will 100% break on mobile
|
||||
alert("To start or restart chess board press 'u'. Might break on different resolutions and on mobile.");
|
||||
promptText("To start or restart chess board press 'u'. Might break on different resolutions and on mobile.");
|
||||
localStorage.setItem("chessjs-tutorial", true);
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/colonies.js";
|
||||
var exoplanetMod = "mods/exoplanet.js";
|
||||
// var exoplanetMod = "mods/exoplanet.js";
|
||||
|
||||
if(enabledMods.includes(exoplanetMod)) {
|
||||
dependOn("exoplanet.js", function(){
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
document.getElementById("elementButton-base")?.remove()
|
||||
|
|
@ -567,8 +567,4 @@ elements.arriving_rocket = {
|
|||
cooldown: defaultCooldown
|
||||
}
|
||||
|
||||
} else {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,exoplanetMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The ${exoplanetMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/color_tools.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
var colorToolCounter = 0;
|
||||
saturationAmount = 1;
|
||||
saturationOp = "add";
|
||||
|
|
@ -290,8 +290,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
excludeRandom: true,
|
||||
desc: "<span style='color:#FF00FF' onClick=colorToolFilterPrompt()>Click here to configure the element filter (applies to all color tools).</span>",
|
||||
}
|
||||
} else {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
|
||||
alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -12,6 +12,6 @@ elements.delete_all_of_element = {
|
|||
}
|
||||
}
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
excludeRandom: true,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,19 +65,19 @@
|
|||
|
||||
|
||||
// info element
|
||||
elements.drills_info = {
|
||||
color: "#000000",
|
||||
name: "drills.js",
|
||||
category: "Mods",
|
||||
behavior: behaviors.SELFDELETE,
|
||||
maxSize: 1,
|
||||
tool: function(pixel) {},
|
||||
onSelect: function(pixel) {
|
||||
let mod_info = "The drills.js mod adds different kinds of drills to a new 'drills' category.\n\nMod made by: Necrotic_Phantom. \n With help from: voidapex11."
|
||||
alert(mod_info)
|
||||
return
|
||||
},
|
||||
};
|
||||
// elements.drills_info = {
|
||||
// color: "#000000",
|
||||
// name: "drills.js",
|
||||
// category: "Mods",
|
||||
// behavior: behaviors.SELFDELETE,
|
||||
// maxSize: 1,
|
||||
// tool: function(pixel) {},
|
||||
// onSelect: function(pixel) {
|
||||
// let mod_info = "The drills.js mod adds different kinds of drills to a new 'drills' category.\n\nMod made by: Necrotic_Phantom. \n With help from: voidapex11."
|
||||
// alert(mod_info)
|
||||
// return
|
||||
// },
|
||||
// };
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1152,7 +1152,7 @@ if(enabledMods.includes(loonaMod) && enabledMods.includes(fireMod) && enabledMod
|
|||
burnTime: 600,
|
||||
tempHigh: 200,
|
||||
stateHigh: ["steam", "ash"],
|
||||
onTryMoveInto: function(pixel,otherPixel) {
|
||||
onMoveInto: function(pixel,otherPixel) {
|
||||
var otherInfo = elements[otherPixel.element]
|
||||
if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
|
||||
pixel.attached = false;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
var modName = "mods/human_edit.js";
|
||||
var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
if(typeof(breakPixel) == "undefined") {
|
||||
function breakPixel(pixel,changetemp=false,defaultBreakIntoDust=false) {
|
||||
var info = elements[pixel.element];
|
||||
|
|
@ -33,7 +32,6 @@ function hasPixel(x,y,elementInput) {
|
|||
};
|
||||
};
|
||||
|
||||
if(enabledMods.includes(onTryMoveIntoMod)) {
|
||||
elements.brain = {
|
||||
color: ["#fce3e3","#deb6c5","#f5ced5","#e87b8f"],
|
||||
behavior: [
|
||||
|
|
@ -258,7 +256,7 @@ if(enabledMods.includes(onTryMoveIntoMod)) {
|
|||
|
||||
};
|
||||
|
||||
elements.body.onTryMoveInto = function(pixel,otherPixel) {
|
||||
elements.body.onMoveInto = function(pixel,otherPixel) {
|
||||
var pX = pixel.x;
|
||||
var pY = pixel.y;
|
||||
if(!pixel.dead && hasPixel(pX,pY-1,"head")) { //if this body pixel is alive and has a head
|
||||
|
|
@ -589,7 +587,7 @@ if(enabledMods.includes(onTryMoveIntoMod)) {
|
|||
};
|
||||
elements.head.breakInto = ["bone","brain","brain","cerebrospinal_fluid","blood","blood","meat"];
|
||||
|
||||
elements.head.onTryMoveInto = function(pixel,otherPixel) {
|
||||
elements.head.onMoveInto = function(pixel,otherPixel) {
|
||||
var pX = pixel.x;
|
||||
var pY = pixel.y;
|
||||
if(!pixel.dead) {
|
||||
|
|
@ -598,22 +596,22 @@ if(enabledMods.includes(onTryMoveIntoMod)) {
|
|||
var oY = otherPixel.y;
|
||||
if(oY !== (pY + 1)) { //exclude the body under this head
|
||||
if(otherElement === "head") { //if the pixel hitting this head is also a head
|
||||
//console.log("head.onTryMoveInto: Head has tried to move into head");
|
||||
//console.log("head.onMoveInto: Head has tried to move into head");
|
||||
if(hasPixel(oX,oY+1,"body")) { //if the pixel hitting this pixel has a body under it
|
||||
var otherBody = pixelMap[oX][oY+1];
|
||||
if(otherPixel.dead || otherBody.dead) { //if either part of that human is dead
|
||||
pixel.panic += 0.08; //being hit by a dead ******* body is terrifying
|
||||
//console.log("head.onTryMoveInto: panic increase, case: head hit by dead whole body (head's code branch)");
|
||||
//console.log("head.onMoveInto: panic increase, case: head hit by dead whole body (head's code branch)");
|
||||
} else {
|
||||
//if(otherPixel.panic > 0.04) { pixel.panic += 0.04; console.log("head.onTryMoveInto: panic increase, case: head hit by panicked whole body (head's code branch)"); }; //living, normal, headed bodies scare only if that incoming human is already scared
|
||||
//if(otherPixel.panic > 0.04) { pixel.panic += 0.04; console.log("head.onMoveInto: panic increase, case: head hit by panicked whole body (head's code branch)"); }; //living, normal, headed bodies scare only if that incoming human is already scared
|
||||
};
|
||||
} else { //if it's a severed head
|
||||
if(otherPixel.dead) { //if the head is dead
|
||||
pixel.panic += 0.08; //being hit by a /severed ******* head/ is terrifying
|
||||
//console.log("head.onTryMoveInto: panic increase, case: head hit by dead severed head");
|
||||
//console.log("head.onMoveInto: panic increase, case: head hit by dead severed head");
|
||||
} else {
|
||||
pixel.panic += 0.1; //being hit by a //******* severed head that's still alive// is even worse
|
||||
//console.log("head.onTryMoveInto: panic increase, case: head hit by living severed head");
|
||||
//console.log("head.onMoveInto: panic increase, case: head hit by living severed head");
|
||||
};
|
||||
};
|
||||
} else if(otherElement === "body") { //if the pixel hitting this head is a body
|
||||
|
|
@ -621,23 +619,23 @@ if(enabledMods.includes(onTryMoveIntoMod)) {
|
|||
var otherHead = pixelMap[oX][oY-1];
|
||||
if(otherPixel.dead || otherHead.dead) { //if either part of that human is dead
|
||||
pixel.panic += 0.03; //dead whole body case
|
||||
//console.log("head.onTryMoveInto: panic increase, case: head hit by dead whole body (body's code branch)");
|
||||
//console.log("head.onMoveInto: panic increase, case: head hit by dead whole body (body's code branch)");
|
||||
} else {
|
||||
if(otherHead.panic > 0.04) {
|
||||
pixel.panic += 0.03;
|
||||
//console.log("head.onTryMoveInto: panic increase, case: head crushed by panicked whole body (body's code branch)");
|
||||
//console.log("head.onMoveInto: panic increase, case: head crushed by panicked whole body (body's code branch)");
|
||||
} else {
|
||||
pixel.panic += 0.02;
|
||||
//console.log("head.onTryMoveInto: panic increase, case: head crushed by whole body (body's code branch)");
|
||||
//console.log("head.onMoveInto: panic increase, case: head crushed by whole body (body's code branch)");
|
||||
};
|
||||
};
|
||||
} else { //severed body case
|
||||
if(otherPixel.dead) { //if the body is dead
|
||||
pixel.panic += 0.04; //imagine being hit by a severed human without the head
|
||||
//console.log("head.onTryMoveInto: panic increase, case: head hit by dead severed body");
|
||||
//console.log("head.onMoveInto: panic increase, case: head hit by dead severed body");
|
||||
} else {
|
||||
pixel.panic += 0.05; //imagine the above but the heart is still beating
|
||||
//console.log("head.onTryMoveInto: panic increase, case: head hit by living severed body");
|
||||
//console.log("head.onMoveInto: panic increase, case: head hit by living severed body");
|
||||
};
|
||||
};
|
||||
} else {
|
||||
|
|
@ -717,9 +715,3 @@ if(enabledMods.includes(onTryMoveIntoMod)) {
|
|||
|
||||
goodPixels[newName] = { panicChange: 0.01, panicChangeChance: 0.2, moodChange: 0.035 };
|
||||
};
|
||||
|
||||
} else {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The ${onTryMoveIntoMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
var modName = "mods/life_eater.js";
|
||||
var fireMod = "mods/fire_mod.js";
|
||||
|
||||
if(!enabledMods.includes(fireMod)) {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,fireMod);
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The ${fireMod} mod is required and has been automatically inserted (reload for this to take effect).`);
|
||||
} else {
|
||||
dependOn("fire_mod.js", function() {
|
||||
|
||||
var lifeEaterCategories = ["life","auto creepers","food","fantastic creatures","fey","auto_fey"];
|
||||
var lifeEaterBlacklist = ["life_eater_virus","life_eater_slurry","life_eater_infected_dirt"];
|
||||
|
|
@ -166,4 +162,4 @@ if(!enabledMods.includes(fireMod)) {
|
|||
stateHigh: elements.metal_scrap.stateHigh.concat("life_eater_virus","life_eater_virus","life_eater_virus"),
|
||||
};
|
||||
|
||||
}
|
||||
}, true);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ var modName = "mods/metals.js";
|
|||
// var changeTempMod = "mods/changeTempReactionParameter.js";
|
||||
// var runAfterAutogenMod = "mods/runAfterAutogen2.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
dependOn("library_test.js", function(){
|
||||
dependOn("code_library.js", function(){
|
||||
elements.iron.hardness = 0.74
|
||||
//https://www.engineeringtoolbox.com/bhn-brinell-hardness-number-d_1365.html
|
||||
//https://en.wikipedia.org/wiki/Hardnesses_of_the_elements_(data_page)
|
||||
|
|
|
|||
|
|
@ -1,27 +1,8 @@
|
|||
function whenAvailable(names, callback) {
|
||||
var interval = 10; // ms
|
||||
window.setTimeout(function() {
|
||||
let bool = true;
|
||||
for(let i = 0; i < names.length; i++)
|
||||
{
|
||||
if(!window[names[i]])
|
||||
{
|
||||
bool = false;
|
||||
}
|
||||
}
|
||||
if (bool) {
|
||||
callback();
|
||||
} else {
|
||||
whenAvailable(names, callback);
|
||||
}
|
||||
}, interval);
|
||||
}
|
||||
var modName = "mods/neutronium_compressor.js";
|
||||
var runAfterAutogenMod = "mods/runAfterAutogen2.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
// var runAfterAutogenMod = "mods/runAfterAutogen2.js";
|
||||
// var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)) {
|
||||
whenAvailable(["urlParams","runAfterAutogen"], function() {
|
||||
dependOn("code_library.js", function(){
|
||||
var singularityColorTemplate = ["#202020", "#505050", "#b0b0b0", "#c7c7c7"];
|
||||
|
||||
singularityNumber = 10000;
|
||||
|
|
@ -407,10 +388,4 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
|
|||
|
||||
//Post-generation tasks
|
||||
|
||||
});
|
||||
} else {
|
||||
if(!enabledMods.includes(runAfterAutogenMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,runAfterAutogenMod) };
|
||||
if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
|
||||
alert(`The "${runAfterAutogenMod}" and "${libraryMod}" mods are required; any missing mods in this list have been automatically inserted (reload for this to take effect).`)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
var modName = "mods/portal.js";
|
||||
var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
//https://stackoverflow.com/a/60922255
|
||||
if(!enabledMods.includes("mods/mobs.js")) {
|
||||
headBodyObject = {
|
||||
|
|
@ -17,7 +17,7 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
_correspondingPortals: null,
|
||||
},
|
||||
insulate: true,
|
||||
onTryMoveInto: function(pixel,otherPixel) {
|
||||
onMoveInto: function(pixel,otherPixel) {
|
||||
if(pixel._correspondingPortals == null) {
|
||||
return;
|
||||
};
|
||||
|
|
@ -112,9 +112,8 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
state: "solid",
|
||||
insulate: true,
|
||||
}
|
||||
} else {
|
||||
if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
|
||||
if(!enabledMods.includes(onTryMoveIntoMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod) };
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The "${libraryMod}" and "${onTryMoveIntoMod}" mods are all required; any missing mods in this list have been automatically inserted (reload for this to take effect).`)
|
||||
};
|
||||
}, true);
|
||||
// if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
|
||||
// if(!enabledMods.includes(onTryMoveIntoMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod) };
|
||||
// localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
// alert(`The "${libraryMod}" and "${onTryMoveIntoMod}" mods are all required; any missing mods in this list have been automatically inserted (reload for this to take effect).`)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ var variablesMod = "mods/prop and prompt variables.js";
|
|||
var promptInputNullishes = ["null","none","","n/a"];
|
||||
var eightSpaces = " ".repeat(8);
|
||||
|
||||
if(enabledMods.includes(variablesMod)) {
|
||||
dependOn("prop and prompt variables.js", function(){
|
||||
commandHelpObject = {
|
||||
"set": "Sets properties for every pixel of a given type.\nUsage: set [property] [element] [value] <type>\nDon't include framing characters []<>.\nThe element can be \"all\" to set the property for every pixel.\nNote: Strings can't have spaces because spaces are the separator used in the parsing split().\nArguments in [brackets] are required and ones in <angle brackets> are optional.",
|
||||
|
||||
|
|
@ -1208,8 +1208,4 @@ Make sure to save your command in a file if you want to add this preset again.`
|
|||
desc: "<span style='color:#FF00FF;' onClick=funniPrompt()>Click here or press Shift+1 to open the command prompt.</span>",
|
||||
category:"special",
|
||||
};
|
||||
} else {
|
||||
alert(`The ${variablesMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,variablesMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
12
mods/prop.js
12
mods/prop.js
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/prop.js";
|
||||
var variablesMod = "mods/prop and prompt variables.js";
|
||||
|
||||
if(enabledMods.includes(variablesMod)) {
|
||||
dependOn("prop and prompt variables.js", function(){
|
||||
propProperty = "element";
|
||||
propValue = "sand";
|
||||
propType = "string";
|
||||
|
|
@ -212,7 +212,7 @@ if(enabledMods.includes(variablesMod)) {
|
|||
};
|
||||
pixelTempCheck(pixel);
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
desc: `Sets properties of pixels.<br/>Currently setting ${propProperty} to ${propValue} (${propType}).<br/><span onclick=propPrompt() style=\"color: #ff00ff;\";>Press [,] or click here</span> to open the property tool prompt.`,
|
||||
};
|
||||
|
||||
|
|
@ -452,15 +452,11 @@ if(enabledMods.includes(variablesMod)) {
|
|||
pixelTempCheck(pixel);
|
||||
};
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
desc: `Changes properties of pixels.<br/>Currently ${numberAdjusterVerb} ${numberAdjusterValue} ${numberAdjusterPreposition} ${numberAdjusterProperty}.<br/><span onclick=numberAdjusterPrompt() style=\"color: #ff00ff;\";>Press [Shift+,] or click here</span> to open the adjuster tool prompt.`,
|
||||
};
|
||||
|
||||
function updateNumberAdjusterDescription() {
|
||||
elements.number_adjuster.desc = numberAdjusterReverseOrder ? `Changes numeric properties of pixels.<br/>Currently ${numberAdjusterVerb} ${numberAdjusterProperty} ${numberAdjusterPreposition} ${numberAdjusterValue}.<br/><span onclick=numberAdjusterPrompt() style=\"color: #ff00ff;\";>Press [Shift+,] or click here</span> to open the adjuster tool prompt.` : `Changes numeric properties of pixels.<br/>Currently ${numberAdjusterVerb} ${numberAdjusterValue} ${numberAdjusterPreposition} ${numberAdjusterProperty}.<br/><span onclick=numberAdjusterPrompt() style=\"color: #ff00ff;\";>Press [Shift+,] or click here</span> to open the adjuster tool prompt.`;
|
||||
};
|
||||
} else {
|
||||
alert(`The ${variablesMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,variablesMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -48,18 +48,18 @@ behaviors.SELFDELETE = [
|
|||
|
||||
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
|
||||
},
|
||||
};
|
||||
// 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.immovable_inator = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/random_liquids.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
if(urlParams.get('liquidAmount') != null) { //null check
|
||||
liquidAmount = urlParams.get('liquidAmount')
|
||||
if(isNaN(liquidAmount) || liquidAmount === "" || liquidAmount === null) { //NaN check
|
||||
|
|
@ -213,8 +213,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
if(makeLiquidString == true) {
|
||||
console.log(`Liquids added to liquidString (length ${liquidString.length})`)
|
||||
}
|
||||
} else {
|
||||
alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/random_rocks.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
if(urlParams.get('rockAmount') != null) { //null check
|
||||
rockAmount = urlParams.get('rockAmount')
|
||||
if(isNaN(rockAmount) || rockAmount === "" || rockAmount === null) { //NaN check
|
||||
|
|
@ -157,8 +157,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
if(makeRockString == true) {
|
||||
console.log(`Rocks added to rockString (length ${rockString.length})`)
|
||||
}
|
||||
} else {
|
||||
alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/randomness.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
//i made some stupid things
|
||||
|
||||
//TPT reference
|
||||
|
|
@ -723,8 +723,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
|
||||
alert(`The "${libraryMod}" mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
51
mods/rays.js
51
mods/rays.js
|
|
@ -1,28 +1,27 @@
|
|||
function whenAvailable(names, callback) {
|
||||
var interval = 10; // ms
|
||||
window.setTimeout(function() {
|
||||
let bool = true;
|
||||
for(let i = 0; i < names.length; i++)
|
||||
{
|
||||
if(!window[names[i]])
|
||||
{
|
||||
bool = false;
|
||||
}
|
||||
}
|
||||
if (bool) {
|
||||
callback();
|
||||
} else {
|
||||
whenAvailable(names, callback);
|
||||
}
|
||||
}, interval);
|
||||
}
|
||||
// function whenAvailable(names, callback) {
|
||||
// var interval = 10; // ms
|
||||
// window.setTimeout(function() {
|
||||
// let bool = true;
|
||||
// for(let i = 0; i < names.length; i++)
|
||||
// {
|
||||
// if(!window[names[i]])
|
||||
// {
|
||||
// bool = false;
|
||||
// }
|
||||
// }
|
||||
// if (bool) {
|
||||
// callback();
|
||||
// } else {
|
||||
// whenAvailable(names, callback);
|
||||
// }
|
||||
// }, interval);
|
||||
// }
|
||||
|
||||
var modName = "mods/rays.js";
|
||||
var runAfterAutogenMod = "mods/runAfterAutogen2.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
// var runAfterAutogenMod = "mods/runAfterAutogen2.js";
|
||||
// var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod)) {
|
||||
whenAvailable(["raaLoaded","libraryLoaded"], function() {
|
||||
dependOn("code_library.js", function(){
|
||||
runAfterAutogen(function() {
|
||||
snowAndIceCache = Object.keys(elements).filter(function(name) {
|
||||
return name.endsWith("snow") || name.endsWith("ice") || name == "rime"
|
||||
|
|
@ -455,10 +454,4 @@ whenAvailable(["raaLoaded","libraryLoaded"], function() {
|
|||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
} else {
|
||||
if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
|
||||
if(!enabledMods.includes(runAfterAutogenMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,runAfterAutogenMod) };
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The "${runAfterAutogenMod}" and "${libraryMod}" mods are required and have been automatically inserted (reload for this to take effect).`);
|
||||
};
|
||||
},true);
|
||||
|
|
@ -49,7 +49,7 @@ elements.replace = {
|
|||
changePixel(pixel,replaceTo,true);
|
||||
};
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
desc: "Changes pixels of a specified type to another specified type.<br/>Currently replacing \"" + replaceFrom + "\" with \"" + replaceTo + "\".<br/><span onclick=replaceElementPrompt() style=\"color: #ff00ff;\";>Press [\"] or click here</span> to open the replace prompt.",
|
||||
};
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ elements.alt_replace = {
|
|||
pixel.element = replaceTo;
|
||||
};
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
desc: "Changes pixels of a specified type to another specified type, but keeping their non-element-based properties.<br/>Currently replacing \"" + replaceFrom + "\" with \"" + replaceTo + "\".<br/><span onclick=replaceElementPrompt() style=\"color: #ff00ff;\";>Press [\"] or click here</span> to open the replace prompt.",
|
||||
hidden: true,
|
||||
};
|
||||
|
|
@ -73,7 +73,7 @@ elements.alt_alt_replace = {
|
|||
pixel.color = pixelColorPick(pixel);
|
||||
};
|
||||
},
|
||||
category: "tools",
|
||||
category: "edit",
|
||||
desc: "Changes pixels of a specified type to another specified type, but keeping their non-element-based properties except for color.<br/>Currently replacing \"" + replaceFrom + "\" with \"" + replaceTo + "\".<br/><span onclick=replaceElementPrompt() style=\"color: #ff00ff;\";>Press [\"] or click here</span> to open the replace prompt.",
|
||||
hidden: true,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/roseyiede.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
/*
|
||||
//arbitrarily picked
|
||||
binitialArrayL = ["m","n","p","t","ch","k","b","d","j","g","f","th","s","sh","h","l","r","y","w","z"] //:eggTF:
|
||||
|
|
@ -356,8 +356,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
density: 956,
|
||||
temp: 120,
|
||||
}
|
||||
} else {
|
||||
alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
var modName = "mods/random_rocks.js";
|
||||
var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
// var libraryMod = "mods/code_library.js";
|
||||
|
||||
dependOn("code_library.js", function(){
|
||||
|
||||
if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
||||
elements.solid_rock = {
|
||||
color: ["#808080","#4f4f4f","#949494"],
|
||||
behavior: behaviors.WALL,
|
||||
|
|
@ -19,7 +20,7 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
"wheat": {elem2: "flour"},
|
||||
"primordial_soup": {elem1: "wet_sand", chance: 0.001}
|
||||
},
|
||||
onTryMoveInto: function(pixel,otherPixel) {
|
||||
onMoveInto: function(pixel,otherPixel) {
|
||||
if(elements[otherPixel.element].category === "corruption") {
|
||||
if(Math.random() < 0.05) {
|
||||
changePixel(pixel,"corrupt_solid_rock");
|
||||
|
|
@ -66,9 +67,5 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
elements.corrupt_solid_rock.reactions = elements.corrupt_land.reactions;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
|
||||
if(!enabledMods.includes(onTryMoveIntoMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod) };
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The "${libraryMod}" and "${onTryMoveIntoMod}" mods are all required; any missing mods in this list have been automatically inserted (reload for this to take effect).`)
|
||||
};
|
||||
|
||||
},true);
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
var modName = "mods/sponge_edit.js";
|
||||
var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
||||
|
||||
|
||||
dependOn("code_library.js", function(){
|
||||
elements.sponge.properties ??= {};
|
||||
elements.sponge.properties.maxAbsorb = 250;
|
||||
|
||||
|
|
@ -34,7 +36,7 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
};
|
||||
};
|
||||
|
||||
elements.sponge.onTryMoveInto = function(pixel,otherPixel) {
|
||||
elements.sponge.onMoveInto = function(pixel,otherPixel) {
|
||||
var absorbedElements = Object.keys(pixel.absorbed);
|
||||
if(absorbedElements.length == 0) {
|
||||
return false;
|
||||
|
|
@ -68,9 +70,4 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/color_tools.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
stripeFixedDefaultProperties = {
|
||||
color2: "rgb(0,0,0)",
|
||||
phase: 0,
|
||||
|
|
@ -103,8 +103,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
},
|
||||
desc: stripePaintDesc
|
||||
};
|
||||
} else {
|
||||
alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
var modName = "mods/structure_test.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(!enabledMods.includes(libraryMod)) {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
|
||||
alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`);
|
||||
} else {
|
||||
dependOn("code_library.js", function(){
|
||||
arrayLoaderVoids = ["air", "null", null];
|
||||
buildingOneSegmentDoor = ["concrete","wood_plank","concrete","wood_plank","concrete"];
|
||||
buildingOneSegmentWindows = ["concrete","glass_pane","concrete","glass_pane","concrete"];
|
||||
|
|
@ -752,4 +749,4 @@ if(!enabledMods.includes(libraryMod)) {
|
|||
worldgentypes.desert.layers.shift();
|
||||
};
|
||||
};
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/wifi.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
//https://stackoverflow.com/a/60922255
|
||||
elements.wifi = {
|
||||
color: "#bfff7f",
|
||||
|
|
@ -155,8 +155,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
state: "solid",
|
||||
}
|
||||
|
||||
} else {
|
||||
if(!enabledMods.includes(libraryMod)) { enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod) };
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The "${libraryMod}" mods is required; and has been automatically inserted (reload for this to take effect).`)
|
||||
};
|
||||
}, true);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
var modName = "mods/wirelike_test.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
//The CMYK is symbolic
|
||||
elements.start_test = {
|
||||
color: "#dddddd",
|
||||
|
|
@ -674,8 +674,4 @@ if(enabledMods.includes(libraryMod)) {
|
|||
};
|
||||
},
|
||||
};
|
||||
} else {
|
||||
alert(`The ${libraryMod} mod is required and has been automatically inserted (reload for this to take effect).`)
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod)
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
};
|
||||
}, true)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
var modName = "mods/cherries.js";
|
||||
var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
var libraryMod = "mods/code_library.js";
|
||||
// var onTryMoveIntoMod = "mods/onTryMoveInto.js";
|
||||
// var libraryMod = "mods/code_library.js";
|
||||
|
||||
if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
||||
dependOn("code_library.js", function(){
|
||||
randomNumberFromOneToThree = function() {
|
||||
return 1 + Math.floor(Math.random() * 3)
|
||||
};
|
||||
|
|
@ -180,12 +180,15 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
burnTime: 600,
|
||||
tempHigh: 200,
|
||||
stateHigh: ["steam", "ash"],
|
||||
onTryMoveInto: function(pixel,otherPixel) {
|
||||
onMoveInto: function(pixel,otherPixel) {
|
||||
var otherInfo = elements[otherPixel.element]
|
||||
if(typeof(otherInfo.state) === "string" && otherInfo.state !== "gas") {
|
||||
pixel.attached = false;
|
||||
};
|
||||
},
|
||||
category: "food",
|
||||
breakInto: "juice",
|
||||
breakIntoColor: "#A20205"
|
||||
};
|
||||
|
||||
elements.cherry_branch_1 = {
|
||||
|
|
@ -364,7 +367,7 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
burnTime: 600,
|
||||
tempHigh: 200,
|
||||
stateHigh: ["steam", "ash"],
|
||||
onTryMoveInto: function(pixel,otherPixel) { //Move through
|
||||
onMoveInto: function(pixel,otherPixel) { //Move through
|
||||
var otherElement = otherPixel.element; //var element for readability
|
||||
|
||||
var otherInfo = elements[otherElement]; //var info
|
||||
|
|
@ -535,9 +538,4 @@ if(enabledMods.includes(onTryMoveIntoMod) && enabledMods.includes(libraryMod)) {
|
|||
density: 593,
|
||||
tick: functi
|
||||
};*/
|
||||
} else {
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,onTryMoveIntoMod);
|
||||
enabledMods.splice(enabledMods.indexOf(modName),0,libraryMod);
|
||||
localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
|
||||
alert(`The ${onTryMoveIntoMod} mod and ${libraryMod} mods are required and have been automatically inserted (reload for this to take effect).`);
|
||||
};
|
||||
}, true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue