Package mindustry.ai

Class UnitCommand

java.lang.Object
mindustry.ai.UnitCommand

public class UnitCommand extends Object
Defines a pattern of behavior that an RTS-controlled unit should follow. Shows up in the command UI.
  • Field Details

    • all

      public static final Seq<UnitCommand> all
      List of all commands by ID.
    • moveCommand

      public static final UnitCommand moveCommand
    • repairCommand

      public static final UnitCommand repairCommand
    • rebuildCommand

      public static final UnitCommand rebuildCommand
    • assistCommand

      public static final UnitCommand assistCommand
    • mineCommand

      public static final UnitCommand mineCommand
    • boostCommand

      public static final UnitCommand boostCommand
    • id

      public final int id
      Unique ID number.
    • name

      public final String name
      Named used for tooltip/description.
    • icon

      public final String icon
      Name of UI icon (from Icon class).
    • controller

      public final Func<mindustry.gen.Unit,AIController> controller
      Controller that this unit will use when this command is used. Return null for "default" behavior.
    • switchToMove

      public boolean switchToMove
      If true, this unit will automatically switch away to the move command when given a position.
    • drawTarget

      public boolean drawTarget
      Whether to draw the movement/attack target.
    • resetTarget

      public boolean resetTarget
      Whether to reset targets when switching to or from this command.
  • Constructor Details

  • Method Details