Adjust engineer filter key
This PR adds two changes to the reintroduced SelectHighestEngineerAndAssist hotkey.
-
It treats T3 engies and SACUs the same for the purpose of selecting the highest tech level constructors. This is preferable as the tech level a unit can produce is more important than what the unit actually is, so with the new behavior where we select not one but all equivalent engies, we want to also treat t3 engies and sacus the same.
-
If you have multiple different factions in your selection, it now selects the faction's engies of which you have the most of for the highest tech level. For example, if you have 4 t3 uef engies and 2 t3 aeon engies, it will select the 4 t3 uef engies and have the 2 aeon engies assist those. Works for purely t1 engies too. This mostly matters in fullshare team games when you get the base of an ally but in those situations such a hotkey can be a lifesaver.
Note that I'm guessing that there is a much smarter way to count the number of units of each faction than using the utility function CalcTableLength I have written above, but a quick google search just told me that lua tables by default seemingly don't have a length parameter. Still, I'm guessing there already is a better function in the FA repo that does this that I'm not aware about
Is this written with ChatGPT?
Is this written with ChatGPT?
What? xd
Tbf I have been using ChatGPT quite a bit over the last months so maybe it has rubbed off on me.
But what if if this too is written by ChatGPT and I just didn't notice? What if everything I write is actually ChatGPT?? WHAT IF I AM JUST SIMULATED BY CHATGPT??? AM I REAL?!?
And that is how I accidentally triggered an existential crisis 😄
I'll rewrite it