From 68be45c886311ac744ec2fee63805cf063ef393b Mon Sep 17 00:00:00 2001 From: redbirdly <155550833+redbirdly@users.noreply.github.com> Date: Sun, 26 May 2024 13:46:12 +0800 Subject: [PATCH 01/25] Add lightmap & fast_lightmap (again) --- mods/fast_lightmap.js | 285 ++++++++++++++++++++++++++++++++++++++++++ mods/lightmap.js | 285 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 570 insertions(+) create mode 100644 mods/fast_lightmap.js create mode 100644 mods/lightmap.js diff --git a/mods/fast_lightmap.js b/mods/fast_lightmap.js new file mode 100644 index 00000000..58cd9553 --- /dev/null +++ b/mods/fast_lightmap.js @@ -0,0 +1,285 @@ +// Redbirdly's Mod that adds a better light system +// this is the faster version of lightmap.js (although lower quality) + +let lightmap = []; +let nextLightmap = []; +let lightmapWidth, lightmapHeight; +let pixelSizeQuarter = pixelSizeHalf / 2; +let lightmapScale = 3; + +// Define RGB colors +let lightColor = [255, 223, 186]; +let sunColor = [255*8, 210*8, 26*8]; +let lampColor = [255*4, 223*4, 186*4]; +let laserColor = [255, 0, 0]; +let ledRColor = [255, 0, 0]; +let ledGColor = [0, 255, 0]; +let ledBColor = [0, 0, 255]; +let fireColor = [255, 69, 0]; +let plasmaColor = [160, 69, 255]; +let coldFireColor = [0, 191, 255]; +let magmaColor = [255, 140, 0]; +let neonColor = [255*2, 60*2, 10*2]; + +function initializeLightmap(width, height) { + lightmapWidth = Math.ceil(width / lightmapScale); + lightmapHeight = Math.ceil(height / lightmapScale); + + for (let y = 0; y < lightmapHeight; y++) { + lightmap[y] = []; + nextLightmap[y] = []; + for (let x = 0; x < lightmapWidth; x++) { + lightmap[y][x] = { color: [0, 0, 0] }; + nextLightmap[y][x] = { color: [0, 0, 0] }; + } + } +} + +function deepCopy(source, target) { + for (let y = 0; y < source.length; y++) { + target[y] = []; + for (let x = 0; x < source[y].length; x++) { + target[y][x] = { ...source[y][x] }; + } + } +} + +function propagateLightmap() { + if (!lightmap || !lightmap[0]) { return; } + let width = lightmap[0].length; + let height = lightmap.length; + + let neighbors = [ + { dx: 1, dy: 0 }, + { dx: -1, dy: 0 }, + { dx: 0, dy: 1 }, + { dx: 0, dy: -1 }, + ]; + + for (let y = 0; y < height; y++) { + for (let x = 0; x < width; x++) { + let totalColor = [0, 0, 0]; + let neighborCount = 0; + neighbors.forEach(({ dx, dy }) => { + let nx = x + dx; + let ny = y + dy; + if (nx >= 0 && ny >= 0 && nx < width && ny < height) { + totalColor[0] += lightmap[ny][nx].color[0]; + totalColor[1] += lightmap[ny][nx].color[1]; + totalColor[2] += lightmap[ny][nx].color[2]; + neighborCount++; + } + }); + nextLightmap[y][x] = { + color: [ + Math.min(Math.max(0, totalColor[0] / neighborCount * 0.8), 255*8), + Math.min(Math.max(0, totalColor[1] / neighborCount * 0.8), 255*8), + Math.min(Math.max(0, totalColor[2] / neighborCount * 0.8), 255*8) + ] + }; + } + } + + deepCopy(nextLightmap, lightmap); +} + +function rgbToHsv(r, g, b) { + r /= 255, g /= 255, b /= 255; + let max = Math.max(r, g, b), min = Math.min(r, g, b); + let h, s, v = max; + + let d = max - min; + s = max === 0 ? 0 : d / max; + + if (max === min) { + h = 0; + } else { + switch (max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + h /= 6; + } + + return [h, s, v]; +} + +function hsvToRgb(h, s, v) { + let r, g, b; + + let i = Math.floor(h * 6); + let f = h * 6 - i; + let p = v * (1 - s); + let q = v * (1 - f * s); + let t = v * (1 - (1 - f) * s); + + switch (i % 6) { + case 0: r = v, g = t, b = p; break; + case 1: r = q, g = v, b = p; break; + case 2: r = p, g = v, b = t; break; + case 3: r = p, g = q, b = v; break; + case 4: r = t, g = p, b = v; break; + case 5: r = v, g = p, b = q; break; + } + + return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)]; +} + +function renderLightmap() { + if (!canvas) { return; } + if (!lightmap || !lightmap[0]) { return; } + let context = canvas.getContext('2d'); + let width = lightmap[0].length; + let height = lightmap.length; + + for (let y = 0; y < height; y++) { + for (let x = 0; x < width; x++) { + let { color } = lightmap[y][x]; + let [r, g, b] = color; + if (r > 0 || g > 0 || b > 0) { + let [h, s, v] = rgbToHsv(r, g, b); + let newColor = hsvToRgb(h, s, 1); + let alpha = v; + + context.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha*0.4})`; + context.fillRect( + x * pixelSize * lightmapScale, + y * pixelSize * lightmapScale, + pixelSize * lightmapScale, + pixelSize * lightmapScale + ); + context.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha * 0.25})`; + context.fillRect( + (x * pixelSize - pixelSizeHalf) * lightmapScale, + (y * pixelSize - pixelSizeHalf) * lightmapScale, + pixelSize * lightmapScale * 2, + pixelSize * lightmapScale * 2 + ); + } + } + } +} + +elements.sun.tick = function(pixel) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: sunColor }; +}; + +let originalLightTick = elements.light.tick; +elements.light.tick = function(pixel) { + originalLightTick(pixel); + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: lightColor }; +}; + +let originalLiquidLightTick = elements.liquid_light.tick; +elements.liquid_light.tick = function(pixel) { + originalLiquidLightTick(pixel); + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: lightColor }; +}; + +elements.magma.tick = function(pixel) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: fireColor }; +}; + +elements.neon.tick = function(pixel) { + if (!pixel.charge || pixel.charge <= 0) {return;} + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: neonColor }; +}; + +elements.light_bulb.behaviorOn = null +elements.light_bulb.tick = function(pixel) { + if (pixel.charge > 0) {pixel.lightIntensity = 10;} + if (pixel.lightIntensity > 0) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: lampColor }; + } + pixel.lightIntensity -= 1; +}; + +elements.led_r.tick = function(pixel) { + if (pixel.charge > 0) {pixel.lightIntensity = 4;} + if (pixel.lightIntensity > 0) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: ledRColor }; + } + pixel.lightIntensity -= 1; +}; + +elements.led_g.tick = function(pixel) { + if (pixel.charge > 0) {pixel.lightIntensity = 4;} + if (pixel.lightIntensity > 0) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: ledGColor }; + } + pixel.lightIntensity -= 1; +}; + +elements.led_b.tick = function(pixel) { + if (pixel.charge > 0) {pixel.lightIntensity = 4;} + if (pixel.lightIntensity > 0) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: ledBColor }; + } + pixel.lightIntensity -= 1; +}; + +let originalLaserTick = elements.laser.tick; +elements.laser.tick = function(pixel) { + originalLaserTick(pixel); + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: laserColor }; +}; + +let originalFireTick2 = elements.fire.tick; +elements.fire.tick = function(pixel) { + originalFireTick2(pixel); + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: fireColor }; +}; + +elements.cold_fire.tick = function(pixel) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: coldFireColor }; +}; + +elements.plasma.tick = function(pixel) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: plasmaColor }; +}; + +// Wait for loading +// if it loads too soon then width will be undefined +setTimeout(() => { initializeLightmap(width, height); }, 700); + +// Add code to functions instead of replacing them +let originalTick = tick; +tick = function() { + originalTick(); + if (!paused) {propagateLightmap();} +}; +// Even after updating tick(), setInterval still uses the old tick(), reset setInterval +resetInterval(tps); + +let originalDrawPixels = drawPixels; +drawPixels = function(forceTick = false) { + originalDrawPixels(forceTick); + renderLightmap(); +}; diff --git a/mods/lightmap.js b/mods/lightmap.js new file mode 100644 index 00000000..93ddcdf0 --- /dev/null +++ b/mods/lightmap.js @@ -0,0 +1,285 @@ +// Redbirdly's Mod that adds a better light system +// if the mod is too laggy, use fast_lightmap.js + +let lightmap = []; +let nextLightmap = []; +let lightmapWidth, lightmapHeight; +let pixelSizeQuarter = pixelSizeHalf / 2; +let lightmapScale = 2; + +// Define RGB colors +let lightColor = [255, 223, 186]; +let sunColor = [255*8, 210*8, 26*8]; +let lampColor = [255*4, 223*4, 186*4]; +let laserColor = [255, 0, 0]; +let ledRColor = [255, 0, 0]; +let ledGColor = [0, 255, 0]; +let ledBColor = [0, 0, 255]; +let fireColor = [255, 69, 0]; +let plasmaColor = [160, 69, 255]; +let coldFireColor = [0, 191, 255]; +let magmaColor = [255, 140, 0]; +let neonColor = [255*2, 60*2, 10*2]; + +function initializeLightmap(width, height) { + lightmapWidth = Math.ceil(width / lightmapScale); + lightmapHeight = Math.ceil(height / lightmapScale); + + for (let y = 0; y < lightmapHeight; y++) { + lightmap[y] = []; + nextLightmap[y] = []; + for (let x = 0; x < lightmapWidth; x++) { + lightmap[y][x] = { color: [0, 0, 0] }; + nextLightmap[y][x] = { color: [0, 0, 0] }; + } + } +} + +function deepCopy(source, target) { + for (let y = 0; y < source.length; y++) { + target[y] = []; + for (let x = 0; x < source[y].length; x++) { + target[y][x] = { ...source[y][x] }; + } + } +} + +function propagateLightmap() { + if (!lightmap || !lightmap[0]) { return; } + let width = lightmap[0].length; + let height = lightmap.length; + + let neighbors = [ + { dx: 1, dy: 0 }, + { dx: -1, dy: 0 }, + { dx: 0, dy: 1 }, + { dx: 0, dy: -1 }, + ]; + + for (let y = 0; y < height; y++) { + for (let x = 0; x < width; x++) { + let totalColor = [0, 0, 0]; + let neighborCount = 0; + neighbors.forEach(({ dx, dy }) => { + let nx = x + dx; + let ny = y + dy; + if (nx >= 0 && ny >= 0 && nx < width && ny < height) { + totalColor[0] += lightmap[ny][nx].color[0]; + totalColor[1] += lightmap[ny][nx].color[1]; + totalColor[2] += lightmap[ny][nx].color[2]; + neighborCount++; + } + }); + nextLightmap[y][x] = { + color: [ + Math.min(Math.max(0, totalColor[0] / neighborCount * 0.8), 255*8), + Math.min(Math.max(0, totalColor[1] / neighborCount * 0.8), 255*8), + Math.min(Math.max(0, totalColor[2] / neighborCount * 0.8), 255*8) + ] + }; + } + } + + deepCopy(nextLightmap, lightmap); +} + +function rgbToHsv(r, g, b) { + r /= 255, g /= 255, b /= 255; + let max = Math.max(r, g, b), min = Math.min(r, g, b); + let h, s, v = max; + + let d = max - min; + s = max === 0 ? 0 : d / max; + + if (max === min) { + h = 0; + } else { + switch (max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + h /= 6; + } + + return [h, s, v]; +} + +function hsvToRgb(h, s, v) { + let r, g, b; + + let i = Math.floor(h * 6); + let f = h * 6 - i; + let p = v * (1 - s); + let q = v * (1 - f * s); + let t = v * (1 - (1 - f) * s); + + switch (i % 6) { + case 0: r = v, g = t, b = p; break; + case 1: r = q, g = v, b = p; break; + case 2: r = p, g = v, b = t; break; + case 3: r = p, g = q, b = v; break; + case 4: r = t, g = p, b = v; break; + case 5: r = v, g = p, b = q; break; + } + + return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)]; +} + +function renderLightmap() { + if (!canvas) { return; } + if (!lightmap || !lightmap[0]) { return; } + let context = canvas.getContext('2d'); + let width = lightmap[0].length; + let height = lightmap.length; + + for (let y = 0; y < height; y++) { + for (let x = 0; x < width; x++) { + let { color } = lightmap[y][x]; + let [r, g, b] = color; + if (r > 0 || g > 0 || b > 0) { + let [h, s, v] = rgbToHsv(r, g, b); + let newColor = hsvToRgb(h, s, 1); + let alpha = v; + + context.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha*0.4})`; + context.fillRect( + x * pixelSize * lightmapScale, + y * pixelSize * lightmapScale, + pixelSize * lightmapScale, + pixelSize * lightmapScale + ); + context.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha * 0.25})`; + context.fillRect( + (x * pixelSize - pixelSizeHalf) * lightmapScale, + (y * pixelSize - pixelSizeHalf) * lightmapScale, + pixelSize * lightmapScale * 2, + pixelSize * lightmapScale * 2 + ); + } + } + } +} + +elements.sun.tick = function(pixel) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: sunColor }; +}; + +let originalLightTick = elements.light.tick; +elements.light.tick = function(pixel) { + originalLightTick(pixel); + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: lightColor }; +}; + +let originalLiquidLightTick = elements.liquid_light.tick; +elements.liquid_light.tick = function(pixel) { + originalLiquidLightTick(pixel); + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: lightColor }; +}; + +elements.magma.tick = function(pixel) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: fireColor }; +}; + +elements.neon.tick = function(pixel) { + if (!pixel.charge || pixel.charge <= 0) {return;} + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: neonColor }; +}; + +elements.light_bulb.behaviorOn = null +elements.light_bulb.tick = function(pixel) { + if (pixel.charge > 0) {pixel.lightIntensity = 10;} + if (pixel.lightIntensity > 0) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: lampColor }; + } + pixel.lightIntensity -= 1; +}; + +elements.led_r.tick = function(pixel) { + if (pixel.charge > 0) {pixel.lightIntensity = 4;} + if (pixel.lightIntensity > 0) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: ledRColor }; + } + pixel.lightIntensity -= 1; +}; + +elements.led_g.tick = function(pixel) { + if (pixel.charge > 0) {pixel.lightIntensity = 4;} + if (pixel.lightIntensity > 0) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: ledGColor }; + } + pixel.lightIntensity -= 1; +}; + +elements.led_b.tick = function(pixel) { + if (pixel.charge > 0) {pixel.lightIntensity = 4;} + if (pixel.lightIntensity > 0) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: ledBColor }; + } + pixel.lightIntensity -= 1; +}; + +let originalLaserTick = elements.laser.tick; +elements.laser.tick = function(pixel) { + originalLaserTick(pixel); + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: laserColor }; +}; + +let originalFireTick2 = elements.fire.tick; +elements.fire.tick = function(pixel) { + originalFireTick2(pixel); + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: fireColor }; +}; + +elements.cold_fire.tick = function(pixel) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: coldFireColor }; +}; + +elements.plasma.tick = function(pixel) { + let x = Math.floor(pixel.x / lightmapScale); + let y = Math.floor(pixel.y / lightmapScale); + lightmap[y][x] = { color: plasmaColor }; +}; + +// Wait for loading +// if it loads too soon then width will be undefined +setTimeout(() => { initializeLightmap(width, height); }, 700); + +// Add code to functions instead of replacing them +let originalTick = tick; +tick = function() { + originalTick(); + if (!paused) {propagateLightmap();} +}; +// Even after updating tick(), setInterval still uses the old tick(), reset setInterval +resetInterval(tps); + +let originalDrawPixels = drawPixels; +drawPixels = function(forceTick = false) { + originalDrawPixels(forceTick); + renderLightmap(); +}; From e5d1d38d3cb6c15ef4b99646a1412c58cd348e02 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Mon, 27 May 2024 11:36:56 -0400 Subject: [PATCH 02/25] yah --- mod-list.html | 1 + mods/funnynames.js | 178 +++++++++++++++++++++++++++++++++++++++++++++ mods/subspace.js | 10 +++ 3 files changed, 189 insertions(+) create mode 100644 mods/subspace.js diff --git a/mod-list.html b/mod-list.html index e89a809a..0a9f3b8b 100644 --- a/mod-list.html +++ b/mod-list.html @@ -301,6 +301,7 @@
Try our NEW GAME: Infinite Chef
From 376cc1581847e455036d7711ebe1561c37edbd1b Mon Sep 17 00:00:00 2001 From: F3ZZ0 <168129449+F3ZZ0@users.noreply.github.com> Date: Wed, 29 May 2024 11:53:14 +0100 Subject: [PATCH 09/25] Update morepowders.js --- mods/morepowders.js | 232 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 179 insertions(+), 53 deletions(-) diff --git a/mods/morepowders.js b/mods/morepowders.js index 2925f699..cf6bdb83 100644 --- a/mods/morepowders.js +++ b/mods/morepowders.js @@ -1,12 +1,5 @@ -elements.template = { - color: "#ffffff", - category: "more_powders", - state: "solid", - hidden: true, - behavior: behaviors.POWDER - } elements.powder = { - color: ["#c17d17", "#f2a32e"], + color: ["#786d6d", "#968888"], behavior: behaviors.POWDER, category: "more_powders", state: "solid", @@ -15,12 +8,11 @@ elements.powder = { "foam": { elem1: "foam_powder", elem2: "foam_powder" }, "electric": { elem1: null, elem2: "electric_powder" }, "dust": { elem1: null, elem2: "void_powder" }, + "grenade": { elem1: null, elem2: "powder_nuke" }, + "dna": { elem1: null, elem2: "alive_powder" }, + "fire": { elem1: null, elem2: "fire_powder" }, + "cold_fire": { elem1: null, elem2: "cold_fire_powder" }, }, - stateHigh: "smoke", -tempHigh: 200, -tempLow: -200, -stateLow: "cold_powder", -stateHigh: "hot_powder", } elements.gas_powder = { color: "#b98ffc", @@ -31,17 +23,30 @@ stateHigh: "smoke", tempHigh: 2000, reactions: { "up_powder": { elem1: null, elem2: "up_gas_powder" }, + "grenade": { elem1: null, elem2: "gas_powder_nuke" }, }, tempLow: -200, stateLow: "powder", } elements.up_powder = { - color: "#8ffcb9", + color: ["#8ffcb9", "#71cac5"], behavior: behaviors.AGPOWDER, category: "more_powders", state: "solid", tempLow: -200, stateLow: "powder", +reactions: { + "grenade": { elem1: null, elem2: "up_powder_nuke" }, +}, +breakInto: "up_powder_shard", +}, +elements.up_powder_shard = { + color: ["#54a59b", "#408792"], + behavior: behaviors.POWDER, + category: "more_powders", +state: "solid", +tempLow: -200, +stateLow: "up_powder", }, elements.up_gas_powder = { color: ["#a2c5da", "#a0a7d8"], @@ -68,6 +73,7 @@ tempHigh: 2000, reactions: { "gas_powder": { elem1: null, elem2: "slow_gas_powder" }, "up_powder": { elem1: null, elem2: "slow_up_powder" }, + "grenade": { elem1: null, elem2: "slow_powder_nuke" }, }, tempLow: -200, stateLow: "powder", @@ -142,20 +148,11 @@ elements.sticky_powder = { 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|LB:electric%5|SH", "SH AND M2|SH AND M1|SH AND M2", ], category: "more_powders", @@ -168,34 +165,6 @@ elements.sticky_powder = { 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", @@ -206,4 +175,161 @@ elements.sticky_powder = { "DL|XX|DL", "DL AND M2|DL AND M1|DL AND M2", ] - } \ No newline at end of file + } + elements.powder_nuke = { + color: "#46745d", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1 AND EX:25>powder|XX", + ], + category: "more_powders", + state: "solid", + hidden:true, + excludeRandom: true + } + elements.gas_powder_nuke = { + color: "#406a6a", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|M1 AND EX:25>gas_powder|XX", + ], + category: "more_powders", + state: "gas", + hidden:true, + excludeRandom: true + } + elements.up_powder_nuke = { + color: "#688686", + behavior: [ + "XX|M1 AND EX:25>up_powder|XX", + "XX|XX|XX", + "XX|XX|XX", + ], + category: "more_powders", + state: "solid", + hidden:true, + excludeRandom: true + } + elements.slow_powder_nuke = { + color: "#746262", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "M1%20|M1%20 AND EX:22>slow_powder|M1%20", + ], + category: "more_powders", + state: "solid", + hidden:true, + excludeRandom: true + } + elements.rainbow_powder = { + color: ["#ff0000","#ff8800","#ffff00","#00ff00","#00ffff","#0000ff","#ff00ff"], + tick: function(pixel) { + var t = pixelTicks+pixel.x+pixel.y; + var r = Math.floor(127*(1-Math.cos(t*Math.PI/90))); + var g = Math.floor(127*(1-Math.cos(t*Math.PI/90+2*Math.PI/3))); + var b = Math.floor(127*(1-Math.cos(t*Math.PI/90+4*Math.PI/3))); + pixel.color = "rgb("+r+","+g+","+b+")"; + }, + behavior: behaviors.POWDER, + category: "more_powders", + state: "solid", + breakInto: "static", + } + elements.alive_powder = { + color: ["#f74177", "#f78177"], + behavior: behaviors.CRAWLER, + category: "more_powders", + state: "solid", + stateHigh: "smoke", + tempHigh: 100, + tempLow: -250, + stateLow: "frozen_meat", + stateHigh: "cooked_powder", + } + elements.cooked_powder = { + color: ["#b53811", "#b54211"], + behavior: behaviors.POWDER, + category: "more_powders", + state: "solid", + stateHigh: "smoke", + tempHigh: 400, + tempLow: -250, + stateLow: "frozen_meat", + stateHigh: "smoke", + } + elements.fire_powder = { + color: ["#c07d5d", "#c23000", "#c0521b"], + behavior: [ + "XX|CR:fire%2|XX", + "XX|LB:fire%4|XX", + "M2|M1|M2", + ], + category: "more_powders", + state: "solid", + density: 997, + conduct: 0.02, + stain: -0.5, + temp:218, + tempLow: -250, + stateLow: "coldfire_powder", + } + elements.coldfire_powder = { + color: ["#004fbd", "#138fb9", "#00b8b1"], + behavior: [ + "XX|CR:cold_fire%2|XX", + "XX|LB:cold_fire%4|XX", + "M2|M1|M2", + ], + category: "more_powders", + state: "solid", + density: 997, + conduct: 0.02, + stain: -0.5, + temp:-104, + tempHigh: 250, + stateHigh: "fire_powder", + } + elements.left_powder = { + color: "#645bb0", + behavior:[ + "M2|XX|XX", + "M1|XX|XX", + "M2|XX|XX", + ], + category: "more_powders", + state: "solid", + } + elements.right_powder = { + color: "#b95b5b", + behavior:[ + "XX|XX|M2", + "XX|XX|M1", + "XX|XX|M2", + ], + category: "more_powders", + state: "solid", + } + elements.color_powder = { + color: ["#6b2e2e","#6b4f2e","#6b6b2e","#2e6b2e","#2e6b6b","#2e2e6b","#6b2e6b"], + behavior: behaviors.POWDER, + category: "more_powders", + state: "solid", + density: 1.977, + customColor: true + } + worldgentypes.powder_world = { + layers: [ + [0.95, "sticky_powder"], + [0.50, "powder"], + [0.25, "slow_up_powder"], + [0.15, "slower_up_powder"], + ], + decor: [ // [element, chance, distance from top] + ["alive_powder", 0.08], + // ["alive_powder", 0.025, 10], + ], + baseHeight: 0.35 + } From eec758813e6adb7477ca047b2aeb73874697dcc6 Mon Sep 17 00:00:00 2001 From: F3ZZ0 <168129449+F3ZZ0@users.noreply.github.com> Date: Wed, 29 May 2024 11:53:48 +0100 Subject: [PATCH 10/25] morepowders.js This mod adds loads of powders for you to discover!... or just be lazy and press unlock all From d7854e678f16c0059f2d9f26473c582e5ed33534 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Wed, 29 May 2024 17:12:02 -0400 Subject: [PATCH 11/25] pistons --- mods/nousersthings.js | 116 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 1 deletion(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index 6bf1b6e0..b519761d 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -3004,4 +3004,118 @@ elements.channel_pipe.desc = "Channel pipe. Only passes elements to pipes of the elements.bridge_pipe.desc = "Bridge pipe. Can pass and receive from any other type of pipe." elements.ray_emitter.desc = "Emits a ray of the specified element in the opposite direction it was shocked from." elements.specific_ray_emitter.desc = "Emits a ray of the specified element in a specific direction and a specific length." -elements.blackhole_storage.desc = "Stores elements inside of itself. Can be released by shocking it." \ No newline at end of file +elements.blackhole_storage.desc = "Stores elements inside of itself. Can be released by shocking it." +let pullOrPush = 1 +elements.piston_ray_emitter = { + color: "#143b5f", + behavior: behaviors.WALL, + category: "machines", + movable: false, + onSelect: function(){ + var ans1 = prompt("Would you like this piston to pull or push?", "pull").toLowerCase(); + if (ans1 == "pull"){pullOrPush = 1} + else if (ans1 == "push"){pullOrPush = 2} + }, + tick: function(pixel){ + if (pixelTicks == pixel.start){ + pixel.pullOrPush = pullOrPush + } + if (!pixel.cooldown){pixel.cooldown = 0} + if (pixel.cooldown < 1){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = squareCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y, true)){ + if (pixelMap[x][y].charge && (pixelMap[x][y].element == "wire" || pixelMap[x][y].element == "insulated_wire")){ + pixel.cooldown = 6 + var dir = [0-squareCoords[i][0], 0-squareCoords[i][1]] + var startx = pixel.x+dir[0] + var starty = pixel.y+dir[1] + var magnitude = 0 + if (width > height){magnitude = width} else {magnitude = height} + var endx = startx+(magnitude*dir[0]) + var endy = starty+(magnitude*dir[1]) + // console.log("Direction seems to be " + dir) + var jcoords + if (pixel.pullOrPush == 1){jcoords = lineCoords(startx, starty, endx, endy, 1)} + else {jcoords = lineCoords(endx, endy, startx, starty, 1)} + + // console.log(startx + " is the starting x, " + starty + " is the starting y, " + endx + " is the ending x, " + endy + " is the ending y. Result is " + jcoords) + let pCoord = jcoords[0] + for (var j = 0; j < jcoords.length; j++) { + var lcoord = jcoords[j]; + var lx = lcoord[0]; + var ly = lcoord[1]; + if (!isEmpty(lx, ly, true)){ + tryMove(pixelMap[lx][ly], pCoord[0], pCoord[1]) + } + pCoord[0] = lx; + pCoord[1] = ly; + } + } + } + }} else {pixel.cooldown -= 1} + }, + insulate: true, +} +let pistonStart = 0 +let pistonEnd = 0 +elements.specific_piston_ray_emitter = { + color: "#517597", + behavior: behaviors.WALL, + category: "machines", + movable: false, + onSelect: function(){ + var ans1 = prompt("Would you like this piston to pull or push?", "pull").toLowerCase(); + if (ans1 == "pull"){pullOrPush = 1} + else if (ans1 == "push"){pullOrPush = 2} + var ans2 = parseInt(prompt("How offset should the start of the push/pulling be?", "0")) + pistonStart = ans2 + var ans3 = parseInt(prompt("How offset should the end of the push/pulling be?", "20")) + pistonEnd = ans3 + }, + tick: function(pixel){ + if (pixelTicks == pixel.start){ + pixel.pullOrPush = pullOrPush + pixel.pistonStart = pistonStart + pixel.pistonEnd = pistonEnd + } + if (!pixel.cooldown){pixel.cooldown = 0} + if (pixel.cooldown < 1){ + for (var i = 0; i < adjacentCoords.length; i++) { + var coord = squareCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (!isEmpty(x,y, true)){ + if (pixelMap[x][y].charge && (pixelMap[x][y].element == "wire" || pixelMap[x][y].element == "insulated_wire")){ + pixel.cooldown = 6 + var dir = [0-squareCoords[i][0], 0-squareCoords[i][1]] + var startx = pixel.x+(dir[0]*pixel.pistonStart) + var starty = pixel.y+(dir[1]*pixel.pistonStart) + var magnitude = pixel.pistonEnd + var endx = startx+(magnitude*dir[0]) + var endy = starty+(magnitude*dir[1]) + // console.log("Direction seems to be " + dir) + var jcoords + if (pixel.pullOrPush == 1){jcoords = lineCoords(startx, starty, endx, endy, 1)} + else {jcoords = lineCoords(endx, endy, startx, starty, 1)} + + // console.log(startx + " is the starting x, " + starty + " is the starting y, " + endx + " is the ending x, " + endy + " is the ending y. Result is " + jcoords) + let pCoord = jcoords[0] + for (var j = 0; j < jcoords.length; j++) { + var lcoord = jcoords[j]; + var lx = lcoord[0]; + var ly = lcoord[1]; + if (!isEmpty(lx, ly, true)){ + tryMove(pixelMap[lx][ly], pCoord[0], pCoord[1]) + } + pCoord[0] = lx; + pCoord[1] = ly; + } + } + } + }} else {pixel.cooldown -= 1} + }, + insulate: true, +} \ No newline at end of file From e96a0da89b00e5fbb446060a5a945f4b7c589832 Mon Sep 17 00:00:00 2001 From: voidapex11 <154328367+voidapex11@users.noreply.github.com> Date: Thu, 30 May 2024 10:58:10 +0100 Subject: [PATCH 12/25] Update pullers.js --- mods/pullers.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/pullers.js b/mods/pullers.js index 1f88c621..085871ed 100644 --- a/mods/pullers.js +++ b/mods/pullers.js @@ -2,6 +2,10 @@ // a sandboxels mod that adds pullers /* ==CHANGELOG== + Version 2.0.1 +@voidapex11 +~fixed name of mods category + Version 2.0.0 @voidapex11 ~set max size of the mod description to 1 @@ -47,7 +51,7 @@ pullerColour = '#e0adb6' elements.pullersDesc = { color: pullerColour, name: 'pullers.js', - category: "mods", + category: "Mods", behavior: behaviors.SELFDELETE, tool: function(pixel) {}, onSelect: function(pixel) { From 4dd883748e410397b10f296a46730edb081697f9 Mon Sep 17 00:00:00 2001 From: moss <146470829+electric-moss@users.noreply.github.com> Date: Thu, 30 May 2024 17:50:49 +0200 Subject: [PATCH 13/25] made freeze ray more official --- mods/mossstuff.js | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/mods/mossstuff.js b/mods/mossstuff.js index 72336bd3..fcd89e9e 100644 --- a/mods/mossstuff.js +++ b/mods/mossstuff.js @@ -1,37 +1,5 @@ - -elements.freeze_ray = { - color: ["#8cf9ff","#5c59ff"], - tick: function(pixel) { - var x = pixel.x; - for (var y = pixel.y; y < height; y++) { - if (outOfBounds(x, y)) { - break; - } - if (isEmpty(x, y)) { - if (Math.random() > 0.05) { continue } - createPixel("flash", x, y); - pixelMap[x][y].color = "#96b6ff"; - pixelMap[x][y].temp = -257; - } - else { - if (elements[pixelMap[x][y].element].isGas) { continue } - if (elements[pixelMap[x][y].element].id === elements.heat_ray.id) { break } - pixelMap[x][y].temp -= 100; - pixelTempCheck(pixelMap[x][y]); - break; - } - } - deletePixel(pixel.x, pixel.y); - }, - temp: -257, - category: "energy", - state: "gas", - excludeRandom: true, - noMix: true -}; - elements.devil_ray = { color: ["#ba0000","#8f0000"], tick: function(pixel) { @@ -2330,4 +2298,4 @@ elements.yogurt.reactions.currant = { elem1: "fruit_yogurt", elem2: null } /* uhhhh i just finished changing every color in the mod and now i have enough hex codes for a lifetime oh god i added like 2 million new fruits -*/ \ No newline at end of file +*/ From 016ea71f45586d0a8321eb3eaad2157fc115e1c2 Mon Sep 17 00:00:00 2001 From: moss <146470829+electric-moss@users.noreply.github.com> Date: Fri, 31 May 2024 11:24:21 +0200 Subject: [PATCH 14/25] made mod not.. duplicate spontaneously? --- mods/pizzasstuff.js | 342 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 323 insertions(+), 19 deletions(-) diff --git a/mods/pizzasstuff.js b/mods/pizzasstuff.js index 279bebdc..fe9f6ae8 100644 --- a/mods/pizzasstuff.js +++ b/mods/pizzasstuff.js @@ -1,6 +1,10 @@ +/*addMod("mossstuff.js"); removeMod("pizzasstuff.js"); -addMod("mossstuff.js"); -reload(); + +reload(); */ + +alert("THIS MOD IS NO LONGER SUPPORTED!\nThe mod 'pizzasstuff.s' and all of its contents have been moved to mossstuff.js.\nPlease install mossstuff.js to continue getting updates."); + elements.freeze_ray = { color: ["#8cf9ff","#5c59ff"], @@ -71,6 +75,12 @@ elements.beer = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 100, + stateHigh: ["fire","steam","steam"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.root_beer = { @@ -79,6 +89,12 @@ elements.root_beer = { category: "food", state: "solid", hidden: "TRUE", + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + tempHigh: 100, + stateHigh: ["fire","steam","steam"], + isFood: true, }; elements.fruit_slushy = { @@ -90,6 +106,12 @@ elements.fruit_slushy = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 100, + stateHigh: ["fire","steam","steam"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.mold = { @@ -98,6 +120,11 @@ elements.mold = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], }; elements.chocolate_slushy = { @@ -109,6 +136,12 @@ elements.chocolate_slushy = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 100, + stateHigh: ["fire","steam","steam"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.chocolate_sauce = { @@ -118,6 +151,12 @@ elements.chocolate_sauce = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.chocolate_ice_cream = { @@ -130,6 +169,7 @@ elements.chocolate_ice_cream = { tempHigh: 15, stateHigh: "cream", temp: 0, + isFood: true, }; elements.fruit_ice_cream = { @@ -142,6 +182,7 @@ elements.fruit_ice_cream = { tempHigh: 15, stateHigh: "cream", temp: 0, + isFood: true, }; elements.snow_cone = { @@ -154,6 +195,7 @@ elements.snow_cone = { tempHigh: 15, stateHigh: "smashed_ice", temp: 0, + isFood: true, }; elements.mint_ice_cream = { @@ -167,6 +209,7 @@ elements.mint_ice_cream = { tempHigh: 15, stateHigh: "cream", temp: 0, + isFood: true, reactions: { "chocolate": { elem1: "mint_chocolate_ice_cream", elem2: null }, } @@ -182,6 +225,7 @@ elements.mint_chocolate_ice_cream = { tempHigh: 15, stateHigh: "cream", temp: 0, + isFood: true, }; @@ -193,7 +237,10 @@ elements.chocolate_yogurt = { state: "solid", hidden: "TRUE", tempLow: 0, + stateHigh: ["fire","steam","steam"], + tempHigh: 450, stateLow: "frozen_chocolate_yogurt", + isFood: true, }; elements.fruit_yogurt = { @@ -205,6 +252,9 @@ elements.fruit_yogurt = { hidden: "TRUE", tempLow: 0, stateLow: "frozen_fruit_yogurt", + isFood: true, + stateHigh: ["fire","steam","steam"], + tempHigh: 450, }; elements.frozen_fruit_yogurt = { @@ -218,6 +268,7 @@ elements.frozen_fruit_yogurt = { tempHigh: 0, stateHigh: "fruit_yogurt", temp: 0, + isFood: true, }; elements.frozen_chocolate_yogurt = { @@ -231,6 +282,7 @@ elements.frozen_chocolate_yogurt = { tempHigh: 0, stateHigh: "chocolate_yogurt", temp: 0, + isFood: true, }; elements.frying_oil = { @@ -243,7 +295,13 @@ elements.frying_oil = { "potato": { elem1: null, elem2: "fries" }, "advanced_dough": { elem1: null, elem2: "churros" }, "snow": { elem1: null, elem2: "fried_snow" }, - } + }, + tempHigh: 350, + stateHigh: ["fire","steam","steam"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.chicken_nuggets = { @@ -252,6 +310,12 @@ elements.chicken_nuggets = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.advanced_dough = { @@ -273,6 +337,11 @@ elements.fries = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], }; elements.fried_snow = { @@ -281,6 +350,12 @@ elements.fried_snow = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.battery_acid = { @@ -289,6 +364,12 @@ elements.battery_acid = { category: "machines", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["steam","dioxin","stench"], + burn:3, + burnTime:500, + burnInto: ["steam","dioxin","stench"], + isFood: true, }; @@ -298,6 +379,11 @@ elements.steampunk_pancakes = { category: "machines", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], //I have no idea why i added this, but when i removed it and started the mod, the mod removed itself. Words can't explain my fucking confusion. }; @@ -308,6 +394,11 @@ elements.churros = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], reactions: { "chocolate": { elem1: "chocolate_churros", elem2: null }, "chocolate_sauce": { elem1: "chocolate_churros", elem2: null }, @@ -320,8 +411,27 @@ elements.chocolate_churros = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], }; +/*elements.color_pick = { + color: ["#ff0000","#ffd100","#00ff4b","#0005ff"], + behavior: [ + "CF|CF|CF", + "CF|DL%5|CF", + "CF|CF|CF", + ], + category: "tools", + maxSize: 0, + darkText: true, + canPlace: false, + desc: "Use on a pixel to select its element." +};*/ + elements.croissant = { color: ["#c68028","#ad7023","#905c1b","#794d16","#674112"], behavior: behaviors.POWDER, @@ -361,6 +471,12 @@ elements.rose_sauce = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.seasoning = { @@ -369,6 +485,12 @@ elements.seasoning = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.parmesan = { @@ -376,6 +498,12 @@ elements.parmesan = { behavior: behaviors.POWDER, category: "food", state: "solid", + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.baking_powder = { @@ -386,6 +514,12 @@ elements.baking_powder = { reactions: { "flour": { elem1: null, elem2: "advanced_dough" }, }, + tempHigh: 350, + stateHigh: ["fire","fire","ash"], + burn:3, + burnTime:500, + burnInto: ["fire","smoke","smoke","steam","ash"], + isFood: true, }; elements.smashed_ice = { @@ -687,6 +821,7 @@ elements.cherry = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: "#450008", reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#bf4545","#982828"] }, @@ -701,6 +836,7 @@ elements.strawberry = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#bf0147","#c61548","#cc2857","#c62354","#c11848"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#a82953","#941540"] }, @@ -715,6 +851,7 @@ elements.apple = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#ffda69","#ffdb84"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#f4ff49","#ffec2f"] }, @@ -729,6 +866,7 @@ elements.green_apple = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#ffda69","#ffdb84"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#f4ff49","#ffec2f"] }, @@ -744,6 +882,7 @@ elements.orange = { breakIntoColor: ["#ffc659","#ffb646","#ffa700","#ff8d00"], tempHigh: 256, stateHigh: "steam", + isFood: true, reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#fbd808","#ff9005"] }, } @@ -757,6 +896,7 @@ elements.kiwi = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#a9c77e","#bad98f"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#a5d04c","#bbdc79"] }, @@ -771,6 +911,7 @@ elements.blueberry = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#8abeee","#8aacf4","#9591ee","#787fdb","#7c74ce"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#5086c1","#5076b0"] }, @@ -785,6 +926,7 @@ elements.plum = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#bf66c9","#d499db","#eacced"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#d8b2d8","#b266b2"] }, @@ -799,6 +941,7 @@ elements.blackberry = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#a941a1","#ba59b2","#c570bf"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ba59b2","#c570bf"] }, @@ -813,6 +956,7 @@ elements.peach = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#fce5b8","#fcdab8","#fccfb8"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffe7dc","#ffdac8"] }, @@ -827,6 +971,7 @@ elements.lemon = { breakInto: "juice", tempHigh: 256, stateHigh: "steam", + isFood: true, breakIntoColor: ["#f8ff80","#f6ff6c","#f5ff57","#f3ff39","#f0ff00"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffffd8","#fffecf"] }, @@ -842,6 +987,7 @@ elements.green_grape = { breakIntoColor: ["#5f8536","#7ba84a"], tempHigh: 256, stateHigh: "steam", + isFood: true, reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ecffdc","#c3ffa8"] }, } @@ -852,6 +998,9 @@ elements.banana = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: "#f0f060", reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#fdf8d6","#f9efa6"] }, @@ -864,6 +1013,9 @@ elements.blood_orange = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ff4600","#ff8353"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffc7b4","#ffa485"] }, @@ -876,6 +1028,9 @@ elements.canary_melon = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ffff9e","#fffcaa"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#e5ffb3","#ecff9c"] }, @@ -888,6 +1043,9 @@ elements.honeydew_melon = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#e9ffa3","#f9ffa3"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#e8ffc9","#e8ffc8"] }, @@ -900,6 +1058,9 @@ elements.cranberry = { category: "food", state: "solid", breakInto: "sauce", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ba4242","#7a1717"], reactions: { "soda": { elem1: null, elem2: "sprite_cranberry" }, @@ -913,6 +1074,9 @@ elements.pitaya = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ff84ae","#ffafca"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffd4e3","#ffafca"] }, @@ -925,6 +1089,9 @@ elements.coconut = { category: "food", state: "solid", breakInto: "milk", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#f7e5d8","#fdefe5","#fff7f1"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#fff2db","#ffefd4"] }, @@ -937,6 +1104,9 @@ elements.cloudberry = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ffe1c7","#fff9f3"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffd7ab","#ffcb93"] }, @@ -949,6 +1119,9 @@ elements.crabapple = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ff8fcf","#ffb2de"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffd2ec","#ffb2de"] }, @@ -961,6 +1134,9 @@ elements.cactus_fruit = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#75d802","#72d202"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#bbffc1","#84ff90"] }, @@ -973,6 +1149,9 @@ elements.pear = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#c8e39e","#99cc99"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#c3ff9c","#bcff92"] }, @@ -985,6 +1164,9 @@ elements.purpleberry = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#c08cc3","#e49cc2"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#fee6e4","#fbc3c4"] }, @@ -997,6 +1179,9 @@ elements.yellowberry = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#fffec8","#fffdaf"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#fffec8","#fffdaf"] }, @@ -1009,6 +1194,9 @@ elements.pomegranate = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ee717f","#e94254"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#f4a1a9","#ee717f"] }, @@ -1021,6 +1209,9 @@ elements.guava = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ff5a76","#ff8fa2"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#f6c8cd","#f2acb5"] }, @@ -1033,6 +1224,9 @@ elements.raspberry = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#f23a72","#fb79a0"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffb1f4","#ff91ce"] }, @@ -1045,6 +1239,9 @@ elements.gooseberry = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#8b0031","#920436"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#f1ffdb","#e3ffb7"] }, @@ -1057,6 +1254,9 @@ elements.fig = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ff4a4a","#ea3838"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ff8d8d","#ffabab"] }, @@ -1069,6 +1269,9 @@ elements.durian = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#faffaf","#fbffbf"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#feffe7","#f9ffb3"] }, @@ -1081,6 +1284,9 @@ elements.passionfruit = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ffdede","#ffe4e4"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#d8adce","#c485b6"] }, @@ -1093,6 +1299,9 @@ elements.starfruit = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#f2d553","#f5dd75"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#faeeba","#f7e698"] }, @@ -1105,6 +1314,9 @@ elements.rambutan = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#faffaf","#fbffbf"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#fde0e0","#f4c1c1"] }, @@ -1117,6 +1329,9 @@ elements.nance = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ffff66","#ffff99"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#fffee0","#fffec8"] }, @@ -1129,6 +1344,9 @@ elements.nectarine = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ffbd8b","#ffdbc0"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#ffc3ad","#ffa584"] }, @@ -1141,6 +1359,9 @@ elements.loganberry = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ff8f8f","#ffb7b7"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#9c91a5","#bdb5c3"] }, @@ -1153,6 +1374,9 @@ elements.currant = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#ff878f","#ffbcc0"], reactions: { "sugar": { elem1: "jelly", elem2: null, tempMin: 100, color1: ["#cc6b69","#bb3a37"] }, @@ -1175,6 +1399,9 @@ elements.mint = { behavior: behaviors.STURDYPOWDER, category: "food", state: "solid", + tempHigh: 256, + stateHigh: "steam", + isFood: true, reactions: { "cream": { elem1: null, elem2: "toorhpaste" }, "ice_cream": { elem1: null, elem2: "mint_ice_cream" }, @@ -1187,6 +1414,9 @@ elements.broccoli = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#00b215","#0b8500"], }; @@ -1217,6 +1447,9 @@ elements.hot_pepper = { behavior: behaviors.POWDER, category: "food", state: "solid", + tempHigh: 256, + stateHigh: "steam", + isFood: true, reactions: { "sauce": { elem1: null, elem2: "hot_sauce" }, } @@ -1236,6 +1469,9 @@ elements.squash = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#efbe79","#ffd599"], }; @@ -1245,6 +1481,9 @@ elements.zuchinni = { category: "food", state: "solid", breakInto: "juice", + tempHigh: 256, + stateHigh: "steam", + isFood: true, breakIntoColor: ["#80a568","#a3c88c"], }; @@ -1254,6 +1493,9 @@ elements.olive = { category: "food", state: "solid", breakInto: "olive_oil", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.eggplant = { @@ -1263,6 +1505,9 @@ elements.eggplant = { state: "solid", breakInto: "juice", breakIntoColor: ["#674ea7","#351c75"], + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.onion = { @@ -1276,6 +1521,9 @@ elements.onion = { category: "food", state: "solid", breakInto: ["stench", null, null, null, null], + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.cinnamon = { @@ -1283,6 +1531,9 @@ elements.cinnamon = { behavior: behaviors.STURDYPOWDER, category: "food", state: "solid", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.garlic = { @@ -1291,6 +1542,9 @@ elements.garlic = { category: "food", state: "solid", breakInto: "garlic_clove", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.garlic_clove = { @@ -1299,6 +1553,9 @@ elements.garlic_clove = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.carrot = { @@ -1312,6 +1569,9 @@ elements.carrot = { burnTime: 300, breakInto: "juice", breakIntoColor: "#f1b956", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.asparagus = { @@ -1327,6 +1587,9 @@ elements.asparagus = { burnTime: 300, breakInto: "juice", breakIntoColor: "#c9ddbb", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.roasted_asparagus = { @@ -1343,6 +1606,9 @@ elements.roasted_asparagus = { burnInto: "ash", burn: 20, burnTime: 300, + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.oreo = { @@ -1350,6 +1616,9 @@ elements.oreo = { behavior: behaviors.STURDYPOWDER, category: "food", state: "solid", + tempHigh: 256, + stateHigh: "steam", + isFood: true, reactions: { "toorhpaste": { elem1: "poison_oreo", elem2: null }, } @@ -1361,6 +1630,9 @@ elements.poison_oreo = { category: "food", state: "solid", hidden: "TRUE", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.sprinkles = { @@ -1368,6 +1640,9 @@ elements.sprinkles = { behavior: behaviors.POWDER, category: "food", state: "solid", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.whipped_cream = { @@ -1378,9 +1653,7 @@ elements.whipped_cream = { hidden: "TRUE", tempHigh: 130, stateHigh: "steam", - reactions: { - "coffee": { elem1: null, elem2: "cream_coffee" }, - } + isFood: true, }; elements.olive_oil = { @@ -1391,18 +1664,9 @@ elements.olive_oil = { state: "liquid", burn: 10, burnTime: 300, -}; - -elements.cream_coffee = { - color: ["#dbc1ac","#967259","#634832"], - behavior: behaviors.LIQUID, - category: "food", - state: "solid", - hidden: "TRUE", - tempLow: 0, - stateLow: "coffee_ice", - tempHigh: 130, - stateHigh: ["steam","fragrance"], + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.seafoam = { @@ -1417,6 +1681,9 @@ elements.pipis = { behavior: behaviors.POWDER, category: "life", state: "solid", + tempHigh: 256, + stateHigh: "steam", + isFood: true, }; elements.frog_bomb = { @@ -1490,6 +1757,39 @@ elements.holy_hand_grenade = { cooldown: defaultCooldown }, +elements.unholy_feet_bomb = { + color: ["#661a0e","#6b1f13","#803226"], + behavior: [ + "XX|EX:20>curse,fire%1|XX", + "XX|XX|XX", + "M2|M1 AND EX:20>curse,fire%1|M2", + ], + category: "weapons", + state: "solid", + density: 1300, + tempHigh: 1455.5, + stateHigh: "curse", + excludeRandom: true, + cooldown: defaultCooldown, +}, + +//for(i = 1, i++, i>10){ + +//} +/* +for (let i = 0; i < 100; i++) { + if(unholy_feet_bomb.hidden == false) { + if(curse.hidden == false) { + if(holy_hand_grenade.hidden == false) { + unholy_feet_bomb.hidden = false; + } + } + } + i = 0; + } + */ + + elements.chocolate_fountain = { color: "#3e1d07", behavior: [ @@ -1700,6 +2000,7 @@ elements.slushy_ice = { state: "solid", density: 917, breakInto: "smashed_ice", + isFood: true, }; elements.toorhpaste = { @@ -1709,7 +2010,10 @@ elements.toorhpaste = { state: "solid", reactions: { "juice": { elem1: "poison", elem2: null }, - } + }, + tempHigh: 170, + stateHigh: "steam", + isFood: true, }; if (!elements.lettuce.reactions) elements.lettuce.reactions = {}; From 41781a9ccd06389b94c768709becd6223ad06c82 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Fri, 31 May 2024 15:51:08 -0400 Subject: [PATCH 15/25] hotfix --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5497b621..a066533d 100644 --- a/index.html +++ b/index.html @@ -11871,7 +11871,7 @@ if (langCode) { if (r.burning2 !== undefined && Boolean(pixel2.burning) !== r.burning2) { return false; } - if (r.charged && !pixel1.charge) { + if (r.charged && !(pixel1.charge || pixel2.charge)) { return false; } if (r.chance !== undefined && Math.random() > r.chance) { From e875fb559113a2441422cf19d022fa201d63723d Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Sat, 1 Jun 2024 17:24:32 +0100 Subject: [PATCH 16/25] Comemnt update Science_mod.js Just a little update, I'm not going to be able to make anymore changes to my mod until after my birthday, or after Christmas if I don't get a upgrade for my birthday --- mods/Science_mod.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index c2ad9e2c..a5cd18f5 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -1,7 +1,9 @@ // Science mod for Sandboxels // (Inspired by survival.js) -// Build 21 +// Build 21 (version alpha 0.0.21) // If there is anything you want to suggest or there's a bug then just dm me on discord (@a_british_proto) +// I'm unavailable to make updates due to my laptop being really laggy, so I'm currently doing this on my phone +// Possible date I'll continue is after 26/06/2024 (uk date) // Todo: // - Make new substances that you can get after mixing different elements // - Make a way to get the different substances by mixing different elements and different substances From fa49d8ca25c43109329149256b7a1bf68ca72f73 Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Sat, 1 Jun 2024 17:33:18 +0100 Subject: [PATCH 17/25] Update Science_mod.js I don't even know anymore :/ --- mods/Science_mod.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index a5cd18f5..fecc73bb 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -1,6 +1,8 @@ // Science mod for Sandboxels // (Inspired by survival.js) -// Build 21 (version alpha 0.0.21) +// Build 23 (version alpha 0.0.23) +console.log("version alpha 0.0.23") +console.log("build 23") // If there is anything you want to suggest or there's a bug then just dm me on discord (@a_british_proto) // I'm unavailable to make updates due to my laptop being really laggy, so I'm currently doing this on my phone // Possible date I'll continue is after 26/06/2024 (uk date) @@ -617,7 +619,7 @@ element.Neodymium = { color:"00FFFF", category:"land", state:"solid", - hidden:false + hidden:false9 } element.Promethium = { @@ -1249,6 +1251,7 @@ substance.Silver_Vandium_Trioxide = { } // Why is this fun? How is this not torture? This is line 1247! (at the time I am making this comment) +// Not changing this ever lol ^^^^ // I think there's two silver iodides I'm just not so sure (and I ain't editing this after) // Nvm it's only one , I got silver iodide and silver iodate mixed up :skull: From 96b4ed402c62c87051b659e3f995837e094427e0 Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Sat, 1 Jun 2024 17:34:23 +0100 Subject: [PATCH 18/25] Update Science_mod.js Bug fixes --- mods/Science_mod.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index fecc73bb..d89ebea9 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -1,8 +1,8 @@ // Science mod for Sandboxels // (Inspired by survival.js) -// Build 23 (version alpha 0.0.23) -console.log("version alpha 0.0.23") -console.log("build 23") +// Build 24 (version alpha 0.0.24) +console.log("version alpha 0.0.24") +console.log("build 24") // If there is anything you want to suggest or there's a bug then just dm me on discord (@a_british_proto) // I'm unavailable to make updates due to my laptop being really laggy, so I'm currently doing this on my phone // Possible date I'll continue is after 26/06/2024 (uk date) @@ -619,7 +619,7 @@ element.Neodymium = { color:"00FFFF", category:"land", state:"solid", - hidden:false9 + hidden:false } element.Promethium = { From 5d54f9e3332e0f1ef1b7e8359e9ccc0cee419477 Mon Sep 17 00:00:00 2001 From: Alexthetransfem <124483815+theenchantedsword@users.noreply.github.com> Date: Sat, 1 Jun 2024 14:08:51 -0500 Subject: [PATCH 19/25] Create prideflags.js --- mods/prideflags.js | 307 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 307 insertions(+) create mode 100644 mods/prideflags.js diff --git a/mods/prideflags.js b/mods/prideflags.js new file mode 100644 index 00000000..84094219 --- /dev/null +++ b/mods/prideflags.js @@ -0,0 +1,307 @@ +let prideTextures = { + ace: [ + "b", + "b", + "g", + "g", + "w", + "w", + "p", + "p" + ], + aro: [ + "d", + "d", + "j", + "j", + "w", + "w", + "g", + "g", + "b", + "b" + ], + aroace: [ + "o", + "o", + "y", + "y", + "w", + "w", + "c", + "c", + "b", + "b" + ], + mlm: [ + "t", + "t", + "T", + "T", + "b", + "b", + "w", + "w", + "B", + "B", + "c", + "c", + "C", + "C" + ], + lesbian: [ + "o", + "o", + "y", + "y", + "w", + "w", + "p", + "p", + "m", + "m" + ], + trans: [ + "b", + "b", + "p", + "p", + "w", + "w", + "p", + "p", + "b", + "b" + ], + transfem: [ + "b", + "b", + "p", + "p", + "P", + "P", + "m", + "m", + "P", + "P", + "p", + "p", + "b", + "b" + ], + transmasc: [ + "p", + "b", + "b", + "B", + "B", + "c", + "c", + "B", + "B", + "b", + "b", + "p", + "p" + ], + nonbinary: [ + "y", + "y", + "w", + "w", + "p", + "p", + "b", + "b" + ], + genderfluid: [ + "p", + "p", + "w", + "w", + "u", + "u", + "b", + "b", + "B", + "B" + ], + agender: [ + "b", + "b", + "g", + "g", + "w", + "w", + "G", + "G", + "w", + "w", + "g", + "g", + "b", + "b" + ], + demi: [ + "g", + "g", + "l", + "l", + "p", + "p", + "w", + "w", + "p", + "p", + "l", + "l", + "g", + "g" + ] +} +elements.aro_flag = { + colorPattern: prideTextures.aro, + colorKey: { + "d": "#3da542", + "j": "#a7d479", + "w": "#ffffff", + "g": "#a9a9a9", + "b": "#000000" + }, + category: "pride", +} +elements.ace_flag = { + colorPattern: prideTextures.ace, + colorKey: { + "b": "#000000", + "g": "#a3a3a3", + "w": "#ffffff", + "p": "#800080", + }, + category: "pride", +} +elements.gay_flag = { + colorPattern: prideTextures.mlm, + colorKey: { + t: "#078D70", + T: "#26CEAA", + b: "#98E8C1", + w: "#ffffff", + B: "#7BADE2", + c: "#5049CC", + C: "#3D1A78" + }, + category: "pride", +} +elements.lesbian_flag = { + colorPattern: prideTextures.lesbian, + colorKey: { + o: "#D52D00", + y: "#FF9A56", + w: "#FFFFFF", + p: "#D162A4", + m: "#A30262", + }, + category: "pride", +} +elements.aroace_flag = { + colorPattern: prideTextures.aroace, + colorKey: { + o: "#ef9007", + y: "#f6d317", + w: "#ffffff", + c: "#45bcee", + b: "#1e3f54" + }, + category: "pride", +} +elements.trans_flag = { + colorPattern: prideTextures.trans, + colorKey: { + b: "#5BCEFA", + p: "#F5A9B8", + w: "#FFFFFF", + }, + category: "pride", +} +elements.transfem_flag = { + colorPattern: prideTextures.transfem, + colorKey: { + b: "#74deff", + p: "#ffe1ed", + P: "#ffb5d6", + m: "#ff8cbf" + }, + category: "pride", +} +elements.transmasc_flag = { + colorPattern: prideTextures.transmasc, + colorKey: { + p: "#FF8ABD", + b: "#CDF5FE", + B: "#9AEBFF", + c: "#74DFFF", + }, + category: "pride", +} +elements.nonbinary_flag = { + colorPattern: prideTextures.nonbinary, + colorKey: { + y: "#FCF434", + w: "#FFFFFF", + p: "#9C59D1", + b: "#000000" + }, + category: "pride", +} +elements.genderfluid_flag = { + colorPattern: prideTextures.genderfluid, + colorKey: { + p: "#FF76A4", + w: "#FFFFFF", + u: "#C011D7", + b: "#000000", + B: "#2F3CBE" + }, + category: "pride", +} +elements.agender_flag = { + colorPattern: prideTextures.agender, + colorKey: { + b: "#000000", + g: "#BCC4C7", + w: "#FFFFFF", + G: "#B7F684" + }, + category: "pride", +} +elements.demigirl_flag = { + colorPattern: prideTextures.demi, + colorKey: { + g: "#7F7F7F", + l: "#C4C4C4", + p: "#FDADC8", + w: "#FFFFFF" + }, + category: "pride", +} +elements.demiboy_flag = { + colorPattern: prideTextures.demi, + colorKey: { + g: "#7F7F7F", + l: "#C4C4C4", + p: "#9DD7EA", + w: "#FFFFFF" + }, + category: "pride", +} +elements.demigender_flag = { + colorPattern: prideTextures.demi, + colorKey: { + g: "#7F7F7F", + l: "#C4C4C4", + p: "#FBFF75", + w: "#FFFFFF" + }, + category: "pride", +} From 991d32ba04e70438a800393b63a09dff5f532cf3 Mon Sep 17 00:00:00 2001 From: Alexthetransfem <124483815+theenchantedsword@users.noreply.github.com> Date: Sat, 1 Jun 2024 14:12:02 -0500 Subject: [PATCH 20/25] Update mod-list.html --- mod-list.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod-list.html b/mod-list.html index 3d610c21..ccb88dd9 100644 --- a/mod-list.html +++ b/mod-list.html @@ -298,6 +298,7 @@