acdream/tests/AcDream.Core.Tests/World
Erik 53608e77e3 sky(phase-5a): remove DayGroup-name rain hack, ship retail-only Overcast mapping
User-observed regression 2026-04-23: acdream spawned rain particles
when retail showed no rain at the same server tick. Root cause: my
Phase 3e shortcut mapped DayGroup.Name = "Rainy" → WeatherKind.Rain →
rain particle emitter. That's not what retail does.

Parallel decompile research confirms:
- Agent A (2026-04-23-physicsscript.md): PhysicsScript runtime lives
  at FUN_0051bed0 → FUN_0051bfb0, runs per PhysicsObj; sky calls it
  from NOWHERE.
- Agent B (2026-04-23-sky-pes-wiring.md): FUN_00508010 (sky render
  loop) never reads SkyObject.DefaultPesObjectId — the field is dead
  at render time. Rain/snow particles in retail come from a separate
  camera-attached weather subsystem that has NOT yet been located.

So the correct behavior is: DayGroup name should only drive
fog/ambient tone (via keyframes, already in the Snapshot path),
never spawn particle emitters. Any retail-faithful particle rain
belongs to a future phase once we find the camera-attached weather
subsystem driver.

Change: MapDayGroupNameToKind now maps all weathery substrings
(storm/snow/rain/cloud/overcast/dark/fog) → Overcast — fog-only
visuals, no particle spawn. Clear names stay Clear. The Rain, Snow,
Storm enum values remain and are still accessible via ForceWeather()
for debug overrides.

Tests updated (WeatherSystemTests): the name→kind theory now expects
Overcast for Rainy/Snowy/Stormy variants.

Also commits the four research docs from this session's parallel
hunt: PhysicsScript dat+runtime, sky↔PES wiring (negative finding),
lightning timer (negative finding — agent #3), fog on sky
(positive: retail applies fog to sky geometry).

NOTE on lightning: agent #3's research only ruled out the CLIENT-SIDE
RANDOM TIMER hypothesis for lightning. User confirms retail does have
visible lightning + thunder. A follow-up agent (#5, in flight as of
this commit) is hunting the real mechanism — PlayScript opcode,
SetLight PhysicsScript hooks, AdminEnvirons side effects, or the
weather-volume draw. This commit does NOT attempt to port lightning.

Build + 733 tests green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 11:04:36 +02:00
..
DerethDateTimeTests.cs fix(world): DerethDateTime tick-0 offset — sky was 7/16 of a day wrong 2026-04-19 14:27:49 +02:00
LandblockLoaderTests.cs feat(core): add LandblockLoader with Stab+Building → WorldEntity mapping 2026-04-10 17:58:30 +02:00
SceneryGeneratorTests.cs fix(app+core): Phase B.3 — Setup.StepUpHeight + scenery road exclusion 2026-04-12 18:27:36 +02:00
SkyDescLoaderTests.cs feat(world): Phase G.1 data model — dat-accurate SkyKeyframe + WeatherSystem 2026-04-19 10:29:33 +02:00
SkyStateTests.cs fix(world): DerethDateTime tick-0 offset — sky was 7/16 of a day wrong 2026-04-19 14:27:49 +02:00
WeatherSystemTests.cs sky(phase-5a): remove DayGroup-name rain hack, ship retail-only Overcast mapping 2026-04-24 11:04:36 +02:00
WorldTimeDebugTests.cs fix(world): DerethDateTime tick-0 offset — sky was 7/16 of a day wrong 2026-04-19 14:27:49 +02:00
WorldViewTests.cs feat(core): add WorldView with 3x3 neighbor landblock computation 2026-04-10 18:02:41 +02:00