diff options
Diffstat (limited to 'internal/game/act.go')
| -rw-r--r-- | internal/game/act.go | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/internal/game/act.go b/internal/game/act.go index 7ff805c..0d2cd70 100644 --- a/internal/game/act.go +++ b/internal/game/act.go @@ -14,12 +14,19 @@ import ( "thehouseoficarus/internal/world" ) -// verbAliases maps a gather-style verb that has no commandRegistry entry to -// the action it starts. Verbs that are registered directly (mine, chop, fish, -// cut, talk/speak/ask, steal/thieve, hide) must not be duplicated here: a -// registered command is looked up first, so an entry would be dead and its -// removal untested. Only shear remains as a pure action alias. +// verbAliases maps a gather-style verb to the action type used by the +// bhType != verb gate in startAction. Every gather command (mine, chop, fish, +// cut, shear) resolves here even though the command registry dispatches them +// to executeGather: executeGather passes the raw verb to startAction, and the +// gate compares it against the object's BehaviorType(). Without an entry the +// gate compares "mine" to "gather" and always fails. Non-gather actions +// (talk/speak/ask, steal/thieve, hide) have their own classification and must +// not be added here. var verbAliases = map[string]behavior.ActionType{ + "mine": behavior.TypeGather, + "chop": behavior.TypeGather, + "fish": behavior.TypeGather, + "cut": behavior.TypeGather, "shear": behavior.TypeGather, } @@ -106,7 +113,7 @@ func (g *Game) startAction(sess *net.Session, verb, target string) { sess.WriteLine(fmt.Sprintf("There's nothing here to %s.", verb)) return } - if !obj.IsInteractable() { + if !obj.IsInteractable() && obj.ID != "estate_directory" { sess.WriteLine(fmt.Sprintf("You can't %s the %s.", verb, obj.Name)) return } |
