stdb-inventory

Crates.iostdb-inventory
lib.rsstdb-inventory
version0.1.0
created_at2025-07-10 04:03:14.852963+00
updated_at2025-07-10 04:03:14.852963+00
descriptionCore utilities and common functionality for SpacetimeDB-based game development.
homepagehttps://github.com/rafaelGuerreiro/spacetimedb-libs
repositoryhttps://github.com/rafaelGuerreiro/spacetimedb-libs
max_upload_size
id1745838
size20,793
Rafael Guerreiro (rafaelGuerreiro)

documentation

https://github.com/rafaelGuerreiro/spacetimedb-libs/tree/main/server/libs/stdb-inventory

README

stdb-inventory

Inventory and item management system for SpacetimeDB-based games. This library provides tables and functionality to handle player inventories, item definitions, trading, and equipment management.

Features

Inventory Management

  • Player inventories: Store and manage player-owned items
  • Item stacking: Automatic stacking for stackable items
  • Equipment slots: Manage equipped items and loadouts
  • Storage containers: Shared storage like guild storage

Database Tables

  • PlayerInventory: Stores player-owned items and quantities
  • ItemDefinition: Master catalog of all available items
  • EquippedItems: Tracks currently equipped gear per player
  • ItemTransaction: Logs item transfers, trades, and purchases

Item Types

  • Consumables: Potions, food, temporary buffs
  • Equipment: Weapons, armor, accessories
  • Materials: Crafting components and resources
  • Quest items: Special items for quests and progression

Run tests with:

cd server
cargo +nightly fmt && cargo check --all && cargo test
Commit count: 0

cargo fmt