mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-31 02:56:26 -04:00
Merge 5cd01f7c58
into 03c00a831d
This commit is contained in:
commit
3a6823c496
3 changed files with 378 additions and 161 deletions
17
mods/default/config.lua
Normal file
17
mods/default/config.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
default.config = Settings(minetest.get_worldpath().."/default.conf")
|
||||
|
||||
local conf_table = default.config:to_table()
|
||||
|
||||
local defaults = {
|
||||
uniform_ore_generation = "false",
|
||||
}
|
||||
|
||||
for k, v in pairs(defaults) do
|
||||
if conf_table[k] == nil then
|
||||
if minetest.setting_get(k) ~= nil then
|
||||
default.config:set(k, minetest.setting_get(k))
|
||||
else
|
||||
default.config:set(k, v)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -33,6 +33,7 @@ default.gui_survival_form = "size[8,8.5]"..
|
|||
default.get_hotbar_bg(0,4.25)
|
||||
|
||||
-- Load files
|
||||
dofile(minetest.get_modpath("default").."/config.lua")
|
||||
dofile(minetest.get_modpath("default").."/functions.lua")
|
||||
dofile(minetest.get_modpath("default").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("default").."/furnace.lua")
|
||||
|
|
|
@ -31,7 +31,8 @@ minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
|
|||
-- Ore generation
|
||||
--
|
||||
|
||||
minetest.register_ore({
|
||||
if default.config:get_bool("uniform_ore_generation") then
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_coal",
|
||||
wherein = "default:stone",
|
||||
|
@ -40,9 +41,9 @@ minetest.register_ore({
|
|||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = 64,
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_coal",
|
||||
wherein = "default:stone",
|
||||
|
@ -52,9 +53,9 @@ minetest.register_ore({
|
|||
height_min = -31000,
|
||||
height_max = 0,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
|
@ -63,9 +64,9 @@ minetest.register_ore({
|
|||
clust_size = 2,
|
||||
height_min = -15,
|
||||
height_max = 2,
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
|
@ -74,9 +75,9 @@ minetest.register_ore({
|
|||
clust_size = 3,
|
||||
height_min = -63,
|
||||
height_max = -16,
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
|
@ -86,9 +87,9 @@ minetest.register_ore({
|
|||
height_min = -31000,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
|
@ -98,9 +99,9 @@ minetest.register_ore({
|
|||
height_min = -31000,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_mese",
|
||||
wherein = "default:stone",
|
||||
|
@ -110,9 +111,9 @@ minetest.register_ore({
|
|||
height_min = -255,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_mese",
|
||||
wherein = "default:stone",
|
||||
|
@ -122,9 +123,9 @@ minetest.register_ore({
|
|||
height_min = -31000,
|
||||
height_max = -256,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:mese",
|
||||
wherein = "default:stone",
|
||||
|
@ -134,9 +135,9 @@ minetest.register_ore({
|
|||
height_min = -31000,
|
||||
height_max = -1024,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_gold",
|
||||
wherein = "default:stone",
|
||||
|
@ -146,9 +147,9 @@ minetest.register_ore({
|
|||
height_min = -255,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_gold",
|
||||
wherein = "default:stone",
|
||||
|
@ -158,9 +159,9 @@ minetest.register_ore({
|
|||
height_min = -31000,
|
||||
height_max = -256,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_diamond",
|
||||
wherein = "default:stone",
|
||||
|
@ -170,9 +171,9 @@ minetest.register_ore({
|
|||
height_min = -255,
|
||||
height_max = -128,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_diamond",
|
||||
wherein = "default:stone",
|
||||
|
@ -182,9 +183,9 @@ minetest.register_ore({
|
|||
height_min = -31000,
|
||||
height_max = -256,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_copper",
|
||||
wherein = "default:stone",
|
||||
|
@ -193,9 +194,9 @@ minetest.register_ore({
|
|||
clust_size = 3,
|
||||
height_min = -63,
|
||||
height_max = -16,
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_copper",
|
||||
wherein = "default:stone",
|
||||
|
@ -205,7 +206,205 @@ minetest.register_ore({
|
|||
height_min = -31000,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
})
|
||||
})
|
||||
else
|
||||
local coal_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 42, octaves = 3, persist = 0.7}
|
||||
local coal_threshhold = 0.2
|
||||
|
||||
local iron_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 43, octaves = 3, persist = 0.7}
|
||||
local iron_threshhold = 0.4
|
||||
|
||||
local mese_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 44, octaves = 3, persist = 0.7}
|
||||
local mese_threshhold = 0.7
|
||||
local mese_block_threshhold = 1.0
|
||||
|
||||
local gold_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 45, octaves = 3, persist = 0.7}
|
||||
local gold_threshhold = 0.6
|
||||
|
||||
local diamond_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 46, octaves = 3, persist = 0.7}
|
||||
local diamond_threshhold = 0.8
|
||||
|
||||
local copper_params = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 47, octaves = 3, persist = 0.7}
|
||||
local copper_threshhold = 0.5
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_coal",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 6*6*6,
|
||||
clust_num_ores = 8,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = 64,
|
||||
noise_params = coal_params,
|
||||
noise_threshhold = coal_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
height_min = -15,
|
||||
height_max = 2,
|
||||
noise_params = iron_params,
|
||||
noise_threshhold = iron_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 7*7*7,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -63,
|
||||
height_max = -16,
|
||||
noise_params = iron_params,
|
||||
noise_threshhold = iron_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 6*6*6,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
noise_params = iron_params,
|
||||
noise_threshhold = iron_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_mese",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
height_min = -255,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
noise_params = mese_params,
|
||||
noise_threshhold = mese_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_mese",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 7*7*7,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = -256,
|
||||
flags = "absheight",
|
||||
noise_params = mese_params,
|
||||
noise_threshhold = mese_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:mese",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
height_min = -31000,
|
||||
height_max = -1024,
|
||||
flags = "absheight",
|
||||
noise_params = mese_params,
|
||||
noise_threshhold = mese_block_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_gold",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 3,
|
||||
clust_size = 2,
|
||||
height_min = -255,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
noise_params = gold_params,
|
||||
noise_threshhold = gold_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_gold",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 7*7*7,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = -256,
|
||||
flags = "absheight",
|
||||
noise_params = gold_params,
|
||||
noise_threshhold = gold_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_diamond",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 10*10*10,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
height_min = -255,
|
||||
height_max = -128,
|
||||
flags = "absheight",
|
||||
noise_params = diamond_params,
|
||||
noise_threshhold = diamond_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_diamond",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = -256,
|
||||
flags = "absheight",
|
||||
noise_params = diamond_params,
|
||||
noise_threshhold = diamond_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_copper",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
height_min = -63,
|
||||
height_max = -16,
|
||||
noise_params = copper_params,
|
||||
noise_threshhold = copper_threshhold,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_copper",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 6*6*6,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = -64,
|
||||
flags = "absheight",
|
||||
noise_params = copper_params,
|
||||
noise_threshhold = copper_threshhold,
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
|
|
Loading…
Add table
Reference in a new issue