mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-19 17:00:27 +02:00
cleaning up some stuff with luacheck.
This commit is contained in:
@ -67,12 +67,12 @@ bones_loot.register_loot({
|
||||
{name = "vessels:steel_bottle", chance = 0.4, count = {1,3}, types = {"underworld_warrior"}},
|
||||
{name = "vessels:glass_bottle", chance = 0.2, count = {1,2}, types = {"underworld_warrior"}},
|
||||
{name = "vessels:glass_fragments", chance = 0.1, count = {1,4}, types = {"underworld_warrior"}},
|
||||
|
||||
|
||||
{name = "default:book", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:paper", chance = 0.1, count = {1,6}, types = {"underworld_warrior"}},
|
||||
{name = "default:skeleton_key", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:torch", chance = 0.75, count = {1,10}, types = {"underworld_warrior"}},
|
||||
|
||||
|
||||
{name = "default:pick_bronze", chance = 0.15, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:pick_steel", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:pick_mese", chance = 0.05, count = {1,1}, types = {"underworld_warrior"}},
|
||||
@ -89,7 +89,7 @@ bones_loot.register_loot({
|
||||
{name = "default:sword_steel", chance = 0.75, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:sword_mese", chance = 0.35, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:sword_diamond", chance = 0.35, count = {1,1}, types = {"underworld_warrior"}},
|
||||
|
||||
|
||||
{name = "default:coal_lump", chance = 0.5, count = {1,5}, types = {"underworld_warrior"}},
|
||||
{name = "default:mese_crystal", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:diamond", chance = 0.1, count = {1,1}, types = {"underworld_warrior"}},
|
||||
@ -97,7 +97,7 @@ bones_loot.register_loot({
|
||||
{name = "default:copper_ingot", chance = 0.1, count = {1,2}, types = {"underworld_warrior"}},
|
||||
{name = "default:bronze_ingot", chance = 0.2, count = {1,5}, types = {"underworld_warrior"}},
|
||||
{name = "default:gold_ingot", chance = 0.3, count = {1,3}, types = {"underworld_warrior"}},
|
||||
{name = "default:mese_crystal_fragment", chance = 0.4, count = {1,5}, types = {"underworld_warrior"}},
|
||||
{name = "default:mese_crystal_fragment", chance = 0.4, count = {1,5}, types = {"underworld_warrior"}},
|
||||
{name = "default:obsidian_shard", chance = 0.4, count = {1,3}, types = {"underworld_warrior"}},
|
||||
{name = "default:flint", chance = 0.3, count = {1,1}, types = {"underworld_warrior"}},
|
||||
{name = "default:sign_wall_wood", chance = 0.1, count = {1,4}, types = {"underworld_warrior"}},
|
||||
@ -156,4 +156,4 @@ if df_caverns.config.enable_lava_sea then
|
||||
bones_loot.register_loot({name = "df_mapitems:mese_crystal", chance = 0.25, count = {1, 2}, types = {"underworld_warrior"}})
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -65,29 +65,29 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if minp.y > y_max or maxp.y < y_min then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local t_start = os.clock()
|
||||
|
||||
math.randomseed(minp.x + minp.y*2^8 + minp.z*2^16 + seed) -- make decorations consistent between runs
|
||||
|
||||
|
||||
local vm, data, data_param2, area = mapgen_helper.mapgen_vm_data_param2()
|
||||
|
||||
|
||||
local nvals_cave = mapgen_helper.perlin2d("df_caverns:lava_cave", minp, maxp, perlin_cave)
|
||||
local nvals_wave = mapgen_helper.perlin2d("df_caverns:lava_wave", minp, maxp, perlin_wave)
|
||||
local nvals_mese = mapgen_helper.perlin2d("df_caverns:lava_mese", minp, maxp, perlin_mese)
|
||||
local nvals_lavasurface = mapgen_helper.perlin2d("df_cavern:cracks", minp, maxp, df_caverns.np_cracks)
|
||||
|
||||
|
||||
for vi, x, y, z in area:iterp_yxz(minp, maxp) do
|
||||
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
|
||||
|
||||
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
local lava = nvals_lavasurface[index2d]
|
||||
|
||||
|
||||
local floor_height = math.floor(abs_cave * floor_mult + floor_displace + median + wave)
|
||||
local ceiling_height = math.floor(abs_cave * ceiling_mult + median + ceiling_displace + wave)
|
||||
local lava_height = math.floor(median + lava * 2)
|
||||
|
||||
|
||||
if y >= floor_height - 2 and y >= ceiling_height and y < ceiling_height + 2 and y <= lava_height + 2 and not mapgen_helper.buildable_to(data[vi]) then
|
||||
data[vi] = c_obsidian -- obsidian ceiling
|
||||
elseif y > floor_height and y < ceiling_height then
|
||||
@ -109,7 +109,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
for z = minp.z + 1, maxp.z -1 do
|
||||
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
|
||||
local mese_intensity = math.abs(nvals_mese[index2d])
|
||||
|
||||
|
||||
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
local floor_height = math.floor(abs_cave * floor_mult + floor_displace + median + wave)
|
||||
@ -117,7 +117,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
|
||||
local lava = nvals_lavasurface[index2d]
|
||||
local lava_height = math.floor(median + lava * 2)
|
||||
|
||||
|
||||
if mese_intensity > 0.65 and ceiling_height > lava_height + 1 and ceiling_height > floor_height + 1 and ceiling_height <= maxp.y and ceiling_height >= minp.y then
|
||||
local vi = area:index(x, ceiling_height, z)
|
||||
if not mapgen_helper.buildable_to(data[vi]) then
|
||||
@ -139,19 +139,19 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--send data back to voxelmanip
|
||||
vm:set_data(data)
|
||||
vm:set_param2_data(data_param2)
|
||||
--calc lighting
|
||||
vm:set_lighting({day = 0, night = 0})
|
||||
vm:calc_lighting()
|
||||
|
||||
|
||||
vm:update_liquids()
|
||||
--write it to world
|
||||
vm:write_to_map()
|
||||
|
||||
|
||||
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
|
||||
mapgen_helper.record_time("df_caverns lava sea", time_taken)
|
||||
end)
|
@ -50,7 +50,7 @@ df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y < df_caverns.config.level1_min or pos.y > df_caverns.config.ymax then
|
||||
return nil
|
||||
end
|
||||
return get_biome(heat, humidity)
|
||||
return get_biome(heat, humidity)
|
||||
end)
|
||||
|
||||
local tower_cap_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
@ -106,7 +106,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local nvals_cracks = mapgen_helper.perlin2d("df_cavern:cracks", minp, maxp, df_caverns.np_cracks)
|
||||
local nvals_cave = node_arrays.nvals_cave
|
||||
local cave_area = node_arrays.cave_area
|
||||
|
||||
|
||||
-- Partly fill flooded caverns and warrens
|
||||
if minp.y <= subsea_level then
|
||||
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
|
||||
@ -119,14 +119,14 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
|
||||
---------------------------------------------------------
|
||||
-- Cavern floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.cavern_floor_nodes) do
|
||||
local vert_rand = mapgen_helper.xz_consistent_randomi(area, vi)
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
local abs_cracks = math.abs(nvals_cracks[index2d])
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
|
||||
if minp.y < subsea_level and area:get_y(vi) < subsea_level and flooded_caverns then
|
||||
-- underwater floor
|
||||
df_caverns.flooded_cavern_floor(abs_cracks, vert_rand, vi, area, data)
|
||||
@ -145,12 +145,12 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
df_caverns.dry_cavern_floor(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
if log_location then log_location("level1_barren_dry", area:position(vi)) end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------
|
||||
-- Cavern ceilings
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.cavern_ceiling_nodes) do
|
||||
local vert_rand = mapgen_helper.xz_consistent_randomi(area, vi)
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
@ -176,7 +176,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
df_caverns.glow_worm_cavern_ceiling(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
-- Tunnel floors
|
||||
|
||||
@ -186,7 +186,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
-- we're in flooded areas or are not barren
|
||||
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
else
|
||||
@ -194,17 +194,17 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Tunnel ceiling
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
-- we're in flooded areas or are not barren
|
||||
df_caverns.tunnel_ceiling(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
else
|
||||
@ -219,13 +219,13 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if cracks > 0.7 and data[vi-ystride*2] == c_water then
|
||||
data[vi-ystride*2] = c_air
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
-- Warren floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
@ -239,13 +239,13 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
-- we're in flooded areas or are not barren
|
||||
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
else
|
||||
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
|
||||
end
|
||||
|
||||
|
||||
if biome_name ~= "barren" then
|
||||
local cracks = nvals_cracks[index2d]
|
||||
if cracks > 0.25 then
|
||||
@ -267,7 +267,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Warren ceiling
|
||||
|
||||
@ -277,7 +277,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
-- we're in flooded areas or are not barren
|
||||
df_caverns.tunnel_ceiling(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
else
|
||||
@ -289,7 +289,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
|
||||
----------------------------------------------
|
||||
-- Column material override for dry biome
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.column_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
@ -298,7 +298,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if dry and data[vi] == c_wet_flowstone then
|
||||
data[vi] = c_dry_flowstone
|
||||
end
|
||||
|
||||
|
||||
if chasms_path then
|
||||
local pos = area:position(vi)
|
||||
if chasms.is_in_chasm_without_taper(pos) then
|
||||
|
@ -51,7 +51,7 @@ df_caverns.register_biome_check(function(pos, heat, humidity)
|
||||
if pos.y < df_caverns.config.level2_min or pos.y >= df_caverns.config.level1_min then
|
||||
return nil
|
||||
end
|
||||
return get_biome(heat, humidity)
|
||||
return get_biome(heat, humidity)
|
||||
end)
|
||||
|
||||
local goblin_cap_shrublist
|
||||
@ -71,7 +71,7 @@ if minetest.get_modpath("df_farming") then
|
||||
df_farming.spawn_cave_wheat_vm,
|
||||
df_farming.spawn_dead_fungus_vm,
|
||||
df_farming.spawn_cavern_fungi_vm,
|
||||
}
|
||||
}
|
||||
spore_tree_shrublist = {
|
||||
df_farming.spawn_pig_tail_vm,
|
||||
df_farming.spawn_pig_tail_vm,
|
||||
@ -102,7 +102,7 @@ local goblin_cap_cavern_floor = function(abs_cracks, vert_rand, vi, area, data,
|
||||
|
||||
end
|
||||
|
||||
local spore_tree_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
local spore_tree_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
local ystride = area.ystride
|
||||
if abs_cracks < 0.1 then
|
||||
df_caverns.stalagmites(abs_cracks, vert_rand, vi, area, data, data_param2, true)
|
||||
@ -150,10 +150,10 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local nvals_cave = node_arrays.nvals_cave
|
||||
local cave_area = node_arrays.cave_area
|
||||
local cavern_def = node_arrays.cavern_def
|
||||
|
||||
|
||||
local vein_noise
|
||||
local vein_area
|
||||
|
||||
|
||||
-- Partly fill flooded caverns and warrens
|
||||
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
|
||||
local cave_val = nvals_cave[vi]
|
||||
@ -162,7 +162,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
local cave_threshold = cavern_def.cave_threshold
|
||||
|
||||
|
||||
--check if we're just inside the boundary of the (negazone) cavern threshold
|
||||
if biome_name == "barren" and cave_val < -cave_threshold and cave_val > -cave_threshold - 0.01 then
|
||||
-- add giant rooty structures to the flooded barren caverns
|
||||
@ -179,18 +179,18 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
data[vi] = c_water -- otherwise, fill air with water when below sea level
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
---------------------------------------------------------
|
||||
-- Cavern floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.cavern_floor_nodes) do
|
||||
local vert_rand = mapgen_helper.xz_consistent_randomi(area, vi)
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
local abs_cracks = math.abs(nvals_cracks[index2d])
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
|
||||
if minp.y < subsea_level and area:get_y(vi) < subsea_level and flooded_caverns then
|
||||
-- underwater floor
|
||||
df_caverns.flooded_cavern_floor(abs_cracks, vert_rand, vi, area, data)
|
||||
@ -207,7 +207,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
goblin_cap_cavern_floor(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
if log_location then log_location("level2_goblincap", area:position(vi)) end
|
||||
elseif biome_name == "sporetree" then
|
||||
spore_tree_cavern_floor(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
spore_tree_cavern_floor(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
if log_location then log_location("level2_sporetree", area:position(vi)) end
|
||||
elseif biome_name == "tunneltube" then
|
||||
tunnel_tube_cavern_floor(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
@ -217,7 +217,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
|
||||
--------------------------------------
|
||||
-- Cavern ceilings
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.cavern_ceiling_nodes) do
|
||||
local vert_rand = mapgen_helper.xz_consistent_randomi(area, vi)
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
@ -243,22 +243,22 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if abs_cracks * y_proportional > 0.3 and math.random() < 0.005 * y_proportional then
|
||||
df_mapitems.place_big_crystal_cluster(area, data, data_param2, vi, math.random(0,1), true)
|
||||
end
|
||||
end
|
||||
end
|
||||
else -- all the other biomes
|
||||
df_caverns.glow_worm_cavern_ceiling(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
-- Tunnel floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.tunnel_floor_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
-- we're in flooded areas or are not barren
|
||||
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
else
|
||||
@ -266,10 +266,10 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Tunnel ceiling
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
@ -295,20 +295,19 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
else
|
||||
-- air pockets
|
||||
local ystride = area.ystride
|
||||
local cracks = nvals_cracks[index2d]
|
||||
if cracks > 0.4 and data[vi-ystride] == c_water then
|
||||
data[vi-ystride] = c_air
|
||||
if cracks > 0.6 and data[vi-ystride*2] == c_water then
|
||||
data[vi-ystride*2] = c_air
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------
|
||||
-- Warren floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
@ -319,9 +318,9 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if flooded_caverns then flood_name = "_flooded" end
|
||||
log_location("level2_warren_"..biome_name..flood_name, area:position(vi))
|
||||
end
|
||||
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
-- we're in flooded areas or are not barren
|
||||
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
else
|
||||
@ -329,7 +328,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Warren ceiling
|
||||
|
||||
@ -340,7 +339,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local ystride = area.ystride
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
if flooded_caverns or biome_name ~= "barren" then
|
||||
-- we're in flooded areas or are not barren
|
||||
df_caverns.tunnel_ceiling(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
else
|
||||
@ -365,14 +364,14 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if cracks > 0.6 and data[vi-ystride*2] == c_water then
|
||||
data[vi-ystride*2] = c_air
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
----------------------------------------------
|
||||
-- Column material override for dry biome
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.column_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
@ -381,7 +380,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if dry and data[vi] == c_wet_flowstone then
|
||||
data[vi] = c_dry_flowstone
|
||||
end
|
||||
|
||||
|
||||
if chasms_path then
|
||||
local pos = area:position(vi)
|
||||
if chasms.is_in_chasm_without_taper(pos) then
|
||||
|
@ -98,7 +98,7 @@ local black_cap_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, d
|
||||
else
|
||||
data[vi] = c_cobble_fungus
|
||||
end
|
||||
|
||||
|
||||
if abs_cracks < 0.1 then
|
||||
df_caverns.stalagmites(abs_cracks, vert_rand, vi, area, data, data_param2, false)
|
||||
elseif abs_cracks < 0.15 and math.random() < 0.3 then
|
||||
@ -127,7 +127,7 @@ local nether_cap_cavern_floor = function(cracks, abs_cracks, vert_rand, vi, area
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if cracks < -0.3 then
|
||||
data[vi] = c_silver_sand
|
||||
if math.random() < 0.025 then
|
||||
@ -149,7 +149,7 @@ local nether_cap_cavern_floor = function(cracks, abs_cracks, vert_rand, vi, area
|
||||
data[vi + 2*ystride] = c_ice
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local nether_cap_cavern_ceiling = function(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
@ -166,7 +166,7 @@ local nether_cap_cavern_ceiling = function(abs_cracks, vert_rand, vi, area, data
|
||||
subterrane.stalactite(vi-ystride, area, data, data_param2, param2, math.floor(height*0.5), df_mapitems.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if c_sprite and abs_cracks < 0.5 and math.random() < 0.02 then
|
||||
local sprite_vi = vi-ystride*math.random(1,5)
|
||||
if data[sprite_vi] == c_air and area:containsi(sprite_vi) then
|
||||
@ -221,7 +221,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local nvals_cave = node_arrays.nvals_cave
|
||||
local cave_area = node_arrays.cave_area
|
||||
local cavern_def = node_arrays.cavern_def
|
||||
|
||||
|
||||
-- Partly fill flooded caverns and warrens
|
||||
if minp.y <= subsea_level then
|
||||
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
|
||||
@ -230,8 +230,8 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if data[vi] == c_air and y <= subsea_level then
|
||||
data[vi] = c_water
|
||||
end
|
||||
|
||||
if (mapgen_helper.is_pos_within_box({x=x, y=y, z=z}, minp, maxp)) then
|
||||
|
||||
if (mapgen_helper.is_pos_within_box({x=x, y=y, z=z}, minp, maxp)) then
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
if biome_name == "blackcap" then
|
||||
@ -249,10 +249,10 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------
|
||||
-- Cavern floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.cavern_floor_nodes) do
|
||||
local vert_rand = mapgen_helper.xz_consistent_randomi(area, vi)
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
@ -293,15 +293,15 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if log_location then log_location("level3_blackcap", area:position(vi)) end
|
||||
elseif biome_name == "bloodnether" then
|
||||
if flooded_caverns then
|
||||
nether_cap_cavern_floor(cracks, abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
nether_cap_cavern_floor(cracks, abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
if log_location then log_location("level3_nethercap", area:position(vi)) end
|
||||
else
|
||||
blood_thorn_cavern_floor(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
blood_thorn_cavern_floor(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
if log_location then log_location("level3_bloodthorn", area:position(vi)) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------
|
||||
-- Cavern ceilings
|
||||
|
||||
@ -318,7 +318,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
elseif biome_name == "blackcap" then
|
||||
if abs_cracks < 0.1 then
|
||||
df_caverns.stalactites(abs_cracks, vert_rand, vi, area, data, data_param2, false)
|
||||
end
|
||||
end
|
||||
if math.random() < 0.25 then
|
||||
data[vi] = c_stone_with_coal
|
||||
end
|
||||
@ -363,7 +363,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
-- Tunnel floors
|
||||
@ -374,7 +374,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name == "blackcap" then
|
||||
if flooded_caverns or biome_name == "blackcap" then
|
||||
-- we're in flooded areas or are not barren
|
||||
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
else
|
||||
@ -382,17 +382,17 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Tunnel ceiling
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local humidity = humiditymap[index2d]
|
||||
local biome_name = get_biome(heatmap[index2d], humidity)
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
local ystride = area.ystride
|
||||
|
||||
|
||||
if not (flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level) then
|
||||
if flooded_caverns or biome_name == "blackcap" then
|
||||
-- we're in flooded areas or are not barren
|
||||
@ -415,11 +415,11 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
if cracks > 0.7 and data[vi-ystride*2] == c_water then
|
||||
data[vi-ystride*2] = c_air
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Warren ceiling
|
||||
|
||||
@ -427,13 +427,13 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
|
||||
if log_location then
|
||||
local flood_name = ""
|
||||
if flooded_caverns then flood_name = "_flooded" end
|
||||
log_location("level3_warren_"..biome_name..flood_name, area:position(vi))
|
||||
end
|
||||
|
||||
|
||||
if flooded_caverns and minp.y < subsea_level and area:get_y(vi) < subsea_level then
|
||||
-- underwater ceiling, do nothing
|
||||
elseif biome_name == "bloodnether" and flooded_caverns then
|
||||
@ -466,12 +466,12 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
|
||||
----------------------------------------------
|
||||
-- Warren floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||
local flooded_caverns = nvals_cave[vi] < 0 -- this indicates if we're in the "flooded" set of caves or not.
|
||||
|
||||
|
||||
if minp.y < subsea_level and area:get_y(vi) < subsea_level and flooded_caverns then
|
||||
-- underwater floor, do nothing
|
||||
elseif biome_name == "bloodnether" and flooded_caverns then
|
||||
@ -506,7 +506,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
-- Column material override for dry and icy biomes
|
||||
for _, vi in ipairs(node_arrays.column_nodes) do
|
||||
@ -540,7 +540,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
elseif biome_name == "barren" and not flooded_caverns and data[vi] == c_wet_flowstone then
|
||||
data[vi] = c_dry_flowstone
|
||||
end
|
||||
|
||||
|
||||
if chasms_path then
|
||||
local pos = area:position(vi)
|
||||
if chasms.is_in_chasm_without_taper(pos) then
|
||||
@ -552,7 +552,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
vm:set_param2_data(data_param2)
|
||||
|
@ -6,15 +6,15 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
if maxp.y > 0 or maxp.y < df_caverns.config.primordial_min then return end
|
||||
|
||||
-- using after so that all other mapgen should be finished fiddling with stuff by the time this runs
|
||||
minetest.after(1, function(minp, maxp)
|
||||
local middle = vector.divide(vector.add(minp, maxp), 2)
|
||||
minetest.after(1, function(minp_after, maxp_after)
|
||||
local middle = vector.divide(vector.add(minp_after, maxp_after), 2)
|
||||
if collectible_lore.are_cairns_close_to_pos(middle) then return end -- quick and dirty check to discard mapblocks close to other cairns
|
||||
local possibles = minetest.find_nodes_in_area_under_air(minp, maxp, foundations)
|
||||
local possibles = minetest.find_nodes_in_area_under_air(minp_after, maxp_after, foundations)
|
||||
if next(possibles) then
|
||||
local target = possibles[math.random(#possibles)]
|
||||
target.y=target.y+1
|
||||
collectible_lore.place_cairn(target)
|
||||
end
|
||||
end
|
||||
end, minp, maxp)
|
||||
|
||||
end)
|
@ -62,10 +62,10 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local t_start = os.clock()
|
||||
|
||||
local vm, data, area = mapgen_helper.mapgen_vm_data()
|
||||
|
||||
|
||||
local nvals_cave = mapgen_helper.perlin2d("df_caverns:oil_cave", minp, maxp, perlin_cave)
|
||||
local nvals_wave = mapgen_helper.perlin2d("df_caverns:oil_wave", minp, maxp, perlin_wave)
|
||||
|
||||
|
||||
if c_lava_set == nil then
|
||||
c_lava_set = {}
|
||||
for name, def in pairs(minetest.registered_nodes) do
|
||||
@ -74,16 +74,16 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for vi, x, y, z in area:iterp_yxz(minp, maxp) do
|
||||
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
|
||||
|
||||
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
|
||||
|
||||
local floor_height = math.floor(abs_cave * floor_mult + floor_displace + median + wave)
|
||||
local ceiling_height = math.floor(abs_cave * ceiling_mult + median + ceiling_displace + wave)
|
||||
|
||||
|
||||
if y > floor_height - 5 and y < ceiling_height + 5 then
|
||||
if c_lava_set[data[vi]] then
|
||||
data[vi] = c_obsidian
|
||||
@ -101,20 +101,20 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if log_location then log_location("oil_sea", area:position(vi)) end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
--send data back to voxelmanip
|
||||
vm:set_data(data)
|
||||
--calc lighting
|
||||
vm:set_lighting({day = 0, night = 0})
|
||||
vm:calc_lighting()
|
||||
|
||||
|
||||
vm:update_liquids()
|
||||
--write it to world
|
||||
vm:write_to_map()
|
||||
|
||||
|
||||
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
|
||||
mapgen_helper.record_time("df_caverns oil sea", time_taken)
|
||||
end)
|
||||
|
@ -164,7 +164,7 @@ local c_fireflies = df_caverns.node_id.fireflies
|
||||
local jungle_cavern_floor = function(abs_cracks, humidity, vi, area, data, data_param2)
|
||||
local ystride = area.ystride
|
||||
local humidityfactor = humidity/100
|
||||
|
||||
|
||||
if log_location then
|
||||
local pos = area:position(vi)
|
||||
log_location("primordial_jungle", pos)
|
||||
@ -189,7 +189,7 @@ local jungle_cavern_floor = function(abs_cracks, humidity, vi, area, data, data_
|
||||
elseif rand < 0.3 then
|
||||
data[vi+ystride] = jungle_plants[math.random(1,#jungle_plants)]
|
||||
end
|
||||
|
||||
|
||||
if c_fireflies and math.random() < 0.01 then
|
||||
local firefly_vi = vi + ystride * math.random(1, 5)
|
||||
if data[firefly_vi] == c_air then
|
||||
@ -258,7 +258,7 @@ local jungle_warren_floor = function(abs_cracks, vi, area, data, data_param2)
|
||||
elseif abs_cracks < 1 then
|
||||
data[vi] = c_dirt
|
||||
end
|
||||
|
||||
|
||||
if c_fireflies and math.random() < 0.005 then
|
||||
local firefly_vi = vi + ystride * math.random(1, 5)
|
||||
if data[firefly_vi] == c_air then
|
||||
@ -277,20 +277,20 @@ local decorate_primordial = function(minp, maxp, seed, vm, node_arrays, area, da
|
||||
local nvals_cracks = mapgen_helper.perlin2d("df_cavern:cracks", minp, maxp, df_caverns.np_cracks)
|
||||
local cave_area = node_arrays.cave_area
|
||||
local nvals_cave = node_arrays.nvals_cave
|
||||
|
||||
|
||||
local humiditymap = minetest.get_mapgen_object("humiditymap")
|
||||
|
||||
|
||||
|
||||
---------------------------------------------------------
|
||||
-- Cavern floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.cavern_floor_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local cracks = nvals_cracks[index2d]
|
||||
local abs_cracks = math.abs(cracks)
|
||||
local humidity = humiditymap[index2d]
|
||||
local jungle = nvals_cave[vi] < 0
|
||||
|
||||
|
||||
if jungle then
|
||||
jungle_cavern_floor(abs_cracks, humidity, vi, area, data, data_param2)
|
||||
else
|
||||
@ -298,7 +298,7 @@ local decorate_primordial = function(minp, maxp, seed, vm, node_arrays, area, da
|
||||
if log_location then log_location("primordial_mushrooms", area:position(vi)) end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------
|
||||
-- Cavern ceilings
|
||||
|
||||
@ -314,19 +314,19 @@ local decorate_primordial = function(minp, maxp, seed, vm, node_arrays, area, da
|
||||
mushroom_cavern_ceiling(abs_cracks, humidity, vi, area, data, data_param2)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
-- Tunnel floors
|
||||
|
||||
|
||||
-- for _, vi in ipairs(node_arrays.tunnel_floor_nodes) do
|
||||
-- end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Tunnel ceiling
|
||||
|
||||
|
||||
-- for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
|
||||
-- end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Warren ceiling
|
||||
|
||||
@ -335,7 +335,7 @@ local decorate_primordial = function(minp, maxp, seed, vm, node_arrays, area, da
|
||||
local cracks = nvals_cracks[index2d]
|
||||
local abs_cracks = math.abs(cracks)
|
||||
local jungle = nvals_cave[vi] < 0
|
||||
|
||||
|
||||
if jungle then
|
||||
jungle_warren_ceiling(abs_cracks, vi, area, data, data_param2)
|
||||
else
|
||||
@ -346,13 +346,13 @@ local decorate_primordial = function(minp, maxp, seed, vm, node_arrays, area, da
|
||||
|
||||
----------------------------------------------
|
||||
-- Warren floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local cracks = nvals_cracks[index2d]
|
||||
local abs_cracks = math.abs(cracks)
|
||||
local jungle = nvals_cave[vi] < 0
|
||||
|
||||
|
||||
if jungle then
|
||||
jungle_warren_floor(abs_cracks, vi, area, data, data_param2)
|
||||
if log_location then log_location("primordial_jungle_warren", area:position(vi)) end
|
||||
@ -377,7 +377,7 @@ local decorate_primordial = function(minp, maxp, seed, vm, node_arrays, area, da
|
||||
if data[rand_vi] == c_air then
|
||||
data[rand_vi] = c_giant_mycelium
|
||||
minetest.get_node_timer(area:position(rand_vi)):start(math.random(1,giant_mycelium_timer_spread))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -44,6 +44,6 @@ return {
|
||||
n5, n5, n5,
|
||||
n5, n5, n5,
|
||||
n5, n11, n5,
|
||||
n5, n5, n5,
|
||||
n5, n5, n5,
|
||||
}
|
||||
}
|
||||
|
@ -25,91 +25,91 @@ return {
|
||||
size = {x = 15, y = 12, z = 8},
|
||||
center_pos = {x = 10, y = 6, z = 3},
|
||||
data = {
|
||||
n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1,
|
||||
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1,
|
||||
n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n3, n3, n3,
|
||||
n3, n3, n3, n3, n3, n1, n1, n1, n1, n1, n1, n1, n3, n4, n4, n4, n4,
|
||||
n4, n4, n3, n1, n1, n1, n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n4,
|
||||
n3, n1, n1, n1, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n1,
|
||||
n1, n1, n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n1, n1, n1,
|
||||
n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n1,
|
||||
n1, n1, n5, n6, n6, n6, n6, n6, n6, n7, n1, n1, n1, n1, n1, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n1, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
|
||||
n1, n1, n1, n1, n8, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1,
|
||||
n1, n1, n8, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1,
|
||||
n1, n3, n9, n9, n9, n9, n9, n9, n3, n1, n1, n1, n1, n1, n1, n1, n4,
|
||||
n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8,
|
||||
n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n10, n9, n9, n9, n9,
|
||||
n9, n9, n11, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1,
|
||||
n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1,
|
||||
n12, n12, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n1, n1, n1,
|
||||
n12, n3, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n8, n3,
|
||||
n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n3, n9, n9,
|
||||
n9, n9, n9, n9, n3, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8, n8, n8,
|
||||
n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8, n8, n8, n8, n8,
|
||||
n4, n1, n1, n1, n1, n1, n1, n1, n10, n9, n9, n9, n9, n9, n9, n11, n1,
|
||||
n13, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n13,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n13, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n13, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n13, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n13, n3, n3, n3, n3,
|
||||
n3, n3, n3, n3, n1, n1, n1, n1, n1, n1, n8, n8, n8, n8, n8, n8, n8,
|
||||
n8, n4, n1, n1, n1, n1, n1, n1, n8, n8, n8, n8, n8, n8, n8, n8, n4,
|
||||
n1, n1, n1, n1, n1, n1, n1, n3, n9, n9, n9, n9, n9, n9, n3, n1, n1,
|
||||
n1, n1, n1, n1, n1, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1,
|
||||
n1, n1, n1, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1,
|
||||
n1, n10, n9, n9, n9, n9, n9, n9, n11, n1, n13, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n13, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n13, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n1, n1, n1, n1, n13, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n1, n1, n1, n1, n13, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n1, n1, n1, n1, n13, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
|
||||
n1, n1, n1, n1, n8, n8, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1,
|
||||
n1, n1, n8, n8, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1,
|
||||
n1, n3, n9, n9, n9, n9, n9, n9, n3, n1, n1, n1, n1, n1, n1, n1, n4,
|
||||
n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8,
|
||||
n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n10, n9, n9, n9, n9,
|
||||
n9, n9, n11, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1,
|
||||
n12, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1,
|
||||
n12, n12, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n1, n1, n1,
|
||||
n12, n3, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n8, n3,
|
||||
n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n3, n9, n9,
|
||||
n9, n9, n9, n9, n3, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8, n8, n8,
|
||||
n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8, n8, n8, n8, n8,
|
||||
n4, n1, n1, n1, n1, n1, n1, n1, n10, n9, n9, n9, n9, n9, n9, n11, n1,
|
||||
n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
|
||||
n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1,
|
||||
n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n3, n3, n3, n3,
|
||||
n3, n3, n3, n3, n1, n1, n1, n1, n1, n1, n8, n4, n8, n8, n14, n11, n8,
|
||||
n8, n4, n1, n1, n1, n1, n1, n1, n8, n4, n8, n14, n11, n8, n8, n8, n4,
|
||||
n1, n1, n1, n1, n1, n1, n1, n3, n14, n11, n8, n8, n8, n9, n3, n1, n1,
|
||||
n1, n1, n1, n1, n1, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1,
|
||||
n1, n1, n1, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1,
|
||||
n1, n10, n9, n9, n9, n9, n9, n9, n11, n1, n1, n1, n1, n1, n1, n1, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1,
|
||||
n1, n1, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
|
||||
n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n1,
|
||||
n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n1, n1, n1,
|
||||
n3, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n1, n1, n1, n1, n3, n4,
|
||||
n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n1, n1, n1, n3, n4, n4, n4,
|
||||
n4, n4, n4, n3, n1, n1, n1, n1, n1, n1, n1, n15, n16, n16, n16, n16,
|
||||
n16, n16, n17,
|
||||
n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1,
|
||||
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1,
|
||||
n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n3, n3, n3,
|
||||
n3, n3, n3, n3, n3, n1, n1, n1, n1, n1, n1, n1, n3, n4, n4, n4, n4,
|
||||
n4, n4, n3, n1, n1, n1, n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n4,
|
||||
n3, n1, n1, n1, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n1,
|
||||
n1, n1, n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n1, n1, n1,
|
||||
n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n1,
|
||||
n1, n1, n5, n6, n6, n6, n6, n6, n6, n7, n1, n1, n1, n1, n1, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n1, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
|
||||
n1, n1, n1, n1, n8, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1,
|
||||
n1, n1, n8, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1,
|
||||
n1, n3, n9, n9, n9, n9, n9, n9, n3, n1, n1, n1, n1, n1, n1, n1, n4,
|
||||
n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8,
|
||||
n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n10, n9, n9, n9, n9,
|
||||
n9, n9, n11, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1,
|
||||
n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1,
|
||||
n12, n12, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n1, n1, n1,
|
||||
n12, n3, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n8, n3,
|
||||
n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n3, n9, n9,
|
||||
n9, n9, n9, n9, n3, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8, n8, n8,
|
||||
n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8, n8, n8, n8, n8,
|
||||
n4, n1, n1, n1, n1, n1, n1, n1, n10, n9, n9, n9, n9, n9, n9, n11, n1,
|
||||
n13, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n13,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n13, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n13, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n13, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n13, n3, n3, n3, n3,
|
||||
n3, n3, n3, n3, n1, n1, n1, n1, n1, n1, n8, n8, n8, n8, n8, n8, n8,
|
||||
n8, n4, n1, n1, n1, n1, n1, n1, n8, n8, n8, n8, n8, n8, n8, n8, n4,
|
||||
n1, n1, n1, n1, n1, n1, n1, n3, n9, n9, n9, n9, n9, n9, n3, n1, n1,
|
||||
n1, n1, n1, n1, n1, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1,
|
||||
n1, n1, n1, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1,
|
||||
n1, n10, n9, n9, n9, n9, n9, n9, n11, n1, n13, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n13, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n13, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n1, n1, n1, n1, n13, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n1, n1, n1, n1, n13, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n1, n1, n1, n1, n13, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1,
|
||||
n1, n1, n1, n1, n8, n8, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1,
|
||||
n1, n1, n8, n8, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1,
|
||||
n1, n3, n9, n9, n9, n9, n9, n9, n3, n1, n1, n1, n1, n1, n1, n1, n4,
|
||||
n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8,
|
||||
n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n10, n9, n9, n9, n9,
|
||||
n9, n9, n11, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n1, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1,
|
||||
n12, n12, n12, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1,
|
||||
n12, n12, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n1, n1, n1,
|
||||
n12, n3, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n8, n3,
|
||||
n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n3, n9, n9,
|
||||
n9, n9, n9, n9, n3, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8, n8, n8,
|
||||
n8, n8, n4, n1, n1, n1, n1, n1, n1, n1, n4, n8, n8, n8, n8, n8, n8,
|
||||
n4, n1, n1, n1, n1, n1, n1, n1, n10, n9, n9, n9, n9, n9, n9, n11, n1,
|
||||
n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
|
||||
n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1,
|
||||
n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n3, n3, n3, n3,
|
||||
n3, n3, n3, n3, n1, n1, n1, n1, n1, n1, n8, n4, n8, n8, n14, n11, n8,
|
||||
n8, n4, n1, n1, n1, n1, n1, n1, n8, n4, n8, n14, n11, n8, n8, n8, n4,
|
||||
n1, n1, n1, n1, n1, n1, n1, n3, n14, n11, n8, n8, n8, n9, n3, n1, n1,
|
||||
n1, n1, n1, n1, n1, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1,
|
||||
n1, n1, n1, n4, n8, n8, n8, n8, n8, n8, n4, n1, n1, n1, n1, n1, n1,
|
||||
n1, n10, n9, n9, n9, n9, n9, n9, n11, n1, n1, n1, n1, n1, n1, n1, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n1, n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1,
|
||||
n1, n1, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
|
||||
n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n1,
|
||||
n1, n1, n3, n4, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n1, n1, n1,
|
||||
n3, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n1, n1, n1, n1, n3, n4,
|
||||
n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n1, n1, n1, n3, n4, n4, n4,
|
||||
n4, n4, n4, n3, n1, n1, n1, n1, n1, n1, n1, n15, n16, n16, n16, n16,
|
||||
n16, n16, n17,
|
||||
}
|
||||
}
|
||||
|
@ -15,10 +15,10 @@ return {
|
||||
size = {x = 3, y = 9, z = 3},
|
||||
center_pos = {x = 1, y = 7, z = 1},
|
||||
data = {
|
||||
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
|
||||
n1, n1, n1, n1, n1, n1, n1, n2, n3, n4, n1, n1, n1, n1, n5, n1, n1,
|
||||
n5, n1, n1, n5, n1, n1, n5, n1, n1, n5, n1, n1, n5, n1, n1, n6, n1,
|
||||
n7, n5, n8, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
|
||||
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n9, n10, n11,
|
||||
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
|
||||
n1, n1, n1, n1, n1, n1, n1, n2, n3, n4, n1, n1, n1, n1, n5, n1, n1,
|
||||
n5, n1, n1, n5, n1, n1, n5, n1, n1, n5, n1, n1, n5, n1, n1, n6, n1,
|
||||
n7, n5, n8, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n1,
|
||||
n1, n1, n1, n1, n1, n1, n1, n1, n1, n1, n9, n10, n11,
|
||||
},
|
||||
}
|
||||
|
@ -27,48 +27,48 @@ return {
|
||||
size = {x = 11, y = 9, z = 7},
|
||||
center_pos = {x = 7, y = 5, z = 3},
|
||||
data = {
|
||||
n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1,
|
||||
n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n2, n2, n2,
|
||||
n2, n2, n2, n2, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1,
|
||||
n1, n1, n3, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n3, n4, n4, n4,
|
||||
n4, n4, n3, n1, n1, n1, n1, n5, n6, n6, n6, n6, n6, n7, n1, n1, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n8, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n9, n2, n2, n2, n2, n2, n2,
|
||||
n2, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n10, n4,
|
||||
n10, n10, n10, n10, n10, n4, n1, n1, n1, n10, n4, n10, n10, n10, n10,
|
||||
n10, n4, n1, n1, n1, n1, n11, n12, n12, n12, n12, n12, n13, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n1, n1, n8, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n1, n1, n9, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n10,
|
||||
n3, n10, n10, n10, n10, n10, n4, n1, n1, n1, n10, n3, n10, n10, n10,
|
||||
n10, n10, n4, n1, n1, n1, n1, n11, n12, n12, n12, n12, n12, n13, n14,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n14, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n1, n1, n1, n2, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
|
||||
n10, n10, n10, n10, n10, n10, n18, n4, n1, n1, n1, n10, n10, n10,
|
||||
n10, n10, n10, n10, n4, n1, n1, n1, n1, n11, n12, n12, n12, n12, n12,
|
||||
n13, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n9, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n1, n1, n1, n8, n3, n3, n3, n3, n3, n3, n3, n1,
|
||||
n1, n1, n10, n3, n10, n10, n10, n10, n10, n4, n1, n1, n1, n10, n3,
|
||||
n10, n10, n10, n10, n10, n4, n1, n1, n1, n1, n11, n12, n12, n12, n12,
|
||||
n12, n13, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n1, n1, n9, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n8, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3,
|
||||
n1, n1, n1, n10, n4, n10, n10, n10, n10, n10, n4, n1, n1, n1, n10,
|
||||
n4, n10, n10, n10, n10, n10, n4, n1, n1, n1, n1, n11, n12, n12, n12,
|
||||
n12, n12, n13, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
|
||||
n1, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n3, n3, n3, n3, n3,
|
||||
n3, n3, n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1,
|
||||
n3, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n15, n16, n16, n16, n16,
|
||||
n16, n17,
|
||||
n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1,
|
||||
n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n2, n2, n2,
|
||||
n2, n2, n2, n2, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1,
|
||||
n1, n1, n3, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n3, n4, n4, n4,
|
||||
n4, n4, n3, n1, n1, n1, n1, n5, n6, n6, n6, n6, n6, n7, n1, n1, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n8, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n9, n2, n2, n2, n2, n2, n2,
|
||||
n2, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n10, n4,
|
||||
n10, n10, n10, n10, n10, n4, n1, n1, n1, n10, n4, n10, n10, n10, n10,
|
||||
n10, n4, n1, n1, n1, n1, n11, n12, n12, n12, n12, n12, n13, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n1, n1, n8, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n1, n1, n1, n9, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1, n10,
|
||||
n3, n10, n10, n10, n10, n10, n4, n1, n1, n1, n10, n3, n10, n10, n10,
|
||||
n10, n10, n4, n1, n1, n1, n1, n11, n12, n12, n12, n12, n12, n13, n14,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n14, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n2, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n1, n1, n1, n2, n3, n3, n3, n3, n3, n3, n3, n1, n1, n1,
|
||||
n10, n10, n10, n10, n10, n10, n18, n4, n1, n1, n1, n10, n10, n10,
|
||||
n10, n10, n10, n10, n4, n1, n1, n1, n1, n11, n12, n12, n12, n12, n12,
|
||||
n13, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n9, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n2, n2, n2,
|
||||
n2, n2, n2, n2, n2, n1, n1, n1, n8, n3, n3, n3, n3, n3, n3, n3, n1,
|
||||
n1, n1, n10, n3, n10, n10, n10, n10, n10, n4, n1, n1, n1, n10, n3,
|
||||
n10, n10, n10, n10, n10, n4, n1, n1, n1, n1, n11, n12, n12, n12, n12,
|
||||
n12, n13, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2,
|
||||
n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2,
|
||||
n2, n1, n1, n9, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n8, n2,
|
||||
n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n3, n3, n3, n3, n3, n3, n3,
|
||||
n1, n1, n1, n10, n4, n10, n10, n10, n10, n10, n4, n1, n1, n1, n10,
|
||||
n4, n10, n10, n10, n10, n10, n4, n1, n1, n1, n1, n11, n12, n12, n12,
|
||||
n12, n12, n13, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1,
|
||||
n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2,
|
||||
n2, n2, n2, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1,
|
||||
n1, n2, n2, n2, n2, n2, n2, n2, n1, n1, n1, n1, n3, n3, n3, n3, n3,
|
||||
n3, n3, n1, n1, n1, n1, n3, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1,
|
||||
n3, n4, n4, n4, n4, n4, n3, n1, n1, n1, n1, n15, n16, n16, n16, n16,
|
||||
n16, n17,
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,6 @@ return {
|
||||
size = {y = 2, x = 2, z = 3},
|
||||
center_pos = {x = 1, y = 1, z = 1},
|
||||
data = {
|
||||
n1, n1, n2, n3, n1, n1, n4, n4, n1, n1, n5, n6,
|
||||
n1, n1, n2, n3, n1, n1, n4, n4, n1, n1, n5, n6,
|
||||
}
|
||||
}
|
@ -84,15 +84,15 @@ df_caverns.stalagmites = function(abs_cracks, vert_rand, vi, area, data, data_pa
|
||||
stalagmite_ids = df_mapitems.wet_stalagmite_ids
|
||||
else
|
||||
flowstone = c_dry_flowstone
|
||||
stalagmite_ids = df_mapitems.dry_stalagmite_ids
|
||||
stalagmite_ids = df_mapitems.dry_stalagmite_ids
|
||||
end
|
||||
|
||||
|
||||
local height_mult = 1
|
||||
local ystride = area.ystride
|
||||
if reverse_sign then
|
||||
ystride = - ystride
|
||||
height_mult = -1
|
||||
end
|
||||
end
|
||||
|
||||
if vert_rand < 0.004 then
|
||||
if reverse_sign then
|
||||
@ -132,14 +132,14 @@ df_caverns.flooded_cavern_floor = function(abs_cracks, vert_rand, vi, area, data
|
||||
data[vi] = c_sand_scum
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- put in only the large stalagmites that won't get in the way of the water
|
||||
if abs_cracks < 0.1 then
|
||||
if vert_rand < 0.004 then
|
||||
subterrane.big_stalagmite(vi+ystride, area, data, 6, 15, c_wet_flowstone, c_wet_flowstone, c_wet_flowstone)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
df_caverns.dry_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
@ -198,7 +198,7 @@ df_caverns.tunnel_floor = function(minp, maxp, area, vi, nvals_cracks, data, dat
|
||||
subterrane.stalagmite(vi+ystride, area, data, data_param2, param2, height, df_mapitems.wet_stalagmite_ids)
|
||||
data[vi] = c_wet_flowstone
|
||||
elseif dirt_node and abs_cracks > 0.5 and data[vi-ystride] ~= c_air then
|
||||
data[vi] = dirt_node
|
||||
data[vi] = dirt_node
|
||||
end
|
||||
else
|
||||
if abs_cracks < 0.025 and data[vi+ystride] == c_air and not dont_build_speleothems_on[data[vi]] then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
|
||||
@ -220,7 +220,7 @@ df_caverns.tunnel_ceiling = function(minp, maxp, area, vi, nvals_cracks, data, d
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local cracks = nvals_cracks[index2d]
|
||||
local abs_cracks = math.abs(cracks)
|
||||
|
||||
|
||||
if wet then
|
||||
if abs_cracks < 0.05 and data[vi-ystride] == c_air and not dont_build_speleothems_on[data[vi]] then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
|
||||
local param2 = abs_cracks*1000000 - math.floor(abs_cracks*1000000/4)*4
|
||||
@ -272,7 +272,7 @@ df_caverns.place_shrub = function(vi, area, data, param2_data, shrub_list)
|
||||
if shrub_list == nil then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local shrub = shrub_list[math.random(#shrub_list)]
|
||||
shrub(vi, area, data, param2_data)
|
||||
end
|
||||
|
@ -199,22 +199,22 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
|
||||
local minp_below = minp.y <= sea_level
|
||||
local maxp_above = maxp.y > sea_level
|
||||
|
||||
|
||||
local nvals_cave = mapgen_helper.perlin2d("df_caverns:sunless_sea", minp, maxp, perlin_cave_rivers) --cave noise for structure
|
||||
local nvals_wave = mapgen_helper.perlin2d("df_caverns:sunless_sea_wave", minp, maxp, perlin_wave_rivers) --cave noise for structure
|
||||
|
||||
|
||||
local skip_next = false -- mapgen is proceeding upward on the y axis,
|
||||
--if this is true it skips a step to allow for things to be placed above the floor
|
||||
|
||||
|
||||
-- creates "river" caverns
|
||||
for vi, x, y, z in area:iterp_yxz(minp, maxp) do
|
||||
if not skip_next then
|
||||
if not skip_next then
|
||||
if y < y_max_river and y > y_min_river then
|
||||
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
|
||||
local abs_cave = math.abs(nvals_cave[index2d])
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
local cracks = nvals_cracks[index2d]
|
||||
|
||||
|
||||
local ripple = cracks * ((y - y_min_river) / (y_max_river - y_min_river)) * ripple_mult
|
||||
|
||||
-- above floor and below ceiling
|
||||
@ -225,7 +225,7 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
if y <= floor_height and y > floor_height - 3 and y < sea_level + 5 and data[vi] == c_lava then
|
||||
data[vi] = c_obsidian
|
||||
end
|
||||
|
||||
|
||||
if y == floor_height and y < sea_level and not mapgen_helper.buildable_to(data[vi]) then
|
||||
if cracks > 0.2 then
|
||||
data[vi] = c_sand
|
||||
@ -243,7 +243,7 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
df_caverns.glow_worm_cavern_ceiling(math.abs(cracks),
|
||||
mapgen_helper.xz_consistent_randomi(area, vi), vi, area, data, data_param2)
|
||||
end
|
||||
|
||||
|
||||
-- Deal with lava
|
||||
if y >= ceiling_height and y < ceiling_height + 5 and y > sea_level - 5 and data[vi] == c_lava then
|
||||
data[vi] = c_obsidian
|
||||
@ -253,7 +253,7 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
skip_next = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if minp.y <= sea_level then
|
||||
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
|
||||
-- convert all air below sea level into water
|
||||
@ -263,10 +263,10 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
---------------------------------------------------------
|
||||
-- Cavern floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.cavern_floor_nodes) do
|
||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||
local heat = heatmap[index2d]
|
||||
@ -274,7 +274,7 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
local abs_cracks = math.abs(cracks)
|
||||
local vert_rand = mapgen_helper.xz_consistent_randomi(area, vi)
|
||||
local y = area:get_y(vi)
|
||||
|
||||
|
||||
-- The vertically squished aspect of these caverns produces too many very thin shelves, this blunts them
|
||||
if mapgen_helper.buildable_to(data[vi-area.ystride]) then
|
||||
if y <= sea_level then
|
||||
@ -282,8 +282,8 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
else
|
||||
data[vi] = c_air
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- extra test is needed because the rivers can remove nodes that Subterrane marked as floor.
|
||||
if not mapgen_helper.buildable_to(data[vi]) then
|
||||
if y >= sea_level then
|
||||
@ -317,7 +317,7 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------
|
||||
-- Cavern ceilings
|
||||
|
||||
@ -328,7 +328,7 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
local abs_cracks = math.abs(cracks)
|
||||
local vert_rand = mapgen_helper.xz_consistent_randomi(area, vi)
|
||||
local y = area:get_y(vi)
|
||||
|
||||
|
||||
if y > sea_level and not mapgen_helper.buildable_to(data[vi]) then
|
||||
if heat > hot_zone_boundary then
|
||||
hot_zone_ceiling(abs_cracks, vert_rand, vi, area, data, data_param2)
|
||||
@ -340,19 +340,19 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
-- Tunnel floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.tunnel_floor_nodes) do
|
||||
if area:get_y(vi) >= sea_level and not mapgen_helper.buildable_to(data[vi]) then
|
||||
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Tunnel ceiling
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.tunnel_ceiling_nodes) do
|
||||
if area:get_y(vi) > sea_level and not mapgen_helper.buildable_to(data[vi]) then
|
||||
df_caverns.tunnel_ceiling(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
@ -366,10 +366,10 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
if cracks > 0.8 and data[vi-ystride*2] == c_water then
|
||||
data[vi-ystride*2] = c_air
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
-- Warren ceiling
|
||||
|
||||
@ -386,13 +386,13 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
if cracks > 0.8 and data[vi-ystride*2] == c_water then
|
||||
data[vi-ystride*2] = c_air
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------
|
||||
-- Warren floors
|
||||
|
||||
|
||||
for _, vi in ipairs(node_arrays.warren_floor_nodes) do
|
||||
if area:get_y(vi) >= sea_level and not mapgen_helper.buildable_to(data[vi]) then
|
||||
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
|
||||
@ -414,7 +414,7 @@ local decorate_sunless_sea = function(minp, maxp, seed, vm, node_arrays, area, d
|
||||
data_param2[vi] = math.random(1,4)-1
|
||||
minetest.get_node_timer(area:position(vi)):start(math.random(10, 60))
|
||||
end
|
||||
|
||||
|
||||
if chasms_path then
|
||||
local pos = area:position(vi)
|
||||
if chasms.is_in_chasm(pos) then
|
||||
|
@ -10,8 +10,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
--if out of range of cave definition limits, abort
|
||||
if minp.y > y_max or maxp.y < y_min then
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local t_start = os.clock()
|
||||
|
||||
local vm, data, data_param2, area = mapgen_helper.mapgen_vm_data_param2()
|
||||
@ -21,18 +21,18 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local emaxp = {x=maxp.x, y=area.MaxEdge.y, z=maxp.z}
|
||||
local minp_y = minp.y
|
||||
local maxp_y = maxp.y
|
||||
|
||||
|
||||
local humiditymap = minetest.get_mapgen_object("humiditymap")
|
||||
local nvals_cracks = mapgen_helper.perlin2d("df_cavern:cracks", minp, maxp, df_caverns.np_cracks)
|
||||
|
||||
local previous_y = eminp.y-1
|
||||
|
||||
|
||||
local previous_potential_floor_vi
|
||||
local previous_potential_floor_y
|
||||
local previous_node
|
||||
|
||||
|
||||
for vi, x, y, z in area:iterp_yxz(eminp, emaxp) do
|
||||
|
||||
|
||||
if y < previous_y then
|
||||
-- we've started a new column, initialize everything
|
||||
previous_potential_floor_vi = nil
|
||||
@ -40,7 +40,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
previous_node = nil
|
||||
end
|
||||
previous_y = y
|
||||
|
||||
|
||||
local current_node = data[vi]
|
||||
if previous_node and y < y_max then
|
||||
if current_node == c_air and previous_node == c_stone then
|
||||
@ -66,9 +66,9 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
end
|
||||
end
|
||||
previous_node = current_node
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
if data_changed then
|
||||
--send data back to voxelmanip
|
||||
vm:set_data(data)
|
||||
@ -76,12 +76,12 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
--calc lighting
|
||||
vm:set_lighting({day = 0, night = 0})
|
||||
vm:calc_lighting()
|
||||
|
||||
|
||||
vm:update_liquids()
|
||||
--write it to world
|
||||
vm:write_to_map()
|
||||
end
|
||||
|
||||
|
||||
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
|
||||
mapgen_helper.record_time("df_caverns surface tunnels", time_taken)
|
||||
end)
|
||||
|
@ -38,7 +38,7 @@ if named_waypoints_path then
|
||||
local setting_item_required = minetest.settings:get("dfcaverns_underworld_hud_item_required")
|
||||
if setting_item_required == nil or setting_item_required == "" then
|
||||
setting_item_required = "map:mapping_kit"
|
||||
end
|
||||
end
|
||||
item_required = setting_item_required
|
||||
end
|
||||
|
||||
@ -47,8 +47,8 @@ if named_waypoints_path then
|
||||
default_color = 0xFF88FF,
|
||||
discovery_volume_radius = tonumber(minetest.settings:get("dfcaverns_pit_discovery_range")) or 60,
|
||||
visibility_requires_item = item_required,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if minetest.settings:get_bool("dfcaverns_show_pits_in_hud", true) then
|
||||
pit_waypoint_def.visibility_volume_radius = tonumber(minetest.settings:get("dfcaverns_pit_visibility_range")) or 500
|
||||
pit_waypoint_def.on_discovery = named_waypoints.default_discovery_popup
|
||||
@ -70,14 +70,14 @@ if named_waypoints_path then
|
||||
|
||||
if name_generator_path then
|
||||
name_generator.parse_lines(io.lines(modpath.."/underworld_names.cfg"))
|
||||
|
||||
|
||||
name_pit = function()
|
||||
return name_generator.generate("glowing_pits")
|
||||
end
|
||||
name_ruin = function()
|
||||
return name_generator.generate("underworld_ruins")
|
||||
end
|
||||
|
||||
|
||||
local underworld_ruin_def = {
|
||||
default_name = S("Ancient ruin"),
|
||||
discovery_volume_radius = tonumber(minetest.settings:get("dfcaverns_ruin_discovery_range")) or 40,
|
||||
@ -171,10 +171,10 @@ local get_buildings = function(emin, emax, nvals_zone)
|
||||
local buildings = {}
|
||||
for x = emin.x, emax.x do
|
||||
for z = emin.z, emax.z do
|
||||
|
||||
|
||||
local index2d = mapgen_helper.index2d(emin, emax, x, z)
|
||||
local zone = math.abs(nvals_zone[index2d])
|
||||
|
||||
|
||||
if zone > oubliette_threshold and zone < town_threshold then
|
||||
-- oubliette zone
|
||||
--zone = (zone - oubliette_threshold)/(town_threshold-oubliette_threshold) -- turn this into a 0-1 spread
|
||||
@ -195,7 +195,7 @@ local get_buildings = function(emin, emax, nvals_zone)
|
||||
building_type = building_type,
|
||||
bounding_box = {minpos={x=x-2, z=z-2}, maxpos={x=x+2, z=z+2}},
|
||||
priority = math.floor(building_val * 10000000) % 1000, -- indended to allow for deterministic removal of overlapping buildings
|
||||
}
|
||||
}
|
||||
)
|
||||
end
|
||||
elseif zone > town_threshold then
|
||||
@ -203,12 +203,12 @@ local get_buildings = function(emin, emax, nvals_zone)
|
||||
local building_val = local_random(x, z)
|
||||
if building_val > 0.9925 then
|
||||
building_val = (building_val - 0.9925)/0.0075
|
||||
|
||||
|
||||
local building_type
|
||||
local bounding_box
|
||||
local priority = math.floor(building_val * 10000000) % 1000
|
||||
local rotation = (priority % 4) * 90
|
||||
|
||||
|
||||
if building_val < 0.75 then
|
||||
building_type = "small building"
|
||||
local boundmin, boundmax = mapgen_helper.get_schematic_bounding_box({x=x, y=0, z=z}, small_building_schematic, rotation)
|
||||
@ -216,13 +216,13 @@ local get_buildings = function(emin, emax, nvals_zone)
|
||||
elseif building_val < 0.85 then
|
||||
building_type = "medium building"
|
||||
local boundmin, boundmax = mapgen_helper.get_schematic_bounding_box({x=x, y=0, z=z}, medium_building_schematic, rotation)
|
||||
bounding_box = {minpos=boundmin, maxpos=boundmax}
|
||||
bounding_box = {minpos=boundmin, maxpos=boundmax}
|
||||
else
|
||||
building_type = "small slab"
|
||||
local boundmin, boundmax = mapgen_helper.get_schematic_bounding_box({x=x, y=0, z=z}, small_slab_schematic, rotation)
|
||||
bounding_box = {minpos=boundmin, maxpos=boundmax}
|
||||
bounding_box = {minpos=boundmin, maxpos=boundmax}
|
||||
end
|
||||
|
||||
|
||||
table.insert(buildings,
|
||||
{
|
||||
pos = {x=x, y=0, z=z}, -- y to be determined later
|
||||
@ -236,7 +236,7 @@ local get_buildings = function(emin, emax, nvals_zone)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- eliminate overlapping buildings
|
||||
local building_count = table.getn(buildings)
|
||||
local overlap_count = 0
|
||||
@ -249,7 +249,7 @@ local get_buildings = function(emin, emax, nvals_zone)
|
||||
curr_building.bounding_box.maxpos,
|
||||
test_building.bounding_box.minpos,
|
||||
test_building.bounding_box.maxpos) then
|
||||
|
||||
|
||||
if curr_building.priority < test_building.priority then -- this makes elimination of overlapping buildings deterministic
|
||||
buildings[i] = nil
|
||||
j=building_count+1
|
||||
@ -260,19 +260,19 @@ local get_buildings = function(emin, emax, nvals_zone)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if building_count > 50 and overlap_count > building_count * 2/3 then
|
||||
minetest.log("warning", "[df_caverns] underworld mapgen generated " ..
|
||||
tostring(building_count) .. " buildings and " .. tostring(overlap_count) ..
|
||||
" were eliminated as overlapping, if this happens a lot consider reducing building" ..
|
||||
" generation probability to improve efficiency.")
|
||||
end
|
||||
|
||||
|
||||
local compacted_buildings = {}
|
||||
for _, building in pairs(buildings) do
|
||||
compacted_buildings[minetest.hash_node_position(building.pos)] = building
|
||||
end
|
||||
|
||||
|
||||
return compacted_buildings
|
||||
end
|
||||
|
||||
@ -314,7 +314,7 @@ local get_pit = function(pos)
|
||||
local variance_multiplier = math.random()
|
||||
local radius = variance_multiplier * (radius_pit_max - 15) + 15
|
||||
local variance = radius_pit_variance/2 + radius_pit_variance*variance_multiplier/2
|
||||
local depth = math.random(plasma_depth_min, plasma_depth_max)
|
||||
local depth = math.random(plasma_depth_min, plasma_depth_max)
|
||||
math.randomseed(next_seed)
|
||||
return {location = location, radius = radius, variance = variance, depth = depth}
|
||||
end
|
||||
@ -364,27 +364,27 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local vm, data, data_param2, area = mapgen_helper.mapgen_vm_data_param2()
|
||||
local emin = area.MinEdge
|
||||
local emax = area.MaxEdge
|
||||
|
||||
|
||||
local nvals_cave = mapgen_helper.perlin2d("df_caverns:underworld_cave", emin, emax, perlin_cave) --cave noise for structure
|
||||
local nvals_wave = mapgen_helper.perlin2d("df_caverns:underworld_wave", emin, emax, perlin_wave) --cave noise for structure
|
||||
local nvals_zone = mapgen_helper.perlin2d("df_caverns:underworld_zone", emin, emax, perlin_zone) --building zones
|
||||
|
||||
|
||||
local pit = get_pit(minp)
|
||||
--minetest.chat_send_all(minetest.pos_to_string(pit.location))
|
||||
|
||||
local buildings = get_buildings(emin, emax, nvals_zone)
|
||||
|
||||
|
||||
local pit_uninitialized = true
|
||||
local nvals_pit, area_pit
|
||||
|
||||
|
||||
for vi, x, y, z in area:iterp_yxz(minp, maxp) do
|
||||
if y > y_min then
|
||||
local index2d = mapgen_helper.index2d(emin, emax, x, z)
|
||||
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
|
||||
|
||||
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)
|
||||
|
||||
|
||||
if named_waypoints_path and floor_height == y and pit and pit.location.x == x and pit.location.z == z then
|
||||
named_waypoints.add_waypoint("glowing_pits", {x=x, y=y, z=z}, {name=name_pit()})
|
||||
end
|
||||
@ -393,7 +393,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local ceiling_height = math.floor(abs_cave * ceiling_mult + median + ceiling_displace + wave)
|
||||
if (y == underside_height or y == underside_height - 1) and (x % 8 == 0 or z % 8 == 0) then
|
||||
data[vi] = c_air
|
||||
elseif y < floor_height and y > underside_height then
|
||||
elseif y < floor_height and y > underside_height then
|
||||
data[vi] = c_slade
|
||||
if pit and
|
||||
pit.location.x - radius_pit_max - radius_pit_variance < maxp.x and
|
||||
@ -439,7 +439,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)
|
||||
local ceiling_height = math.floor(abs_cave * ceiling_mult + median + ceiling_displace + wave)
|
||||
|
||||
|
||||
if ceiling_height > floor_height + 5 and ceiling_height < maxp.y and ceiling_height > minp.y then
|
||||
local vi = area:index(x, ceiling_height, z)
|
||||
if (
|
||||
@ -457,7 +457,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
-- buildings
|
||||
for x = emin.x + 5, emax.x - 5 do
|
||||
for z = emin.z + 5, emax.z - 5 do
|
||||
|
||||
|
||||
local skip = false
|
||||
if pit and
|
||||
pit.location.x - radius_pit_max - radius_pit_variance < x and
|
||||
@ -476,7 +476,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)
|
||||
local ceiling_height = math.floor(abs_cave * ceiling_mult + median + ceiling_displace + wave)
|
||||
|
||||
|
||||
if ceiling_height > floor_height and floor_height <= maxp.y and floor_height >= minp.y then
|
||||
local building = buildings[minetest.hash_node_position({x=x,y=0,z=z})]
|
||||
if building ~= nil then
|
||||
@ -506,7 +506,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local def = minetest.registered_nodes["df_underworld_items:puzzle_chest_closed"]
|
||||
def.can_dig(puzzle_chest) -- initializes the inventory
|
||||
df_caverns.populate_puzzle_chest(puzzle_chest)
|
||||
end
|
||||
end
|
||||
end)
|
||||
elseif building.building_type == "medium building" then
|
||||
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, medium_building_schematic, building.rotation)
|
||||
@ -522,18 +522,18 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
minetest.log("error", "unrecognized underworld building type: " .. tostring(building.building_type))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- puzzle seal
|
||||
local puzzle_seal = nil
|
||||
local puzzle_seal = nil
|
||||
if pit_uninitialized and math.random() < 0.05 then
|
||||
local index2d = mapgen_helper.index2d(emin, emax, minp.x + 3, minp.z + 3)
|
||||
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
|
||||
|
||||
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)
|
||||
local underside_height = math.floor(y_min + math.abs(wave) / 5)
|
||||
|
||||
@ -556,7 +556,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
vm:update_liquids()
|
||||
--write it to world
|
||||
vm:write_to_map()
|
||||
|
||||
|
||||
if puzzle_seal ~= nil then
|
||||
if named_waypoints_path then
|
||||
named_waypoints.add_waypoint("puzzle_seals", puzzle_seal)
|
||||
@ -567,7 +567,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local node_def = minetest.registered_nodes[node_name]
|
||||
node_def.on_construct(puzzle_seal)
|
||||
end
|
||||
|
||||
|
||||
if bones_loot_path then
|
||||
for i = 1, 30 do
|
||||
local x = math.random(minp.x, maxp.x)
|
||||
@ -601,7 +601,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if hunters_enabled then
|
||||
local x = math.random(minp.x, maxp.x)
|
||||
local z = math.random(minp.z, maxp.z)
|
||||
@ -620,9 +620,9 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
|
||||
mapgen_helper.record_time("df_caverns underworld", time_taken)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user