Merge branch 'main' of https://github.com/R74nCom/sandboxels
This commit is contained in:
commit
e81df2f182
|
|
@ -2,18 +2,25 @@ var elementslist = []
|
|||
for (elementi in elements){
|
||||
elementslist.push(elementi)
|
||||
}
|
||||
async function _GNPrompt(message, title = "Prompt", defaultValue = "") { // thanks to ggod
|
||||
return new Promise(resolve => {
|
||||
promptInput(message, (result) => {
|
||||
resolve(result);
|
||||
}, title, defaultValue);
|
||||
})
|
||||
}
|
||||
elements.change_count = {
|
||||
color: "#34eb86",
|
||||
canPlace: false,
|
||||
behavior: behaviors.SELFDELETE,
|
||||
onSelect: function() {
|
||||
var cans = prompt("Please input how many elements you would like to be generared each time.", 10000);
|
||||
onSelect: async function() {
|
||||
var cans = await _GNPrompt("Please input how many elements you would like to be generared each time.", "10kelements.js is asking you...", 10000);
|
||||
if (!cans) { return }
|
||||
if (cans == "skin"){settings.randomcount = 10000; settings.skineasteregg = true; settings.sandeasteregg = false; saveSettings(); alert("skin"); return}
|
||||
if (cans == "sand"){settings.randomcount = 10000; settings.skineasteregg = false; settings.sandeasteregg = true; saveSettings(); alert("sand"); return}
|
||||
if (cans > 100000){alert("You have put too big of a number! This would surely crash your browser or eat up all your RAM! Element count will remain unchanged."); return}
|
||||
if (cans == "skin"){settings.randomcount = 10000; settings.skineasteregg = true; settings.sandeasteregg = false; saveSettings(); promptText("skin"); return}
|
||||
if (cans == "sand"){settings.randomcount = 10000; settings.skineasteregg = false; settings.sandeasteregg = true; saveSettings(); promptText("sand"); return}
|
||||
if (cans > 100000){promptText("You have put too big of a number! This would surely crash your browser or eat up all your RAM! Element count will remain unchanged."); return}
|
||||
if (cans < 1 && (parseInt(cans) > -1) ){alert("You have either put a decimal or zero. Why? Element count will remain unchanged."); return}
|
||||
if (isNaN(parseInt(cans))){alert("Apparently your input isnt even a number. Try again. Element count will remain unchanged."); return}
|
||||
if (isNaN(parseInt(cans))){promptText("Apparently your input isnt even a number. Try again. Element count will remain unchanged."); return}
|
||||
settings.randomcount = parseInt(cans)
|
||||
settings.skineasteregg = false;
|
||||
settings.sandeasteregg = false;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//Main version
|
||||
//Main version. Still in WIP
|
||||
//reminder for creator: human code is on index.html line 3242.
|
||||
|
||||
//Ini adalah aScientistsWish.js, mod dari Sandboxels yang diciptakan oleh Carbon Monoxide dengan bantuan startup oleh Salmonfishy, bertema sains dan semi fiktif dengan adanya zombie, mod ini masih dalam tahap pengembangan.
|
||||
elements.carbon_monoxide = {
|
||||
color: ["#b5b5b5", "#404040", "#2b2b2b",],
|
||||
behavior: behaviors.GAS,
|
||||
|
|
@ -232,7 +232,7 @@ reactions: {
|
|||
}
|
||||
};
|
||||
|
||||
elements.radiated_metal = {
|
||||
elements.radiated_metal = {
|
||||
behavior: [
|
||||
["XX","CR:radiation%25","XX"],
|
||||
["CR:radiation%25","XX","CR:radiation%25"],
|
||||
|
|
@ -929,6 +929,7 @@ elements.liquid_phosgene = {
|
|||
category: "states",
|
||||
density: 7.50,
|
||||
tempLow: -118,
|
||||
hidden: true,
|
||||
temp: -10,
|
||||
stateLow: "solid_phosgene",
|
||||
tempHigh: 8,
|
||||
|
|
@ -939,6 +940,7 @@ elements.solid_phosgene = {
|
|||
behavior: behaviors.WALL,
|
||||
state: "solid",
|
||||
category: "states",
|
||||
hidden: true,
|
||||
density: 12.45,
|
||||
temp: -150,
|
||||
tempHigh: -117,
|
||||
|
|
@ -962,3 +964,232 @@ elements.chlorophyll = {
|
|||
"acid": { elem1: ["magnesium"], }
|
||||
}
|
||||
}
|
||||
elements.lithium = { //Unsur lithium, buat versi baru, masih WIP.
|
||||
color: ["#928c96", "#9c9c9c",],
|
||||
state: "powder",
|
||||
category: "powders",
|
||||
behavior: behaviors.POWDER,
|
||||
density: 0.5,
|
||||
tempHigh: 180,
|
||||
stateHigh: "molten_lithium",
|
||||
conduct: 0.2,
|
||||
burn: 85,
|
||||
burnTime: 500,
|
||||
reactions: {
|
||||
"water": { elem1: ["pop","explosion","hydrogen","lithium_hydroxide"] },
|
||||
"salt_water": { elem1: ["pop","explosion","hydrogen","lithium_hydroxide"] },
|
||||
"pool_water": { elem1: ["pop","explosion","hydrogen","lithium_hydroxide"] },
|
||||
"dirty_water": { elem1: ["pop","explosion","hydrogen","lithium_hydroxide"] },
|
||||
"sugar_water": { elem1: ["pop","explosion","hydrogen","lithium_hydroxide"] },
|
||||
"steam": { elem1: ["pop","explosion","hydrogen","lithium_hydroxide"] },
|
||||
"oxygen": { elem1: "lithium_oxide" },
|
||||
"chlorine": { elem1: "lithium_chloride" },
|
||||
"acid": { elem1: ["lithium_chloride","hydrogen"], chance: 0.2 },
|
||||
"carbon_dioxide": { elem1: "lithium_carbonate" },
|
||||
"carbon_monoxide": { elem1: "lithium_carbonate" },
|
||||
"nitrogen": { elem1: "lithium_nitride", chance: 0.1 }
|
||||
}
|
||||
}
|
||||
elements.molten_lithium = {
|
||||
color: ["#c0c0c0", "#d0d0d0", "#b0b0b0"],
|
||||
behavior: behaviors.LIQUID,
|
||||
temp: 250, // temperatur normal
|
||||
density: 0.5,
|
||||
conduct: 0.5,
|
||||
state: "liquid",
|
||||
category: "states",
|
||||
hidden: true,
|
||||
tempLow: 180,
|
||||
stateLow: "lithium",
|
||||
burn: 50,
|
||||
burnTime: 300,
|
||||
burnInto: "lithium_oxide",
|
||||
}
|
||||
|
||||
elements.lithium_hydroxide = {
|
||||
color: "#c8e4d8",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "solid",
|
||||
density: 1500,
|
||||
tempHigh: 462, // titik leleh LiOH
|
||||
stateHigh: "molten_lithium_hydroxide",
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Molten Lithium Hydroxide
|
||||
elements.molten_lithium_hydroxide = {
|
||||
color: "#dff7f2",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
density: 1400,
|
||||
hidden: true,
|
||||
temp: 463,
|
||||
tempHigh: 924, // perkiraan titik didih
|
||||
stateHigh: "lithium_hydroxide_gas", // opsional
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Lithium Oxide (hasil reaksi lithium dengan oksigen)
|
||||
elements.lithium_oxide = {
|
||||
color: "#d0d0d0",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "solid",
|
||||
density: 2013,
|
||||
tempHigh: 1438,
|
||||
stateHigh: "molten_lithium_oxide",
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Molten Lithium Oxide
|
||||
elements.molten_lithium_oxide = {
|
||||
color: "#e8e8e8",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
density: 1800,
|
||||
hidden: true,
|
||||
temp: 1440,
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Lithium Carbonate (hasil reaksi lithium dengan karbon dioksida)
|
||||
elements.lithium_carbonate = {
|
||||
color: "#f0f0f0",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "solid",
|
||||
density: 2110,
|
||||
tempHigh: 723,
|
||||
stateHigh: "molten_lithium_carbonate",
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Molten Lithium Carbonate
|
||||
elements.molten_lithium_carbonate = {
|
||||
color: "#fafafa",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
density: 1900,
|
||||
hidden: true,
|
||||
temp: 725,
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Lithium Chloride (hasil reaksi lithium dengan klorin atau asam)
|
||||
elements.lithium_chloride = {
|
||||
color: "#e0e0f8",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "solid",
|
||||
density: 2068,
|
||||
tempHigh: 614,
|
||||
stateHigh: "molten_lithium_chloride",
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Molten Lithium Chloride
|
||||
elements.molten_lithium_chloride = {
|
||||
color: "#f0f0ff",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
hidden: true,
|
||||
density: 1900,
|
||||
temp: 615,
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Lithium Nitride (hasil reaksi lithium dengan nitrogen)
|
||||
elements.lithium_nitride = {
|
||||
color: "#b8b8b8",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "solid",
|
||||
density: 1270,
|
||||
tempHigh: 813,
|
||||
stateHigh: "molten_lithium_nitride",
|
||||
reactions: {},
|
||||
};
|
||||
|
||||
// Molten Lithium Nitride
|
||||
elements.molten_lithium_nitride = {
|
||||
color: "#c8c8c8",
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
hidden: true,
|
||||
density: 1100,
|
||||
temp: 815,
|
||||
reactions: {},
|
||||
};
|
||||
elements.phosphorus = {
|
||||
color: ["#ffffcc", "#ffff99", "#ffff66"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "solid",
|
||||
density: 1820,
|
||||
burn: 100,
|
||||
burnTime: 100,
|
||||
burnInto: "fire",
|
||||
reactions: {
|
||||
"oxygen": { elem1: "fire", chance: 0.5 },
|
||||
"water": { elem1: "explosion", },
|
||||
},
|
||||
tempHigh: 44,
|
||||
stateHigh: "molten_phosphorus",
|
||||
hidden: false,
|
||||
};
|
||||
elements.molten_phosphorus = {
|
||||
color: ["#ffcc00", "#ff9900"],
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "states",
|
||||
state: "liquid",
|
||||
density: 1600,
|
||||
hidden: true,
|
||||
burning: true,
|
||||
burnTime: 2000,
|
||||
burnInto: "fire",
|
||||
reactions: {
|
||||
"oxygen": { elem1: "fire", chance: 1 },
|
||||
},
|
||||
temp: 100,
|
||||
tempLow: 43,
|
||||
stateLow: "phosphorus",
|
||||
viscosity: 20,
|
||||
};
|
||||
elements.phosphorus_bomb = {
|
||||
color: "#ffdd66",
|
||||
behavior: behaviors.POWDER,
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
density: 1200,
|
||||
desc: "Don't let UN see this...",
|
||||
tick: function(pixel) {
|
||||
// Periksa apakah ada elemen lain di sekitarnya
|
||||
for (let dx = -1; dx <= 1; dx++) {
|
||||
for (let dy = -1; dy <= 1; dy++) {
|
||||
if (dx === 0 && dy === 0) continue;
|
||||
let x = pixel.x + dx;
|
||||
let y = pixel.y + dy;
|
||||
if (!isEmpty(x, y)) {
|
||||
// Meledak: ubah area sekitar jadi molten_phosphorus
|
||||
for (let ex = -3; ex <= 3; ex++) {
|
||||
for (let ey = -3; ey <= 3; ey++) {
|
||||
let nx = pixel.x + ex;
|
||||
let ny = pixel.y + ey;
|
||||
if (isEmpty(nx, ny) && Math.random() < 0.6) {
|
||||
createPixel("molten_phosphorus", nx, ny);
|
||||
}
|
||||
}
|
||||
}
|
||||
deletePixel(pixel.x, pixel.y); // Hancurkan bomb setelah meledak
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,209 @@
|
|||
/*
|
||||
Barista Mods by Salmonfishyy (eu)
|
||||
Add many ingredients for drinks
|
||||
|
||||
Changelog - Foundation Level (v0.1)
|
||||
- Matcha Elements
|
||||
Changelog - Foundation Level (v0.2)
|
||||
- Oolong tea
|
||||
- cinnamon tea
|
||||
*/
|
||||
|
||||
elements.tencha = {
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#25360c","#324a0c"],
|
||||
density: 500,
|
||||
breakInto: "matcha_powder",
|
||||
isFood: true,
|
||||
desc: "Tea leaves, can break into matcha, look pretty sussy.",
|
||||
reactions: {
|
||||
"water": { elem2:"tea", tempMin:80 }
|
||||
}
|
||||
};
|
||||
|
||||
elements.matcha_powder = {
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#74A662","#74A12E"],
|
||||
density: 400,
|
||||
tempHigh: 80,
|
||||
stateHigh: "burn_matcha",
|
||||
isFood: true,
|
||||
desc: "Fine green powder from tea leaves. Vibrant color, earthy taste, and packed with antioxidants. Used in drinks, desserts, and rituals. Basically, classy leaf dust. Watch out for heat and oxygen!",
|
||||
reactions: {
|
||||
"oxygen": { elem2: "broke_matcha", chance: 0.5 },
|
||||
"dirty_water": { elem2: "null", chance: 0.5 },
|
||||
"pool_water": { elem2: "null", chance: 0.5 },
|
||||
"water": { elem2: "matcha_tea", chance: 0.5 },
|
||||
"seltzer": { elem2: "matcha_soda", chance: 0.5 },
|
||||
"salt_water": { elem2: "salty_matcha", chance: 0.5 },
|
||||
"sugar_water": { elem2: "sweet_matcha", chance: 0.5 }
|
||||
}
|
||||
};
|
||||
|
||||
elements.broke_matcha = {
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#556B2F","#8B4513"],
|
||||
density: 400,
|
||||
desc: "Broke matcha—once a proud green powder, now a sad, terrible mess. Faded, bitter, and questioning its life choices. Now useless."
|
||||
};
|
||||
|
||||
elements.matcha_tea = {
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
color: ["#5F8A3D"],
|
||||
density: 1000,
|
||||
isFood: true,
|
||||
desc: "Thick green drink, kinda earthy, kinda bitter. Looks like a magic potion, feels like a forest hug. Smooth, strong, and definitely plotting something...",
|
||||
reactions: {
|
||||
"milk": { elem2: "matcha_latte", chance: 0.5 },
|
||||
"cream": { elem2: "matcha_latte", chance: 0.5 },
|
||||
"salt": { elem2: "salty_matcha", chance: 0.5 },
|
||||
"sugar": { elem2: "sweet_matcha", chance: 0.5 },
|
||||
"carbon_dioxide": { elem2: "matcha_soda", chance: 0.5 }
|
||||
}
|
||||
};
|
||||
|
||||
elements.matcha_latte = {
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
color: ["#DDEEAF"],
|
||||
density: 1000,
|
||||
isFood: true,
|
||||
desc: "Green tea and milk mixed together. Smooth, slightly sweet, and a bit earthy. Looks fancy, tastes cozy.",
|
||||
reactions: {
|
||||
"milk": { elem2:null, chance: 0.5 },
|
||||
"cream": { elem2:null, chance: 0.5 }
|
||||
}
|
||||
};
|
||||
|
||||
elements.salty_matcha = {
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
color: ["#A2B57D"],
|
||||
density: 1000,
|
||||
isFood: true,
|
||||
desc: "Green tea but slightly salty. Confusing, kinda wrong, yet somehow still drinkable. Like matcha decided to rebel.",
|
||||
reactions: {
|
||||
"salt": { elem2:null, chance: 0.5 }
|
||||
}
|
||||
};
|
||||
|
||||
elements.matcha_soda = {
|
||||
behavior: behaviors.LIQUID,
|
||||
behavior: [
|
||||
"XX|CR:foam%3|XX",
|
||||
"M2|XX|M2",
|
||||
"M2|M1|M2",
|
||||
],
|
||||
tick: function(pixel) {
|
||||
if (Math.random() < 0.05 && isEmpty(pixel.x,pixel.y-1)) {
|
||||
let foam = releaseElement(pixel, "foam");
|
||||
if (foam) foam.color = pixelColorPick(foam,"#7EBF5C");
|
||||
}
|
||||
},
|
||||
|
||||
onMix: function(pixel) {
|
||||
releaseElement(pixel, "foam", shiftDown)
|
||||
},
|
||||
|
||||
category: "food",
|
||||
state: "liquid",
|
||||
color: ["#7EBF5C"],
|
||||
density: 1000,
|
||||
isFood: true,
|
||||
desc: "Carbonated green tea. Slightly bitter, extra fizzy. Tastes fresh, feels weird...",
|
||||
reactions: {
|
||||
"carbon_dioxide": { elem2:null, chance: 0.5 }
|
||||
}
|
||||
};
|
||||
|
||||
elements.oolong_leaves = {
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#CDB361","#8F6B3A"],
|
||||
density: 200,
|
||||
isFood: true,
|
||||
tempHigh: 120,
|
||||
stateHigh: "roasted_oolong",
|
||||
desc: "Dark, twisty tea leaves that look kinda serious. Smell fancy, taste like tea that went through a phase. Smooth, strong, and slightly dramatic.",
|
||||
reactions: {
|
||||
"water": { elem2:"oolong_tea", tempMin:80 },
|
||||
}
|
||||
};
|
||||
|
||||
elements.roasted_oolong = {
|
||||
behavior: behaviors.POWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#8F6B3A","#654321"],
|
||||
density: 220,
|
||||
isFood: true,
|
||||
desc: "Roasted oolong—deeper flavor, slightly smoky, and probably wiser now.",
|
||||
reactions: {
|
||||
"water": { elem2:"oolong_tea", tempMin:80 },
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
elements.cinnamon = {
|
||||
behavior: behaviors.SUPPORTPOWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#6a462f","#4a3120"],
|
||||
density: 500,
|
||||
breakInto: "cinnamon_powder",
|
||||
isFood: true,
|
||||
desc: "Cinnamon, a thingy things with spicy flavour.",
|
||||
reactions: {
|
||||
"water": { elem2:"cinnamon_tea", tempMin:80, color2:"#6c3213" },
|
||||
}
|
||||
};
|
||||
|
||||
elements.cinnamon_powder = {
|
||||
behavior: behaviors.SUPPORTPOWDER,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#986544"],
|
||||
density: 589,
|
||||
isFood: true,
|
||||
desc: "Cinnamon powder, from cinnamon, a thingy things powder with spicy flavour.",
|
||||
reactions: {
|
||||
"water": { elem2:"cinnamon_tea", chance: 0.5, color2:"#6c3213" },
|
||||
}
|
||||
};
|
||||
|
||||
elements.cinnamon_tea = {
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#723900"],
|
||||
density: 1000,
|
||||
isFood: true,
|
||||
desc: "Cozy tea with spicy taste.",
|
||||
reactions: {
|
||||
"cinnamon_powder": { elem2:"null", chance: 0.5 },
|
||||
}
|
||||
};
|
||||
|
||||
elements.oolong_tea = {
|
||||
behavior: behaviors.LIQUID,
|
||||
category: "food",
|
||||
state: "solid",
|
||||
color: ["#ADA07B"],
|
||||
density: 1000,
|
||||
isFood: true,
|
||||
desc: "it's just tea, make from oolong.",
|
||||
reactions: {
|
||||
"sugar": { elem2:"null", chance: 0.5 },
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
const oldExplode = explodeAt;
|
||||
let explosionCooldown = 0
|
||||
playExplosionSound = function(){
|
||||
var audio = new Audio("https://JustAGenericUsername.github.io/explosion.mp3");
|
||||
audio.play();
|
||||
}
|
||||
explodeAt = function(x,y,radius,fire="fire"){
|
||||
oldExplode(x,y,radius,fire);
|
||||
if(explosionCooldown <= 0){
|
||||
playExplosionSound();
|
||||
explosionCooldown = 7
|
||||
//console.log("success")
|
||||
} //else {
|
||||
//console.log("yeah no")
|
||||
//}
|
||||
}
|
||||
runEveryTick(function(){
|
||||
explosionCooldown -= 1;
|
||||
})
|
||||
63
mods/mars.js
63
mods/mars.js
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
elements.mars_gunk = {
|
||||
color: "#121212",
|
||||
behavior: behaviors.DGAS,
|
||||
|
|
@ -29,8 +28,8 @@ elements.mars_basalt = {
|
|||
state: "solid",
|
||||
density: 5000,
|
||||
extraInfo: "Woah",
|
||||
tempHigh: "molten_mars",
|
||||
stateHigh: "600",
|
||||
tempHigh: "700",
|
||||
stateHigh: "molten_mars",
|
||||
hardness: 0.7,
|
||||
breakInto: ["mars_dust", "mars_rock", "mars_rock", "mars_rock", "molten_mars", "mars_debris", "mars_debris", "gunk", "mars_rock_wall"]
|
||||
}
|
||||
|
|
@ -113,7 +112,11 @@ elements.mars_ironheart_ore = {
|
|||
}
|
||||
elements.mars_ironheart = {
|
||||
color: ["#e8e8e8", "#bd1102"],
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
behavior: [
|
||||
"XX|CR:radiation%3|XX",
|
||||
"XX|XX|XX",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
category: "mars",
|
||||
state: "solid",
|
||||
density: 1500,
|
||||
|
|
@ -155,10 +158,10 @@ elements.nosmoker = {
|
|||
breakInto: ["ironheart", "mars_ironheart", "ironheart_ore", "antigunk"]
|
||||
}
|
||||
elements.ironheart = {
|
||||
color: "#e9825a",
|
||||
color: "#FF6B5A",
|
||||
behavior: [
|
||||
"XX|XX|XX|",
|
||||
"XX|XX|XX|",
|
||||
"XX|CR:radiation%2|XX|",
|
||||
"XX|CH:feynmanium%0.1|XX|",
|
||||
"M2|M1|M2|",
|
||||
],
|
||||
category: "mars",
|
||||
|
|
@ -166,6 +169,40 @@ elements.ironheart = {
|
|||
state: "solid",
|
||||
stateHigh: "molten_mars",
|
||||
extraInfo: "Very Sturdy.",
|
||||
stateLow: "depleted_ironheart",
|
||||
tempLow: -50,
|
||||
tempHigh: 1500,
|
||||
reactions: {
|
||||
"electric": { elem1: "smint", elem2: "null" },
|
||||
},
|
||||
}
|
||||
elements.depleted_ironheart = {
|
||||
color: "#e9825a",
|
||||
behavior: [
|
||||
"XX|XX|XX|",
|
||||
"XX|XX|XX|",
|
||||
"M2|M1|M2|",
|
||||
],
|
||||
category: "mars",
|
||||
density: 1200,
|
||||
state: "solid",
|
||||
stateHigh: "molten_mars",
|
||||
reactions: {
|
||||
"electric": { elem1: "smint", elem2: "null" },
|
||||
},
|
||||
}
|
||||
elements.feynmanium = {
|
||||
color: "#8C7656",
|
||||
behavior: [
|
||||
"XX|XX|XX|",
|
||||
"XX|XX|XX|",
|
||||
"M2|M1|M2|",
|
||||
],
|
||||
category: "mars",
|
||||
density: 1200,
|
||||
state: "solid",
|
||||
stateHigh: "molten_mars",
|
||||
tempHigh: 6000,
|
||||
reactions: {
|
||||
"electric": { elem1: "smint", elem2: "null" },
|
||||
},
|
||||
|
|
@ -190,7 +227,7 @@ elements.red_gold_powder = {
|
|||
}
|
||||
elements.red_gold = {
|
||||
color: ["#D20103", "#E4080A", "#EFC3CA"],
|
||||
behavior: behaviors.POWDER,
|
||||
behavior: behaviors.WALL,
|
||||
category: "mars",
|
||||
state: "solid",
|
||||
density: 1350,
|
||||
|
|
@ -240,7 +277,7 @@ elements.mars_coal = {
|
|||
stateHigh: "molten_mars",
|
||||
temp: 10,
|
||||
reactions: {
|
||||
"electric": { elem2: "useless", chance: 0.01 },
|
||||
"electric": { elem2: "smint", chance: 0.01 },
|
||||
}
|
||||
}
|
||||
elements.mars_ice = {
|
||||
|
|
@ -354,7 +391,8 @@ elements.ironheart_core = {
|
|||
conduct: 1,
|
||||
extraInfo: "wha"
|
||||
}
|
||||
// 2.9.17.1
|
||||
|
||||
// 2.10.20
|
||||
// most elements done :D
|
||||
// iron heart ore
|
||||
// iron heart
|
||||
|
|
@ -385,7 +423,10 @@ elements.ironheart_core = {
|
|||
// added cores that emit electricity
|
||||
// its like plants
|
||||
// dumbed down ironheart a bit, im thinking about its behaviour
|
||||
|
||||
// Ironheart is Radioactive
|
||||
// Red Gold is Solid
|
||||
// Feynmanium
|
||||
// make things have recaitons
|
||||
|
||||
// Creditssss
|
||||
// Ghanisma - idea for 2.9.16
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ elements.soul_sand = {
|
|||
category: "minecraft",
|
||||
state: "solid",
|
||||
tempHigh: 2575,
|
||||
stateHigh: "soul_glass",
|
||||
stateHigh: "molten_soul_glass",
|
||||
density: 1375,
|
||||
reactions: {
|
||||
"water": { "elem1":"wet_soul_sand", "elem2":null },
|
||||
|
|
@ -114,6 +114,19 @@ elements.wet_soul_sand = {
|
|||
stateHigh: "soul_sand",
|
||||
density: 1660,
|
||||
};
|
||||
elements.molten_soul_glass = {
|
||||
color: ["#36d7ec", "#2fbacd", "#289faf", "#218491", "#1a6a75"],
|
||||
fireColor: "#36d7ec",
|
||||
viscosity: 1000,
|
||||
behavior: behaviors.MOLTEN,
|
||||
category: "minecraft",
|
||||
density: 1625,
|
||||
hidden: true,
|
||||
tempLow: 2540,
|
||||
stateLow: "soul_glass",
|
||||
state: "liquid",
|
||||
temp: 2700,
|
||||
}
|
||||
/* unfinished but near:
|
||||
Soul Adobe,
|
||||
Molten Soul Glass,
|
||||
|
|
@ -135,6 +148,13 @@ function playShriek() {
|
|||
var audio = new Audio("https://JustAGenericUsername.github.io/shriek" + Math.floor((Math.random()*4) +1) + ".ogg");
|
||||
audio.play();
|
||||
}
|
||||
async function _GNPrompt(message, title = "Prompt", defaultValue = "") { // thanks to ggod
|
||||
return new Promise(resolve => {
|
||||
promptInput(message, (result) => {
|
||||
resolve(result);
|
||||
}, title, defaultValue);
|
||||
})
|
||||
}
|
||||
function turnIntoSpecific(pixel){
|
||||
newPixel = pixel.storedPixel
|
||||
newPixel.x = pixel.x;
|
||||
|
|
@ -597,8 +617,8 @@ elements.sculk_wifi_transmitter = {
|
|||
hoverStat: function(pixel){
|
||||
return pixel.channel || "unset"
|
||||
},
|
||||
onSelect: function(){
|
||||
let ans1 = prompt("What channel should this transmitter be? Wont work if you do multiple while paused. (This is meant to be used in machinery!)", channelVar||0)
|
||||
onSelect: async function(){
|
||||
let ans1 = await _GNPrompt("What channel should this transmitter be? Wont work if you do multiple while paused. (This is meant to be used in machinery!)", "minecraft.js is asking you...",channelVar||0)
|
||||
channelVar = ans1
|
||||
},
|
||||
tick: function(pixel){
|
||||
|
|
@ -636,8 +656,8 @@ elements.sculk_wifi_receiver = {
|
|||
hoverStat: function(pixel){
|
||||
return pixel.channel || "unset"
|
||||
},
|
||||
onSelect: function(){
|
||||
let ans1 = prompt("What channel should this receiver be? Wont work if you do multiple while paused. (This is meant to be used in machinery!)", channelVar||0)
|
||||
onSelect: async function(){
|
||||
let ans1 = await _GNPrompt("What channel should this receiver be? Wont work if you do multiple while paused. (This is meant to be used in machinery!)", "minecraft.js is asking you...", channelVar||0)
|
||||
channelVar = ans1
|
||||
},
|
||||
tick: function(pixel){
|
||||
|
|
@ -772,26 +792,18 @@ elements.obsidian = { //subject to change
|
|||
density: 2400,
|
||||
renderer: function(pixel, ctx){
|
||||
autoFillColorRectangle(ctx, pixel, "#06030B", 1, 1, 0, 0)
|
||||
autoFillColorRectangle(ctx, pixel, "#000001", 0.5, 1/6, 0, 0)
|
||||
autoFillColorRectangle(ctx, pixel, "#000001", 1/6, 1/6, 1/6, 5/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#000001", 1/6, 1/6, 5/6, 2/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#100C1C", 1/6, 1/6, 0, 5/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#100C1C", 1/3, 1/5, 1/6, 0.5)
|
||||
autoFillColorRectangle(ctx, pixel, "#100C1C", 1/6, 1/3, 1/3, 1/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#100C1C", 1/6, 1/6, 2/3, 0)
|
||||
autoFillColorRectangle(ctx, pixel, "#100C1C", 1/6, 0.5, 2/3, 0.5)
|
||||
autoFillColorRectangle(ctx, pixel, "#100C1C", 1/3, 1/6, 2/3, 0.5)
|
||||
autoFillColorRectangle(ctx, pixel, "#100C1C", 1/3, 1/6, 0.5, 5/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/6, 1/6, 0, 2/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/6, 1/6, 1/6, 1/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/6, 1/6, 0.5, 0)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/6, 1/6, 5/6, 1/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/6, 1/6, 1/3, 5/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#3B2754", 1/6, 1/6, 0, 1/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#3B2754", 1/6, 1/6, 1/6, 1/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#3B2754", 1/3, 1/6, 1/3, 2/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#3B2754", 1/6, 1/6, 2/3, 1/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#3B2754", 1/6, 1/6, 5/6, 1/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#000100", 1/6, 1/6, 5/6, 5/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#000100", 1/6, 1/3, 1/3, 2/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#000100", 1/3, 1/6, 1/6, 2/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#000100", 1/6, 1/6, 0, 1/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#000100", 1/3, 1/6, 1/6, 0)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/3, 1/3, 1/2, 0)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/2, 1/6, 1/3, 1/6)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/3, 1/6, 2/3, 2/3)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/6, 1/6, 1/3, 1/2)
|
||||
autoFillColorRectangle(ctx, pixel, "#271E3D", 1/6, 1/3, 0, 1/2)
|
||||
autoFillColorRectangle(ctx, pixel, "#3B2754", 1/5, 1/6, 5/6, 1/2)
|
||||
autoFillColorRectangle(ctx, pixel, "#3B2754", 1/6, 1/6, 1/2, 0)
|
||||
}
|
||||
}
|
||||
elements.molten_obsidian = {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
behaviors.SOLIDIFY = function(pixel) {
|
||||
pixel.solid = true
|
||||
}
|
||||
|
|
@ -1548,12 +1549,107 @@ grabAllWeights = function(pixel){
|
|||
return results
|
||||
}
|
||||
|
||||
/*elements.Cherries_Ceri_Moji = {
|
||||
color: "#fcd1d7",
|
||||
category: Student,
|
||||
state: High_School,
|
||||
behavior: [Shy, Introverted, Easily_Excited, Kind],
|
||||
pronouns: [She,Her,Herself],
|
||||
sexuality: [Panromantic, Asexual],
|
||||
desc: "Ceri is a 16 year old high school student who loves cats"
|
||||
}*/
|
||||
var modName = "mods/nekonicos_stuff.js";
|
||||
var cookieMod = "mods/cookie_clicker.js";
|
||||
|
||||
if (!enabledMods.includes(cookieMod)) {
|
||||
|
||||
elements.cookie_dough = {
|
||||
color: ["#bfac91","#CDBFAB",],
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
reactions: {
|
||||
"chocolate": { elem1:"chocolate_chip_cookie_dough", elem2:null, chance: 0.5 },
|
||||
"chocolate_powder": { elem1:"chocolate_chip_cookie_dough", elem2:null, chance: 0.5 },
|
||||
},
|
||||
category: "food",
|
||||
tempHigh: 74,
|
||||
stateHigh: "plain_cookie",
|
||||
burn:40,
|
||||
burnTime:25,
|
||||
burnInto:"ash",
|
||||
state: "solid",
|
||||
density: 526.9,
|
||||
isFood: true
|
||||
}
|
||||
|
||||
elements.chocolate_chip_cookie_dough = {
|
||||
color: ["#bfac91","#CDBFAB","#bfac91","#CDBFAB","#bfac91","#CDBFAB","#bfac91","#CDBFAB","#bfac91","#CDBFAB","#4d2818","#3b1b0d","#33160a"],
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
category: "food",
|
||||
tempHigh: 74,
|
||||
stateHigh: "cookie",
|
||||
burn:40,
|
||||
burnTime:25,
|
||||
burnInto:"ash",
|
||||
state: "solid",
|
||||
density: 526.9,
|
||||
isFood: true
|
||||
}
|
||||
|
||||
clicked = false
|
||||
cookies = 0
|
||||
oldcookies = 0
|
||||
createdcookies = 0
|
||||
|
||||
elements.plain_cookie = {
|
||||
color: ["#C4966C","#C0946B"],
|
||||
behavior: behaviors.POWDER,
|
||||
reactions: {
|
||||
"chocolate": { elem1:"cookie", elem2:null, chance: 0.25 },
|
||||
"chocolate_powder": { elem1:"cookie", elem2:null, chance: 0.25 },
|
||||
},
|
||||
tempHigh: 192,
|
||||
stateHigh: "toast",
|
||||
category: "food",
|
||||
burn: 10,
|
||||
burnTime: 200,
|
||||
burnInto: "toast",
|
||||
breakInto: "crumb",
|
||||
breakIntoColor: ["#c8946a","#c08655","#ba7a45","#a86d3e"],
|
||||
state: "solid",
|
||||
density: 233.96,
|
||||
isFood: true
|
||||
}
|
||||
|
||||
elements.cookie = {
|
||||
color: ["#C4966C","#C0946B","#C4966C","#C0946B","#C4966C","#C0946B","#C4966C","#C0946B","#C4966C","#C0946B","#4d2818","#3b1b0d","#33160a"],
|
||||
behavior: behaviors.POWDER,
|
||||
tick: function(pixel) {
|
||||
var top = mousePos.y - Math.floor(mouseSize/2);
|
||||
var bottom = mousePos.y + Math.floor(mouseSize/2);
|
||||
var left = mousePos.x - Math.floor(mouseSize/2);
|
||||
var right = mousePos.x + Math.floor(mouseSize/2);
|
||||
if ((pixel.x >= left && pixel.x <= right && pixel.y >= top && pixel.y <= bottom) && mouseIsDown === true && clicked === false) {
|
||||
clicked = true
|
||||
cookies += 1
|
||||
}
|
||||
else if ((pixel.x >= left && pixel.x <= right && pixel.y >= top && pixel.y <= bottom) && mouseIsDown !== true && clicked === true) {
|
||||
clicked = false
|
||||
}
|
||||
doDefaults(pixel);
|
||||
},
|
||||
tempHigh: 95,
|
||||
stateHigh: ["melted_chocolate","plain_cookie","plain_cookie"],
|
||||
category: "food",
|
||||
burn: 10,
|
||||
burnTime: 200,
|
||||
burnInto: ["melted_chocolate","plain_cookie","plain_cookie"],
|
||||
breakInto: ["crumb","crumb","crumb","crumb","crumb","chocolate","chocolate_powder"],
|
||||
breakIntoColor: ["#bfac91","#CDBFAB","#bfac91","#CDBFAB","#bfac91","#CDBFAB","#bfac91","#CDBFAB","#bfac91","#CDBFAB","#4d2818","#3b1b0d","#33160a"],
|
||||
state: "solid",
|
||||
density: 233.96,
|
||||
isFood: true,
|
||||
renderer: function(pixel,ctx) {
|
||||
if (!viewInfo[view].effects) { return }
|
||||
if (isEmpty(pixel.x,pixel.y+1) || !outOfBounds(pixel.x,pixel.y+1) || pixelMap[pixel.x][pixel.y+1].element === "pipe") {
|
||||
drawPlus(ctx,"#C4966C",pixel.x,pixel.y,undefined,2)
|
||||
}
|
||||
drawDefault(ctx,pixel)
|
||||
}
|
||||
}
|
||||
|
||||
elements.dough.reactions.sugar = { elem1:"cookie_dough", elem2: null, chance:0.5}
|
||||
elements.dough.reactions.chocolate = { elem1:"chocolate_chip_cookie_dough", elem2: null, chance:0.5}
|
||||
elements.dough.reactions.chocolate_powder = { elem1:"chocolate_chip_cookie_dough", elem2: null, chance:0.5}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
// Gallium is the best element
|
||||
async function _nousersthingsprompt(message, defaultValue = "") { // thanks to ggod for updated prompt function
|
||||
return new Promise(resolve => {
|
||||
promptInput(message, (result) => {
|
||||
resolve(result);
|
||||
}, "nousersthings.js is asking you...", defaultValue);
|
||||
})
|
||||
}
|
||||
behaviors.RADSOLID = [
|
||||
"XX|CR:radiation%1|XX",
|
||||
"CR:radiation%1|XX|CR:radiation%1",
|
||||
|
|
@ -854,11 +861,9 @@ elements.destroyable_e_pipe = {
|
|||
currentChannel = 0;
|
||||
elements.channel_pipe = {
|
||||
color: "#414c4f",
|
||||
onSelect: function() {
|
||||
var answer3 = prompt("Please input the desired channel of this pipe strand. Warning: It wont work if you do multiple strand types while paused.",(currentChannel||undefined));
|
||||
if (!answer3) { return }
|
||||
currentChannel = answer3;
|
||||
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole. Use the prop tool to set channel to a number before erasing the holes.");
|
||||
onSelect: async function() {
|
||||
currentChannel = await _nousersthingsprompt("Please input the desired channel of this pipe strand. Warning: It wont work if you do multiple strand types while paused.", (currentChannel||undefined))
|
||||
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole. Channel pipes only give pixels to channel pipes with the same channel.");
|
||||
},
|
||||
tick: function(pixel) {
|
||||
if (pixel.start===pixelTicks){
|
||||
|
|
@ -977,11 +982,9 @@ elements.channel_pipe = {
|
|||
},
|
||||
elements.destroyable_channel_pipe = {
|
||||
color: "#414c4f",
|
||||
onSelect: function() {
|
||||
var answer3 = prompt("Please input the desired channel of this pipe strand. Warning: It wont work if you do multiple strand types while paused.",(currentChannel||undefined));
|
||||
if (!answer3) { return }
|
||||
currentChannel = answer3;
|
||||
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole. Use the prop tool to set channel to a number before erasing the holes.");
|
||||
onSelect: async function() {
|
||||
currentChannel = await _nousersthingsprompt("Please input the desired channel of this pipe strand. Warning: It wont work if you do multiple strand types while paused.", (currentChannel||undefined))
|
||||
logMessage("Draw a pipe, wait for walls to appear, then erase the exit hole. Use the prop tool to set channel to a number before erasing the holes.");
|
||||
},
|
||||
tick: function(pixel) {
|
||||
if (pixel.start === pixelTicks){
|
||||
|
|
@ -1328,8 +1331,8 @@ elements.bridge_pipe = {
|
|||
filterTypeVar = 0;
|
||||
elements.filter = {
|
||||
color: "#599fc2",
|
||||
onSelect: function() {
|
||||
var answer4 = prompt("Please input the desired element of this filter. It will not work if you do multiple filter types while paused.",(filterTypeVar||undefined));
|
||||
onSelect: async function() {
|
||||
var answer4 = await _nousersthingsprompt("Please input the desired element of this filter. It will not work if you do multiple filter types while paused.",(filterTypeVar||undefined));
|
||||
if (!answer4) { return }
|
||||
filterTypeVar = answer4;
|
||||
},
|
||||
|
|
@ -1559,11 +1562,11 @@ elements.converter = {
|
|||
}
|
||||
}
|
||||
},
|
||||
onSelect: function() {
|
||||
var answer5 = prompt("Please input what type of element should be converted. Write \"all\" to include everything.",(converter1Var||undefined));
|
||||
onSelect: async function() {
|
||||
var answer5 = await _nousersthingsprompt("Please input what type of element should be converted. Write \"all\" to include everything.",(converter1Var||undefined));
|
||||
if (!answer5) { return }
|
||||
converter1Var = answer5;
|
||||
var answer6 = prompt("Please input what it should turn into.",(converter2Var||undefined));
|
||||
var answer6 = await _nousersthingsprompt("Please input what it should turn into.",(converter2Var||undefined));
|
||||
if (!answer6) { return }
|
||||
converter2Var = answer6;
|
||||
},
|
||||
|
|
@ -2302,8 +2305,8 @@ elements.element_filler = {
|
|||
excludeRandom: true,
|
||||
state: "solid",
|
||||
movable: "false",
|
||||
onSelect: function() {
|
||||
var answer6 = prompt("Please input the desired element of this filler. It will not work if you do multiple filler types while paused.",(elemfillerVar||undefined));
|
||||
onSelect: async function() {
|
||||
var answer6 = await _nousersthingsprompt("Please input the desired element of this filler. It will not work if you do multiple filler types while paused.",(elemfillerVar||undefined));
|
||||
if (!answer6) { return }
|
||||
elemfillerVar = mostSimilarElement(answer6);
|
||||
},
|
||||
|
|
@ -2335,8 +2338,8 @@ elements.inner_outliner = {
|
|||
color: elements.filler.color,
|
||||
category: elements.filler.category,
|
||||
excludeRandom: true,
|
||||
onSelect: function() {
|
||||
var answerot = prompt("Please input the desired element of this outliner. It will not work if you do multiple outliner types while paused.",(outlinerVar||undefined));
|
||||
onSelect: async function() {
|
||||
var answerot = await _nousersthingsprompt("Please input the desired element of this outliner. It will not work if you do multiple outliner types while paused.",(outlinerVar||undefined));
|
||||
if (!answerot) { return }
|
||||
outlinerVar = mostSimilarElement(answerot);
|
||||
},
|
||||
|
|
@ -2566,8 +2569,8 @@ elements.selective_void = {
|
|||
excludeRandom: true,
|
||||
state: "solid",
|
||||
movable: "false",
|
||||
onSelect: function() {
|
||||
var selvoidans = prompt("Please input the desired element of this void. It will not work if you do multiple void types while paused.",(selvoid||undefined));
|
||||
onSelect: async function() {
|
||||
var selvoidans = await _nousersthingsprompt("Please input the desired element of this void. It will not work if you do multiple void types while paused.",(selvoid||undefined));
|
||||
if (!selvoidans) { return }
|
||||
selvoid = mostSimilarElement(selvoidans);
|
||||
},
|
||||
|
|
@ -2594,8 +2597,8 @@ elements.scuffed_circle_brush = {
|
|||
excludeRandom: true,
|
||||
state: "solid",
|
||||
movable: false,
|
||||
onSelect: function(){
|
||||
var answerE = prompt("Element of the brush.",(circleElem||undefined));
|
||||
onSelect: async function(){
|
||||
var answerE = await _nousersthingsprompt("Element of the brush.",(circleElem||undefined));
|
||||
if (!answerE) { return }
|
||||
circleElem = mostSimilarElement(answerE);
|
||||
},
|
||||
|
|
@ -2616,8 +2619,8 @@ elements.scuffed_triangle_brush = {
|
|||
excludeRandom: true,
|
||||
state: "solid",
|
||||
movable: false,
|
||||
onSelect: function(){
|
||||
var answerE = prompt("Element of the brush.",(circleElem||undefined));
|
||||
onSelect: async function(){
|
||||
var answerE = await _nousersthingsprompt("Element of the brush.",(circleElem||undefined));
|
||||
if (!answerE) { return }
|
||||
circleElem = mostSimilarElement(answerE);
|
||||
},
|
||||
|
|
@ -2666,8 +2669,8 @@ elements.grid_brush = {
|
|||
behavior: behaviors.WALL,
|
||||
category: "special",
|
||||
movable: false,
|
||||
onSelect: function() {
|
||||
var gridans = prompt("Please input the desired element of this grid brush",(gridElem||undefined));
|
||||
onSelect: async function() {
|
||||
var gridans = await _nousersthingsprompt("Please input the desired element of this grid brush",(gridElem||undefined));
|
||||
if (!gridans) { return }
|
||||
gridElem = mostSimilarElement(gridans);
|
||||
},
|
||||
|
|
@ -2733,11 +2736,11 @@ elements.ray_emitter = {
|
|||
behavior: behaviors.WALL,
|
||||
category: "machines",
|
||||
movable: false,
|
||||
onSelect: function(pixel){
|
||||
var rayans = prompt("Please input the desired element of this ray emitter",(rayElement||undefined));
|
||||
onSelect: async function(pixel){
|
||||
var rayans = await _nousersthingsprompt("Please input the desired element of this ray emitter",(rayElement||undefined));
|
||||
if (!rayans) { return }
|
||||
rayElement = mostSimilarElement(rayans);
|
||||
var rayans2 = prompt("Should the ray be stopped by walls? Write true or false.",(rayStoppedByWalls||false));
|
||||
var rayans2 = await _nousersthingsprompt("Should the ray be stopped by walls? Write true or false.",(rayStoppedByWalls||false));
|
||||
if (rayans2 == "false"){rayStoppedByWalls = false} else {rayStoppedByWalls = true}
|
||||
},
|
||||
hoverStat: function(pixel){
|
||||
|
|
@ -2849,37 +2852,37 @@ elements.specific_ray_emitter = {
|
|||
behavior: behaviors.WALL,
|
||||
category: "machines",
|
||||
movable: false,
|
||||
onSelect: function(pixel){
|
||||
var rayans = prompt("Please input the desired element of this ray emitter",(rayElement||undefined));
|
||||
onSelect: async function(pixel){
|
||||
var rayans = await _nousersthingsprompt("Please input the desired element of this ray emitter",(rayElement||undefined));
|
||||
if (!rayans) { return }
|
||||
rayElement = mostSimilarElement(rayans);
|
||||
if (rayElement != "ray"){rainbowMode = false}
|
||||
var rayans2 = prompt("Should the ray be stopped by walls? Write true or false.",(rayStoppedByWalls||false));
|
||||
var rayans2 = await _nousersthingsprompt("Should the ray be stopped by walls? Write true or false.",(rayStoppedByWalls||false));
|
||||
if (rayans2 == "false"){rayStoppedByWalls = false} else {rayStoppedByWalls = true}
|
||||
var rayans3 = prompt("How much should the beginning of the ray be offset from the emitter?", (specificRayStart||0));
|
||||
var rayans3 = await _nousersthingsprompt("How much should the beginning of the ray be offset from the emitter?", (specificRayStart||0));
|
||||
if (!rayans3) { return }
|
||||
specificRayStart = rayans3
|
||||
var rayans4 = prompt("How much should the end of the ray be offset from the emitter?", (specificRayEnd||0));
|
||||
var rayans4 = await _nousersthingsprompt("How much should the end of the ray be offset from the emitter?", (specificRayEnd||0));
|
||||
if (!rayans4) { return }
|
||||
specificRayEnd = rayans4
|
||||
var rayans5 = prompt("What angle should the ray be emitted at? Type anything that isnt a number to use default angle logic.", (specificRayAngle||0));
|
||||
var rayans5 = await _nousersthingsprompt("What angle should the ray be emitted at? Type anything that isnt a number to use default angle logic.", (specificRayAngle||0));
|
||||
if (!rayans5) { return }
|
||||
specificRayAngle = rayans5
|
||||
if (isNaN(parseFloat(specificRayAngle))){
|
||||
specificRayAngle = "nah"
|
||||
}
|
||||
var rayans6 = prompt("What element should the ray stop at?", (stopAtElement||"wall"));
|
||||
var rayans6 = await _nousersthingsprompt("What element should the ray stop at?", (stopAtElement||"wall"));
|
||||
if (!rayans6) { return }
|
||||
stopAtElement = mostSimilarElement(rayans6)
|
||||
let rayans7
|
||||
if (rayans == "ray"){ rayans7 = prompt("How long should the ray stay on screen in ticks?", (rayLife||10));
|
||||
if (rayans == "ray"){ rayans7 = await _nousersthingsprompt("How long should the ray stay on screen in ticks?", (rayLife||10));
|
||||
if (!rayans7) { return }
|
||||
if (isNaN(parseFloat(rayans7))){
|
||||
rayLife = 10
|
||||
} else {
|
||||
rayLife = rayans7
|
||||
}
|
||||
var rayans8 = prompt("Would you like rainbow mode to be enabled? Type yes or no.", (rainbowMode||"no"));
|
||||
var rayans8 = await _nousersthingsprompt("Would you like rainbow mode to be enabled? Type yes or no.", (rainbowMode||"no"));
|
||||
if (rayans8 == "yes"){rainbowMode = true} else {rainbowMode = false}
|
||||
}
|
||||
},
|
||||
|
|
@ -2978,8 +2981,8 @@ elements.run_some_code = {
|
|||
category: "tools",
|
||||
canPlace: false,
|
||||
tool: function(){},
|
||||
onSelect: function(){
|
||||
let code = prompt("Enter code to run")
|
||||
onSelect: async function(){
|
||||
let code = await _nousersthingsprompt("Enter code to run")
|
||||
if (code){
|
||||
eval(code)
|
||||
}
|
||||
|
|
@ -3096,8 +3099,8 @@ elements.piston_ray_emitter = {
|
|||
behavior: behaviors.WALL,
|
||||
category: "machines",
|
||||
movable: false,
|
||||
onSelect: function(){
|
||||
var ans1 = prompt("Would you like this piston to pull or push?", "pull").toLowerCase();
|
||||
onSelect: async function(){
|
||||
var ans1 = await _nousersthingsprompt("Would you like this piston to pull or push?", "pull").toLowerCase();
|
||||
if (ans1 == "pull"){pullOrPush = 1}
|
||||
else if (ans1 == "push"){pullOrPush = 2}
|
||||
},
|
||||
|
|
@ -3187,22 +3190,22 @@ elements.specific_piston_ray_emitter = {
|
|||
behavior: behaviors.WALL,
|
||||
category: "machines",
|
||||
movable: false,
|
||||
onSelect: function(){
|
||||
var ans1 = prompt("Would you like this piston to pull or push?", "pull").toLowerCase();
|
||||
onSelect: async function(){
|
||||
var ans1 = await _nousersthingsprompt("Would you like this piston to pull or push?", "pull").toLowerCase();
|
||||
if (ans1 == "pull"){pullOrPush = 1}
|
||||
else if (ans1 == "push"){pullOrPush = 2}
|
||||
var ans2 = parseInt(prompt("How offset should the start of the push/pulling be?", "0"))
|
||||
var ans2 = parseInt(await _nousersthingsprompt("How offset should the start of the push/pulling be?", "0"))
|
||||
pistonStart = ans2
|
||||
var ans3 = parseInt(prompt("How offset should the end of the push/pulling be?", "20"))
|
||||
var ans3 = parseInt(await _nousersthingsprompt("How offset should the end of the push/pulling be?", "20"))
|
||||
pistonEnd = ans3
|
||||
var ans4 = parseInt(prompt("How far should it push the pixels each charge?", "1"))
|
||||
var ans4 = parseInt(await _nousersthingsprompt("How far should it push the pixels each charge?", "1"))
|
||||
pistonDistance = ans4
|
||||
var ans5 = parseInt(prompt("How many ticks should it wait to be charged again?", "6"))
|
||||
var ans5 = parseInt(await _nousersthingsprompt("How many ticks should it wait to be charged again?", "6"))
|
||||
pistonCooldown = ans5
|
||||
var ans6 = parseInt(prompt("How many times should it repeat the push/pulling?", "1"))
|
||||
var ans6 = parseInt(await _nousersthingsprompt("How many times should it repeat the push/pulling?", "1"))
|
||||
pistonRepeat = ans6
|
||||
if (pistonRepeat != 1){
|
||||
var ans7 = parseInt(prompt("How many ticks should it wait between repeats?", "1"))
|
||||
var ans7 = parseInt(await _nousersthingsprompt("How many ticks should it wait between repeats?", "1"))
|
||||
pistonRepeatCooldown = ans7
|
||||
}
|
||||
},
|
||||
|
|
@ -3468,8 +3471,8 @@ elements.lattice_brush = {
|
|||
color: elements.grid_brush.color,
|
||||
behavior: behaviors.WALL,
|
||||
category: "special",
|
||||
onSelect: function(){
|
||||
let ans1 = prompt("Enter the element you want to use for the lattice", latticeElem||"wood")
|
||||
onSelect: async function(){
|
||||
let ans1 = await _nousersthingsprompt("Enter the element you want to use for the lattice", latticeElem||"wood")
|
||||
latticeElem = mostSimilarElement(ans1)
|
||||
},
|
||||
tick: function(pixel){
|
||||
|
|
@ -3490,8 +3493,8 @@ elements.spaced_lattice_brush = {
|
|||
color: elements.grid_brush.color,
|
||||
behavior: behaviors.WALL,
|
||||
category: "special",
|
||||
onSelect: function(){
|
||||
let ans1 = prompt("Enter the element you want to use for the lattice", latticeElem||"wood")
|
||||
onSelect: async function(){
|
||||
let ans1 = await _nousersthingsprompt("Enter the element you want to use for the lattice", latticeElem||"wood")
|
||||
latticeElem = mostSimilarElement(ans1)
|
||||
},
|
||||
tick: function(pixel){
|
||||
|
|
@ -3516,8 +3519,8 @@ elements.outer_outliner = {
|
|||
color: elements.inner_outliner.color,
|
||||
behavior: behaviors.WALL,
|
||||
category: "special",
|
||||
onSelect: function(){
|
||||
let ans1 = prompt("Enter the element you want to use for the outliner. The outliner will ignore pixels of this type.", outlinerElem||"wood")
|
||||
onSelect: async function(){
|
||||
let ans1 = await _nousersthingsprompt("Enter the element you want to use for the outliner. The outliner will ignore pixels of this type.", outlinerElem||"wood")
|
||||
outlinerElem = mostSimilarElement(ans1)
|
||||
},
|
||||
tick: function(pixel){
|
||||
|
|
@ -3622,8 +3625,8 @@ elements.copycat_filler = {
|
|||
color: elements.random.color,
|
||||
behavior:behaviors.WALL,
|
||||
category: "special",
|
||||
onSelect: function(){
|
||||
let ans1 = prompt("Enter the element you want to use for the copycat filler", copycatfillerElem||"sand")
|
||||
onSelect: async function(){
|
||||
let ans1 = await _nousersthingsprompt("Enter the element you want to use for the copycat filler", copycatfillerElem||"sand")
|
||||
copycatfillerElem = mostSimilarElement(ans1)
|
||||
},
|
||||
tick: function(pixel){
|
||||
|
|
@ -3799,8 +3802,8 @@ elements.pipe_transmitter = {
|
|||
movable: false,
|
||||
canContain: true,
|
||||
insulate: true,
|
||||
onSelect: () => {
|
||||
let newChannel = prompt("Enter the channel of this pipe transmitter. It will not work if you do multiple while paused.", pipe_transmitter_channelVar);
|
||||
onSelect: async () => {
|
||||
let newChannel = await _nousersthingsprompt("Enter the channel of this pipe transmitter. It will not work if you do multiple while paused.", pipe_transmitter_channelVar);
|
||||
pipe_transmitter_channelVar = newChannel;
|
||||
},
|
||||
tick: (pixel) => {
|
||||
|
|
@ -3830,8 +3833,8 @@ elements.pipe_receiver = {
|
|||
movable: false,
|
||||
canContain: true,
|
||||
insulate: true,
|
||||
onSelect: () => {
|
||||
let newChannel = prompt("Enter the channel of this pipe receiver. It will not work if you do multiple while paused.", pipe_receiver_channelVar);
|
||||
onSelect: async () => {
|
||||
let newChannel = await _nousersthingsprompt("Enter the channel of this pipe receiver. It will not work if you do multiple while paused.", pipe_receiver_channelVar);
|
||||
pipe_receiver_channelVar = newChannel;
|
||||
},
|
||||
tick: (pixel) => {
|
||||
|
|
@ -3911,8 +3914,8 @@ elements.sign = {
|
|||
color: "#FFFFFF",
|
||||
darkText: true,
|
||||
category: "special",
|
||||
onSelect: function(){
|
||||
let signi = prompt("What text should the sign display?", signInput||"Hello World!")
|
||||
onSelect: async function(){
|
||||
let signi = await _nousersthingsprompt("What text should the sign display?", signInput||"Hello World!")
|
||||
signInput = signi;
|
||||
},
|
||||
renderer: function(pixel, ctx){
|
||||
|
|
@ -3925,8 +3928,8 @@ elements.e_sign = {
|
|||
darkText: true,
|
||||
category: "special",
|
||||
movable: false,
|
||||
onSelect: () => {
|
||||
let signi = prompt("What text should the sign display?", signInput||"Hello World!")
|
||||
onSelect: async () => {
|
||||
let signi = await _nousersthingsprompt("What text should the sign display?", signInput||"Hello World!")
|
||||
signInput = signi;
|
||||
},
|
||||
renderer: function(pixel, ctx){
|
||||
|
|
@ -3972,8 +3975,8 @@ elements.mod_dectector = {
|
|||
category: "machines",
|
||||
movable: false,
|
||||
excludeRandom: true,
|
||||
onSelect: () => {
|
||||
let newMod = prompt("What mod should this machine detect?", "nousersthings.js"||modName)
|
||||
onSelect: async () => {
|
||||
let newMod = await _nousersthingsprompt("What mod should this machine detect?", "nousersthings.js"||modName)
|
||||
machinemodName = newMod
|
||||
},
|
||||
tick: (pixel) => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,421 @@
|
|||
emptyList = []
|
||||
|
||||
runPerPixel(function(pixel) {
|
||||
// run any code on each pixel every tick
|
||||
if (pixel.start>pixelTicks) {
|
||||
if (pixel.olderelement != undefined && pixel.oldercolor != undefined && pixel.olderstart != undefined && pixel.oldertemp != undefined && pixel.olderanimal != undefined && pixel.olderage != undefined) {
|
||||
OGChangePixel(pixel)
|
||||
}
|
||||
else {
|
||||
deletePixel(pixel.x,pixel.y)
|
||||
}
|
||||
} /*
|
||||
if (pixel.start>pixelTicks+10) {
|
||||
deletePixel(pixel.x,pixel.y)
|
||||
} */
|
||||
if (pixel.burnStart && pixel.burnStart>pixelTicks) {
|
||||
if (pixel.burning) {
|
||||
delete pixel.burning;
|
||||
delete pixel.burnStart;
|
||||
}
|
||||
}
|
||||
if (pixel.origColor && !pixel.stainStart) {
|
||||
pixel.stainStart = pixelTicks
|
||||
}
|
||||
if (pixel.stainStart && pixel.origColor && pixel.stainStart>pixelTicks) {
|
||||
pixel.color = "rgb("+pixel.origColor[0]+","+pixel.origColor[1]+","+pixel.origColor[2]+")"
|
||||
delete pixel.origColor
|
||||
delete pixel.stainStart
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
changePixel = function(pixel,element,changetemp=true) {
|
||||
if (!element) { return }
|
||||
if (elements[pixel.element].onChange !== undefined) {
|
||||
elements[pixel.element].onChange(pixel,element);
|
||||
}
|
||||
if (!elements[element]) {
|
||||
pixel.invalidElement = element;
|
||||
element = "unknown"
|
||||
}
|
||||
if (!pixel.olderelement) {
|
||||
pixel.olderelement = []
|
||||
}
|
||||
if (!pixel.oldercolor) {
|
||||
pixel.oldercolor = []
|
||||
}
|
||||
if (!pixel.olderstart) {
|
||||
pixel.olderstart = []
|
||||
}
|
||||
if (!pixel.oldertemp) {
|
||||
pixel.oldertemp = []
|
||||
}
|
||||
if (!pixel.olderanimal) {
|
||||
pixel.olderanimal = []
|
||||
}
|
||||
if (!pixel.olderage) {
|
||||
pixel.olderage = []
|
||||
}
|
||||
for (var i = 0; i <= 500; i++) {
|
||||
if (!pixel.olderelement[i]) {
|
||||
pixel.olderelement[i] = pixel.element
|
||||
if (pixel.element === "human") {
|
||||
pixel.olderelement[i] = "head"
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i <= 500; i++) {
|
||||
if (!pixel.oldercolor[i]) {
|
||||
pixel.oldercolor[i] = pixel.color
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i <= 500; i++) {
|
||||
if (!pixel.olderstart[i]) {
|
||||
pixel.olderstart[i] = pixel.start
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i <= 500; i++) {
|
||||
if (!pixel.oldertemp[i]) {
|
||||
pixel.oldertemp[i] = pixel.temp
|
||||
if (elements[pixel.element].tempHigh && elements[pixel.element].tempHigh < pixel.temp) {
|
||||
pixel.oldertemp[i] = (elements[pixel.element].tempHigh - 1.5)
|
||||
}
|
||||
if (elements[pixel.element].tempLow && elements[pixel.element].tempLow > pixel.temp) {
|
||||
pixel.oldertemp[i] = (elements[pixel.element].tempLow + 1.5)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i <= 500; i++) {
|
||||
if (!pixel.olderanimal[i]) {
|
||||
pixel.olderanimal[i] = pixel.animal
|
||||
if (!pixel.animal) {
|
||||
pixel.olderanimal[i] = pixel.element
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i <= 500; i++) {
|
||||
if (!pixel.olderage[i]) {
|
||||
pixel.olderage[i] = pixel.age
|
||||
if (!pixel.age) {
|
||||
pixel.olderage[i] = pixel.start
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
pixel.element = element;
|
||||
pixel.color = pixelColorPick(pixel);
|
||||
pixel.start = pixelTicks;
|
||||
var elementInfo = elements[element];
|
||||
if (elementInfo.burning == true) {
|
||||
pixel.burning = true;
|
||||
pixel.burnStart = pixelTicks;
|
||||
}
|
||||
else if (pixel.burning && !elementInfo.burn) {
|
||||
delete pixel.burning;
|
||||
delete pixel.burnStart;
|
||||
}
|
||||
delete pixel.origColor; // remove stain
|
||||
delete pixel.clone;
|
||||
if (pixel.glow !== undefined) {
|
||||
delete pixel.glow;
|
||||
}
|
||||
if (pixel.r && !elementInfo.rotatable) {
|
||||
delete pixel.r;
|
||||
}
|
||||
if (pixel.flipX && !elementInfo.flippableX) {
|
||||
delete pixel.flipX;
|
||||
}
|
||||
if (pixel.flipY && !elementInfo.flippableY) {
|
||||
delete pixel.flipY;
|
||||
}
|
||||
// If elementInfo.flippableX, set it to true or false randomly
|
||||
if (elementInfo.flipX !== undefined) { pixel.flipX = elementInfo.flipX }
|
||||
else if (elementInfo.flippableX) {
|
||||
pixel.flipX = Math.random() >= 0.5;
|
||||
}
|
||||
// If elementInfo.flippableY, set it to true or false randomly
|
||||
if (elementInfo.flipY !== undefined) { pixel.flipY = elementInfo.flipY }
|
||||
else if (elementInfo.flippableY) {
|
||||
pixel.flipY = Math.random() >= 0.5;
|
||||
}
|
||||
if (elementInfo.temp !== undefined && changetemp) {
|
||||
pixel.temp = (elementInfo.temp+pixel.temp)/2;
|
||||
pixelTempCheck(pixel)
|
||||
}
|
||||
if (pixel.con && !elementInfo.canContain) {
|
||||
delete pixel.con;
|
||||
}
|
||||
// If elementInfo.properties, set each key to its value
|
||||
if (elementInfo.properties !== undefined) {
|
||||
for (var key in elementInfo.properties) {
|
||||
// If it is an array or object, make a copy of it
|
||||
if (typeof elementInfo.properties[key] == "object") {
|
||||
pixel[key] = JSON.parse(JSON.stringify(elementInfo.properties[key]));
|
||||
}
|
||||
else {
|
||||
pixel[key] = elementInfo.properties[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pixel.alpha !== undefined) {
|
||||
delete pixel.alpha;
|
||||
}
|
||||
if (pixel.emit) {
|
||||
delete pixel.emit;
|
||||
}
|
||||
if (elements[element].alpha !== undefined) {
|
||||
pixel.alpha = elements[element].alpha;
|
||||
}
|
||||
if (elements[element].onPlace !== undefined) {
|
||||
elements[element].onPlace(pixel);
|
||||
}
|
||||
checkUnlock(element);
|
||||
}
|
||||
|
||||
OGChangePixel = function(pixel) {
|
||||
if (pixel.olderelement != undefined && pixel.oldercolor != undefined && pixel.olderstart != undefined && pixel.oldertemp != undefined && pixel.olderanimal != undefined && pixel.olderage != undefined && pixel.olderelement.length > emptyList.length && pixel.oldercolor.length > emptyList.length && pixel.olderstart.length > emptyList.length && pixel.oldertemp.length > emptyList.length && pixel.olderanimal.length > emptyList.length && pixel.olderage.length > emptyList.length && pixel.start<pixelTicks+5) {
|
||||
pixel.element = pixel.olderelement[(pixel.olderelement.length - 1)]
|
||||
pixel.color = pixel.oldercolor[(pixel.oldercolor.length - 1)]
|
||||
pixel.start = pixel.olderstart[(pixel.olderstart.length - 1)]
|
||||
pixel.temp = pixel.oldertemp[(pixel.oldertemp.length - 1)]
|
||||
pixel.animal = pixel.olderanimal[(pixel.olderanimal.length - 1)]
|
||||
pixel.age = pixel.olderage[(pixel.olderage.length - 1)]
|
||||
pixel.olderelement.pop()
|
||||
pixel.oldercolor.pop()
|
||||
pixel.olderstart.pop()
|
||||
pixel.oldertemp.pop()
|
||||
pixel.olderanimal.pop()
|
||||
pixel.olderage.pop()
|
||||
}
|
||||
else {
|
||||
deletePixel(pixel.x,pixel.y)
|
||||
}
|
||||
}
|
||||
|
||||
elements.reverse_time = {
|
||||
color: "#f2eeb8",
|
||||
tool: function(pixel) {},
|
||||
perTick: function() {
|
||||
pixelTicks -= 2;
|
||||
},
|
||||
category: "tools",
|
||||
canPlace: false,
|
||||
darkText: true,
|
||||
}
|
||||
/*
|
||||
|
||||
elements.egg = {
|
||||
color: "#e0d3ab",
|
||||
tick: function(pixel) {
|
||||
if (!pixel.animal && pixel.start>pixelTicks) {
|
||||
deletePixel(pixel.x,pixel.y)
|
||||
}
|
||||
else if (pixel.animal && pixel.start-pixelTicks >= 500 && Math.random() < 0.2) {
|
||||
deletePixel(pixel.x,pixel.y)
|
||||
}
|
||||
if (pixel.start === pixelTicks) {return}
|
||||
if (pixel.drag) pixel.fall = 0;
|
||||
if (!tryMove(pixel, pixel.x, pixel.y+1)) {
|
||||
if (pixel.animal || pixel.fall < 20) {
|
||||
if (Math.random() < 0.5) {
|
||||
if (!tryMove(pixel, pixel.x+1, pixel.y+1)) {
|
||||
tryMove(pixel, pixel.x-1, pixel.y+1);
|
||||
}
|
||||
} else {
|
||||
if (!tryMove(pixel, pixel.x-1, pixel.y+1)) {
|
||||
tryMove(pixel, pixel.x+1, pixel.y+1);
|
||||
}
|
||||
}
|
||||
pixel.fall = 0;
|
||||
}
|
||||
else if (outOfBounds(pixel.x,pixel.y+1) || (!isEmpty(pixel.x,pixel.y+1,true) && elements.egg.ignore.indexOf(pixelMap[pixel.x][pixel.y+1].element) === -1 && elements[pixelMap[pixel.x][pixel.y+1].element].state === "solid")) {
|
||||
changePixel(pixel,"yolk")
|
||||
}
|
||||
else {pixel.fall = 0}
|
||||
if (pixel.animal && pixelTicks-pixel.start >= 500 && Math.random() < 0.2) {
|
||||
changePixel(pixel,pixel.animal)
|
||||
}
|
||||
}
|
||||
else {pixel.fall ++}
|
||||
if (pixel.temp < -2 || pixel.temp > 100) {
|
||||
pixel.animal = null;
|
||||
}
|
||||
doDefaults(pixel);
|
||||
},
|
||||
ignore: ["paper","sponge","straw","wheat","rat","frog","pollen","clay","snow","mud","wet_sand","tinder","feather","bread","ice_cream","dough"],
|
||||
innerColor: "#ffffff",
|
||||
properties: { "fall":0 },
|
||||
tempHigh: 1500,
|
||||
stateHigh: ["steam","calcium","carbon_dioxide","sulfur_gas"],
|
||||
breakInto: "yolk",
|
||||
category: "food",
|
||||
state: "solid",
|
||||
density: 1031,
|
||||
cooldown: defaultCooldown
|
||||
}
|
||||
|
||||
elements.tadpole = {
|
||||
color: "#87b574",
|
||||
behavior: [
|
||||
"XX|XX|M2%25 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%14",
|
||||
"XX|FX%0.5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%14",
|
||||
"XX|M1|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water%14",
|
||||
],
|
||||
tick: function(pixel) {
|
||||
if (pixel.start-pixelTicks > 500) {
|
||||
OGChangePixel(pixel,"egg")
|
||||
pixel.color = pixelColorPick(pixel,"#717c80")
|
||||
pixel.animal = "tadpole"
|
||||
}
|
||||
if (pixelTicks-pixel.start > 500) {
|
||||
changePixel(pixel,"frog");
|
||||
}
|
||||
},
|
||||
reactions: {
|
||||
"algae": { elem2:null, chance:0.25 },
|
||||
"kelp": { elem2:"water", chance:0.25 }
|
||||
},
|
||||
tempHigh: 100,
|
||||
stateHigh: "steam",
|
||||
tempLow: -10,
|
||||
stateLow: "ice",
|
||||
breakInto: ["slime",null],
|
||||
category:"life",
|
||||
hidden: true,
|
||||
state: "solid",
|
||||
density: 1450,
|
||||
conduct: 0.2
|
||||
}
|
||||
|
||||
elements.frog = {
|
||||
color: "#607300",
|
||||
behavior: [
|
||||
"XX|XX|M2%3 AND SW:water,salt_water,sugar_water,dirty_water,seltzer%7",
|
||||
"XX|FX%0.5|CR:slime%0.01 AND BO",
|
||||
"XX|M1|XX",
|
||||
],
|
||||
reactions: {
|
||||
"fly": { elem2:null, chance:0.5, func:behaviors.FEEDPIXEL },
|
||||
"firefly": { elem1:"meat", elem2:null, chance:0.5 },
|
||||
"stink_bug": { elem2:null, chance:0.55, func:behaviors.FEEDPIXEL },
|
||||
"snail": { elem2:"limestone", chance:0.05, func:behaviors.FEEDPIXEL },
|
||||
"slug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
|
||||
"worm": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
|
||||
"spider": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
|
||||
"algae": { elem2:null, chance:0.5, func:behaviors.FEEDPIXEL },
|
||||
"kelp": { elem2:"water", chance:0.5, func:behaviors.FEEDPIXEL },
|
||||
"oxygen": { elem2:"carbon_dioxide", chance:0.5 },
|
||||
"dead_bug": { elem2:null, chance:0.2, func:behaviors.FEEDPIXEL },
|
||||
"mercury": { elem1:"rotten_meat", chance:0.1 },
|
||||
"bleach": { elem1:"rotten_meat", chance:0.1 },
|
||||
"infection": { elem1:"rotten_meat", chance:0.025 },
|
||||
"uranium": { elem1:"rotten_meat", chance:0.1 },
|
||||
"cyanide": { elem1:"rotten_meat", chance:0.1 },
|
||||
"chlorine": { elem1:"meat", chance:0.1 },
|
||||
"alcohol": { elem1:"meat", chance:0.025 },
|
||||
"dirty_water": { elem1:"rotten_meat", chance:0.0001 },
|
||||
"pool_water": { elem1:"rotten_meat", chance:0.005 },
|
||||
"vinegar": { elem1:"rotten_meat", chance:0.001 },
|
||||
},
|
||||
tick: function(pixel) {
|
||||
if (pixelTicks < pixel.start) {
|
||||
OGChangePixel(pixel,"tadpole");
|
||||
}
|
||||
},
|
||||
foodNeed: 10,
|
||||
baby: "tadpole",
|
||||
eggColor:"#717c80",
|
||||
temp: 19.1,
|
||||
tempHigh: 100,
|
||||
stateHigh: "cooked_meat",
|
||||
stateHighColor: "#CDAF96",
|
||||
onStateHigh: function(pixel) {
|
||||
releaseElement(pixel,"steam");
|
||||
},
|
||||
tempLow: -18,
|
||||
stateLow: "frozen_frog",
|
||||
category:"life",
|
||||
breakInto: "slime",
|
||||
burn:15,
|
||||
burnTime:300,
|
||||
state: "solid",
|
||||
density: 1450,
|
||||
conduct: 0.2
|
||||
}
|
||||
|
||||
elements.fly = {
|
||||
color: "#4c4e42",
|
||||
behaviorOn: [
|
||||
"XX|CR:flash|XX",
|
||||
"CR:flash|CH:ash|CR:flash",
|
||||
"XX|CR:flash|XX",
|
||||
],
|
||||
reactions: {
|
||||
"dead_plant": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"cooked_meat": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"rotten_meat": { elem2:[null,null,"ammonia"], chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"cheese": { elem2:[null,null,"ammonia"], chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"cheese_powder": { elem2:[null,null,"ammonia"], chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"rotten_cheese": { elem2:[null,null,"ammonia"], chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"vine": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"corn": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
|
||||
"potato": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
|
||||
"crumb": { elem2:null, chance:0.05, func:behaviors.FEEDPIXEL },
|
||||
"wheat": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
|
||||
"yeast": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"caramel": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"bread": { elem2:null, chance:0.1, func:behaviors.FEEDPIXEL },
|
||||
"sugar_water": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"honey": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL },
|
||||
"soda": { elem2:null, chance:0.15, func:behaviors.FEEDPIXEL }
|
||||
},
|
||||
tick: function(pixel, onHit) {
|
||||
var nx = pixel.flipX ? -1 : 1;
|
||||
var ny = Math.random() < 0.5 ? -1 : 1;
|
||||
var hit = false;
|
||||
if (!tryMove(pixel, pixel.x+nx, pixel.y+ny)) {
|
||||
if (!tryMove(pixel, pixel.x+nx, pixel.y-ny)) {
|
||||
if (!tryMove(pixel, pixel.x, pixel.y+ny)) {
|
||||
if (!tryMove(pixel, pixel.x, pixel.y-ny)) {hit=[pixel.x, pixel.y-ny]}
|
||||
}else {hit=[pixel.x, pixel.y+ny]}
|
||||
}else {hit=[pixel.x+nx, pixel.y-ny]}
|
||||
}else {hit=[pixel.x+nx, pixel.y+ny]}
|
||||
if (hit && onHit) {
|
||||
if (!isEmpty(hit[0], hit[1], true)) {
|
||||
onHit(pixel, pixelMap[hit[0]][hit[1]]);
|
||||
}
|
||||
else {onHit(pixel);}
|
||||
}
|
||||
if (pixel.del) {return}
|
||||
if (!isEmpty(pixel.x+nx,pixel.y) || Math.random() < 0.02) {
|
||||
pixel.flipX = !pixel.flipX;
|
||||
}
|
||||
if (pixel.charge && elements[pixel.element].behaviorOn) {
|
||||
pixelTick(pixel)
|
||||
}
|
||||
doDefaults(pixel);
|
||||
if (pixel.start-pixelTicks > 500) {
|
||||
OGChangePixel(pixel,"egg")
|
||||
pixel.animal = "fly"
|
||||
}
|
||||
},
|
||||
foodNeed: 15,
|
||||
tempHigh: 100,
|
||||
stateHigh: "ash",
|
||||
tempLow: 0,
|
||||
stateLow: "dead_bug",
|
||||
breakInto: "dead_bug",
|
||||
category:"life",
|
||||
burn:95,
|
||||
burnTime:25,
|
||||
state: "solid",
|
||||
density: 600,
|
||||
conduct: 1
|
||||
} */
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
elements.acetobacter = {
|
||||
color: ["#328fa8", "#6bbfd6", "#19718a"],
|
||||
category: "life",
|
||||
tempHigh: "102",
|
||||
tempLow: "-2",
|
||||
stateHigh: ["steam","steam","steam","sugar"],
|
||||
stateLow: ["ice","ice","ice","sugar_ice"],
|
||||
breakInto:["dna","dna","dna","water"],
|
||||
behavior: [
|
||||
["XX","M1%30","XX"],
|
||||
["M1%50","XX","M1%50"],
|
||||
["XX","M1%30","XX"]
|
||||
],
|
||||
reactions:{
|
||||
"alcohol" :{ elem1: "acetobacter", elem2:"vinegar", chance:0.2,}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue