MapGen: rename some fields
This commit is contained in:
@@ -38,8 +38,8 @@ local ff2luat = require('MapGen.ff2luat')
|
|||||||
---@field layersList MapGen.Layer[]
|
---@field layersList MapGen.Layer[]
|
||||||
---@field staticsByName table<string, MapGen.StaticLayer>
|
---@field staticsByName table<string, MapGen.StaticLayer>
|
||||||
---@field staticsList MapGen.StaticLayer[]
|
---@field staticsList MapGen.StaticLayer[]
|
||||||
---@field layersNoisesInitialized boolean Is the fractal noise of the layer initialized? This is necessary for a one-time noise initialization.
|
---@field isLayersNoisesInitialized boolean Is the fractal noise of the layer initialized? This is necessary for a one-time noise initialization.
|
||||||
---@field cavernsNoiseInitialized boolean Is the fractal noise of the caverns initialized? This is necessary for a one-time noise initialization.
|
---@field isCavernsNoiseInitialized boolean Is the fractal noise of the caverns initialized? This is necessary for a one-time noise initialization.
|
||||||
---@field isRunning boolean A static field that guarantees that only one instance of the `MapGen` class will work.
|
---@field isRunning boolean A static field that guarantees that only one instance of the `MapGen` class will work.
|
||||||
---@field nodeIDs table<string, number>
|
---@field nodeIDs table<string, number>
|
||||||
local MapGen = {
|
local MapGen = {
|
||||||
@@ -47,9 +47,9 @@ local MapGen = {
|
|||||||
layersList = {},
|
layersList = {},
|
||||||
staticsByName = {},
|
staticsByName = {},
|
||||||
staticsList = {},
|
staticsList = {},
|
||||||
layersNoisesInitialized = false,
|
isLayersNoisesInitialized = false,
|
||||||
cavernsNoiseInitialized = false,
|
isCavernsNoiseInitialized = false,
|
||||||
isRunning = false,
|
isRunning = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
---Definition table for the `MapGen`.
|
---Definition table for the `MapGen`.
|
||||||
@@ -334,7 +334,7 @@ function MapGen:initCavernsNoise()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
self.cavernsNoiseInitialized = true
|
self.isCavernsNoiseInitialized = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -754,11 +754,11 @@ function MapGen:onMapGenerated(voxelManip, minPos, maxPos, blockseed)
|
|||||||
|
|
||||||
local eMin, eMax = voxelManip:get_emerged_area()
|
local eMin, eMax = voxelManip:get_emerged_area()
|
||||||
|
|
||||||
if not self.layersNoisesInitialized then
|
if not self.isLayersNoisesInitialized then
|
||||||
self:initLayersNoises()
|
self:initLayersNoises()
|
||||||
end
|
end
|
||||||
|
|
||||||
if not self.cavernsNoiseInitialized then
|
if not self.isCavernsNoiseInitialized then
|
||||||
self:initCavernsNoise()
|
self:initCavernsNoise()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user