diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a5b1fe..3422798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/game/sys/haul.go b/game/sys/haul.go index b325ef2..7c25466 100644 --- a/game/sys/haul.go +++ b/game/sys/haul.go @@ -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) @@ -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