Ok, it took me a little while longer than I was planning on working on it.
But see how this is working for you.
I apologize for any ordering gone wrong, this is due to TGL names.
For example, the Hybrid is listed before the Galor, this is because internally the Hybrid is listed under CardHybrid, which, of course, goes before Galor.
I may change that for a future version.
Also, if you have a ship and a menu with the same name, then the menu will be listed below the ship, this is because the menu's name get's appended with _m internally.
I guess I can redo my V4 then...
This version is way smaller and faster than ever before (except V1), and V2 (
), but atleast it's smaller, and done more smartly than V3.
New features over V3:
Empty menu's (for whatever reason) are left out, if the menu is a MVAM parent ship, then it's converted to a button.
Alphabetic sorting based on name (before any TGL access).
If you don't want your MVAM ship to have a menu, include in the parent ship plugin (not MVAM plugin, could do that as well on request, but then for V4) the following:
Foundation.ShipDef.YourShip.bMvamMenu = 0
The 0 can also be None, but 0 is more natural for most people.
You can also include it in the {} when you created it, then it's like this:
, "bMvamMenu": 0
You don't need to turn it on (as usual).
If you want to exclude 1 (or more) MVAM sub ships, include the bMvamMenu in their respective ship plugins.
A last minute feature I thought of, if, for whatever reason, you want to exclude a ship from the menu, but still keep the ShipDef, then include the following:
Foundation.ShipDef.YourShip.__dict__["Do not display"] = 0
0 can also be None
It can also be included in the dictionary, {}.
, "Do not display": 0}
If nobody finds any problems, I shall be typing a readme and releasing it tomorrow.
[EDIT] Please redownload, fixed a slight discrepancy between the reported features and the actual code.
I think I've tested it good enough, now for the documentation and then I can send it off to BCFiles.