diff options
author | kwolekr <mirrorisim@gmail.com> | 2013-02-25 20:52:24 -0800 |
---|---|---|
committer | kwolekr <mirrorisim@gmail.com> | 2013-02-25 20:52:24 -0800 |
commit | 979ca23f1eae1adeb8b0083dffe7203c54d87395 (patch) | |
tree | 689ce00fbfe55861f4df39e1801fc9bc990b141f /games/minimal/mods/default | |
parent | 9b5f182642416add39aab7782b1d155dafead160 (diff) | |
parent | b90e431fc785961e7913023999d1f570ad7ca151 (diff) | |
download | minetest-979ca23f1eae1adeb8b0083dffe7203c54d87395.tar.gz minetest-979ca23f1eae1adeb8b0083dffe7203c54d87395.tar.bz2 minetest-979ca23f1eae1adeb8b0083dffe7203c54d87395.zip |
Merge pull request #482 from proller/liquid
finite liquid
Diffstat (limited to 'games/minimal/mods/default')
-rw-r--r-- | games/minimal/mods/default/mapgen.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/games/minimal/mods/default/mapgen.lua b/games/minimal/mods/default/mapgen.lua index af94505a0..115bb1458 100644 --- a/games/minimal/mods/default/mapgen.lua +++ b/games/minimal/mods/default/mapgen.lua @@ -27,7 +27,7 @@ minetest.register_alias("mapgen_mese", "default:mese") -- Ore generation -- -local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max) +local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max, param2) if maxp.y < height_min or minp.y > height_max then return end @@ -57,7 +57,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, local z2 = z0+z1 local p2 = {x=x2, y=y2, z=z2} if minetest.env:get_node(p2).name == wherein then - minetest.env:set_node(p2, {name=name}) + minetest.env:set_node(p2, {name=name, param2=param2}) end end end @@ -110,5 +110,11 @@ minetest.register_on_generated(function(minp, maxp, seed) end end end + if minetest.setting_get("liquid_finite") then + generate_ore("default:water_source", "default:stone", minp, maxp, seed+42, 1/24/24/24, 4, -100, -10, 128) + generate_ore("default:water_source", "default:stone", minp, maxp, seed+42, 1/28/28/28, 3, -10000, -101, 128) + generate_ore("default:lava_source", "default:stone", minp, maxp, seed+43, 1/38/38/38, 2, -500, -100, 128) + generate_ore("default:lava_source", "default:stone", minp, maxp, seed+43, 1/30/30/30, 4, -31000, -501, 128) + end end) |