From 20cdda7d1df799b51cf923d61c20443089c0fc70 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:59:30 -0400 Subject: [PATCH 1/3] yuh --- mods/buildingreplicator.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/mods/buildingreplicator.js b/mods/buildingreplicator.js index d34e3ae3..0d7f29fc 100644 --- a/mods/buildingreplicator.js +++ b/mods/buildingreplicator.js @@ -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); } } -} \ No newline at end of file +} + From bbd9bef7424f640f521615197fd21d7fa5e5c007 Mon Sep 17 00:00:00 2001 From: jakob3797 <167775393+jakob3797@users.noreply.github.com> Date: Wed, 1 May 2024 10:31:03 -0500 Subject: [PATCH 2/3] Create Quicksand_one.js Tested and working --- mods/Quicksand_one.js | 266 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 mods/Quicksand_one.js diff --git a/mods/Quicksand_one.js b/mods/Quicksand_one.js new file mode 100644 index 00000000..ccaa75a5 --- /dev/null +++ b/mods/Quicksand_one.js @@ -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 + }; + From 83a5761dad89fa1e690246e5f87c322ca325f574 Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Wed, 1 May 2024 20:09:23 +0100 Subject: [PATCH 3/3] Update Science_mod.js Just an update ig --- mods/Science_mod.js | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index b0690972..c2ad9e2c 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -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 +}