update
@ -150,14 +150,31 @@ function sumpf_make_jungletree(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
minetest.register_abm({
|
||||
--[[minetest.register_abm({
|
||||
nodenames = {"jungletree:sapling"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
sumpf_make_jungletree(pos)
|
||||
end
|
||||
})]]
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"jungletree:sapling"},
|
||||
neighbors = {"group:soil"},
|
||||
interval = 40,
|
||||
chance = 5,
|
||||
action = function(pos)
|
||||
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") ~= 1
|
||||
or not minetest.get_node_light(pos) then
|
||||
return
|
||||
end
|
||||
if minetest.env:get_node_light(pos, nil) > 6 then
|
||||
sumpf_make_jungletree(pos)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
--[[
|
||||
minetest.register_craft({
|
||||
output = 'default:wood 4',
|
||||
|
@ -21,6 +21,9 @@ minetest.register_node("sumpf:birk", {
|
||||
on_construct = function(pos)
|
||||
mache_birke(pos)
|
||||
end,
|
||||
on_use = function()
|
||||
mache_birke(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("sumpf:leaves", {
|
||||
@ -143,15 +146,19 @@ end
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"sumpf:sapling"},
|
||||
interval = 10,
|
||||
chance = 16,
|
||||
neighbors = {"group:soil"},
|
||||
interval = 20,
|
||||
chance = 8,
|
||||
action = function(pos)
|
||||
if minetest.env:find_node_near(pos, 1, "group:crumbly")
|
||||
and minetest.env:get_node_light(pos, nil) > 7 then
|
||||
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name, "soil") ~= 1
|
||||
or not minetest.get_node_light(pos) then
|
||||
return
|
||||
end
|
||||
if minetest.env:get_node_light(pos, nil) > 7 then
|
||||
mache_birke(pos)
|
||||
end
|
||||
end
|
||||
,})
|
||||
})
|
||||
|
||||
if sumpf.spawn_plants
|
||||
and minetest.get_modpath("habitat") then
|
||||
|
@ -46,7 +46,7 @@ minetest.register_node("sumpf:junglestonebrick", {
|
||||
minetest.register_node("sumpf:peat", {
|
||||
description = "Peat",
|
||||
tiles = {"sumpf_peat.png"},
|
||||
groups = {crumbly=3, falling_node=1, sand=1},
|
||||
groups = {crumbly=3, falling_node=1, sand=1, soil=1},
|
||||
sounds = default.node_sound_sand_defaults({
|
||||
footstep = {name="sumpf", gain=0.4},
|
||||
place = {name="sumpf", gain=0.4},
|
||||
@ -74,7 +74,7 @@ minetest.register_node("sumpf:eisen", {
|
||||
minetest.register_node("sumpf:sumpf", {
|
||||
description = "Swamp",
|
||||
tiles = {"sumpf.png"},
|
||||
groups = {crumbly=3},
|
||||
groups = {crumbly=3, soil=1},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="sumpf", gain=0.4},
|
||||
}),
|
||||
@ -82,7 +82,7 @@ minetest.register_node("sumpf:sumpf", {
|
||||
|
||||
minetest.register_node("sumpf:sumpf2", {
|
||||
tiles = {"sumpf.png","sumpf_swampstone.png","sumpf_swampstone.png^sumpf2.png"},
|
||||
groups = {cracky=3},
|
||||
groups = {cracky=3, soil=1},
|
||||
drop = "sumpf:junglestone",
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
footstep = {name="sumpf", gain=0.4},
|
||||
@ -138,13 +138,15 @@ minetest.register_node("sumpf:dirtywater_flowing", {
|
||||
tiles = {"default_water.png"},
|
||||
special_tiles = {
|
||||
{name="sumpfwasser2.png", backface_culling=false, animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1}},
|
||||
{name="sumpfwasser2.png", backface_culling=true, animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1}},},
|
||||
{name="sumpfwasser2.png", backface_culling=true, animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1}}
|
||||
},
|
||||
alpha = WATER_ALPHA,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "sumpf:dirtywater_flowing",
|
||||
liquid_alternative_source = "sumpf:dirtywater_source",
|
||||
@ -156,7 +158,11 @@ minetest.register_node("sumpf:dirtywater_flowing", {
|
||||
minetest.register_node("sumpf:dirtywater_source", {
|
||||
description = "Swampwater",
|
||||
drawtype = "liquid",
|
||||
tiles = {{name="sumpfwasser.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}}},
|
||||
tiles = {
|
||||
{name="sumpfwasser.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}},
|
||||
{name="sumpfwasser.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}},
|
||||
{name="sumpfwasser2.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}}
|
||||
},
|
||||
special_tiles = {{name="sumpfwasser.png", backface_culling=false},},
|
||||
alpha = WATER_ALPHA,
|
||||
paramtype = "light",
|
||||
|
@ -77,7 +77,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
|
||||
--Information:
|
||||
if sumpf.info then
|
||||
local geninfo = "[sumpf] tries to generate a swamp at: x=["..minp.x.."; "..maxp.x.."]; z=["..minp.z.."; "..maxp.z.."]"
|
||||
local geninfo = "[sumpf] tries to generate a swamp at: x=["..minp.x.."; "..maxp.x.."]; y=["..minp.y.."; "..maxp.y.."]; z=["..minp.z.."; "..maxp.z.."]"
|
||||
print(geninfo)
|
||||
minetest.chat_send_all(geninfo)
|
||||
end
|
||||
|
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 487 B |
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 226 B 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 |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 806 B After Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 416 B |