From b5d96cabe1a1fe2c8a282016bcdd849984a72bc5 Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Sun, 5 Jul 2015 19:34:46 +0200 Subject: [PATCH] Various adaptations (again) --- mods/watershed/functions.lua | 38 +++--------------------------------- mods/watershed/init.lua | 1 + mods/watershed/nodes.lua | 16 +-------------- 3 files changed, 5 insertions(+), 50 deletions(-) diff --git a/mods/watershed/functions.lua b/mods/watershed/functions.lua index 6b275eb1..af778b4a 100644 --- a/mods/watershed/functions.lua +++ b/mods/watershed/functions.lua @@ -130,41 +130,9 @@ function watershed_jungletree(x, y, z, area, data) end function watershed_acaciatree(x, y, z, area, data) - local c_wsactree = minetest.get_content_id("watershed:acaciatree") - local c_wsacleaf = minetest.get_content_id("watershed:acacialeaf") - for j = -3, 6 do - if j == 6 then - for i = -4, 4 do - for k = -4, 4 do - if not (i == 0 or k == 0) then - if math.random(7) ~= 2 then - local vil = area:index(x + i, y + j, z + k) - data[vil] = c_wsacleaf - end - end - end - end - elseif j == 5 then - for i = -2, 2, 4 do - for k = -2, 2, 4 do - local vit = area:index(x + i, y + j, z + k) - data[vit] = c_wsactree - end - end - elseif j == 4 then - for i = -1, 1 do - for k = -1, 1 do - if math.abs(i) + math.abs(k) == 2 then - local vit = area:index(x + i, y + j, z + k) - data[vit] = c_wsactree - end - end - end - else - local vit = area:index(x, y + j, z) - data[vit] = c_wsactree - end - end + local c_sapling = minetest.get_content_id("moretrees:acacia_sapling_ongen") + local vi = area:index(x, y, z) + data[vi] = c_sapling end function watershed_flower(data, vi, noise) diff --git a/mods/watershed/init.lua b/mods/watershed/init.lua index d932359a..ed696fd7 100644 --- a/mods/watershed/init.lua +++ b/mods/watershed/init.lua @@ -781,6 +781,7 @@ minetest.register_on_generated(function(minp, maxp, seed) watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data) vm:set_data(data) + vm:set_lighting({day = 0, night = 0}) vm:calc_lighting() vm:write_to_map(data) vm:update_liquids() diff --git a/mods/watershed/nodes.lua b/mods/watershed/nodes.lua index 5ff828a8..cd43830c 100644 --- a/mods/watershed/nodes.lua +++ b/mods/watershed/nodes.lua @@ -2,7 +2,7 @@ minetest.register_alias("watershed:appleleaf", "default:leaves") minetest.register_alias("watershed:appling", "default:sapling") -minetest.register_alias("watershed:acaciatree", "moretrees:acacia_tree") +minetest.register_alias("watershed:acaciatree", "moretrees:acacia_trunk") minetest.register_alias("watershed:acacialeaf", "moretrees:acacia_leaves") @@ -179,20 +179,6 @@ minetest.register_craft({ }, }) -minetest.register_craft({ - output = "watershed:acaciawood 4", - recipe = { - {"watershed:acaciatree"}, - } -}) - -minetest.register_craft({ - output = "watershed:pinewood 4", - recipe = { - {"watershed:pinetree"}, - } -}) - -- Buckets bucket.register_liquid(