forgor what i did

This commit is contained in:
O-01-67 2022-09-01 14:50:10 -04:00 committed by GitHub
parent 74bbffdab2
commit 724e7f9de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -15,6 +15,7 @@ function _randomInt(max) {
}
excludedElements = ["ketchup", "liquid_cloner", "fire_cloner"]
includedElements = ["ketchup_spout", "spout", "udder", "torch", "sun"]
runAfterLoad(function() {
liquidArray = Object.keys(elements).filter(function(e) {
@ -38,4 +39,20 @@ runAfterLoad(function() {
elements[`${liquidArray[i]}_spout`].excludeRandom = false;
};
};
spoutChoices = Object.keys(elements).filter(function(e) {
return elements[e].category == "spouts" || includedElements.includes(elements[e]);
});
spoutChoices = spoutChoices.filter(function(e) {
return !elements[e.slice(0,-6)].excludeRandom;
});
});
elements.random_spout = {
color: ["#3e5f8a","#a334ec","#ea96f9","#a6ecf6","#70ebc8","#d9286b","#7eed91","#a18b30"],
behavior: behaviors.WALL,
category: "special",
excludeRandom: true,
tick: function(pixel) {
changePixel(pixel,spoutChoices[Math.floor(Math.random() * spoutChoices.length)])
},
};