2 Commits

Author SHA1 Message Date
dumb-kevin cf923a1e65 Walk upward through z-levels in is_roofed, fix underground assumption
is_roofed checks all z-levels above instead of just z+1. Removes the
z < 0 always-roofed shortcut. NO_FLOOR_WATER blocks precipitation.
Weather wetting drops is_creature_outside (walls don't block rain).
2026-03-09 23:42:18 +04:00
dumb-kevin 21ee04536e Add map::is_roofed() for precipitation blocking checks
Replace the inline TFLAG_NO_FLOOR hack in weather wetting with a
proper cached map API. Uses floor_cache at z+1 when clean, falls back
to direct terrain/furniture/vehicle flag checks otherwise.

Handles glass floors, SUN_ROOF_ABOVE overrides, and vehicle
ROOF/OPAQUE parts. Adds test coverage for all paths.
2026-03-08 20:03:39 +04:00