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/action.go | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'internal/game/action.go') diff --git a/internal/game/action.go b/internal/game/action.go index 3d0223a..ca8506a 100644 --- a/internal/game/action.go +++ b/internal/game/action.go @@ -19,6 +19,7 @@ var verbAliases = map[string]string{ "chop": "gather", "fish": "gather", "cut": "gather", + "shear": "gather", "talk": "talk", "speak": "talk", "ask": "talk", @@ -27,10 +28,11 @@ var verbAliases = map[string]string{ } var verbSkill = map[string]string{ - "mine": "mining", - "chop": "woodcutting", - "cut": "woodcutting", - "fish": "fishing", + "mine": "mining", + "chop": "woodcutting", + "cut": "woodcutting", + "fish": "fishing", + "shear": "crafting", } func normalizeVerb(v string) string { @@ -231,14 +233,10 @@ func (g *Game) AdvanceActions() { g.advanceStoke(sess, p) case "search": g.advanceSearch(sess, p) - case "cook": - g.advanceProduction(sess, p) - case "smelt": - g.advanceProduction(sess, p) - case "smith": - g.advanceProduction(sess, p) - case "combine": - g.advanceProduction(sess, p) + default: + if productionActionTypes[p.Action.Type] { + g.advanceProduction(sess, p) + } } if p.Action == nil { g.writePrompt(sess) @@ -308,5 +306,12 @@ func (g *Game) checkCondition(sess *net.Session, c *action.Condition) bool { } return has } + if c.MinCredits > 0 { + has := p != nil && p.Credits >= c.MinCredits + if c.Not { + return !has + } + return has + } return true } -- cgit v1.2.3