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.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/internal/game/game.go b/internal/game/game.go
index 49d34b6..87539b1 100644
--- a/internal/game/game.go
+++ b/internal/game/game.go
@@ -122,10 +122,12 @@ func (g *Game) HandleSession(sess *net.Session, input string) {
g.handleTalkInput(sess, input)
case net.StateDropAllConfirm:
g.handleDropAllConfirm(sess, input)
- case net.StateCookRecipe:
- g.handleCookRecipe(sess, input)
- case net.StateSmeltRecipe:
- g.handleSmeltRecipe(sess, input)
+ case net.StateRecipeChoice:
+ g.handleRecipeChoice(sess, input)
+ case net.StateHowMany:
+ g.handleHowMany(sess, input)
+ case net.StateSmithProduct:
+ g.handleSmithProduct(sess, input)
case net.StateColorChoice:
g.handleColorChoice(sess, input)
}
@@ -145,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":
+ "quit", "use", "burn", "stoke", "search", "walk", "cook", "smelt", "smith":
return ClassActive
case "eat":
return ClassFree
@@ -371,6 +373,9 @@ func (g *Game) executeCommand(sess *net.Session, cmd string, args []string, rawI
case "smelt":
g.doSmelt(sess, strings.Join(args, " "))
return
+ case "smith":
+ g.doSmith(sess, strings.Join(args, " "))
+ return
case "eat":
g.doEat(sess, strings.Join(args, " "))
return
@@ -459,7 +464,7 @@ func (g *Game) ProcessQueuedCommands() {
}
switch as.Type {
case ActionGathering, ActionCombating, ActionUsing, ActionTalking,
- ActionToggling, ActionBurning, ActionStoking, ActionResting, ActionWalking, ActionCooking, ActionSmelting:
+ ActionToggling, ActionBurning, ActionStoking, ActionResting, ActionWalking, ActionProducing:
default:
if as.Type != ActionMoving || p.MoveTicks <= 0 {
p.ActionState = nil