fetchFarm
exports["RiP-Weed"]:fetchFarm()
This function fetches the current farm's data
Returned Table
Name | Type | Explenation |
---|---|---|
owned | Integer | 0 = not owned; 1 = owner; 2 = owned by other player |
balance | Integer | Farm's money |
total_sales | Integer | Farm's all-time money |
plants | Array | Farm's active plants |
storage | Array | Farm's storage |
crafter | Array | Farm's crafting queue |
upgrades | Array | Farm's upgrades |
stats | Array | Farm's harvest stats |
seed_stats | Array | Seed top 3 charts |
false
on error
Example
local farmData = exports["RiP-Weed"]:fetchFarm()
if farmData then
print(json.encode(farmData))
else
print("player is not inside a farm")
end