diff options
Diffstat (limited to 'internal/game/act_farm.go')
| -rw-r--r-- | internal/game/act_farm.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/game/act_farm.go b/internal/game/act_farm.go index 6725351..e83beb1 100644 --- a/internal/game/act_farm.go +++ b/internal/game/act_farm.go @@ -257,7 +257,7 @@ func (g *Game) advanceHarvest(sess *net.Session, p *player.Player) { noRoom := false if stackable { quality, maxQuality := stackProps(productDef) - for i := 0; i < 28; i++ { + for i := 0; i < player.MaxInventorySlots; i++ { s := p.InvSlot(i) // Only a stack with the properties a fresh harvest stack gets // may absorb it; merging into a differently qualified stack @@ -275,7 +275,7 @@ func (g *Game) advanceHarvest(sess *net.Session, p *player.Player) { // One slot per unit: the clamp and the placement loop must count // slots the same way (a nil 0..27 slot). freeSlots := 0 - for i := 0; i < 28; i++ { + for i := 0; i < player.MaxInventorySlots; i++ { if p.InvSlot(i) == nil { freeSlots++ } |
