|
proto external IEntity | GetOwner () |
|
proto external void | AddStorage (BaseInventoryStorageComponent storage) |
|
proto external bool | CanInsertItem (IEntity item, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY) |
| Will iterate over storages and find if item can be inserted in first best match.
|
|
proto external bool | CanInsertItemInStorage (IEntity item, BaseInventoryStorageComponent storage, int slotID=-1) |
|
proto external bool | CanInsertResource (ResourceName resourceName, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY, int count=1) |
| Will iterate over storages and find if item can be inserted in first best match.
|
|
proto external bool | CanInsertResourceInStorage (ResourceName resourceName, BaseInventoryStorageComponent storage, int slotID=-1, int count=1) |
|
proto external bool | TryInsertItem (IEntity item, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY, InventoryOperationCallback cb=null) |
| Will iterate over storages and try insert the item at first best match.
|
|
proto external bool | TryInsertItemInStorage (IEntity item, BaseInventoryStorageComponent storage, int slotID=-1, InventoryOperationCallback cb=null) |
| Will try to insert item at storage. If slotID -1 will try to insert in any free storage.
|
|
proto external bool | CanReplaceItem (IEntity item, BaseInventoryStorageComponent storage, int slotID) |
| Same as insert, only should allow replacing item at storage slot, slotID is required.
|
|
proto external bool | TryReplaceItem (IEntity item, BaseInventoryStorageComponent storage, int slotID, InventoryOperationCallback cb=null) |
|
proto external bool | CanRemoveItemFromStorage (IEntity item, BaseInventoryStorageComponent storage) |
|
proto external bool | TryRemoveItemFromStorage (IEntity item, BaseInventoryStorageComponent storage, InventoryOperationCallback cb=null) |
| Will try to remove item from storage.
|
|
proto external bool | CanMoveItemToStorage (IEntity item, BaseInventoryStorageComponent to, int slotID=-1) |
|
proto external bool | TryMoveItemToStorage (IEntity item, BaseInventoryStorageComponent to, int slotID=-1, InventoryOperationCallback cb=null) |
| Will try to move item from source storage to target storage.
|
|
proto external bool | CanSwapItemStorages (IEntity itemA, IEntity itemB) |
|
proto external bool | TrySwapItemStorages (IEntity itemA, IEntity itemB, InventoryOperationCallback cb=null) |
| Will try to place itemA to itemB storage slot and itemB to itemA storage slot.
|
|
proto external bool | TryDeleteItem (IEntity item, InventoryOperationCallback cb=null) |
|
proto external bool | TrySpawnPrefabToStorage (ResourceName prefab, BaseInventoryStorageComponent storage=null, int slotID=-1, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY, InventoryOperationCallback cb=null, int count=1) |
| Spawn and insert into inventory if provided storage is null then most suitable storage would be chosen from owned storages.
|
|
proto external bool | ValidateStorageRequest (IEntity storageOwner) |
| Validate that the storage is near the player to eliminate potentual message tampering.
|
|
proto external int | GetStorages (out notnull array< BaseInventoryStorageComponent > outStorages, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY) |
| Get all managed storages.
|
|
proto external int | GetItems (out notnull array< IEntity > outItems) |
| Get all items from all managed storages.
|
|
proto external bool | Contains (IEntity item) |
| Returns true if item is in the storage, false otherwise.
|
|
proto external BaseInventoryStorageComponent | FindStorageForItem (IEntity item, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY) |
| Will try to find suitable storage for item.
|
|
proto external BaseInventoryStorageComponent | FindStorageForResource (ResourceName resourceName, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY) |
| Will try to find suitable storage for resource.
|
|
proto external BaseInventoryStorageComponent | FindStorageForInsert (IEntity item, BaseInventoryStorageComponent fromStorage, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY) |
| returns first storage with empty space from provided storage hierarchy for provided item and provided storage purpose
|
|
proto external BaseInventoryStorageComponent | FindStorageForResourceInsert (ResourceName resourceName, BaseInventoryStorageComponent fromStorage, EStoragePurpose purpose=EStoragePurpose.PURPOSE_ANY) |
| returns first storage with empty space from provided storage hierarchy for provided resource and provided storage purpose
|
|
proto external int | GetDepositItemCountByEntity (IEntity verifier, IEntity entity) |
| Fast access to item count in inventory (returns only items that are stored in DEPOSIT storages)
|
|
proto external int | GetDepositItemCountByResource (IEntity verifier, ResourceName resourceName) |
| Fast access to item count in inventory (returns only items that are stored in DEPOSIT storages)
|
|
proto external IEntity | FindItem (InventorySearchPredicate predicate, EStoragePurpose purpose=EStoragePurpose.PURPOSE_DEPOSIT) |
| Find Item by providing InventorySearchPredicate object.
|
|
proto external int | FindItems (out notnull array< IEntity > foundItems, InventorySearchPredicate predicate, EStoragePurpose purpose=EStoragePurpose.PURPOSE_DEPOSIT) |
|
proto external IEntity | FindItemWithComponents (array< TypeName > componentsQuery, EStoragePurpose purpose=EStoragePurpose.PURPOSE_DEPOSIT) |
| Find Item by specifying necessary component types (eg returns first Entity that contains all of the provided components) IEntity FindGrenadeInDeposit() { array<typename> components = {}; components.Insert(WeaponComponent); components.Insert(GrenadeMoveComponent); IEntity grenade = inventoryStorageManagerComponent.FindItemWithComponents(components, EStoragePurpose.PURPOSE_DEPOSIT); Print(grenade); return grenade; }.
|
|
proto external int | FindItemsWithComponents (out notnull array< IEntity > foundItems, array< TypeName > componentsQuery, EStoragePurpose purpose=EStoragePurpose.PURPOSE_DEPOSIT) |
| Find Items by specifying necessary component types (eg all Entities that contain all of the provided components), returns count of found items.
|
|
proto external int | CountItem (InventorySearchPredicate predicate, EStoragePurpose purpose=EStoragePurpose.PURPOSE_DEPOSIT) |
|
proto external int | GetMagazineCountByWeapon (BaseWeaponComponent weapon) |
| Find Items by specifying necessary component types (eg all Entities that contain all of the provided components), returns count of found items.
|
|
proto external int | GetMagazineCountByMuzzle (IEntity verifier, BaseMuzzleComponent pMuzzle) |
| Find Items by specifying necessary component types (eg all Entities that contain all of the provided components), returns count of found items.
|
|
proto external int | GetGrenadesCount () |
|
void | OnDelete (IEntity owner) |
|
bool | OnTicksOnRemoteProxy () |
|