Archive incari-client (client, 26.3, clean)

This commit is contained in:
2026-11-28 00:54:38 -06:00
parent 7a6174687f
commit 12838e838c
2383 changed files with 280266 additions and 0 deletions
@@ -0,0 +1,25 @@
// The zoom, while it's on: Horizon asks while playing, and the spyglass's own wins.
fn incari_zoom_view(
game: &crate::game::Game<'_>,
zoom: &mut Option<crate::game::native_hooks::NativeZoom>,
) {
use crate::game::{incari_client as c, incari_zoom as m};
let _ = game;
let wanted = c::settings(m::ID, |s| {
(
s.choice("mode"),
m::zoom(s.float("amount"), s.choice("turning"), s.bool("ease")),
)
});
let active = m::with(|k| k.active(wanted.map(|w| w.0)));
if zoom.is_some() || !active {
return;
}
if let Some((_, (factor, smooth, turn))) = wanted {
*zoom = Some(crate::game::native_hooks::NativeZoom {
factor,
smooth,
turn,
});
}
}