mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2025-06-28 06:30:35 +02:00
Various bugfixes and workarounds
Now working in pure Lua! Some parts of the code are very hacky (e.g. noise) and the way new and old codes have been glued together is sometimes to be rewritten. But at least it works.
This commit is contained in:
@ -110,7 +110,7 @@ end
|
||||
|
||||
local modpath = ""
|
||||
if minetest then
|
||||
if minetest.global_exists(mapgen_rivers) then
|
||||
if minetest.global_exists('mapgen_rivers') then
|
||||
modpath = mapgen_rivers.modpath .. "terrainlib_lua/"
|
||||
else
|
||||
modpath = minetest.get_modpath(minetest.get_current_modname()) .. "terrainlib_lua/"
|
||||
|
@ -29,7 +29,7 @@ local flow_methods = {
|
||||
|
||||
local function flow_routing(dem, dirs, lakes, method)
|
||||
method = method or 'semirandom'
|
||||
flow_local = flow_methods[method] or flow_local_semirandom
|
||||
local flow_local = flow_methods[method] or flow_local_semirandom
|
||||
|
||||
dirs = dirs or {}
|
||||
lakes = lakes or {}
|
||||
@ -194,7 +194,7 @@ local function flow_routing(dem, dirs, lakes, method)
|
||||
end
|
||||
end
|
||||
|
||||
basin_graph = {}
|
||||
local basin_graph = {}
|
||||
for n=1, nbasins do
|
||||
--print(n, nbasins)
|
||||
local b1, lnk1 = next(lowlevel)
|
||||
|
Reference in New Issue
Block a user