Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 48 additions & 15 deletions common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,40 @@ if core.get_modpath("unified_inventory") or not core.settings:get_bool("creative
pipeworks.expect_infinite_stacks = false
end

pipeworks.meseadjlist={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=0,y=1,z=0},{x=0,y=-1,z=0},{x=1,y=0,z=0},{x=-1,y=0,z=0}}

pipeworks.rules_all = {{x=0, y=0, z=1},{x=0, y=0, z=-1},{x=1, y=0, z=0},{x=-1, y=0, z=0},
{x=0, y=1, z=1},{x=0, y=1, z=-1},{x=1, y=1, z=0},{x=-1, y=1, z=0},
{x=0, y=-1, z=1},{x=0, y=-1, z=-1},{x=1, y=-1, z=0},{x=-1, y=-1, z=0},
{x=0, y=1, z=0}, {x=0, y=-1, z=0}}

pipeworks.mesecons_rules={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=1,y=0,z=0},{x=-1,y=0,z=0},{x=0,y=1,z=0},{x=0,y=-1,z=0}}
pipeworks.meseadjlist = {
vector.new( 0, 0, 1),
vector.new( 0, 0,-1),
vector.new( 0, 1, 0),
vector.new( 0,-1, 0),
vector.new( 1, 0, 0),
vector.new(-1, 0, 0),
}

pipeworks.rules_all = {
vector.new( 0, 0, 1),
vector.new( 0, 0,-1),
vector.new( 1, 0, 0),
vector.new(-1, 0, 0),
vector.new( 0, 1, 1),
vector.new( 0, 1,-1),
vector.new( 1, 1, 0),
vector.new(-1, 1, 0),
vector.new( 0,-1, 1),
vector.new( 0,-1,-1),
vector.new( 1,-1, 0),
vector.new(-1,-1, 0),
vector.new( 0, 1, 0),
vector.new( 0,-1, 0),
}

pipeworks.mesecons_rules = {
vector.new( 0, 0, 1),
vector.new( 0, 0,-1),
vector.new( 1, 0, 0),
vector.new(-1, 0, 0),
vector.new( 0, 1, 0),
vector.new( 0,-1, 0),
}

local digilines_enabled = core.get_modpath("digilines") ~= nil
if digilines_enabled and pipeworks.enable_vertical_digilines_connectivity then
Expand All @@ -24,7 +50,14 @@ else
-- via digiline conducting tubes. Changing them may break some builds on some servers, so the setting was added
-- for server admins to be able to revert to the old "broken" behavior as some builds may use it as a "feature".
-- See https://github.com/mt-mods/pipeworks/issues/64
pipeworks.digilines_rules={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=1,y=0,z=0},{x=-1,y=0,z=0},{x=0,y=1,z=0},{x=0,y=-1,z=0}}
pipeworks.digilines_rules = {
vector.new( 0, 0, 1),
vector.new( 0, 0,-1),
vector.new( 1, 0, 0),
vector.new(-1, 0, 0),
vector.new( 0, 1, 0),
vector.new( 0,-1, 0),
}
end

pipeworks.liquid_texture = core.registered_nodes[pipeworks.liquids.water.flowing].tiles[1]
Expand Down Expand Up @@ -106,12 +139,12 @@ end
-----------------------

function pipeworks.facedir_to_top_dir(facedir)
return ({[0] = {x = 0, y = 1, z = 0},
{x = 0, y = 0, z = 1},
{x = 0, y = 0, z = -1},
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
{x = 0, y = -1, z = 0}})
return ({[0] = vector.new( 0, 1, 0),
vector.new( 0, 0, 1),
vector.new( 0, 0,-1),
vector.new( 1, 0, 0),
vector.new(-1, 0, 0),
vector.new( 0,-1, 0)})
[math.floor(facedir / 4)]
end

Expand Down