fa icon indicating copy to clipboard operation
fa copied to clipboard

Adjust engineer filter key

Open ChessBerry opened this issue 2 years ago • 4 comments

This PR adds two changes to the reintroduced SelectHighestEngineerAndAssist hotkey.

  1. 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.

  2. 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.

ChessBerry avatar Jul 20 '23 22:07 ChessBerry

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

ChessBerry avatar Jul 20 '23 22:07 ChessBerry

Is this written with ChatGPT?

Garanas avatar Jul 21 '23 05:07 Garanas

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?!?

ChessBerry avatar Jul 21 '23 07:07 ChessBerry

And that is how I accidentally triggered an existential crisis 😄

I'll rewrite it

Garanas avatar Jul 21 '23 07:07 Garanas