Added scroll()
This commit is contained in:
+29
-1
@@ -66,7 +66,7 @@ content = """
|
||||
# # #
|
||||
# | #
|
||||
# #
|
||||
# oo G - @ #
|
||||
# oo G - M @ #
|
||||
# #
|
||||
# #
|
||||
# #
|
||||
@@ -102,6 +102,15 @@ bg = "#000000"
|
||||
tile = 1
|
||||
script_name = "mover"
|
||||
|
||||
[[objects]]
|
||||
palette = "M"
|
||||
tile = 15
|
||||
fg = "#ffdd88"
|
||||
bg = "#000000"
|
||||
solid = true
|
||||
name = "muffin"
|
||||
script_name = "muffin"
|
||||
|
||||
[scripts]
|
||||
greeter = """
|
||||
fn init() {
|
||||
@@ -134,4 +143,23 @@ fn bump(id) {
|
||||
log(`mover bumped by ${id}`);
|
||||
say("Ow!");
|
||||
}
|
||||
"""
|
||||
|
||||
muffin = """
|
||||
fn bump(id) {
|
||||
scroll([
|
||||
"You find a small muffin on the ground, your favorite kind.",
|
||||
"It smells of cinnamon and warm mornings.",
|
||||
["eat", "Pick up the muffin and eat it."],
|
||||
["ignore", "This is obviously a trap — ignore it."]
|
||||
]);
|
||||
}
|
||||
fn eat() {
|
||||
log("You ate the muffin. Delicious.");
|
||||
say("Mmm!");
|
||||
}
|
||||
fn ignore() {
|
||||
log("You walk away from the muffin. Wise.");
|
||||
say("Suspicious...");
|
||||
}
|
||||
"""
|
||||
Reference in New Issue
Block a user