Skip to content

atl/sm/tool

import "atl/sm/tool"

Tool helpers (sm.tool): lift placement, paint palette, forced tools.

func Exists(uuid sm.Uuid) bool

True if a tool with this uuid exists.

func LiftMaxLevel() int

The highest lift level.

func CheckLiftCollisionAtLevel(creation []sm.Body, position sm.Vec3, rotation, level, timeStamp int) bool

Whether a lift carrying creation would collide at a specific level.

func PaintPaletteColumn(uintRgba uint32) int

The 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.

type LiftCheck struct {
Collides bool
Level int
}

Result of CheckLiftCollision.

func CheckLiftCollision(creation []sm.Body, position sm.Vec3, rotation int) LiftCheck

Whether a lift carrying creation at position would collide, and at which level it would sit.