Files
kiln/kiln-core/src/scripts/gem.rhai
T

10 lines
364 B
Plaintext
Raw Normal View History

2026-08-11 23:22:16 -05:00
// Built-in script for the `gem` archetype (see kiln-core/src/builtin.rs).
2026-06-21 18:27:45 -05:00
//
2026-08-11 23:22:16 -05:00
// A gem is a collectible: it is solid, so walking into it fires this `bump()`
// hook. We bank the gem and `die()`, which clears the cell — so the move that
// bumped us completes and the player ends up standing where the gem was.
2026-08-10 22:13:21 -05:00
fn bump(me, _dir) {
2026-07-07 23:58:51 -05:00
alter_gems(1);
2026-06-21 18:27:45 -05:00
die();
}