This commit is contained in:
Andrew Miner
2026-10-26 11:07:59 -06:00
parent bfd7f78a69
commit a822ebbdfd
25 changed files with 178 additions and 181 deletions
-14
View File
@@ -1,14 +0,0 @@
-- Imports -----------------------------------------------------------------------------------------
local api = _G["jvmi_biomes"]
-- Functions ---------------------------------------------------------------------------------------
--[[
Apply biomes to the base terrain provided.
Args:
region:jvmi_mapgen:Region - the region currently being generated
]]--
function api.apply_biomes(region) end
+1 -1
View File
@@ -1,6 +1,6 @@
-- Imports -----------------------------------------------------------------------------------------
local core = _G["core"]
local core = _G.core
-- Registrations -----------------------------------------------------------------------------------
+2 -11
View File
@@ -1,21 +1,12 @@
-- Imports -----------------------------------------------------------------------------------------
local core = _G["core"]
-- Public ------------------------------------------------------------------------------------------
jvmi_biomes = {} -- luacheck: globals jvmi_biomes
local path = core.get_modpath("jvmi_biomes")
dofile(path.."/api.lua")
dofile(path.."/apply.lua")
local core = _G.core
-- Registrations -----------------------------------------------------------------------------------
core.clear_registered_biomes()
dofile(path.."/definitions.lua")
dofile(core.get_modpath("jvmi_biomes").."/definitions.lua")
-- Script ------------------------------------------------------------------------------------------
@@ -1,25 +1,31 @@
-- Imports -----------------------------------------------------------------------------------------
-- Since we're in the mapgen environment, we can't count on the mod loading process. Instead, we
-- have to load everything we need from other mods manually.
local core = _G.core
local core = _G["core"]
local api = _G["jvmi_biomes"]
local path = core.get_modpath("jvmi_constants")
dofile(path.."/constants.lua")
local C = _G["jvmi_constants"]
path = core.get_modpath("jvmi_mapgen")
dofile(path.."/init.lua")
local mapgen = _G["jvmi_mapgen"]
local Region = mapgen.Region
local path = core.get_game_info().path
local C = dofile(path.."/common/constants.lua")
local Region = dofile(path.."/common/region.lua")
-- Private -----------------------------------------------------------------------------------------
local private = {}
--[[
Apply biomes to the given region.
This function will both update the `Region.META..BIOME` table so that each x,z column has an
assigned biome, but it will also update the data within the region to have that biome fully
applied from decorations to fill material.
Args:
region:Region - the region currently being generated
]]--
function private.apply(region)
private.assign_biomes(region)
private.fill_surface(region)
end
--[[
Assigns a specific biome to each position in the region.
@@ -73,10 +79,8 @@ function private.fill_surface(region)
end
-- API Implementations -----------------------------------------------------------------------------
-- Export ------------------------------------------------------------------------------------------
function api.apply_biomes(region)
private.assign_biomes(region)
private.fill_surface(region)
end
return {
apply_to = private.apply
}
+1
View File
@@ -2,3 +2,4 @@ name = jvmi_biomes
title = Jules Verne's Mysterious Island / Biomes
description = define biomes and decoration/generation functions for them
author = tungstonminer
depends = jvmi_nodes