only tick nonwaiting objects

This commit is contained in:
2026-07-11 12:04:33 -05:00
parent b1b723fd1b
commit f1eaaae5d0
7 changed files with 55 additions and 13 deletions
+2 -6
View File
@@ -40,9 +40,6 @@ fn init(me) {
// 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(me, dt) {
if !me.waiting { dance(me); }
}
fn dance(me) {
move(East);
move(South);
move(North);
@@ -183,10 +180,9 @@ fn tick(me, dt) {
# A trigger script: no glyph, not solid — it just watches for the player stepping
# onto its cell and logs. Triggers are placed via [[boards.NAME.triggers]].
tripwire = """
fn tick(me, dt) {
if Player.x == me.x && Player.y == me.y && !me.waiting {
fn enter(me, dir) {
if Player.x == me.x && Player.y == me.y {
log("tripwire: the player crossed here");
me.delay(2.0);
}
}
"""