Inventory - Types/Gridinv/Submodules/Storage¶
This page documents the hooks defined by the types/gridinv/submodules/storage submodule in the inventory module.
CanPlayerSpawnStorage(client, entity, info)View Source
Purpose
Determines whether a player may convert an entity into storage.
Realm
Server
Parameters
Player client The player trying to create the storage entity.
Entity entity The target entity being turned into storage.
table info The requested storage configuration data.
Returns
boolean|nil Return false to block storage creation.
CanSaveData(ent, inventory)View Source
Purpose
Determines whether a storage entity's inventory data should be persisted.
Realm
Server
Parameters
Entity ent The storage entity being saved.
table inventory The inventory attached to the storage entity.
Returns
boolean|nil Return false to skip saving this storage inventory.
InitializeStorage(entity)View Source
Purpose
Called when the storage system initializes a storage-capable entity.
Realm
Shared
Parameters
Entity entity The storage entity being initialized.
OnCreateStoragePanel(localInvPanel, storageInvPanel, storage)View Source
StorageCanTransferItem(client, storage, item)View Source
Purpose
Determines whether a player may transfer a specific item through a storage interaction.
Realm
Server
Parameters
Player client The player attempting the transfer.
Entity storage The storage entity involved in the transfer.
table item The item being moved.
Returns
boolean|nil Return false to block the item transfer.
StorageEntityRemoved(entity, inventory)View Source
StorageInventorySet(entity, inventory, isCar)View Source
StorageRestored(ent, inventory)View Source
StorageUnlockPrompt(entity)View Source
Purpose
Called on the client when a storage unlock prompt should be shown.
Realm
Client
Parameters
Entity entity The locked storage entity requesting unlock input.