Enum Module | References
Enums are fixed lists of options recognized by the game engine. They are used to ensure your code provides valid instructions to drones and the game world.
📷 Camera & Viewport
Section titled “📷 Camera & Viewport”These Enums are used with the player.camera() and player.cameraMode() functions to control what the player sees.
Enum.Camera
Section titled “Enum.Camera”Defines which object the camera is targeting.
| Property | Description |
|---|---|
Enum.Camera.Base | Targets the main farm base. |
Enum.Camera.Drone | Targets your active drone. |
Enum.Camera.Player | Targets your character. |
Enum.Camera.World | Provides a free-moving world view. |
Enum.CameraMode
Section titled “Enum.CameraMode”Defines how the camera behaves while following a target.
| Property | Description |
|---|---|
Enum.CameraMode.Attach | Sticks directly to the target. |
Enum.CameraMode.Classic | Standard 3rd person view. |
Enum.CameraMode.Fixed | Stationary camera that doesn’t rotate. |
Enum.CameraMode.Follow | Smoothly follows behind the target. |
Enum.CameraMode.Stable | Locked position for precise observation. |
🚜 Movement & Interaction
Section titled “🚜 Movement & Interaction”Enum.Direction
Section titled “Enum.Direction”Used with drone.move() to navigate the grid.
Enum.Direction.NorthEnum.Direction.SouthEnum.Direction.EastEnum.Direction.West
Enum.ClickType
Section titled “Enum.ClickType”Used in UI events to detect mouse behavior.
Enum.ClickType.LeftEnum.ClickType.MidEnum.ClickType.Right
🎒 Farming & Equipment
Section titled “🎒 Farming & Equipment”Enum.Seed
Section titled “Enum.Seed”Used with drone.plant() and market.buySeed().
Enum.Seed.WheatEnum.Seed.PotatoEnum.Seed.TomatoEnum.Seed.Lemon(and all other seeds)
Enum.Gear
Section titled “Enum.Gear”Represents tool types used in the game.
Enum.Gear.Watering_CanEnum.Gear.Fertilizer
⌨️ System
Section titled “⌨️ System”Enum.KeyCode
Section titled “Enum.KeyCode”Used with player.input to detect keyboard presses. This includes all standard keys:
Enum.KeyCode.W,A,S,DEnum.KeyCode.E(Interaction)Enum.KeyCode.Space(Jump)Enum.KeyCode.LeftShift(Run)
💡 Example: Multi-Enum Script
Section titled “💡 Example: Multi-Enum Script” lau-compiler.exe
-- Set camera to watch the drone in follow modeplayer.camera(Enum.Camera.Drone)player.cameraMode(Enum.CameraMode.Follow)
print("Camera set to Drone")
-- Move drone and plant Wheatdrone.move(Enum.Direction.North)drone.plant(Enum.Seed.Wheat)
print("Moving North...")OUTPUT:
Camera set to Drone
Moving North...