From 88ad79163dab74d247d6e70aba5ec7b1f7d4a3b8 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 17 Mar 2017 09:02:34 -0400 Subject: add screwdriver rotation handling on most pipes-related nodes caveats: in order to cleanly handle the entry panel, valve, and sensor I had to rotate the valve and sensor models 90 degrees so that their in-/outlet pipes point the same direction as the entry panel. This also enables proper handling of a valve or sensor turned vertically. Some objects have rotation disabled entirely (as flipping them over/around makes no sense) When a valve is rotated, it is turned off automatically, to work around a glitch in the rotation code. --- pipes.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pipes.lua') diff --git a/pipes.lua b/pipes.lua index 2056fdf..4271721 100644 --- a/pipes.lua +++ b/pipes.lua @@ -80,7 +80,8 @@ for index, connects in ipairs(cconnects) do end, after_dig_node = function(pos) pipeworks.scan_for_pipe_objects(pos) - end + end, + on_rotate = false }) local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1} @@ -110,7 +111,8 @@ for index, connects in ipairs(cconnects) do end, after_dig_node = function(pos) pipeworks.scan_for_pipe_objects(pos) - end + end, + on_rotate = false }) table.insert(pipes_empty_nodenames, "pipeworks:pipe_"..index.."_empty") @@ -134,6 +136,8 @@ if REGISTER_COMPATIBILITY then after_place_node = function(pos) pipeworks.scan_for_pipe_objects(pos) end, + on_rotate = false + }) minetest.register_node(cloaded, { drawtype = "airlike", @@ -145,6 +149,8 @@ if REGISTER_COMPATIBILITY then after_place_node = function(pos) pipeworks.scan_for_pipe_objects(pos) end, + on_rotate = false + }) for xm = 0, 1 do for xp = 0, 1 do -- cgit v1.2.3