From 87dacfbb3dd16e7f55a82361eace98f9a39d75c8 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 27 Jun 2026 21:25:20 -0400 Subject: feat: room-specific objects can be defined inline in room yaml --- internal/game/act.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'internal/game/act.go') diff --git a/internal/game/act.go b/internal/game/act.go index 78f298d..654b65c 100644 --- a/internal/game/act.go +++ b/internal/game/act.go @@ -105,8 +105,12 @@ func (g *Game) startAction(sess *net.Session, verb, target string) { return } var err error - obj, err = g.ObjectStore.Load(chosen.DefID) - if err != nil || !obj.IsInteractable() { + obj, err = g.resolveObjectDef(p.RoomID, chosen.DefID) + if err != nil { + sess.WriteLine(fmt.Sprintf("There's nothing here to %s.", verb)) + return + } + if !obj.IsInteractable() { sess.WriteLine(fmt.Sprintf("You can't %s the %s.", verb, obj.Name)) return } -- cgit v1.2.3