Add cave integration option.
parent
580dd54d70
commit
c99b485293
25
init.lua
25
init.lua
|
@ -8,6 +8,11 @@ underworlds_mod.version = "1.0"
|
||||||
underworlds_mod.path = minetest.get_modpath(minetest.get_current_modname())
|
underworlds_mod.path = minetest.get_modpath(minetest.get_current_modname())
|
||||||
underworlds_mod.world = minetest.get_worldpath()
|
underworlds_mod.world = minetest.get_worldpath()
|
||||||
|
|
||||||
|
underworlds_mod.integration = minetest.setting_getbool('underworlds_mod_integration')
|
||||||
|
if underworlds_mod.integration == nil then
|
||||||
|
underworlds_mod.integration = false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
underworlds_mod.underzones = {
|
underworlds_mod.underzones = {
|
||||||
Caina = {
|
Caina = {
|
||||||
|
@ -16,8 +21,8 @@ underworlds_mod.underzones = {
|
||||||
column_node = 'default:ice',
|
column_node = 'default:ice',
|
||||||
column_node_rare = 'underworlds:thin_ice',
|
column_node_rare = 'underworlds:thin_ice',
|
||||||
floor_node = 'default:ice',
|
floor_node = 'default:ice',
|
||||||
high_chunk = -12,
|
high_chunk = -14,
|
||||||
low_chunk = -14,
|
low_chunk = -16,
|
||||||
regular_columns = false,
|
regular_columns = false,
|
||||||
stalactite = 'underworlds:icicle_down',
|
stalactite = 'underworlds:icicle_down',
|
||||||
stalactite_chance = 12,
|
stalactite_chance = 12,
|
||||||
|
@ -32,8 +37,8 @@ underworlds_mod.underzones = {
|
||||||
floor_node = 'underworlds:hot_cobble',
|
floor_node = 'underworlds:hot_cobble',
|
||||||
fluid = 'default:lava_source',
|
fluid = 'default:lava_source',
|
||||||
fluid_chance = 1200,
|
fluid_chance = 1200,
|
||||||
high_chunk = -16,
|
high_chunk = -18,
|
||||||
low_chunk = -18,
|
low_chunk = -20,
|
||||||
lake = 'default:lava_source',
|
lake = 'default:lava_source',
|
||||||
lake_level = 5,
|
lake_level = 5,
|
||||||
regular_columns = false,
|
regular_columns = false,
|
||||||
|
@ -48,8 +53,8 @@ underworlds_mod.underzones = {
|
||||||
column_node = 'default:steelblock',
|
column_node = 'default:steelblock',
|
||||||
floor_depth = 10,
|
floor_depth = 10,
|
||||||
floor_node = 'underworlds:hot_brass',
|
floor_node = 'underworlds:hot_brass',
|
||||||
high_chunk = -20,
|
high_chunk = -22,
|
||||||
low_chunk = -20,
|
low_chunk = -22,
|
||||||
regular_columns = true,
|
regular_columns = true,
|
||||||
stone_depth = 1,
|
stone_depth = 1,
|
||||||
vary = false,
|
vary = false,
|
||||||
|
@ -62,10 +67,10 @@ underworlds_mod.underzones = {
|
||||||
floor_node = 'underworlds:polluted_dirt',
|
floor_node = 'underworlds:polluted_dirt',
|
||||||
fluid = 'underworlds:water_poison_source',
|
fluid = 'underworlds:water_poison_source',
|
||||||
fluid_chance = 2000,
|
fluid_chance = 2000,
|
||||||
high_chunk = -22,
|
high_chunk = -24,
|
||||||
lake = 'underworlds:water_poison_source',
|
lake = 'underworlds:water_poison_source',
|
||||||
lake_level = 10,
|
lake_level = 10,
|
||||||
low_chunk = -24,
|
low_chunk = -26,
|
||||||
regular_columns = false,
|
regular_columns = false,
|
||||||
stone_depth = 2,
|
stone_depth = 2,
|
||||||
vary = true,
|
vary = true,
|
||||||
|
@ -74,8 +79,8 @@ underworlds_mod.underzones = {
|
||||||
name = 'Styx',
|
name = 'Styx',
|
||||||
ceiling_node = 'default:dirt',
|
ceiling_node = 'default:dirt',
|
||||||
floor_node = 'default:dirt',
|
floor_node = 'default:dirt',
|
||||||
high_chunk = -26,
|
high_chunk = -28,
|
||||||
low_chunk = -30,
|
low_chunk = -32,
|
||||||
regular_columns = false,
|
regular_columns = false,
|
||||||
stone_depth = 2,
|
stone_depth = 2,
|
||||||
sea_chunk = -16,
|
sea_chunk = -16,
|
||||||
|
|
|
@ -77,9 +77,9 @@ underworlds_mod.undergen = function(minp, maxp, data, p2data, area, node, underz
|
||||||
data[ivm] = node["air"]
|
data[ivm] = node["air"]
|
||||||
end
|
end
|
||||||
write = true
|
write = true
|
||||||
elseif y < underzone.ceiling + 10 - (underzone.vary and terrain[index] or 0) then
|
elseif y < underzone.ceiling + 10 - (underzone.vary and terrain[index] or 0) and (not underworlds_mod.integration or data[ivm] ~= node['air']) then
|
||||||
data[ivm] = node["default:stone"]
|
data[ivm] = node["default:stone"]
|
||||||
elseif y > underzone.floor - 10 + (underzone.vary and terrain[index] or 0) then
|
elseif y > underzone.floor - 10 + (underzone.vary and terrain[index] or 0) and (not underworlds_mod.integration or data[ivm] ~= node['air']) then
|
||||||
data[ivm] = node["default:stone"]
|
data[ivm] = node["default:stone"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue