From 4c3fcdce3e982357f74c0385cee82196195ca7e5 Mon Sep 17 00:00:00 2001 From: Vanic Date: Wed, 26 Nov 2025 19:41:29 +0300 Subject: [PATCH] Mapgen: write SuperUltraSigmaMapgen part 8.2 --- mods/CORE/MapGen/src/MapGen/Layer.lua | 2 +- mods/CORE/MapGen/src/MapGen/Peak.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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