Pilot.lua Luau LSP Documentation

website·Indexed 31 days ago

https://arvidsilverlock.github.io/Pilot.lua-Luau-LSP

Documentation for the Pilot.lua Luau LSP, featuring a comprehensive reference of game objects, types, and configurables. Includes detailed specifications for parts such as SolarPanels, Teleporters, and Warheads, as well as Luau type definitions like PortLike and BladeShape enums.

Tokens
91.6K
Snippets
368
Records
991
Agent score
75%

What's inside Pilot.lua

  1. Overview of the Controller object

    The Controller is a craftable, spawnable, non-flammable solid used to alter the speed of attached controllable objects. Controllable objects include Engine, Motor, BallastTank, IonDrive, IonRocket, Thruster, and Rocket. To replicate interface-clicking events (e.g., using a FlipFlop to set speed to 0 or Deactivate to subtract 5 from speed), a polysilicon must be placed between the controller and an object that emits a trigger signal, such as a button.
  2. Overview of the Beacon object

    The Beacon is a craftable, spawnable, non-flammable solid object that creates a small light when powered. It consumes 15 power per tick. It cannot be resized. At its default size (2x2x2), it has a durability of 1 and a default color of #ff0000. Crafting requires 1 Jade, 10 PowerCell, and 50 Ruby.
  3. Overview of the Instrument object

    The Instrument is a part used to measure information about the world. It can be configured to measure various metrics including power, position, orientation, size, speed, angular speed, temperature (Kelvin, Fahrenheit, Celsius), air temperature (Kelvin, Fahrenheit, Celsius), and current region time.
  4. Overview of the Winch object

    The Winch is a flammable solid device used to control the length of attached constraints. To attach a constraint, the Winch must be clicked first. When triggered with polysilicon, the Winch will either increase (Activate) or decrease (Deactivate) the constraint length. Length adjustments are tweened over 1 second; if a new adjustment is triggered during a tween, the current tween is cancelled and a new one begins. Polysilicon triggers have no debounce/cooldown.
  5. Overview of the Modem object

    The Modem is a craftable, spawnable, non-flammable solid part used to send messages cross-region and make HTTP requests to the web.

    Properties:

    • Power Consumption: 10 power per tick.
    • Size: Fixed at 4x5x2 (cannot be resized).
    • Durability: 1 (at default size).
    • Default Color: #444444.
    • Crafting Requirements: 12 Antenna, 200 Quartz, and 12 Router.
  6. Overview of the Telescope object

    The Telescope is a craftable, spawnable, non-flammable solid device (default size 7x2x2, durability 25, color #a3a2a5) that allows users to see and query information about other regions and planets in space while powered. It has no cooldown or range limit. It provides data on planet resources, temperature, distance from its star, and planet type.

    Crafting requirements:

    • 5 Glass
    • 10 Iron
    • 15 Wire
  7. Overview of the Bin object

    The Bin is a craftable, spawnable, non-flammable solid object used to store solid items (e.g., Aluminum, Iron, Faucets). It has a maximum capacity of 1,000 items. If the Bin is destroyed, all items inside are also destroyed. Bins can function as crafting recipe sources unless configured otherwise. By default, the color is #ffffff and it requires 8 Iron to craft.
  8. Overview of Microcontroller execution and constraints

    The Microcontroller runs limited Roblox Luau code in the 'pilot.lua' environment.

    Execution & Power:

    • CPU Time: Power consumption is based on CPU time (milliseconds spent executing). Pauses and waits do not count toward CPU time.
    • Cost: 1 CPU unit costs 1 unit of power. If power is insufficient, the Microcontroller pauses.
    • CPU Limit: There is a limit of 100 milliseconds per game tick. Exceeding this causes the Microcontroller to pause until the next tick.
    • Debugging: Logs and errors are visible in the client-side output (F9).

    Interaction:

    • Can be started, stopped, or restarted (FlipFlop mode) via a polysillicon trigger, or toggled on/off by clicking.
  9. Overview of SolarPanel object

    The SolarPanel is a craftable and spawnable flammable solid that generates electricity using solar energy from a local star. Energy generation is influenced by the proximity to the star, the type of star, and the size of the panel. SolarPanels are blocked by most parts, preventing energy generation, although glass does not block the energy.

    Crafting Requirements:

    • 12 Iron
    • 120 Quartz
    • 21 Silicon
    • 30 Wire

    Properties:

    • Default size: 8x1x8 (Durability: 1)
    • Maximum size durability: 4
    • Default color: #a3a2a5
    • Maximum malleability: 2000 (Example integer dimensions: 1x1x2000, 10x10x20, etc.)
  10. Overview of the Network type

    The Network object handles the traversal and retrieval of connected parts and ports within a microcontroller's network or subnet. It allows developers to find specific hardware components by their class name across the entire network or within specific ports.
    -- Example: Handling a reactor subnet
    local function handleReactor(network: Network)
        -- Get specific parts relative to the reactor subnet
        local reactor = network:GetPart("Reactor")
        local polysilicon = network:GetPart("Polysilicon")
        local dispenser = network:GetPart("Dispenser")
    end
    
    -- Example: Iterating through all ports to handle multiple reactor subnets
    local function handleReactors(network: Network)
        for _, port in network:GetPorts() do
            handleReactor(network:GetSubnet(port))
        end
    end
    
    -- Handle reactor modules on Port 1
    handleReactors(Network:GetSubnet(1))
  11. Overview of the DevBattery debug item

    The DevBattery is a debug item intended for developers. It is a spawnable, non-flammable solid. By default, its color is #f8f8f8.

    Durability varies by size: at its default size (4x6x4), it has a durability of 100,000,000; at its maximum size, it has a durability of 2,183,951,162.

    For developers needing maximum malleability (1,000,000) with integer components, possible dimensions include 1x1000x1000, 10x100x1000, 100x100x100, and various other combinations (e.g., 4x500x500, 20x200x250).

  12. Overview of ARController

    The ARController functions similarly to a TouchScreen but for the actual screen, enabling the display of augmented 3D objects and visuals. It is a craftable, non-flammable solid that consumes 5 power per tick. Only one ARController can display output at a time.

    Crafting Requirements:

    • 20 Antenna
    • 5 Microcontroller
    • 1 TouchScreen
    • 20 Wire