molten lithium tweaks
it's more reactive and it isn't hot enough to glow orange
This commit is contained in:
parent
bf54633bc3
commit
a1f8e51341
|
|
@ -1,18 +1,18 @@
|
||||||
neighbors = [[-1,0],[0,-1],[1,0],[0,1]]
|
neighbors = [[-1,0],[0,-1],[1,0],[0,1]]
|
||||||
|
|
||||||
function exposedToAir(pixel) {
|
function exposedToAir(pixel) {
|
||||||
if(isEmpty(pixel.x+neighbors[0][0],pixel.y+neighbors[0][1],true) || isEmpty(pixel.x+neighbors[1][0],pixel.y+neighbors[1][1],true) || isEmpty(pixel.x+neighbors[2][0],pixel.y+neighbors[2][1],true) || isEmpty(pixel.x+neighbors[3][0],pixel.y+neighbors[3][1],true)) {
|
if(isEmpty(pixel.x+neighbors[0][0],pixel.y+neighbors[0][1],true) || isEmpty(pixel.x+neighbors[1][0],pixel.y+neighbors[1][1],true) || isEmpty(pixel.x+neighbors[2][0],pixel.y+neighbors[2][1],true) || isEmpty(pixel.x+neighbors[3][0],pixel.y+neighbors[3][1],true)) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function randomChoice(array) {
|
function randomChoice(array) {
|
||||||
return array[Math.floor(Math.random() * array.length)];
|
return array[Math.floor(Math.random() * array.length)];
|
||||||
}
|
}
|
||||||
|
|
||||||
function tryTarnish(pixel,element,chance) {
|
function tryTarnish(pixel,element,chance) {
|
||||||
if(exposedToAir(pixel)) {
|
if(exposedToAir(pixel)) {
|
||||||
if(Array.isArray(element)) {
|
if(Array.isArray(element)) {
|
||||||
if(Math.random() < chance) {
|
if(Math.random() < chance) {
|
||||||
|
|
@ -24,10 +24,10 @@ function tryTarnish(pixel,element,chance) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Non-element: Liquid ammonia
|
//Non-element: Liquid ammonia
|
||||||
elements.liquid_ammonia = {
|
elements.liquid_ammonia = {
|
||||||
color: "#bab6a9",
|
color: "#bab6a9",
|
||||||
behavior: behaviors.LIQUID,
|
behavior: behaviors.LIQUID,
|
||||||
reactions: {
|
reactions: {
|
||||||
|
|
@ -57,17 +57,17 @@ elements.liquid_ammonia = {
|
||||||
state: "liquid",
|
state: "liquid",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
density: 681.9,
|
density: 681.9,
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.ammonia.tempLow = -78
|
elements.ammonia.tempLow = -78
|
||||||
elements.ammonia.stateLow = "liquid_ammonia"
|
elements.ammonia.stateLow = "liquid_ammonia"
|
||||||
|
|
||||||
//Hydrogen
|
//Hydrogen
|
||||||
//Hydrogen exists, but its solid form doesn't.
|
//Hydrogen exists, but its solid form doesn't.
|
||||||
elements.liquid_hydrogen.tempLow = -259.16
|
elements.liquid_hydrogen.tempLow = -259.16
|
||||||
elements.liquid_hydrogen.stateLow = "hydrogen_ice"
|
elements.liquid_hydrogen.stateLow = "hydrogen_ice"
|
||||||
|
|
||||||
elements.hydrogen_ice = {
|
elements.hydrogen_ice = {
|
||||||
color: "#E6E6FF",
|
color: "#E6E6FF",
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
density: 76,
|
density: 76,
|
||||||
|
|
@ -76,10 +76,10 @@ elements.hydrogen_ice = {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
tempHigh: -259,
|
tempHigh: -259,
|
||||||
stateHigh: "liquid_hydrogen",
|
stateHigh: "liquid_hydrogen",
|
||||||
}
|
}
|
||||||
|
|
||||||
//Lithium
|
//Lithium
|
||||||
elements.lithium = {
|
elements.lithium = {
|
||||||
color: "#b0ab9d",
|
color: "#b0ab9d",
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
tick: function(pixel) {
|
tick: function(pixel) {
|
||||||
|
|
@ -107,12 +107,13 @@ elements.lithium = {
|
||||||
burn: 20,
|
burn: 20,
|
||||||
burnTime: 130,
|
burnTime: 130,
|
||||||
fireColor: "#fc0a22",
|
fireColor: "#fc0a22",
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.molten_lithium = {
|
elements.molten_lithium = {
|
||||||
|
color: "#b0ab9d",
|
||||||
behavior: behaviors.LIQUID,
|
behavior: behaviors.LIQUID,
|
||||||
tick: function(pixel) {
|
tick: function(pixel) {
|
||||||
tryTarnish(pixel,"lithium_oxide",0.008) //oxidation
|
tryTarnish(pixel,"lithium_oxide",0.014) //oxidation
|
||||||
},
|
},
|
||||||
reactions: {
|
reactions: {
|
||||||
"steam": { "elem1": "hydrogen", "elem2": "lithium_hydroxide" }, //should be 2 Li(s) + 2 H2O -> 2 LiOH (aq) + H2(g) according to https://www.lenntech.com/periodic/water/lithium/lithium-and-water.htm#ixzz7LUgLrzua
|
"steam": { "elem1": "hydrogen", "elem2": "lithium_hydroxide" }, //should be 2 Li(s) + 2 H2O -> 2 LiOH (aq) + H2(g) according to https://www.lenntech.com/periodic/water/lithium/lithium-and-water.htm#ixzz7LUgLrzua
|
||||||
|
|
@ -126,9 +127,9 @@ elements.molten_lithium = {
|
||||||
burning: true,
|
burning: true,
|
||||||
fireColor: "#fc0a22",
|
fireColor: "#fc0a22",
|
||||||
density: 512,
|
density: 512,
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.lithium_oxide = {
|
elements.lithium_oxide = {
|
||||||
color: "#eee9ec", //HRT UV-to-visible strategy again
|
color: "#eee9ec", //HRT UV-to-visible strategy again
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
reactions: {
|
reactions: {
|
||||||
|
|
@ -141,9 +142,9 @@ elements.lithium_oxide = {
|
||||||
state: "solid",
|
state: "solid",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
tempHigh: 1438,
|
tempHigh: 1438,
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.lithium_hydroxide = {
|
elements.lithium_hydroxide = {
|
||||||
color: "#eeeeee",
|
color: "#eeeeee",
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
reactions: {
|
reactions: {
|
||||||
|
|
@ -156,9 +157,9 @@ elements.lithium_hydroxide = {
|
||||||
state: "solid",
|
state: "solid",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
tempHigh: 462,
|
tempHigh: 462,
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.lithium_hydroxide_monohydrate = {
|
elements.lithium_hydroxide_monohydrate = {
|
||||||
color: "#e0e4e7",
|
color: "#e0e4e7",
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
reactions: {
|
reactions: {
|
||||||
|
|
@ -185,9 +186,9 @@ elements.lithium_hydroxide_monohydrate = {
|
||||||
category: "powders",
|
category: "powders",
|
||||||
state: "solid",
|
state: "solid",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.lithium_carbonate = { //todo?: https://en.wikipedia.org/wiki/Lithium_carbonate
|
elements.lithium_carbonate = { //todo?: https://en.wikipedia.org/wiki/Lithium_carbonate
|
||||||
color: "#eeeeee",
|
color: "#eeeeee",
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
density: 2110,
|
density: 2110,
|
||||||
|
|
@ -195,9 +196,9 @@ elements.lithium_carbonate = { //todo?: https://en.wikipedia.org/wiki/Lithium_ca
|
||||||
state: "solid",
|
state: "solid",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
tempHigh: 723,
|
tempHigh: 723,
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.lithium_nitride = {
|
elements.lithium_nitride = {
|
||||||
color: "#eeeeee",
|
color: "#eeeeee",
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
reactions: {
|
reactions: {
|
||||||
|
|
@ -211,9 +212,9 @@ elements.lithium_nitride = {
|
||||||
state: "solid",
|
state: "solid",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
tempHigh: 813,
|
tempHigh: 813,
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.lithium_hydride = {
|
elements.lithium_hydride = {
|
||||||
color: "#eeeeee",
|
color: "#eeeeee",
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
reactions: { //this stuff is really f***ing reactive
|
reactions: { //this stuff is really f***ing reactive
|
||||||
|
|
@ -226,9 +227,9 @@ elements.lithium_hydride = {
|
||||||
state: "solid",
|
state: "solid",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
tempHigh: 689,
|
tempHigh: 689,
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.lithium_amide = {
|
elements.lithium_amide = {
|
||||||
color: "#eeeeee",
|
color: "#eeeeee",
|
||||||
behavior: behaviors.POWDER,
|
behavior: behaviors.POWDER,
|
||||||
reactions: {
|
reactions: {
|
||||||
|
|
@ -240,6 +241,6 @@ elements.lithium_amide = {
|
||||||
state: "solid",
|
state: "solid",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
tempHigh: 375,
|
tempHigh: 375,
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sodium exists
|
//Sodium exists
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue