Tree growth: dedicated stage atlas + tuned WildGrowth rate

Sub-mature stages (0/1/2) now use FG_Tree_Stages.png (a 128×32 atlas
with 8 progressively-larger tree cells from the bundle's "Crops with
Stages 03" pack). Stage 0 = tiny sprout (col 0), Stage 1 = small
leaf (col 1), Stage 2 = small tree (col 3). Stage 3 (Mature) keeps
the existing 64×80 seasonal canopy atlases.

Visually distinct progression replaces the previous scale-down-the-
mature-texture placeholder + procedural sapling dots.

WildGrowth pacing tuned: INTERVAL 1200 → 3000, PROBABILITY 0.30 →
0.12, LIMIT 60 → 80. Previous values flooded the map with saplings
within ~30 seconds of 12× play. New rate gives a slow but visible
regrowth over a season at default speed.

_draw simplified: removed procedural sapling fallback (atlas handles
all stages now). Pending-plant ghosts get the alpha tint via
sprite.modulate.
This commit is contained in:
megaproxy 2026-05-16 16:42:38 +01:00
parent d98d2c2425
commit 5a6ec53b12
4 changed files with 78 additions and 37 deletions

View file

@ -98,9 +98,9 @@ const HAUL_SWEEP_INTERVAL_TICKS: int = 100
# WildGrowth — spontaneous sapling spawning on eligible grass tiles.
# 1200 ticks = 1 in-game hour at 20 Hz (20 ticks/s × 60 s/min = 1200 ticks/min,
# but 1 in-game minute = 20 ticks at 1× so 1 hour = 1200 ticks at 1×).
const WILD_GROWTH_INTERVAL: int = 1200
const WILD_GROWTH_SPAWN_PROBABILITY: float = 0.30
const MAP_TREE_LIMIT: int = 60
const WILD_GROWTH_INTERVAL: int = 3000 # ~2.5 in-game hours between attempts
const WILD_GROWTH_SPAWN_PROBABILITY: float = 0.12 # 12% chance per attempt
const MAP_TREE_LIMIT: int = 80
# Rejection-sample attempts before giving up for this tick.
const WILD_GROWTH_MAX_ATTEMPTS: int = 10