Garage

Associated namespace: sm.garage

A userdata object representing an Garage in the game.

Values:

Functions:

Operations:

OperationReturn typeDescription
Garage == GaragebooleanChecks if two instances of Garage refer to the same Garage.

id int

Get:

returns the id of the garage


creationFits()

Checks if the tracked creation fits into the garage returns nil if no creation is tracked.

Returns:

TypeDescription
bool true if the creation fits otherwise false.

getBlueprintBounds()

Returns the bounds of the body of the actively tracked blueprint in the garage. Returns nil if there is no actively tracked blueprint.

Returns:

TypeDescription
tableThe table of { min, max }

getGarageBounds()

Returns the bounds of the garage staging area.

Returns:

TypeDescription
tableThe table of { min, max }

getPlacement()

Imports a actively tracked blueprint using the garage returns nil if the blueprint is not initialized yet.

Returns:

TypeDescription
Vec3position The world position of the tracked blueprint.

getPosition()

Returns the position of the garage.

Returns:

TypeDescription
Vec3position

getTrackedBlueprint()

Gets the tracked creation Name and JsonTable from the garage.

Returns:

TypeDescription
string Name
table jsonData

getTrackingRevision()

Returns the tracking revision counter, incremented each time the tracked blueprint changes.

Returns:

TypeDescription
intrevision

hasActiveTracking()

Checks if the garage has an actively tracked blueprint.

Returns:

TypeDescription
bool true if there is an actively tracked blueprint, false otherwise.

importBlueprint()

Imports a actively tracked blueprint using the garage


trackBlueprint(blueprint)

Client only

Tracks a blueprint from a garage and synchronizes it to all other clients.

Parameters:

TypeNameDescription
stringblueprintpath The path of the blueprint

untrackBlueprint()

Untrack a blueprint from a garage and synchronizes it to all other clients.