Merge pull request #492 from JustAGenericUsername/main
This commit is contained in:
commit
f9782aa75b
|
|
@ -1,6 +1,7 @@
|
|||
var color = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e","f"]
|
||||
var states = ["solid", "liquid", "gas"]
|
||||
var total = 0
|
||||
var dangerouselements = ["supernova", "n_explosion", "pn_explosion", "armageddon", "nuke", "h_bomb"]
|
||||
var elementslist = []
|
||||
for (elementi in elements){
|
||||
elementslist.push(elementi)
|
||||
|
|
@ -36,6 +37,17 @@ for (var i = 1; i <= 10000; i++){
|
|||
elements["element_"+i].reactions[elementslist[Math.floor(Math.random()*elementslist.length)]] = { elem1: elementslist[Math.floor(Math.random()*elementslist.length)], elem2: elementslist[Math.floor(Math.random()*elementslist.length)]}
|
||||
}
|
||||
// console.log(i + " is done!")
|
||||
console.log(i)
|
||||
console.log(elements["element_"+i].behavior)
|
||||
// console.log(i)
|
||||
// console.log(elements["element_"+i].behavior)
|
||||
if (elements["element_" + i].density == i){
|
||||
console.log(i + "is unique because its density is the same as its id!")
|
||||
}
|
||||
for (var reaction in elements["element_" + i].reactions){
|
||||
if (dangerouselements.includes(elements["element_" + i].reactions[reaction].elem1)|| dangerouselements.includes(elements["element_" + i].reactions[reaction].elem2)){
|
||||
console.log(i + " is scary due to its reaction with " + reaction)
|
||||
if (!elements["element_"+i].desc){
|
||||
elements["element_" + i].desc = "This is scary! Don't let it touch " + reaction
|
||||
}else(elements["element_"+i].desc += (" or " + reaction))
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue