diff --git a/mod-list.html b/mod-list.html index e1b5416e..41ce75e8 100644 --- a/mod-list.html +++ b/mod-list.html @@ -190,6 +190,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/heatglow.js b/mods/heatglow.js index 2293bc77..f3805ca5 100644 --- a/mods/heatglow.js +++ b/mods/heatglow.js @@ -38,7 +38,7 @@ const heatfunc = function(pixel){ pixel.color = "rgb(" + weightedAverage(pixel.ogR, newR, weight) + "," + weightedAverage(pixel.ogG, newG, weight) + "," + weightedAverage(pixel.ogB, newB, weight) + ")"; }}}; if (!eLists.metals) { eLists.metals = [] } - eLists.metals = eLists.metals.concat(["iron", "glass", "copper", "gold", "brass","steel","nickel","zinc","silver","aluminum","bronze","metal_scrap","oxidized_copper","tin","lead", "rose_gold"]) + eLists.metals = eLists.metals.concat(["iron", "glass", "copper", "gold", "brass","steel","nickel","zinc","silver","aluminum","bronze","metal_scrap","oxidized_copper","tin","lead", "rose_gold", "tungsten"]) eLists.metals.forEach(metal => { const prefunc = elements[metal].tick; if (!prefunc){ diff --git a/mods/nousersthings.js b/mods/nousersthings.js index b519761d..95c8aa6f 100644 --- a/mods/nousersthings.js +++ b/mods/nousersthings.js @@ -2514,8 +2514,9 @@ elements.solid_diamond = { tempHigh: elements.diamond.tempHigh, stateHigh: elements.diamond.stateHigh, state: "solid", - denisty: elements.diamond.density, - hardness: elements.diamond.hardness + density: elements.diamond.density, + hardness: elements.diamond.hardness, + behavior: behaviors.WALL, } elements.textured_rose_gold = { color: ["#FF5991", "#E4386F", "#7F1037", "#FFCCCD", "#671133"], @@ -2842,7 +2843,7 @@ elements.specific_ray_emitter = { if (!rayans6) { return } stopAtElement = mostSimilarElement(rayans6) let rayans7 - if (rayans == "ray"){ rayans7 = prompt("How long should the ray stay on screen in ticks?", (rayLife||10));} + if (rayans == "ray"){ rayans7 = prompt("How long should the ray stay on screen in ticks?", (rayLife||10)); if (!rayans7) { return } if (isNaN(parseFloat(rayans7))){ rayLife = 10 @@ -2851,6 +2852,7 @@ elements.specific_ray_emitter = { } var rayans8 = prompt("Would you like rainbow mode to be enabled? Type yes or no.", (rainbowMode||"no")); if (rayans8 == "yes"){rainbowMode = true} else {rainbowMode = false} + } }, hoverStat: function(pixel){ return (pixel.rayElement.toUpperCase() || "unset") + ", " + (pixel.rayStoppedByWalls.toString().toUpperCase() || "unset") + ", " + (pixel.specificRayStart || "unset") + ", " + (pixel.specificRayEnd || "unset") + ", " + (pixel.specificRayAngle || "unset") @@ -2967,7 +2969,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; @@ -3048,7 +3094,7 @@ elements.piston_ray_emitter = { var lx = lcoord[0]; var ly = lcoord[1]; if (!isEmpty(lx, ly, true)){ - tryMove(pixelMap[lx][ly], pCoord[0], pCoord[1]) + tryMove(pixelMap[lx][ly], pCoord[0], pCoord[1], null, true) } pCoord[0] = lx; pCoord[1] = ly; @@ -3108,7 +3154,7 @@ elements.specific_piston_ray_emitter = { var lx = lcoord[0]; var ly = lcoord[1]; if (!isEmpty(lx, ly, true)){ - tryMove(pixelMap[lx][ly], pCoord[0], pCoord[1]) + tryMove(pixelMap[lx][ly], pCoord[0], pCoord[1], null, true) } pCoord[0] = lx; pCoord[1] = ly; @@ -3118,4 +3164,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