redoing bump

This commit is contained in:
2026-07-08 13:21:27 -05:00
parent f407b5d9a6
commit e545395ac6
12 changed files with 243 additions and 90 deletions
+9 -9
View File
@@ -56,16 +56,16 @@ fn dance(me) {
say("Ho!", 0.5);
me.delay(0.5);
}
// Fires when something steps into this object; id is the bumper's object id,
// or -1 for the player.
fn bump(me, id) {
log(`mover bumped by ${id}`);
// Fires when a solid (the player, an object, or a pushed crate) presses into this
// object; dir is the direction the bump came from.
fn bump(me, dir) {
log(`mover bumped from ${dir}`);
say("Ow!");
}
"""
muffin = """
fn bump(me, _id) {
fn bump(me, _dir) {
scroll([
"You find a small muffin on the ground, your favorite kind.",
"It smells of cinnamon and warm mornings.",
@@ -84,7 +84,7 @@ fn ignore() {
"""
noticeboard = """
fn bump(me, id) {
fn bump(me, _dir) {
scroll([
" TOWN NOTICE BOARD",
" ",
@@ -117,7 +117,7 @@ fn bump(me, id) {
"""
bookshelf = """
fn bump(me, id) {
fn bump(me, _dir) {
scroll([
" THE BOOKSHELF",
" ",
@@ -136,13 +136,13 @@ fn bump(me, id) {
"""
fireplace = """
fn bump(me, id) {
fn bump(me, _dir) {
say("The fire crackles warmly.\\nYou feel at ease.");
}
"""
chest = """
fn bump(me, id) {
fn bump(me, _dir) {
scroll([
" THE CHEST",
" ",