Update EarthDay configuration to replace VineCount with FlowersCount and adjust flower generation logic
This commit is contained in:
@@ -159,7 +159,7 @@ public class ChristmasOptions {
|
||||
|
||||
public class EarthDayOptions {
|
||||
public bool EnableEarthDay { get; set; } = true;
|
||||
public int VineCount { get; set; } = 4;
|
||||
public int FlowersCount { get; set; } = 60;
|
||||
}
|
||||
|
||||
public class EasterOptions {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user