1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-30 23:30:35 +02:00

Make the tube_connects={} method work properly for technic devices.

Also phase out "old new" API, leaving only the "tube_connects={}" method,
as nothing in technic or pipeworks uses it.

Fix a few more places where minetest.facedir_to_dir() was duplicated, since
that code is part of Minetest 0.4.8.
This commit is contained in:
Vanessa Ezekowitz
2013-11-26 00:23:14 -05:00
parent bf7993b802
commit bd1d8bbd86
5 changed files with 22 additions and 262 deletions

View File

@ -577,31 +577,10 @@ if enable_mese_sand_tube then
})
end
local function facedir_to_dir(facedir)
--a table of possible dirs
return ({{x=0, y=0, z=1},
{x=1, y=0, z=0},
{x=0, y=0, z=-1},
{x=-1, y=0, z=0},
{x=0, y=-1, z=0},
{x=0, y=1, z=0}})
--indexed into by a table of correlating facedirs
[({[0]=1, 2, 3, 4,
5, 2, 6, 4,
6, 2, 5, 4,
1, 5, 3, 6,
1, 6, 3, 5,
1, 4, 3, 2})
--indexed into by the facedir in question
[facedir]]
end
local function facedir_to_right_dir(facedir)
--find the other directions
local backdir = facedir_to_dir(facedir)
local backdir = minetest.facedir_to_dir(facedir)
local topdir = ({[0]={x=0, y=1, z=0},
{x=0, y=0, z=1},
{x=0, y=0, z=-1},