Interaction
While not a literal class in Lua, Interaction is a variant referring to any of the types listed on this page. These types describe all of the possible ways in which the user or a script might manipulate the game world.
Place
An interaction requesting the creation of an object.
Constructors
Place.new(CellView where, BlockSpecification what)
Returns an interaction representing the placement of an object at the specified position.
Members
CellView where
The position at which to place the block. This uses the same conventions as block positions are reported - so a block rotated by 90 degrees clockwise should have this equal to CellView.new(position, View.new(R3))
.
BlockSpecification what
The object to place. Note that changing parts of this by writing place.what.mass = 10000
will not work as expected - you have to set the whole .what
property at once.
String type (read-only)
Always equal to "Place"
Paint
An interaction requesting the creation of an object.
Constructors
Paint.new(Vector where, int base_index, Orientation base_orientation, int? userdata)
Returns an interaction that paints the object at the vector where
with the given index (between 0 and 255) and the given orientation. The optional userdata
parameter (between 0 and 2^32-1), if set, will also change the userdata of the painted block.
Members
Vector where
The position at which to paint.
Orientation base_orientation
The (global) orientation of the painted object. Setting this to R1
would make the chosen texture be displayed at a rotation of 90 degrees clockwise.
int base_index
The new index of the texture. Between 0 and 255.
int? userdata
The optional new userdata of the texture. Between 0 and 2^32 - 1.
String type (read-only)
Always equal to "Paint"
CreatePin
An interaction requesting the creation of a pin.
Constructors
CreatePin.new(Vector where, int? strength)
Returns an interaction that creates a new pin and the specified position with the specified strength. If no strength is given, defaults to 10^15.
Members
Vector where
The position to pin.
int strength
The strength of the pin.
String type (read-only)
Always equal to "CreatePin"
Unpin
An interaction requesting the destruction of a pin.
Constructors
Unpin.new(Vector where)
Returns an interaction that destroys the pin at the specified position.
Members
Vector where
The position to pin.
String type (read-only)
Always equal to "Unpin"
PlacePortal
An interaction requesting the creation of a pair of linked portals.
Constructors
PlacePortal.new(CellView input, CellView output)
Returns an interaction that creates input and output portals at the specified positions.
Members
CellView input
The position at which the input portal will be placed.
CellView output
The position at which the output portal will be placed.
ExtraBlockData input_extra
The painting information for the input side of the portal.
ExtraBlockData output_extra
The painting information for the output side of the portal.
String type (read-only)
Always equal to "PlacePortal"
LinkPortals
An interaction requesting that two existing portals be linked.
Constructors
LinkPortals.new(Vector input, Vector output)
Returns an interaction that links the PortalIn at the given input to the PortalOut at the given output.
Members
Vector input
The position of the PortalIn to be linked.
Vector output
The position of the PortalOut to be linked.
String type (read-only)
Always equal to "LinkPortals"
Join
An interaction requesting that two faces be welded together.
Constructors
Join.new(CellFace what) Join.new(CellFace what, int tensile_strength, int shear_strength)
Returns an interaction that creates a weld at the specified face. Strengths default to 10^15 if not specified.
Members
int tensile_strength
The strength of the created weld against being torn along its axis.
int shear_strength
The strength of the created weld against being sheared apart.
String type (read-only)
Always equal to "Join"
BreakJoint
An interaction requesting that two faces have their weld removed.
Constructors
BreakJoint.new(CellFace what)
Returns an interaction that destroys the weld at the specified face.
Members
String type (read-only)
Always equal to "BreakJoint"
Destroy
An interaction requesting that two faces have their weld removed.
Constructors
Destroy.new(Vector where)
Returns an interaction that destroys the contents of the specified position.
Members
Vector where
The position to destroy the contents of.
String type (read-only)
Always equal to "Destroy"
CreateWire
An interaction requesting that two electric nodes be wired together.
Constructors
CreateWire.new(ElectricNodeReference source, ElectricNodeReference target)
Returns an interaction that creates a wire between the specified electric nodes.
Members
ElectricNodeReference source
The source of the wire.
ElectricNodeReference target
The target of the wire.
String type (read-only)
Always equal to "CreateWire"
BreakWire
An interaction requesting that the wire between two electric nodes be destroyed.
Constructors
BreakWire.new(ElectricNodeReference source, ElectricNodeReference target)
Returns an interaction that destroys a wire between the specified electric nodes.
Members
ElectricNodeReference source
The source of the wire to be destroyed.
ElectricNodeReference target
The target of the wire to be destroyed.
String type (read-only)
Always equal to "BreakWire"
RunScript
An interaction requesting the specified script be run on the physics side.
Constructors
RunScript.new(String script, Message ? arg)
Returns an interaction that runs the specified script with the given (optional) argument.
Members
String script
The script to run.
Message arg
The argument to pass to the script.
String type (read-only)
Always equal to "RunScript"
Documentation built with MkDocs using Windmill Dark theme by None (noraj).