wip
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
local core = _G.core
|
||||
|
||||
|
||||
-- Registrations -----------------------------------------------------------------------------------
|
||||
-- Script ------------------------------------------------------------------------------------------
|
||||
|
||||
core.register_biome({
|
||||
name = "ocean_floor",
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
-- Imports -----------------------------------------------------------------------------------------
|
||||
|
||||
local jvmi = _G.jvmi
|
||||
local core = _G.core
|
||||
|
||||
local mod = jvmi.register_mod("jvmi_biomes")
|
||||
|
||||
-- Registrations -----------------------------------------------------------------------------------
|
||||
|
||||
core.clear_registered_biomes()
|
||||
dofile(core.get_modpath("jvmi_biomes").."/definitions.lua")
|
||||
-- Script ------------------------------------------------------------------------------------------
|
||||
|
||||
if jvmi.env == "main" then
|
||||
core.clear_registered_biomes()
|
||||
mod.domodfile("definitions.lua")
|
||||
elseif jvmi.env == "mapgen" then
|
||||
mod.domodfile("mapgen.lua")
|
||||
end
|
||||
|
||||
@@ -1,31 +1,35 @@
|
||||
-- Imports -----------------------------------------------------------------------------------------
|
||||
|
||||
local jvmi = _G.jvmi
|
||||
local core = _G.core
|
||||
|
||||
local path = core.get_game_info().path
|
||||
local C = dofile(path.."/common/constants.lua")
|
||||
local Region = dofile(path.."/common/region.lua")
|
||||
|
||||
|
||||
-- Private -----------------------------------------------------------------------------------------
|
||||
|
||||
local mod = jvmi.register_mod("jvmi_biomes")
|
||||
local private = {}
|
||||
|
||||
local C = jvmi.C
|
||||
local Region = jvmi.Region
|
||||
|
||||
|
||||
-- Public ------------------------------------------------------------------------------------------
|
||||
|
||||
--[[
|
||||
Apply biomes to the given region.
|
||||
|
||||
This function will both update the `Region.META..BIOME` table so that each x,z column has an
|
||||
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_to(region)
|
||||
function mod.apply_to(region)
|
||||
private.assign_biomes(region)
|
||||
private.fill_surface(region)
|
||||
end
|
||||
|
||||
|
||||
-- Private -----------------------------------------------------------------------------------------
|
||||
|
||||
--[[
|
||||
Assigns a specific biome to each position in the region.
|
||||
|
||||
@@ -77,10 +81,3 @@ function private.fill_surface(region)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
-- Export ------------------------------------------------------------------------------------------
|
||||
|
||||
return {
|
||||
apply_to = private.apply_to
|
||||
}
|
||||
Reference in New Issue
Block a user