aboutsummaryrefslogtreecommitdiff
path: root/internal/game/game.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-17 21:13:07 -0400
committerhistoria <[not public]>2026-06-17 21:13:07 -0400
commitec2e94e3463654a6288464a4c070b48ef9bf7368 (patch)
tree3c5df0f9a6a5968fa4c725a7d331825883ae798c /internal/game/game.go
parenteef5ddaa94f8cff6010d092c30fed53d2be01524 (diff)
downloadthehouseoficarus-ec2e94e3463654a6288464a4c070b48ef9bf7368.tar.gz
feat: smithing added, item/object interaction reworked. recipes and menus refactored.
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