Add a very brief description at the head of every file

This commit is contained in:
Gael-de-Sailly 2022-01-26 11:25:17 +01:00
parent 0983c27cca
commit d00295600d
9 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -1,3 +1,5 @@
-- Input and output functions for grid maps
local worldpath = mapgen_rivers.world_data_path
local floor = math.floor

View File

@ -1,3 +1,5 @@
-- Manages grid loading, writing and generation
local world_data = mapgen_rivers.world_data_path
local registered_on_grid_loaded = {}

View File

@ -1,3 +1,5 @@
-- Transform polygon data into a heightmap
local modpath = mapgen_rivers.modpath
local sea_level = mapgen_rivers.settings.sea_level

View File

@ -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()) .. '/'

View File

@ -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")

View File

@ -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)

View File

@ -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')

View File

@ -1,3 +1,5 @@
-- Read global and per-world settings
local mtsettings = minetest.settings
local mgrsettings = Settings(minetest.get_worldpath() .. '/mapgen_rivers.conf')