atl/sm/tool
import "atl/sm/tool"Tool helpers (sm.tool): lift placement, paint palette, forced tools.
Functions
Section titled "Functions"func Exists(uuid sm.Uuid) boolTrue if a tool with this uuid exists.
func LiftMaxLevel() intThe highest lift level.
func CheckLiftCollisionAtLevel(creation []sm.Body, position sm.Vec3, rotation, level, timeStamp int) boolWhether a lift carrying creation would collide at a specific level.
func PaintPaletteColumn(uintRgba uint32) intThe paint tool palette column closest to a color (sm.Color.UintRgba()).
func Force(t sm.Tool)[client] Forces the local player to hold t until Unforce().
func Unforce()[client] Releases a forced tool.
func PreloadRenderables(rends []string)[client] Loads renderables ahead of use.
LiftCheck
Section titled "LiftCheck"type LiftCheck struct { Collides bool Level int}Result of CheckLiftCollision.
func CheckLiftCollision(creation []sm.Body, position sm.Vec3, rotation int) LiftCheckWhether a lift carrying creation at position would collide, and at which level it would sit.