Equipment

open class Equipment

Utilities for interacting with the equipment tab

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
enum Slot
Represents an equipment slot in the equipment tab

Functions

Link copied to clipboard
open fun contains(itemId: Array<Int>): Boolean
Determines if an item with the given itemId is equipped
open fun contains(itemName: Array<String>): Boolean
Determines if an item with the given itemName is equipped
Checks if any equipped item exists matching the specified filter
Link copied to clipboard
open fun equip(itemId: Int): Boolean
Equips an item from the inventory with the given itemId.
open fun equip(itemName: String): Boolean
Equips an item from the inventory with the given itemName.
open fun equip(item: InventoryItem): Boolean
Equips the given InventoryItem.
Link copied to clipboard
Gets all the items that the player character has equipped.
Link copied to clipboard
open fun getCount(id: Array<Int>): Int
Counts the stacks of all items with the specified ids
open fun getCount(name: Array<String>): Int
Counts the stacks of all items with the specified names
open fun getCount(filter: Predicate<EquipmentItem>): Int
Counts the stacks of all items matching the specified filter
Link copied to clipboard
open fun remove(itemId: Int): Int
Unequips an item from equipment with the given itemId
open fun remove(itemName: String): Int
Unequips an item from equipment with the given itemName