mirror of
https://github.com/pyrollo/display_modpack.git
synced 2025-02-22 12:30:21 +01:00
Fixed restricted on_rotate behavior
This commit is contained in:
parent
e8b62b234e
commit
3a59a06947
@ -281,8 +281,8 @@ end
|
|||||||
-- On_rotate (screwdriver) callback for display_api items. Prevents invalid
|
-- On_rotate (screwdriver) callback for display_api items. Prevents invalid
|
||||||
-- rotations and reorients entities.
|
-- rotations and reorients entities.
|
||||||
function display_api.on_rotate(pos, node, user, _, new_param2)
|
function display_api.on_rotate(pos, node, user, _, new_param2)
|
||||||
local ov = get_orientation_values(node)
|
|
||||||
node.param2 = new_param2
|
node.param2 = new_param2
|
||||||
|
local ov = get_orientation_values(node)
|
||||||
|
|
||||||
if ov.restricted or not display_api.is_rotation_restricted() then
|
if ov.restricted or not display_api.is_rotation_restricted() then
|
||||||
minetest.swap_node(pos, node)
|
minetest.swap_node(pos, node)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user