aboutsummaryrefslogtreecommitdiff
path: root/internal/game/game.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/game.go')
-rw-r--r--internal/game/game.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/game/game.go b/internal/game/game.go
index ef81fca..a1cba83 100644
--- a/internal/game/game.go
+++ b/internal/game/game.go
@@ -126,10 +126,8 @@ func (g *Game) HandleSession(sess *net.Session, input string) {
g.handleRecipeChoice(sess, input)
case net.StateHowMany:
g.handleHowMany(sess, input)
- case net.StateSmithProduct:
- g.handleSmithProduct(sess, input)
- case net.StateFletchProduct:
- g.handleFletchProduct(sess, input)
+ case net.StateSmithProduct, net.StateFletchProduct, net.StateCraftProduct, net.StateProductChoice:
+ g.handleProductChoice(sess, input)
case net.StateColorChoice:
g.handleColorChoice(sess, input)
}
@@ -149,7 +147,7 @@ func classifyCommand(cmd string) CommandClass {
"attack", "kill",
"north", "n", "south", "s", "east", "e",
"west", "w", "up", "u", "down", "d",
- "quit", "use", "burn", "stoke", "search", "walk", "cook", "smelt", "smith":
+ "quit", "use", "burn", "stoke", "search", "walk", "cook", "smelt", "smith", "craft":
return ClassActive
case "eat", "fletch":
return ClassFree
@@ -378,6 +376,9 @@ func (g *Game) executeCommand(sess *net.Session, cmd string, args []string, rawI
case "smith":
g.doSmith(sess, strings.Join(args, " "))
return
+ case "craft":
+ g.doCraft(sess, strings.Join(args, " "))
+ return
case "eat":
g.doEat(sess, strings.Join(args, " "))
return