new layer model

This commit is contained in:
2026-07-10 23:16:28 -05:00
parent 325d2c27dd
commit ad95a9cd8d
36 changed files with 1040 additions and 897 deletions
+3 -2
View File
@@ -261,7 +261,8 @@ The Registry is shared by the whole board, so namespace per-instance keys by `me
Scripts never mutate the world directly. Each write appends an `Action` to the calling object's
**output queue**; the moment the hook returns, that object's ready actions are drained and applied
by the engine — before the next object's hook runs. The *subject* of a write is implicit and varies
by function (see the table).
by function (see the table). The one exception is `log(msg)`: it bypasses the queue and writes to the
game log immediately, so a diagnostic line is never paced by (or stuck behind) the object's delays.
| Call | Subject | Cost | Description |
|------|---------|------|-------------|
@@ -275,7 +276,7 @@ by function (see the table).
| `set_color(fg, bg)` | self | 0 | Set both colors. |
| `set_tag(target_id, tag, present)` | any object | 0 | Add (`true`) / remove (`false`) a tag. Use `me.id` for self. |
| `say(msg)` / `say(msg, secs)` | self | 0 | Speech bubble above this object; default 3 s, or `secs`. Replaces any current bubble. |
| `log(msg)` | log | 0 | Append a plain-text line to the game log. |
| `log(msg)` | log | 0 | Append a plain-text line to the game log. **Immediate** — unlike the other writes it is *not* queued, so it appears the instant it's called, even behind a pending `move`/`delay`. |
| `scroll(lines)` | UI | 0 | Open a full-screen overlay (see below). |
| `send(target_id, fn_name [, arg])` | any object | 0 | Call a handler function on another object; optional string/number arg. |
| `delay(secs)` | self | — | Insert an explicit pause; integer and float overloads. Adjacent delays merge. |