Skip to content

Reference

tilttek/inventory

Every public type of the package, with its role.

TypeRole
InventoriesOpens, runs, reads and erases inventories, their items, loads and logs
InventoryAn inventory: reference, owner, name, game system, opening moment
ItemAn item under a key: name, quantity, burden, place, container, equipped, adding moment
BurdenWhat one unit weighs and the slots a stack takes
PlaceThe stash, a carrier or a container, written and read back as text
ContainerWhat makes an item a container: its bounds and whether its contents weigh
FillWhat a container holds against its bounds
MeasureWeight or Slots
CarryRulesThe carrying rules of a system: measure, default capacity, bands, refusal over capacity
LoadBandA band of load, up to a fraction of the capacity
LoadWhat a carrier carries, its capacity, band, limit and room
LogEntryA line of an inventory's log
LimitsInventories per owner, items per inventory, container depth, log entries
InventoryChangedTold after each act, identifiers only
ChangeWhat happened to an inventory
RefusalWhy an act is refused
Contract\InventoryStoreWhere inventories, items and logs are kept
Contract\RuleBookThe carrying rules of each system
Contract\CarrierCapacityThe capacity of each carrier
Contract\InventoryObserverWhat the application does with the events
Store\InMemoryInventoryStoreThe store in memory
Rules\StaticRuleBookCarrying rules given by system key
Rules\DefaultCapacityThe rules' default capacity for every carrier
Exception\InventoryExceptionEvery exception of the library
Exception\InventoryRefusedAn act refused, with its Refusal
Exception\UnknownInventoryNo inventory under a reference, no item under a key
Exception\InvalidInventoryA value out of bounds