Constructs an instance whose specification is given by the given value and, optionally, with the given view. Other members may be modified after construction, if needed.
The orientation of the block's texture with respect to its physical position.
Int base_index
The index of the block's texture in the texture table. Must be between 0 and 255.
Int userdata
An extra slot for scripts to use as they wish. This is not used in the standard library. Must be between 0 and 2^32 - 1.
ElectricNodeReference
This class is used to track nodes in the electrical network.
Constructors
ElectricNodeReference.new(Vector position, Int index)
Constructs a reference referring to a node on a block at the given position. The index argument is used to disambiguate between blocks with multiple nodes - this should be 0 for blocks with only one node. The positive pin of a sensor is index 0 and the inverted pin is index 1.
The class Message is a value that can be serialized and communicated between scripts running on different threads or between saves and loads. It is typically not used directly; function accepting an argument of this type also accept any argument that could instead be passed to the constructor.
Constructors
Message.new(Value value)
Creates a message with the contents specified by value. This value must either be: nil; an instance of String, Number, Boolean, Direction, Movement, Orientation, View, Vector, CellFace, CellView, GraphicalEntity, VisibleBlock, or BlockSpecification; or a table whose keys are all numbers or strings and whose values satisfy these requirements.
Member Functions
Value read()
Reconstructs the contents of the message. Note that this creates an independent copy of the message; changes in the returned value do not affect the message object itself.
Blueprint
The class Blueprint represents a series of interactions around some center.
Create a blueprint with the specified interactions and center.
Blueprint.welder() Blueprint.welder(Int tensile_strength, Int lateral_strength)
Creates a blueprint for a welder with the specified parameters.
Members
vector<Interaction> placements
The interactions composing this blueprint.
Vectord center
The center of the blueprint.
ElectricStatus
The class ElectricStatus represents the possible signals present in the electric network. It can take on the following values:
OFF
ON
STUCK
The STUCK signal occurs when the system fails to resolve a loop involving sensors looking through portals controlled by other sensors - where the loop involves at least one inverting signal and is not determined by outside forces.
## Alignment
The class Alignment represents the options for aligning text or figures. It can take on the following values:
ALIGN_LOWER
ALIGN_MIDDLE
ALIGN_UPPER
The values specify whether a reference point should be interpreted as the lower coordinate, center coordinate, or upper coordinate of an object.
# Helper Functions