Interface ILoadoutFactory
This interface provides methods for creating new loadout builders, either from scratch or pre-populated with the player's current setup. It serves as the entry point for all loadout creation operations.
Common usage patterns:
- Create an empty builder and add items manually
- Capture the current player setup as a loadout template
- Clone and modify an existing loadout
Example usage:
// Create a new loadout from scratch
Loadout loadout = loadoutFactory.newBuilder()
.equipmentItem(ItemID.ABYSSAL_WHIP, EquipmentInventorySlot.WEAPON.getSlotIdx())
.inventoryItem(ItemID.SHARK, 20, 0)
.build();
// Capture current setup
Loadout currentSetup = loadoutFactory.fromCurrentSetup().build();
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a loadout builder pre-populated with the current equipment.Creates a loadout builder pre-populated with the current inventory.Creates a loadout builder pre-populated with the current rune pouch contents.Creates a loadout builder pre-populated with the complete current setup.fromLoadout(Loadout loadout) Creates a loadout builder pre-populated with items from an existing loadout.Creates a new empty loadout builder.
-
Method Details
-
newBuilder
LoadoutBuilder newBuilder()Creates a new empty loadout builder.The returned builder has no items configured and all sections enabled. Use the builder's methods to add items to the loadout.
- Returns:
- a new empty
LoadoutBuilder
-
fromCurrentRunePouch
LoadoutBuilder fromCurrentRunePouch()Creates a loadout builder pre-populated with the current rune pouch contents.The builder will contain the runes currently in the player's rune pouch. Inventory and equipment sections will be empty.
- Returns:
- a
LoadoutBuilderwith rune pouch items from current setup
-
fromCurrentEquipment
LoadoutBuilder fromCurrentEquipment()Creates a loadout builder pre-populated with the current equipment.The builder will contain all items currently equipped by the player. Inventory and rune pouch sections will be empty.
- Returns:
- a
LoadoutBuilderwith equipment items from current setup
-
fromCurrentInventory
LoadoutBuilder fromCurrentInventory()Creates a loadout builder pre-populated with the current inventory.The builder will contain all items currently in the player's inventory. Equipment and rune pouch sections will be empty.
- Returns:
- a
LoadoutBuilderwith inventory items from current setup
-
fromCurrentSetup
LoadoutBuilder fromCurrentSetup()Creates a loadout builder pre-populated with the complete current setup.The builder will contain all items from:
- Current inventory contents
- Current equipped items
- Current rune pouch contents
This is useful for capturing the current player state as a loadout that can be saved or modified.
- Returns:
- a
LoadoutBuilderwith all items from current setup
-
fromLoadout
Creates a loadout builder pre-populated with items from an existing loadout.This allows cloning or modifying an existing loadout by copying its items into a new builder. Changes to the new builder will not affect the original loadout.
- Parameters:
loadout- the loadout to copy items from- Returns:
- a
LoadoutBuilderwith items from the specified loadout
-