Drone Module
The drone module controls movement, farming actions, and tile inspection.
Movement
Section titled “Movement”| Function | Returns | Description |
|---|---|---|
drone.move(dir) | void | Moves one tile in the given direction. |
drone.getPosition() | number, number | Returns the current X and Z coordinates. |
drone.doFlip() | void | Performs a backflip animation. |
Farming
Section titled “Farming”| Function | Returns | Description |
|---|---|---|
drone.plant(seed) | void | Plants the specified seed. |
drone.useItem(item) | void | Uses an item on the current tile. |
drone.crop() | void | Clears the tile or harvests a ground crop. |
drone.harvest() | void | Picks fruit without destroying the plant. |
drone.canCrop() | boolean | Returns true when the current plant can be cropped. |
drone.canHarvest() | boolean | Returns true when the current fruit can be harvested. |
lau-compiler.exe
print("Scanning: " + drone.getPlant())print("Can crop: " + drone.canCrop())OUTPUT:
Scanning: Wheat
Can crop: true
Tile Data
Section titled “Tile Data”| Function | Returns | Description |
|---|---|---|
drone.getPlant() | string | The name of the plant below the drone. |
drone.getFruit() | string | The name of the fruit on the plant. |
drone.status() | Enum.DroneStatus | Returns the current drone status. |