CC: Tweaked addon for Sable!
CC: Sable is a CC: Tweaked addon for the Sable backend of Create: Simulated!
Currently, it provides the Sub-Level API (sublevel) for all in-game computers! Its methods can only be properly called when the computer is on a Sub-Level (physics object). It also provides the Aerodynamics API (aero,aerodynamics) for all in-game computers to access dimension-specific physics information!
This mod also comes bundled with the CC: Advanced Math datapack for extra math utilities, namely the quaternion module for handling rotations in 3D space. This is used to convert the orientation of Sub-Levels into a more usable format for Lua.
This method returns the Universally Unique Identifier (UUID) of the Sub-Level that the computer is currently on.
This method returns the name of the Sub-Level that the computer is currently on.
This method sets the name of the Sub-Level that the computer is currently on.
This method returns the logical pose of the Sub-Level that the computer is currently on. The logical pose is a table containing the position and orientation of the Sub-Level in the world. The position, scale, and rotationPoint fields are automatically converted to Lua vectors. The orientation field is also automatically converted to the CC: Advanced Math quaternion.
This method returns the last known pose of the Sub-Level that the computer is currently on. The same changes to getLogicalPose are also made here.
This method returns the global velocity of the Sub-Level that the computer is currently on.
This method returns the linear velocity of the Sub-Level that the computer is currently on.
This method returns the angular velocity of the Sub-Level that the computer is currently on.
This method returns the center of mass of the Sub-Level that the computer is currently on.
This method returns the mass of the Sub-Level that the computer is currently on.
This method returns the inverse mass of the Sub-Level that the computer is currently on.
This method returns the inertia tensor of the Sub-Level that the computer is currently on.
This method returns the inverse inertia tensor of the Sub-Level that the computer is currently on.
This method returns the air pressure at the given position.
This method returns the gravity of the dimension.
This method returns the magnetic north vector of the dimension.
This method returns the universal drag constant of the dimension.
This method returns the raw physics information of the dimension (basically the values assigned by datapack). This is given as a table with dimension as a string, priority as a number, gravity as a vector, pressure as a number, magneticNorth as a vector, universalDrag as a number, and pressureFunction as a custom Lua wrapped object (see LuaBezierResourceFunction).
This method returns the default physics information of the dimension. The table is laid out the same as getRaw.
This method returns an array of points along the bezier curve with altitude, value, and slope as fields for each point.
This method evaluates the function given the altitude along the bezier curve.