Forged Alliance Forever Forged Alliance Forever Forums 2019-01-18T23:22:40+02:00 /feed.php?f=41&t=17114 2019-01-18T23:22:40+02:00 2019-01-18T23:22:40+02:00 /viewtopic.php?t=17114&p=171212#p171212 <![CDATA[Re: Selecting 'available' factories]]>
However, much easier solution is just test if it's (idle and not guarding)

Statistics: Posted by nine2 — 18 Jan 2019, 23:22


]]>
2019-01-18T22:56:30+02:00 2019-01-18T22:56:30+02:00 /viewtopic.php?t=17114&p=171211#p171211 <![CDATA[Re: Selecting 'available' factories]]>
Anihilnine wrote:
Easier, You could just test if it is assisting or not. In code it is called Guarding I think


That doesn't quite do it, because sometimes the assisting factories *will* have some build queue of their own (and should not then be considered 'available').

Anihilnine wrote:
You should be able to figure that out by looking through the code that renders the build queue.


I had a look at some stuff like this, in construction.lua, but, in order for the build queue to be rendered, the factory has to be selected, and I have a feeling that other code related to manipulating the build queue may also depend on some selection hooks triggering.

I'll have another look this, though, and see if I can figure out what's going on..

Statistics: Posted by crispweed — 18 Jan 2019, 22:56


]]>
2019-01-18T21:47:03+02:00 2019-01-18T21:47:03+02:00 /viewtopic.php?t=17114&p=171209#p171209 <![CDATA[Re: Selecting 'available' factories]]>
Easier, You could just test if it is assisting or not. In code it is called Guarding I think

Statistics: Posted by nine2 — 18 Jan 2019, 21:47


]]>
2019-01-18T11:56:03+02:00 2019-01-18T11:56:03+02:00 /viewtopic.php?t=17114&p=171186#p171186 <![CDATA[Selecting 'available' factories]]>
I'd like to change the definition of idle used for factories in this mod slightly, however, to include factories that are assisting other factories, but have no build queue of their own.

(I guess, instead of 'idle', we could then say 'available'.)

I can't see how to check whether or not a factory has a build queue, however.
Anyone have any ideas about how to do this (or whether this is possible from a UI mod)?

(I can get the *command* queue, with unit:GetCommandQueue(), and use this to modify the definition of idle/available for mobile units, but can't see any corresponding way to get information about the *build* queue..)

Statistics: Posted by crispweed — 18 Jan 2019, 11:56


]]>