updatePlant
exports["RiP-Weed"]:updatePlant(plantId, action, cb)
This function updates the current farm's plants
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
plantId | Integer | No | Plant (slot) id |
action | String | No | Update action type (water , fertilizer , harvest ) |
cb | Function | Yes | Callback function |
Returned Table
Name | Type | Explenation |
---|---|---|
storage | Array | Farm's storage |
plants | Array | Farm's plants |
false
on error
Example
exports["RiP-Weed"]:updatePlant(1, 'harvest', function(callback)
if callback then
print("plant successfully harvested")
end
end)