aboutsummaryrefslogtreecommitdiff
path: root/internal/game/game.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-18 20:26:03 -0400
committerhistoria <[not public]>2026-06-18 20:26:03 -0400
commit97a1a908b9e6e6d3516628c139c9b64262b4fe08 (patch)
treed82953974edbfb4051dff1a48f1b264b9c264d28 /internal/game/game.go
parent17e7725f252c7f5d3be2e9c37d62751c631f196f (diff)
downloadthehouseoficarus-97a1a908b9e6e6d3516628c139c9b64262b4fe08.tar.gz
feat: crafting roughly implemented (leather, gems, gold, clay, spinning).
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