GetContainerInfo
What the server knows of a container beyond its contents.
preset is the loot preset it is rolled from ("" none), restock_in the world seconds until the next opening rolls it
again (-1 when nothing is pending), touched whether a player took or put something since the last roll, and record
the record it reads from - its own key, master:... for a stash the game links to a master inventory, another stash’s key
after LinkContainers. nil for a container nobody opened yet.
Syntax
Section titled “Syntax”GetContainerInfo(key)| Parameter | Type | |
|---|---|---|
key |
string | the container’s level name |
Returns
Section titled “Returns”table - {preset=, restock_in=, touched=, record=}; nil when there is no record
Example
Section titled “Example”local info = GetContainerInfo(key)if info and info.touched then Log(key, "refills in", math.floor(info.restock_in / 3600), "world hours") endSee also
Section titled “See also”GetContainerPreset · RestockContainer · OnContainerRestock · the Doors and containers group of the index
