generic base class for item slots, slots are used to equip items
the protected equip(T) and unequip(T) are most important for equipment behaviour
for example a helmet item on an amor slot may instantiate some visual and add a modifier to the characters defense in equip, in unequip it would destroy the visual and remove the modifier
canEquip can be overridden to define whether a specific item can be equipped at the moment, applyVisibility is used when a slot is hidden(like weapons being hidden while pulling a lever)
- Template Parameters
-
|
override void | Initialize (CharacterBase character) |
|
override bool | CanEquip (InventoryItem inventoryItem, bool clear=true) |
| checks if an inventory item can be equipped
|
|
override void | Equip (InventoryItem inventoryItem) |
| equips an inventory item(if another item is already equipped it is unequipped first)
|
|
override void | Clear () |
| clears the slot of its currently equipped item
|
|
virtual bool | CanEquipPrevious (bool clear=true) |
| checks if the slot can switch its equipped item to the previous one in its characters inventory
|
|
virtual bool | EquipPrevious (bool clear=true) |
| equips the previous item in its characters inventory
|
|
virtual bool | CanEquipNext (bool clear=true) |
| checks if the slot can switch its equipped item to the next one in its characters inventory
|
|
virtual bool | EquipNext (bool clear=true) |
| equips the next item in its characters inventory
|
|
virtual bool | CanClear () |
| checks whether the slot can be cleared of its equipped items
|
|
virtual void | Show () |
| shows the slot if it was hidden before
|
|
virtual void | Hide () |
| hides the slot
|
|
virtual bool | CanUse (int quantity=1) |
| checks if the equipped item can be used
|
|
virtual void | Use (int quantity=1) |
| uses the equipped item
|
|