loadStorage
exports["RiP-Weed"]:loadStorage(cb)
This function fetches the current farm's storage
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
cb | Function | Yes | Callback function |
Returned Table
Name | Type | Explenation |
---|---|---|
items | Array | Farm's storage |
slots | Integer | Farm's storage slots |
used | Integer | Farm's used slots |
level | Integer | Storage-upgrade level (0-4) |
Items Table
Name | Type | Explenation |
---|---|---|
name | String | Item name |
type | String | Item type (seed , bud , equip , craft ) |
amount | Integer | Item amount |
label | String | Item label |
Example
exports["RiP-Weed"]:loadStorage(function(callback)
if callback then
for r,p in pairs(callback.items) do
print(r, p.name)
end
end
end)