aboutsummaryrefslogtreecommitdiff
path: root/internal/game/production_engine.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/production_engine.go
parent32a3c59cebf2a16277e54d715a67adfdbe00b456 (diff)
downloadthehouseoficarus-87d08f0151e643951769e323995f1c5ed89ee200.tar.gz
fix: harden economy recovery, shutdown concurrency, world validation, and inventory-loss paths
Diffstat (limited to 'internal/game/production_engine.go')
-rw-r--r--internal/game/production_engine.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/game/production_engine.go b/internal/game/production_engine.go
index 2cd9b1d..035b7e2 100644
--- a/internal/game/production_engine.go
+++ b/internal/game/production_engine.go
@@ -253,6 +253,10 @@ func (g *Game) advanceProduction(sess *net.Session, p *player.Player) bool {
for _, bp := range byproducts {
if slot := p.FirstFreeSlot(); slot >= 0 {
p.SetInvSlot(slot, &player.InventorySlot{ItemID: bp, Quantity: 1})
+ } else {
+ // Never silently delete a byproduct: drop the remainder on
+ // the ground where the player can pick it up.
+ g.World.AddGroundItem(p.RoomID, bp, 1)
}
}