mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-10 01:33:52 +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. |
||
---|---|---|
.. | ||
beds | ||
boats | ||
bones | ||
bucket | ||
creative | ||
default | ||
doors | ||
dye | ||
farming | ||
fire | ||
flowers | ||
give_initial_stuff | ||
nyancat | ||
screwdriver | ||
sethome | ||
stairs | ||
tnt | ||
vessels | ||
walls | ||
wool | ||
xpanes |