atl/sm/portals
import "atl/sm/portals"[server] Portals between worlds (sm.portal; see sm.Portal).
Functions
Section titled "Functions"func Create(dimensions sm.Vec3) sm.Portal[server] Creates a portal with the given dimensions.
func Destroy(p sm.Portal)[server] Destroys a portal.
func AddWorldHook(world sm.World, name string, portal sm.Portal)[server] Leaves portal for a world created later to find with PopWorldHook(name).
func PopWorldHook(name string, world sm.World) sm.Portal[server] Takes the portal left under name by AddWorldHook.
func TransferBToB(from, to sm.Portal, filter *int) bool[server] Moves what is in portal from to portal to.
BestPortal
Section titled "BestPortal"type BestPortal struct { Position sm.Vec3 Portal sm.Portal}A portal and the position to walk to.
func FindBestToWorld(playerWorldID, targetWorldID int, from sm.Vec3) (BestPortal, bool)The portal with the shortest path from from (in world playerWorldID) to world targetWorldID.