multi-board files

This commit is contained in:
2026-06-12 23:35:40 -05:00
parent 8e79b30583
commit e5c6affc41
4 changed files with 28 additions and 15 deletions
+2
View File
@@ -6,6 +6,8 @@ pub mod game;
pub mod log;
/// Map file loading and saving (`.toml` format).
pub mod map_file;
/// World type: a named collection of boards in a single `.toml` file ([`world::World`], [`world::load`]).
pub mod world;
/// Rhai scripting runtime for board objects ([`script::ScriptHost`]).
pub mod script;
pub mod glyph;
+2 -1
View File
@@ -104,7 +104,8 @@ fn start_map_greeter_runs_init() {
// confirm the greeter read the board (interpolated message) and wrote to
// itself (set_tile). Also guards the example from drifting out of sync.
let path = concat!(env!("CARGO_MANIFEST_DIR"), "/../maps/start.toml");
let board = crate::map_file::load(path).expect("load start.toml");
let mut world = crate::world::load(path).expect("load start.toml");
let board = world.boards.remove(&world.start).expect("start board");
let mut game = GameState::new(board);
game.run_init();
assert!(