Move map generator stuff around a bit and generate coal and iron deep underground
authorPerttu Ahola <celeron55@gmail.com>
Wed, 4 Apr 2012 12:43:17 +0000 (15:43 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Wed, 4 Apr 2012 12:43:17 +0000 (15:43 +0300)
mods/default/init.lua
mods/default/mapgen.lua
mods/default/textures/default_lava.png

index d2569bf17a55a0e121cf10658ede28c4340356d4..6f0ed21127be45cc3eebf85f13e1f65ce1cbb9d8 100644 (file)
@@ -1290,30 +1290,6 @@ minetest.add_to_creative_inventory('default:water_source')
 minetest.add_to_creative_inventory('default:lava_source')
 minetest.add_to_creative_inventory('default:ladder')
 
---
--- Aliases for map generator outputs
--- (required at least by an in-development branch)
---
-
-minetest.register_alias("mapgen_air", "air")
-minetest.register_alias("mapgen_stone", "default:stone")
-minetest.register_alias("mapgen_tree", "default:tree")
-minetest.register_alias("mapgen_leaves", "default:leaves")
-minetest.register_alias("mapgen_apple", "default:apple")
-minetest.register_alias("mapgen_water_source", "default:water_source")
-minetest.register_alias("mapgen_dirt", "default:dirt")
-minetest.register_alias("mapgen_sand", "default:sand")
-minetest.register_alias("mapgen_gravel", "default:gravel")
-minetest.register_alias("mapgen_clay", "default:clay")
-minetest.register_alias("mapgen_lava_source", "default:lava_source")
-minetest.register_alias("mapgen_cobble", "default:cobble")
-minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
-minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass")
-minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
-minetest.register_alias("mapgen_stone_with_coal", "default:stone_with_coal")
-minetest.register_alias("mapgen_stone_with_iron", "default:stone_with_iron")
-minetest.register_alias("mapgen_mese", "default:mese")
-
 --
 -- Some common functions
 --
index d01f051173b4052241925a8af68794807bbf8e36..af94505a04f5856e8e26944b2d1155a8ec79a493 100644 (file)
@@ -1,5 +1,32 @@
 -- minetest/default/mapgen.lua
 
+--
+-- Aliases for map generator outputs
+--
+
+minetest.register_alias("mapgen_air", "air")
+minetest.register_alias("mapgen_stone", "default:stone")
+minetest.register_alias("mapgen_tree", "default:tree")
+minetest.register_alias("mapgen_leaves", "default:leaves")
+minetest.register_alias("mapgen_apple", "default:apple")
+minetest.register_alias("mapgen_water_source", "default:water_source")
+minetest.register_alias("mapgen_dirt", "default:dirt")
+minetest.register_alias("mapgen_sand", "default:sand")
+minetest.register_alias("mapgen_gravel", "default:gravel")
+minetest.register_alias("mapgen_clay", "default:clay")
+minetest.register_alias("mapgen_lava_source", "default:lava_source")
+minetest.register_alias("mapgen_cobble", "default:cobble")
+minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
+minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass")
+minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
+minetest.register_alias("mapgen_stone_with_coal", "default:stone_with_coal")
+minetest.register_alias("mapgen_stone_with_iron", "default:stone_with_iron")
+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)
        if maxp.y < height_min or minp.y > height_max then
                return
@@ -42,10 +69,10 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
 end
 
 minetest.register_on_generated(function(minp, maxp, seed)
-       generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed,   1/8/8/8,    5, -64,  64)
-       generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/16/16/16, 5,   3,   7)
-       generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/12/12/12, 5, -16,   2)
-       generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/9/9/9,    5, -64, -17)
+       generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed,   1/8/8/8,    5, -31000,  64)
+       generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/16/16/16, 5,   -5,   7)
+       generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/12/12/12, 5, -16,   -5)
+       generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/9/9/9,    5, -31000, -17)
        -- Generate clay
        if maxp.y >= 2 and minp.y <= 0 then
                -- Assume X and Z lengths are equal
index 2c7d9ad9931acc4ec391ac1c56fa432651831ed3..9cf9fa81afa4f33cff9a8b4b1109cc767cbca6f2 100644 (file)
Binary files a/mods/default/textures/default_lava.png and b/mods/default/textures/default_lava.png differ