Skip to main content

Slot

Description

Used to interface with all the slots on an agent.

warning

This only interfaces with 'Inventory' POIs. This will not find any 'Action' POIs

Interface

Type
ISlotService

Inherits

Type
N/A

Properties

NameType
controllerSlot[]

Public Methods

NameParametersReturn TypeDescription
SlotServiceGameObject character, IObjectRepositoryService<Item> itemRepositoryServiceSlotServiceA constructor for SlotService.
PutItemInSlotItem item, POISearch requiredSlotSearch = nullbooleanUsed to put an item in a slot. If successful will return true.
GetItemItemSearch searchItemReturns a specific item if the agent has access to one in a slot.
GetSlotItemSearch searchItemReturns the slot if the agent has one with an item in.
DestroyCurrentItemInUsingSlotN/AvoidDestroys the item if the agent has one.
MoveItemToAnotherSlotItem item, POISearch poiSearch, Slot currentSlot = nullbooleanMoves an item from one slot to another free one.
DropItemint itembooleanRemoves the item from the slot and drops it.
ConsumeItemint itembooleanPerforms the consume action on an item of a specific type if the agent has it.
HasItemItemSearch searchbooleanChecks if the agent has a specific item in one of their slots.
HoldingItemN/AbooleanCheck if an agent is holding an item.