Closed forcecore closed 7 years ago
TIP = Teams in production = [] (global)
Given a taskforce to build, check prerequisites
If not met don't queue.
SET= [] (list of things that are built)
Push that to global TIP.
If met start producing, one by one. If an idle and unoccupied one already exists, recruit it.
On production (use trigger), add to SET.
Count produced units like I already do in build order for SET.
if SET fully made, we're done and do the predefined task in Team.
How to check failure? Prerequisite or Factory getting killed?
From time to time, check PREREQUISTES of the team. (Already ticking by production tick)
If it any goes missing during the production, cancel production of the team and let the created members recruitable
Works
Build is broken haha https://github.com/OpenRA/OpenRA/issues/10617
The solution is to build units one at a time but, Need to make a wrapper function written in Lua to make it easier to do create taskforces + actions.