Fix bug in gather rate decrease scheduling
Variable next_decrease can be 0 if the decrease should happen right now, which caused the previous conditional to evaluate as False when it should not have
This commit is contained in:
@@ -86,7 +86,7 @@ class World():
|
|||||||
next_decrease = self.gather.compute_next_gather_rate_decrease(task,
|
next_decrease = self.gather.compute_next_gather_rate_decrease(task,
|
||||||
self.villager_tasks[task])
|
self.villager_tasks[task])
|
||||||
|
|
||||||
if next_decrease:
|
if next_decrease is not None:
|
||||||
next_decrease += self.current_time
|
next_decrease += self.current_time
|
||||||
if task == Tasks.FARM:
|
if task == Tasks.FARM:
|
||||||
self.events[next_decrease].append((self._remove_farm, ()))
|
self.events[next_decrease].append((self._remove_farm, ()))
|
||||||
|
|||||||
Reference in New Issue
Block a user