Connections of drafts
Drafts have "ports" to connect to each other on the canvas. A port can be either an input or an output. Ports have different types, and only ports of the same type can connect to each other.
The type of ports is also called the connection type, and the list of such types is determined through the config file.
Connections are added via the assets/{modid}/config/pomdrafts/connections.json
file.
[
{
"code": "CONNECTION_TYPE",
"textures": {
"input": "...",
"output": "...",
"connected": "..."
}
}
]
The connection has 3 state textures: input
, output
and connected
. input
and output
are displayed when a draft is not connected to an adjacent one. connected
is displayed when there are inputs and outputs directed at each other.
The textures do not rotate depending on the direction of the port, take this into account when creating textures.