Compare commits

3 Commits

33 changed files with 1171 additions and 350 deletions

6
README.txt Executable file → Normal file
View File

@ -1,4 +1,4 @@
watershed 0.7.1 by paramat, modified by the MinetestForFun Team. watershed 0.7.2 by paramat
For Minetest 0.4.13 and later For Minetest 0.4.13 and later
Depends default farming darkage Depends default stairs bucket
Licenses: WTFPL Licenses: Source code LGPL (2.1). Media (textures) CC BY-SA (3.0)

4
depends.txt Executable file → Normal file
View File

@ -1,3 +1,3 @@
default default
farming bucket
darkage stairs

218
functions.lua Executable file → Normal file
View File

@ -1,60 +1,31 @@
--[[ MFF: Prevent trees from destroying existing blocks
This is the list of "safe" blocks in which a tree can grow
They were moved outside the local safety function for speed (I hope)
--]]
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
-- MFF: The local function to do safety checks
local function safely_set_block(t, k, v)
if t[k] == c_air or t[k] == c_ignore then
t[k] = v
end
end
function watershed_appletree(x, y, z, area, data) function watershed_appletree(x, y, z, area, data)
local c_tree = minetest.get_content_id("default:tree") local c_tree = minetest.get_content_id("default:tree")
local c_apple = minetest.get_content_id("default:apple") local c_apple = minetest.get_content_id("default:apple")
local c_wsappleaf = minetest.get_content_id("watershed:appleleaf") local c_wsappleaf = minetest.get_content_id("watershed:appleleaf")
for j = -2, 4 do
-- MFF: Higher default tree with a bit of randomness if j == 3 or j == 4 then
local tree_top = 5 + math.random(0, 1)
local leaves_height = tree_top - 1
local branches_height = leaves_height - 1
for j = 0, tree_top do -- MFF: Higher tree, same design
if j >= leaves_height then
for i = -2, 2 do for i = -2, 2 do
for k = -2, 2 do for k = -2, 2 do
local vil = area:index(x + i, y + j, z + k) local vil = area:index(x + i, y + j, z + k)
if math.random(64) == 2 then if math.random(64) == 2 then
-- MFF: Prevent trees from destroying existing blocks data[vil] = c_apple
safely_set_block(data, vil, c_apple)
elseif math.random(5) ~= 2 then elseif math.random(5) ~= 2 then
-- MFF: Prevent trees from destroying existing blocks data[vil] = c_wsappleaf
safely_set_block(data, vil, c_wsappleaf)
end end
end end
end end
elseif j == branches_height then elseif j == 2 then
for i = -1, 1 do for i = -1, 1 do
for k = -1, 1 do for k = -1, 1 do
if math.abs(i) + math.abs(k) == 2 then if math.abs(i) + math.abs(k) == 2 then
local vit = area:index(x + i, y + j, z + k) local vit = area:index(x + i, y + j, z + k)
-- MFF: Prevent trees from destroying existing blocks data[vit] = c_tree
safely_set_block(data, vit, c_tree)
end end
end end
end end
else else
local vit = area:index(x, y + j, z) local vit = area:index(x, y + j, z)
-- MFF: Prevent trees from destroying existing blocks data[vit] = c_tree
if j == 0 then
-- MFF: the position of the sapling itself, replace it without checking.
data[vit] = c_tree
else
safely_set_block(data, vit, c_tree)
end
end end
end end
end end
@ -63,17 +34,16 @@ function watershed_pinetree(x, y, z, area, data)
local c_wspitree = minetest.get_content_id("watershed:pinetree") local c_wspitree = minetest.get_content_id("watershed:pinetree")
local c_wsneedles = minetest.get_content_id("watershed:needles") local c_wsneedles = minetest.get_content_id("watershed:needles")
local c_snowblock = minetest.get_content_id("default:snowblock") local c_snowblock = minetest.get_content_id("default:snowblock")
for j = 0, 14 do for j = -4, 14 do
if j == 3 or j == 6 or j == 9 or j == 12 then if j == 3 or j == 6 or j == 9 or j == 12 then
for i = -2, 2 do for i = -2, 2 do
for k = -2, 2 do for k = -2, 2 do
if math.abs(i) == 2 or math.abs(k) == 2 then if math.abs(i) == 2 or math.abs(k) == 2 then
if math.random(7) ~= 2 then if math.random(7) ~= 2 then
-- MFF: Prevent trees from destroying existing blocks
local vil = area:index(x + i, y + j, z + k) local vil = area:index(x + i, y + j, z + k)
safely_set_block(data, vil, c_wsneedles) data[vil] = c_wsneedles
local vila = area:index(x + i, y + j + 1, z + k) local vila = area:index(x + i, y + j + 1, z + k)
safely_set_block(data, vila, c_snowblock) data[vila] = c_snowblock
end end
end end
end end
@ -83,11 +53,10 @@ function watershed_pinetree(x, y, z, area, data)
for k = -1, 1 do for k = -1, 1 do
if not (i == 0 and j == 0) then if not (i == 0 and j == 0) then
if math.random(11) ~= 2 then if math.random(11) ~= 2 then
-- MFF: Prevent trees from destroying existing blocks
local vil = area:index(x + i, y + j, z + k) local vil = area:index(x + i, y + j, z + k)
safely_set_block(data, vil, c_wsneedles) data[vil] = c_wsneedles
local vila = area:index(x + i, y + j + 1, z + k) local vila = area:index(x + i, y + j + 1, z + k)
safely_set_block(data, vila, c_snowblock) data[vila] = c_snowblock
end end
end end
end end
@ -96,47 +65,40 @@ function watershed_pinetree(x, y, z, area, data)
for i = -1, 1 do for i = -1, 1 do
for k = -1, 1 do for k = -1, 1 do
if not (i == 0 and j == 0) then if not (i == 0 and j == 0) then
-- MFF: Prevent trees from destroying existing blocks
local vil = area:index(x + i, y + j, z + k) local vil = area:index(x + i, y + j, z + k)
safely_set_block(data, vil,c_wsneedles) data[vil] = c_wsneedles
local vila = area:index(x + i, y + j + 1, z + k) local vila = area:index(x + i, y + j + 1, z + k)
safely_set_block(data, vila, c_wsneedles) data[vila] = c_wsneedles
local vilaa = area:index(x + i, y + j + 2, z + k) local vilaa = area:index(x + i, y + j + 2, z + k)
safely_set_block(data, vilaa, c_snowblock) data[vilaa] = c_snowblock
end end
end end
end end
end end
-- MFF: Prevent trees from destroying existing blocks
local vit = area:index(x, y + j, z) local vit = area:index(x, y + j, z)
if j == 0 then data[vit] = c_wspitree
data[vit] = c_wspitree -- No safety check for the sapling itself
else
safely_set_block(data, vit, c_wspitree)
end
end end
local vil = area:index(x, y + 15, z) local vil = area:index(x, y + 15, z)
local vila = area:index(x, y + 16, z) local vila = area:index(x, y + 16, z)
local vilaa = area:index(x, y + 17, z) local vilaa = area:index(x, y + 17, z)
-- MFF: Prevent trees from destroying existing blocks data[vil] = c_wsneedles
safely_set_block(data, vil, c_wsneedles) data[vila] = c_wsneedles
safely_set_block(data, vila, c_wsneedles) data[vilaa] = c_snowblock
safely_set_block(data, vilaa, c_snowblock)
end end
function watershed_jungletree(x, y, z, area, data) function watershed_jungletree(x, y, z, area, data)
local c_juntree = minetest.get_content_id("default:jungletree") local c_juntree = minetest.get_content_id("default:jungletree")
local c_wsjunleaf = minetest.get_content_id("watershed:jungleleaf") local c_wsjunleaf = minetest.get_content_id("watershed:jungleleaf")
local c_vine = minetest.get_content_id("watershed:vine")
local top = math.random(17,23) local top = math.random(17,23)
local branch = math.floor(top * 0.6) local branch = math.floor(top * 0.6)
for j = 0, top do for j = -5, top do
if j == top or j == top - 1 or j == branch + 1 or j == branch + 2 then if j == top or j == top - 1 or j == branch + 1 or j == branch + 2 then
for i = -2, 2 do -- leaves for i = -2, 2 do -- leaves
for k = -2, 2 do for k = -2, 2 do
local vi = area:index(x + i, y + j, z + k) local vi = area:index(x + i, y + j, z + k)
if math.random(5) ~= 2 then if math.random(5) ~= 2 then
-- MFF: Prevent trees from destroying existing blocks data[vi] = c_wsjunleaf
safely_set_block(data, vi, c_wsjunleaf)
end end
end end
end end
@ -145,28 +107,64 @@ function watershed_jungletree(x, y, z, area, data)
for k = -1, 1 do for k = -1, 1 do
if math.abs(i) + math.abs(k) == 2 then if math.abs(i) + math.abs(k) == 2 then
local vi = area:index(x + i, y + j, z + k) local vi = area:index(x + i, y + j, z + k)
-- MFF: Prevent trees from destroying existing blocks data[vi] = c_juntree
safely_set_block(data, vi, c_juntree) end
end
end
end
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
end end
end end
if j <= top - 3 then -- trunk if j <= top - 3 then -- trunk
local vi = area:index(x, y + j, z) local vi = area:index(x, y + j, z)
-- MFF: Prevent trees from destroying existing blocks data[vi] = c_juntree
if j == 0 then
data[vi] = c_juntree -- No safety check for the sapling itself
else
safely_set_block(data, vi, c_juntree)
end
end end
end end
end end
function watershed_acaciatree(x, y, z, area, data) function watershed_acaciatree(x, y, z, area, data)
local c_sapling = minetest.get_content_id("moretrees:acacia_sapling_ongen") local c_wsactree = minetest.get_content_id("watershed:acaciatree")
local vi = area:index(x, y, z) local c_wsacleaf = minetest.get_content_id("watershed:acacialeaf")
data[vi] = c_sapling 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
end end
function watershed_flower(data, vi, noise) function watershed_flower(data, vi, noise)
@ -193,7 +191,7 @@ end
function watershed_cactus(x, y, z, area, data) function watershed_cactus(x, y, z, area, data)
local c_wscactus = minetest.get_content_id("watershed:cactus") local c_wscactus = minetest.get_content_id("watershed:cactus")
for j = 0, 4 do for j = -2, 4 do
for i = -2, 2 do for i = -2, 2 do
if i == 0 or j == 2 or (j == 3 and math.abs(i) == 2) then if i == 0 or j == 2 or (j == 3 and math.abs(i) == 2) then
local vic = area:index(x + i, y + j, z) local vic = area:index(x + i, y + j, z)
@ -212,21 +210,29 @@ function watershed_papyrus(x, y, z, area, data)
end end
end end
-- Singlenode option
local SINGLENODE = true -- ABM
if SINGLENODE then -- Lava-water cooling
-- Set mapgen parameters
minetest.set_mapgen_params({mgname="singlenode", flags="nolight"}) minetest.register_abm({
nodenames = {"group:lava"},
-- Spawn player function is useless in minetestforfun neighbors = {"group:water"},
end interval = 11,
chance = 64,
action = function(pos)
minetest.add_node(pos, {name = "default:obsidian"})
minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25})
end,
})
-- Appletree sapling -- Appletree sapling
function default.grow_tree(pos) minetest.register_abm({
nodenames = {"watershed:appling"},
interval = 57,
chance = 3,
action = function(pos, node)
local x = pos.x local x = pos.x
local y = pos.y local y = pos.y
local z = pos.z local z = pos.z
@ -240,11 +246,16 @@ end
vm:set_data(data) vm:set_data(data)
vm:write_to_map() vm:write_to_map()
vm:update_map() vm:update_map()
end end,
})
-- Pine sapling -- Pine sapling
function default.grow_pine_tree(pos) minetest.register_abm({
nodenames = {"watershed:pineling"},
interval = 59,
chance = 3,
action = function(pos)
local x = pos.x local x = pos.x
local y = pos.y local y = pos.y
local z = pos.z local z = pos.z
@ -252,19 +263,45 @@ end
local pos1 = {x = x - 2, y = y - 4, z = z - 2} local pos1 = {x = x - 2, y = y - 4, z = z - 2}
local pos2 = {x = x + 2, y = y + 17, z = z + 2} local pos2 = {x = x + 2, y = y + 17, z = z + 2}
local emin, emax = vm:read_from_map(pos1, pos2) local emin, emax = vm:read_from_map(pos1, pos2)
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax}) local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
local data = vm:get_data() local data = vm:get_data()
watershed_pinetree(x, y, z, area, data) watershed_pinetree(x, y, z, area, data)
vm:set_data(data) vm:set_data(data)
vm:write_to_map() vm:write_to_map()
vm:update_map() vm:update_map()
end end,
})
-- Acacia sapling is already defined in Moretrees -- Acacia sapling
minetest.register_abm({
nodenames = {"watershed:acacialing"},
interval = 61,
chance = 3,
action = function(pos)
local x = pos.x
local y = pos.y
local z = pos.z
local vm = minetest.get_voxel_manip()
local pos1 = {x = x - 4, y = y - 3, z = z - 4}
local pos2 = {x = x + 4, y = y + 6, z = z + 4}
local emin, emax = vm:read_from_map(pos1, pos2)
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
local data = vm:get_data()
watershed_acaciatree(x, y, z, area, data)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
end,
})
-- Jungletree sapling -- Jungletree sapling
function default.grow_jungle_tree(pos) minetest.register_abm({
nodenames = {"watershed:jungling"},
interval = 63,
chance = 3,
action = function(pos)
local x = pos.x local x = pos.x
local y = pos.y local y = pos.y
local z = pos.z local z = pos.z
@ -278,8 +315,5 @@ end
vm:set_data(data) vm:set_data(data)
vm:write_to_map() vm:write_to_map()
vm:update_map() vm:update_map()
end end,
})
default.grow_new_apple_tree = default.grow_tree
default.grow_new_jungle_tree = default.grow_jungle_tree
default.grow_new_pine_tree = default.grow_pine_tree

