Class Loadouts

java.lang.Object
dev.twilite.game.loadout.Loadouts

public class Loadouts extends Object
Helpers for applying inventory and equipment loadouts.

Methods enqueue at most one game action per call so scripts can let client state update before asking for the next step. Bank-backed methods open the nearest bank when needed.

  • Constructor Details

    • Loadouts

      public Loadouts()
  • Method Details

    • withdraw

      public static void withdraw(InventoryLoadout loadout)
      Progresses an inventory loadout toward its requested state.

      Foreign inventory items are deposited first, then excess amounts, then missing entries are withdrawn.

    • withdraw

      public static void withdraw(InventoryLoadout loadout, EquipmentLoadout equipmentLoadout)
      Progresses an equipment loadout and inventory loadout together.

      Equipment entries are considered first and are added ahead of inventory entries in the temporary withdrawal loadout. Carried equipment is equipped before more bank work is attempted.

    • withdraw

      public static void withdraw(InventoryLoadout loadout, EquipmentLoadout equipmentLoadout, int maxActionsPerTick)
      Progresses an equipment loadout and inventory loadout together using at most maxActionsPerTick bank actions.
    • withdraw

      public static void withdraw(InventoryLoadout loadout, int maxActionsPerTick)
      Progresses an inventory loadout using at most maxActionsPerTick bank actions.
    • loadSavedEquipmentLoadout

      public static Optional<EquipmentLoadout> loadSavedEquipmentLoadout(String name)
      Loads a saved equipment loadout by name.