mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2024-12-28 03:40:39 +01:00
Add a very brief description at the head of every file
This commit is contained in:
parent
0983c27cca
commit
d00295600d
@ -1,3 +1,6 @@
|
||||
-- Fix compatibility for settings-related changes
|
||||
-- Only loaded if the versions of the mod and the world mismatch
|
||||
|
||||
local function version_is_lower(v1, v2)
|
||||
local d1, c1, d2, c2
|
||||
while #v1 > 0 and #v2 > 0 do
|
||||
|
@ -1,3 +1,5 @@
|
||||
-- Input and output functions for grid maps
|
||||
|
||||
local worldpath = mapgen_rivers.world_data_path
|
||||
|
||||
local floor = math.floor
|
||||
|
@ -1,3 +1,5 @@
|
||||
-- Manages grid loading, writing and generation
|
||||
|
||||
local world_data = mapgen_rivers.world_data_path
|
||||
|
||||
local registered_on_grid_loaded = {}
|
||||
|
@ -1,3 +1,5 @@
|
||||
-- Transform polygon data into a heightmap
|
||||
|
||||
local modpath = mapgen_rivers.modpath
|
||||
|
||||
local sea_level = mapgen_rivers.settings.sea_level
|
||||
|
2
init.lua
2
init.lua
@ -1,3 +1,5 @@
|
||||
-- Main file, calls the other files and triggers main functions
|
||||
|
||||
mapgen_rivers = {}
|
||||
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname()) .. '/'
|
||||
|
@ -1,3 +1,5 @@
|
||||
-- Mapgen loop and mapgen-related things
|
||||
|
||||
if minetest.get_mapgen_setting("mg_name") ~= "singlenode" then
|
||||
minetest.set_mapgen_setting("mg_name", "singlenode", true)
|
||||
minetest.log("warning", "[mapgen_rivers] Mapgen set to singlenode")
|
||||
|
@ -1,3 +1,6 @@
|
||||
-- Fetch polygons from a given areas, and compute their properties
|
||||
-- and find to which polygon every point belongs
|
||||
|
||||
local blocksize = mapgen_rivers.settings.blocksize
|
||||
local X = math.floor(mapgen_rivers.settings.map_x_size / blocksize)
|
||||
local Z = math.floor(mapgen_rivers.settings.map_z_size / blocksize)
|
||||
|
@ -1,3 +1,6 @@
|
||||
-- Generate the grid using terrainlib_lua
|
||||
-- Only called on first mapgen, if there is no grid yet
|
||||
|
||||
local EvolutionModel = dofile(mapgen_rivers.modpath .. '/terrainlib_lua/erosion.lua')
|
||||
local twist = dofile(mapgen_rivers.modpath .. '/terrainlib_lua/twist.lua')
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
-- Read global and per-world settings
|
||||
|
||||
local mtsettings = minetest.settings
|
||||
local mgrsettings = Settings(minetest.get_worldpath() .. '/mapgen_rivers.conf')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user