525
init.lua Executable file → Normal file
View File

@ -1,5 +1,6 @@
-- Parameters -- Parameters
local SINGLENODE = true -- Use singlenode mapgen and spawnplayer function
local YMIN = -33000 -- Approximate base of realm stone local YMIN = -33000 -- Approximate base of realm stone
local YMAX = 33000 -- Approximate top of atmosphere / mountains / floatlands local YMAX = 33000 -- Approximate top of atmosphere / mountains / floatlands
local TERCEN = -128 -- Terrain zero level, average seabed local TERCEN = -128 -- Terrain zero level, average seabed
@ -38,6 +39,7 @@ local biomeparams = {
ICETET = -0.7, -- Ice .. ICETET = -0.7, -- Ice ..
HIHUT = 0.35, -- High humidity threshold HIHUT = 0.35, -- High humidity threshold
LOHUT = -0.35, -- Low .. LOHUT = -0.35, -- Low ..
FOGHUT = 1.0, -- Fog ..
BLEND = 0.02, -- Biome blend randomness BLEND = 0.02, -- Biome blend randomness
} }
@ -48,172 +50,129 @@ local flora = {
GRACHA = 36, -- Grassland grasses GRACHA = 36, -- Grassland grasses
JUTCHA = 16, -- Jungletree JUTCHA = 16, -- Jungletree
JUGCHA = 16, -- Junglegrass JUGCHA = 16, -- Junglegrass
CACCHA = 800, -- Cactus CACCHA = 2209, -- Cactus
CACCHA_DRYGRASS = 1600, DRYCHA = 121, -- Dry shrub
DRYCHA = 150, -- Dry shrub
ACACHA = 1369, -- Acacia tree ACACHA = 1369, -- Acacia tree
GOGCHA = 9, -- Golden grass GOGCHA = 9, -- Golden grass
PAPCHA = 4, -- Papyrus PAPCHA = 4, -- Papyrus
DUGCHA = 16, -- Dune grass DUGCHA = 16, -- Dune grass
} }
local np = {
-- pack it in a single table to avoid "function has more than 60 upvalues"
-- 3D noises -- 3D noises
-- 3D noise for terrain -- 3D noise for terrain
terrain = { local np_terrain = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 384, y = 192, z = 384}, spread = {x = 384, y = 192, z = 384},
seed = 593, seed = 593,
octaves = 5, octaves = 5,
persist = 0.67 persist = 0.67
}, }
-- 3D noise for fissures -- 3D noise for fissures
fissure = { local np_fissure = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 256, y = 512, z = 256}, spread = {x = 256, y = 512, z = 256},
seed = 20099, seed = 20099,
octaves = 5, octaves = 5,
persist = 0.5 persist = 0.5
}, }
-- 3D noise for temperature
local np_temp = {
offset = 0,
scale = 1,
spread = {x = 1024, y = 1024, z = 1024},
seed = 9130,
octaves = 3,
persist = 0.5
}
-- 3D noise for humidity
local np_humid = {
offset = 0,
scale = 1,
spread = {x = 1024, y = 1024, z = 1024},
seed = -55500,
octaves = 3,
persist = 0.5
}
-- 3D noise for ore seam networks -- 3D noise for ore seam networks
seam = { local np_seam = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 512, y = 512, z = 512}, spread = {x = 512, y = 512, z = 512},
seed = -992221, seed = -992221,
octaves = 2, octaves = 2,
persist = 0.5 persist = 0.5
}, }
-- 3D noise for rock strata inclination -- 3D noise for rock strata inclination
strata = { local np_strata = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 512, y = 512, z = 512}, spread = {x = 512, y = 512, z = 512},
seed = 92219, seed = 92219,
octaves = 3, octaves = 3,
persist = 0.5 persist = 0.5
}, }
-- 3D noises for caves, from Valleys Mapgen mod by Gael-de-Sailly
cave1 = {
offset = 0,
scale = 1,
spread = {x = 32, y = 32, z = 32},
seed = -4640,
octaves = 4,
persist = 0.5
},
cave2 = {
offset = 0,
scale = 1,
seed = 8804,
spread = {x = 32, y = 32, z = 32},
octaves = 4,
persist = 0.5
},
cave3 = {
offset = 0,
scale = 1,
seed = -4780,
spread = {x = 32, y = 32, z = 32},
octaves = 4,
persist = 0.5
},
cave4 = {
offset = 0,
scale = 1,
seed = -9969,
spread = {x = 32, y = 32, z = 32},
octaves = 4,
persist = 0.5
},
-- 2D noises -- 2D noises
-- 2D noise for mid terrain / streambed height -- 2D noise for mid terrain / streambed height
mid = { local np_mid = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 768, y = 768, z = 768}, spread = {x = 768, y = 768, z = 768},
seed = 85546, seed = 85546,
octaves = 5, octaves = 5,
persist = 0.5 persist = 0.5
}, }
-- 2D noise for base terrain / riverbed height -- 2D noise for base terrain / riverbed height
base = { local np_base = {
offset = 0,
scale = 1,
spread = {x = 1024, y = 1024, z = 1024},
seed = 8890,
octaves = 3,
persist = 0.33
},
-- 2D noise for extra large scale height variation
xlscale = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 4096, y = 4096, z = 4096}, spread = {x = 4096, y = 4096, z = 4096},
seed = 8890,
octaves = 3,
persist = 0.33
}
-- 2D noise for extra large scale height variation
local np_xlscale = {
offset = 0,
scale = 1,
spread = {x = 8192, y = 8192, z = 8192},
seed = -72, seed = -72,
octaves = 3, octaves = 3,
persist = 0.33 persist = 0.33
}, }
-- 2D noise for magma surface -- 2D noise for magma surface
magma = { local np_magma = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 128, y = 128, z = 128}, spread = {x = 128, y = 128, z = 128},
seed = -13, seed = -13,
octaves = 2, octaves = 2,
persist = 0.5 persist = 0.5
},
-- 2D noise for temperature, the same than in Plantlife and Snowdrift
temp = {
offset = 0,
scale = 1,
spread = {x = 256, y = 256, z = 256},
seed = 112,
octaves = 3,
persist = 0.5
},
-- 2D noise for humidity
humid = {
offset = 0,
scale = 1,
spread = {x = 256, y = 256, z = 256},
seed = 72384,
octaves = 4,
persist = 0.66
},
} }
-- Do files -- Do files
dofile(minetest.get_modpath("watershed") .. "/nodes.lua") dofile(minetest.get_modpath("watershed") .. "/nodes.lua")
@ -228,11 +187,6 @@ local nobj_humid = nil
local nobj_seam = nil local nobj_seam = nil
local nobj_strata = nil local nobj_strata = nil
local nobj_cave1 = nil
local nobj_cave2 = nil
local nobj_cave3 = nil
local nobj_cave4 = nil
local nobj_mid = nil local nobj_mid = nil
local nobj_base = nil local nobj_base = nil
local nobj_xlscale = nil local nobj_xlscale = nil
@ -241,27 +195,26 @@ local nobj_magma = nil
-- Localise noise buffers -- Localise noise buffers
local nbuf_terrain local nbuf_terrain = {}
local nbuf_fissure local nbuf_fissure = {}
local nbuf_temp local nbuf_temp = {}
local nbuf_humid local nbuf_humid = {}
local nbuf_seam local nbuf_seam = {}
local nbuf_strata local nbuf_strata = {}
local nbuf_cave1 local nbuf_mid = {}
local nbuf_cave2 local nbuf_base = {}
local nbuf_cave3 local nbuf_xlscale = {}
local nbuf_cave4 local nbuf_magma = {}
local nbuf_mid
local nbuf_base -- Localise data buffer
local nbuf_xlscale
local nbuf_magma local dbuf = {}
-- Mapchunk generation function -- Mapchunk generation function
local global_seed
function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data) function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
local c_air = minetest.get_content_id("air") local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore") local c_ignore = minetest.get_content_id("ignore")
@ -292,6 +245,7 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
local c_obsidian = minetest.get_content_id("default:obsidian") local c_obsidian = minetest.get_content_id("default:obsidian")
local c_wsfreshwater = minetest.get_content_id("watershed:freshwater") local c_wsfreshwater = minetest.get_content_id("watershed:freshwater")
local c_wsmixwater = minetest.get_content_id("watershed:mixwater")
local c_wsstone = minetest.get_content_id("watershed:stone") local c_wsstone = minetest.get_content_id("watershed:stone")
local c_wsredstone = minetest.get_content_id("watershed:redstone") local c_wsredstone = minetest.get_content_id("watershed:redstone")
local c_wsgrass = minetest.get_content_id("watershed:grass") local c_wsgrass = minetest.get_content_id("watershed:grass")
@ -301,52 +255,42 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
local c_wspermafrost = minetest.get_content_id("watershed:permafrost") local c_wspermafrost = minetest.get_content_id("watershed:permafrost")
local c_wslava = minetest.get_content_id("watershed:lava") local c_wslava = minetest.get_content_id("watershed:lava")
local c_wsfreshice = minetest.get_content_id("watershed:freshice") local c_wsfreshice = minetest.get_content_id("watershed:freshice")
local c_wscloud = minetest.get_content_id("air") -- disable clouds local c_wscloud = minetest.get_content_id("watershed:cloud")
local c_wsluxore = minetest.get_content_id("watershed:luxore")
local c_wsicydirt = minetest.get_content_id("watershed:icydirt") local c_wsicydirt = minetest.get_content_id("watershed:icydirt")
-- perlinmap stuff -- perlinmap stuff
local sidelen = x1 - x0 + 1 local sidelen = x1 - x0 + 1
local sqr_sidelen = sidelen ^ 2
local chulensxyz = {x = sidelen, y = sidelen + 2, z = sidelen} local chulensxyz = {x = sidelen, y = sidelen + 2, z = sidelen}
local chulensxz = {x = sidelen, y = sidelen, z = 1} local chulensxz = {x = sidelen, y = sidelen, z = 1}
local minposxyz = {x = x0, y = y0 - 1, z = z0} local minposxyz = {x = x0, y = y0 - 1, z = z0}
local minposxz = {x = x0, y = z0} local minposxz = {x = x0, y = z0}
-- 3D and 2D noise objects created once on first mapchunk generation only -- 3D and 2D noise objects created once on first mapchunk generation only
nobj_terrain = nobj_terrain or minetest.get_perlin_map(np.terrain, chulensxyz) nobj_terrain = nobj_terrain or minetest.get_perlin_map(np_terrain, chulensxyz)
nobj_fissure = nobj_fissure or minetest.get_perlin_map(np.fissure, chulensxyz) nobj_fissure = nobj_fissure or minetest.get_perlin_map(np_fissure, chulensxyz)
nobj_temp = nobj_temp or minetest.get_perlin_map(np.temp, chulensxyz) nobj_temp = nobj_temp or minetest.get_perlin_map(np_temp, chulensxyz)
nobj_humid = nobj_humid or minetest.get_perlin_map(np.humid, chulensxyz) nobj_humid = nobj_humid or minetest.get_perlin_map(np_humid, chulensxyz)
nobj_seam = nobj_seam or minetest.get_perlin_map(np.seam, chulensxyz) nobj_seam = nobj_seam or minetest.get_perlin_map(np_seam, chulensxyz)
nobj_strata = nobj_strata or minetest.get_perlin_map(np.strata, chulensxyz) nobj_strata = nobj_strata or minetest.get_perlin_map(np_strata, chulensxyz)
nobj_cave1 = nobj_cave1 or minetest.get_perlin_map(np.cave1, chulensxyz) nobj_mid = nobj_mid or minetest.get_perlin_map(np_mid, chulensxz)
nobj_cave2 = nobj_cave2 or minetest.get_perlin_map(np.cave2, chulensxyz) nobj_base = nobj_base or minetest.get_perlin_map(np_base, chulensxz)
nobj_cave3 = nobj_cave3 or minetest.get_perlin_map(np.cave3, chulensxyz) nobj_xlscale = nobj_xlscale or minetest.get_perlin_map(np_xlscale, chulensxz)
nobj_cave4 = nobj_cave4 or minetest.get_perlin_map(np.cave4, chulensxyz) nobj_magma = nobj_magma or minetest.get_perlin_map(np_magma, chulensxz)
nobj_mid = nobj_mid or minetest.get_perlin_map(np.mid, chulensxz)
nobj_base = nobj_base or minetest.get_perlin_map(np.base, chulensxz)
nobj_xlscale = nobj_xlscale or minetest.get_perlin_map(np.xlscale, chulensxz)
nobj_magma = nobj_magma or minetest.get_perlin_map(np.magma, chulensxz)
-- 3D and 2D perlinmaps created per mapchunk -- 3D and 2D perlinmaps created per mapchunk
local nvals_terrain = nobj_terrain:get3dMap_flat(minposxyz) local nvals_terrain = nobj_terrain:get3dMap_flat(minposxyz, nbuf_terrain)
local nvals_fissure = nobj_fissure:get3dMap_flat(minposxyz) local nvals_fissure = nobj_fissure:get3dMap_flat(minposxyz, nbuf_fissure)
local nvals_temp = nobj_temp :get2dMap_flat(minposxz) local nvals_temp = nobj_temp :get3dMap_flat(minposxyz, nbuf_temp)
local nvals_humid = nobj_humid :get2dMap_flat(minposxz) local nvals_humid = nobj_humid :get3dMap_flat(minposxyz, nbuf_humid)
local nvals_seam = nobj_seam :get3dMap_flat(minposxyz) local nvals_seam = nobj_seam :get3dMap_flat(minposxyz, nbuf_seam)
local nvals_strata = nobj_strata :get3dMap_flat(minposxyz) local nvals_strata = nobj_strata :get3dMap_flat(minposxyz, nbuf_strata)
local nvals_cave1 = nobj_cave1 :get3dMap_flat(minposxyz) local nvals_mid = nobj_mid :get2dMap_flat(minposxz, nbuf_mid)
local nvals_cave2 = nobj_cave2 :get3dMap_flat(minposxyz) local nvals_base = nobj_base :get2dMap_flat(minposxz, nbuf_base)
local nvals_cave3 = nobj_cave3 :get3dMap_flat(minposxyz) local nvals_xlscale = nobj_xlscale:get2dMap_flat(minposxz, nbuf_xlscale)
local nvals_cave4 = nobj_cave4 :get3dMap_flat(minposxyz) local nvals_magma = nobj_magma :get2dMap_flat(minposxz, nbuf_magma)
local nvals_mid = nobj_mid :get2dMap_flat(minposxz)
local nvals_base = nobj_base :get2dMap_flat(minposxz)
local nvals_xlscale = nobj_xlscale:get2dMap_flat(minposxz)
local nvals_magma = nobj_magma :get2dMap_flat(minposxz)
-- ungenerated chunk below? -- ungenerated chunk below?
local viu = area:index(x0, y0 - 1, z0) local viu = area:index(x0, y0 - 1, z0)
@ -368,19 +312,15 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
-- noise values for node -- noise values for node
local n_absterrain = math.abs(nvals_terrain[nixyz]) local n_absterrain = math.abs(nvals_terrain[nixyz])
local n_fissure = nvals_fissure[nixyz] local n_fissure = nvals_fissure[nixyz]
local n_temp = nvals_temp[nixyz]
local n_humid = nvals_humid[nixyz]
local n_seam = nvals_seam[nixyz] local n_seam = nvals_seam[nixyz]
local n_strata = nvals_strata[nixyz] local n_strata = nvals_strata[nixyz]
local n_cave1 = nvals_cave1[nixyz]
local n_cave2 = nvals_cave2[nixyz]
local n_cave3 = nvals_cave3[nixyz]
local n_cave4 = nvals_cave4[nixyz]
local n_absmid = math.abs(nvals_mid[nixz]) local n_absmid = math.abs(nvals_mid[nixz])
local n_absbase = math.abs(nvals_base[nixz]) local n_absbase = math.abs(nvals_base[nixz])
local n_xlscale = nvals_xlscale[nixz] local n_xlscale = nvals_xlscale[nixz]
local n_magma = nvals_magma[nixz] local n_magma = nvals_magma[nixz]
local n_temp = nvals_temp[nixz]
local n_humid = nvals_humid[nixz]
-- get densities -- get densities
local n_invbase = (1 - n_absbase) local n_invbase = (1 - n_absbase)
local terblen = (math.max(n_invbase, 0)) ^ BLENEXP local terblen = (math.max(n_invbase, 0)) ^ BLENEXP
@ -401,8 +341,7 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
local bergdep = math.abs(n_seam) * BERGDEP -- iceberg depth local bergdep = math.abs(n_seam) * BERGDEP -- iceberg depth
local nofis = false -- set fissure bool local nofis = false -- set fissure bool
if math.abs(n_fissure) >= TFIS if math.abs(n_fissure) >= TFIS then
and n_cave1 ^ 2 + n_cave2 ^ 2 + n_cave3 ^ 2 + n_cave4 ^ 2 >= 0.07 then -- from Valleys Mapgen
nofis = true nofis = true
end end
@ -454,6 +393,7 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
or nodid == c_wsredstone or nodid == c_wsredstone
or nodid == c_wsdirt or nodid == c_wsdirt
or nodid == c_wspermafrost or nodid == c_wspermafrost
or nodid == c_wsluxore
or nodid == c_sand or nodid == c_sand
or nodid == c_desand or nodid == c_desand
or nodid == c_mese or nodid == c_mese
@ -501,20 +441,54 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
or (densityper >= 0.77 and densityper <= 0.79) or (densityper >= 0.77 and densityper <= 0.79)
or (densityper >= 0.84 and densityper <= 0.87) or (densityper >= 0.84 and densityper <= 0.87)
or (densityper >= 0.95 and densityper <= 0.98) then or (densityper >= 0.95 and densityper <= 0.98) then
if y > -84 and (y >= -80 or math.random() > 0.5) then data[vi] = c_sandstone
data[vi] = c_sandstone
else
data[vi] = c_wsstone
end
elseif biome == 7 and density < TSTONE * 3 then elseif biome == 7 and density < TSTONE * 3 then
-- desert stone as surface layer -- desert stone as surface layer
data[vi] = c_wsredstone data[vi] = c_wsredstone
elseif math.abs(n_seam) < TSEAM then elseif math.abs(n_seam) < TSEAM then
-- ore seams -- ore seams
if densityper >= 0 and
if densityper >= 0.55 and densityper <= 0.55 + ORETHI * 2 then densityper <= ORETHI * 4 then
data[vi] = c_stocoal
elseif densityper >= 0.3 and
densityper <= 0.3 + ORETHI * 4 then
data[vi] = c_stocoal
elseif densityper >= 0.5 and
densityper <= 0.5 + ORETHI * 4 then
data[vi] = c_stocoal
elseif densityper >= 0.8 and
densityper <= 0.8 + ORETHI * 4 then
data[vi] = c_stocoal
elseif densityper >= 0.55 and
densityper <= 0.55 + ORETHI * 2 then
data[vi] = c_gravel data[vi] = c_gravel
elseif densityper >= 0.1 and
densityper <= 0.1 + ORETHI * 2 then
data[vi] = c_wsluxore
elseif densityper >= 0.2 and
densityper <= 0.2 + ORETHI * 2 and
math.random(2) == 2 then
data[vi] = c_stoiron
elseif densityper >= 0.65 and
densityper <= 0.65 + ORETHI * 2 and
math.random(2) == 2 then
data[vi] = c_stoiron
elseif densityper >= 0.4 and
densityper <= 0.4 + ORETHI * 2 and
math.random(3) == 2 then
data[vi] = c_stocopp
elseif densityper >= 0.6 and
densityper <= 0.6 + ORETHI and
math.random(5) == 2 then
data[vi] = c_stogold
elseif densityper >= 0.7 and
densityper <= 0.7 + ORETHI and
math.random(7) == 2 then
data[vi] = c_mese
elseif densityper >= 0.9 and
densityper <= 0.9 + ORETHI and
math.random(11) == 2 then
data[vi] = c_stodiam
else else
data[vi] = c_wsstone data[vi] = c_wsstone
end end
@ -524,8 +498,7 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
stable[si] = stable[si] + 1 stable[si] = stable[si] + 1
under[si] = 0 under[si] = 0
-- fine materials -- fine materials
elseif density >= 0 and density < tstone and stable[si] >= 2 then
elseif density >= 0 and density < tstone and stable[si] >= 2 then -- fine materials
if y == YWAT - 2 and math.abs(n_temp) < 0.05 then -- clay if y == YWAT - 2 and math.abs(n_temp) < 0.05 then -- clay
data[vi] = c_clay data[vi] = c_clay
elseif y <= ysand then -- seabed/beach/dune sand not cut by fissures elseif y <= ysand then -- seabed/beach/dune sand not cut by fissures
@ -572,7 +545,7 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
end end
elseif y >= YWAT - bergdep and y <= YWAT + bergdep / 8 -- icesheet elseif y >= YWAT - bergdep and y <= YWAT + bergdep / 8 -- icesheet
and n_temp < biomeparams.ICETET and density < tstone and n_temp < biomeparams.ICETET and density < tstone
and nofis then and math.abs(n_fissure) > 0.01 then
data[vi] = c_ice data[vi] = c_ice
under[si] = 12 under[si] = 12
stable[si] = 0 stable[si] = 0
@ -580,28 +553,33 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
data[vi] = c_water data[vi] = c_water
under[si] = 0 under[si] = 0
stable[si] = 0 stable[si] = 0
-- river water not in fissures -- river water not in fissures
elseif densitybase >= triver and density < tstone then elseif densitybase >= triver and density < tstone then
if n_temp < biomeparams.ICETET then if n_temp < biomeparams.ICETET then
data[vi] = c_wsfreshice data[vi] = c_wsfreshice
else else
data[vi] = c_wsfreshwater if y == YWAT + 1 then
data[vi] = c_wsmixwater
else
data[vi] = c_wsfreshwater
end
end end
stable[si] = 0 stable[si] = 0
under[si] = 0 under[si] = 0
-- stream water not in fissures -- stream water not in fissures
elseif densitymid >= tstream and density < tstone then elseif densitymid >= tstream and density < tstone then
if n_temp < biomeparams.ICETET then if n_temp < biomeparams.ICETET then
data[vi] = c_wsfreshice data[vi] = c_wsfreshice
else else
data[vi] = c_wsfreshwater if y == YWAT + 1 then
data[vi] = c_wsmixwater
else
data[vi] = c_wsfreshwater
end
end end
stable[si] = 0 stable[si] = 0
under[si] = 0 under[si] = 0
-- air above surface node -- air above surface node
elseif density < 0 and y >= YWAT and under[si] ~= 0 then elseif density < 0 and y >= YWAT and under[si] ~= 0 then
local fnoise = n_fissure -- noise for flower colours local fnoise = n_fissure -- noise for flower colours
if under[si] == 1 then if under[si] == 1 then
@ -621,9 +599,7 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
end end
elseif under[si] == 4 then elseif under[si] == 4 then
data[viu] = c_wsdrygrass data[viu] = c_wsdrygrass
if math.random(flora.CACCHA_DRYGRASS) == 2 then if math.random(flora.DRYCHA) == 2 then
watershed_cactus(x, y, z, area, data)
elseif math.random(flora.DRYCHA) == 2 then
data[vi] = c_dryshrub data[vi] = c_dryshrub
end end
elseif under[si] == 5 then elseif under[si] == 5 then
@ -684,12 +660,28 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
end end
stable[si] = 0 stable[si] = 0
under[si] = 0 under[si] = 0
elseif density < 0 and densitymid > TFOG and
n_humid > biomeparams.FOGHUT then -- fog
data[vi] = c_wscloud
stable[si] = 0
under[si] = 0
elseif density < 0 and CLOUDS and y == y1 and y >= YCLOMIN then -- clouds
local xrq = 16 * math.floor((x - x0) / 16) -- quantise to 16x16 lattice
local zrq = 16 * math.floor((z - z0) / 16)
local yrq = 79
local qixyz = zrq * 6400 + yrq * 80 + xrq + 1 -- quantised 3D index
if math.abs(nvals_fissure[qixyz]) < nvals_humid[qixyz] * 0.1 then
data[vi] = c_wscloud
end
stable[si] = 0
under[si] = 0
else -- air else -- air
stable[si] = 0 stable[si] = 0
under[si] = 0 under[si] = 0
end end
elseif y == y1 + 1 then -- plane of nodes above chunk elseif y == y1 + 1 then -- plane of nodes above chunk
if density < 0 and y >= YWAT and under[si] ~= 0 then -- if air above fine materials -- if air above fine materials
if density < 0 and y >= YWAT and under[si] ~= 0 then
if under[si] == 1 then -- add surface nodes to chunk top layer if under[si] == 1 then -- add surface nodes to chunk top layer
data[viu] = c_wsicydirt data[viu] = c_wsicydirt
elseif under[si] == 2 then elseif under[si] == 2 then
@ -720,15 +712,57 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
end end
nixz = nixz + sidelen nixz = nixz + sidelen
end end
darkage_mapgen(data, area, {x=x0, y=y0, z=z0}, {x=x1, y=y1, z=z1}, global_seed) -- Generate darkage ores
end end
-- Regenerate chunk by chat command. Dependant on chunksize = 5.
minetest.register_chatcommand("regen",{
description = "Regenerate player's current mapchunk",
privs = {server = true, rollback = true},
func = function(name, params)
local t1 = os.clock()
local player = minetest.get_player_by_name(name)
local pos = player:getpos()
local plax = math.floor(pos.x + 0.5)
local play = math.floor(pos.y + 0.5)
local plaz = math.floor(pos.z + 0.5)
local x0 = (80 * math.floor((plax + 32) / 80)) - 32
local y0 = (80 * math.floor((play + 32) / 80)) - 32
local z0 = (80 * math.floor((plaz + 32) / 80)) - 32
local x1 = x0 + 79
local y1 = y0 + 79
local z1 = z0 + 79
if y0 < YMIN or y1 > YMAX then
return
end
print ("[watershed] regenerate mapchunk")
local vm = minetest.get_voxel_manip()
local pos1 = {x = x0, y = y0 - 1, z = z0}
local pos2 = {x = x1, y = y1 + 1, z = z1}
local emin, emax = vm:read_from_map(pos1, pos2)
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
local data = vm:get_data(dbuf)
watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
vm:set_data(data)
vm:write_to_map()
vm:update_map()
local chugent = math.ceil((os.clock() - t1) * 1000)
print ("[watershed] " .. chugent .. " ms")
end
})
-- On generated function -- On generated function
minetest.register_on_generated(function(minp, maxp, seed) minetest.register_on_generated(function(minp, maxp, seed)
global_seed = seed
if minp.y < YMIN or maxp.y > YMAX then if minp.y < YMIN or maxp.y > YMAX then
return return
end end
@ -742,18 +776,16 @@ minetest.register_on_generated(function(minp, maxp, seed)
local y0 = minp.y local y0 = minp.y
local z0 = minp.z local z0 = minp.z
print ("[watershed] generate mapchunk minp (" .. x0 .. " " .. y0 .. " " .. z0 .. ")")
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local area = VoxelArea:new{MinEdge = emin, MaxEdge = emax} local area = VoxelArea:new{MinEdge = emin, MaxEdge = emax}
local data = vm:get_data() local data = vm:get_data(dbuf)
watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data) watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
vm:set_data(data) vm:set_data(data)
minetest.generate_ores(vm, minp, maxp) if not SINGLENODE then
minetest.generate_decorations(vm, minp, maxp) vm:set_lighting({day = 0, night = 0}) -- remove incorrect precalculated light
vm:set_lighting({day = 0, night = 0}) end
vm:calc_lighting() vm:calc_lighting()
vm:write_to_map(data) vm:write_to_map(data)
vm:update_liquids() vm:update_liquids()
@ -762,21 +794,110 @@ minetest.register_on_generated(function(minp, maxp, seed)
print ("[watershed] " .. chugent .. " ms") print ("[watershed] " .. chugent .. " ms")
end) end)
default.register_ores()
farming.register_mgv6_decorations() -- Singlenode option
-- cherry tree
minetest.register_decoration({ if SINGLENODE then
deco_type = "simple", -- Set mapgen parameters
place_on = "default:dirt_with_grass",
sidelen = 16, minetest.set_mapgen_params({mgname = "singlenode", flags = "nolight"})
noise_params = {
offset = 0,
scale = 0.005, -- Spawn player function. Requires chunksize = 80 nodes (the default)
spread = {x=100, y=100, z=100},
seed = 278, function spawnplayer(player)
octaves = 2, local xsp
persist = 0.7 local ysp
}, local zsp
decoration = "default:mg_cherry_sapling",
height = 1, local nobj_terrain = nil
}) local nobj_mid = nil
local nobj_base = nil
local nobj_xlscale = nil
local nbuf_terrain
local nbuf_mid
local nbuf_base
local nbuf_xlscale
for chunk = 1, 128 do
print ("[watershed] searching for spawn "..chunk)
local x0 = 80 * math.random(-32, 32) - 32
local z0 = 80 * math.random(-32, 32) - 32
local y0 = -32
local x1 = x0 + 79
local z1 = z0 + 79
local y1 = 47
local sidelen = 80
local chulensxyz = {x = sidelen, y = sidelen + 2, z = sidelen}
local chulensxz = {x = sidelen, y = sidelen, z = 1}
local minposxyz = {x = x0, y = y0 - 1, z = z0}
local minposxz = {x = x0, y = z0}
nobj_terrain = nobj_terrain or minetest.get_perlin_map(np_terrain, chulensxyz)
nobj_mid = nobj_mid or minetest.get_perlin_map(np_mid, chulensxz)
nobj_base = nobj_base or minetest.get_perlin_map(np_base, chulensxz)
nobj_xlscale = nobj_xlscale or minetest.get_perlin_map(np_xlscale, chulensxz)
local nvals_terrain = nobj_terrain:get3dMap_flat(minposxyz, nbuf_terrain)
local nvals_mid = nobj_mid :get2dMap_flat(minposxz, nbuf_mid)
local nvals_base = nobj_base :get2dMap_flat(minposxz, nbuf_base)
local nvals_xlscale = nobj_xlscale:get2dMap_flat(minposxz, nbuf_xlscale)
local nixz = 1
local nixyz = 1
for z = z0, z1 do
for y = y0, y1 do
for x = x0, x1 do
local n_absterrain = math.abs(nvals_terrain[nixyz])
local n_absmid = math.abs(nvals_mid[nixz])
local n_absbase = math.abs(nvals_base[nixz])
local n_xlscale = nvals_xlscale[nixz]
local n_invbase = (1 - n_absbase)
local terblen = (math.max(n_invbase, 0)) ^ BLENEXP
local grad = math.atan((TERCEN - y) / TERSCA) * ATANAMP
local densitybase = n_invbase * BASAMP + n_xlscale * XLSAMP +
grad
local densitymid = n_absmid * MIDAMP + densitybase
local canexp = 0.5 + terblen * 0.5
local canamp = terblen * CANAMP
local density = n_absterrain ^ canexp * canamp * n_absmid +
densitymid
if y >= 1 and density > -0.005 and density < 0 then
ysp = y + 1
xsp = x
zsp = z
break
end
nixz = nixz + 1
nixyz = nixyz + 1
end
if ysp then
break
end
nixz = nixz - 80
end
if ysp then
break
end
nixz = nixz + 80
end
if ysp then
break
end
end
print ("[watershed] spawn player (" .. xsp .. " " .. ysp .. " " .. zsp .. ")")
player:setpos({x = xsp, y = ysp, z = zsp})
end
minetest.register_on_newplayer(function(player)
spawnplayer(player)
end)
minetest.register_on_respawnplayer(function(player)
spawnplayer(player)
return true
end)
end

57
license.txt Executable file → Normal file
View File

@ -1,14 +1,53 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE License of source code
Version 2, December 2004 ----------------------
GNU Lesser General Public License (2.1)
Copyright (C) 2014-2017 paramat.
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
Everyone is permitted to copy and distribute verbatim or modified This program is distributed in the hope that it will be useful,
copies of this license document, and changing it is allowed as long but WITHOUT ANY WARRANTY; without even the implied warranty of
as the name is changed. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE You should have received a copy of the GNU Lesser General Public License along
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
0. You just DO WHAT THE FUCK YOU WANT TO.
License of media (textures)
---------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2014-2017 paramat
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/

689
nodes.lua Executable file → Normal file
View File

@ -1,37 +1,664 @@
minetest.register_alias("watershed:appleleaf", "default:leaves") minetest.register_node("watershed:appleleaf", {
minetest.register_alias("watershed:appling", "default:sapling") description = "Appletree leaves",
minetest.register_alias("watershed:acaciatree", "moretrees:acacia_trunk") drawtype = "allfaces_optional",
minetest.register_alias("watershed:acacialeaf", "moretrees:acacia_leaves") visual_scale = 1.3,
minetest.register_alias("watershed:acacialing", "moretrees:acacia_sapling") tiles = {"default_leaves.png"},
minetest.register_alias("watershed:pinetree", "default:pine_tree") paramtype = "light",
minetest.register_alias("watershed:needles", "default:pine_needles") is_ground_content = false,
minetest.register_alias("watershed:pineling", "default:pine_sapling") groups = {snappy=3, flammable=2, leaves=1},
minetest.register_alias("watershed:jungleleaf", "default:jungleleaves") drop = {
minetest.register_alias("watershed:jungling", "default:junglesapling") max_items = 1,
items = {
{items = {"watershed:appling"}, rarity = 20},
{items = {"watershed:appleleaf"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_alias("watershed:dirt", "default:dirt") minetest.register_node("watershed:appling", {
minetest.register_alias("watershed:icydirt", "default:dirt_with_grass") description = "Appletree sapling",
minetest.register_alias("watershed:grass", "default:dirt_with_grass") drawtype = "plantlike",
minetest.register_alias("watershed:redstone", "default:desert_stone") visual_scale = 1.0,
minetest.register_alias("watershed:redcobble", "default:desert_cobble") tiles = {"default_sapling.png"},
minetest.register_alias("watershed:stone", "default:stone") inventory_image = "default_sapling.png",
minetest.register_alias("watershed:cactus", "default:cactus") wield_image = "default_sapling.png",
minetest.register_alias("watershed:goldengrass", "default:dry_shrub") paramtype = "light",
minetest.register_alias("watershed:drygrass", "default:dirt_with_dry_grass") walkable = false,
minetest.register_alias("watershed:permafrost", "default:dirt") is_ground_content = false,
minetest.register_alias("watershed:freshice", "default:ice") selection_box = {
minetest.register_alias("watershed:cloud", "default:cloud") type = "fixed",
minetest.register_alias("watershed:luxore", "default:stone") fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
minetest.register_alias("watershed:light", "lantern:lamp") },
minetest.register_alias("watershed:acaciawood", "moretrees:acacia_wood") groups = {snappy = 2, dig_immediate = 3, flammable = 2, attached_node = 1},
minetest.register_alias("watershed:pinewood", "default:pinewood") sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("watershed:acaciatree", {
description = "Acacia tree",
tiles = {"watershed_acaciatreetop.png", "watershed_acaciatreetop.png",
"watershed_acaciatree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node
})
minetest.register_node("watershed:acacialeaf", {
description = "Acacia leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"watershed_acacialeaf.png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"watershed:acacialing"}, rarity = 20},
{items = {"watershed:acacialeaf"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("watershed:acacialing", {
description = "Acacia tree sapling",
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"watershed_acacialing.png"},
inventory_image = "watershed_acacialing.png",
wield_image = "watershed_acacialing.png",
paramtype = "light",
walkable = false,
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("watershed:pinetree", {
description = "Pine tree",
tiles = {"watershed_pinetreetop.png", "watershed_pinetreetop.png",
"watershed_pinetree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node
})
minetest.register_node("watershed:needles", {
description = "Pine needles",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"watershed_needles.png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3},
drop = {
max_items = 1,
items = {
{items = {"watershed:pineling"}, rarity = 20},
{items = {"watershed:needles"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("watershed:pineling", {
description = "Pine sapling",
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"watershed_pineling.png"},
inventory_image = "watershed_pineling.png",
wield_image = "watershed_pineling.png",
paramtype = "light",
walkable = false,
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("watershed:jungleleaf", {
description = "Jungletree leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_jungleleaves.png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"watershed:jungling"}, rarity = 20},
{items = {"watershed:jungleleaf"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("watershed:jungling", {
description = "Jungletree sapling",
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"default_junglesapling.png"},
inventory_image = "default_junglesapling.png",
wield_image = "default_junglesapling.png",
paramtype = "light",
walkable = false,
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("watershed:dirt", {
description = "Dirt",
tiles = {"default_dirt.png"},
is_ground_content = false,
groups = {crumbly = 3, soil = 1},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_node("watershed:icydirt", {
description = "Icy dirt",
tiles = {"watershed_icydirt.png"},
is_ground_content = false,
groups = {crumbly = 1},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_snow_footstep", gain = 0.15},
dug = {name = "default_snow_footstep", gain = 0.45},
}),
})
minetest.register_node("watershed:grass", {
description = "Grass",
tiles = {"default_grass.png", "default_dirt.png", "default_grass.png"},
is_ground_content = false,
groups = {crumbly = 3, soil = 1},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25},
}),
})
minetest.register_node("watershed:redstone", {
description = "Red stone",
tiles = {"default_desert_stone.png"},
is_ground_content = false,
groups = {cracky = 3},
drop = "watershed:redcobble",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("watershed:redcobble", {
description = "Red cobblestone",
tiles = {"watershed_redcobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 2},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("watershed:stone", {
description = "Stone",
tiles = {"default_stone.png"},
is_ground_content = false,
groups = {cracky = 3},
drop = "default:cobble",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("watershed:cactus", {
description = "Cactus",
tiles = {"default_cactus_top.png", "default_cactus_top.png",
"default_cactus_side.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {snappy = 1, choppy = 3, flammable = 2},
drop = "default:cactus",
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node
})
minetest.register_node("watershed:goldengrass", {
description = "Golden grass",
drawtype = "plantlike",
tiles = {"watershed_goldengrass.png"},
inventory_image = "watershed_goldengrass.png",
wield_image = "watershed_goldengrass.png",
paramtype = "light",
walkable = false,
buildable_to = true,
is_ground_content = false,
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
},
})
minetest.register_node("watershed:drygrass", {
description = "Dry grass",
tiles = {"watershed_drygrass.png"},
is_ground_content = false,
groups = {crumbly = 1, soil = 1},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.4},
}),
})
minetest.register_node("watershed:permafrost", {
description = "Permafrost",
tiles = {"watershed_permafrost.png"},
is_ground_content = false,
groups = {crumbly = 1},
drop = "default:dirt",
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_node("watershed:vine", {
description = "Jungletree vine",
drawtype = "airlike",
paramtype = "light",
walkable = false,
climbable = true,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
groups = {not_in_creative_inventory = 1},
})
minetest.register_node("watershed:freshice", {
description = "Fresh ice",
tiles = {"watershed_freshice.png"},
is_ground_content = false,
paramtype = "light",
groups = {cracky = 3},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("watershed:cloud", {
description = "Cloud",
drawtype = "glasslike",
tiles = {"watershed_cloud.png"},
paramtype = "light",
is_ground_content = false,
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
floodable = true,
post_effect_color = {a = 23, r = 241, g = 248, b = 255},
})
minetest.register_node("watershed:luxore", {
description = "Lux ore",
tiles = {"watershed_luxore.png"},
paramtype = "light",
light_source = 14,
groups = {cracky = 3},
drop = "watershed:luxcrystal 8",
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("watershed:light", {
description = "Light",
tiles = {"watershed_light.png"},
paramtype = "light",
light_source = 14,
groups = {cracky = 3},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("watershed:acaciawood", {
description = "Acacia wood planks",
tiles = {"watershed_acaciawood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("watershed:pinewood", {
description = "Pine wood planks",
tiles = {"watershed_pinewood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("watershed:freshwater", {
description = "Freshwater source",
drawtype = "liquid",
tiles = {
{
name = "watershed_freshwateranim.png",
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 2.0}
}
},
special_tiles = {
{
name = "watershed_freshwateranim.png",
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 2.0},
backface_culling = false,
}
},
alpha = WATER_ALPHA,
paramtype = "light",
is_ground_content = false,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "watershed:freshwaterflow",
liquid_alternative_source = "watershed:freshwater",
liquid_viscosity = WATER_VISC,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 64, r = 100, g = 150, b = 200},
groups = {water = 3, liquid = 3, puts_out_fire = 1},
})
minetest.register_node("watershed:freshwaterflow", {
description = "Flowing freshwater",
drawtype = "flowingliquid",
tiles = {"watershed_freshwater.png"},
special_tiles = {
{
image = "watershed_freshwaterflowanim.png",
backface_culling = false,
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 0.8}
},
{
image = "watershed_freshwaterflowanim.png",
backface_culling = true,
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 0.8}
},
},
alpha = WATER_ALPHA,
paramtype = "light",
paramtype2 = "flowingliquid",
is_ground_content = false,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "watershed:freshwaterflow",
liquid_alternative_source = "watershed:freshwater",
liquid_viscosity = WATER_VISC,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 64, r = 100, g = 150, b = 200},
groups = {water = 3, liquid = 3, puts_out_fire = 1,
not_in_creative_inventory = 1},
})
minetest.register_node("watershed:lava", {
description = "Lava source",
drawtype = "liquid",
tiles = {
{
name = "default_lava_source_animated.png",
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 3.0}}
},
special_tiles = {
{
name = "default_lava_source_animated.png",
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 3.0},
backface_culling = false,
}
},
paramtype = "light",
light_source = 14,
is_ground_content = false,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "watershed:lavaflow",
liquid_alternative_source = "watershed:lava",
liquid_viscosity = LAVA_VISC,
liquid_renewable = false,
liquid_range = 2,
damage_per_second = 8,
post_effect_color = {a = 192, r = 255, g = 64, b = 0},
groups = {lava = 3, liquid = 2, hot = 3, igniter = 1},
})
minetest.register_node("watershed:lavaflow", {
description = "Flowing lava",
drawtype = "flowingliquid",
tiles = {"default_lava.png"},
special_tiles = {
{
image = "default_lava_flowing_animated.png",
backface_culling = false,
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 3.3}
},
{
image = "default_lava_flowing_animated.png",
backface_culling = true,
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 3.3}
},
},
paramtype = "light",
paramtype2 = "flowingliquid",
light_source = 14,
is_ground_content = false,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "watershed:lavaflow",
liquid_alternative_source = "watershed:lava",
liquid_viscosity = LAVA_VISC,
liquid_renewable = false,
liquid_range = 2,
damage_per_second = 8,
post_effect_color = {a = 192, r = 255, g = 64, b = 0},
groups = {lava = 3, liquid = 2, hot =3, igniter = 1,
not_in_creative_inventory = 1},
})
minetest.register_node("watershed:mixwater", {
description = "Mixed water source",
drawtype = "liquid",
tiles = {
{
name = "watershed_mixwateranim.png",
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 2.0}
}
},
special_tiles = {
{
name = "watershed_mixwateranim.png",
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 2.0},
backface_culling = false,
}
},
alpha = WATER_ALPHA,
paramtype = "light",
is_ground_content = false,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "watershed:mixwaterflow",
liquid_alternative_source = "watershed:mixwater",
liquid_viscosity = WATER_VISC,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 64, r = 100, g = 120, b = 200},
groups = {water = 3, liquid = 3, puts_out_fire = 1},
})
minetest.register_node("watershed:mixwaterflow", {
description = "Flowing mixed water",
drawtype = "flowingliquid",
tiles = {"watershed_mixwater.png"},
special_tiles = {
{
image = "watershed_mixwaterflowanim.png",
backface_culling = false,
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 0.8}
},
{
image = "watershed_mixwaterflowanim.png",
backface_culling = true,
animation = {type = "vertical_frames",
aspect_w = 16, aspect_h = 16, length = 0.8}
},
},
alpha = WATER_ALPHA,
paramtype = "light",
paramtype2 = "flowingliquid",
is_ground_content = false,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "watershed:mixwaterflow",
liquid_alternative_source = "watershed:mixwater",
liquid_viscosity = WATER_VISC,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 64, r = 100, g = 120, b = 200},
groups = {water = 3, liquid = 3, puts_out_fire = 1,
not_in_creative_inventory = 1},
})
minetest.register_alias("watershed:freshwater", "default:river_water_source")
minetest.register_alias("watershed:freshwaterflow", "default:river_water_flowing")
minetest.register_alias("watershed:lava", "default:lava_source")
minetest.register_alias("watershed:lavaflow", "default:lava_flowing")
-- Items -- Items
minetest.register_alias("watershed:luxcrystal", "default:cobble") minetest.register_craftitem("watershed:luxcrystal", {
description = "Lux crystal",
inventory_image = "watershed_luxcrystal.png",
})
-- Crafting
minetest.register_craft({
type = "cooking",
output = "default:desert_stone",
recipe = "watershed:redcobble",
})
minetest.register_craft({
output = "watershed:light 8",
recipe = {
{"default:glass", "default:glass", "default:glass"},
{"default:glass", "watershed:luxcrystal", "default:glass"},
{"default:glass", "default:glass", "default:glass"},
},
})
minetest.register_craft({
output = "watershed:acaciawood 4",
recipe = {
{"watershed:acaciatree"},
}
})
minetest.register_craft({
output = "watershed:pinewood 4",
recipe = {
{"watershed:pinetree"},
}
})
-- Buckets
bucket.register_liquid(
"watershed:freshwater",
"watershed:freshwaterflow",
"watershed:bucket_freshwater",
"watershed_bucketfreshwater.png",
"WS Fresh Water Bucket"
)
bucket.register_liquid(
"watershed:lava",
"watershed:lavaflow",
"watershed:bucket_lava",
"bucket_lava.png",
"WS Lava Bucket"
)
-- Fuel
minetest.register_craft({
type = "fuel",
recipe = "watershed:bucket_lava",
burntime = 60,
replacements = {{"watershed:bucket_lava", "bucket:bucket_empty"}},
})
-- Register stairs and slabs
stairs.register_stair_and_slab(
"acaciawood",
"watershed:acaciawood",
{snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
{"watershed_acaciawood.png"},
"Acaciawood stair",
"Acaciawood slab",
default.node_sound_wood_defaults()
)
stairs.register_stair_and_slab(
"pinewood",
"watershed:pinewood",
{snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
{"watershed_pinewood.png"},
"Pinewood stair",
"Pinewood slab",
default.node_sound_wood_defaults()
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B