This commit is contained in:
parent
7f9390d50e
commit
9bb962c188
|
|
@ -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 = _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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
})
|
||||
|
|
@ -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 = _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,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,10 +982,8 @@ 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;
|
||||
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) {
|
||||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue