1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073)

This commit is contained in:
Wuzzy 2024-01-17 17:47:06 +01:00 committed by GitHub
parent e7dd9737bd
commit 08ee6d8d4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 375 additions and 33 deletions

View file

@ -1270,11 +1270,15 @@ The function of `param2` is determined by `paramtype2` in node definition.
* The rotation of the node is stored in `param2`
* Node is 'mounted'/facing towards one of 6 directions
* You can make this value by using `minetest.dir_to_wallmounted()`
* Values range 0 - 5
* Values range 0 - 7
* The value denotes at which direction the node is "mounted":
0 = y+, 1 = y-, 2 = x+, 3 = x-, 4 = z+, 5 = z-
6 = y+, but rotated by 90°
7 = y-, but rotated by -90°
* By default, on placement the param2 is automatically set to the
appropriate rotation, depending on which side was pointed at
appropriate rotation (0 to 5), depending on which side was
pointed at. With the node field `wallmounted_rotate_vertical = true`,
the param2 values 6 and 7 might additionally be set
* `paramtype2 = "facedir"`
* Supported drawtypes: "normal", "nodebox", "mesh"
* The rotation of the node is stored in `param2`.
@ -5291,6 +5295,9 @@ Utilities
-- minetest.after guarantees that coexisting jobs are executed primarily
-- in order of expiry and secondarily in order of registration (5.9.0)
after_order_expiry_registration = true,
-- wallmounted nodes mounted at floor or ceiling may additionally
-- be rotated by 90° with special param2 values (5.9.0)
wallmounted_rotate = true,
}
```
@ -8926,6 +8933,13 @@ Used by `minetest.register_node`.
place_param2 = 0,
-- Value for param2 that is set when player places node
wallmounted_rotate_vertical = false,
-- If true, place_param2 is nil, and this is a wallmounted node,
-- this node might use the special 90° rotation when placed
-- on the floor or ceiling, depending on the direction.
-- See the explanation about wallmounted for details.
-- Otherwise, the rotation is always the same on vertical placement.
is_ground_content = true,
-- If false, the cave generator and dungeon generator will not carve
-- through this node.