This commit is contained in:
Laetitia (O-01-67) 2022-12-20 15:58:57 -05:00 committed by GitHub
parent 1ecde15f63
commit 87b2079f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 8 deletions

View File

@ -215,6 +215,7 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
};
if(!singularityChoices.includes(singularityName)) {
singularityChoices.push(singularityName);
console.log(3);
};
}
if(isNocheer) {
@ -275,14 +276,14 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
if(newElement !== testName) {
//Jinsoulite handling
if(typeof(jinsouliteSpreadWhitelist) !== "undefined") {
if(jinsouliteSpreadWhitelist.includes(newPixel.element)) {
if(newPixel.value > 0) { //if jinsoulitoid and value is positive
//if compressor has no recorded water, initialize to zero
if(typeof(pixel.absorbed.water) === "undefined") { pixel.absorbed.water = 0 };
//add jinsoulite's water to compressor water
pixel.absorbed.water += newPixel.value;
if(jinsouliteSpreadWhitelist.includes(newPixel.element)) {
if(newPixel.value > 0) { //if jinsoulitoid and value is positive
//if compressor has no recorded water, initialize to zero
if(typeof(pixel.absorbed.water) === "undefined") { pixel.absorbed.water = 0 };
//add jinsoulite's water to compressor water
pixel.absorbed.water += newPixel.value;
};
};
};
};
//Alkahest handling
@ -360,13 +361,17 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
};
});
if(typeof(singularityChoices) === "undefined") {
singularityChoices = [];
};
elements.spawn_random_singularity = {
color: ["#3e5f8a","#a334ec","#ea96f9","#a6ecf6","#70ebc8","#d9286b","#7eed91","#a18b30"],
behavior: behaviors.WALL,
category: "special",
excludeRandom: true,
tick: function(pixel) {
changePixel(pixel,singularityChoices[Math.floor(Math.random() * singularityChoices.length)])
singularityChoices.length == 0 ? deletePixel(pixel.x,pixel.y) : changePixel(pixel,singularityChoices[Math.floor(Math.random() * singularityChoices.length)]);
},
};