Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Allow nodes to specify which sides to connect to.
NDT_CONNECTED attempts to connect to any side of nodes that it can connect to, which is troublesome for FACEDIR type nodes that generally may only have one usable face, and can be rotated. We introduce a node parameter `connect_sides` that is valid for any node type. If specified, it lists faces of the node (in "top", "bottom", "front", "left", "back", "right", form, as array) that connecting nodeboxes can connect to. "front" corresponds to the south facing side of a node with facedir = 0. If the node is rotatable using *simple* FACEDIR, then the attached face is properly rotated before checking. This allows e.g. a chest to be attached to only from the rear side.
- Loading branch information
1 parent
e737b1c
commit 37b4f0d
Showing
6 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37b4f0d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching stations are just connecting to the cable if it's below it.
How can you make "foo:hasconnecting" connect to "foo:allsideenter" from all sides but to "foo:justbottomopen" just from below it?
37b4f0d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HybridDog: Set
connect_sides = {"bottom"}
onfoo:justbottomoopen
and leavefoo:allsidesenter
at the default of all sides.37b4f0d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, l thought connect_sides is part of the nodedef of the connected nodebox node and defines to which side it adds connections, which is actually done by omitting nodeboxes to those sides.
37b4f0d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l just noticed that the selection box isn't set to the nodebox:

37b4f0d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HybridDog: #3886