From 3f183cdbd57f8a0ce394aa689482e8d6568a077f Mon Sep 17 00:00:00 2001 From: Nate Bowman Date: Tue, 17 Nov 2026 19:48:47 -0500 Subject: [PATCH] Fix adding task to work queue --- aoe/gameplay.py | 3 ++- aoe/world.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/aoe/gameplay.py b/aoe/gameplay.py index 183d8f1..c4d6d1d 100644 --- a/aoe/gameplay.py +++ b/aoe/gameplay.py @@ -115,8 +115,9 @@ class Gameplay(): (old_task, new_task, count,))) - def add_task_to_work_queue(self, action_time, task): + def add_task_to_work_queue(self, action_time, task, **kwargs): self._check_time(action_time) + task = (task, kwargs) self.actions[action_time].append((self.world.add_task_to_work_queue, (task,))) diff --git a/aoe/world.py b/aoe/world.py index 24f1e8d..90d4d7d 100644 --- a/aoe/world.py +++ b/aoe/world.py @@ -181,7 +181,9 @@ class World(): def add_task_to_work_queue(self, task, **kwargs): - self.villager_work_queue.append((task, kwargs)) + if isinstance(task, Tasks): + task = (task, kwargs) + self.villager_work_queue.append(task) self._assign_to_villagers_from_work_queue()