diff --git a/mods/CORE/MapGen/src/MapGen/Peak.lua b/mods/CORE/MapGen/src/MapGen/Peak.lua index af9dc8d..6b95a9a 100644 --- a/mods/CORE/MapGen/src/MapGen/Peak.lua +++ b/mods/CORE/MapGen/src/MapGen/Peak.lua @@ -1,8 +1,8 @@ ---@class MapGen.Peak ---@field id number ----@field getPeakPos fun():vector ----@field getColor fun():ColorString ----@field getGroups fun():table +---@field getPeakPos fun(self):vector +---@field getColor fun(self):ColorString +---@field getGroups fun(self):table local Peak = { id = 0, } diff --git a/mods/CORE/MapGen/src/MapGen/Triangulation.lua b/mods/CORE/MapGen/src/MapGen/Triangulation.lua index d6321aa..2c2cefc 100644 --- a/mods/CORE/MapGen/src/MapGen/Triangulation.lua +++ b/mods/CORE/MapGen/src/MapGen/Triangulation.lua @@ -64,8 +64,8 @@ end ---@param vertices table local function sortVerticesDeterministically(vertices) tableSort(vertices, function(a, b) - local posA = a.getPeakPos() - local posB = b.getPeakPos() + local posA = a:getPeakPos() + local posB = b:getPeakPos() -- Sort by X first if posA.x ~= posB.x then @@ -112,13 +112,13 @@ function Triangulation.triangulate(vertices) return {Triangle:new(vertices[1], vertices[2], vertices[3])} end - local minPos = vertices[1].getPeakPos() + local minPos = vertices[1]:getPeakPos() local minX, minY = minPos.x, minPos.z local maxX, maxY = minX, minY for i = 1, nvertices do local vertex = vertices[i] - local vertexPos = vertex.getPeakPos() + local vertexPos = vertex:getPeakPos() vertex.id = i if vertexPos.x < minX then @@ -223,13 +223,13 @@ function Triangulation.tetrahedralize(vertices) return {Tetrahedron:new(vertices[1], vertices[2], vertices[3], vertices[4])} end - local minPos = vertices[1].getPeakPos() + local minPos = vertices[1]:getPeakPos() local minX, minY, minZ = minPos.x, minPos.y, minPos.z local maxX, maxY, maxZ = minX, minY, minZ for i = 1, nvertices do local vertex = vertices[i] - local vertexPos = vertex.getPeakPos() + local vertexPos = vertex:getPeakPos() vertex.id = i if vertexPos.x < minX then