diff --git a/mods/UAMM.js b/mods/UAMM.js index acee7e62..bf134799 100644 --- a/mods/UAMM.js +++ b/mods/UAMM.js @@ -15,7 +15,7 @@ elements.rubidium = { var coord = squareCoords[i]; var x = pixel.x+coord[0]; var y = pixel.y+coord[1]; - if(!isEmpty(x, y, true)){ + if (!isEmpty(x, y, true)){ var otherPixel = pixelMap[x][y] if (otherPixel.element == "liquid_ammonia"){foundelem1 = true; break} } @@ -24,7 +24,7 @@ elements.rubidium = { var coord = squareCoords[i]; var x = pixel.x+coord[0]; var y = pixel.y+coord[1]; - if(!isEmpty(x, y, true)){ + if (!isEmpty(x, y, true)){ var otherPixel = pixelMap[x][y] if (otherPixel.element == "oxygen"){foundelem2 = true; break} } @@ -122,6 +122,16 @@ elements.radiocesium = { tempHigh: 29, stateHigh: "liquid_radiocesium", density: 1873, + tick: function (pixel) { + if (Math.random()<0.007) { + if (Math.random()<0.5) { + changePixel(pixel, "barium") + } + else { + changePixel(pixel, "radiobarium") + } + } + }, reactions: { "water": {func: (pixel1) => {pixel1.burning=true;pixel1.burnStart=pixelTicks}, elem1: ["rad_steam", "fallout"], elem2: "explosion"} @@ -136,12 +146,94 @@ elements.liquid_radiocesium = { tempLow: 28, stateLow: "radiocesium", density: 1842, + tick: function (pixel) { + if (Math.random()<0.007) { + if (Math.random()<0.5) { + changePixel(pixel, "barium") + } + else { + changePixel(pixel, "radiobarium") + } + } + }, reactions: { "water": {func: (pixel1) => {pixel1.burning=true;pixel1.burnStart=pixelTicks}, elem1: ["rad_steam", "fallout"], elem2: "explosion"} } }; +elements.barium = { + color: ["#1e1e1e", "#353535", "#4e4e4e", "#696969"], + behavior: behaviors.POWDER, + category: "powders", + state: "solid", + tempHigh: 730, + stateHigh: "liquid_barium", + density: 3510, + reactions: { + "water": {elem1: "barium_hydroxide", elem2: "pop"} + } +}; + +elements.liquid_barium = { + color: ["#1e1e1e", "#353535", "#4e4e4e", "#696969"], + behavior: behaviors.POWDER, + hidden: true, + state: "liquid", + tempLow: 729, + stateLow: "barium", + density: 3338 +} + +elements.radiobarium = { + color: ["#1e1e1e", "#353535", "#4e4e4e", "#696969"], + behavior: behaviors.POWDER, + hidden: true, + state: "solid", + density: 3510, + tick: function (pixel) { + if (Math.random()<0.007) { + changePixel(pixel, "barium") + for (var i = 0; i < squareCoords.length; i++) { + var coord = squareCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + var rays = 0; + if (isEmpty(x, y)){ + createPixel("gamma_ray", x, y) + rays += 1 + if (rays == 2) { + break + } + } + } + } + } +}; + +elements.barium_hydroxide = { + color: ["#f4f4f4", "#ffffff", "#ebebeb", "#e5e5e5"], + behavior: behaviors.POWDER, + hidden: true, + state: "solid", + density: 3510 +} + +elements.gamma_ray = { + color: "#ffffff", + behavior: [ + "XX|XX|XX", + "XX|DL%5|XX", + "XX|XX|XX", + ], + hidden: true, + temp: 1000, + state: "gas", + density: 0.00001, + ignoreAir: true, + tick: behaviors.BOUNCY +}; + elements.lithium = { color: ["#e8e8e8", "#f5f5f5", "#c9c9c9", "#d4d4d4"], behavior: behaviors.POWDER, @@ -174,7 +266,8 @@ elements.lithium = { } }, reactions: { - "water": {elem1: "lithium_hydroxide", elem2: "hydrogen", temp2: 400} + "water": {elem1: "lithium_hydroxide", elem2: "hydrogen", temp2: 400}, + "hydrogen": {elem1:"lithium_hydride", elem2: null, chance: 0.5} } }; @@ -210,7 +303,8 @@ elements.dull_lithium = { } }, reactions: { - "water": {elem1: "lithium_hydroxide", elem2: "hydrogen", temp2: 400} + "water": {elem1: "lithium_hydroxide", elem2: "hydrogen", temp2: 400}, + "hydrogen": {elem1:"lithium_hydride", elem2: null, chance: 0.5} } }; @@ -231,7 +325,7 @@ elements.liquid_lithium = { tempLow: 179.5, stateLow: "lithium", density: 511.7 -} +}; elements.lithium_hydroxide = { color: ["#ffffff", "#f1f1f1", "#e7e7e7", "#ededed"], @@ -241,12 +335,81 @@ elements.lithium_hydroxide = { tempHigh: 180.5, stateHigh: "liquid_lithium", density: 1540, -} +}; + +elements.lithium_hydride = { + color: ["#8a8a8a", "#b5b5b5", "#bbbbbb"], + behavior: behaviors.POWDER, + hidden: true, + state: "solid", + density: 820, + tick: function (pixel){ + var otherPixel; + for (var i = 0; i < squareCoords.length; i++) { + var coord = squareCoords[i]; + var x = pixel.x+coord[0]; + var y = pixel.y+coord[1]; + if (isEmpty(x, y, true)){ + var chance = Math.random() + if(Math.random()<0.003) { + if (chance<0.3) { + changePixel(pixel, "lithium_hydroxide") + } + else if (chance>0.3 && chance<0.7) { + changePixel(pixel, "lithium_oxide") + } + else { + changePixel(pixel, "lithium_carbonate") + } + } + } + if (!isEmpty(x, y, true)) { + otherPixel = pixelMap[x][y]; + if (otherPixel.element != "mineral_oil") { + if (otherPixel.element != "lithium" && otherPixel.element != "dull_lithium" && otherPixel.element != "tarnished_lithium") { + var chance = Math.random() + if(Math.random()<0.0007) { + if (chance<0.3) { + changePixel(pixel, "lithium_hydroxide") + } + else if (chance>0.3 && chance<0.7) { + changePixel(pixel, "lithium_oxide") + } + else { + changePixel(pixel, "lithium_carbonate") + } + } + } + } + } + } + }, +}; + +elements.lithium_oxide = { + color: ["#ffffff", "#ececec", "#dbdbdb"], + behavior: behaviors.POWDER, + hidden: true, + state: "solid", + density: 2013, + reactions: { + "water": {elem1: "lithium_hydroxide", elem2: "pop", chance: 0.2}, + "carbon_dioxide": {elem1: "lithium_carbonate", elem2: null} + } +}; + +elements.lithium_carbonate = { + color: ["#ffffff", "#e0e0e0", "#c9c8c8"], + behavior: behaviors.POWDER, + hidden: true, + state: "solid", + density: 2110 +}; elements.mineral_oil = { color: ["#cdf6fa", "#e6fdff", "#bff9ff", "#f5feff"], behavior: behaviors.LIQUID, state: "liquid", category: "liquids", - density: 870 -} + density: 870, +}; \ No newline at end of file