infra(api-gdext): 🧱 Update Rust GDExtension API functions and bindings for Godot Engine compatibility

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
autocommit 2026-05-18 01:23:25 -07:00
parent eb8b82700c
commit a9fc57d981

View file

@ -3776,6 +3776,23 @@ impl GdGameState {
true
}
/// List every registered AI controller id (sorted, ascending).
/// Bridges `mc_player_api::registered_ids` to GDScript so the
/// game-setup screen (Stage 8) can populate its per-slot
/// "AI Controller" dropdowns without hardcoding the id list.
///
/// At engine boot the registry contains `"scripted:default"`;
/// `ModLoader` (Stage 5) registers additional ids before this
/// is read.
#[func]
fn registered_controller_ids() -> PackedStringArray {
let mut out = PackedStringArray::new();
for id in mc_player_api::registered_ids() {
out.push(&GString::from(id));
}
out
}
/// Current turn number.
#[func]
fn turn(&self) -> i64 {