Merge pull request #1 from R74nCom/main

q
This commit is contained in:
guzzo86 2024-05-02 21:42:46 -04:00 committed by GitHub
commit 3cbed2f927
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 319 additions and 16 deletions

266
mods/Quicksand_one.js Normal file
View File

@ -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
};

View File

@ -1,6 +1,6 @@
// Science mod for Sandboxels
// (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)
// Todo:
// - Make new substances that you can get after mixing different elements
@ -1376,7 +1376,7 @@ substance.Silver_Oxzide = {
substance.Silver_Sulfate = {
behavior: behaviors.WALL,
color: "FFFFFF",
category: "lands"
category: "lands",
state: "solid",
hidden:true
}
@ -1467,3 +1467,43 @@ substance.Aluminum_Tribromide = {
state: "powder",
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
}

View File

@ -174,26 +174,23 @@ elements.bp_scanner = {
onSelect: function(pixel){
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);
generatedBP = [];
for (let y = 1; y <= bpsizeH; y++){
generatedBP.push([]);
}
},
tick: function(pixel){
if(pixelTicks == pixel.start){
generatedBP = [];
for (let y = 1; y <= bpsizeH; y++){
generatedBP.push([]);
}
let elementCounter = 1;
seenElements = {};
for (let y = 0; y < bpsizeH; y++){
for (let x = 1; x <= bpsizeW; x++){
if (!isEmpty(pixel.x + x, pixel.y + y, true)){
var opElement = pixelMap[pixel.x + x][pixel.y + y].element;
for (let x = 0; x < bpsizeW; x++){
if (!isEmpty(pixel.x + x + 1, pixel.y + y + 1, true)){
var opElement = pixelMap[pixel.x + x+1][pixel.y + y+1].element;
if (!seenElements[opElement]){
generatedBP[y].push(elementCounter);
seenElements[opElement] = elementCounter;
elementCounter++;
//console.log(elementCounter)
//console.log(seenElements)
//console.log(opElement)
} else {
generatedBP[y].push(seenElements[opElement]);
}
@ -202,12 +199,12 @@ elements.bp_scanner = {
}
}
}
console.log(generatedBP)
console.log(seenElements)
generatedBP.shift();
console.log(generatedBP);
console.log(seenElements);
deletePixel(pixel.x, pixel.y);
customBP = generatedBP;
customBPKey = reverseObject(seenElements);
}
}
}
}