From 97a1a908b9e6e6d3516628c139c9b64262b4fe08 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 18 Jun 2026 20:26:03 -0400 Subject: feat: crafting roughly implemented (leather, gems, gold, clay, spinning). --- internal/game/game.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'internal/game/game.go') 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 -- cgit v1.2.3