diff options
| author | historia <[not public]> | 2026-09-18 01:50:17 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 01:50:17 -0400 |
| commit | 87d08f0151e643951769e323995f1c5ed89ee200 (patch) | |
| tree | dc42a0b30ebb5a00dd7ba505cc4eaa44f4f308bc /internal/game/act_farm.go | |
| parent | 32a3c59cebf2a16277e54d715a67adfdbe00b456 (diff) | |
| download | thehouseoficarus-87d08f0151e643951769e323995f1c5ed89ee200.tar.gz | |
fix: harden economy recovery, shutdown concurrency, world validation, and inventory-loss paths
Diffstat (limited to 'internal/game/act_farm.go')
| -rw-r--r-- | internal/game/act_farm.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/game/act_farm.go b/internal/game/act_farm.go index 91384a0..1e576c3 100644 --- a/internal/game/act_farm.go +++ b/internal/game/act_farm.go @@ -180,6 +180,13 @@ func (g *Game) advancePlant(sess *net.Session, p *player.Player) { seedID := data.SeedID xp := data.XP + if p.CountItem(seedID) < 1 { + sess.WriteLine("You no longer have that seed.") + p.Action = nil + return + } + p.RemoveItem(seedID, 1) + g.ensureFarmState(p, prefix) g.setPlayerFlag(p, prefix+"_weeds", false) |
