Inherits: Node
Base class for ItemSlot
and ItemRefSlot
equip(item: InventoryItem) -> bool
- Equips the given inventory item in the slot. See the documentation forItemSlot
andItemRefSlot
for more details.clear() -> bool
- Clears the item slot. See the documentation forItemSlot
andItemRefSlot
for more details.get_item() -> InventoryItem
- Returns the equipped item. See the documentation forItemSlot
andItemRefSlot
for more details.can_hold_item(new_item: InventoryItem) -> bool
- Checks if the slot can hold the given item. See the documentation forItemSlot
andItemRefSlot
for more details.reset()
- Clears the item slot. See the documentation forItemSlot
andItemRefSlot
for more details.serialize() -> Dictionary
- Serializes the item slot into a dictionary. See the documentation forItemSlot
andItemRefSlot
for more details.deserialize(source: Dictionary) -> bool
- Loads the item slot data from the given dictionary. See the documentation forItemSlot
andItemRefSlot
for more details.
item_equipped()
- Emitted when an item is placed in the slot.cleared()
- Emitted when the slot is cleared.