Skip to content

Commit

Permalink
fixed directions for supporting connections
Browse files Browse the repository at this point in the history
  • Loading branch information
master-spike committed Sep 25, 2023
1 parent 2f4a6e5 commit 01481c6
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions suspendmanager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -346,20 +346,20 @@ end
---@return table<number, coord>
local function neighboursWallSupportsWall(pos)
return {
{x=pos.x-1, y=pos.y, z=pos.z},
{x=pos.x-1, y=pos.y, z=pos.z}, -- orthogonal same level
{x=pos.x+1, y=pos.y, z=pos.z},
{x=pos.x, y=pos.y-1, z=pos.z},
{x=pos.x, y=pos.y+1, z=pos.z},
{x=pos.x-1, y=pos.y, z=pos.z-1},
{x=pos.x-1, y=pos.y, z=pos.z-1}, -- orthogonal level below
{x=pos.x+1, y=pos.y, z=pos.z-1},
{x=pos.x, y=pos.y-1, z=pos.z-1},
{x=pos.x, y=pos.y+1, z=pos.z-1},
{x=pos.x-1, y=pos.y, z=pos.z+1},
{x=pos.x-1, y=pos.y, z=pos.z+1}, -- orthogonal level above
{x=pos.x+1, y=pos.y, z=pos.z+1},
{x=pos.x, y=pos.y-1, z=pos.z+1},
{x=pos.x, y=pos.y+1, z=pos.z+1},
{x=pos.x, y=pos.y, z=pos.z-1},
{x=pos.x, y=pos.y, z=pos.z+1},
{x=pos.x, y=pos.y, z=pos.z-1}, -- directly below
{x=pos.x, y=pos.y, z=pos.z+1}, -- directly above
}
end

Expand All @@ -368,12 +368,12 @@ end
---@return table<number, coord>
local function neighboursFloorSupportsWall(pos)
return {
{x=pos.x-1, y=pos.y, z=pos.z},
{x=pos.x-1, y=pos.y, z=pos.z}, -- orthogonal same level
{x=pos.x+1, y=pos.y, z=pos.z},
{x=pos.x, y=pos.y-1, z=pos.z},
{x=pos.x, y=pos.y+1, z=pos.z},
{x=pos.x, y=pos.y, z=pos.z+1},
{x=pos.x-1, y=pos.y, z=pos.z+1},
{x=pos.x, y=pos.y, z=pos.z+1}, -- directly above
{x=pos.x-1, y=pos.y, z=pos.z+1}, --orthogonal level above
{x=pos.x+1, y=pos.y, z=pos.z+1},
{x=pos.x, y=pos.y-1, z=pos.z+1},
{x=pos.x, y=pos.y+1, z=pos.z+1},
Expand All @@ -385,10 +385,15 @@ end
---@return table<number, coord>
local function neighboursWallSupportsFloor(pos)
return {
{x=pos.x-1, y=pos.y, z=pos.z},
{x=pos.x-1, y=pos.y, z=pos.z}, -- orthogonal same level
{x=pos.x+1, y=pos.y, z=pos.z},
{x=pos.x, y=pos.y-1, z=pos.z},
{x=pos.x, y=pos.y+1, z=pos.z},
{x=pos.x-1, y=pos.y, z=pos.z-1}, -- orthogonal level below
{x=pos.x+1, y=pos.y, z=pos.z-1},
{x=pos.x, y=pos.y-1, z=pos.z-1},
{x=pos.x, y=pos.y+1, z=pos.z-1},
{x=pos.x, y=pos.y, z=pos.z-1}, -- directly below
}
end

Expand All @@ -397,15 +402,10 @@ end
---@return table<number, coord>
local function neighboursFloorSupportsFloor(pos)
return {
{x=pos.x-1, y=pos.y, z=pos.z},
{x=pos.x-1, y=pos.y, z=pos.z}, -- orthogonal same level
{x=pos.x+1, y=pos.y, z=pos.z},
{x=pos.x, y=pos.y-1, z=pos.z},
{x=pos.x, y=pos.y+1, z=pos.z},
{x=pos.x, y=pos.y, z=pos.z+1},
{x=pos.x-1, y=pos.y, z=pos.z+1},
{x=pos.x+1, y=pos.y, z=pos.z+1},
{x=pos.x, y=pos.y-1, z=pos.z+1},
{x=pos.x, y=pos.y+1, z=pos.z+1},
}
end

Expand Down

0 comments on commit 01481c6

Please sign in to comment.