Class BotFormationsMenuBuilder
java.lang.Object
megamek.client.ui.dialogs.BotCommands.BotFormationsMenuBuilder
Builds the lobby's formation menu for a bot lance, so the lance starts the game in formation. In game, formations
are set in the Move Order editor.
Every member carries the formation in its own orders, with its slot: the leader is slot 0 and the others follow in the lance's order.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JMenulobbyFormationMenu(AbstractClient client, Game game, Force lance, List<Integer> unitIds) The lobby's Formation menu for one bot lance, so a lance can start the game already in formation: one item per shape, spacingFormationOrder.DEFAULT_SPACING, the lance's first unit leading and keeping together, plus Formation off.static JMenulobbyParentFormationMenu(AbstractClient client, Game game, Force parent, List<List<Integer>> lances) The lobby's Formation menu for a bot's parent force, a company with lances under it: the chosen shape, or Formation off, goes to every lance under it, each on its own leader with its own slots and by the same rules aslobbyFormationMenu(megamek.client.AbstractClient, megamek.common.game.Game, megamek.common.force.Force, java.util.List<java.lang.Integer>).static JMenuItemThe lobby's Role item for a bot's parent force: disabled, saying to set the role on each lance, since a role is a lance's job and a company holds lances with different ones.static JMenulobbyRoleMenu(AbstractClient client, JFrame frame, Game game, Player owner, Force lance, List<Integer> unitIds) The lobby's Role menu for one bot lance, beside Formation: None, Convoy...
-
Method Details
-
lobbyFormationMenu
public static JMenu lobbyFormationMenu(AbstractClient client, Game game, Force lance, List<Integer> unitIds) The lobby's Formation menu for one bot lance, so a lance can start the game already in formation: one item per shape, spacingFormationOrder.DEFAULT_SPACING, the lance's first unit leading and keeping together, plus Formation off. A convoy keeps its Run pace and Push through; any other lance takes the default pace and contact rule (seeMoveOrderCommands.lobbyFormationCommands(java.util.List<megamek.common.units.Entity>, megamek.common.orders.FormationShape)). The rest can be changed in game from the Move Order editor.- Parameters:
client- the client that sends the ordersgame- the gamelance- the lanceunitIds- the lance's units, in lance order- Returns:
- the menu
-
lobbyParentFormationMenu
public static JMenu lobbyParentFormationMenu(AbstractClient client, Game game, Force parent, List<List<Integer>> lances) The lobby's Formation menu for a bot's parent force, a company with lances under it: the chosen shape, or Formation off, goes to every lance under it, each on its own leader with its own slots and by the same rules aslobbyFormationMenu(megamek.client.AbstractClient, megamek.common.game.Game, megamek.common.force.Force, java.util.List<java.lang.Integer>). Right-clicking the parent force offered no formation at all, and the tester concluded there was none (QA playtest, #9526).- Parameters:
client- the client that sends the ordersgame- the gameparent- the parent forcelances- the units of each lance under it that take orders, in lance order; lances of fewer than two units are left out- Returns:
- the menu
-
lobbyParentRoleItem
The lobby's Role item for a bot's parent force: disabled, saying to set the role on each lance, since a role is a lance's job and a company holds lances with different ones.- Returns:
- the item
-
lobbyRoleMenu
public static JMenu lobbyRoleMenu(AbstractClient client, JFrame frame, Game game, Player owner, Force lance, List<Integer> unitIds) The lobby's Role menu for one bot lance, beside Formation: None, Convoy... or Escort..., the last two opening the Role dialog on that choice. Roles are set in the lobby so a convoy and its escorts start the game knowing their jobs (HammerGS, 2026-10-02).- Parameters:
client- the client that sends the ordersframe- the owner of the Role dialoggame- the gameowner- the bot that owns the lancelance- the lanceunitIds- the lance's units- Returns:
- the menu
-