Files
kiln/maps/tiny.toml
T
2026-07-10 23:16:28 -05:00

46 lines
1.3 KiB
TOML

[world]
name = "Tiny"
start = "start"
# Named Rhai scripts shared across all boards in this world.
# Objects reference a script by name via `script_name`.
[scripts]
greeter = """
fn init(me) {
log(`hello from object — player at ${Player.x}, ${Player.y}`);
set_tile(2); // change my glyph to ☻ — proves the write path
//say("Hello there,\\ntraveller!");
log(`Player health: ${Player.health}`);
}
fn tick(me, dt) {
if Player.x == me.x && Player.y == me.y && !me.waiting {
say("Hey! Get offa me!");
me.queue.delay(5.0);
}
}
"""
[boards.start.map]
name = "Starting Room"
width = 21
height = 6
# No floor attribute → a blank (black) floor.
# The single grid: all solids and most non-solids. A space is always a transparent
# empty cell, so the floor shows through.
[boards.start.grid]
content = """
#####################
# #
# G @ #
# oo #
# #
#####################
"""
[boards.start.grid.palette]
"#" = { kind = "wall", tile = "#", fg = "#808080", bg = "#606060" }
"o" = { kind = "crate", tile = 254, fg = "#aaaaaa", bg = "#000000" }
"@" = { kind = "player" }
"G" = { kind = "object", tile = "#", fg = "#aa3333", bg = "#000000", solid = false, script_name = "greeter" }