transporters
This commit is contained in:
+2
-2
@@ -262,7 +262,7 @@ engine after the batch. The *subject* of a write is implicit and varies by funct
|
||||
| Call | Subject | Cost | Description |
|
||||
|------|---------|------|-------------|
|
||||
| `move(dir)` | self | 0.25 s | Enqueue a one-cell move, plus a rate-limiting delay (~4/s). A blocked move still costs the cooldown. |
|
||||
| `teleport(x, y)` | self | 0 | Jump to an arbitrary cell. Refused (error logged at resolve) if self is solid and the destination is occupied. |
|
||||
| `teleport(id, x, y)` | arbitrary entity | 0 | Jump entity `id` to an arbitrary cell (pass `me.id` for self; `id == -1` is the player). Refused (error logged at resolve) if that entity is solid and the destination already holds a *different* solid. |
|
||||
| `push(x, y, dir)` | arbitrary cell | 0 | Shove the pushable chain at `(x, y)` one step in `dir`. |
|
||||
| `shift([[x, y], …])` | arbitrary cells | 0 | Rotate cell contents: each listed cell moves to the next coordinate, last→first. Skips non-pushables and won't move into a non-vacated occupied cell. |
|
||||
| `set_tile(n)` | self | 0 | Set glyph tile index (CP437 code point in the default font). |
|
||||
@@ -402,7 +402,7 @@ they are shape problems.
|
||||
delta" operations use *different* verbs: `alter_gems` vs `alter_health`.
|
||||
- **The implicit subject of a write is unpredictable.** `set_tile`/`set_fg`/`say`/`die` act on
|
||||
**self**; `alter_gems`/`alter_health`/`set_key` act on the **player**; `set_tag`/`send` act on an
|
||||
**arbitrary target**; `push`/`shift`/`teleport` act on **cells**. The `set_*` prefix in particular
|
||||
**arbitrary target**; `push`/`shift` act on **cells** and `teleport` on an **arbitrary entity**. The `set_*` prefix in particular
|
||||
means three different subjects.
|
||||
- **Reads are methods/getters on handles, but writes are free functions.** `me.blocked(dir)` reads,
|
||||
but `move(dir)` (the matching write) is a bare global that acts on `me` implicitly — the symmetry is
|
||||
|
||||
Reference in New Issue
Block a user