Update EarthDay configuration to replace VineCount with FlowersCount and adjust flower generation logic

This commit is contained in:
CodeDevMLH
2026-02-28 14:08:12 +01:00
parent 25e678af8d
commit 9f7ecd9cd0
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
const config = window.SeasonalsPluginConfig?.EarthDay || {};
const enabled = config.EnableEarthDay !== undefined ? config.EnableEarthDay : true; // enable/disable earthday
const vineCount = config.VineCount !== undefined ? config.VineCount : 4; // count of vine
const flowersCount = config.FlowersCount !== undefined ? config.FlowersCount : 60; // count of vine
const flowerColors = ['#FF69B4', '#FFD700', '#87CEFA', '#FF4500', '#BA55D3', '#FFA500', '#FF1493'];
@@ -68,7 +68,7 @@ function createElements() {
}
// Generate Flowers
const flowerCount = Math.max(10, vineCount * 15);
const flowerCount = Math.max(10, flowersCount);
for (let i = 0; i < flowerCount; i++) {
const x = 10 + Math.random() * (w - 20);
const y = hSVG * 0.1 + Math.random() * (hSVG * 0.5);