aboutsummaryrefslogtreecommitdiff
path: root/internal/game/act.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 17:05:14 -0400
committerhistoria <[not public]>2026-10-05 17:05:14 -0400
commite42952469dadfb3535633c66c881050ac128703c (patch)
treea78f7396b72cdbd6fa4f6c454c830f40cf2ad0cb /internal/game/act.go
parent90ad8c0c33b519d5830c69d4128bdc984b5e9de8 (diff)
downloadthehouseoficarus-e42952469dadfb3535633c66c881050ac128703c.tar.gz
fix: gather verbs, walk oom, admin path bypass, roulette refund
Diffstat (limited to 'internal/game/act.go')
-rw-r--r--internal/game/act.go19
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
}