Fix water tiles, new jungletrees, set continent parameters

This commit is contained in:
paramat 2014-03-24 02:38:56 +00:00
parent 9f0b9d6137
commit 6c11296eba
4 changed files with 50 additions and 24 deletions

View File

@ -1,4 +1,4 @@
watershed 0.2.10 by paramat
watershed 0.2.11 by paramat
For latest stable Minetest back to 0.4.8
Depends default
Licenses: code WTFPL

View File

@ -66,29 +66,43 @@ end
function watershed_jungletree(x, y, z, area, data)
local c_juntree = minetest.get_content_id("default:jungletree")
local c_wsjunleaf = minetest.get_content_id("watershed:jungleleaf")
local c_wsvine = minetest.get_content_id("watershed:vine")
for j = -5, 17 do
if j == 11 or j == 17 then
for i = -2, 2 do
local c_vine = minetest.get_content_id("watershed:vine")
local top = math.random(17,23)
local branch = math.floor(top * 0.6)
for j = -5, top do
if j == top or j == top - 1 or j == branch + 1 or j == branch + 2 then
for i = -2, 2 do -- leaves
for k = -2, 2 do
local vil = area:index(x + i, y + j + math.random(0, 1), z + k)
local vi = area:index(x + i, y + j, z + k)
if math.random(5) ~= 2 then
data[vil] = c_wsjunleaf
data[vi] = c_wsjunleaf
end
end
end
elseif j >= 0 then
elseif j <= -1 or j == top - 2 or j == branch then -- branches, roots
for i = -1, 1 do
for k = -1, 1 do
if math.abs(i) + math.abs(k) == 1 then
local viv = area:index(x + i, y + j, z + k)
data[viv] = c_wsvine
if math.abs(i) + math.abs(k) == 2 then
local vi = area:index(x + i, y + j, z + k)
data[vi] = c_juntree
end
end
end
end
local vit = area:index(x, y + j, z)
data[vit] = c_juntree
if j >= 0 and j <= top - 3 then -- climbable nodes
for i = -1, 1 do
for k = -1, 1 do
if math.abs(i) + math.abs(k) == 1 then
local vi = area:index(x + i, y + j, z + k)
data[vi] = c_vine
end
end
end
end
if j >= -1 and j <= top - 3 then -- trunk
local vi = area:index(x, y + j, z)
data[vi] = c_juntree
end
end
end

View File

@ -1,32 +1,32 @@
-- watershed 0.2.10 by paramat
-- watershed 0.2.11 by paramat
-- For latest stable Minetest and back to 0.4.8
-- Depends default
-- License: code WTFPL
-- 0.2.10
-- flower colour areas
-- faults and cliffs
-- desert stone as a thin density layer
-- climbable jungletrees
-- 0.2.11
-- water special tiles re-added
-- import jungletrees from rainforest mod
-- XLSAMP set, TERCEN reset, for continent / archipelago testing
-- TODO
-- fog
-- jungletrees from rainforest mod
-- singlenode y = 0 realm option
-- lava, it's own tapering fissure system?
-- Parameters
local YMIN = 6000 -- Approximate base of realm stone
local YMAX = 8000 -- Approximate top of atmosphere / mountains / floatlands
local TERCEN = 6960 -- Terrain 'centre', average seabed level
local TERCEN = 6864 -- Terrain 'centre', average seabed level
local YWAT = 7024 -- Sea level
local YCLOUD = 7152 -- Cloud level
local TERSCA = 384 -- Vertical terrain scale
local XLSAMP = 0 -- Extra large scale height variation amplitude
local XLSAMP = 0.4 -- Extra large scale height variation amplitude
local BASAMP = 0.4 -- Base terrain amplitude
local CANAMP = 0.6 -- Canyon terrain amplitude
local CANEXP = 1.33 -- Canyon shape exponent
local ATANAMP = 1.2 -- Arctan function amplitude, controls size and number of floatlands / caves
local ATANAMP = 1.2 -- Arctan function amplitude, smaller = more and larger floatlands above ridges
local TSTONE = 0.02-- 0.02 -- Density threshold for stone, depth of soil at TERCEN
local TRIV = -0.015 -- Maximum densitybase threshold for river water

View File

@ -151,7 +151,19 @@ minetest.register_node("watershed:water", {
inventory_image = minetest.inventorycube("default_water.png"),
drawtype = "liquid",
tiles = {
{name="default_water_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}}
{
name="default_water_source_animated.png",
animation={type="vertical_frames",
aspect_w=16, aspect_h=16, length=2.0}
}
},
special_tiles = {
{
name="default_water_source_animated.png",
animation={type="vertical_frames",
aspect_w=16, aspect_h=16, length=2.0},
backface_culling = false,
}
},
alpha = WATER_ALPHA,
paramtype = "light",