feat: sodium
Added Sodium element along with Sodium Hydroxide and Liquid Sodium.
This commit is contained in:
parent
d1a8b1e45d
commit
5e7fe2d96b
64
mods/UAMM.js
64
mods/UAMM.js
|
|
@ -406,10 +406,72 @@ elements.lithium_carbonate = {
|
|||
density: 2110
|
||||
};
|
||||
|
||||
elements.sodium = {
|
||||
color: ["#e8e8e8", "#f5f5f5", "#c9c9c9", "#d4d4d4"],
|
||||
behavior: behaviors.POWDER,
|
||||
category: "powders",
|
||||
state: "solid",
|
||||
tempHigh: 98,
|
||||
stateHigh: "liquid_sodium",
|
||||
density: 968,
|
||||
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)){
|
||||
if(Math.random()<0.003) {
|
||||
changePixel(pixel, "sodium_hydroxide")
|
||||
}
|
||||
}
|
||||
if (!isEmpty(x, y, true)) {
|
||||
otherPixel = pixelMap[x][y];
|
||||
if (otherPixel.element != "mineral_oil") {
|
||||
if (otherPixel.element != "sodium" && otherPixel.element != "sodium_hydroxide") {
|
||||
if(Math.random()<0.001) {
|
||||
changePixel(pixel, "sodium_hydroxide")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
reactions: {
|
||||
"water": {elem1: "sodium_hydroxide", elem2: "hydrogen", temp1: 200, chance: 0.1},
|
||||
"salt_water": {elem1: "sodium_hydroxide", elem2: "hydrogen", temp1: 200, chance: 0.1},
|
||||
}
|
||||
};
|
||||
|
||||
elements.liquid_sodium = {
|
||||
color: ["#e8e8e8", "#f5f5f5", "#c9c9c9", "#d4d4d4"],
|
||||
behavior: behaviors.LIQUID,
|
||||
hidden: true,
|
||||
state: "liquid",
|
||||
density: 951,
|
||||
reactions: {
|
||||
"water": {elem1: "sodium_hydroxide", elem2: "hydrogen", temp1: 200, chance: 0.001},
|
||||
"salt_water": {elem1: "sodium_hydroxide", elem2: "hydrogen", temp1: 200, chance: 0.001},
|
||||
}
|
||||
};
|
||||
|
||||
elements.sodium_hydroxide = {
|
||||
color: ["#ffffff", "#f1f1f1", "#e7e7e7", "#ededed"],
|
||||
behavior: behaviors.POWDER,
|
||||
hidden: true,
|
||||
state: "solid",
|
||||
density: 2100,
|
||||
reactions: {
|
||||
"water": {elem1: "salt_water", elem2: null, chance: 0.1},
|
||||
"salt_water": {elem1: "salt_water", elem2: null, chance: 0.1},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
elements.mineral_oil = {
|
||||
color: ["#cdf6fa", "#e6fdff", "#bff9ff", "#f5feff"],
|
||||
behavior: behaviors.LIQUID,
|
||||
state: "liquid",
|
||||
category: "liquids",
|
||||
density: 870,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue