diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2015-07-25 16:45:29 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2015-07-25 16:45:29 +0100 |
commit | 170b62ecdeaae56c2c612f534d5c99593ccb10b1 (patch) | |
tree | e496d78772dc7ef061dd6b7c7980aff4443cca28 /mapgen_v7n.lua | |
parent | f37b81262aaa40445abddc8aa0a17f4801c9d68d (diff) |
Tweaked and Tidied code
Diffstat (limited to 'mapgen_v7n.lua')
-rw-r--r-- | mapgen_v7n.lua | 137 |
1 files changed, 127 insertions, 10 deletions
diff --git a/mapgen_v7n.lua b/mapgen_v7n.lua index 240b101..afd425d 100644 --- a/mapgen_v7n.lua +++ b/mapgen_v7n.lua @@ -34,11 +34,23 @@ minetest.register_biome({ depth_top = 1,
node_filler = "default:dirt",
depth_filler = 5,
- y_min = 1,
+ y_min = 3,
y_max = 71,
heat_point = 45,
humidity_point = 75,
})
+
+minetest.register_biome({
+ name = "bamboo_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 2,
+ heat_point = 45,
+ humidity_point = 75,
+})
end
if ethereal.mesa == 1 then
@@ -53,6 +65,18 @@ minetest.register_biome({ heat_point = 25,
humidity_point = 28,
})
+
+minetest.register_biome({
+ name = "mesa_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 1,
+ heat_point = 25,
+ humidity_point = 28,
+})
end
if ethereal.alpine == 1 then
@@ -132,11 +156,23 @@ minetest.register_biome({ depth_top = 1,
node_filler = "default:dirt",
depth_filler = 5,
- y_min = 1,
+ y_min = 2,
y_max = 41,
heat_point = 15,
humidity_point = 30,
})
+
+minetest.register_biome({
+ name = "grayness_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 1,
+ heat_point = 15,
+ humidity_point = 30,
+})
end
if ethereal.grassytwo == 1 then
@@ -207,6 +243,18 @@ minetest.register_biome({ heat_point = 35,
humidity_point = 20,
})
+
+minetest.register_biome({
+ name = "desert_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 2,
+ heat_point = 35,
+ humidity_point = 20,
+})
end
if ethereal.grove == 1 then
@@ -221,6 +269,18 @@ minetest.register_biome({ heat_point = 40,
humidity_point = 60,
})
+
+minetest.register_biome({
+ name = "grove_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 2,
+ heat_point = 40,
+ humidity_point = 60,
+})
end
if ethereal.mushroom == 1 then
@@ -230,14 +290,26 @@ minetest.register_biome({ depth_top = 1,
node_filler = "default:dirt",
depth_filler = 5,
- y_min = 1,
+ y_min = 3,
y_max = 50,
heat_point = 45,
humidity_point = 65,
})
+
+minetest.register_biome({
+ name = "mushroom_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 2,
+ heat_point = 45,
+ humidity_point = 65,
+})
end
-if ethereal.desertstone == 1 then
+if ethereal.sandstone == 1 then
minetest.register_biome({
name = "desertstone",
node_top = "default:sandstone",
@@ -249,6 +321,18 @@ minetest.register_biome({ heat_point = 50,
humidity_point = 20,
})
+
+minetest.register_biome({
+ name = "sandstone_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 2,
+ heat_point = 50,
+ humidity_point = 20,
+})
end
if ethereal.quicksand == 1 then
@@ -293,6 +377,18 @@ minetest.register_biome({ heat_point = 55,
humidity_point = 25,
})
+
+minetest.register_biome({
+ name = "plains_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 2,
+ heat_point = 55,
+ humidity_point = 25,
+})
end
if ethereal.fiery == 1 then
@@ -307,6 +403,18 @@ minetest.register_biome({ heat_point = 80,
humidity_point = 10,
})
+
+minetest.register_biome({
+ name = "fiery_ocean",
+ node_top = "default:sand",
+ depth_top = 1,
+ node_filler = "default:sand",
+ depth_filler = 2,
+ y_min = -192,
+ y_max = 4,
+ heat_point = 80,
+ humidity_point = 10,
+})
end
if ethereal.sandclay == 1 then
@@ -704,16 +812,25 @@ minetest.register_on_generated(function(minp, maxp, seed) local divlen = 8
local divs = (maxp.x - minp.x) / divlen + 1
local pr, x, z
- for divx=0,divs-1 do
- for divz=0,divs-1 do
+ for divx = 0, divs - 1 do
+ for divz = 0, divs - 1 do
-- find random positions for palm tree
pr = PseudoRandom(seed + 1)
- x = pr:next(minp.x + math.floor((divx + 0) * divlen), minp.x + math.floor((divx + 1) * divlen))
- z = pr:next(minp.z + math.floor((divz + 0) * divlen), minp.z + math.floor((divz + 1) * divlen))
+ x = pr:next(minp.x + math.floor((divx + 0) * divlen),
+ minp.x + math.floor((divx + 1) * divlen))
+ z = pr:next(minp.z + math.floor((divz + 0) * divlen),
+ minp.z + math.floor((divz + 1) * divlen))
nn = minetest.get_node_or_nil({x = x, y = 1, z = z})
+ -- only on sand and beside water
if nn and nn.name == "default:sand"
- and minetest.find_node_near({x = x, y = 1,z = z}, 1, "default:water_source") then
- minetest.place_schematic({x = x - 4, y = 2, z = z - 4}, path.."palmtree.mts", 0, '', 0)
+ and minetest.find_node_near(
+ {x = x, y = 1, z = z}, 1,
+ "default:water_source") then
+ minetest.place_schematic({
+ x = x - 4,
+ y = 2,
+ z = z - 4
+ }, path .. "palmtree.mts", "random", {}, false)
end
end
end
|