commit
3cbed2f927
|
|
@ -0,0 +1,266 @@
|
||||||
|
|
||||||
|
elements.peat_bog = {
|
||||||
|
color: "#483C32",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 55,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 120,
|
||||||
|
stain: 0.2
|
||||||
|
};
|
||||||
|
elements.marsh_muck = {
|
||||||
|
color: "#6B8E23",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 50,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 140,
|
||||||
|
stain: 0.25
|
||||||
|
};
|
||||||
|
elements.quagmire = {
|
||||||
|
color: "#8B4513",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 60,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 160,
|
||||||
|
stain: 0.3
|
||||||
|
};
|
||||||
|
elements.slime_mold = {
|
||||||
|
color: "#00FF00",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 30,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 100,
|
||||||
|
stain: 0.2
|
||||||
|
};
|
||||||
|
elements.mangrove_mud = {
|
||||||
|
color: "#8B4513",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 55,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 150,
|
||||||
|
stain: 0.25
|
||||||
|
};
|
||||||
|
peat_slurry = {
|
||||||
|
color: "#556B2F",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 50,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 130,
|
||||||
|
stain: 0.28
|
||||||
|
};
|
||||||
|
elements.bog_ooze = {
|
||||||
|
color: "#2E8B57",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 135,
|
||||||
|
stain: 0.3
|
||||||
|
};
|
||||||
|
elements.fen_mud = {
|
||||||
|
color: "#556B2F",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 100,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 155,
|
||||||
|
stain: 0.28
|
||||||
|
};
|
||||||
|
elements.swamp_sludge = {
|
||||||
|
color: "#6B8E23",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 52,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 145,
|
||||||
|
stain: 0.25
|
||||||
|
};
|
||||||
|
elements.marsh_slime = {
|
||||||
|
color: "#00FF00",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 32,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 105,
|
||||||
|
stain: 0.16
|
||||||
|
};
|
||||||
|
elements.peat_paste = {
|
||||||
|
color: "#8B4513",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 57,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 160,
|
||||||
|
stain: 0.1
|
||||||
|
};
|
||||||
|
elements.mudflat_mud = {
|
||||||
|
color: "#8B4513",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 60,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 170,
|
||||||
|
stain: 0.25
|
||||||
|
};
|
||||||
|
elements.swamp_ooze = {
|
||||||
|
color: "#556B2F",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 54,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 140,
|
||||||
|
stain: 0.20
|
||||||
|
};
|
||||||
|
elements.peat_pudding = {
|
||||||
|
color: "#8B4513",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 58,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 160,
|
||||||
|
stain: 0.21
|
||||||
|
};
|
||||||
|
elements.mudflow = {
|
||||||
|
color: "#8B4513",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 60,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 170,
|
||||||
|
stain: 0.2
|
||||||
|
};
|
||||||
|
elements.marsh_mire = {
|
||||||
|
color: "#6B8E23",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 55,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 150,
|
||||||
|
stain: 0.12
|
||||||
|
};
|
||||||
|
elements.peat_paste = {
|
||||||
|
color: "#556B2F",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 57,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 160,
|
||||||
|
stain: 0.18
|
||||||
|
};
|
||||||
|
elements.quicksand_fen = {
|
||||||
|
color: "#DAA520",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 62,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 155,
|
||||||
|
stain: 0.15
|
||||||
|
};
|
||||||
|
elements.marsh_mudslide = {
|
||||||
|
color: "#8B4513",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 58,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 160,
|
||||||
|
stain: 0.1
|
||||||
|
};
|
||||||
|
elements.swamp_slime = {
|
||||||
|
color: "#00FF00",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 35,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 110,
|
||||||
|
stain: 0.15
|
||||||
|
};
|
||||||
|
elements.mire_mud = {
|
||||||
|
color: "#8B4513",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 60,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 170,
|
||||||
|
stain: 0.17
|
||||||
|
};
|
||||||
|
elements.peat_quicksand = {
|
||||||
|
color: "#DAA520",
|
||||||
|
behavior: behaviors.STICKY,
|
||||||
|
viscosity: 10000,
|
||||||
|
tempHigh: 65,
|
||||||
|
stateHigh: "liquid",
|
||||||
|
tempLow: 0,
|
||||||
|
category: "liquids",
|
||||||
|
state: "liquid",
|
||||||
|
density: 180,
|
||||||
|
stain: 0.15
|
||||||
|
};
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Science mod for Sandboxels
|
// Science mod for Sandboxels
|
||||||
// (Inspired by survival.js)
|
// (Inspired by survival.js)
|
||||||
// Build 20
|
// Build 21
|
||||||
// If there is anything you want to suggest or there's a bug then just dm me on discord (@a_british_proto)
|
// If there is anything you want to suggest or there's a bug then just dm me on discord (@a_british_proto)
|
||||||
// Todo:
|
// Todo:
|
||||||
// - Make new substances that you can get after mixing different elements
|
// - Make new substances that you can get after mixing different elements
|
||||||
|
|
@ -1376,7 +1376,7 @@ substance.Silver_Oxzide = {
|
||||||
substance.Silver_Sulfate = {
|
substance.Silver_Sulfate = {
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
color: "FFFFFF",
|
color: "FFFFFF",
|
||||||
category: "lands"
|
category: "lands",
|
||||||
state: "solid",
|
state: "solid",
|
||||||
hidden:true
|
hidden:true
|
||||||
}
|
}
|
||||||
|
|
@ -1467,3 +1467,43 @@ substance.Aluminum_Tribromide = {
|
||||||
state: "powder",
|
state: "powder",
|
||||||
hidden:true
|
hidden:true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
substance.Aluminum_Bromide_Hexahydrate = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "FFFFFF",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
substance.Aluminum_Cerium_Oxide = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "FF5E00",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
substance.Aluminum_Chloride = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "FFFFFF",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
substance.Aluminum_Chlorohydrate = {
|
||||||
|
behavior: behaviors.POWDER,
|
||||||
|
color: "FFFFFF",
|
||||||
|
category: "lands",
|
||||||
|
state: "powder",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
||||||
|
substance.Aluminum_Chloride_Hydrate = {
|
||||||
|
behavior: behaviors.WALL,
|
||||||
|
color: "FFFFFF",
|
||||||
|
category: "lands",
|
||||||
|
state: "solid",
|
||||||
|
hidden:true
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -174,26 +174,23 @@ elements.bp_scanner = {
|
||||||
onSelect: function(pixel){
|
onSelect: function(pixel){
|
||||||
bpsizeH = prompt("Enter the height of the blueprint. It will be scanned from the TOP LEFT corner.", 15);
|
bpsizeH = prompt("Enter the height of the blueprint. It will be scanned from the TOP LEFT corner.", 15);
|
||||||
bpsizeW = prompt("Enter the width of the blueprint", 15);
|
bpsizeW = prompt("Enter the width of the blueprint", 15);
|
||||||
generatedBP = [];
|
|
||||||
for (let y = 1; y <= bpsizeH; y++){
|
|
||||||
generatedBP.push([]);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
tick: function(pixel){
|
tick: function(pixel){
|
||||||
if(pixelTicks == pixel.start){
|
if(pixelTicks == pixel.start){
|
||||||
|
generatedBP = [];
|
||||||
|
for (let y = 1; y <= bpsizeH; y++){
|
||||||
|
generatedBP.push([]);
|
||||||
|
}
|
||||||
let elementCounter = 1;
|
let elementCounter = 1;
|
||||||
seenElements = {};
|
seenElements = {};
|
||||||
for (let y = 0; y < bpsizeH; y++){
|
for (let y = 0; y < bpsizeH; y++){
|
||||||
for (let x = 1; x <= bpsizeW; x++){
|
for (let x = 0; x < bpsizeW; x++){
|
||||||
if (!isEmpty(pixel.x + x, pixel.y + y, true)){
|
if (!isEmpty(pixel.x + x + 1, pixel.y + y + 1, true)){
|
||||||
var opElement = pixelMap[pixel.x + x][pixel.y + y].element;
|
var opElement = pixelMap[pixel.x + x+1][pixel.y + y+1].element;
|
||||||
if (!seenElements[opElement]){
|
if (!seenElements[opElement]){
|
||||||
generatedBP[y].push(elementCounter);
|
generatedBP[y].push(elementCounter);
|
||||||
seenElements[opElement] = elementCounter;
|
seenElements[opElement] = elementCounter;
|
||||||
elementCounter++;
|
elementCounter++;
|
||||||
//console.log(elementCounter)
|
|
||||||
//console.log(seenElements)
|
|
||||||
//console.log(opElement)
|
|
||||||
} else {
|
} else {
|
||||||
generatedBP[y].push(seenElements[opElement]);
|
generatedBP[y].push(seenElements[opElement]);
|
||||||
}
|
}
|
||||||
|
|
@ -202,12 +199,12 @@ elements.bp_scanner = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(generatedBP)
|
console.log(generatedBP);
|
||||||
console.log(seenElements)
|
console.log(seenElements);
|
||||||
generatedBP.shift();
|
|
||||||
deletePixel(pixel.x, pixel.y);
|
deletePixel(pixel.x, pixel.y);
|
||||||
customBP = generatedBP;
|
customBP = generatedBP;
|
||||||
customBPKey = reverseObject(seenElements);
|
customBPKey = reverseObject(seenElements);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue