update
11
README.md
@ -1,11 +0,0 @@
|
||||
This mod adds swamps to minetest.
|
||||
If you have got some ideas, tell them to me.
|
||||
|
||||
**Depends:** [jungletree, habitat,](http://minetest.net/forum/viewtopic.php?pid=39943#p39943) default
|
||||
**License:** GPL *(sounds)*, WTFPL *(code, textures except birch)*
|
||||
|
||||
*Delete following lines of the jungletree mod:*
|
||||
`--function anti_generate(node, surfaces, minp, maxp, height_min, height_max, spread, habitat_size, habitat_nodes)`
|
||||
`minetest.register_on_generated(function(minp, maxp, seed)`
|
||||
` generate("jungletree:sapling", {"default:dirt_with_grass"}, minp, maxp, 0, 20, 10, 50, {"default:water_source"}, 30, {"default:desert_sand"})`
|
||||
`end)`
|
@ -138,6 +138,4 @@ minetest.register_abm({
|
||||
,})
|
||||
|
||||
--function anti_generate(node, surfaces, minp, maxp, height_min, height_max, spread, habitat_size, habitat_nodes)
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
generate("sumpf:birk", {"default:dirt_with_grass"}, minp, maxp, 20, 25, 100, 500, {"default:water_source"},30,{"default:desert_sand"})
|
||||
end)
|
||||
--habitat:generate("sumpf:birk", {"default:dirt_with_grass"}, minp, maxp, 20, 25, 100, 500, {"default:water_source"},30,{"default:desert_sand"})
|
||||
|
22
init.lua
@ -6,28 +6,6 @@ I looked at snow mod for mapgen and
|
||||
at the jungletree mod for birches.
|
||||
]]
|
||||
|
||||
local MUSH = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.15, -0.2, -0.15, 0.15, -0.1, 0.15},
|
||||
{-0.2, -0.3, -0.2, 0.2, -0.2, 0.2},
|
||||
{-0.05, -0.5, -0.05, 0.05, -0.3, 0.05},
|
||||
},
|
||||
}
|
||||
|
||||
minetest.register_node("sumpf:pilz", {
|
||||
description = "Mushroom",
|
||||
tile_images = {"sumpf_pilz_oben.png","sumpf_pilz_unten.png","sumpf_pilz_seite.png"},
|
||||
inventory_image = "sumpf_pilz_item.png",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = MUSH,
|
||||
selection_box = MUSH,
|
||||
walkable = false,
|
||||
groups = {snappy=3,flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("sumpf:gras", {
|
||||
description = "Swamp Grass",
|
||||
tile_images = {"sumpfgrass.png"},
|
||||
|
37
mapgen.lua
@ -1,4 +1,4 @@
|
||||
local function generate_kohle(minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
|
||||
--[[local function generate_kohle(minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
|
||||
default.generate_ore(
|
||||
"sumpf:kohle", "sumpf:junglestone", minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max
|
||||
)
|
||||
@ -9,7 +9,8 @@ local function generate_eisen(minp, maxp, seed, chunks_per_volume, chunk_size, o
|
||||
"sumpf:eisen", "sumpf:junglestone", minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max
|
||||
)
|
||||
end
|
||||
|
||||
]]
|
||||
minetest.register_alias("sumpf:pilz", "riesenpilz:brown")
|
||||
|
||||
SUMPFGROUND = {"default:dirt_with_grass","default:dirt","default:sand","default:desert_sand"}
|
||||
EVSUMPFGROUND = {"default:dirt_with_grass","default:dirt","default:sand","default:desert_sand", "default:water_source"}
|
||||
@ -68,7 +69,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if in_biome then
|
||||
|
||||
local ground_y = nil --Definition des Bodens:
|
||||
for _, ground in ipairs(SUMPFGROUND) do
|
||||
for _, evground in ipairs(EVSUMPFGROUND) do
|
||||
for y=maxp.y,0,-1 do
|
||||
if env:get_node({x=x,y=y,z=z}).name == evground then
|
||||
@ -76,7 +76,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
for _, ground in ipairs(SUMPFGROUND) do
|
||||
if ground_y
|
||||
and env:get_node({x=x,y=ground_y,z=z}).name == ground then
|
||||
if bi then --Pflanzen (und Pilz):
|
||||
@ -85,29 +85,26 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
elseif pr:next(1,10) == 1 then
|
||||
env:add_node({x=x,y=ground_y+1,z=z}, {name="jungletree:sapling"})
|
||||
elseif pr:next(1,25) == 1 then
|
||||
env:add_node({x=x,y=ground_y+1,z=z}, {name="sumpf:pilz"})
|
||||
env:add_node({x=x,y=ground_y+1,z=z}, {name="riesenpilz:brown"})
|
||||
elseif pr:next(1,50) == 1 then
|
||||
env:add_node({x=x,y=ground_y+1,z=z}, {name="riesenpilz:red"})
|
||||
elseif pr:next(1,100) == 1 then
|
||||
env:add_node({x=x,y=ground_y+1,z=z}, {name="riesenpilz:fly_agaric"})
|
||||
elseif pr:next(1,2) == 1 then
|
||||
env:add_node({x=x,y=ground_y+1,z=z}, {name="sumpf:gras"})
|
||||
elseif pr:next(1,3) == 1 then
|
||||
env:add_node({x=x,y=ground_y+1,z=z}, {name="default:junglegrass"})
|
||||
end
|
||||
end --Sumpfwasser: not tested yet
|
||||
if pr:next(1,4) == 1 then
|
||||
local notnod = "air"
|
||||
local notnoe = "group:snappy"
|
||||
if env:get_node({x=x+1,y=ground_y,z=z}).name ~= notnod
|
||||
and env:get_node({x=x-1,y=ground_y,z=z}).name ~= notnod
|
||||
and env:get_node({x=x,y=ground_y,z=z+1}).name ~= notnod
|
||||
and env:get_node({x=x,y=ground_y,z=z-1}).name ~= notnod
|
||||
and env:get_node({x=x+1,y=ground_y,z=z}).name ~= notnoe
|
||||
and env:get_node({x=x-1,y=ground_y,z=z}).name ~= notnoe
|
||||
and env:get_node({x=x,y=ground_y,z=z+1}).name ~= notnoe
|
||||
and env:get_node({x=x,y=ground_y,z=z-1}).name ~= notnoe then
|
||||
end --Sumpfwasser:
|
||||
if pr:next(1,4) == 1
|
||||
and env:get_node({x=x+1,y=ground_y,z=z}).name ~= "air"
|
||||
and env:get_node({x=x-1,y=ground_y,z=z}).name ~= "air"
|
||||
and env:get_node({x=x,y=ground_y,z=z+1}).name ~= "air"
|
||||
and env:get_node({x=x,y=ground_y,z=z-1}).name ~= "air" then
|
||||
for s=0,-30,-1 do
|
||||
env:add_node({x=x,y=ground_y+s,z=z}, {name="sumpf:dirtywater_source"})
|
||||
env:add_node({x=x,y=ground_y+1,z=z}, {name="air"}) --because of the plants
|
||||
end
|
||||
end
|
||||
else --Sumpfboden:
|
||||
for i=-3,-30,-1 do
|
||||
for l=-1,0,1 do
|
||||
@ -137,12 +134,12 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Generate ores
|
||||
--[[ Generate ores
|
||||
generate_kohle(minp, maxp, seed+0, 1/8/8/8, 3, 8, -31000, 64)
|
||||
generate_eisen(minp, maxp, seed+1, 1/12/12/12, 2, 3, -15, 2)
|
||||
generate_eisen(minp, maxp, seed+2, 1/9/9/9, 3, 5, -63, -16)
|
||||
generate_eisen(minp, maxp, seed+3, 1/7/7/7, 3, 5, -31000, -64)
|
||||
|
||||
generate_kohle(minp, maxp, seed+7, 1/24/24/24, 6,27, -31000, 0)
|
||||
generate_eisen(minp, maxp, seed+6, 1/24/24/24, 6,27, -31000, -64)
|
||||
generate_eisen(minp, maxp, seed+6, 1/24/24/24, 6,27, -31000, -64)]]
|
||||
end)
|
||||
|
@ -1,7 +1,7 @@
|
||||
--This file contains configuration options for swamp mod.
|
||||
|
||||
--Enables mapgen.
|
||||
sumpf.enable_mapgen = false
|
||||
sumpf.enable_mapgen = true
|
||||
|
||||
--Enables smooth transition of biomes.
|
||||
sumpf.smooth = true
|
||||
|
BIN
shjrzgt.ogg
Normal file
Before Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 581 B |
BIN
textures_alternative/sumpf_pilz_item2.png
Normal file
After Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |