feat(api-gdext): Add Rust bindings for Godot engine extensions with new API functions and compatibility improvements

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-04-08 17:32:56 -07:00
parent 5d8998a81c
commit 8d7d2af8fd

View file

@ -1625,6 +1625,16 @@ impl GdGameState {
.unwrap_or(0)
}
/// Directly set the turn counter. Used by the iter 7k GDScript adapter
/// to seed the deterministic RNG from the live `GameState.turn_number`
/// so each real game turn produces a different encounter roll stream.
/// Without this, a rebuild-state-per-call pattern always starts with
/// `state.turn = 0` and produces identical RNG draws.
#[func]
fn set_turn(&mut self, turn: i64) {
self.inner.turn = turn.clamp(0, u32::MAX as i64) as u32;
}
/// Total lair count in the attached grid (all tiers).
#[func]
fn lair_count(&self) -> i64 {