mirror of
git://repo.or.cz/rocks.git
synced 2025-05-07 03:30:29 +02:00
Cleanup + debug output.
This commit is contained in:
parent
97b9170653
commit
d1bc2638f3
5
sed.lua
5
sed.lua
@ -40,7 +40,7 @@ do
|
|||||||
-- hook to inject our sedimentary stone to new biomes
|
-- hook to inject our sedimentary stone to new biomes
|
||||||
local old_register_biome=minetest.register_biome
|
local old_register_biome=minetest.register_biome
|
||||||
minetest.register_biome=function(def)
|
minetest.register_biome=function(def)
|
||||||
print("[rocks] register_biome .name="..def.name)
|
--print("[rocks] register_biome .name="..def.name)
|
||||||
for n,v in pairs(def) do
|
for n,v in pairs(def) do
|
||||||
--if type(v)~="table" then print(" "..n.."="..v) end
|
--if type(v)~="table" then print(" "..n.."="..v) end
|
||||||
end
|
end
|
||||||
@ -60,6 +60,7 @@ do
|
|||||||
elseif (def.y_min>highland_min-tl) and (def.y_max<highland_max+tl) then btype="highland"
|
elseif (def.y_min>highland_min-tl) and (def.y_max<highland_max+tl) then btype="highland"
|
||||||
elseif (def.y_min<-3000) and (def.y_max<lowland_min+tl) then btype="ocean"
|
elseif (def.y_min<-3000) and (def.y_max<lowland_min+tl) then btype="ocean"
|
||||||
else minetest.log("error", "/rocks could not guess elevation type for biome "..def.name) end
|
else minetest.log("error", "/rocks could not guess elevation type for biome "..def.name) end
|
||||||
|
rocksl.print("/rocks register_biome .name="..def.name.." -> btype="..btype)
|
||||||
-- patch the new biomes with our rocks
|
-- patch the new biomes with our rocks
|
||||||
if btype=="lowland" then
|
if btype=="lowland" then
|
||||||
def.node_filler="rocks:mudstone"
|
def.node_filler="rocks:mudstone"
|
||||||
@ -74,7 +75,7 @@ do
|
|||||||
end
|
end
|
||||||
-- and call the saved method to actually do the registration
|
-- and call the saved method to actually do the registration
|
||||||
old_register_biome(def)
|
old_register_biome(def)
|
||||||
end
|
end
|
||||||
--now register the default grassland
|
--now register the default grassland
|
||||||
minetest.register_biome(grassland)
|
minetest.register_biome(grassland)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user