sm.garage

Associated object type: Garage

The Garage library contains various utility functions for handling the garage.

Functions:

  • createGarage
  • getGarage

  • sm.garage.createGarage(garageId, worldId, halfextents, position)

    Creates a new garage.

    The garage is a spawn area for creations defined by a bounding box. The garage can track blueprints and import them into the world.

    The garage is identified by an user specified id.

    Parameters:

    TypeNameDescription
    intgarageIdThe id of the garage to create
    uintworldIdThe world the garage is in
    Vec3halfextentsHalf extents of the spawnbox inside the garage
    Vec3positionPosition of the spawn box inside the garage

    Returns:

    TypeDescription
    Garage Garage The Garage object

    sm.garage.getGarage(garageId)

    Gets a already existing garage returns nil if it does not exist.

    Parameters:

    TypeNameDescription
    uintgarageIdThe id of the garage to get

    Returns:

    TypeDescription
    Garage Garage The Garage object