Skip to content

Commit

Permalink
Fix infinite hauling and food over-production by monasteries (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlange-42 authored Apr 10, 2024
1 parent 957f815 commit 7e0b14d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [[v0.2.1]](https://github.com/mlange-42/tiny-world/compare/v0.2.0...v0.2.1)

### Bugfixes

* Fix infinite hauling and food over-production by monasteries (#266)

## [[v0.2.0]](https://github.com/mlange-42/tiny-world/compare/v0.1.0...v0.2.0)

### Game features
Expand Down
5 changes: 4 additions & 1 deletion game/sys/haul.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func (s *Haul) Update(world *ecs.World) {

update := s.update.Get()
landUse := s.landUse.Get()
landUseE := s.landUseE.Get()
stock := s.stock.Get()

prodQuery := s.prodFilter.Query(world)
Expand Down Expand Up @@ -179,7 +180,9 @@ func (s *Haul) Update(world *ecs.World) {
haul.PathFraction = uint8(update.Interval/2) + 1
*tile = target

continue
if haul.Home != landUseE.Get(target.X, target.Y) {
continue
}
}

prod.IsHauling = false
Expand Down

0 comments on commit 7e0b14d

Please sign in to comment.