Skip to main content

updatePlant

exports["RiP-Weed"]:updatePlant(plantId, action, cb) 

This function updates the current farm's plants

Arguments

NameTypeOptionalExplenation
plantIdIntegerNoPlant (slot) id
actionStringNoUpdate action type (water, fertilizer, harvest)
cbFunctionYesCallback function

Returned Table

NameTypeExplenation
storageArrayFarm's storage
plantsArrayFarm's plants

false on error

Example

exports["RiP-Weed"]:updatePlant(1, 'harvest', function(callback)
if callback then
print("plant successfully harvested")
end
end)