some auto-refactoring

This commit is contained in:
2026-06-13 15:33:04 -05:00
parent 887e1fefea
commit 78547696d7
10 changed files with 146 additions and 180 deletions
+16 -4
View File
@@ -1,6 +1,6 @@
[world]
name = "Kiln Demo"
start = "house"
start = "start"
# Named Rhai scripts shared across all boards in this world.
# Objects reference a script by name via `script_name`.
@@ -26,9 +26,21 @@ mover = """
// tick() runs. Queue.length() avoids piling up moves; blocked() avoids walking
// into a wall (or another object's already-queued move this tick).
fn tick(dt) {
if Queue.length() == 0 {
move(East);
}
if Queue.length() == 0 { init(); }
}
fn init() {
move(East);
move(South);
move(North);
move(East);
say("Hey!", 0.5);
delay(0.5);
move(West);
move(South);
move(North);
move(West);
say("Ho!", 0.5);
delay(0.5);
}
// Fires when something steps into this object; id is the bumper's object id,
// or -1 for the player.