Allow Hotbuild to redirect orders to exfac units like the buttons do
https://github.com/FAForever/fa/assets/7266458/38e0c0c2-219e-415b-ba32-ba24ee881ef9
should work for both normal and alternate hotbuild (templates not yet)
Needs more testing since I just quickly copied the code from @clyfordv but I wanted to at least put this out there.
@4z0t can you take the time to review this? I generally do not use hotkeys
@4z0t
I moved the filter code to a different function, that also fixes the issue of declaring the local twice.
Should I put the part with if exFacUnits then into a separate function as well? It feels kinda weird to hide the simple if behind another function call.
There's no need to write a separate function for that if statement. If you can apply the Pascal convention to the name of the function today then we can include it with the hotfix
I changed the name of the new function, though all other functions in that file are still lowerCamelCase
Tested and works. The only thing that does appear to be missing, is that the automatic enabling of repeat build does not work.
To remedy this, you can add categories.EXTERNALFACTORY and/or categories.EXTERNALFACTORYUNIT to line 684 in gamemain.lua. Though this will not solve this problem either, because the code requires you to select the factory for it to change it to repeat build. So if you never select the external factory, it will not have repeat build enabled automatically.