aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_farm.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 01:50:17 -0400
committerhistoria <[not public]>2026-09-18 01:50:17 -0400
commit87d08f0151e643951769e323995f1c5ed89ee200 (patch)
treedc42a0b30ebb5a00dd7ba505cc4eaa44f4f308bc /internal/game/cmd_farm.go
parent32a3c59cebf2a16277e54d715a67adfdbe00b456 (diff)
downloadthehouseoficarus-87d08f0151e643951769e323995f1c5ed89ee200.tar.gz
fix: harden economy recovery, shutdown concurrency, world validation, and inventory-loss paths
Diffstat (limited to 'internal/game/cmd_farm.go')
-rw-r--r--internal/game/cmd_farm.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/game/cmd_farm.go b/internal/game/cmd_farm.go
index dec16c0..1c8f4c8 100644
--- a/internal/game/cmd_farm.go
+++ b/internal/game/cmd_farm.go
@@ -124,7 +124,8 @@ func (g *Game) doPlant(sess *net.Session, input string) {
return
}
- p.RemoveItem(seedID, 1)
+ // The seed is consumed when the plant action COMPLETES (advancePlant),
+ // not here: an interrupted action must not destroy the seed.
p.Action = &behavior.Action{
Type: "plant",