Arma Reforger Script API
|
Public Member Functions | |
int | GetAllRootItems (out notnull array< IEntity > rootItems) |
Get an array of all root items in the inventory storage. | |
void | PlayItemSound (IEntity entity, string soundEvent) |
void | RpcAsk_PlaySound (RplId targetRplId, string soundAction) |
void | RpcDo_PlaySound (RplId targetRplId, string soundAction) |
SCR_CharacterInventoryStorageComponent | GetCharacterStorage () |
bool | CanInsertItemInActualStorage (IEntity item, BaseInventoryStorageComponent storage, int slotID=-1) |
BaseInventoryStorageComponent | FindActualStorageForItemResource (ResourceName itemResource, BaseInventoryStorageComponent storage, int slotID=-1, int count=1) |
void | SetReturnCode (EInventoryRetCode ERetCode) |
void | SetReturnCodeDefault () |
EInventoryRetCode | GetReturnCode () |
float | GetTotalWeightOfAllStorages () |
void | SetLootStorage (IEntity pOwner) |
void | InsertItem (IEntity pItem, BaseInventoryStorageComponent pStorageTo=null, BaseInventoryStorageComponent pStorageFrom=null, SCR_InvCallBack cb=null) |
Try to insert the item into the storage (not slot) | |
bool | TryRemoveItemFromInventory (IEntity pItem, BaseInventoryStorageComponent storage=null, InventoryOperationCallback cb=null) |
Locks the inventory for the duration of the item removal process. | |
bool | CanMoveItem (IEntity item) |
Checks whether it is possible to move the item. | |
bool | TrySwapItems (IEntity pOwnerEntity, BaseInventoryStorageComponent pStorageTo, SCR_InvCallBack cb=null) |
void | EquipWeapon (IEntity pOwnerEntity, SCR_InvCallBack cb=null, bool bFromVicinity=true) |
Try to equip the item into the slot (weapon) | |
void | EquipWeaponAttachment (IEntity pOwnerEntity, IEntity pUserEntity, SCR_InvCallBack cb=null) |
Try to equip the item into the slot (weapon) | |
void | EquipGadget (IEntity pOwnerEntity, SCR_InvCallBack cb=null) |
Try to equip the item into the slot (gadget) | |
void | EquipCloth (IEntity pOwnerEntity) |
Try to equip the item into the slot (cloth) | |
bool | EquipAny (BaseInventoryStorageComponent storage, IEntity item, int preferred=-1, SCR_InvCallBack cb=null) |
Try to equip the item into the storage at provided slot. | |
bool | TryReplaceAndDropItemAtSlot (BaseInventoryStorageComponent storage, IEntity item, int slotID, SCR_InvCallBack cb=null, bool isTakenFromArsenal=false, bool deleteOriginalItemIfEmpty=false) |
Try to drop the original item and replace it by itemToReplace at the slot specified by slotID. | |
bool | TryReplaceItem (BaseInventoryStorageComponent storage, IEntity item, int preferred, SCR_InvCallBack cb) |
Try to replace at preferred slot. | |
void | EquipItem (EquipedWeaponStorageComponent weaponStorage, IEntity weapon) |
Try to equip the item into the slot (weapon) | |
bool | IsResupplyMagazinesAvailable (int resupplyMagazineCount=4, out EResupplyUnavailableReason resupplyUnavailableReason=EResupplyUnavailableReason.NONE, EMuzzleType muzzleType=-1, InventoryStorageManagerComponent mustBeInStorage=null) |
Get if resupply magazines action is available with the given magazine count. | |
void | GetValidResupplyItemsAndCount (out notnull map< ResourceName, int > validResupplyItems, int maxMagazineCount=4, EMuzzleType muzzleType=-1, InventoryStorageManagerComponent mustBeInStorage=null) |
Get map of all items (ResourceName) and count to add to inventory on resupply. | |
void | ResupplyMagazines (notnull map< ResourceName, int > validResupplyItems) |
Resupply all weapons in map with the given number of magazines. | |
void | ResupplyMagazines (int maxMagazineCount=4, EMuzzleType muzzleType=-1, InventoryStorageManagerComponent mustBeInStorage=null) |
Resupply all weapons so they have given number of magazines. | |
void | EndResupplyMagazines () |
EResupplyUnavailableReason | CanResupplyMuzzle (IEntity user, notnull BaseMuzzleComponent muzzle, int maxMagazineCount=-1, InventoryStorageManagerComponent mustBeInStorage=null, out int currentMagazineAmount=-1) |
EResupplyUnavailableReason | CanResupplyItem (IEntity user, ResourceName itemToResupply, int maxItemCount=-1, InventoryStorageManagerComponent mustBeInStorage=null, out int currentItemAmount=-1) |
void | MoveItemToVicinity (IEntity pItem, BaseInventoryStorageComponent pStorageTo=null) |
try to move item from owner's storage to vicinity. | |
void | OpenInventory () |
void | CloseInventory () |
IEntity | GetStorageToOpen () |
void | SetStorageToOpen (IEntity storage) |
void | Action_OpenInventory () |
void | OnInventoryMenuClosed () |
override void | OnStorageAdded (BaseInventoryStorageComponent storage) |
Will be called when new storage is registered at manager. | |
void | DebugListAllItemsInInventory () |
void | AskServerToDeleteEntity (IEntity ent) |
void | EnablePostFrame (bool enable) |
Enable/disable post frame event. | |
int | GetHealthComponentCount () |
IEntity | GetBandageItem () |
void | ~SCR_InventoryStorageManagerComponent () |
bool | IsAnimationReady () |
bool | IsInventoryLocked () |
void | SetInventoryLocked (bool isLocked) |
int | GetAllItems (inout array< IEntity > items, BaseInventoryStorageComponent storage) |
void | GetWeaponPrefabsOfType (notnull array< IEntity > weapons, EWeaponType weaponType, notnull out array< EntityPrefabData > prefabs) |
Get available prefabs of weapons of specified types. | |
IEntity | FindNextWeaponOfType (EWeaponType weaponType, IEntity currentItem=null, bool allowCurrentPrefab=false) |
Find next weapon of specified types, excluding currentItem, but including it in sorting. | |
void | SCR_InventoryStorageManagerComponent (IEntityComponentSource src, IEntity ent, IEntity parent) |
Public Member Functions inherited from InventoryStorageManagerComponent | |
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) |
Public Member Functions inherited from GameComponent | |
bool | OnTicksOnRemoteProxy () |
Public Attributes | |
ref ScriptInvokerBool | m_OnInventoryOpenInvoker = new ScriptInvokerBool() |
ref ScriptInvokerBool | m_OnQuickBarOpenInvoker = new ScriptInvokerBool() |
Public Attributes inherited from ScriptedInventoryStorageManagerComponent | |
ref ScriptInvokerBase< ScriptInvokerEntityAndStorageMethod > | m_OnItemAddedInvoker = new ScriptInvokerBase<ScriptInvokerEntityAndStorageMethod>() |
ref ScriptInvokerBase< ScriptInvokerEntityAndStorageMethod > | m_OnItemRemovedInvoker = new ScriptInvokerBase<ScriptInvokerEntityAndStorageMethod>() |
Protected Member Functions | |
override void | OnItemAdded (BaseInventoryStorageComponent storageOwner, IEntity item) |
Callback when item is added (will be performed locally after server completed the Insert/Move operation) | |
override void | OnItemRemoved (BaseInventoryStorageComponent storageOwner, IEntity item) |
Callback when item is removed (will be performed locally after server completed the Remove/Move operation) | |
override bool | ShouldForbidRemoveByInstigator (InventoryStorageManagerComponent instigatorManager, BaseInventoryStorageComponent fromStorage, IEntity item) |
Virtual method that allows verification of item removal as a result of move operation on inventory level. | |
void | RpcAsk_ServerToDeleteEntity (RplId targetRplId) |
override void | OnItemAdded (BaseInventoryStorageComponent storageOwner, IEntity item) |
Callback when item is added (will be performed locally after server completed the Insert/Move operation) | |
override void | OnItemRemoved (BaseInventoryStorageComponent storageOwner, IEntity item) |
Callback when item is removed (will be performed locally after server completed the Remove/Move operation) | |
Protected Member Functions inherited from InventoryStorageManagerComponent | |
void | OnItemAdded (BaseInventoryStorageComponent storageOwner, IEntity item) |
Callback when item is added (will be performed locally after server completed the Insert/Move operation) | |
void | OnItemRemoved (BaseInventoryStorageComponent storageOwner, IEntity item) |
Callback when item is removed (will be performed locally after server completed the Remove/Move operation) | |
void | OnStorageAdded (BaseInventoryStorageComponent storage) |
Will be called when new storage is registered at manager. | |
void | OnStorageRemoved (BaseInventoryStorageComponent storage) |
Will be called when storage is unregistered from manager. | |
void | FillInitialStorages (out array< BaseInventoryStorageComponent > storagesToAdd) |
Override this method and fill in storagesToAdd array if you have some storages you'd like to register to manager as owned at initialization time. | |
void | FillInitialPrefabsToStore (out array< ResourceName > prefabsToSpawn) |
Override this method and fill in prefabsToSpawn array if you have some items you'd like to store in inventory at initialization time. | |
bool | ShouldForbidRemoveByInstigator (InventoryStorageManagerComponent instigatorManager, BaseInventoryStorageComponent fromStorage, IEntity item) |
Virtual method that allows verification of item removal as a result of move operation on inventory level. | |
Protected Attributes | |
EInventoryRetCode | m_ERetCode |
int | m_iHealthEquipment = 0 |
bool | m_bIsInventoryLocked = false |
ref SCR_WeaponSwitchingBaseUI | m_pWeaponSwitchingUI |
ref SCR_ResupplyMagazinesCallback | m_ResupplyMagazineCallback |
void SCR_InventoryStorageManagerComponent.~SCR_InventoryStorageManagerComponent | ( | ) |
void SCR_InventoryStorageManagerComponent.SCR_InventoryStorageManagerComponent | ( | IEntityComponentSource | src, |
IEntity | ent, | ||
IEntity | parent | ||
) |
[in] | src | |
[in] | ent | |
[in] | parent |
void SCR_InventoryStorageManagerComponent.Action_OpenInventory | ( | ) |
void SCR_InventoryStorageManagerComponent.AskServerToDeleteEntity | ( | IEntity | ent | ) |
[in] | ent |
bool SCR_InventoryStorageManagerComponent.CanInsertItemInActualStorage | ( | IEntity | item, |
BaseInventoryStorageComponent | storage, | ||
int | slotID = -1 |
||
) |
[in] | item | |
[in] | storage | |
[in] | slotID |
bool SCR_InventoryStorageManagerComponent.CanMoveItem | ( | IEntity | item | ) |
Checks whether it is possible to move the item.
[in] | item |
EResupplyUnavailableReason SCR_InventoryStorageManagerComponent.CanResupplyItem | ( | IEntity | user, |
ResourceName | itemToResupply, | ||
int | maxItemCount = -1 , |
||
InventoryStorageManagerComponent | mustBeInStorage = null , |
||
out int | currentItemAmount = -1 |
||
) |
[in] | itemToResupply | |
[in] | maxItemCount | |
[in] | mustBeInStorage | |
[out] | currentItemAmount |
EResupplyUnavailableReason SCR_InventoryStorageManagerComponent.CanResupplyMuzzle | ( | IEntity | user, |
notnull BaseMuzzleComponent | muzzle, | ||
int | maxMagazineCount = -1 , |
||
InventoryStorageManagerComponent | mustBeInStorage = null , |
||
out int | currentMagazineAmount = -1 |
||
) |
[in] | muzzle | |
[in] | maxMagazineCount | |
[in] | mustBeInStorage | |
[out] | currentMagazineAmount |
void SCR_InventoryStorageManagerComponent.CloseInventory | ( | ) |
void SCR_InventoryStorageManagerComponent.DebugListAllItemsInInventory | ( | ) |
void SCR_InventoryStorageManagerComponent.EnablePostFrame | ( | bool | enable | ) |
Enable/disable post frame event.
void SCR_InventoryStorageManagerComponent.EndResupplyMagazines | ( | ) |
bool SCR_InventoryStorageManagerComponent.EquipAny | ( | BaseInventoryStorageComponent | storage, |
IEntity | item, | ||
int | preferred = -1 , |
||
SCR_InvCallBack | cb = null |
||
) |
Try to equip the item into the storage at provided slot.
[in] | storage | |
[in] | item | |
[in] | preferred | |
[in] | cb |
void SCR_InventoryStorageManagerComponent.EquipCloth | ( | IEntity | pOwnerEntity | ) |
Try to equip the item into the slot (cloth)
[in] | pOwnerEntity |
void SCR_InventoryStorageManagerComponent.EquipGadget | ( | IEntity | pOwnerEntity, |
SCR_InvCallBack | cb = null |
||
) |
Try to equip the item into the slot (gadget)
[in] | pOwnerEntity | |
[in] | cb |
void SCR_InventoryStorageManagerComponent.EquipItem | ( | EquipedWeaponStorageComponent | weaponStorage, |
IEntity | weapon | ||
) |
Try to equip the item into the slot (weapon)
[in] | weaponStorage | |
[in] | weapon |
void SCR_InventoryStorageManagerComponent.EquipWeapon | ( | IEntity | pOwnerEntity, |
SCR_InvCallBack | cb = null , |
||
bool | bFromVicinity = true |
||
) |
Try to equip the item into the slot (weapon)
[in] | pOwnerEntity | |
[in] | cb | |
[in] | bFromVicinity |
void SCR_InventoryStorageManagerComponent.EquipWeaponAttachment | ( | IEntity | pOwnerEntity, |
IEntity | pUserEntity, | ||
SCR_InvCallBack | cb = null |
||
) |
Try to equip the item into the slot (weapon)
[in] | pOwnerEntity | |
[in] | pUserEntity | |
[in] | cb |
BaseInventoryStorageComponent SCR_InventoryStorageManagerComponent.FindActualStorageForItemResource | ( | ResourceName | itemResource, |
BaseInventoryStorageComponent | storage, | ||
int | slotID = -1 , |
||
int | count = 1 |
||
) |
IEntity SCR_InventoryStorageManagerComponent.FindNextWeaponOfType | ( | EWeaponType | weaponType, |
IEntity | currentItem = null , |
||
bool | allowCurrentPrefab = false |
||
) |
Find next weapon of specified types, excluding currentItem, but including it in sorting.
[in] | weaponType | |
[in] | currentItem | |
[in] | allowCurrentPrefab |
int SCR_InventoryStorageManagerComponent.GetAllItems | ( | inout array< IEntity > | items, |
BaseInventoryStorageComponent | storage | ||
) |
[in,out] | items | |
[in] | storage |
int SCR_InventoryStorageManagerComponent.GetAllRootItems | ( | out notnull array< IEntity > | rootItems | ) |
Get an array of all root items in the inventory storage.
[out] | rootItems | All root items without going in the sub inventory of the items or attachments |
IEntity SCR_InventoryStorageManagerComponent.GetBandageItem | ( | ) |
SCR_CharacterInventoryStorageComponent SCR_InventoryStorageManagerComponent.GetCharacterStorage | ( | ) |
int SCR_InventoryStorageManagerComponent.GetHealthComponentCount | ( | ) |
EInventoryRetCode SCR_InventoryStorageManagerComponent.GetReturnCode | ( | ) |
IEntity SCR_InventoryStorageManagerComponent.GetStorageToOpen | ( | ) |
float SCR_InventoryStorageManagerComponent.GetTotalWeightOfAllStorages | ( | ) |
void SCR_InventoryStorageManagerComponent.GetValidResupplyItemsAndCount | ( | out notnull map< ResourceName, int > | validResupplyItems, |
int | maxMagazineCount = 4 , |
||
EMuzzleType | muzzleType = -1 , |
||
InventoryStorageManagerComponent | mustBeInStorage = null |
||
) |
Get map of all items (ResourceName) and count to add to inventory on resupply.
[out] | validResupplyItems | |
[in] | maxMagazineCount | Desired number of magazines |
[in] | muzzleType | (optional) If you want to Resupply only check specific muzzle types. -1 to Ignore |
[in] | mustBeInStorage | (Optional) If storage is given than it will check if the item you try to check is in the storage. Used in tadum with Arsenal to give player magazines that are in that arsenal. |
void SCR_InventoryStorageManagerComponent.GetWeaponPrefabsOfType | ( | notnull array< IEntity > | weapons, |
EWeaponType | weaponType, | ||
notnull out array< EntityPrefabData > | prefabs | ||
) |
Get available prefabs of weapons of specified types.
[in] | weapons | |
[in] | weaponType | |
[out] | prefabs |
void SCR_InventoryStorageManagerComponent.InsertItem | ( | IEntity | pItem, |
BaseInventoryStorageComponent | pStorageTo = null , |
||
BaseInventoryStorageComponent | pStorageFrom = null , |
||
SCR_InvCallBack | cb = null |
||
) |
Try to insert the item into the storage (not slot)
[in] | pItem | |
[in] | pStorageTo | |
[in] | pStorageFrom | |
[in] | cb |
bool SCR_InventoryStorageManagerComponent.IsAnimationReady | ( | ) |
bool SCR_InventoryStorageManagerComponent.IsInventoryLocked | ( | ) |
bool SCR_InventoryStorageManagerComponent.IsResupplyMagazinesAvailable | ( | int | resupplyMagazineCount = 4 , |
out EResupplyUnavailableReason | resupplyUnavailableReason = EResupplyUnavailableReason::NONE , |
||
EMuzzleType | muzzleType = -1 , |
||
InventoryStorageManagerComponent | mustBeInStorage = null |
||
) |
Get if resupply magazines action is available with the given magazine count.
Note it does not check if inventory has free space
[in] | resupplyMagazineCount | How many magazines will be resupplied |
[out] | resupplyUnavailableReason | The reason why the Resupplied failed if it failed |
[in] | muzzleType | (optional) If you want the Resupply to only check specific muzzle types. -1 to Ignore |
[in] | mustBeInStorage | (Optional) If storage is given than it will check if the item you try to resupply is in the storage. Used in tadum with Arsenal to give player magazines that are in that arsenal. |
void SCR_InventoryStorageManagerComponent.MoveItemToVicinity | ( | IEntity | pItem, |
BaseInventoryStorageComponent | pStorageTo = null |
||
) |
try to move item from owner's storage to vicinity.
It might be moved to ground or to a storage in the vicinity
[in] | pItem | |
[in] | pStorageTo |
void SCR_InventoryStorageManagerComponent.OnInventoryMenuClosed | ( | ) |
|
protected |
Callback when item is added (will be performed locally after server completed the Insert/Move operation)
Implements ScriptedInventoryStorageManagerComponent.
|
protected |
Callback when item is removed (will be performed locally after server completed the Remove/Move operation)
Implements ScriptedInventoryStorageManagerComponent.
override void SCR_InventoryStorageManagerComponent.OnStorageAdded | ( | BaseInventoryStorageComponent | storage | ) |
Will be called when new storage is registered at manager.
Implements InventoryStorageManagerComponent.
void SCR_InventoryStorageManagerComponent.OpenInventory | ( | ) |
void SCR_InventoryStorageManagerComponent.PlayItemSound | ( | IEntity | entity, |
string | soundEvent | ||
) |
[in] | entity | |
[in] | soundEvent |
void SCR_InventoryStorageManagerComponent.ResupplyMagazines | ( | int | maxMagazineCount = 4 , |
EMuzzleType | muzzleType = -1 , |
||
InventoryStorageManagerComponent | mustBeInStorage = null |
||
) |
Resupply all weapons so they have given number of magazines.
[in] | maxMagazineCount | Desired number of magazines |
[in] | muzzleType | (optional) If you want to Resupply only check specific muzzle types. -1 to Ignore |
[in] | mustBeInStorage | (Optional) If storage is given than it will check if the item you try to check is in the storage. Used in tadum with Arsenal to give player magazines that are in that arsenal. |
void SCR_InventoryStorageManagerComponent.ResupplyMagazines | ( | notnull map< ResourceName, int > | validResupplyItems | ) |
Resupply all weapons in map with the given number of magazines.
[in] | validResupplyItems | Map of ResourceNames and amount to add to inventory |
void SCR_InventoryStorageManagerComponent.RpcAsk_PlaySound | ( | RplId | targetRplId, |
string | soundAction | ||
) |
[in] | targetRplId | |
[in] | soundAction |
|
protected |
void SCR_InventoryStorageManagerComponent.RpcDo_PlaySound | ( | RplId | targetRplId, |
string | soundAction | ||
) |
[in] | targetRplId | |
[in] | soundAction |
void SCR_InventoryStorageManagerComponent.SetInventoryLocked | ( | bool | isLocked | ) |
[in] | isLocked |
void SCR_InventoryStorageManagerComponent.SetLootStorage | ( | IEntity | pOwner | ) |
[in] | pOwner |
void SCR_InventoryStorageManagerComponent.SetReturnCode | ( | EInventoryRetCode | ERetCode | ) |
[in] | ERetCode |
void SCR_InventoryStorageManagerComponent.SetReturnCodeDefault | ( | ) |
void SCR_InventoryStorageManagerComponent.SetStorageToOpen | ( | IEntity | storage | ) |
[in] | storage |
|
protected |
Virtual method that allows verification of item removal as a result of move operation on inventory level.
Implements InventoryStorageManagerComponent.
bool SCR_InventoryStorageManagerComponent.TryRemoveItemFromInventory | ( | IEntity | pItem, |
BaseInventoryStorageComponent | storage = null , |
||
InventoryOperationCallback | cb = null |
||
) |
Locks the inventory for the duration of the item removal process.
[in] | pItem | |
[in] | storage | |
[in] | cb |
bool SCR_InventoryStorageManagerComponent.TryReplaceAndDropItemAtSlot | ( | BaseInventoryStorageComponent | storage, |
IEntity | item, | ||
int | slotID, | ||
SCR_InvCallBack | cb = null , |
||
bool | isTakenFromArsenal = false , |
||
bool | deleteOriginalItemIfEmpty = false |
||
) |
Try to drop the original item and replace it by itemToReplace at the slot specified by slotID.
[in] | storage | |
[in] | item | |
[in] | slotID | |
[in] | cb | |
[in] | isTakenFromArsenal | |
[in] | deleteOriginalItemIfEmpty |
bool SCR_InventoryStorageManagerComponent.TryReplaceItem | ( | BaseInventoryStorageComponent | storage, |
IEntity | item, | ||
int | preferred, | ||
SCR_InvCallBack | cb | ||
) |
Try to replace at preferred slot.
[in] | storage | |
[in] | item | |
[in] | preferred | |
[in] | cb |
bool SCR_InventoryStorageManagerComponent.TrySwapItems | ( | IEntity | pOwnerEntity, |
BaseInventoryStorageComponent | pStorageTo, | ||
SCR_InvCallBack | cb = null |
||
) |
[in] | pOwnerEntity | |
[in] | pStorageTo | |
[in] | cb |
|
protected |
|
protected |
|
protected |
ref ScriptInvokerBool SCR_InventoryStorageManagerComponent.m_OnInventoryOpenInvoker = new ScriptInvokerBool() |
ref ScriptInvokerBool SCR_InventoryStorageManagerComponent.m_OnQuickBarOpenInvoker = new ScriptInvokerBool() |
|
protected |
|
protected |