MapGen: move ff2luat.lua Api->MapGen

This commit is contained in:
Van
2026-01-12 18:31:06 +03:00
parent 84295c56c4
commit 8640e55415
4 changed files with 6 additions and 9 deletions

View File

@@ -41,6 +41,8 @@ local Triangulation = require('MapGen.Triangulation')
---@type MapGen.Cavern
local Cavern = require('MapGen.Cavern')
local ff2luat = require('MapGen.ff2luat')
---@class MapGen
---@field layersByName table<string, MapGen.Layer>
---@field layersList MapGen.Layer[]
@@ -250,7 +252,7 @@ end
---@param groups? table<string, number>
function MapGen:register2DPeaksFromFile(layerName, map, scale,zeroPos, category, groups)
local modPath = core.get_modpath(core.get_current_modname())
local peaks = Api.ff2luat(modPath .. '/textures/maps/' .. map)
local peaks = ff2luat(modPath .. '/textures/maps/' .. map)
local mapSize = peaks.size
peaks.size = nil
@@ -901,10 +903,6 @@ function MapGen:run()
self:initLayersTriangultaion()
MapGen.isRunning = true
for _, peak in ipairs(self.layersList[1].peaksList["landscape"]) do
print(tostring(peak))
end
end
return MapGen