Weather above ground: rain puts out fires, fog shortens sight, storms strike with lightning

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 12:11:19 +01:00
1 parent f98f05f0d2
commit 3e17bdf52d
27 files changed
+555 -5

No files matched your search

+19
View File
@@ -264,3 +264,22 @@ fn export_rogues_scene() {
g.snares.push(idx(cx + 7, cy + 3));
save("rogues", &mut g, cx as f32 + 6.5, cy as f32 + 4.5, 8.0, 0.0, false);
}
// weather above ground: rain and fog over the land
#[test]
#[ignore]
fn export_weather_scenes() {
std::fs::create_dir_all("/tmp/scenes").unwrap();
for (name, kind) in [("weather-rain", crate::weather::RAIN), ("weather-fog", crate::weather::FOG), ("weather-storm", crate::weather::STORM)] {
let mut g = Game::new(7, 96, 96);
g.add_surface(7, 0.5, 3);
g.weather = crate::weather::Weather { kind, shown: kind, level: 1.0, left: 900.0, ..Default::default() };
// the camera on the land above ground, near the edge of the dungeon side
let i = (0..g.map.t.len()).filter(|&i| g.map.sky(i)).min_by_key(|&i| {
let (x, y) = xy(i);
(x - 52).abs() + (y - 48).abs()
}).unwrap();
let (x, y) = xy(i);
save(name, &mut g, x as f32 + 4.5, y as f32 + 0.5, 18.0, 0.0, false);
}
}