From bdc6b0ef4996cc04665492b9a3b69a0c326775dd Mon Sep 17 00:00:00 2001 From: DoobieRalsei <163950752+DoobieRalsei@users.noreply.github.com> Date: Mon, 22 Apr 2024 18:11:47 -0700 Subject: [PATCH 01/15] scp.js yeah i just added it to submit to see if ryan accepts it um yeah --- mods/scp.js | 1226 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1226 insertions(+) create mode 100644 mods/scp.js diff --git a/mods/scp.js b/mods/scp.js new file mode 100644 index 00000000..bdc51970 --- /dev/null +++ b/mods/scp.js @@ -0,0 +1,1226 @@ +window.addEventListener("load", () => { + document.getElementById("elementButton-mask_head")?.remove() +}) + +window.addEventListener("load", () => { + document.getElementById("elementButton-mask_body")?.remove() +}) + +window.addEventListener("load", () => { + document.getElementById("elementButton-zombie")?.remove() +}) + +window.addEventListener("load", () => { + document.getElementById("elementButton-z_head")?.remove() +}) + +window.addEventListener("load", () => { + document.getElementById("elementButton-z_body")?.remove() +}) + +window.addEventListener("load", () => { + document.getElementById("elementButton-REDACTED")?.remove() +}) + +window.addEventListener("load", () => { + document.getElementById("elementButton-hyper_tickle_monster")?.remove() +}) + +window.addEventListener("load", () => { + document.getElementById("elementButton-calm_682")?.remove() +}) + +window.addEventListener("load", () => { + document.getElementById("elementButton-mad_682")?.remove() +}) + +// Coding junk past this point + +// also hi jonny ray + +elements.anomalous_essence = { + hidden: true, + color: "#f7ead0", + behavior: behaviors.GAS, + category: "scp", + state: "gas", + density: 0.50, +}; + +elements.SCP_008 = { + color: "#11111f", + behavior: [ + "M2|M1|M2", + "M1|XX|M1", + "M2|M1|M2", + ], + reactions: { + "head": { elem1:null, elem2:"z_head" , chance:0.5 }, + "body": { elem1:null, elem2:"z_body" , chance:0.5 }, + "frog": { elem2:"SCP_008" , chance:0.5 }, + "ant": { elem2:"SCP_008" , chance:0.5 }, + "bee": { elem2:"SCP_008" , chance:0.5 }, + "fish": { elem2:"SCP_008" , chance:0.5 }, + "firefly": { elem2:"SCP_008" , chance:0.5 }, + "chlorine": { elem1: [null,null,null,null,"anomalous_essence"] , chance:0.01 }, + "liquid_chlorine": { elem1: [null,null,null,null,"anomalous_essence"] , chance:0.01 }, + "light": { elem1: [null,null,null,null,"anomalous_essence"] , chance:0.01 }, + }, + tempHigh: 1000, + stateHigh: [null,null,null,null,"anomalous_essence"], + tempLow: -100, + stateLow: "frozen_008", + category: "scp", + state: "gas", + density: 100, +}, + +elements.frozen_008 = { + color: "#242424", + behavior: [ + "XX|XX|XX", + "XX|DL%0.001|X", + "M2%1.0|M1%1.0|M2%1.0", + ], + reactions: { + "head": { elem1:null, elem2:"z_head" , chance:0.4 }, + "body": { elem1:null, elem2:"z_body" , chance:0.4 }, + "chlorine": { elem1: [null,null,null,null,"anomalous_essence"] , chance:0.01 }, + "liquid_chlorine": { elem1: [null,null,null,null,"anomalous_essence"] , chance:0.01 }, + "light": { elem1: [null,null,null,null,"anomalous_essence"] , chance:0.01 }, + }, + temp: -50, + tempHigh: 0, + stateHigh: "SCP_008", + category: "scp", + state: "solid", + density: 95, +}, + +elements.possessive_mask = { + color: ["#f7ead0","#faf9f6","#e9e6db"], + category: "scp", + behavior: [ + "CR:black_acid%0.1|CR:black_acid%0.5|CR:black_acid%0.1", + "CR:black_acid%0.5|XX|CR:black_acid%0.5", + "CR:black_acid%0.1|CR:black_acid%0.5 AND M1|CR:black_acid%0.1", + ], + breakInto: ["porcelain_shard","porcelain_shard","black_acid","black_acid"], + density: 800, + state: "solid", + tempHigh: 3500, + stateHigh: "porcelain_shard", + reactions: { + "head": { elem1:null, elem2: "mask_head" , chance:0.2 }, + "body": { elem1:null, elem2: "mask_body" , chance:0.1 }, + "z_head": { elem1:null, elem2: "mask_head" , chance:0.1 }, + "z_body": { elem1:null, elem2: "mask_body" , chance:0.05 }, + }, +}, + +elements.mask_body = { + color: ["#242424","#069469","#047e99","#7f5fb0"], + category: "scp", + hidden: true, + density: 1500, + state: "solid", + conduct: .05, + temp: 37, + tempHigh: 250, + stateHigh: "cooked_meat", + tempLow: -30, + stateLow: "frozen_meat", + burn: 10, + burnTime: 250, + burnInto: "cooked_meat", + breakInto: ["black_acid","rotten_meat","bone"], + reactions: { + "cancer": { elem1:"cancer", chance:0.005 }, + "egg": { elem2:"yolk", chance:0.5, oneway:true }, + }, + properties: { + dead: false, + dir: 1, + panic: 0 + }, + tick: function(pixel) { + if (tryMove(pixel, pixel.x, pixel.y+1)) { // Fall + if (!isEmpty(pixel.x, pixel.y-2, true)) { // Drag head down + var headpixel = pixelMap[pixel.x][pixel.y-2]; + if (headpixel.element == "mask_head") { + if (isEmpty(pixel.x, pixel.y-1)) { + movePixel(pixelMap[pixel.x][pixel.y-2], pixel.x, pixel.y-1); + } + else { + swapPixels(pixelMap[pixel.x][pixel.y-2], pixelMap[pixel.x][pixel.y-1]); + } + } + } + } + doHeat(pixel); + doBurning(pixel); + doElectricity(pixel); + if (pixel.dead) { + // Turn into rotten_meat if pixelTicks-dead > 500 + if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) { + changePixel(pixel,"rotten_meat"); + } + return + } + + // Find the head + if (!isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "mask_head") { + var head = pixelMap[pixel.x][pixel.y-1]; + if (head.dead) { // If head is dead, kill body + pixel.dead = head.dead; + } + } + else if (!isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "head") { // If head is not mask head, make it one + var head = pixelMap[pixel.x][pixel.y-1]; + changePixel(head,"mask_head"); + if (head.dead) { // If head is dead, kill body + pixel.dead = head.dead; + } + } + else if (!isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "z_head") { // If head is not mask head, make it one + var head = pixelMap[pixel.x][pixel.y-1]; + changePixel(head,"mask_head"); + if (head.dead) { // If head is dead, kill body + pixel.dead = head.dead; + } + } + else { var head = null } + if (pixel.burning) { + pixel.panic += 0.1; + if (head && pixelTicks-pixel.burnStart > 240) { + pixel.color = head.color; + } + } + else if (pixel.panic > 0) { + pixel.panic -= 0.1; + } + + if (isEmpty(pixel.x, pixel.y-1)) { + // create black acid if decapitated 10% chance + if (Math.random() < 0.1 && !pixel.charge) { + createPixel("black_acid", pixel.x, pixel.y-1); + // set dead to true 15% chance + if (Math.random() < 0.15) { + pixel.dead = pixelTicks; + } + } + } + else if (head == null) { return } + else if (Math.random() < 0.1*(isEmpty(pixel.x, pixel.y+1) ? 1 : pixel.panic+1)) { // Move 10% chance + var movesToTry = [ + [1*pixel.dir,0], + [1*pixel.dir,-1], + ]; + // While movesToTry is not empty, tryMove(pixel, x, y) with a random move, then remove it. if tryMove returns true, break. + while (movesToTry.length > 0) { + var move = movesToTry.splice(Math.floor(Math.random() * movesToTry.length), 1)[0]; + if (isEmpty(pixel.x+move[0], pixel.y+move[1]-1)) { + var origx = pixel.x+move[0]; + var origy = pixel.y+move[1]; + if (tryMove(pixel, pixel.x+move[0], pixel.y+move[1]) && pixel.x===origx && pixel.y===origy) { + movePixel(head, head.x+move[0], head.y+move[1]); + break; + } + } + } + // 15% chance to change direction + if (Math.random() < 0.15) { + pixel.dir *= -1; + } + } + + } +}, + +elements.mask_head = { + color: ["#f7ead0","#faf9f6","#e9e6db"], + category: "scp", + hidden: true, + density: 2280, + state: "solid", + conduct: .05, + temp: 37, + tempHigh: 250, + stateHigh: "possessive_mask", + tempLow: -30, + stateLow: "possessive_mask", + burn: 10, + burnTime: 250, + burnInto: "possessive_mask", + breakInto: "possessive_mask", + forceSaveColor: true, + reactions: { + "cancer": { elem1: "possessive_mask", chance:0.05 }, + "tea": { elem2:null, chance:0.2 }, + "alcohol": { elem2:null, chance:0.2 }, + }, + properties: { + dead: false + }, + behavior: [ + "CR:black_acid%0.1|CR:black_acid%0.5|CR:black_acid%0.1", + "CR:black_acid%0.5|XX|CR:black_acid%0.5", + "CR:black_acid%0.1|CR:black_acid%0.5 AND M1|CR:black_acid%0.1", + ], + tick: function(pixel) { + doHeat(pixel); + doBurning(pixel); + doElectricity(pixel); + if (pixel.dead) { + // Turn into the mask if pixelTicks-dead > 500 + if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) { + changePixel(pixel,"possessive_mask"); + return + } + } + + // Find the body + if (!isEmpty(pixel.x, pixel.y+1, true) && pixelMap[pixel.x][pixel.y+1].element == "mask_body") { + var body = pixelMap[pixel.x][pixel.y+1]; + if (body.dead) { // If body is dead, kill head + pixel.dead = body.dead; + } + } + else if (!isEmpty(pixel.x, pixel.y+1, true) && pixelMap[pixel.x][pixel.y+1].element == "body") { // If body is not mask body, make it one + var body = pixelMap[pixel.x][pixel.y+1]; + changePixel(body,"mask_body"); + if (body.dead) { // If body is dead, kill head + pixel.dead = body.dead; + } + } + else if (!isEmpty(pixel.x, pixel.y+1, true) && pixelMap[pixel.x][pixel.y+1].element == "z_body") { // If body is not mask body, make it one + var body = pixelMap[pixel.x][pixel.y+1]; + changePixel(body,"mask_body"); + if (body.dead) { // If body is dead, kill head + pixel.dead = body.dead; + } + } + else { var body = null } + + if (tryMove(pixel, pixel.x, pixel.y+1)) { + // create blood if severed 10% chance + if (isEmpty(pixel.x, pixel.y+1) && !pixel.dead && Math.random() < 0.1 && !pixel.charge) { + createPixel("black_acid", pixel.x, pixel.y+1); + // set dead to true 15% chance + if (Math.random() < 0.15) { + pixel.dead = pixelTicks; + } + } + } + // homeostasis + if (pixel.temp > 37) { pixel.temp -= 1; } + else if (pixel.temp < 37) { pixel.temp += 1; } + } +}, + +elements.black_acid = { + hidden: true, + color: ["#00000f","#111111","#242424"], + behavior: [ + "XX|DB%5|XX", + "DB%6 AND M2%10|XX|DB%6 AND M2%10", + "DB%6 AND M2%10|DB%11 AND M1|DB%6 AND M2%10", + ], + ignore: [/*"SCP_804"*/"shy_head","shy_body","SCP_055","head","body","z_body","z_head","possessive_mask","mask_body","mask_head","glass_shard","porcelain_shard","rad_shard","color_sand","sand","iron","steel","glass","rad_glass","stained_glass","acid_gas","neutral_acid","acid_cloud","water","salt_water","sugar_water","dirty_water","copper","gold","porcelain","plastic","bead","microplastic","molten_plastic","pool_water","chlorine","hydrogen","oxygen","ozone","gold_coin","silver","nickel","calcium"], + reactions: { + "caustic_potash": { elem1:null, elem2:"potassium_salt" }, + "water": { elem1:null, elem2:"dirty_water" }, + "salt_water": { elem1:null, elem2:"water" }, + "sugar_water": { elem1:null, elem2:"water" }, + "pool_water": { elem1:null, elem2:"water" }, + "plant": { elem1:null, elem2:"dead_plant" }, + "tree_branch": { elem1:null, elem2:"wood" }, + "charcoal": { elem1:null, elem2:"carbon_dioxide" }, + "rock": { elem1:null, elem2:"sand", chance:0.05 }, + "baking_soda": { elem1:null, elem2:["carbon_dioxide","foam"] }, + "calcium": { elem1:null, elem2:"hydrogen", chance:0.01 }, + "zinc": { elem1:null, elem2:null, chance:0.03 }, + "sugar": { elem1:null, elem2:"carbon_dioxide" }, + "glass": { elem1:null, elem2: null , chance:0.01 }, + "rad_glass": { elem1:null, elem2: null , chance:0.01 }, + "stained_glass": { elem1:null, elem2: null , chance:0.01 }, + "glass_shard": { elem1:null, elem2: null , chance:0.015 }, + "rad_shard": { elem1:null, elem2: null , chance:0.015 }, + "porcelain_shard": { elem1:null, elem2: null , chance:0.015 }, + "copper": { elem1:null, elem2: null , chance:0.02 }, + "gold": { elem1:null, elem2: null , chance:0.02 }, + "porcelain": { elem1:null, elem2: null , chance:0.01 }, + "plastic": { elem1:null, elem2: null , chance:0.01 }, + "molten_plastic": { elem1:null, elem2: null , chance:0.02 }, + "gold_coin": { elem1:null, elem2: "gold" , chance:0.1 }, + "silver": { elem1:null, elem2: null , chance:0.02 }, + "nickel": { elem1:null, elem2: null , chance:0.02 }, + "calcium": { elem1:null, elem2: null , chance:0.02 }, + "iron": { elem1:null, elem2: null , chance:0.02 }, + "steel": { elem1:null, elem2: null , chance:0.02 }, + "concrete": { elem1:null, elem2: null , chance:0.05 }, + "rock": { elem1:null, elem2: null , chance:0.04 }, + "dirt": { elem1:null, elem2: null , chance:0.05 }, + "sand": { elem1:null, elem2: null , chance:0.015 }, + "color_sand": { elem1:null, elem2: null , chance:0.015 }, + "mask_head": { elem1:null, elem2: "possessive_mask" , chance:0.001}, + "mask_body": { elem1:null, elem2: null , chance:0.001 }, + "head": { elem1:null, elem2: null , chance:0.01 }, + "body": { elem1:null, elem2: null , chance:0.01 }, + "z_head": { elem1:null, elem2: null , chance:0.02 }, + "z_body": { elem1:null, elem2: null , chance:0.02 }, + /*"SCP_804": { elem1:null, elem2: null , chance:0.02 },*/ + }, + category: "scp", + tempHigh: 1000, + stateHigh: null, + tempLow: -58.88, + burn: 30, + burnTime: 10, + burnInto: ["fire","fire","fire","fire","fire","fire","fire","fire","ash","ash","anomalous_essence"], + fireColor: "#111111", + state: "liquid", + density: 1105, + stain: 0.5, +}, + +elements.SCP_055 = { + color: "#00000f", + excludeRandom: true, + behavior: [ + ["XX","XX","XX"], + ["XX","CH:REDACTED","XX"], + ["XX","XX","XX"] + ], + category: "scp", + state: "solid", + tempHigh: 55055055055, + stateHigh: ["metal_scrap","smoke","smoke","anomalous_essence"], +}, + +elements.REDACTED = { + hidden: true, + color: "#00000f", + excludeRandom: true, + behavior: [ + ["XX","xx","XX"], + ["XX","EX","XX"], + ["XX","XX","XX"] + ], + category: "scp", + state: "solid", +}, + +elements.plague_doctor = { + category: "scp", + color: ["#f7ead0","#faf9f6","#e9e6db"], + category: "scp", + properties: { + dead: false, + dir: 1, + panic: 0 + }, + tick: function(pixel) { + if (isEmpty(pixel.x, pixel.y+1)) { + createPixel("doc_body", pixel.x, pixel.y+1); + pixel.element = "doc_head"; + } + else if (isEmpty(pixel.x, pixel.y-1)) { + createPixel("doc_head", pixel.x, pixel.y-1); + pixelMap[pixel.x][pixel.y-1].color = pixel.color; + pixel.element = "doc_body"; + } + else { + deletePixel(pixel.x, pixel.y); + } + }, + related: ["doc_body","doc_head"], + cooldown: defaultCooldown +}, + +elements.doc_head = { + hidden: true, + color: ["#f7ead0","#faf9f6","#e9e6db"], + category: "scp", + breakInto: ["rotten_meat","bone","bone","blood","anomalous_essence"], + properties: { + dead: false + }, + tick: function(pixel) { + doHeat(pixel); + doBurning(pixel); + doElectricity(pixel); + if (pixel.dead) { + // Turn into rotten_meat if pixelTicks-dead > 500 + if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) { + changePixel(pixel,"rotten_meat"); + return + } + } + + // Find the body + if (!isEmpty(pixel.x, pixel.y+1, true) && pixelMap[pixel.x][pixel.y+1].element == "doc_body") { + var body = pixelMap[pixel.x][pixel.y+1]; + if (body.dead) { // If body is dead, kill head + pixel.dead = body.dead; + } + } + else { var body = null } + + if (tryMove(pixel, pixel.x, pixel.y+1)) { + // create blood if severed 10% chance + if (isEmpty(pixel.x, pixel.y+1) && !pixel.dead && Math.random() < 0.1 && !pixel.charge) { + createPixel("blood", pixel.x, pixel.y+1); + // set dead to true 15% chance + if (Math.random() < 0.15) { + pixel.dead = pixelTicks; + } + } + } + // homeostasis + if (pixel.temp > 37) { pixel.temp -= 1; } + else if (pixel.temp < 37) { pixel.temp += 1; } + }, + density: 1100, + state: "solid", + conduct: .05, + tempHigh: 350, + stateHigh: "rotten_meat", + burn: .01, + burnTime: 300, + burnInto: "rotten_meat", + reactions: { + "alcohol": { elem2 : null , chance:0.5 }, + }, +}, + +elements.doc_body = { + hidden: true, + color: ["#11111f","#242424"], + category: "scp", + breakInto: ["rotten_meat","rotten_meat","bone","blood","anomalous_essence"], + properties: { + dead: false, + dir: 1, + panic: 0 + }, + tick: function(pixel) { + if (tryMove(pixel, pixel.x, pixel.y+1)) { // Fall + if (!isEmpty(pixel.x, pixel.y-2, true)) { // Drag head down + var headpixel = pixelMap[pixel.x][pixel.y-2]; + if (headpixel.element == "doc_head") { + if (isEmpty(pixel.x, pixel.y-1)) { + movePixel(pixelMap[pixel.x][pixel.y-2], pixel.x, pixel.y-1); + } + else { + swapPixels(pixelMap[pixel.x][pixel.y-2], pixelMap[pixel.x][pixel.y-1]); + } + } + } + } + doHeat(pixel); + doBurning(pixel); + doElectricity(pixel); + if (pixel.dead) { + // Turn into bone if pixelTicks-dead > 500 + if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) { + changePixel(pixel,"bone"); + } + return + } + + // Find the head + if (!isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "doc_head") { + var head = pixelMap[pixel.x][pixel.y-1]; + if (head.dead) { // If head is dead, kill body + pixel.dead = head.dead; + } + } + else { var head = null } + if (pixel.burning) { + pixel.panic += 0.1; + if (head && pixelTicks-pixel.burnStart > 240) { + pixel.color = head.color; + } + } + else if (pixel.panic > 0) { + pixel.panic -= 0.1; + } + + if (isEmpty(pixel.x, pixel.y-1)) { + // create blood if decapitated 10% chance + if (Math.random() < 0.1 && !pixel.charge) { + createPixel("blood", pixel.x, pixel.y-1); + // set dead to true 15% chance + if (Math.random() < 0.15) { + pixel.dead = pixelTicks; + } + } + } + else if (head == null) { return } + else if (Math.random() < 0.1*(isEmpty(pixel.x, pixel.y+1) ? 1 : pixel.panic+1)) { // Move 10% chance + var movesToTry = [ + [1*pixel.dir,0], + [1*pixel.dir,-1], + ]; + // While movesToTry is not empty, tryMove(pixel, x, y) with a random move, then remove it. if tryMove returns true, break. + while (movesToTry.length > 0) { + var move = movesToTry.splice(Math.floor(Math.random() * movesToTry.length), 1)[0]; + if (isEmpty(pixel.x+move[0], pixel.y+move[1]-1)) { + var origx = pixel.x+move[0]; + var origy = pixel.y+move[1]; + if (tryMove(pixel, pixel.x+move[0], pixel.y+move[1]) && pixel.x===origx && pixel.y===origy) { + movePixel(head, head.x+move[0], head.y+move[1]); + break; + } + } + } + // 15% chance to change direction + if (Math.random() < 0.15) { + pixel.dir *= -1; + } + // homeostasis + if (pixel.temp > 37) { pixel.temp -= 1; } + else if (pixel.temp < 37) { pixel.temp += 1; } + } + + }, + density: 1100, + state: "solid", + conduct: .005, + tempHigh: 350, + stateHigh: "rotten_meat", + burn: .01, + burnTime: 300, + burnInto: "rotten_meat", + forceSaveColor: true, + reactions: { + "head": { elem2 : "z_head" , chance:0.3}, + "body": { elem2 : "z_body" , chance:0.3}, + }, +}, + +elements.zombie = { + color: ["#75816B","#4D6B53"], + category: "scp", + properties: { + dead: false, + dir: 1, + panic: 0 + }, + tick: function(pixel) { + if (isEmpty(pixel.x, pixel.y+1)) { + createPixel("z_body", pixel.x, pixel.y+1); + pixel.element = "z_head"; + } + else if (isEmpty(pixel.x, pixel.y-1)) { + createPixel("z_head", pixel.x, pixel.y-1); + pixelMap[pixel.x][pixel.y-1].color = pixel.color; + pixel.element = "z_body"; + } + else { + deletePixel(pixel.x, pixel.y); + } + }, + related: ["z_body","z_head"], + cooldown: defaultCooldown +}, + +elements.z_head = { + hidden: true, + color: ["#75816B","#4D6B53"], + category: "scp", + breakInto: ["rotten_meat","bone","bone","blood","anomalous_essence"], + properties: { + dead: false + }, + tick: function(pixel) { + doHeat(pixel); + doBurning(pixel); + doElectricity(pixel); + if (pixel.dead) { + // Turn into rotten_meat if pixelTicks-dead > 500 + if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) { + changePixel(pixel,"rotten_meat"); + return + } + } + + // Find the body + if (!isEmpty(pixel.x, pixel.y+1, true) && pixelMap[pixel.x][pixel.y+1].element == "z_body") { + var body = pixelMap[pixel.x][pixel.y+1]; + if (body.dead) { // If body is dead, kill head + pixel.dead = body.dead; + } + } + else { var body = null } + + if (tryMove(pixel, pixel.x, pixel.y+1)) { + // create blood if severed 10% chance + if (isEmpty(pixel.x, pixel.y+1) && !pixel.dead && Math.random() < 0.1 && !pixel.charge) { + createPixel("infection", pixel.x, pixel.y+1); + // set dead to true 15% chance + if (Math.random() < 0.15) { + pixel.dead = pixelTicks; + } + } + } + // homeostasis + if (pixel.temp > 37) { pixel.temp -= 1; } + else if (pixel.temp < 37) { pixel.temp += 1; } + }, + density: 1030, + state: "solid", + conduct: .05, + tempHigh: 250, + stateHigh: "rotten_meat", + burn: .01, + burnTime: 200, + burnInto: "rotten_meat", + reactions: { + "head": { elem2 : "z_head" , chance:1.0 }, + "body": { elem2 : "z_body" , chance:1.0 }, + }, +}, + +elements.z_body = { + hidden: true, + color: ["#11111f","#069469","#047e99","#7f5fb0"], + category: "scp", + breakInto: ["rotten_meat","rotten_meat","bone","blood","anomalous_essence"], + properties: { + dead: false, + dir: 1, + panic: 0 + }, + tick: function(pixel) { + if (tryMove(pixel, pixel.x, pixel.y+1)) { // Fall + if (!isEmpty(pixel.x, pixel.y-2, true)) { // Drag head down + var headpixel = pixelMap[pixel.x][pixel.y-2]; + if (headpixel.element == "z_head") { + if (isEmpty(pixel.x, pixel.y-1)) { + movePixel(pixelMap[pixel.x][pixel.y-2], pixel.x, pixel.y-1); + } + else { + swapPixels(pixelMap[pixel.x][pixel.y-2], pixelMap[pixel.x][pixel.y-1]); + } + } + } + } + doHeat(pixel); + doBurning(pixel); + doElectricity(pixel); + if (pixel.dead) { + // Turn into bone if pixelTicks-dead > 500 + if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) { + changePixel(pixel,"rotten_meat"); + } + return + } + + // Find the head + if (!isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "z_head") { + var head = pixelMap[pixel.x][pixel.y-1]; + if (head.dead) { // If head is dead, kill body + pixel.dead = head.dead; + } + } + else { var head = null } + if (pixel.burning) { + pixel.panic += 0.1; + if (head && pixelTicks-pixel.burnStart > 240) { + pixel.color = head.color; + } + } + else if (pixel.panic > 0) { + pixel.panic -= 0.1; + } + + if (isEmpty(pixel.x, pixel.y-1)) { + // create blood if decapitated 10% chance + if (Math.random() < 0.1 && !pixel.charge) { + createPixel("infection", pixel.x, pixel.y-1); + // set dead to true 15% chance + if (Math.random() < 0.15) { + pixel.dead = pixelTicks; + } + } + } + else if (head == null) { return } + else if (Math.random() < 0.1*(isEmpty(pixel.x, pixel.y+1) ? 1 : pixel.panic+1)) { // Move 10% chance + var movesToTry = [ + [1*pixel.dir,0], + [1*pixel.dir,-1], + ]; + // While movesToTry is not empty, tryMove(pixel, x, y) with a random move, then remove it. if tryMove returns true, break. + while (movesToTry.length > 0) { + var move = movesToTry.splice(Math.floor(Math.random() * movesToTry.length), 1)[0]; + if (isEmpty(pixel.x+move[0], pixel.y+move[1]-1)) { + var origx = pixel.x+move[0]; + var origy = pixel.y+move[1]; + if (tryMove(pixel, pixel.x+move[0], pixel.y+move[1]) && pixel.x===origx && pixel.y===origy) { + movePixel(head, head.x+move[0], head.y+move[1]); + break; + } + } + } + // 15% chance to change direction + if (Math.random() < 0.15) { + pixel.dir *= -1; + } + // homeostasis + if (pixel.temp > 37) { pixel.temp -= 1; } + else if (pixel.temp < 37) { pixel.temp += 1; } + } + + }, + density: 1035, + state: "solid", + conduct: .05, + tempHigh: 250, + stateHigh: "rotten_meat", + burn: .01, + burnTime: 300, + burnInto: "rotten_meat", + forceSaveColor: true, + reactions: { + "head": { elem2 : "z_head" , chance:1.0 }, + "body": { elem2 : "z_body" , chance:1.0 }, + }, +}, + +elements.shy_guy = { + category: "scp", + color: ["#f7ead0","#faf9f6","#e9e6db"], + category: "scp", + properties: { + dead: false, + dir: 1, + panic: 0 + }, + tick: function(pixel) { + if (isEmpty(pixel.x, pixel.y+1)) { + createPixel("shy_body", pixel.x, pixel.y+1); + pixel.element = "shy_head"; + } + else if (isEmpty(pixel.x, pixel.y-1)) { + createPixel("shy_head", pixel.x, pixel.y-1); + pixelMap[pixel.x][pixel.y-1].color = pixel.color; + pixel.element = "shy_body"; + pixel.color = pixelColorPick(pixel) + } + else { + deletePixel(pixel.x, pixel.y); + } + }, + related: ["shy_body","shy_head"], + cooldown: defaultCooldown +}, + +elements.shy_head = { + hidden: true, + color: ["#f7ead0","#faf9f6","#e9e6db"], + category: "scp", + breakInto: ["bone","bone","blood","bone","bone","blood","anomalous_essence"], + properties: { + dead: false + }, + tick: function(pixel) { + doHeat(pixel); + doBurning(pixel); + doElectricity(pixel); + if (pixel.dead) { + // Turn into rotten_meat if pixelTicks-dead > 500 + if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) { + changePixel(pixel,"bone"); + return + } + } + + // Find the body + if (!isEmpty(pixel.x, pixel.y+1, true) && pixelMap[pixel.x][pixel.y+1].element == "shy_body") { + var body = pixelMap[pixel.x][pixel.y+1]; + if (body.dead) { // If body is dead, kill head + pixel.dead = body.dead; + } + } + else { var body = null } + + if (tryMove(pixel, pixel.x, pixel.y+1)) { + // create blood if severed 10% chance + if (isEmpty(pixel.x, pixel.y+1) && !pixel.dead && Math.random() < 0.1 && !pixel.charge) { + createPixel("blood", pixel.x, pixel.y+1); + // set dead to true 15% chance + if (Math.random() < 0.15) { + pixel.dead = pixelTicks; + } + } + } + // homeostasis + if (pixel.temp > 37) { pixel.temp -= 1; } + else if (pixel.temp < 37) { pixel.temp += 1; } + }, + density: 1070, + state: "solid", + conduct: .05, + tempHigh: 3500, + stateHigh: "bone", + burn: .01, + burnTime: 3000, + burnInto: "bone", + reactions: { + "homunculus": { elem2 : ["blood","slime","blood","slime","rotten_meat",null] }, + "head": { elem2 : ["blood","blood","blood","bone",null] }, + "body": { elem2: ["blood","blood","meat","bone",null] }, + "rat": { elem2: ["infection","rotten_meat",null]}, + "frog": { elem2: ["slime",null] }, + "cell": { elem2: ["dna","water",null] }, + "cancer": { elem2: ["dna","dirty_water",null], }, + "blood": { elem2: null, chance:0.2 }, + "bone": { elem2: null, chance:0.2 }, + "meat": { elem2: [null,null,null,null,null,null,"rotten_meat"], chance:0.15 }, + "dna": { elem2: null, chance:0.2 }, + "water": { elem2: "dirty_water", chance:0.01 }, + "slime": { elem2: ["dirty_water",null], chance:0.2 }, + }, +}, + +elements.shy_body = { + hidden: true, + color: ["#f7ead0","#faf9f6","#e9e6db"], + category: "scp", + breakInto: ["bone","bone","blood","bone","bone","blood","anomalous_essence"], + properties: { + dead: false, + dir: 1, + panic: 0 + }, + tick: function(pixel) { + if (tryMove(pixel, pixel.x, pixel.y+1)) { // Fall + if (!isEmpty(pixel.x, pixel.y-2, true)) { // Drag head down + var headpixel = pixelMap[pixel.x][pixel.y-2]; + if (headpixel.element == "shy_head") { + if (isEmpty(pixel.x, pixel.y-1)) { + movePixel(pixelMap[pixel.x][pixel.y-2], pixel.x, pixel.y-1); + } + else { + swapPixels(pixelMap[pixel.x][pixel.y-2], pixelMap[pixel.x][pixel.y-1]); + } + } + } + } + doHeat(pixel); + doBurning(pixel); + doElectricity(pixel); + if (pixel.dead) { + // Turn into bone if pixelTicks-dead > 500 + if (pixelTicks-pixel.dead > 200 && Math.random() < 0.1) { + changePixel(pixel,"bone"); + } + return + } + + // Find the head + if (!isEmpty(pixel.x, pixel.y-1, true) && pixelMap[pixel.x][pixel.y-1].element == "shy_head") { + var head = pixelMap[pixel.x][pixel.y-1]; + if (head.dead) { // If head is dead, kill body + pixel.dead = head.dead; + } + } + else { var head = null } + if (pixel.burning) { + pixel.panic += 0.1; + if (head && pixelTicks-pixel.burnStart > 240) { + pixel.color = head.color; + } + } + else if (pixel.panic > 0) { + pixel.panic -= 0.1; + } + + if (isEmpty(pixel.x, pixel.y-1)) { + // create blood if decapitated 10% chance + if (Math.random() < 0.1 && !pixel.charge) { + createPixel("blood", pixel.x, pixel.y-1); + // set dead to true 15% chance + if (Math.random() < 0.15) { + pixel.dead = pixelTicks; + } + } + } + else if (head == null) { return } + else if (Math.random() < 0.1*(isEmpty(pixel.x, pixel.y+1) ? 1 : pixel.panic+1)) { // Move 10% chance + var movesToTry = [ + [1*pixel.dir,0], + [1*pixel.dir,-1], + ]; + // While movesToTry is not empty, tryMove(pixel, x, y) with a random move, then remove it. if tryMove returns true, break. + while (movesToTry.length > 0) { + var move = movesToTry.splice(Math.floor(Math.random() * movesToTry.length), 1)[0]; + if (isEmpty(pixel.x+move[0], pixel.y+move[1]-1)) { + var origx = pixel.x+move[0]; + var origy = pixel.y+move[1]; + if (tryMove(pixel, pixel.x+move[0], pixel.y+move[1]) && pixel.x===origx && pixel.y===origy) { + movePixel(head, head.x+move[0], head.y+move[1]); + break; + } + } + } + // 15% chance to change direction + if (Math.random() < 0.15) { + pixel.dir *= -1; + } + // homeostasis + if (pixel.temp > 37) { pixel.temp -= 1; } + else if (pixel.temp < 37) { pixel.temp += 1; } + } + + }, + density: 1080, + state: "solid", + conduct: .005, + tempHigh: 3500, + stateHigh: "bone", + burn: .01, + burnTime: 3000, + burnInto: "bone", + forceSaveColor: true, + reactions: { + "homunculus": { elem2 : ["blood","slime","blood","slime","rotten_meat",null] }, + "head": { elem2 : ["blood","blood","blood","meat","bone",null] }, + "body": { elem2: ["blood","blood","meat","bone",null] }, + "rat": { elem2: ["infection","rotten_meat"]}, + "frog": { elem2: "slime" }, + "cell": { elem2: ["dna","water",null] }, + "cancer": { elem2: ["dna","dirty_water"] }, + "water": { elem2: "dirty_water", chance:0.01 }, + }, +}, + +elements.SCP_682 = { + color: ["#424242","#75816B","#4D6B53"], + behavior: [ + "M2%0.5|M2%0.3|M2%0.5", + "M1%10|XX|M1%10", + "XX|M1|XX", + ], + category: "scp", + density: 7500, + reactions: { + "head": { elem2 : ["bone","blood",null] , chance:10 }, + "body": { elem1 : "mad_682" , elem2 : ["meat","blood",null] , chance:10 }, + "z_head": { elem2 : ["bone","infection",null] , chance:10 }, + "z_body": { elem1 : "mad_682" , elem2 : ["rotten_meat","infection",null] , chance:10 }, + "homunculus": { elem2 : ["slime","blood",null] , chance:10 }, + "frog": { elem2 : ["slime","blood",null] , chance:10 }, + "bird": { elem2 : ["feather","blood",null] , chance:10 }, + "meat": { elem2 : null , chance:0.2 }, + "cooked_meat": { elem2 : null , chance:0.3 }, + "tickle_monster": { elem1 : "calm_682" , chance:0.1 }, + "acid": { elem1 : "calm_682" , chance:0.2 }, + "rotten_meat": { elem2 : null , chance:0.1 }, + "blood": { elem2 : null , chance:0.2 }, + "bone": { elem2 : ["blood",null,null] , chance:0.1 }, + "bone_marrow": { elem2 : ["blood",null] , chance:0.1 }, + "aluminum": { elem2 : "metal_scrap" , chance:0.07 }, + "steel": { elem2 : "metal_scrap" , chance:0.05 }, + "iron": { elem2 : "metal_scrap" , chance:0.08 }, + "glass": { elem2 : "glass_shard" , chance:0.1 }, + "wood": { elem2 : "sawdust" , chance:0.1 }, + "concrete": { elem2 : "dust" , chance:0.05 }, + "dust": { elem2 : null , chance:0.1 }, + }, + state: "solid", + hardness: 1, + conduct: .1, +}, + +elements.calm_682 = { + color: ["#424242","#75816B","#4D6B53"], + behavior: [ + "M2%0.5|M2%0.3|M2%0.5", + "M1%10|CH:mad_682%0.5|M1%10", + "XX|M1|XX", + ], + category: "scp", + density: 7350, + excludeRandom: true, + reactions: { + "meat": { elem2 : null , chance:0.2 }, + "bone": { elem2 : null , chance:0.1 }, + "blood": { elem2 : null , chance:0.1 }, + "cooked_meat": { elem2 : null , chance:0.3 }, + "acid": { elem1 : "calm_682" , chance:0.05 }, + "tickle_monster": { elem1 : "calm_682" , chance:99.9 }, + }, + hidden: true, + state: "solid", + hardness: 1, + conduct: .1, +}, + +elements.mad_682 = { + color: ["#424242","#75816B","#4D6B53"], + behavior: [ + "M2%0.5|M2%0.3|M2%0.5", + "M1%10 AND CH:concrete>dust AND DL:dust|CH:SCP_682%0.3|M1%10 AND CH:concrete>dust AND DL:dust", + "XX|M1|XX", + ], + category: "scp", + density: 8000, + excludeRandom: true, + reactions: { + "head": { elem2 : ["bone","blood",null] }, + "body": { elem2 : ["meat","blood",null] }, + "homunculus": { elem2 : ["slime","blood",null] }, + "frog": { elem2 : ["slime","blood",null] }, + "bird": { elem2 : ["feather","blood",null] }, + "meat": { elem2 : null , chance:0.5 }, + "cooked_meat": { elem2 : null , chance:0.5 }, + "rotten_meat": { elem2 : null , chance:0.2 }, + "blood": { elem2 : null , chance:0.5 }, + "bone": { elem2 : ["blood",null,null] , chance:0.2 }, + "bone_marrow": { elem2 : ["blood",null] , chance:0.2 }, + "aluminum": { elem2 : "metal_scrap" , chance:1.0 }, + "steel": { elem2 : "metal_scrap" , chance:0.2 }, + "iron": { elem2 : "metal_scrap" , chance:0.3 }, + "lead": { elem2 : ["metal_scrap","metal_scrap","radiation"] , chance:0.3 }, + "glass": { elem2 : "glass_shard" }, + "wood": { elem2 : "sawdust" }, + "concrete": { elem2 : "dust" , chance:0.1 }, + "dust": { elem2 : null , chance:0.1 }, + }, + hidden: true, + state: "solid", + hardness: 1, + conduct: .1, +}, + +// SCP-804 WIP template +/* +elements.SCP_804 = { + color:"#beigeish", + category: "scp", + excludeRandom: true, + state: "solid", +}, +*/ + +elements.tickle_monster = { + color: "#FFA500", + behavior: [ + "M2%0.5|M2%0.3 AND CR:fragrance%0.05|M2%0.5", + "M1%10|XX|M1%10", + "XX|M1|XX", + ], + category: "scp", + density: 550, + reactions: { + "sugar_water": { elem2 : "water" , chance:0.2 }, + "dirty_water": { elem2 : "water" , chance:0.2 }, + "candy": { elem2 : null }, + "sugar": { elem2 : null }, + "sauce": { elem2 : null }, + "salt": { elem2 : null , chance:0.2 }, + "cheese": { elem2 : null , chance:0.2 }, + "melted_cheese": { elem2 : null }, + "baked_potato": { elem2 : null , chance:0.2 }, + "mashed_potato": { elem2 : null , chance:0.2 }, + "bread": { elem2 : null , chance:0.2 }, + "toast": { elem2 : null , chance:0.2 }, + "jelly": { elem2 : null }, + "nut_butter": { elem2 : null }, + "grape": { elem2 : null , chance:0.2 }, + "ice_cream": { elem2 : null }, + "juice": { elem2 : null }, + "milk": { elem2 : null }, + "gingerbread": { elem2 : null , chance:0.2 }, + "crumb": { elem2 : null , chance:0.2 }, + "cream": { elem2 : null }, + "baked_batter": { elem2 : null }, + "frozen_yogurt": { elem2 : null }, + "yogurt": { elem2 : null }, + "popcorn": { elem2 : null , chance:0.2 }, + "chocolate": { elem2 : null }, + "chocolate_milk": { elem2 : null }, + "melted_chocolate": { elem2 : null }, + "caramel": { elem2 : null }, + "ash": { elem2 : null , chance:0.2 }, + "dust": { elem2 : null , chance:0.2 }, + "alchohol": { elem1 : "hyper_tickle_monster", elem2 : null }, + "pilk": { elem1 : "hyper_tickle_monster", elem2 : null }, + "coffee_bean": { elem1 : "hyper_tickle_monster", elem2 : null }, + "coffee_ground": { elem1 : "hyper_tickle_monster", elem2 : null }, + "soda": { elem1 : "hyper_tickle_monster", elem2 : null }, + "coffee": { elem1 : "hyper_tickle_monster", elem2 : null }, + "seltzer": { elem1 : "hyper_tickle_monster", elem2 : null }, + }, + state: "liquid", + conduct: .5, + temp: 20, + tempHigh: 350, + stateHigh: ["smoke","smoke","smoke","slime","anomalous_essence"], + burn: .1, + burnTime: 300, + burnInto: ["smoke","smoke","smoke","slime","anomalous_essence"], + stain: 0.03, +}, + +elements.hyper_tickle_monster = { + color: "#FFA500", + hidden: true, + behavior: [ + "XX|XX|XX", + "XX|CH:tickle_monster%1.0|XX", + "XX|XX|XX", + ], + tick: behaviors.BOUNCY, + category: "scp", + density: 575, + reactions: { + "sugar_water": { elem2 : "water" }, + "dirty_water": { elem2 : "water" }, + "candy": { elem2 : null }, + "sugar": { elem2 : null }, + "sauce": { elem2 : null }, + "salt": { elem2 : null }, + "cheese": { elem2 : null }, + "melted_cheese": { elem2 : null }, + "baked_potato": { elem2 : null }, + "mashed_potato": { elem2 : null }, + "bread": { elem2 : null }, + "toast": { elem2 : null }, + "jelly": { elem2 : null }, + "nut_butter": { elem2 : null }, + "grape": { elem2 : null }, + "ice_cream": { elem2 : null }, + "juice": { elem2 : null }, + "milk": { elem2 : null }, + "gingerbread": { elem2 : null }, + "crumb": { elem2 : null }, + "cream": { elem2 : null }, + "baked_batter": { elem2 : null }, + "frozen_yogurt": { elem2 : null }, + "yogurt": { elem2 : null }, + "popcorn": { elem2 : null }, + "chocolate": { elem2 : null }, + "chocolate_milk": { elem2 : null }, + "melted_chocolate": { elem2 : null }, + "alchohol": { elem2 : null }, + "pilk": { elem2 : null }, + "soda": { elem2 : null }, + "coffee": { elem2 : null }, + "seltzer": { elem2 : null }, + }, + state: "liquid", + conduct: .5, + temp: 20, + tempHigh: 350, + stateHigh: ["smoke","smoke","smoke","slime","anomalous_essence"], + burn: .1, + burnTime: 300, + burnInto: ["smoke","smoke","smoke","slime","anomalous_essence"], + stain: 0.08, +}; + +// SCPs with ID over 999 here \ No newline at end of file From 0f46d22a1ca3b83c9e2ef03155671c62c4e80fcd Mon Sep 17 00:00:00 2001 From: redbirdly <155550833+redbirdly@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:36:08 +0800 Subject: [PATCH 02/15] Create lizard_mod.js mod about lizards --- mods/lizard_mod.js | 91 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 mods/lizard_mod.js diff --git a/mods/lizard_mod.js b/mods/lizard_mod.js new file mode 100644 index 00000000..d8f30415 --- /dev/null +++ b/mods/lizard_mod.js @@ -0,0 +1,91 @@ +// lizard_mod.js by @RedBirdly + +function blendColors(color1, color2, ratio = 0.5) { + // Convert the colors to RGB + const rgb1 = parseColor(color1); + const rgb2 = parseColor(color2); + + // Calculate the blended color + const blendedColor = [ + Math.round(rgb1[0] * (1 - ratio) + rgb2[0] * ratio), // Red + Math.round(rgb1[1] * (1 - ratio) + rgb2[1] * ratio), // Green + Math.round(rgb1[2] * (1 - ratio) + rgb2[2] * ratio) // Blue + ]; + + // Convert the blended color back to a CSS color string + return `rgb(${blendedColor[0]}, ${blendedColor[1]}, ${blendedColor[2]})`; +} + + +function parseColor(color) { + // Create a temporary div to parse the color + const div = document.createElement('div'); + div.style.color = color; + document.body.appendChild(div); + + // Get the computed color + const computedColor = getComputedStyle(div).color; + + // Remove the temporary div + document.body.removeChild(div); + + // Parse the computed color into RGB values + const match = computedColor.match(/\d+/g); + return match.map(Number); +} + +// dark red, dark green, brown, dark gray, light gray, lime +let lizard_colors = ["#4d2f2a", "#356641", "#85754d", "#3c3c3c", "#A1A1A1", "#98fb98"]; + +// camouflage function for lizards +function camo(pixel) { + if (!paused) { + // set camouflage color to random color + if (Math.random() < 0.002) { + let n = Math.floor(Math.random() * lizard_colors.length); + pixel.color = lizard_colors[n]; + } + // set camouflage color to random color but make it slightly gray because camouflage isn't perfect + if (Math.random() < 0.1) { + for (let i = 0; i < currentPixels.length; i++) { + let x = currentPixels[i].x; + let y = currentPixels[i].y; + let dx = Math.abs(x - pixel.x); + let dy = Math.abs(y - pixel.y); + if (dx <= 1 && dy <= 1 && currentPixels[i].element != "lizard") { + pixel.color = blendColors(blendColors(currentPixels[i].color, "#887766", 0.4), pixel.color); + break; + } + } + } + } +} + +// define element +elements.lizard = { + color: lizard_colors, + behavior: [ + "ST%98|M1%6|ST%98", + "XX|XX|M2%20 AND BO", + "XX|M1%80|M2", + ], + tick: camo, + tempHigh: 100, + stateHigh: "ash", + tempLow: 0, + stateLow: "dead_bug", + breakInto: "dead_bug", + category: "life", + burn: 95, + burnTime: 25, + state: "solid", + density: 500, + conduct: 0.15, + reactions: { + "bird": { elem2: null, chance: 0.1, func: behaviors.FEEDPIXEL }, + "plant": { elem2: null, chance: 0.05, func: behaviors.FEEDPIXEL }, + "tomato": { elem2: null, chance: 0.05, func: behaviors.FEEDPIXEL }, + "fly": { elem2: null, chance: 0.15, func: behaviors.FEEDPIXEL }, + "ant": { elem2: null, chance: 0.1, func: behaviors.FEEDPIXEL }, + } +}; From 915a65d3b019e524f0cf67ba6e7c31b4ec423e6c Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Wed, 24 Apr 2024 20:03:43 +0100 Subject: [PATCH 03/15] Update Science_mod.js Doing more tmrw --- mods/Science_mod.js | 60 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index 47f8b3b4..6f2383c6 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -1,6 +1,6 @@ // Science mod for Sandboxels // (Inspired by survival.js) -// Build 17 +// Build 18 // By: Lucifer (@a_british_proto (Discord)) // If there is anything you want to suggest or there's a bug then just dm me on discord // Todo: @@ -1383,7 +1383,59 @@ substance.Silver_Sulfate = { hidden:true } -// I done this on my school computers :skull: -// doing more later +// I have finally gotten my motivation back! :D -// I accidentally pressed Ctrl+V instead of Ctrl+C so it deleted my work D: +substance.Silver_Selenide = { + behavior: behaviors.WALL, + color: "333333", + category: "lands", + state: "solid", + hidden:true +} + +// Why am listening to a random playlist? I swear I'm going fully insane + +substance.Silver_Selenate = { + behavior: behaviors.WALL, + color: "FFFFFF", + category: "lands", + state: "solid", + hidden:true +} + +substance.Silver_Telluride = { + behavior: behaviors.WALL, + color: "333333", + category: "lands", + state: "solid", + hidden:true +} + +substance.Silver_Arsenate = { + behavior: behaviors.WALL, + color: "E3E35F", + category: "lands", + state: "solid", + hidden:true +} + +substance.Silver_Phosphate = { + behavior: behaviors.WALL, + color: "FFFF00", + category: "lands", + state: "solid", + hidden:true +} + +// FINALLY WE ARE OUT OF THE SILVER COMPOUNDS!!!11!!1111! :DDDDD +// Now time to go onto the aluminum compounds + +substance.Aluminum_Arsenide = { + behavior: behaviors.WALL, + color: "FF6600", + category: "lands", // Might just change this after I'm done with the substances (as well as the other one(s)) + state: "solid", + hidden:true +} + +// Doing more tmrw I guess, I'm tired From 65966dd0b7865d9d21648363f1294de3636ea6e2 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:10:31 -0400 Subject: [PATCH 04/15] fix error; Update example_mod.js --- mods/example_mod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/example_mod.js b/mods/example_mod.js index ddf36999..7425dac0 100644 --- a/mods/example_mod.js +++ b/mods/example_mod.js @@ -68,7 +68,7 @@ runAfterLoad(function() { }); // Run if another mod is active -if (enabledMods.includes("test.js")) { +if (enabledMods.includes("mods/test.js")) { runAfterLoad(function() { // Your code here console.log("Hello World!"); From 121667add3673faa155cf5c612b9768ac3b47742 Mon Sep 17 00:00:00 2001 From: F3ZZ0 <168129449+F3ZZ0@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:49:35 +0100 Subject: [PATCH 05/15] Add files via upload --- mods/morepowders.js | 209 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 mods/morepowders.js diff --git a/mods/morepowders.js b/mods/morepowders.js new file mode 100644 index 00000000..2925f699 --- /dev/null +++ b/mods/morepowders.js @@ -0,0 +1,209 @@ +elements.template = { + color: "#ffffff", + category: "more_powders", + state: "solid", + hidden: true, + behavior: behaviors.POWDER + } +elements.powder = { + color: ["#c17d17", "#f2a32e"], + behavior: behaviors.POWDER, + category: "more_powders", + state: "solid", + reactions: { + "glue": { elem1: "smoke", elem2: "sticky_powder" }, + "foam": { elem1: "foam_powder", elem2: "foam_powder" }, + "electric": { elem1: null, elem2: "electric_powder" }, + "dust": { elem1: null, elem2: "void_powder" }, + }, + stateHigh: "smoke", +tempHigh: 200, +tempLow: -200, +stateLow: "cold_powder", +stateHigh: "hot_powder", +} +elements.gas_powder = { + color: "#b98ffc", + behavior: behaviors.POWDER, + category: "more_powders", +state: "gas", +stateHigh: "smoke", +tempHigh: 2000, +reactions: { + "up_powder": { elem1: null, elem2: "up_gas_powder" }, +}, +tempLow: -200, +stateLow: "powder", +} +elements.up_powder = { + color: "#8ffcb9", + behavior: behaviors.AGPOWDER, + category: "more_powders", +state: "solid", +tempLow: -200, +stateLow: "powder", +}, +elements.up_gas_powder = { + color: ["#a2c5da", "#a0a7d8"], + behavior: behaviors.AGPOWDER, + category: "more_powders", +state: "gas", +stateHigh: "gas_powder", +tempHigh: 1000, +hidden: true, +tempLow: -200, +stateLow: "powder", +} +elements.slow_powder = { + color: "#c9445c", + behavior:[ + "XX|XX|XX", + "XX|XX|XX", + "M2%20|M1%20|M2%20", + ], + category: "more_powders", +state: "solid", +stateHigh: "smoke", +tempHigh: 2000, +reactions: { + "gas_powder": { elem1: null, elem2: "slow_gas_powder" }, + "up_powder": { elem1: null, elem2: "slow_up_powder" }, +}, +tempLow: -200, +stateLow: "powder", +} +elements.slow_gas_powder = { + color: "#c069aa", + behavior:[ + "XX|XX|XX", + "XX|XX|XX", + "M2%20|M1%20|M2%20", + ], + category: "more_powders", +state: "gas", +stateHigh: "gas_powder", +tempHigh: 1000, +hidden: true, +tempLow: -200, +stateLow: "powder", +} +elements.slow_up_powder = { + color:["#aba18a", "#a4aa8a"], + behavior:[ + "M2%20|M1%20|M2%20", + "XX|XX|XX", + "XX|XX|XX", + ], + category: "more_powders", +state: "solid", +stateHigh: "up_powder", +tempHigh: 1000, +hidden: true, +reactions: { + "slow_powder": { elem1: null, elem2: "slower_up_powder" }, +}, +tempLow: -200, +stateLow: "powder", +} +elements.slower_up_powder = { + color: ["#b5827b", "#b59e7b"], + behavior:[ + "M2%10|M1%10|M2%10", + "XX|XX|XX", + "XX|XX|XX", + ], + category: "more_powders", +state: "solid", +stateHigh: "up_powder", +tempHigh: 1000, +hidden: true, +tempLow: -200, +stateLow: "powder", +} +elements.sticky_powder = { + color: ["#badd96", "#96dd96"], + behavior:[ + "ST|ST|ST", + "ST|XX|ST", + "ST AND M2|ST AND M1|ST AND M2", + ], + category: "more_powders", + state: "solid", + hidden: true, + tempLow: -200, + stateLow: "powder", + } + elements.foam_powder = { + color: ["#e0be8b", "#ffffff"], + behavior: behaviors.FOAM, + category: "more_powders", + state: "gas", + tempLow: -200, + stateLow: "frozen_foam_powder", + hidden: true + } + elements.frozen_foam_powder = { + color: ["#c0eded", "#a7cfba"], + behavior: behaviors.POWDER, + category: "more_powders", + state: "gas", + tempHigh: 1000, + stateHigh: "foam_powder", + hidden: true + } + elements.electric_powder = { + color: ["#eae463", "#f9fc45"], + behavior: [ + "SH|SH|SH", + "SH|XX|SH", + "SH AND M2|SH AND M1|SH AND M2", + ], + category: "more_powders", + state: "solid", + reactions: { + }, + stateHigh: "smoke", + tempHigh: 500, + tempLow: -1000, + stateLow: "powder", + hidden: true + } + elements.hot_powder = { + color: ["#8a3b87", "#d43a3a", "#d43a3a"], + behavior:[ + "HT|HT|HT", + "HT|XX|HT", + "HT AND M2|HT AND M1|HT AND M2", + ], + category: "more_powders", + state: "solid", + tempLow: -200, + stateLow: "cold_powder", + temp: 200, + hidden: true + } + elements.cold_powder = { + color: ["#8a3b87", "#3f3cd4", "#3f3cd4"], + behavior:[ + "CO|CO|CO", + "CO|XX|CO", + "CO AND M2|CO AND M1|CO AND M2", + ], + category: "more_powders", + state: "solid", + tempHigh: 400, + stateHigh: "hot_powder", + temp: -200, + hidden: true + } + elements.void_powder = { + color: "#303031", + category: "more_powders", + state: "solid", + hidden: true, + behavior: [ + "DL|DL|DL", + "DL|XX|DL", + "DL AND M2|DL AND M1|DL AND M2", + ] + } \ No newline at end of file From 3242e064af09da701da1f71863f464c5bde21c52 Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:05:13 +0800 Subject: [PATCH 06/15] food mod compilation --- mods/food_mods.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mods/food_mods.js diff --git a/mods/food_mods.js b/mods/food_mods.js new file mode 100644 index 00000000..bb088d75 --- /dev/null +++ b/mods/food_mods.js @@ -0,0 +1,15 @@ +var mods_to_include = ["mods/sbstuff.js","mods/ketchup_mod.js","mods/morefoodsmod.js","mods/weAllScreamFor.js","mods/soups.js","mods/pizzasstuff.js","mods/community_desserts.js","mods/plants.js","mods/aChefsDream.js"] + +var mods_included = mods_to_include.map(mod => enabledMods.includes(mod)); +var all_mods_included = mods_included.reduce(function(a,b) { return a && b }); + +if(!all_mods_included) { + var mods_needed = mods_to_include.filter(function(modPath) { return !(enabledMods.includes(modPath)) }); + + mods_needed.forEach(function(modPath) { + enabledMods.splice(enabledMods.indexOf("mods/food_mods"),0,modPath); + }); + localStorage.setItem("enabledMods", JSON.stringify(enabledMods)); + alert(`The following mods have been inserted: ${mods_needed.join(", ")} +Reload the page for the mods to take effect. Happy cooking!`) +} From e21f2451fb13f492c10a537bced96d7348b9515a Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:08:04 +0800 Subject: [PATCH 07/15] Update mod-list.html --- mod-list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mod-list.html b/mod-list.html index f07335c9..52bd7060 100644 --- a/mod-list.html +++ b/mod-list.html @@ -310,6 +310,7 @@ Compilations a_mod_by_alice.jsA mod combining most of Alice’s mods, and some other thingsAlice +food_mods.jsA mod combining most food modsstefanblox, moss, Tisquares, SquareScreamYT, Adora, pixelegend4, Alice, Nubo318, Clide4, rottenEgghead Technical Libraries & Tests a_bundle_of_tests.jsSeveral test functionsAlice From 45a941f91242a46f1d947d3be29daffd3a00361a Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Fri, 26 Apr 2024 18:18:12 +0800 Subject: [PATCH 08/15] a very big update --- mods/aChefsDream.js | 1112 ++++++++++++++++++++++++------------------- 1 file changed, 625 insertions(+), 487 deletions(-) diff --git a/mods/aChefsDream.js b/mods/aChefsDream.js index 02fe97cd..205c30d7 100644 --- a/mods/aChefsDream.js +++ b/mods/aChefsDream.js @@ -1,482 +1,10 @@ -/* -Created by SquareScreamYT/sqec <@918475812884344852> -Thanks to RealerRaddler <@914371295561535508>, Alice <@697799964985786450>, nousernamefound <@316383921346707468>, Adora the Transfem <@778753696804765696>, ryan(R74n) <@101070932608561152> and Fioushemastor <@738828785482203189> for helping :) -Compatibility with plants.js coming soon -Works well with community_desserts.js -Beta testing at aChefsDream_beta.js or SquareScreamYT/aChefsDream.js on github +// created by SquareScreamYT +// https://github.com/SquareScreamYT/aChefsDream.js -v1.13.7 - -you can support me at my youtube: https://youtube.com/@sqec - -Upcoming Features: -- pudding/cream -- extract tool -- cinnamon -- spring onions -- white rice noodles -- matcha leaves, powder, tea -- cacao pods -- more chocolate, cocoa powder, white chocolate, cocoa butter -- pigs, ham and bacon -- garlic -- stainless steel -- pepper plants -- hot chocolate -- celery -- kiwis -- guavas -- lychees -- cherries (and the plasticky maraschino cherries 🤮🤮🤮) -- dragonfuits -- dates -- figs -- avocados -- apricots and almonds (roasted) -- hazelnuts -- plums -- curry/chicken tikka masala -- raisins -- peaches -- cucumbers -- eggplants -- crabs (they eat coconuts) -- squids -- tofu -- miso -- juice reaction with other juices -- jackfruit -- fruit soda (any juice + co2 or seltzer) -- rambutan -- shrimp/prawn meat -- sheep, goats, mutton, wool/fabric, filter -- filter (like in nousersthing.js) - -Changelog (v1.0) - - added chickens - - lays chicken eggs - - added chicks - - hatches from chicken eggs - - grows into chickens - - added chicken eggs - - added frozen chicken eggs - - added hard boiled eggs - - made by putting chicken eggs in hot water - - added soup - - made from broth and water - - added noodles - - made by putting batter in hot water - - added chicken meat - - raw chicken meat - - cooked chicken meat - - battered raw chicken - - made by mixing raw chicken and batter - - raw chicken nuggets - - made by mixing battered raw chicken with crumbs - - (cooked) chicken nuggets - - added crushed worm - - chicken food - - made by smashing worms or mixing worms with rocks - - added frozen crushed worms - - added fried potato - - made by putting potatoes in hot cooking oil - - added smoked chicken - - made by putting raw chicken with smoke - - added boiled chicken - - made by putting raw chicken in hot water - - added fried chicken - - made by putting raw chicken in hot cooking oil - - added steamed chicken - - made by putting raw chicken with steam - - added olives - - added olives - - olives can be smashed into cooking oil - - added olive wood - - added olive branches - - added olive leaves - - added cooking oil - - - - -Changelog (v1.1) - - added apples and related stuff - - apples - - applewood - - apple branches - - apple leaves - - apple juice - - made by smashing apples - - apple seeds - - apple slices - - made by cutting apples - - apple jam - - made by putting sugar in apple juice - - added knife tool - - cuts, peels, etc. pixels - - readded potato skin and peeled potato - - changed fried potato recipe from potato to skinned potato - - added pepper - - added cake - - made by mixing baked batter and cream - - added icing sugar - - made by smashing sugar - - added icing - - made by shift-mixing icing sugar - - noodles description - - bug fix (freezing crushed worms makes them alive) - - - - -Changelog (v1.2) - - added boilers - - added steamers - - added smokers - - added oranges and related stuff - - oranges - - orange wood - - orange branches - - orange leaves - - orange juice - - made by smashing orange - - orange seeds - - orange slices - - made by cutting oranges - - orange peels - - byproduct of cutting oranges into orange slices - - marmalade - - made by putting sugar in orange peels and orange slices - - apple and orange juice now turn into juice ice under 0 degrees - - apple juice now boils into sugar and steam - - apple juice now boils at 100 instead of 400 - - added coral and coral stems - - added tuna - - added cooked and raw tuna - - added smoked tuna - - made by putting raw tuna with smoke - - added boiled tuna - - made by putting raw tuna in hot water - - added fried tuna - - made by putting raw tuna in hot cooking oil - - added steamed tuna - - made by putting raw tuna with steam - - added salmon - - added cooked and raw salmon - - added smoked salmon - - made by putting raw salmon with smoke - - added boiled salmon - - made by putting raw salmon in hot water - - added fried salmon - - made by putting raw salmon in hot cooking oil - - added steamed salmon - - made by putting raw salmon with steam - - added grape juice - - added cream of tartar - - added wine - - added corn syrup - - - -Changelog (v1.3) - - added shrimp - - added coconuts - - added coconut stems - - added coconut leaves - - added coconut tree tops - - added coconut milk and coconut juice - - added cut coconuts - - salmon and tuna meats no longer melt - - added knife description - - added lemons and related stuff - - lemons - - lemon wood - - lemon branches - - lemon leaves - - lemon juice - - made by smashing lemons - - lemon seeds - - lemon slices - - made by cutting lemons - - lemon zest - - byproduct of cutting lemons - - lemon marmalade can now be made by mixing lemon slices or lemon zest with sugar - - added carrots - - added carrot seeds and leaves - - added carrot juice - - added dry icing - - - -Changelog (v1.3.1) - - added lemonade - - - -Changelog (v1.3.2) - - added apple cider vinegar - - added turnips - - added turnip seeds and leaves - - added turnip juice - - - -Changelog (v1.4) - - added baking powder - - added corn starch - - added maple syrup - - added pancakes - - added pancake mix - - added pancake batter - - added normal pancakes - - added crispy pancakes - - added burnt pancakes - - added strawberries - - added strawberries - - added strawberry seeds, stem, and leaves - - added strawberry juice - - added whipped cream - - chicken eggs no longer hatch under 20 degrees - - added ginger - - added ginger juice - - added ginger rhizomes, pseudostems and leaves - - - -Changelog (v1.5) - - added blueberries - - added blueberries - - added blueberry seeds, stem, and leaves - - added blueberry juice - - added strawberry and blueberry jam - - added cut blueberries - - added advanced dough - - added carbonic acid - - added cookies and cookie dough - - replaced cooking oil with nut oil - - added boba and boba dough - - - -Changelog (v1.6) - - added freeze and warm tool - - added olive seeds - - juice mixing functionality - - wine can now be made by mixing grape juice and alcohol - - added bananas and related stuff - - bananas - - hanging banana peduncle and banana peduncle - - banana stem and banana stem top - - banana leaves - - cut banana - - banana juice - - banana bread - - - -Changelog (v1.7) - - added chocolate chips - - added sprinkles - - added banana milk (yellow fruit milk) - - added passion fruits - - added passion fruit vines and seeds (new climbing vines feature!) - - added mangoes - - added mango juice - - added mango wood, branch, leaves and seeds - - added pineapples - - added pineapple leaves, seed and juice - - - -Changelog (v1.8) - - added lime and lime juice - - added lime zest and slices - - added escargot - - added broccoli - - added broccoli stem, cut broccoli and broccoli seed - - added freeze drying and freeze dried fruits - - added soapy water - - - - -Changelog (v1.9) - - added onion - - added cut onion - - added fried onion - - added rice - - added porridge - - added cooked and burnt rice - - added rice plants and rice panicles - - added rice seeds - - added msg - - added seaweed - - added dried seaweed - - added seaweed stem and seeds - - fix egg and noodle bug - - - - -Changelog (v1.10) - - tweaked seaweed behavior - - tweaked tomato and grape vines - - added peppermint - - added peppermint leaves and stems - - added peppermint seeds - - added vanilla - - added vanilla seeds, stem, leaves - - added vanilla flower - - added vanilla pod - - added vanilla essence - - - - -Changelog (v1.10.1) - - unhid vanilla essence - - added peppermint candy - - vanilla essence can now turn ice cream light yellow - - added peppermint candy - - added tapioca - - added tapioca stems, leaves, and seed - - - - -Changelog (v1.10.2) - - added sprinkle explosions - - - - -Changelog (v1.10.5) - - added chilli - - added chilli seed, stem and leaves - - added chilli powder - - added hot sauce - - - - -Changelog (v1.10.7) - - added mango milk - - - - -Changelog (v1.10.8) - - added onion powder - - fix carrot plant bug - - added fried rice - - added durians - - added cut durians - - added durian seed, wood, leaves and branches - - - - -Changelog (v1.11) - - unhid carrot - - unhid turnip - - - - -Changelog (v1.12) - - added whisk - - added egg white - - added hard egg white - - added whisked egg white - - added marshmallows - - added cooked marshmallows - - added burnt marshmallows - - improved soup (from nousersthings.js) - - added food coloring (color may fade) - - added eat tool - - added drink tool - - - - -Changelog (v1.12.1) - - removed coral, can still be found in ocean.js - - updated food coloring - - - - -Changelog (v1.12.2) - - updated cooked meat behavior - - - - -Changelog (v1.12.4) - - added cake batter - - added condensed milk - - added wasabi - - added beans - - added baked beans - - added fermented beans/natto - - added soy sauce - - - - -Changelog (v1.13) - - added cracker and cracker dough - - added barbecue sauce - - added mustard - - added agar - - added barbecued chicken - - tweaked grape juice color - - added duck - - added duckling - - added duck eggs and frozen duck eggs - - added raw duck and cooked duck - - added fried duck - - added boiled duck - - added barbecued duck - - added smoked duck - - added steamed duck - - added cows - - added calves - - added steak and beef - - added smoked steak and barbecued steak - - - - -Changelog (v1.13.5) - - added hard jelly - - soda can mix colors - - added soda jelly - - added fanta (orange juice + carbon dioxide) - - - - -Changelog (v1.13.7) - - rename nut to peanut - - - - - - - - -*/ - -/* -elements.test = { - //other needed properties - cutInto: "elem" -} -*/ - -console.log("Thanks for using aChefsDream.js! -sqec") +runAfterLoad(function() { + console.log("Thanks for using aChefsDream.js! -sqec") + console.log("aChefsDream is hosted at https://github.com/SquareScreamYT/aChefsDream.js") +}) function interpolateRgb(rgb1, rgb2, ratio) { const interpolatedRgb = { @@ -592,6 +120,29 @@ elements.freeze_dry = { desc: "Use on pixels to freeze dry them, if possible." } +elements.food_paint = { + color: ["#c27070","#c29c70","#c2c270","#70c270","#70c2c2","#7070c2","#c270c2"], + tool: function(pixel) { + if (elements[pixel.element].isFood == true) { + if (!shiftDown) { + pixel.color = pixelColorPick(pixel,currentColor) + } + else { + var rgb = currentColor.replace("#","").match(/.{1,2}/g); + for (var i = 0; i < rgb.length; i++) { + rgb[i] = parseInt(rgb[i],16); + } + pixel.color = "rgb(" + rgb.join(",") + ")" + } + delete pixel.origColor; + } + }, + customColor: true, + category: "tools", + canPlace: false, + desc: "Use on edible pixels to change color." +} + elements.eat = { color: ["#ffba79","#efff79"], tool: function(pixel) { @@ -849,7 +400,7 @@ elements.soup = { isFood: true, //thanks to nouser onMix: function(soup,ingredient) { - if (elements[ingredient.element].id !== elements.soup.id && elements[ingredient.element].id !== elements.broth.id) { + if (elements[ingredient.element].id !== elements.soup.id && elements[ingredient.element].id !== elements.broth.id && ingredient.temp > 40) { if (elements[ingredient.element].isFood || elements[ingredient.element].category === "food" || elements[ingredient.element].category === "liquids") { var rgb1 = soup.color.match(/\d+/g); var rgb2 = ingredient.color.match(/\d+/g); @@ -891,7 +442,7 @@ elements.soup = { } if (!elements.broth.reactions) elements.broth.reactions = {}; -elements.broth.reactions.water = { elem1: "soup", elem2: "soup" } +elements.broth.reactions.water = { elem1: "soup", elem2: "soup", tempMin: 70 } elements.noodles = { desc: "whatever noodles", @@ -1824,6 +1375,16 @@ elements.tuna = { category: "life", state: "solid", cutInto: "raw_tuna", + conduct: 0.2, + eggColor: ["#211316","#2C1A1D","#503734"], + breakInto: "blood", + burn:20, + burnTime:200, + temp: 20, + tempHigh: 120, + stateHigh: "cooked_tuna", + tempLow: -20, + stateLow: "frozen_fish", reactions: { "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL }, @@ -1860,6 +1421,16 @@ elements.salmon = { ], category: "life", state: "solid", + conduct: 0.2, + eggColor: ["#e8961c","#faa82d"], + breakInto: "blood", + burn:20, + burnTime:200, + temp: 20, + tempHigh: 120, + stateHigh: "cooked_salmon", + tempLow: -20, + stateLow: "frozen_fish", reactions: { "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL }, @@ -2286,12 +1857,22 @@ elements.wine = { elements.shrimp = { color: ["#EE5422", "#E9683C", "#F3583F", "#EDA270"], behavior: [ - "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14|M2%7.5 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14", + "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14|M2%7.5|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14", "SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14|FX%20|SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14", - "M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%15|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%15", + "M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14|M1|M2 AND SW:water,salt_water,sugar_water,dirty_water,seltzer,pool_water,primordial_soup%14", ], category: "life", state: "solid", + cutInto: "raw_shrimp", + conduct: 0.2, + breakInto: "raw_shrimp", + burn:20, + burnTime:200, + temp: 20, + tempHigh: 120, + stateHigh: "cooked_shrimp", + tempLow: -20, + stateLow: "frozen_meat", reactions: { "algae": { elem2:null, chance:0.25, func:behaviors.FEEDPIXEL }, "plant": { elem2:null, chance:0.125, func:behaviors.FEEDPIXEL }, @@ -3227,7 +2808,7 @@ elements.maple_syrup = { behavior: behaviors.LIQUID, tempHigh: 170, stateHigh: ["sugar","smoke","smoke"], - tempLow: 0, + tempLow: -15, category:"liquids", state: "liquid", viscosity: 15, @@ -5350,8 +4931,8 @@ elements.onion_seed = { createPixel("onion",pixel.x+1,pixel.y); createPixel("onion",pixel.x-1,pixel.y); if (isEmpty(pixel.x+1,pixel.y-3) && isEmpty(pixel.x-1,pixel.y-3)) { - createPixel("plant",pixel.x-1,pixel.y-3); - createPixel("plant",pixel.x+1,pixel.y-3); + createPixel("spring_onion_leaves",pixel.x+1,pixel.y-3); + createPixel("spring_onion_leaves",pixel.x-1,pixel.y-3); changePixel(pixel,"onion"); } } @@ -7777,8 +7358,8 @@ elements.raw_beef = { state: "solid", burnInto: "steak", temp:25, - tempHigh: 600, - stateHigh: ["steak"], + tempHigh: 200, + stateHigh: "steak", reactions: { "smoke": {elem1: "smoked_beef"}, "charcoal": {elem1: "barbecued_beef", tempMin: 70}, @@ -7844,3 +7425,560 @@ elements.jelly.temp = 0 elements.nut.name = "peanut"; elements.nut_meat.name = "peanut_meat"; elements.nut_butter.name = "peanut_butter"; + +elements.spring_onion_leaves = { + color: "#519c2f", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "ST:onion|M1|ST:onion", + ], + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 } + }, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "herb", + state: "solid", + density: 1050, + cutInto: "chopped_spring_onion", +} +elements.chopped_spring_onion = { + color: ["#0f9912","#227d23"], + behavior: behaviors.POWDER, + category:"food", + tempHigh: 100, + stateHigh: "dead_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + state: "solid", + density: 1050, + breakInto:"herb", +} + + +elements.spring_onion_seed = { + color: "#1a0e02", + tick: function(pixel) { + if (isEmpty(pixel.x,pixel.y+1)) { + movePixel(pixel,pixel.x,pixel.y+1); + } + else { + if (Math.random() < 0.2 && pixel.age > 50 && pixel.temp < 100) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + changePixel(dirtPixel,"root"); + } + } + if (isEmpty(pixel.x,pixel.y-2) && isEmpty(pixel.x,pixel.y-1) && isEmpty(pixel.x+1,pixel.y-1) && isEmpty(pixel.x-1,pixel.y-1) && isEmpty(pixel.x+1,pixel.y) && isEmpty(pixel.x-1,pixel.y)) { + createPixel("onion",pixel.x,pixel.y-1); + createPixel("onion",pixel.x+1,pixel.y-1); + createPixel("onion",pixel.x-1,pixel.y-1); + createPixel("onion",pixel.x,pixel.y-2); + createPixel("onion",pixel.x+1,pixel.y); + createPixel("onion",pixel.x-1,pixel.y); + if (isEmpty(pixel.x+1,pixel.y-3) && isEmpty(pixel.x-1,pixel.y-3)) { + createPixel("spring_onion_leaves",pixel.x+1,pixel.y-3); + createPixel("spring_onion_leaves",pixel.x-1,pixel.y-3); + if (isEmpty(pixel.x+1,pixel.y-4) && isEmpty(pixel.x-1,pixel.y-4)) { + createPixel("spring_onion_leaves",pixel.x+1,pixel.y-4); + createPixel("spring_onion_leaves",pixel.x-1,pixel.y-4); + if (isEmpty(pixel.x+1,pixel.y-5) && isEmpty(pixel.x-1,pixel.y-5)) { + createPixel("spring_onion_leaves",pixel.x+1,pixel.y-5); + createPixel("spring_onion_leaves",pixel.x-1,pixel.y-5); + } + } + changePixel(pixel,"onion"); + } + } + } + pixel.age++; + } + doDefaults(pixel); + }, + properties: { + "age":0 + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1|XX", + ], +} + +elements.stainless_steel ={ + color: "#91999e", + behavior: behaviors.WALL, + tempHigh: 1455.5, + category: "solids", + density: 7850, + conduct: 0.42, + hardness: 0.8 +} + +elements.rambutan_wood = { + color: "#635418", + behavior: behaviors.WALL, + tempHigh: 400, + stateHigh: ["ember","charcoal","fire","fire","fire"], + category: "solids", + burn: 5, + burnTime: 300, + burnInto: ["ember","charcoal","fire"], + state: "solid", + hardness: 0.15, + breakInto: "sawdust", + breakIntoColor: ["#dba66e","#cc8a64"], + hidden: true +} +elements.rambutan_branch = { + color: "#635418", + behavior: [ + "CR:rambutan_leaves,rambutan_branch%2|CR:rambutan_leaves,rambutan_branch%2|CR:rambutan_leaves,rambutan_branch%2", + "XX|XX|XX", + "XX|XX|XX", + ], + tempHigh: 100, + stateHigh: "rambutan_wood", + tempLow: -30, + stateLow: "rambutan_wood", + category: "life", + burn: 40, + burnTime: 50, + burnInto: ["sap","ember","charcoal"], + hidden: true, + state: "solid", + density: 1500, + hardness: 0.15, + breakInto: ["sap","sawdust"], +} +elements.rambutan_leaves = { + color: "#6fa611", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|CR:unripe_rambutan%0.1|XX", + ], + reactions: { + "vinegar": { elem1:"dead_plant", elem2:null, chance:0.035 }, + "baking_soda": { elem1:"dead_plant", elem2:null, chance:0.01 }, + "bleach": { elem1:"dead_plant", elem2:null, chance:0.05 }, + "alcohol": { elem1:"dead_plant", elem2:null, chance:0.035 } + }, + category:"life", + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -1.66, + stateLow: "frozen_plant", + burn:65, + burnTime:60, + burnInto: "dead_plant", + breakInto: "dead_plant", + state: "solid", + density: 1050, + hidden: true +} +elements.unripe_rambutan = { + color: ["#87c718","#8ac91c","#94de1d"], + behavior: [ + "XX|ST:rambutan_leaves|XX", + "XX|CH:rambutan%1|XX", + "M2|M1|M2", + ], + category:"food", + tempHigh: 100, + stateHigh: ["dead_plant","steam"], + burn:65, + burnTime:60, + cutInto: "cut_rambutan", + state: "solid", + density: 1050, +} + +elements.rambutan = { + color: ["#d64242","#f23333","#cc3737","#b1db69"], + behavior: behaviors.POWDER, + category:"food", + tempHigh: 100, + stateHigh: ["sugar","steam"], + burn:65, + burnTime:60, + state: "solid", + density: 1050, + cutInto: "cut_rambutan", + hidden: true, +} + +elements.cut_rambutan = { + color: "#f5f1bf", + behavior: behaviors.STURDYPOWDER, + category:"food", + tempHigh: 100, + stateHigh: ["sugar","steam"], + burn:65, + burnTime:60, + state: "solid", + density: 1050, + hidden: true, + freezeDryInto: "freeze_dried_fruits", + freezeDryIntoColor: "#a19f3b", +} + +elements.rambutan_seed = { + color: "#2b1807", + tick: function(pixel) { + if (isEmpty(pixel.x,pixel.y+1)) { + movePixel(pixel,pixel.x,pixel.y+1); + } + else { + if (Math.random() < 0.02 && pixel.age > 50 && pixel.temp < 100) { + if (!outOfBounds(pixel.x,pixel.y+1)) { + var dirtPixel = pixelMap[pixel.x][pixel.y+1]; + if (dirtPixel.element === "dirt" || dirtPixel.element === "mud" || dirtPixel.element === "sand" || dirtPixel.element === "wet_sand" || dirtPixel.element === "clay_soil" || dirtPixel.element === "mycelium") { + changePixel(dirtPixel,"root"); + } + } + if (isEmpty(pixel.x,pixel.y-1)) { + movePixel(pixel,pixel.x,pixel.y-1); + createPixel(Math.random() > 0.5 ? "rambutan_wood" : "rambutan_branch",pixel.x,pixel.y+1); + } + } + else if (pixel.age > 1000) { + changePixel(pixel,"rambutan_wood"); + } + pixel.age++; + } + doDefaults(pixel); + }, + properties: { + "age":0 + }, + tempHigh: 100, + stateHigh: "dead_plant", + tempLow: -2, + stateLow: "frozen_plant", + burn: 65, + burnTime: 15, + category: "life", + state: "solid", + density: 1500, + cooldown: defaultCooldown, + seed: true, + behavior: [ + "XX|XX|XX", + "XX|FX%10|XX", + "XX|M1|XX", + ], +}; + +elements.barbecued_shrimp = { + color:["#bf743b", "#b57026","#8f5e29","#a87b11"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + temp:55, + tempHigh: 600, + stateHigh: ["ash","smoke"], + isFood: true, + hidden: true, +} +elements.steamed_shrimp = { + color:["#e8dab2", "#e2cea6"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + temp:50, + tempHigh: 600, + stateHigh: ["ash","smoke"], + isFood: true, + hidden: true, +} +elements.smoked_shrimp = { + color:["#78542e", "#6b4b26"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + temp:55, + tempHigh: 600, + stateHigh: ["ash","smoke"], + isFood: true, + hidden: true, +} +elements.cooked_shrimp = { + color:["#ff7f50", "#ffa07a", "#ffb3a7"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + temp: 40, + tempHigh: 600, + stateHigh: ["ash", "smoke"], + hidden: true, +}; + +elements.raw_shrimp = { + color: ["#f0e0d6", "#e8d9ce", "#cdb7b5"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + burnInto: "cooked_shrimp", + temp:25, + tempHigh: 600, + stateHigh: "cooked_shrimp", + reactions: { + "batter": { elem1: "battered_shrimp", elem2: null }, + "smoke": {elem1: "smoked_shrimp"}, + "steam": {elem1: "steamed_shrimp"}, + "water": {elem1: "boiled_shrimp", tempMin: 70}, + "nut_oil": {elem1: "fried_shrimp", tempMin: 70}, + "charcoal": {elem1: "barbecued_shrimp", tempMin: 70}, + "fire": {elem1: "barbecued_shrimp"} + } +}; + +elements.boiled_shrimp = { + color: ["#ffd180", "#ffc978", "#ffbe70"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + isFood: true, + temp: 65, + tempHigh: 600, + stateHigh: ["ash", "smoke"], + hidden: true, +} +elements.battered_shrimp = { + color: ["#f2e7d5", "#eae0cd"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + temp:25, + tempHigh: 125, + stateHigh: "cooked_shrimp", + reactions: { + "crumb": { color1: "#123456", elem2: null }, + "nut_oil": {elem1: "tempura", tempMin: 60} + }, + hidden: true, +}; +elements.tempura = { + color: ["#ff8c00", "#ff8c00", "#ffab00", "#ffab00"], + behavior: behaviors.STURDYPOWDER, + category: "food", + state: "solid", + temp: 40, + tempHigh: 600, + stateHigh: ["ash", "smoke"], + tempLow: -20, + breakInto: "crumb", + isFood: true, + density: 100, + hidden: true, +}; + +elements.grape.stateHigh = "raisin" +elements.grape.tempHigh = 65 + +elements.raisin = { + color: ["#522D68","#3B194D","#381845","2B194D"], + behavior: [ + "XX|ST:vine|XX", + "ST:vine|XX|ST:vine", + "M2|M1|M2", + ], + reactions: { + "radiation": { elem1:"explosion", chance:0.1, color1:"#291824" }, + "rock": { elem1:"juice", chance:0.1, color1:"#291824" }, + "concrete": { elem1:"juice", chance:0.1, color1:"#291824" }, + "basalt": { elem1:"juice", chance:0.1, color1:"#291824" }, + "limestone": { elem1:"juice", chance:0.1, color1:"#291824" }, + "tuff": { elem1:"juice", chance:0.1, color1:"#291824" }, + "water": { elem2:"juice", chance:0.005, color2:"#291824" }, + "sugar_water": { elem2:"juice", chance:0.025, color2:"#291824" }, + "acid": { elem1:"juice", color1:"#291824" }, + "acid_gas": { elem1:"juice", color1:"#291824" }, + }, + innerColor: "#cc7492", + tempHigh: 256, + stateHigh: ["steam","sugar"], + category: "food", + state: "solid", + density: 1154, + breakInto: "juice", + breakIntoColor: "#291824", + ignoreAir: true, + isFood: true +} + +// things to mix: juice, water, seltzer, sugar water, soda, juice, milk, cream, +// juice, milk, chocolate milk, fruit milk, eggnog, nut milk, alcohol, wine, tea, +// tea, coffee, honey, caramel, vanilla essence, peppermint tea, sugar, yogurt, +// whipped cream, chocolate, jam + +// juice mixing +for (let juicei = 0; juicei < eLists.JUICEMIXABLE.length; juicei++) { + // juice with juice + for (let juicej = 0; juicej < eLists.JUICEMIXABLE.length; juicej++) { + elem = eLists.JUICEMIXABLE[juicei]; + elem2 = eLists.JUICEMIXABLE[juicej]; + if (elem != elem2) { + if (!elements[elem].reactions) { chance:1, elements[elem].reactions = {} } + elements[elem].reactions[elem2] = { func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.5); + changePixel(pixel1,"juice") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + // console.log("juice mixed") + }} + } + } + // juice with water + if (!elements[elem].reactions) { elements[elem].reactions = {} } + elements[elem].reactions.water = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB("rgb(255,255,255)"), 0.2); + if (((newrgb.r + newrgb.g + newrgb.b) / 3) > 215) { + newrgb = getRGB(pixel1.color); + } + changePixel(pixel1,"juice") + changePixel(pixel2,"juice") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + }} + // juice with milk + if (!elements[elem].reactions) { elements[elem].reactions = {} } + elements[elem].reactions.milk = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + }} + // juice with coconut milk + if (!elements[elem].reactions) { elements[elem].reactions = {} } + elements[elem].reactions.coconut_milk = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + }} + // juice with nut milk + if (!elements[elem].reactions) { elements[elem].reactions = {} } + elements[elem].reactions.nut_milk = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + }} + // juice with cream + if (!elements[elem].reactions) { elements[elem].reactions = {} } + elements[elem].reactions.cream = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + }} + // juice with fruit milk + if (!elements[elem].reactions) { elements[elem].reactions = {} } + elements[elem].reactions.fruit_milk = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + }} +} +// fruit milk with milk +elements.fruit_milk.reactions.milk = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + if (((newrgb.r + newrgb.g + newrgb.b) / 3) < 230) { + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } else if (Math.random() < 0.05) { + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } + } +} +// fruit milk with nut milk +elements.fruit_milk.reactions.nut_milk = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + if (((newrgb.r + newrgb.g + newrgb.b) / 3) < 230) { + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } else if (Math.random() < 0.05) { + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } + } +} +// fruit milk with coconut milk +elements.fruit_milk.reactions.coconut_milk = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + if (((newrgb.r + newrgb.g + newrgb.b) / 3) < 230) { + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } else if (Math.random() < 0.05) { + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } + } +} +// fruit milk with cream +elements.fruit_milk.reactions.cream = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + if (((newrgb.r + newrgb.g + newrgb.b) / 3) < 230) { + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } else if (Math.random() < 0.05) { + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } + } +} +// fruit milk with fruit milk +elements.fruit_milk.reactions.fruit_milk = { chance:1, func: function(pixel1, pixel2){ + let newrgb = interpolateRgb(getRGB(pixel1.color), getRGB(pixel2.color), 0.2); + changePixel(pixel1,"fruit_milk") + changePixel(pixel2,"fruit_milk") + pixel1.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + pixel2.color = `rgb(${parseInt(newrgb.r)},${parseInt(newrgb.g)},${parseInt(newrgb.b)})`; + } +} From f691ba02f2e529f3b7c383983bb717f5f54ed271 Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:20:12 +0100 Subject: [PATCH 09/15] Update Science_mod.js --- mods/Science_mod.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index 6f2383c6..28f359c9 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -1,6 +1,6 @@ // Science mod for Sandboxels // (Inspired by survival.js) -// Build 18 +// Build 19 // By: Lucifer (@a_british_proto (Discord)) // If there is anything you want to suggest or there's a bug then just dm me on discord // Todo: @@ -1438,4 +1438,19 @@ substance.Aluminum_Arsenide = { hidden:true } -// Doing more tmrw I guess, I'm tired +substance.Aluminum_Diboride = { + behavior: behaviors.WALL, + color: "CB6D51", + category: "lands", + state: "solid", + hidden:true +} + +// Doing this later as my schools blocked chatgpt and the definition is not on Ptable.com :/ +// substance.Aluminum_Dodecaboride = { +// behavior: behaviors.NULL, +// color: "000000", +// category: "null", +// state: "null", +// hidden:true +// } From af607009e78325310efad0c432b49bbbebf59f83 Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:55:02 +0100 Subject: [PATCH 10/15] Update Science_mod.js --- mods/Science_mod.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index 28f359c9..4c216af2 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -1454,3 +1454,19 @@ substance.Aluminum_Diboride = { // state: "null", // hidden:true // } + +// substance.Aluminum_Bromate_Nonahydrate = { +// behavior: behaviors.NULL, +// color: "000000", +// category: "null", +// state: "null", +// hidden:true +// } + +substance.Aluminum_Tribromide = { + behavior: behavior.NULL, // It's meant to be a powder but I'm too tired to go look plus I need to go to my next lesson now + color: "FF0000", + category: "lands", + state: "powder", + hidden:true +} From 9c969e61e5f4c4c5b0b505bc9a582dc1412179b8 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:06:58 -0400 Subject: [PATCH 11/15] Update mod-list.html --- mod-list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mod-list.html b/mod-list.html index 52bd7060..6b6bd780 100644 --- a/mod-list.html +++ b/mod-list.html @@ -275,6 +275,7 @@ amogus.jsAdds a small amogus structureAlice citybuilding.jsAdds seeds that create miniature buildings and other city-related itemsSquareScreamYT collab_mod.jsCreated by multiple people, adds random thingsmrapple, ilikepizza, stefanblox +Doom Mod (Unreleased)As seen on TikTok - Not yet available!ggod elem3.jsAdds all elements and combinations from Elemental 3 [Very Large]Sophie fools+.jsimproves and makes fools.js EXTREMELY annoying.SquareScreamYT funny elements 2022-11-15.jsAdds a few curated randomly-generated elementsAlice From 23daf7cad858854de618ad0bf511ba6b5b754dc5 Mon Sep 17 00:00:00 2001 From: guzzo86 <126430018+guzzo86@users.noreply.github.com> Date: Fri, 26 Apr 2024 22:26:42 -0400 Subject: [PATCH 12/15] Create CherrySoda.js --- mods/CherrySoda.js | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 mods/CherrySoda.js diff --git a/mods/CherrySoda.js b/mods/CherrySoda.js new file mode 100644 index 00000000..0be7f3da --- /dev/null +++ b/mods/CherrySoda.js @@ -0,0 +1,52 @@ +elements.potassiumpermanganate = { + color: ["#800080", "#FF00FF"], + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + density: 2500, + desc: "Potassium permanganate is a dark purple, crystalline solid. It is used as a powerful oxidizing agent.", + tempHigh: 240, + stateHigh: "molten_potassiumpermanganate", +} +elements.molten_potassiumpermanganate = { + color: ["#4B0082", "#800080", "#9932CC", "#8A2BE2", "#6A5ACD", "#FF00FF"], + category: "powders", + state: "solid", + density: 2500, + desc: "Potassium permanganate is a dark purple, crystalline solid. It is used as a powerful oxidizing agent.", + tempLow: 239, + stateLow: "potassiumpermanganate", +} +elements.tolulene = { + color: "#FFFFFF", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + density: 866, + desc: "Tolulene is used as a paint thinner and also referred to as benezene or methylbeneze", + burn: 37.5, + burnTime: 900, + burnInto: ["steam", "smoke", "fire", "fire",], + reactions: { + "potassiumpermanganate": {elem1: "benzaldehyde", elem2: "benzaldehyde"}, + } +} +elements.benzaldehyde = { + color: "#F5F5F5", + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + density: 1045, + desc: "Benzaldehyde is cherry flavor. It is also clear like tolulene.", + reactions: { + "seltzer": {elem1: "cherrysoda", elem2: "cherrysoda"}, + } +} +elements.cherrysoda = { + color: "#D2042D", + behavior: behaviors.LIQUID, + category: "food", + state: "liquid", + density: 1045, + desc: "Cherry soda." +} From ecabf5e6097ad6ccc9dfd73728f154e9f5536a31 Mon Sep 17 00:00:00 2001 From: Retorta1 <165048795+Retorta1@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:11:24 +0200 Subject: [PATCH 13/15] Update hu.json corrected some words --- lang/hu.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lang/hu.json b/lang/hu.json index b8645d87..9c4361c0 100644 --- a/lang/hu.json +++ b/lang/hu.json @@ -189,7 +189,7 @@ "bubble":"buborék", "acid":"sav", "neutral_acid":"semleges_sav", -"acid_gas":"savgáz", +"acid_gas":"savgőz", "glue":"ragasztó", "soda":"szénsavas_üdítőital", "gray_goo":"szürke_ragacs", @@ -242,7 +242,7 @@ "sterling":"sterling_ezüst", "gallium":"gallium", "molten_gallium":"olvadt_gallium", -"gallium_gas":"gallium_gáz", +"gallium_gas":"galliumgőz", "rose_gold":"rózsaarany", "purple_gold":"lila_arany", "blue_gold":"kék_arany", @@ -259,7 +259,7 @@ "molten_solder":"olvadt_forrasztó_fém", "juice":"lé", "juice_ice":"fagyott_lé", -"broth":"leves_leve", +"broth":"leveslé", "milk":"tej", "chocolate_milk":"csokis_tej", "fruit_milk":"gyümölcsös_tej", @@ -357,7 +357,7 @@ "liquid_helium":"folyékony_hélium", "sodium":"nátrium", "molten_sodium":"olvadt_nátrium", -"sodium_gas":"nátrium_gáz", +"sodium_gas":"nátriumgőz", "calcium":"kalcium", "molten_calcium":"olvadt_kalcium", "limestone":"mészkő", @@ -377,7 +377,7 @@ "fragrance":"illat", "perfume":"parfüm", "cyanide":"cián", -"cyanide_gas":"cián_gáz", +"cyanide_gas":"ciángáz", "ozone":"ózon", "cloud":"felfő", "rain_cloud":"esőfelhő", @@ -394,7 +394,7 @@ "led_b":"kék_led", "sulfur":"kén", "molten_sulfur":"olvadt_kén", -"sulfur_gas":"kén_gáz", +"sulfur_gas":"kéngőz", "copper_sulfate":"rézgálic", "snake":"kígyó", "loopy":"kacskaringós", @@ -426,7 +426,7 @@ "bead":"gyöngy", "color_sand":"színes_homok", "borax":"bórax", -"epsom_salt":"epsom_só", +"epsom_salt":"keserűsó", "potassium_salt":"kálium_só", "sodium_acetate":"nátrium-acetát", "lightning":"villámcsapás", @@ -501,7 +501,7 @@ "molten_blue_gold":"olvadt_kék_arany", "molten_electrum":"olvadt_elektrum", "molten_pyrite":"olvadt_pirit", -"broth_ice":"fagyott_leves_leve", +"broth_ice":"fagyott_leveslé", "frozen_vinegar":"fagyott_ecet", "sauce_ice":"fagyott_szósz", "alcohol_ice":"fagyott_alkohol", @@ -519,7 +519,7 @@ "molten_alga":"olvadt_alumínium-gallim_ötvözet", "molten_metal_scrap":"olvadt_fémtörmelék", "molten_borax":"olvadt_borax", -"molten_epsom_salt":"olvadt_epsom-só", +"molten_epsom_salt":"olvadt_keserűsó", "molten_potassium_salt":"olvadt_kálium_só", "molten_sodium_acetate":"olvadt_nátrium-acetát", "frozen_nitro":"fagyott_nitroglicerin", @@ -539,5 +539,5 @@ "tsunami": "cunami", "blaster": "plazmavető", "propane_ice": "fagyott_propán", -"molten_caustic_potash": "Olvadt_kálium-hidroxid" +"molten_caustic_potash": "olvadt_kálium-hidroxid" } From ddfb0446ae8ee1156c45e1b197c9cad8d0a28418 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Sat, 27 Apr 2024 14:29:04 -0400 Subject: [PATCH 14/15] infinite chef ad --- index.html | 1 + mod-list.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 94463d55..3f8dcae8 100644 --- a/index.html +++ b/index.html @@ -16243,6 +16243,7 @@ Cancer, Landmine, Grenade, Smoke Grenade">? 简体中文

