The Inventory is a smart contract which allows players of web3 games to equip items into their character NFTs.
The Inventory tracks equipment purely on-chain, without requiring any off-chain metadata. This makes game NFTs maximally composable - their state can be consumed not only by off-chain programs but also by smart contracts.
There are two types of users for the Inventory - administrators and players.
Administrators can:
Players can:
When an item is equipped onto an NFT, ownership of the item is transferred to the inventory contract. This prevents the double use of item tokens.
It also means that, if a player transfers an NFT to another player, the items that were equipped on that NFT are also implicitly transferred to the other player.
The Inventory contract is intended to be used by web3 games.
If a game interprets inventory slots generally as holding character attributes, then it can use the Inventory to track things like hit points, experience points, reputation, abilities, and skills in addition to items/equipment.