Task management for pawns
Define data model for the task queue. Each user action should add a task to the queue. For instance:
- Placing a building type on the map should trigger a construction task
- Deleting a building from the map should trigger a deconstruction task
- Others to follow, such changing the recipe type on a building or instructing a building to be emptied
- Repairing a building
- Manipulating the terrain
Tasks may spawn child tasks, most notably:
- Transport of resources (ores and raw resources, secondary resources, final products)
- Manipulating the terrain (levelling terrain)
The task system needs to be generic enough for me to be able to add new tasks types in the future
Tasks will be selected for completion by pawns according to:
- Task creation order, older tasks completed before newer ones
- Task priority, higher priority tasks completed before lower priority
- Task completability - tasks may be blocked by the lack of resources or accessibility/navigability; pawns should skip tasks that cannot be completed
- Pawns which are idle will task the task manager for a task each [frame/second/game tick]
- Pawns will prioritise tasks for which they are specialised (haulers will haul more than builders will)
No due date
80% Completed