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 @@ random_liquids.jsRandomly generates liquids on game loadAlice sbmixup.jsAdds silly elements from a Mix-Up! gamestefanblox star_wars.jsAdds various items from Star Wars by DisneySeaPickle754 +subspace.jsAdds a Subspace Tripmine sound effect when an explosion happensnousernamefound sus.jsAdds an Among Us crewmateNv7 triggerable_random_powders.jsAdds powders with different abilities, such as heating and coolingAlice troll.jsAdds various dumb elements that iterate randomly on the entire screenAlice diff --git a/mods/funnynames.js b/mods/funnynames.js index ef657e4a..749063b2 100644 --- a/mods/funnynames.js +++ b/mods/funnynames.js @@ -1,3 +1,169 @@ +function getImportantLetters(input) { // entirely chadgbd i just told it what algoritm to make + const isVowel = char => 'AEIOU'.includes(char); + const isConsonant = char => /^[BCDFGHJKLMNPQRSTVWXYZ]$/.test(char); + + const removeDuplicates = str => { + let seen = new Set(); + return str.split('').filter(char => { + if (seen.has(char)) { + return false; + } else { + seen.add(char); + return true; + } + }).join(''); + }; + + const words = input.replace(/[^a-zA-Z0-9\s_]/g, '').replace(/_/g, ' ').toUpperCase().split(/\s+/); + + if (input.length <= 4) { + return input.toUpperCase(); + } else if (words.length === 1) { + const word = removeDuplicates(words[0]); + let result = ''; + let consonantCount = 0; + let vowelFound = false; + + for (let char of word) { + if (isVowel(char) && !vowelFound) { + result += char; + vowelFound = true; + } else if (isConsonant(char) && consonantCount < 3) { + result += char; + consonantCount++; + } + if (result.length === 4) { + break; + } + } + + return result.padEnd(4, result[result.length - 1] || ''); + } else if (words.length === 2) { + const firstWord = words[0]; + const secondWord = words[1]; + let result = ''; + + if (isNaN(firstWord) && !isNaN(secondWord)) { + const word = removeDuplicates(firstWord); + let consonantCount = 0; + let vowelFound = false; + + for (let char of word) { + if (isVowel(char) && !vowelFound) { + result += char; + vowelFound = true; + } else if (isConsonant(char) && consonantCount < 2) { + result += char; + consonantCount++; + } + if (result.length === 3) { + break; + } + } + result = result.padEnd(3, result[result.length - 1] || '') + secondWord; + } else if (!isNaN(firstWord) && isNaN(secondWord)) { + const word = removeDuplicates(secondWord); + let consonantCount = 0; + let vowelFound = false; + + for (let char of word) { + if (isVowel(char) && !vowelFound) { + result += char; + vowelFound = true; + } else if (isConsonant(char) && consonantCount < 2) { + result += char; + consonantCount++; + } + if (result.length === 3) { + break; + } + } + result = result.padEnd(3, result[result.length - 1] || '') + firstWord; + } else { + result = firstWord[0]; + let consonants = []; + let vowels = []; + let allChars = []; + + for (let char of secondWord) { + allChars.push(char); + if (isConsonant(char)) { + consonants.push(char); + } else if (isVowel(char)) { + vowels.push(char); + } + } + + if (consonants.length >= 3) { + let consonantCount = 0; + for (let char of allChars) { + if (isConsonant(char) && consonantCount < 3) { + result += char; + consonantCount++; + } + if (result.length === 4) { + break; + } + } + } else if (consonants.length === 2) { + let consonantCount = 0; + let vowelCount = 0; + for (let char of allChars) { + if (isConsonant(char) && consonantCount < 2) { + result += char; + consonantCount++; + } else if (isVowel(char) && vowelCount < 1) { + result += char; + vowelCount++; + } + } + } else { + let consonantCount = 0; + let vowelCount = 0; + for (let char of allChars) { + if (isConsonant(char) && consonantCount < 1) { + result += char; + consonantCount++; + } else if (isVowel(char) && vowelCount < 2) { + result += char; + vowelCount++; + } + if (result.length === 4) { + break; + } + } + } + + result = result.padEnd(4, result[result.length - 1] || ''); + } + + return result; + } else if (words.length === 3) { + const firstWord = words[0]; + const secondWord = words[1]; + const thirdWord = words[2]; + let result = firstWord[0] + secondWord[0]; + let consonantCount = 0; + let vowelFound = false; + + for (let char of thirdWord) { + if (isVowel(char) && !vowelFound) { + result += char; + vowelFound = true; + } else if (isConsonant(char) && consonantCount < 1) { + result += char; + consonantCount++; + } + if (result.length === 4) { + break; + } + } + + return result.padEnd(4, result[result.length - 1] || ''); + } else { + return words.map(word => word[0]).join('').slice(0, 4); + } +} function swapObjectValues(obj) { const keys = Object.keys(obj); while (keys.length > 1) { @@ -50,12 +216,15 @@ elements.name_settings = { if (doNameSwapping == "yes"){settings.funnyname.doNameSwapping = true} else {settings.funnyname.doNameSwapping = false} var doLetterSwapping = prompt("Would you like to swap the letters in the names? Type yes or no.", "no") if (doLetterSwapping == "yes"){settings.funnyname.doLetterSwapping = true} else {settings.funnyname.doLetterSwapping = false} + var condenseToFour = prompt("Would you like to condense the names to 4 letters? Also known as TPT-ify. Type yes or no.", "no") + if (condenseToFour == "yes"){settings.funnyname.condenseToFour = true} else {settings.funnyname.condenseToFour = false} var doNameRates = prompt("Would you like to make the names a rating? If yes, this will set all others to no (it is incompatible.) Type yes or no.", "no") if (doNameRates == "yes"){ settings.funnyname.doNameRates = true settings.funnyname.doNameSwapping = false settings.funnyname.doVowelSwapping = false settings.funnyname.doLetterSwapping = false + settings.funnyname.condenseToFour = false } else {settings.funnyname.doNameRates = false} saveSettings() var allNamesString = prompt("Would you like to set all names to a custom string? This will set all others to no. Type yes or no.", "no") @@ -64,6 +233,7 @@ elements.name_settings = { settings.funnyname.doNameSwapping = false settings.funnyname.doVowelSwapping = false settings.funnyname.doLetterSwapping = false + settings.funnyname.condenseToFour = false settings.funnyname.doNameRates = false customName = prompt("What would you like to set the names to?", "") settings.funnyname.customName = true @@ -138,5 +308,13 @@ runAfterAutogen( } } } + if (settings.funnyname.condenseToFour){ + for (let elementname in elements){ + if (elementname != "name_settings"){ + let newelementname = getImportantLetters((elements[elementname].name)||elementname) + elements[elementname].name = newelementname + } + } + } } ) \ No newline at end of file diff --git a/mods/subspace.js b/mods/subspace.js new file mode 100644 index 00000000..1dd56f8f --- /dev/null +++ b/mods/subspace.js @@ -0,0 +1,10 @@ +function playSubspace() { + var audio = new Audio("https://JustAGenericUsername.github.io/subspaceboom.mp3"); + audio.play(); +} +window.addEventListener('load', function() { +const oldexpfunc = explodeAt; +explodeAt = function(x,y,radius,fire="fire"){ + oldexpfunc(x,y,radius,fire) + playSubspace() +}}) \ No newline at end of file From 73d124a9c5f21dc0b1b92b7cf494edf8b515cecb Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Mon, 27 May 2024 11:41:12 -0400 Subject: [PATCH 03/25] Delete lightmap.js --- lightmap.js | 285 ---------------------------------------------------- 1 file changed, 285 deletions(-) delete mode 100644 lightmap.js diff --git a/lightmap.js b/lightmap.js deleted file mode 100644 index 93ddcdf0..00000000 --- a/lightmap.js +++ /dev/null @@ -1,285 +0,0 @@ -// 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 4ce51b727392b832d94b48c4f11f4987a943c582 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Mon, 27 May 2024 11:42:24 -0400 Subject: [PATCH 04/25] Delete fast_lightmap.js --- fast_lightmap.js | 285 ----------------------------------------------- 1 file changed, 285 deletions(-) delete mode 100644 fast_lightmap.js diff --git a/fast_lightmap.js b/fast_lightmap.js deleted file mode 100644 index 58cd9553..00000000 --- a/fast_lightmap.js +++ /dev/null @@ -1,285 +0,0 @@ -// 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(); -}; From f8a7e46d1dab8317386e627a1b095fe4061a5642 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Mon, 27 May 2024 12:17:14 -0400 Subject: [PATCH 05/25] f --- mods/nousersthings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/nousersthings.js b/mods/nousersthings.js index 9dcd4d9b..6bf1b6e0 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -2999,7 +2999,7 @@ elements.insulated_wire = { } elements.insulated_wire.desc = "Insulated wire. Only conducts to other insulated wires. Pairs with ray emitters to not make diagonal rays." elements.e_pipe.desc = "Electric pipe. Only passes elements while charged." -elements.destructible_e_pipe.desc = elements.e_pipe.desc +elements.destroyable_e_pipe.desc = elements.e_pipe.desc elements.channel_pipe.desc = "Channel pipe. Only passes elements to pipes of the same channel." 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." From 170f8b9208e1d5f62fa2bc330320bf7aedf05416 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Mon, 27 May 2024 13:16:00 -0400 Subject: [PATCH 06/25] subspae update --- mod-list.html | 2 +- mods/subspace.js | 52 ++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/mod-list.html b/mod-list.html index 0a9f3b8b..3d610c21 100644 --- a/mod-list.html +++ b/mod-list.html @@ -225,6 +225,7 @@ more_breaking.jsAllows for breaking more elements in explosionsAlice rays.jsAdds more Ray typesAlice rays++.jsAdds a couple more raysuptzik +subspace.jsAdds the Subspace Tripmine from Robloxnousernamefound weapons.jsAdds varieties of different weapons Jayd Food & Cooking @@ -301,7 +302,6 @@ random_liquids.jsRandomly generates liquids on game loadAlice sbmixup.jsAdds silly elements from a Mix-Up! gamestefanblox star_wars.jsAdds various items from Star Wars by DisneySeaPickle754 -subspace.jsAdds a Subspace Tripmine sound effect when an explosion happensnousernamefound sus.jsAdds an Among Us crewmateNv7 triggerable_random_powders.jsAdds powders with different abilities, such as heating and coolingAlice troll.jsAdds various dumb elements that iterate randomly on the entire screenAlice diff --git a/mods/subspace.js b/mods/subspace.js index 1dd56f8f..3230b879 100644 --- a/mods/subspace.js +++ b/mods/subspace.js @@ -1,10 +1,46 @@ -function playSubspace() { - var audio = new Audio("https://JustAGenericUsername.github.io/subspaceboom.mp3"); +function playSubspace(file) { + var audio = new Audio("https://JustAGenericUsername.github.io/" + file + ".mp3"); audio.play(); } -window.addEventListener('load', function() { -const oldexpfunc = explodeAt; -explodeAt = function(x,y,radius,fire="fire"){ - oldexpfunc(x,y,radius,fire) - playSubspace() -}}) \ No newline at end of file +elements.subspace_trimpine = { + color: "#2e2430", + behavior: behaviors.STURDYPOWDER, + maxSize: 1, + cooldown: defaultCooldown, + density: 1500, + category: "weapons", + state: "solid", + properties:{ + counter: 0 + }, + tick: function(pixel){ + if (pixel.counter == 0){ + playSubspace("subspaceplace") + } + if (!pixel.rgb){pixel.rgb = pixel.color.match(/\d+/g);} + if (pixel.counter >= 90 && pixel.counter < 121){ + if (!pixel.a){pixel.a = 1} + pixel.a -= 0.05 + pixel.color = "rgba(" + pixel.rgb[0] + "," + pixel.rgb[1] + "," + pixel.rgb[2] + "," + pixel.a + ")" + } + if (pixel.counter >= 121){ + if (!isEmpty(pixel.x, pixel.y-1, true)){ + let oldx = pixel.x + let oldy = pixel.y + explodeAt(pixel.x, pixel.y, 20) + playSubspace("subspaceboom") + deletePixel(pixel.x, pixel.y) + var coords = circleCoords(oldx, oldy, 25) + for (var i = 0; i < coords.length; i++){ + var x = coords[i].x + var y = coords[i].y + if (!isEmpty(x, y, true)){ + var newPixel = pixelMap[x][y] + newPixel.color = pixelColorPick(pixel, "#FF00FF") + } + } + } + } + pixel.counter ++ + } +} \ No newline at end of file From c3bd91ddfb98fcf21be9f620d799968ab737e35b Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Tue, 28 May 2024 10:49:43 +0800 Subject: [PATCH 07/25] translation update --- lang/zh_cn.json | 1063 ++++++++++++++++++++++++----------------------- 1 file changed, 534 insertions(+), 529 deletions(-) diff --git a/lang/zh_cn.json b/lang/zh_cn.json index c79f77c7..327261f8 100644 --- a/lang/zh_cn.json +++ b/lang/zh_cn.json @@ -2,543 +2,548 @@ "#lang.name": "简体中文", "#lang.credit": "squarescreamyt, pixelegend4", "#lang.font": "fusion-pixel-12px-monospaced-zh_hans", -"land":"地", -"liquids":"液体", -"life":"生活", -"powders":"粉", -"solids":"固体", -"energy":"力量", -"weapons":"武器", -"gases":"气", -"food":"食物", -"machines":"机器", -"special":"特别", -"other":"其他", -"heat":"加热", -"cool":"冷却", -"erase":"擦", -"drag":"拖", -"pick":"选", -"mix":"搅拌", -"lookup":"查", -"shock":"震惊", -"paint":"画", -"sand":"沙", -"water":"水", -"salt_water":"盐水", -"sugar_water":"糖水", -"seltzer":"苏打水", -"dirty_water":"脏水", -"pool_water":"泳池水", -"dirt":"土", -"mud":"坭", -"wet_sand":"湿沙", -"rock":"石", -"rock_wall":"石墙", -"mudstone":"坭石", -"packed_sand":"压缩沙", -"plant":"植物", -"dead_plant":"死植物", -"frozen_plant":"冰植物", -"grass":"草", -"algae":"藻类", -"concrete":"混凝土", -"wall":"墙", -"fire":"火", -"bomb":"炸弹", -"steam":"争气", -"ice":"冰", -"rime":"雾凇", -"snow":"雪", -"slush":"冰水", -"packed_snow":"积雪", -"wood":"木", -"smoke":"烟", -"magma":"岩浆", -"plasma":"电浆", -"cold_fire":"冷火", -"glass":"玻璃", -"molten_glass":"熔融玻璃", -"molten_rad_glass":"融融拉徳玻璃", -"rad_glass":"拉徳玻璃", -"meat":"肉", -"rotten_meat":"烂肉", -"cooked_meat":"烤肉", -"frozen_meat":"冰肉", -"salt":"盐", -"molten_salt":"熔融盐", -"sugar":"食糖", -"flour":"面粉", -"wire":"电线", -"battery":"电瓶", -"cloner":"克隆机", -"sensor":"感受器", -"heater":"热机", -"cooler":"冷机", -"random":"乱", -"image":"图片", -"unpaint":"取消画", -"uncharge":"取消电", -"unburn":"取消烧", -"smash":"砸", -"filler":"填料", -"lattice":"格子", -"gravel":"碎石", -"slime":"粘液", -"cement":"水泥", -"dust":"灰尘", -"void":"太虚", -"sun":"太阳", -"cell":"细胞", -"cancer":"癌", -"dna":"DNA", -"plague":"瘟疫", -"worm":"蚯蚓", -"frozen_worm":"冰蚯蚓", -"flea":"跳蚤", -"termite":"白蚂蚁", -"ant":"蚂蚁", -"fly":"苍蝇", -"firefly":"荧光虫", -"hive":"蜜蜂窝", -"bee":"蜜蜂", -"stink_bug":"臭虫", -"dead_bug":"死虫", -"human":"人", -"body":"生体", -"head":"头", -"bird":"鸟", -"rat":"老鼠", -"frog":"青蛙", -"frozen_frog":"冰青蛙", -"tadpole":"蝌蚪", -"fish":"鱼", -"frozen_fish":"冰鱼", -"slug":"蛞蝓", -"snail":"蜗牛", -"burner":"燃烧机", -"superheater":"过热机", -"freezer":"冷冻机", -"pipe":"管", -"pipe_wall":"管墙", -"ewall":"电墙", -"torch":"火炬", -"spout":"水龙头", -"udder":"乳房", -"bone_marrow":"骨髓", -"bone":"骨头", -"balloon":"气球", -"antipowder":"反粉", -"antimolten":"反熔", -"antifire":"反火", -"antifluid":"反液", -"antigas":"反气", -"vertical":"直", -"horizontal":"横", -"ash":"灰", -"molten_ash":"熔融灰", -"light":"光", -"liquid_light":"夜光", -"laser":"雷射", -"ball":"圆圈", -"pointer":"指针", -"charcoal":"木炭", -"tinder":"木材", -"sawdust":"锯末", -"hail":"冰雹", -"hydrogen":"氢气", -"oxygen":"氧气", -"nitrogen":"氮气", -"helium":"氦气", -"anesthesia":"麻醉", -"ammonia":"氨气", -"liquid_ammonia":"氨气液体", -"carbon_dioxide":"二氧化碳", -"oil":"油", -"lamp_oil":"灯油", -"propane":"丙烷", -"methane":"甲烷", -"liquid_methane":"液甲烷", -"stained_glass":"彩色玻璃", -"molten_stained_glass":"熔彩色玻璃", -"art":"艺术", -"rainbow":"彩虹", -"static":"電干扰", -"border":"边", -"clay":"泥土", -"clay_soil":"壤土", -"brick":"砖", -"ruins":"废墟", -"porcelain":"瓷", -"sapling":"树苗", -"pinecone":"松果", -"evergreen":"松树", -"cactus":"仙人掌", -"seeds":"种子", -"grass_seed":"草种子", -"wheat_seed":"麦种子", -"straw":"干草", -"paper":"纸", -"pollen":"花粉", -"flower_seed":"", -"pistil":"", -"petal":"", -"tree_branch":"", -"vine":"", -"bamboo_plant":"", -"foam":"", -"bubble":"泡泡", -"acid":"", -"neutral_acid":"", -"acid_gas":"", -"glue":"粘", -"soda":"汽水", -"gray_goo":"灰粘", -"malware":"", -"ecloner":"", -"slow_cloner":"", -"clone_powder":"", -"floating_cloner":"", -"virus":"病毒", -"ice_nine":"冰九", -"strange_matter":"", -"permafrost":"", -"melted_butter":"", -"melted_cheese":"", -"mushroom_spore":"", -"mushroom_stalk":"", -"mushroom_gill":"", -"mushroom_cap":"", -"hyphae":"", -"mycelium":"", -"mulch":"", -"ant_wall":"蚂蚁墙", -"lichen":"", -"antimatter":"", -"plastic":"塑料", -"molten_plastic":"", -"cellulose":"", -"wax":"", -"melted_wax":"", -"incense":"", -"fuse":"", -"dioxin":"", -"insulation":"", -"sponge":"海绵", -"bamboo":"竹子", -"iron":"铁", -"copper":"铜", -"gold":"金", -"steel":"", -"nickel":"", -"zinc":"", -"silver":"银", -"tin":"", -"lead":"", -"aluminum":"铝", -"tungsten":"", -"molten_tungsten":"", -"brass":"", -"bronze":"", -"sterling":"", -"gallium":"镓", -"molten_gallium":"熔融镓", -"gallium_gas":"镓气", -"rose_gold":"玫瑰金", -"purple_gold":"紫金", -"blue_gold":"蓝金", -"electrum":"金金银", -"pyrite":"", -"solder":"", -"molten_copper":"熔融铜", -"molten_gold":"熔融金", -"molten_silver":"", -"molten_iron":"", -"molten_nickel":"", -"molten_tin":"", -"molten_lead":"", -"molten_solder":"", -"juice":"果汁", -"juice_ice":"果汁冰", -"broth":"汤", -"milk":"牛奶", -"chocolate_milk":"巧克力牛奶", -"fruit_milk":"水果牛奶", -"pilk":"气水牛奶", -"eggnog":"蛋奶", -"egg":"蛋", -"yolk":"蛋黄", -"hard_yolk":"硬蛋黄", -"nut_milk":"坚果奶", -"dough":"面团", -"batter":"面糊", -"homunculus":"何蒙库鲁兹", -"butter":"牛油", -"cheese":"芝士", -"rotten_cheese":"腐烂芝士", -"chocolate":"巧克力", -"grape":"葡萄", -"vinegar":"醋", -"herb":"芭", -"lettuce":"生菜", -"pickle":"泡菜", -"tomato":"西红柿", -"sauce":"酱", -"pumpkin":"南瓜", -"pumpkin_seed":"南瓜种子", -"corn":"玉米", -"popcorn":"爆米花", -"corn_seed":"", -"potato":"土豆", -"baked_potato":"烤土豆", -"mashed_potato":"薯泥", -"potato_seed":"", -"root":"根", -"fiber":"", -"yeast":"", -"bread":"面包", -"toast":"烤面包", -"gingerbread":"", -"crumb":"", -"baked_batter":"", -"wheat":"麦", -"candy":"糖果", -"coffee_bean":"咖啡豆", -"coffee_ground":"咖啡粉", -"nut":"花生", -"nut_meat":"花生碎", -"nut_butter":"花生酱", -"jelly":"布丁", -"baking_soda":"苏打粉", -"yogurt":"", -"frozen_yogurt":"", -"ice_cream":"冰淇凌", -"cream":"奶油", -"beans":"豆子", -"dry_ice":"干冰", -"nitrogen_ice":"", -"particleboard":"皮肤", -"skin":"皮肤", -"hair":"头发", -"alcohol":"酒", -"alcohol_gas":"酒气", -"basalt":"", -"tuff":"", -"molten_tuff":"", -"soap":"肥皂", -"bleach":"漂白", -"chlorine":"氯", -"liquid_chlorine":"", -"dye":"染料", -"ink":"墨水", -"mercury":"汞", -"mercury_gas":"汞气", -"solid_mercury":"固体汞", -"blood":"血", -"vaccine":"疫苗", -"antibody":"", -"infection":"感染", -"poison":"毒", -"poison_gas":"毒气", -"poison_ice":"毒冰", -"antidote":"", -"tea":"茶", -"coffee":"咖啡", -"honey":"蜂蜜", -"sap":"树叶", -"amber":"", -"caramel":"焦糖", -"molasses":"", -"ketchup":"蕃茄酱", -"mayo":"蛋黄酱", -"melted_chocolate":"熔融巧克力", -"liquid_hydrogen":"", -"liquid_oxygen":"", -"liquid_nitrogen":"", -"liquid_helium":"", -"sodium":"钠", -"molten_sodium":"", -"sodium_gas":"", -"calcium":"钙", -"molten_calcium":"", -"limestone":"", -"quicklime":"", -"slaked_lime":"", -"thermite":"", -"molten_thermite":"", -"slag":"", -"amalgam":"", -"molten_aluminum":"", -"molten_zinc":"", -"neon":"氖气", -"liquid_neon":"", -"smog":"", -"stench":"臭", -"liquid_stench":"", -"fragrance":"香水", -"perfume":"香水", -"cyanide":"", -"cyanide_gas":"", -"ozone":"", -"cloud":"云", -"rain_cloud":"雨云", -"snow_cloud":"雪云", -"hail_cloud":"冰雹云", -"thunder_cloud":"雷云", -"acid_cloud":"酸云", -"pyrocumulus":"", -"fire_cloud":"火云", -"color_smoke":"", -"spray_paint":"", -"led_r":"红灯", -"led_g":"绿灯", -"led_b":"蓝灯", -"sulfur":"", -"molten_sulfur":"", -"sulfur_gas":"", -"copper_sulfate":"", -"snake":"蛇", -"loopy":"", -"warp":"", -"radiation":"", -"rad_steam":"", -"rad_cloud":"", -"fallout":"", -"neutron":"", -"proton":"", -"electric":"电", -"uranium":"铀", -"molten_uranium":"熔融铀", -"diamond":"钻石", -"gold_coin":"硬币", -"rust":"", -"oxidized_copper":"", -"alga":"", -"metal_scrap":"", -"glass_shard":"", -"rad_shard":"", -"brick_rubble":"", -"baked_clay":"", -"clay_shard":"", -"porcelain_shard":"", -"feather":"羽毛", -"confetti":"", -"glitter":"", -"bead":"", -"color_sand":"彩色沙", -"borax":"", -"epsom_salt":"", -"potassium_salt":"", -"sodium_acetate":"", -"lightning":"", -"bless":"", -"god_ray":"", -"heat_ray":"", -"explosion":"", -"n_explosion":"", -"supernova":"", -"pop":"爆", -"cook":"煮", -"incinerate":"", -"room_temp":"", -"positron":"", -"tnt":"", -"c4":"C4", -"grenade":"", -"dynamite":"", -"gunpowder":"", -"ember":"", -"firework":"烟花", -"fw_ember":"烟火", -"nuke":"", -"h_bomb":"", -"dirty_bomb":"", -"emp_bomb":"", -"nitro":"", -"greek_fire":"", -"fireball":"", -"rocket":"", -"cold_bomb":"冷炸弹", -"hot_bomb":"热炸弹", -"antimatter_bomb":"", -"party_popper":"", -"flashbang":"光榴弹", -"flash":"", -"smoke_grenade":"烟榴弹", -"landmine":"", -"armageddon":"", -"tesla_coil":"", -"light_bulb":"灯泡", -"shocker":"", -"pressure_plate":"", -"primordial_soup":"", -"molten_slag":"", -"molten_dirt":"", -"debug":"", -"prop":"", -"salt_ice":"盐水冰", -"sugar_ice":"糖水冰", -"seltzer_ice":"苏打水冰", -"dirty_ice":"", -"pool_ice":"", -"blood_ice":"血冰", -"antibody_ice":"", -"infection_ice":"", -"unknown":"未知", -"slime_ice":"", -"antiice":"", -"ammonia_ice":"", -"liquid_propane":"", -"methane_ice":"", -"molten_brick":"", -"acid_ice":"", -"soda_ice":"汽水冰", -"molten_steel":"", -"molten_brass":"", -"molten_bronze":"", -"molten_sterling":"", -"molten_rose_gold":"", -"molten_purple_gold":"", -"molten_blue_gold":"", -"molten_electrum":"", -"molten_pyrite":"", -"broth_ice":"", -"frozen_vinegar":"", -"sauce_ice":"酱冰", -"alcohol_ice":"酒冰", -"bleach_ice":"", -"chlorine_ice":"", -"frozen_ink":"", -"tea_ice":"茶冰", -"coffee_ice":"咖啡冰", -"hydrogen_ice":"", -"oxygen_ice":"", -"molten_amalgam":"", -"neon_ice":"", -"cyanide_ice":"", -"molten_copper_sulfate":"", -"molten_alga":"", -"molten_metal_scrap":"", -"molten_borax":"", -"molten_epsom_salt":"", -"molten_potassium_salt":"", -"molten_sodium_acetate":"", -"frozen_nitro":"", -"cured_meat": "", +"land": "地", +"liquids": "液体", +"life": "生活", +"powders": "粉", +"solids": "固体", +"energy": "力量", +"weapons": "武器", +"gases": "气", +"food": "食物", +"machines": "机器", +"special": "特别", +"other": "其他", +"heat": "加热", +"cool": "冷却", +"erase": "擦", +"drag": "拖", +"pick": "选", +"mix": "搅拌", +"lookup": "查", +"shock": "震惊", +"paint": "画", +"sand": "沙", +"water": "水", +"salt_water": "盐水", +"sugar_water": "糖水", +"seltzer": "苏打水", +"dirty_water": "脏水", +"pool_water": "泳池水", +"dirt": "土", +"mud": "坭", +"wet_sand": "湿沙", +"rock": "石", +"rock_wall": "石墙", +"mudstone": "坭石", +"packed_sand": "压缩沙", +"plant": "植物", +"dead_plant": "死植物", +"frozen_plant": "冰植物", +"grass": "草", +"algae": "藻类", +"concrete": "混凝土", +"wall": "墙", +"fire": "火", +"bomb": "炸弹", +"steam": "争气", +"ice": "冰", +"rime": "雾凇", +"snow": "雪", +"slush": "冰水", +"packed_snow": "积雪", +"wood": "木", +"smoke": "烟", +"magma": "岩浆", +"plasma": "电浆", +"cold_fire": "冷火", +"glass": "玻璃", +"molten_glass": "熔融玻璃", +"molten_rad_glass": "融融拉徳玻璃", +"rad_glass": "拉徳玻璃", +"meat": "肉", +"rotten_meat": "烂肉", +"cooked_meat": "烤肉", +"frozen_meat": "冰肉", +"salt": "盐", +"molten_salt": "熔融盐", +"sugar": "食糖", +"flour": "面粉", +"wire": "电线", +"battery": "电瓶", +"cloner": "克隆机", +"sensor": "感受器", +"heater": "热机", +"cooler": "冷机", +"random": "乱", +"image": "图片", +"unpaint": "取消画", +"uncharge": "取消电", +"unburn": "取消烧", +"smash": "砸", +"filler": "填料", +"lattice": "格子", +"gravel": "碎石", +"slime": "粘液", +"cement": "水泥", +"dust": "灰尘", +"void": "太虚", +"sun": "太阳", +"cell": "细胞", +"cancer": "癌", +"dna": "DNA", +"plague": "瘟疫", +"worm": "蚯蚓", +"frozen_worm": "冰蚯蚓", +"flea": "跳蚤", +"termite": "白蚂蚁", +"ant": "蚂蚁", +"fly": "苍蝇", +"firefly": "荧光虫", +"hive": "蜜蜂窝", +"bee": "蜜蜂", +"stink_bug": "臭虫", +"dead_bug": "死虫", +"human": "人", +"body": "生体", +"head": "头", +"bird": "鸟", +"rat": "老鼠", +"frog": "青蛙", +"frozen_frog": "冰青蛙", +"tadpole": "蝌蚪", +"fish": "鱼", +"frozen_fish": "冰鱼", +"slug": "蛞蝓", +"snail": "蜗牛", +"burner": "燃烧机", +"superheater": "过热机", +"freezer": "冷冻机", +"pipe": "管", +"pipe_wall": "管墙", +"ewall": "电墙", +"torch": "火炬", +"spout": "水龙头", +"udder": "乳房", +"bone_marrow": "骨髓", +"bone": "骨头", +"balloon": "气球", +"antipowder": "反粉", +"antimolten": "反熔", +"antifire": "反火", +"antifluid": "反液", +"antigas": "反气", +"vertical": "直", +"horizontal": "横", +"ash": "灰", +"molten_ash": "熔融灰", +"light": "光", +"liquid_light": "夜光", +"laser": "雷射", +"ball": "圆圈", +"pointer": "指针", +"charcoal": "木炭", +"tinder": "木材", +"sawdust": "锯末", +"hail": "冰雹", +"hydrogen": "氢气", +"oxygen": "氧气", +"nitrogen": "氮气", +"helium": "氦气", +"anesthesia": "麻醉", +"ammonia": "氨气", +"liquid_ammonia": "氨气液体", +"carbon_dioxide": "二氧化碳", +"oil": "油", +"lamp_oil": "灯油", +"propane": "丙烷", +"methane": "甲烷", +"liquid_methane": "液甲烷", +"stained_glass": "彩色玻璃", +"molten_stained_glass": "熔彩色玻璃", +"art": "艺术", +"rainbow": "彩虹", +"static": "電干扰", +"border": "边", +"clay": "泥土", +"clay_soil": "壤土", +"brick": "砖", +"ruins": "废墟", +"porcelain": "瓷", +"sapling": "树苗", +"pinecone": "松果", +"evergreen": "松树", +"cactus": "仙人掌", +"seeds": "种子", +"grass_seed": "草种子", +"wheat_seed": "麦种子", +"straw": "干草", +"paper": "纸", +"pollen": "花粉", +"flower_seed": "花种子", +"pistil": "雌蕊", +"petal": "花瓣", +"tree_branch": "树支", +"vine": "藤蔓", +"bamboo_plant": "竹子", +"foam": "泡沫", +"bubble": "泡泡", +"acid": "酸", +"neutral_acid": "中性酸性", +"acid_gas": "酸气", +"glue": "粘", +"soda": "汽水", +"gray_goo": "灰粘", +"malware": "恶意软件", +"ecloner": "电子克隆机", +"slow_cloner": "慢克隆机", +"clone_powder": "克隆粉", +"floating_cloner": "浮动克隆机", +"virus": "病毒", +"ice_nine": "冰-九", +"strange_matter": "奇怪物质", +"permafrost": "永冻土", +"melted_butter": "融化牛油", +"melted_cheese": "融化芝士", +"mushroom_spore": "蘑菇孢子", +"mushroom_stalk": "蘑菇茎", +"mushroom_gill": "蘑菇鳃", +"mushroom_cap": "蘑菇帽", +"hyphae": "菌丝", +"mycelium": "菌丝体", +"mulch": "覆盖物", +"ant_wall": "蚂蚁墙", +"lichen": "地衣", +"antimatter": "反物质", +"plastic": "塑料", +"molten_plastic": "熔融塑料", +"cellulose": "纤维素", +"wax": "蜡", +"melted_wax": "熔化蜡", +"incense": "香", +"fuse": "保险丝", +"dioxin": "二恶英", +"insulation": "绝缘", +"sponge": "海绵", +"bamboo": "竹子", +"iron": "铁", +"copper": "铜", +"gold": "金", +"steel": "钢", +"nickel": "镍", +"zinc": "锌", +"silver": "银", +"tin": "相信", +"lead": "带领", +"aluminum": "铝", +"tungsten": "钨", +"molten_tungsten": "熔融钨", +"brass": "黄铜", +"bronze": "青铜", +"sterling": "英镑", +"gallium": "镓", +"molten_gallium": "熔融镓", +"gallium_gas": "镓气", +"rose_gold": "玫瑰金", +"purple_gold": "紫金", +"blue_gold": "蓝金", +"electrum": "金金银", +"pyrite": "黄铁矿", +"solder": "焊接", +"molten_copper": "熔融铜", +"molten_gold": "熔融金", +"molten_silver": "熔银", +"molten_iron": "铁水", +"molten_nickel": "熔融镍", +"molten_tin": "熔锡", +"molten_lead": "熔化铅", +"molten_solder": "熔化焊料", +"juice": "果汁", +"juice_ice": "果汁冰", +"broth": "汤", +"milk": "牛奶", +"chocolate_milk": "巧克力牛奶", +"fruit_milk": "水果牛奶", +"pilk": "气水牛奶", +"eggnog": "蛋奶", +"egg": "蛋", +"yolk": "蛋黄", +"hard_yolk": "硬蛋黄", +"nut_milk": "坚果奶", +"dough": "面团", +"batter": "面糊", +"homunculus": "何蒙库鲁兹", +"butter": "牛油", +"cheese": "芝士", +"rotten_cheese": "腐烂芝士", +"chocolate": "巧克力", +"grape": "葡萄", +"vinegar": "醋", +"herb": "芭", +"lettuce": "生菜", +"pickle": "泡菜", +"tomato": "西红柿", +"sauce": "酱", +"pumpkin": "南瓜", +"pumpkin_seed": "南瓜种子", +"corn": "玉米", +"popcorn": "爆米花", +"corn_seed": "玉米种子", +"potato": "土豆", +"baked_potato": "烤土豆", +"mashed_potato": "薯泥", +"potato_seed": "马铃薯种子", +"root": "根", +"fiber": "纤维", +"yeast": "酵母", +"bread": "面包", +"toast": "烤面包", +"gingerbread": "姜饼", +"crumb": "屑", +"baked_batter": "烘焙面糊", +"wheat": "麦", +"candy": "糖果", +"coffee_bean": "咖啡豆", +"coffee_ground": "咖啡粉", +"nut": "花生", +"nut_meat": "花生碎", +"nut_butter": "花生酱", +"jelly": "布丁", +"baking_soda": "苏打粉", +"yogurt": "酸奶", +"frozen_yogurt": "冰冻酸奶", +"ice_cream": "冰淇凌", +"cream": "奶油", +"beans": "豆子", +"dry_ice": "干冰", +"nitrogen_ice": "氮冰", +"particleboard": "皮肤", +"skin": "皮肤", +"hair": "头发", +"alcohol": "酒", +"alcohol_gas": "酒气", +"basalt": "玄武岩", +"tuff": "凝灰岩", +"molten_tuff": "熔凝灰岩", +"soap": "肥皂", +"bleach": "漂白", +"chlorine": "氯", +"liquid_chlorine": "液氯", +"dye": "染料", +"ink": "墨水", +"mercury": "汞", +"mercury_gas": "汞气", +"solid_mercury": "固体汞", +"blood": "血", +"vaccine": "疫苗", +"antibody": "抗体", +"infection": "感染", +"poison": "毒", +"poison_gas": "毒气", +"poison_ice": "毒冰", +"antidote": "解毒剂", +"tea": "茶", +"coffee": "咖啡", +"honey": "蜂蜜", +"sap": "树叶", +"amber": "琥珀色", +"caramel": "焦糖", +"molasses": "糖蜜", +"ketchup": "蕃茄酱", +"mayo": "蛋黄酱", +"melted_chocolate": "熔融巧克力", +"liquid_hydrogen": "液氢", +"liquid_oxygen": "液氧", +"liquid_nitrogen": "液氮", +"liquid_helium": "液氦", +"sodium": "钠", +"molten_sodium": "熔融钠", +"sodium_gas": "钠气", +"calcium": "钙", +"molten_calcium": "熔融钙", +"limestone": "石灰石", +"quicklime": "生石灰", +"slaked_lime": "熟石灰", +"thermite": "铝热剂", +"molten_thermite": "熔融铝热剂", +"slag": "矿渣", +"amalgam": "汞合金", +"molten_aluminum": "熔融铝", +"molten_zinc": "熔融锌", +"neon": "氖气", +"liquid_neon": "液体氖气", +"smog": "烟雾", +"stench": "臭", +"liquid_stench": "液体恶臭", +"fragrance": "香水", +"perfume": "香水", +"cyanide": "氰化物", +"cyanide_gas": "氰化物气体", +"ozone": "臭氧", +"cloud": "云", +"rain_cloud": "雨云", +"snow_cloud": "雪云", +"hail_cloud": "冰雹云", +"thunder_cloud": "雷云", +"acid_cloud": "酸云", +"pyrocumulus": "火积云", +"fire_cloud": "火云", +"color_smoke": "彩色烟雾", +"spray_paint": "喷漆", +"led_r": "红灯", +"led_g": "绿灯", +"led_b": "蓝灯", +"sulfur": "硫", +"molten_sulfur": "熔融硫磺", +"sulfur_gas": "硫磺气体", +"copper_sulfate": "硫酸铜", +"snake": "蛇", +"loopy": "疯狂的", +"warp": "经", +"radiation": "辐射", +"rad_steam": "辐射蒸汽", +"rad_cloud": "拉德云", +"fallout": "掉出来", +"neutron": "中子", +"proton": "质子", +"electric": "电", +"uranium": "铀", +"molten_uranium": "熔融铀", +"diamond": "钻石", +"gold_coin": "硬币", +"rust": "锈", +"oxidized_copper": "氧化铜", +"alga": "藻类", +"metal_scrap": "金属废料", +"glass_shard": "玻璃碎片", +"rad_shard": "rad shard", +"brick_rubble": "砖瓦砾", +"baked_clay": "烘焙粘土", +"clay_shard": "粘土碎片", +"porcelain_shard": "瓷器碎片", +"feather": "羽毛", +"confetti": "五彩纸屑", +"glitter": "闪光", +"bead": "珠子", +"color_sand": "彩色沙", +"borax": "硼砂", +"epsom_salt": "泻盐", +"potassium_salt": "钾盐", +"sodium_acetate": "乙酸钠", +"lightning": "闪电", +"bless": "保佑", +"god_ray": "神雷", +"heat_ray": "热射线", +"explosion": "爆炸", +"n_explosion": "n 爆炸", +"supernova": "超新星", +"pop": "爆", +"cook": "煮", +"incinerate": "焚化", +"room_temp": "房间温度", +"positron": "正电子", +"tnt": "tnt", +"c4": "C4", +"grenade": "手榴弹", +"dynamite": "炸药", +"gunpowder": "火药", +"ember": "人类", +"firework": "烟花", +"fw_ember": "烟火", +"nuke": "核武器", +"h_bomb": "h 炸弹", +"dirty_bomb": "脏炸弹", +"emp_bomb": "电子炸弹", +"nitro": "硝基", +"greek_fire": "希腊火", +"fireball": "火球", +"rocket": "火箭", +"cold_bomb": "冷炸弹", +"hot_bomb": "热炸弹", +"antimatter_bomb": "反物质炸弹", +"party_popper": "礼花", +"flashbang": "光榴弹", +"flash": "闪光", +"smoke_grenade": "烟榴弹", +"landmine": "地雷", +"armageddon": "世界末日", +"tesla_coil": "特斯拉线圈", +"light_bulb": "灯泡", +"shocker": "令人震惊", +"pressure_plate": "压力板", +"primordial_soup": "原始汤", +"molten_slag": "熔渣", +"molten_dirt": "熔化污垢", +"debug": "调试", +"prop": "支柱", +"salt_ice": "盐水冰", +"sugar_ice": "糖水冰", +"seltzer_ice": "苏打水冰", +"dirty_ice": "脏冰", +"pool_ice": "池冰", +"blood_ice": "血冰", +"antibody_ice": "抗体 冰", +"infection_ice": "感染冰", +"unknown": "未知", +"slime_ice": "史莱姆 冰", +"antiice": "防冰", +"ammonia_ice": "氨 冰", +"liquid_propane": "液体丙烷", +"methane_ice": "甲烷 冰", +"molten_brick": "熔化的砖", +"acid_ice": "酸 冰", +"soda_ice": "汽水冰", +"molten_steel": "钢水", +"molten_brass": "熔融黄铜", +"molten_bronze": "熔化青铜", +"molten_sterling": "熔化英镑", +"molten_rose_gold": "熔化玫瑰金", +"molten_purple_gold": "熔化紫金", +"molten_blue_gold": "熔蓝金", +"molten_electrum": "熔融金金矿", +"molten_pyrite": "熔融黄铁矿", +"broth_ice": "肉汤冰", +"frozen_vinegar": "冷冻醋", +"sauce_ice": "酱冰", +"alcohol_ice": "酒冰", +"bleach_ice": "漂白冰", +"chlorine_ice": "氯冰", +"frozen_ink": "冰冻墨水", +"tea_ice": "茶冰", +"coffee_ice": "咖啡冰", +"hydrogen_ice": "氢冰", +"oxygen_ice": "氧气 冰", +"molten_amalgam": "熔融汞合金", +"neon_ice": "霓虹灯冰", +"cyanide_ice": "氰化物冰", +"molten_copper_sulfate": "熔融硫酸铜", +"molten_alga": "熔藻", +"molten_metal_scrap": "熔融金属废料", +"molten_borax": "熔融硼砂", +"molten_epsom_salt": "熔盐", +"molten_potassium_salt": "熔融钾盐", +"molten_sodium_acetate": "熔融乙酸钠", +"frozen_nitro": "冷冻硝基", +"cured_meat": "腌肉", "nut_oil": "花生油", -"grease": "", +"grease": "润滑脂", "fat": "肥", "potassium": "钾", "molten_potassium": "熔融钾", "magnesium": "镁", "molten_magnesium": "熔融镁", -"sandstorm": "", +"sandstorm": "沙暴", "caustic_potash": "氢氧化钾", -"antibomb": "", +"antibomb": "反炸弹", "tornado": "龙卷风", "earthquake": "地震", "tsunami": "海啸", -"blaster": "", -"propane_ice": "", -"molten_caustic_potash": "熔融氢氧化钾" +"blaster": "冲击波", +"propane_ice": "丙烷冰", +"molten_caustic_potash": "熔融氢氧化钾", +"cloth": "布", +"kelp": "海带", +"grinder": "磨床", +"mixer": "混合机", +"freeze_ray": "冷射线" } From 3d79c4eb818960ba0678a6e9b41d322c5cbb7e0b Mon Sep 17 00:00:00 2001 From: SquareScreamYT <134925668+SquareScreamYT@users.noreply.github.com> Date: Tue, 28 May 2024 11:38:55 +0800 Subject: [PATCH 08/25] Change Chinese Simplified Option to Complete --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5497b621..07437575 100644 --- a/index.html +++ b/index.html @@ -16704,10 +16704,10 @@ Cancer, Landmine, Grenade, Smoke Grenade">? + -

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 @@ minecraft.jsAdds several things from MinecraftStellarX20 minesweeper.jsA subpar implementation of MinesweeperAlice musicalfruit.jsHumans get gas from eating Beansmollthecoder +prideflags.jsAdds some pride flags to the game.Adora random_elems.jsCurated randomly generated elementsAlice random_liquids.jsRandomly generates liquids on game loadAlice sbmixup.jsAdds silly elements from a Mix-Up! gamestefanblox @@ -391,4 +392,4 @@ - \ No newline at end of file + From 3455941681a447562892f87525ce4658e2213991 Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Mon, 3 Jun 2024 13:52:26 +0100 Subject: [PATCH 21/25] Comment Update Science_mod.js decide to start doing it in school, don't really have an option :/ --- mods/Science_mod.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index d89ebea9..2643171e 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -1,11 +1,10 @@ // Science mod for Sandboxels // (Inspired by survival.js) -// Build 24 (version alpha 0.0.24) -console.log("version alpha 0.0.24") -console.log("build 24") +// Build 25 (version alpha 0.0.25) +console.log("version alpha 0.0.25") +console.log("build 25") // 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) +// I've decided to start doing this project on my schools computer's (because they don't crash all the time) so there will be long delays in updates, sorry! // 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 3729c01e140d257e95e6ff3bf568a59b7a9157e3 Mon Sep 17 00:00:00 2001 From: DaviStudios <112717418+DaviStudios@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:45:11 +0300 Subject: [PATCH 22/25] Add files via upload --- mods/kopalsBar.js | 119 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 mods/kopalsBar.js diff --git a/mods/kopalsBar.js b/mods/kopalsBar.js new file mode 100644 index 00000000..f50f2f54 --- /dev/null +++ b/mods/kopalsBar.js @@ -0,0 +1,119 @@ +elements.yeast = { + color: ['#AD9166', '#9A7F4E', '#D8BB8D'], + behavior: [ + 'XX|XX|XX', + 'XX|XX|XX', + 'M2|M1|M2' + ], + category: 'bar', + state: 'solid', + tempHigh: 132, + stateHigh: 'ash', + reactions: { + 'water': {elem2: 'beer', chance: 0.05}, + 'juice': {elem2: 'wine', chance: 0.05}, + 'sugar_water': {elem2: 'rum', chance: 0.05}, + } +} + +const drinks = [ + 'beer', + 'wine', + 'vodka', + 'rum' +] + +const ings = [ + 'yeast', + 'mashed_potato' +] + +function drink(elem) { + elements.body.reactions[elem] = {elem2: null} + elements.head.reactions[elem] = {elem2: null} +} + +elements.beer = { + color: ['#FFD700', '#F4E541'], + behavior: [ + 'XX|CR:foam%15|XX', + 'M2|XX|M2', + 'M2|M1|M2' + ], + category: 'bar', + state: 'solid', + tempHigh: 78, + density: 997, + stateHigh: ['steam', 'alcohol'], + reactions: { + 'water': {elem2: 'beer', chance: 0.0125} + } +} + +elements.wine = { + color: ['#7B1113', '#8D021F'], + behavior: behaviors.LIQUID, + category: 'bar', + state: 'solid', + tempHigh: 78, + density: 997, + stateHigh: ['steam', 'alcohol'], + reactions: { + 'juice': {elem2: 'wine', chance: 0.0125} + } +} + +elements.vodka = { + color: ['#FFFFFF', '#FFFACD'], + behavior: behaviors.LIQUID, + category: 'bar', + state: 'solid', + tempHigh: 78, + density: 997, + stateHigh: ['steam', 'alcohol'], + reactions: { + 'water': {elem2: 'vodka', chance: 0.0125} + } +} + +elements.rum = { + color: ['#A0522D', '#8B4513'], + behavior: behaviors.LIQUID, + category: 'bar', + state: 'solid', + tempHigh: 78, + density: 997, + stateHigh: ['steam', 'alcohol'], + reactions: { + 'sugar_water': {elem2: 'rum', chance: 0.0125} + } +} + +elements.ingredient_eater = { + color: ['#AD9166', '#9A7F4E', '#D8BB8D'], + tool: function(pixel) { + if (ings.includes(pixel.element)) { + deletePixel(pixel.x, pixel.y); + } + }, + category: "tools", + desc: "Removes ingredients." +} + +elements.drinker = { + color: ['#FFD700', '#F4E541', '#7B1113', '#8D021F'], + tool: function(pixel) { + if (drinks.includes(pixel.element)) { + deletePixel(pixel.x, pixel.y); + } + }, + category: "tools", + desc: "Drinks alcohol." +} + +for (const elem in drinks) { + drink(elem) +} + +elements.mashed_potato.reactions = {} +elements.mashed_potato.reactions['water'] = {elem2: 'vodka', chance: 0.05} \ No newline at end of file From 55a1541f4e5c81cbb76ab3ac689d51c184f7a25f Mon Sep 17 00:00:00 2001 From: DaviStudios <112717418+DaviStudios@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:24:05 +0300 Subject: [PATCH 23/25] Add files via upload --- mods/kopalsBar.js | 68 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/mods/kopalsBar.js b/mods/kopalsBar.js index f50f2f54..93d52140 100644 --- a/mods/kopalsBar.js +++ b/mods/kopalsBar.js @@ -13,6 +13,7 @@ elements.yeast = { 'water': {elem2: 'beer', chance: 0.05}, 'juice': {elem2: 'wine', chance: 0.05}, 'sugar_water': {elem2: 'rum', chance: 0.05}, + 'white_juice': {elem2: 'white_wine', chance: 0.05}, } } @@ -20,7 +21,10 @@ const drinks = [ 'beer', 'wine', 'vodka', - 'rum' + 'rum', + 'white_wine', + 'white_juice', + 'white_grape' ] const ings = [ @@ -57,13 +61,28 @@ elements.wine = { state: 'solid', tempHigh: 78, density: 997, + stain: 0.1, stateHigh: ['steam', 'alcohol'], reactions: { 'juice': {elem2: 'wine', chance: 0.0125} } } -elements.vodka = { +elements.white_wine = { + color: ['#FAD689', '#F8E3A1'], + behavior: behaviors.LIQUID, + category: 'bar', + state: 'solid', + tempHigh: 78, + density: 997, + stain: 0.1, + stateHigh: ['steam', 'alcohol'], + reactions: { + 'white_juice': {elem2: 'white_wine', chance: 0.0125} + } +} + +elements.vodka = { color: ['#FFFFFF', '#FFFACD'], behavior: behaviors.LIQUID, category: 'bar', @@ -76,12 +95,13 @@ elements.vodka = { } } -elements.rum = { +elements.rum = { color: ['#A0522D', '#8B4513'], behavior: behaviors.LIQUID, category: 'bar', state: 'solid', tempHigh: 78, + stain: 0.05, density: 997, stateHigh: ['steam', 'alcohol'], reactions: { @@ -89,6 +109,40 @@ elements.rum = { } } +elements.white_juice = { + color: ['#F8F0C6', '#F7E7A9'], + behavior: behaviors.LIQUID, + category: 'liquids', + state: 'solid', + tempHigh: 130, + density: elements.juice.density, + movable: true, + stateHigh: 'steam', +} + +elements.white_grape = { + color: ['#D0F0C0', '#B2E68D'], + behavior: elements.grape.behavior, + category: 'food', + density: 1154, + state: 'solid', + stateHigh: ['steam', 'sugar'], + breakInto: 'white_juice', + tempHigh: 256, + reactions: { + 'acid': {elem1: 'white_juice', chance: 0.1}, + 'acid_gas': {elem1: 'white_juice', chance: 0.1}, + 'basalt': {elem1: 'white_juice', chance: 0.1}, + 'concrete': {elem1: 'white_juice', chance: 0.1}, + 'limestone': {elem1: 'white_juice', chance: 0.1}, + 'radiation': {elem1: 'white_juice', chance: 0.1}, + 'rock': {elem1: 'white_juice', chance: 0.1}, + 'tuff': {elem1: 'white_juice', chance: 0.1}, + 'water': {elem1: 'white_juice', chance: 0.005}, + 'sugar_water': {elem1: 'white_juice', chance: 0.025}, + } +} + elements.ingredient_eater = { color: ['#AD9166', '#9A7F4E', '#D8BB8D'], tool: function(pixel) { @@ -100,7 +154,7 @@ elements.ingredient_eater = { desc: "Removes ingredients." } -elements.drinker = { +elements.consumer = { color: ['#FFD700', '#F4E541', '#7B1113', '#8D021F'], tool: function(pixel) { if (drinks.includes(pixel.element)) { @@ -108,7 +162,7 @@ elements.drinker = { } }, category: "tools", - desc: "Drinks alcohol." + desc: "Consumes stuff like juice 'n beer." } for (const elem in drinks) { @@ -116,4 +170,6 @@ for (const elem in drinks) { } elements.mashed_potato.reactions = {} -elements.mashed_potato.reactions['water'] = {elem2: 'vodka', chance: 0.05} \ No newline at end of file +elements.mashed_potato.reactions['water'] = {elem2: 'vodka', chance: 0.05} +elements.grape.color = ['#7D1538', '#6F2DA8'] +elements.grape.breakIntoColor = '#4B0082' \ No newline at end of file From a7cbacb51113b2dbd39efe75788d73e7bd25b53f Mon Sep 17 00:00:00 2001 From: GregorTV7 <101485533+GregorTV7@users.noreply.github.com> Date: Tue, 4 Jun 2024 08:53:27 -0700 Subject: [PATCH 24/25] Add files via upload --- mods/barf_mod.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 mods/barf_mod.js diff --git a/mods/barf_mod.js b/mods/barf_mod.js new file mode 100644 index 00000000..b5ba91ed --- /dev/null +++ b/mods/barf_mod.js @@ -0,0 +1,42 @@ +elements.barf = { + color: "#9ACD32", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "M1|M1|M1" + ], + category: "liquids", + density: 1020, + state: "liquid", + viscosity: 5, + reactions: { + "milk": { "elem1": "cheese", "chance": 1.0 } + }, + tempHigh: 300, + stateHigh: "stench", + tempLow: 0, + stateLow: "frozen_barf", + flammable: true, + burn: 20, + burnInto: "smoke" +}; + +elements.frozen_barf = { + color: "#B0E0E6", + behavior: [ + "XX|XX|XX", + "XX|XX|XX", + "XX|XX|XX" + ], + category: "solids", + density: 1030, + state: "solid", + tempHigh: 0, + stateHigh: "barf" +}; + +elements.slime.reactions = elements.slime.reactions || {}; +elements.slime.reactions.blood = { "elem1": "barf", "chance": 1.0 }; + +elements.blood.reactions = elements.blood.reactions || {}; +elements.blood.reactions.slime = { "elem1": "barf", "chance": 1.0 }; From 6676a15a0b491937ecc1410d2611231ce1e5a872 Mon Sep 17 00:00:00 2001 From: ThatOtherProto <127895014+ThatOtherProto@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:52:59 +0100 Subject: [PATCH 25/25] Update Science_mod.js Out of time to do a desc --- mods/Science_mod.js | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/mods/Science_mod.js b/mods/Science_mod.js index 2643171e..7f75597b 100644 --- a/mods/Science_mod.js +++ b/mods/Science_mod.js @@ -1,14 +1,15 @@ // Science mod for Sandboxels // (Inspired by survival.js) -// Build 25 (version alpha 0.0.25) -console.log("version alpha 0.0.25") -console.log("build 25") +// Build 26 (version alpha 0.0.26) +console.log("version alpha 0.0.26") +console.log("build 26") // If there is anything you want to suggest or there's a bug then just dm me on discord (@a_british_proto) // I've decided to start doing this project on my schools computer's (because they don't crash all the time) so there will be long delays in updates, sorry! // 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 +// - Make a way to get the different substances by mixing different elements and different substances (basically the same as the one above) // - Create different proporties for the substances (doing now) +// - Actually update all the properties and make them have effects // How much of the elements you're gonna have when you start: @@ -1511,3 +1512,28 @@ substance.Aluminum_Chloride_Hydrate = { state: "solid", hidden:true } + +// NULL/null just means unknown +substance.Aluminum_Chloride_Hexahydrate = { + behavior: behaviors.NULL, + color: "000000", + category: "null", + state: "null", + hidden:true +} + +substance.Aluminum_Perchlorate_Nonahydrate = { + behavior: behaviors.NULL, + color: "000000", + category: "null", + state: "null", + hidden:true +} + +substance.Aluminum_Chlorate_Nonahydrate= { + behavior: behaviors.NULL, + color: "000000", + category: "null", + state: "null", + hidden:true +}