atl/sm/creation
import "atl/sm/creation"Importing and exporting blueprints (sm.creation).
Functions
Section titled "Functions"func ImportFromFile(world sm.World, path string, o ImportOptions, indestructible *bool) []sm.Body[server] Imports a blueprint file into a world, returning its bodies.
func ImportFromString(world sm.World, json string, o ImportOptions, forceInactive *bool) []sm.Body[server] Imports blueprint JSON into a world, returning its bodies.
func ExportToString(body sm.Body, exportTransforms, forceDynamic bool) stringfunc ExportToTable(body sm.Body, exportTransforms, forceDynamic bool) atl.Value[server] The creation body belongs to, as blueprint JSON / a Lua table.
func BlueprintCost(path string, bodyID *int) atl.Valuefunc BlueprintCostOf(blueprint atl.Value, bodyID *int) atl.Value{ uuid = quantity } to build a blueprint (from a file path or a blueprint table).
func BuildMultiShape(shape sm.Uuid, worldPosition sm.Vec3, worldRotation sm.Quat, localPosition *sm.Vec3, localRotation *sm.Quat)[server] Builds a multi-shape item at a world position.
ImportOptions
Section titled "ImportOptions"type ImportOptions struct { Position *sm.Vec3 Rotation *sm.Quat // Keep the blueprint's own transforms. ImportTransforms *bool}Where to place an imported blueprint.