Field 'height_max/min': Deprecated: new name is 'y_max/min'.

This commit is contained in:
juraj 2016-02-26 23:02:10 +01:00
parent 87aa4d12f2
commit a202365814
5 changed files with 75 additions and 75 deletions

View File

@ -160,8 +160,8 @@ minetest.register_ore({
clust_scarcity = 9*9*9,
clust_num_ores = 16,
clust_size = 4,
height_max = -4,
height_min = -60,
y_max = -4,
y_min = -60,
})
minetest.register_ore({
@ -171,17 +171,17 @@ minetest.register_ore({
clust_scarcity = 9*9*9,
clust_num_ores = 16,
clust_size = 4,
height_max = -4,
height_min = -60,
y_max = -4,
y_min = -60,
})
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
if maxp.y < height_min or minp.y > height_max then
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, y_min, y_max)
if maxp.y < y_min or minp.y > y_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local y_min = math.max(minp.y, y_min)
local y_max = math.min(maxp.y, y_max)
if chunk_size >= y_max - y_min + 1 then
return
end
@ -191,7 +191,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
for i=1,num_chunks do
local y0 = pr:next(y_min, y_max-chunk_size+1)
if y0 >= height_min and y0 <= height_max then
if y0 >= y_min and y0 <= y_max then
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
local p0 = {x=x0, y=y0, z=z0}

View File

@ -260,8 +260,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -271,8 +271,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -282,8 +282,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -293,8 +293,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -304,8 +304,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -315,8 +315,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -326,8 +326,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -337,8 +337,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -348,8 +348,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -359,8 +359,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -370,8 +370,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
minetest.register_ore({
@ -381,16 +381,16 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -4,
height_min = -8,
y_max = -4,
y_min = -8,
})
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
if maxp.y < height_min or minp.y > height_max then
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, y_min, y_max)
if maxp.y < y_min or minp.y > y_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local y_min = math.max(minp.y, y_min)
local y_max = math.min(maxp.y, y_max)
if chunk_size >= y_max - y_min + 1 then
return
end
@ -400,7 +400,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
for i=1,num_chunks do
local y0 = pr:next(y_min, y_max-chunk_size+1)
if y0 >= height_min and y0 <= height_max then
if y0 >= y_min and y0 <= y_max then
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
local p0 = {x=x0, y=y0, z=z0}

View File

@ -228,8 +228,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -14,
height_min = -31000,
y_max = -14,
y_min = -31000,
})
minetest.register_ore({
@ -239,8 +239,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -14,
height_min = -31000,
y_max = -14,
y_min = -31000,
})
minetest.register_ore({
@ -250,8 +250,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -14,
height_min = -31000,
y_max = -14,
y_min = -31000,
})
minetest.register_ore({
@ -261,8 +261,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -14,
height_min = -31000,
y_max = -14,
y_min = -31000,
})
minetest.register_ore({
@ -272,8 +272,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -14,
height_min = -31000,
y_max = -14,
y_min = -31000,
})
minetest.register_ore({
@ -283,8 +283,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -14,
height_min = -31000,
y_max = -14,
y_min = -31000,
})
minetest.register_ore({
@ -294,8 +294,8 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -14,
height_min = -31000,
y_max = -14,
y_min = -31000,
})
minetest.register_ore({
@ -305,16 +305,16 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 24,
clust_size = 4,
height_max = -14,
height_min = -31000,
y_max = -14,
y_min = -31000,
})
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
if maxp.y < height_min or minp.y > height_max then
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, y_min, y_max)
if maxp.y < y_min or minp.y > y_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local y_min = math.max(minp.y, y_min)
local y_max = math.min(maxp.y, y_max)
if chunk_size >= y_max - y_min + 1 then
return
end
@ -324,7 +324,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
for i=1,num_chunks do
local y0 = pr:next(y_min, y_max-chunk_size+1)
if y0 >= height_min and y0 <= height_max then
if y0 >= y_min and y0 <= y_max then
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
local p0 = {x=x0, y=y0, z=z0}

View File

@ -124,8 +124,8 @@ minetest.register_ore({
clust_scarcity = 30*30*30,
clust_num_ores = 1,
clust_size = 12,
height_max = -4,
height_min = -31000,
y_max = -4,
y_min = -31000,
})
minetest.register_ore({
@ -135,16 +135,16 @@ minetest.register_ore({
clust_scarcity = 30*30*30,
clust_num_ores = 1,
clust_size = 12,
height_max = -8,
height_min = -31000,
y_max = -8,
y_min = -31000,
})
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
if maxp.y < height_min or minp.y > height_max then
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, y_min, y_max)
if maxp.y < y_min or minp.y > y_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local y_min = math.max(minp.y, y_min)
local y_max = math.min(maxp.y, y_max)
if chunk_size >= y_max - y_min + 1 then
return
end
@ -154,7 +154,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
for i=1,num_chunks do
local y0 = pr:next(y_min, y_max-chunk_size+1)
if y0 >= height_min and y0 <= height_max then
if y0 >= y_min and y0 <= y_max then
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
local p0 = {x=x0, y=y0, z=z0}

View File

@ -32,17 +32,17 @@ minetest.register_ore({
clust_scarcity = 10*10*10,
clust_num_ores = 18,
clust_size = 6,
height_max = 31000,
height_min = -31000,
y_max = 31000,
y_min = -31000,
})
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
if maxp.y < height_min or minp.y > height_max then
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, y_min, y_max)
if maxp.y < y_min or minp.y > y_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local y_min = math.max(minp.y, y_min)
local y_max = math.min(maxp.y, y_max)
if chunk_size >= y_max - y_min + 1 then
return
end
@ -52,7 +52,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
for i=1,num_chunks do
local y0 = pr:next(y_min, y_max-chunk_size+1)
if y0 >= height_min and y0 <= height_max then
if y0 >= y_min and y0 <= y_max then
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
local p0 = {x=x0, y=y0, z=z0}