mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-18 07:40:22 +01:00
b848e35ca5
Combine slabs if identical based on orientations using a simple lookup table if the nodes are identical. Otherwise relies on place_node() to place the node, which properly handles rotation compared to adjacent nodes already, and can orient based on look_dir as well. Initial slabs placed are oriented based on (1) the orientation of the pointed "face" (assumes nodes are cubic, of course), and uses the player look direction to orient the node n/e/w/s if the slab is horizontal or upside-down. If placed against a vertical face, the slab is placed against the face without rotation around the axis perpendicular to that vertical face. This allows upside down placement and vertical placement without screwdriver. If a slab is placed on top of an upside down slab, or below a normally placed slab, the rotation is inverted so that no "floating" slab is created. Largely based on kilbith's #807 PR. Slab combining and place_node() usage by sofar. Since this relies entirely on `on_place` mechanics, this fails to combine slabs into a plain node if the space *above* is occupied. This is unavoidable due to the fact that on_place() happens after the checks required to see if pointed_thing.above is empty or not. |
||
---|---|---|
.. | ||
models | ||
depends.txt | ||
init.lua | ||
license.txt | ||
README.txt |
Minetest Game mod: stairs ========================= See license.txt for license information. Authors of source code ---------------------- Originally by Kahrl <kahrl@gmx.net> (LGPL 2.1) and celeron55, Perttu Ahola <celeron55@gmail.com> (LGPL 2.1) Various Minetest developers and contributors (LGPL 2.1) Authors of media (models) ------------------------- Jean-Patrick G. (kilbith) <jeanpatrick.guerrero@gmail.com> (CC BY-SA 3.0): stairs_stair.obj