I'm going to look into it. We can get and set the build items from the api, so I could maybe hold the loop queue in my own code and pass the next unit to the factory if there is nothing in the one-time queue. Do unit creation alerts contain a reference to the factory they came from? The mod would have to watch for a notification that something finished building. *Edit* I could just look through the idle factory list after each creation event and match it up to my own queue, but that code could slow down really fast once a lot of factories exist.
I'd like to have something like this: One queue for all units and for each group of units there is a toggle whether they will be built infinitely or not. The leftmost spot is for the unit that is under construction. When an infinitely built unit gets its turn and starts getting built, a copy of it is added to the end of the queue. The queued units can be moved around by dragging, cancelled by right-clicking and their count increased by left-clicking - regardless of their position in the queue. (This will also prevent you from accidentally cancelling the partially built unit when you only want to cancel all queued units.) EDIT: Here's an animation of how it would work:
I think the main issue is that you have to visibly select a factory to give commands to it. You can't give commands "behind the players back".
I'm hoping we will get assist build ala SupCom so we can have one generic factory doing infinite build, and others assisting it, and then if you want other stuff to be built you add it to the assistee factories, and they deal with their own queue and then deal with stuff in the mastdr qeueu