From b00dee4b8dcf2cc0bcea83cdcc09f8f02384932f Mon Sep 17 00:00:00 2001 From: cale Date: Sat, 9 Apr 2016 12:08:20 +0200 Subject: [PATCH] updated ores + updated noise_params for village mod --- mods/default/mapgen.lua | 68 ++++++++++++++++++++++++++++++++++++++++- mods/village/init.lua | 20 ++++++------ 2 files changed, 76 insertions(+), 12 deletions(-) diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index 97edf44..cb0d1ec 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -367,6 +367,28 @@ minetest.register_ore({ y_max = 30, }) +minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 11*11*11, + clust_num_ores = 27, + clust_size = 6, + y_min = -256, + y_max = 0, +}) + +minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8*8*8, + clust_num_ores = 27, + clust_size = 6, + y_min = -31000, + y_max = -256, +}) + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_iron", @@ -374,10 +396,32 @@ minetest.register_ore({ clust_scarcity = 9*9*9, clust_num_ores = 5, clust_size = 3, - y_min = -31000, + y_min = -100, y_max = 2, }) +minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 9*9*9, + clust_num_ores = 6, + clust_size = 3, + y_min = -31000, + y_max = -50, +}) + +minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 8*8*8, + clust_num_ores = 10, + clust_size = 3, + y_min = -31000, + y_max = -256, +}) + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_gold", @@ -389,6 +433,17 @@ minetest.register_ore({ y_max = -256, }) +minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 8*8*8, + clust_num_ores = 10, + clust_size = 3, + y_min = -31000, + y_max = -400, +}) + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_diamond", @@ -400,6 +455,17 @@ minetest.register_ore({ y_max = -256, }) +minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 5, + clust_size = 2, + y_min = -31000, + y_max = -300, +}) + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_ruby", diff --git a/mods/village/init.lua b/mods/village/init.lua index e933103..ac42f33 100644 --- a/mods/village/init.lua +++ b/mods/village/init.lua @@ -77,20 +77,18 @@ minetest.register_abm({ chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) minetest.set_node(pos, {name = "air"}) - if math.random(150) == 50 then - village.gen(pos) + village.gen(pos) + if not places.pos["village_" .. tostring(village.num)] then + places.pos["village_" .. tostring(village.num)] = {x=pos.x, y=pos.y, z=pos.z} + village.num = village.num +1 + places.save_places() + else + -- TODO : save village num + village.num = village.num +10 if not places.pos["village_" .. tostring(village.num)] then places.pos["village_" .. tostring(village.num)] = {x=pos.x, y=pos.y, z=pos.z} village.num = village.num +1 places.save_places() - else - -- TODO : save village num - village.num = village.num +10 - if not places.pos["village_" .. tostring(village.num)] then - places.pos["village_" .. tostring(village.num)] = {x=pos.x, y=pos.y, z=pos.z} - village.num = village.num +1 - places.save_places() - end end end end, @@ -100,7 +98,7 @@ minetest.register_decoration({ deco_type = "simple", place_on = {"default:grass"}, sidelen = 16, - fill_ratio = 0.004, + noise_params = {offset=0, scale=0.0001, spread={x=100, y=100, z=100}, seed=354, octaves=3, persist=0.7}, biomes = { "grassland" },