What's wrapped
Every function and object method in the game's sm.lua stubs that isn't deprecated has a
typed C++ form.
| Header | Covers |
|---|---|
| atl/sm.hpp | the object types (Shape, Body, Interactable, Joint, Character, Player, Container, World, Harvestable, Effect, Tool, Unit, AiState, Lift, Portal, PathNode, Storage, ScriptableObject, ClientScriptableObject and more), physics, game, effect, audio, shapes, bodies, units, harvestables, characters, players, json, storage, container |
| atl/math.hpp, atl/util.hpp | Vec3, Quat, Color, Uuid (math done in WASM), util, noise |
| atl/gui.hpp | Gui (GuiInterface), every built-in GUI, fades, text measuring, the garage import GUI |
| atl/client.hpp | localPlayer, camera |
| atl/trigger.hpp | AreaTrigger, areaTrigger |
| atl/world.hpp | worlds, portals, cell, event, message, creation, construction, lifts, Garage, pipeGraph, fire, compromised, challenge, menuCreation, achievement, tool, clientScriptableObjects |
| atl/ai.hpp | projectile, melee, ai, pathfinder, pathNodes |
| atl/render.hpp | render, visualization, debris, particle, CullSphereGroup, BuilderGuide, JsonGui |
| atl/terrain.hpp | terrainData, terrainTile, terrainGeneration, voxelTerrainCell, terrainHarvestable, tunnelGenerator |
| atl/debugdraw.hpp, atl/item.hpp | debugDraw (and debugDraw::topDown), item |
Containers have sm::container::transaction([&] { }) for grouped changes.
Left out on purpose
Section titled "Left out on purpose"These are marked deprecated, removed, or "does nothing" by the game:
| Lua | Use instead |
|---|---|
Shape:destroyPart, Shape:shapeExists |
destroy(), exists() |
the name-based sm.projectile and sm.melee overloads |
the uuid overloads |
Effect:bindEventCallback, clearEventCallbacks |
|
Tool:setInteractionTextSuppressed |
|
sm.areaTrigger.createBoxWater |
|
sm.gui.createBagIconGui, createBeaconIconGui, createWaypointIconGui |
Gui::worldIcon |
sm.gui.createWidget, setCenterIcon, widget.destroy, the Widget type |
|
sm.harvestable.create |
harvestables::create |
sm.localPlayer.getPosition |
localPlayer::position() |
sm.shape.getShapeIcon, the sm.terrainData.legacy_* functions |
Anything else can still be reached with ATL_GLOBAL("sm.path.to.function").