Garage
Associated namespace: sm.garage
A userdata object representing an Garage in the game.
Values:
Functions:
- creationFits
- getBlueprintBounds
- getGarageBounds
- getPlacement
- getPosition
- getTrackedBlueprint
- getTrackingRevision
- hasActiveTracking
- importBlueprint
- trackBlueprint
- untrackBlueprint
Operations:
| Operation | Return type | Description |
|---|---|---|
| Garage == Garage | boolean | Checks 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:
| Type | Description |
|---|---|
| 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:
| Type | Description |
|---|---|
| table | The table of { min, max } |
getGarageBounds()
Returns the bounds of the garage staging area.
Returns:
| Type | Description |
|---|---|
| table | The table of { min, max } |
getPlacement()
Imports a actively tracked blueprint using the garage returns nil if the blueprint is not initialized yet.
Returns:
| Type | Description |
|---|---|
| Vec3 | position The world position of the tracked blueprint. |
getPosition()
Returns the position of the garage.
Returns:
| Type | Description |
|---|---|
| Vec3 | position |
getTrackedBlueprint()
Gets the tracked creation Name and JsonTable from the garage.
Returns:
| Type | Description |
|---|---|
| string Name | |
| table jsonData |
getTrackingRevision()
Returns the tracking revision counter, incremented each time the tracked blueprint changes.
Returns:
| Type | Description |
|---|---|
| int | revision |
hasActiveTracking()
Checks if the garage has an actively tracked blueprint.
Returns:
| Type | Description |
|---|---|
| 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:
| Type | Name | Description |
|---|---|---|
| string | blueprint | path The path of the blueprint |
untrackBlueprint()
Untrack a blueprint from a garage and synchronizes it to all other clients.