Skip to content

Garden Module

The garden module lets you scan planted tiles instantly and inspect crop data without moving the drone.


FunctionReturnsDescription
garden.getGardenPositions()tableReturns every planted tile as a dictionary keyed by "X,Z" coordinate strings.
garden.getPlantEnum(seed)tableReturns only the plants that match the specified seed enum.
lau-compiler.exe
varol positions = garden.getGardenPositions()
for coord, plant inpairs(positions) do
print(coord + " : " + plant.PlantName)
end
OUTPUT:
-12,6 : LotusBush 4,-1 : MangoTree 8,-6 : CoconutTree

FunctionReturnsDescription
garden.getPlantPosition(x, z)tableReturns detailed growth and fruit data for the plant at the specified coordinates.
  • PlantName - string, the planted crop name.
  • PlantWeight - number, the current plant weight.
  • PlantPercent - number, the plant growth percentage.
  • HasFruit - boolean, whether the plant currently has fruit.
  • FruitName - string, the fruit name.
  • FruitWeight - number, the current fruit weight.
  • FruitPercent - number, the fruit growth percentage.
lau-compiler.exe
varol coord = "0,0"
varol parts = string.split(coord, ",")
varol x = tonumber(parts[1])
varol z = tonumber(parts[2])
varol info = garden.getPlantPosition(x, z)
if info then
print("Tile: " + coord)
print("Plant: " + info.PlantName)
print("Plant Growth: " + info.PlantPercent)
print("Fruit Growth: " + info.FruitPercent)
else
print("Tile is empty.")
end
OUTPUT:
Tile: 0,0 Plant: CacaoTree Plant Growth: 100 hasFruit: true