removed additional rarity. Casmir has right, the rarity is ok if coal is blacklisted
parent
4bcd309746
commit
e6c584bea4
|
@ -137,8 +137,7 @@ end
|
|||
|
||||
-- Exclude coal and diamond from being generated
|
||||
additional_stuff.not_an_ore = {"default:stone_with_coal", "default:stone_with_diamond"}
|
||||
additional_stuff.not_an_ore = {} --bell07 prefered setting
|
||||
additional_stuff.ore_rarity = 5
|
||||
additional_stuff.not_an_ore = {"default:stone_with_coal"} --bell07 prefered setting
|
||||
|
||||
local function is_not_an_ore(ore_name)
|
||||
for _,no_ore in ipairs(additional_stuff.not_an_ore) do
|
||||
|
@ -150,13 +149,13 @@ local function is_not_an_ore(ore_name)
|
|||
end
|
||||
|
||||
-- Place ore just as often as they occur in mapgen.
|
||||
local function choose_ore()
|
||||
local function choose_ore(pos)
|
||||
local cool_flowing = "default:stone"
|
||||
for _, ore in pairs(minetest.registered_ores) do
|
||||
if is_not_an_ore(ore.ore) then
|
||||
-- Do noting, keep cycling.
|
||||
elseif ore.wherein == cool_flowing and ore.ore_type == "scatter" then
|
||||
local rarity = math.floor(additional_stuff.ore_rarity * ore.clust_scarcity / ore.clust_size)
|
||||
local rarity = math.floor(ore.clust_scarcity / ore.clust_size)
|
||||
if math.random(rarity) == 1 then
|
||||
cool_flowing = ore.ore
|
||||
break
|
||||
|
@ -179,7 +178,7 @@ default.cool_lava = function(pos, node)
|
|||
end
|
||||
minetest.set_node(pos, {name = cool_source})
|
||||
else -- Lava flowing
|
||||
local cool_flowing = choose_ore()
|
||||
local cool_flowing = choose_ore(pos)
|
||||
minetest.set_node(pos, {name = cool_flowing})
|
||||
end
|
||||
minetest.sound_play("default_cool_lava",
|
||||
|
|
Loading…
Reference in New Issue