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)) { if(!singularityChoices.includes(singularityName)) {
singularityChoices.push(singularityName); singularityChoices.push(singularityName);
console.log(3);
}; };
} }
if(isNocheer) { if(isNocheer) {
@ -360,13 +361,17 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
}; };
}); });
if(typeof(singularityChoices) === "undefined") {
singularityChoices = [];
};
elements.spawn_random_singularity = { elements.spawn_random_singularity = {
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, excludeRandom: true,
tick: function(pixel) { 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)]);
}, },
}; };