+

Try our NEW GAME: Infinite Chef

Email us at contact@R74n.com for advertising, help, or education!

Be notified when Sandboxels and other R74n projects are updated, along with ramblings from the developer!

diff --git a/mod-list.html b/mod-list.html index e812157e..78e1a49e 100644 --- a/mod-list.html +++ b/mod-list.html @@ -117,7 +117,7 @@ velocity.jsBeta for explosion velocity, and later wind, which may come to the base game in the futureR74n Tools & Settings -adjustablepixelsize.jsAllows you to set the pixelSize with a URL parameterAlice + betaworldgen.jsadds a more advanced world generation to the gameAdora betterModManager.jsImprovements to the Mod Managerggod betterSettings.jsAdds additional settings and functionalityggod From d11857c30063f7b457efcd425dce74be553199a3 Mon Sep 17 00:00:00 2001 From: scen2tester <156643479+scen2tester@users.noreply.github.com> Date: Sat, 27 Apr 2024 23:14:18 -0400 Subject: [PATCH 15/15] spaceship --- mods/spaceship.js | 138 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 mods/spaceship.js diff --git a/mods/spaceship.js b/mods/spaceship.js new file mode 100644 index 00000000..3602462e --- /dev/null +++ b/mods/spaceship.js @@ -0,0 +1,138 @@ +elements.power_core = { + color: ["#10F7F3", "#5AEDEB", "#BDFCFB"], + behavior: behaviors.WALL, + temp: 250, + category: "special", + stateHigh: "n_explosion", + tempHigh: 9500, + state: "solid", + desc: "The power core for your spaceship! Make sure it doesnt reach 9500 degrees!" , + tick: function(pixel) { + const elementToCheck = "core_casing"; +let isValid = true; +for (let i = pixel.x - 4; i < pixel.x + 4; i++) { + for (let j = pixel.y - 4; j < pixel.y + 4; j++) { + if (Math.abs(pixel.x - i) === 4 || Math.abs(pixel.y - j) === 4) {isValid &= pixelMap[i][j]?.element === elementToCheck;} + else if (i !== pixel.x && j !== pixel.y) isValid &= isEmpty(i, j); + } +} +// if (!pixel.alerted) { + // if (isValid) { alert("Power Core succesfully stored") } + // else { alert("Invalid core! Make sure its a 9x9 hollow box with the pixel in the middle!"); } + // pixel.alerted = true; +// } Not finished Yet +if (pixel.temp === 5000) { pixel.color = pixelColorPick(pixel,"#F92810");} + else if ( pixel.temp < 2000) { pixel.color = pixelColorPick(pixel,"#F9B610");} + else { pixel.color = pixelColorPick(pixel,"#5AEDEB");} + if (isValid) { if (pixelMap[pixel.x][pixel.y-4].element === "core_casing") + {createPixel("core_energizer", pixel.x, pixel.y-5);}} + else {{createPixel("core_energizer", pixel.x, pixel.y-4);} + } +}, +}; +elements.thrusters = { + color: ["#8D8D8C", "#666666"], + behavior: behaviors.WALL, + category: "special", + behaviorOn: [ + "XX|XX|XX", + "XX|XX|CR:fire", + "XX|XX|XX", + ], + state: "solid", + desc: "Use this to drive your ship! (Cosmetic)", + conduct:1, +}; +elements.core_wall = { + color: ["#6EB5F1", "#708494"], + behavior: behaviors.WALL, + hardness: 1, + density: 90000000, + desc: "Harder than anything in the world!", + category: "special", +}; +elements.space_blaster = { + color: ["#10F7F3", "#5AEDEB", "#BDFCFB"], + tick: function(pixel) { + for (var i = 0; i < 3; i++) { + var skip = false; + if (!isEmpty(pixel.x,pixel.y-1,true)) { + var p = pixelMap[pixel.x][pixel.y-1]; + if (p.element === "space_blaster") { skip = true; } + if (Math.random() < 0.9 && elements[p.element].hardness !== 1) { + deletePixel(p.x,p.y); + } + } + if (!tryMove(pixel,pixel.x-1,pixel.y,["flash","heat_ray","electric"]) && !skip) { + explodeAt(pixel.x,pixel.y,30,"plasma"); + var coords = circleCoords(pixel.x,pixel.y,15); + coords.forEach(function(coord) { + var x = coord.x; + var y = coord.y; + if (!isEmpty(x,y,true)) { + pixelMap[x][y].temp += 10000; + pixelTempCheck(pixelMap[x][y]); + } + }) + deletePixel(pixel.x,pixel.y); + return; + } + } + }, + category: "energy", + state: "solid", + density: 100000000, + temp: 10000, + hardness: 1, + maxSize: 3, + cooldown: defaultCooldown, + excludeRandom: true, + desc: "A energized blaster pixel", +}; +elements.space_gunner_LEFT = { + color: ["#708494", "#5A6873"], + behavior: behaviors.WALL, + category: "special", + behaviorOn: [ + "XX|XX|XX", + "CR:space_blaster|XX|XX", + "XX|XX|XX", + ], + state: "solid", + desc: "Use this to shoot your enemies! (Shoots Left)", + conduct:1, +}; +elements.space_gunner_RIGHT = { + color: ["#708494", "#5A6873"], + behavior: behaviors.WALL, + category: "special", + behaviorOn: [ + "XX|XX|XX", + "XX|XX|CR:space_blaster", + "XX|XX|XX", + ], + state: "solid", + desc: "Use this to shoot your enemies! (Shoots Right)", + conduct:1, +}; +elements.core_energizer = { + color: "#FFFB00", + hidden: true, + behavior: behaviors.WALL, + state: "solid", + tick: function(pixel) { + createPixel("radiation", pixel.x, pixel.y+1) + }, +}; +elements.core_casing = { + color: ["#4A7375","#C1D875","#8BFCF3"], + reactions: { + "radiation": { elem2:"electric", temp1:200 } + }, + behavior: behaviors.WALL, + category: "special", + density: 2710, + conduct: 0.73, + hardness: 1, + desc: "Casing for the inner core!", + }; \ No newline at end of file