Files
kiln/maps/tiny.toml
T

45 lines
1.2 KiB
TOML
Raw Normal View History

2026-06-28 00:12:52 -05:00
[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 = """
2026-07-10 23:16:28 -05:00
fn init(me) {
log(`hello from object — player at ${Player.x}, ${Player.y}`);
2026-06-28 00:12:52 -05:00
set_tile(2); // change my glyph to ☻ — proves the write path
//say("Hello there,\\ntraveller!");
2026-07-10 23:16:28 -05:00
log(`Player health: ${Player.health}`);
2026-06-28 00:12:52 -05:00
}
2026-07-10 23:16:28 -05:00
fn tick(me, dt) {
if Player.x == me.x && Player.y == me.y && !me.waiting {
2026-06-28 00:12:52 -05:00
say("Hey! Get offa me!");
me.queue.delay(5.0);
}
}
"""
2026-07-24 21:52:05 -05:00
[boards.start]
2026-06-28 00:12:52 -05:00
name = "Starting Room"
width = 21
height = 6
2026-07-10 23:16:28 -05:00
# No floor attribute → a blank (black) floor.
2026-06-28 00:12:52 -05:00
2026-07-24 21:52:05 -05:00
grid = """
2026-06-28 00:12:52 -05:00
#####################
# #
# G @ #
2026-07-26 11:18:30 -05:00
# oo hh #
2026-06-28 00:12:52 -05:00
# #
#####################
"""
2026-07-24 21:52:05 -05:00
[boards.start.palette]
"#" = { type = "builtin", kind = "wall" }
2026-08-04 22:56:05 -05:00
"o" = { type = "builtin", kind = "crate", tile = 254, fg = "#4444bb", bg = "#000000" }
2026-07-24 21:52:05 -05:00
"@" = { type = "player" }
# "G" = { type = "object", tile = 35, fg = "#aa3333", bg = "#000000", enter = "block", script_name = "greeter" }
2026-07-26 11:18:30 -05:00
"h" = { type = "builtin", kind = "heart" }
2026-07-24 21:52:05 -05:00
"G" = { type = "builtin", kind = "gem" }