From 37bb37f271c4c2b2615b2499ec83a8035843dbc2 Mon Sep 17 00:00:00 2001 From: JustAGenericUsername <92590792+JustAGenericUsername@users.noreply.github.com> Date: Sat, 15 Jun 2024 21:45:36 -0400 Subject: [PATCH] the yes --- mod-list.html | 1 + mods/halogen.js | 2 +- mods/nousersthings.js | 120 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 121 insertions(+), 2 deletions(-) diff --git a/mod-list.html b/mod-list.html index ccb88dd9..bfaf1ccf 100644 --- a/mod-list.html +++ b/mod-list.html @@ -189,6 +189,7 @@ Neutronium Mod.jsVariety of scientific elements
ExplosionsStellarX20 neutronium_compressor.jsAdds a compressor (in reference to Minecraft’s Avaritia mod) that compresses 10,000 pixels of an element into a “singularity”Alice noblegas.jsAdds the missing noble gasesnousernamefound +nousersthings.jsAdds many chemical elements, compounds, and morenousernamefound radioactive.jsAdds every radioactive elements on the periodic table (WIP)kaeud random_rocks.jsRandomly generates rocks on game loadAlice roseyiede.jsAdds several variants of a substance called roseyiedeAlice diff --git a/mods/halogen.js b/mods/halogen.js index a63b5ac3..038a1e10 100644 --- a/mods/halogen.js +++ b/mods/halogen.js @@ -197,7 +197,7 @@ elements.astatine = { elements.molten_astatine = { color: ["#cdaf42", "#d09a2c", "#d38419", "#d66b10", "#d84e13"], behavior: behaviors.RADMOLTEN, - state: "solid", + state: "liquid", tempHigh: 337, stateHigh: "astatine_gas", stateLow: "astatine", diff --git a/mods/nousersthings.js b/mods/nousersthings.js index b519761d..9f4ddde6 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -2967,7 +2967,51 @@ elements.insulated_wire = { if (!isEmpty(x,y,true)) { var newPixel = pixelMap[x][y]; var con = newPixel.element; - if (con == "insulated_wire") { + if (con == "insulated_wire" || con == "wire_bridge") { + if (1 == 1) { // If random number is less than conductivity + if (!newPixel.charge && !newPixel.chargeCD) { + newPixel.charge = 1; + } + } + } + } + } + pixel.charge -= 0.25; + if (pixel.charge <= 0) { + delete pixel.charge; + // pixel.chargeCD = 4; + pixel.chargeCD = Math.round(4 + (4*(1-elements[pixel.element].conduct))) || 4; + } + } + // Lower charge cooldown + else if (pixel.chargeCD) { + pixel.chargeCD -= 1; + if (pixel.chargeCD <= 0) { + delete pixel.chargeCD; + if (elements[pixel.element].colorOn) { + pixel.color = pixelColorPick(pixel); + } + } + } + } + doHeat(pixel) + } +} +elements.wire_bridge = { + color: "#461716", + category: "machines", + conduct: 1, + tick: function(pixel){ + { + if (pixel.charge) { + // Check each adjacent pixel, if that pixel's charge is false, set it to the same charge + for (var i = 0; i < adjacentCoords.length; i++) { + var x = pixel.x+adjacentCoords[i][0]; + var y = pixel.y+adjacentCoords[i][1]; + if (!isEmpty(x,y,true)) { + var newPixel = pixelMap[x][y]; + var con = newPixel.element; + if (con == "insulated_wire" || con == "wire" || con == "wire_bridge") { if (1 == 1) { // If random number is less than conductivity if (!newPixel.charge && !newPixel.chargeCD) { newPixel.charge = 1; @@ -3118,4 +3162,78 @@ elements.specific_piston_ray_emitter = { }} else {pixel.cooldown -= 1} }, insulate: true, +} +if (!elements.molten_gallium.reactions){elements.gallium.reactions = {}} +elements.molten_gallium.reactions.nitrogen = {elem1: "gallium_nitride", elem2: null, chance: 0.02, tempMin: 1200} +elements.gallium_nitride = { + color: "#dedf9d", + behavior: behaviors.WALL, + colorOn: "#493ee9", + category: "solids", + tempHigh: 1650, + density: 6100, + stateHigh: "molten_gallium_nitride", + state: "solid", + conduct: 0.84, + tick: function(pixel){ + if (pixel.charge){ + 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 (Math.random() < 0.3){ + createPixel("light", x, y) + pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#493ee9") + } + } + } + } + } +} +elements.molten_gallium_nitride = { + color: ["#d29d70", "#cf8e5e", "#cd7e4e", "#ca6d40", "#c75b33"], + behavior: behaviors.MOLTEN, + category: "states", + hidden: true, + state: "liquid", + tempLow: 1640, + stateLow: "gallium_nitride", + density: 6050, +} +elements.gallium_phosphide = { + color: "#be6008", + behavior: behaviors.WALL, + colorOn: "#00ff15", + category: "solids", + tempHigh: 1457, + density: 4138, + stateHigh: "molten_gallium_phosphide", + state: "solid", + conduct: 0.84, + tick: function(pixel){ + if (pixel.charge){ + 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 (Math.random() < 0.3){ + createPixel("light", x, y) + pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#00ff15") + } + } + } + } + } +} +elements.molten_gallium_phosphide = { + color: ["#a36936", "#cf8e5e", "#9b4c1c", "#ca6d40", "#a13d19"], + behavior: behaviors.MOLTEN, + category: "states", + hidden: true, + state: "liquid", + tempLow: 1447, + stateLow: "gallium_phosphide", + density: 4100, } \ No newline at end of file