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