1
0
mirror of git://repo.or.cz/rocks.git synced 2024-11-18 00:08:35 +01:00

Note, how to rewrite mapgen.

This commit is contained in:
Tomáš Brada 2015-04-14 23:32:36 +02:00
parent b8dfc5dedd
commit c3167e8720

View File

@ -38,6 +38,11 @@ rocksl.register_vein=function(col,name,param)
table.insert(col,d) table.insert(col,d)
end end
-- TODO: rewrite above function to register normal minetest ore, with
-- special params, so the below func is not necesary. The mt oregen runs in
-- separate therad (emerge) and it does not block server.
-- params: type=scatter scacrity=1 size=3 ores=27 : full chance of spawning, only limited by noise thr
rocksl.layergen=function(layer, minp, maxp, seed) rocksl.layergen=function(layer, minp, maxp, seed)
if ( (layer.top.offset+layer.top.scale)>minp.y ) if ( (layer.top.offset+layer.top.scale)>minp.y )
and ( (layer.bot.offset-layer.bot.scale)<maxp.y ) and ( (layer.bot.offset-layer.bot.scale)<maxp.y )