diff options
| author | historia <[not public]> | 2026-06-18 18:50:54 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-18 18:50:54 -0400 |
| commit | 17e7725f252c7f5d3be2e9c37d62751c631f196f (patch) | |
| tree | 40698c5c95cb21302adbb8cd021bd8d049b6fce1 /internal/game/game.go | |
| parent | fae979b75e37b6ad57e57062a1b637a37ec87174 (diff) | |
| download | thehouseoficarus-17e7725f252c7f5d3be2e9c37d62751c631f196f.tar.gz | |
feat: fletching added including zero-time bolt feathering, which probably will break lots of things
Diffstat (limited to 'internal/game/game.go')
| -rw-r--r-- | internal/game/game.go | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/internal/game/game.go b/internal/game/game.go index 87539b1..ef81fca 100644 --- a/internal/game/game.go +++ b/internal/game/game.go @@ -128,6 +128,8 @@ func (g *Game) HandleSession(sess *net.Session, input string) { g.handleHowMany(sess, input) case net.StateSmithProduct: g.handleSmithProduct(sess, input) + case net.StateFletchProduct: + g.handleFletchProduct(sess, input) case net.StateColorChoice: g.handleColorChoice(sess, input) } @@ -149,7 +151,7 @@ func classifyCommand(cmd string) CommandClass { "west", "w", "up", "u", "down", "d", "quit", "use", "burn", "stoke", "search", "walk", "cook", "smelt", "smith": return ClassActive - case "eat": + case "eat", "fletch": return ClassFree } if _, ok := verbAliases[cmd]; ok { @@ -379,6 +381,9 @@ func (g *Game) executeCommand(sess *net.Session, cmd string, args []string, rawI case "eat": g.doEat(sess, strings.Join(args, " ")) return + case "fletch": + g.doFletch(sess, strings.Join(args, " ")) + return case "talk", "speak", "ask": g.CancelAction(p) if len(args) == 0 { @@ -477,6 +482,16 @@ func (g *Game) ProcessQueuedCommands() { if !ok || p == nil { continue } + if p.BackgroundAction == nil { + p.BackgroundActionState = nil + } + } + + for _, sess := range g.Hub.AllSessions() { + p, ok := sess.Player.(*player.Player) + if !ok || p == nil { + continue + } cmds := g.freeQueue[p.Name] for _, qc := range cmds { g.cancelRest(p.Name) |
