mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-06-29 23:00:49 +02:00
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.
This commit is contained in:
10
pipes.lua
10
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
|
||||
|
Reference in New Issue
Block a user