change random exclusions to use a property
This commit is contained in:
parent
42f3e9dd87
commit
49c0d647d7
11
index.html
11
index.html
|
|
@ -1083,11 +1083,13 @@
|
||||||
color: ["#3e5f8a","#a334ec","#ea96f9","#a6ecf6","#70ebc8","#d9286b","#7eed91","#a18b30"],
|
color: ["#3e5f8a","#a334ec","#ea96f9","#a6ecf6","#70ebc8","#d9286b","#7eed91","#a18b30"],
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
category: "special",
|
category: "special",
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"filler": {
|
"filler": {
|
||||||
color: "#ae4cd9",
|
color: "#ae4cd9",
|
||||||
behavior: behaviors.FILL,
|
behavior: behaviors.FILL,
|
||||||
category:"special",
|
category:"special",
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"lattice": {
|
"lattice": {
|
||||||
color: "#cb4cd9",
|
color: "#cb4cd9",
|
||||||
|
|
@ -1098,6 +1100,7 @@
|
||||||
],
|
],
|
||||||
hidden: true,
|
hidden: true,
|
||||||
category:"special",
|
category:"special",
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"gravel": {
|
"gravel": {
|
||||||
color: ["#E3E0DF","#B1ABA3","#74736D","#524B47"],
|
color: ["#E3E0DF","#B1ABA3","#74736D","#524B47"],
|
||||||
|
|
@ -1697,6 +1700,7 @@
|
||||||
],
|
],
|
||||||
category:"special",
|
category:"special",
|
||||||
hidden:true,
|
hidden:true,
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"horizontal": {
|
"horizontal": {
|
||||||
color: "#d9d9d9",
|
color: "#d9d9d9",
|
||||||
|
|
@ -1707,6 +1711,7 @@
|
||||||
],
|
],
|
||||||
category:"special",
|
category:"special",
|
||||||
hidden:true,
|
hidden:true,
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"rocket": {
|
"rocket": {
|
||||||
color: "#ff0000",
|
color: "#ff0000",
|
||||||
|
|
@ -2405,6 +2410,7 @@
|
||||||
category: "special",
|
category: "special",
|
||||||
state: "solid",
|
state: "solid",
|
||||||
density: 21450,
|
density: 21450,
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"clone_powder": {
|
"clone_powder": {
|
||||||
color: "#f0f000",
|
color: "#f0f000",
|
||||||
|
|
@ -2442,6 +2448,7 @@
|
||||||
category: "special",
|
category: "special",
|
||||||
state: "solid",
|
state: "solid",
|
||||||
density: 600,
|
density: 600,
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"permafrost": {
|
"permafrost": {
|
||||||
color: ["#557d65","#557d79"],
|
color: ["#557d65","#557d79"],
|
||||||
|
|
@ -3637,6 +3644,7 @@
|
||||||
],
|
],
|
||||||
rotatable: true,
|
rotatable: true,
|
||||||
category: "special",
|
category: "special",
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"loopy": {
|
"loopy": {
|
||||||
color: "#eb3474",
|
color: "#eb3474",
|
||||||
|
|
@ -4126,6 +4134,7 @@
|
||||||
state: "solid",
|
state: "solid",
|
||||||
density: 1300,
|
density: 1300,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
"tesla_coil": {
|
"tesla_coil": {
|
||||||
color: "#725C38",
|
color: "#725C38",
|
||||||
|
|
@ -6390,7 +6399,7 @@ for (var k = 0; k < b0.split(" AND ").length; k++) {
|
||||||
}
|
}
|
||||||
// randomChoices = the keys of "elements" with "filler", "lattice", "gray_goo", and any element with the category "tools" removed
|
// randomChoices = the keys of "elements" with "filler", "lattice", "gray_goo", and any element with the category "tools" removed
|
||||||
randomChoices = Object.keys(elements).filter(function(e) {
|
randomChoices = Object.keys(elements).filter(function(e) {
|
||||||
return e != "filler" && e != "lattice" && e != "gray_goo" && elements[e].category != "tools" && e != "random" && e != "virus" && e != "vertical" && e != "horizontal" && e != "snake" && e != "armageddon";
|
return elements[e].excludeRandom != true && elements[e].category != "tools";
|
||||||
});
|
});
|
||||||
//...drawing code...
|
//...drawing code...
|
||||||
gameCanvas.addEventListener("mousedown", mouseClick);
|
gameCanvas.addEventListener("mousedown", mouseClick);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue