]> git.lizzy.rs Git - minetest.git/commit
Allow nodes to specify which sides to connect to.
authorAuke Kok <sofar@foo-projects.org>
Fri, 4 Mar 2016 07:18:04 +0000 (23:18 -0800)
committerShadowNinja <shadowninja@minetest.net>
Sat, 12 Mar 2016 17:08:17 +0000 (12:08 -0500)
commit37b4f0d34c73de58e0f5d153b7e699dc7430e23d
tree5c1f23df722ef9bc2c1110d78016439b26b35772
parente737b1c271c9d957651ef2201bb820e4465358bf
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.
doc/lua_api.txt
src/collision.cpp
src/content_mapblock.cpp
src/nodedef.cpp
src/nodedef.h
src/script/common/c_content.cpp