Class BotFormationsMenuBuilder

java.lang.Object
megamek.client.ui.dialogs.BotCommands.BotFormationsMenuBuilder

public final class BotFormationsMenuBuilder extends Object
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 Details

    • lobbyFormationMenu

      public static JMenu lobbyFormationMenu(AbstractClient client, 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, spacing FormationOrder.DEFAULT_SPACING, the lance's first unit leading, Walk pace, Break on contact and keeping together, plus Formation off. The rest can be changed in game from the Move Order editor.
      Parameters:
      client - the client that sends the orders
      lance - the lance
      unitIds - the lance's units, in lance order
      Returns:
      the menu
    • 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 orders
      frame - the owner of the Role dialog
      game - the game
      owner - the bot that owns the lance
      lance - the lance
      unitIds - the lance's units
      Returns:
      the menu