diff options
Diffstat (limited to 'internal/game/act.go')
| -rw-r--r-- | internal/game/act.go | 8 |
1 files changed, 6 insertions, 2 deletions
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 } |
