diff --git a/mods/CORE/MapGen/src/MapGen/Layer.lua b/mods/CORE/MapGen/src/MapGen/Layer.lua index 68031cf..625680e 100644 --- a/mods/CORE/MapGen/src/MapGen/Layer.lua +++ b/mods/CORE/MapGen/src/MapGen/Layer.lua @@ -47,7 +47,7 @@ end ---@param biome MapGen.Biome function Layer:addBiome(biomeName, biome) self.biomesByName[biomeName] = biome - table.insert(self.biomesList, self) + table.insert(self.biomesList, biome) end ---Adds a cavern to the `Layer.cavernsByName` & `Layer.cavernsList` diff --git a/mods/CORE/MapGen/src/MapGen/Peak.lua b/mods/CORE/MapGen/src/MapGen/Peak.lua index 3020fb2..3d1dc68 100644 --- a/mods/CORE/MapGen/src/MapGen/Peak.lua +++ b/mods/CORE/MapGen/src/MapGen/Peak.lua @@ -68,7 +68,7 @@ function Peak:new(peakPos, multinoiseParams, groups) end function instance:getMultinoise() - if not table.is_empty(_multinoise) then + if table.is_empty(_multinoise) then error('Attempt to get `MapGen.Triangulation.FakePeak` noise (empty noise).') end @@ -80,7 +80,7 @@ function Peak:new(peakPos, multinoiseParams, groups) Logger.warningLog('Multinoise has already been initialized. Re-initialization is not recommended.') end - if not table.is_empty(_multinoiseParams) then + if table.is_empty(_multinoiseParams) then error('Attempt to initialize `MapGen.Triangulation.FakePeak` noise (noise parameter empty).') end