diff --git a/forestsoils/abms.lua b/forestsoils/abms.lua deleted file mode 100644 index 3291ef3..0000000 --- a/forestsoils/abms.lua +++ /dev/null @@ -1,35 +0,0 @@ ---abms - -minetest.register_abm({ - nodenames = {"default:dirt_with_grass"}, - interval = 1, - chance = 3, - action = function(pos) - if minetest.find_node_near({x=pos.x,y=pos.y+1,z=pos.z}, 3, {"group:tree"}) then - minetest.env:add_node(pos, {name="forestsoils:dirt_with_leaves_1"}) - end - end, -}) - -minetest.register_abm({ - nodenames = {"default:dirt_with_grass"}, - interval = 1, - chance = 6, - action = function(pos) - if minetest.find_node_near({x=pos.x,y=pos.y+1,z=pos.z}, 1, {"forestsoils:dirt_with_leaves_1"}) then - minetest.env:add_node(pos, {name="forestsoils:grass_with_leaves_2"}) - end - end, -}) - -minetest.register_abm({ - nodenames = {"default:dirt_with_grass"}, - interval = 1, - chance = 12, - action = function(pos) - if minetest.find_node_near({x=pos.x,y=pos.y+1,z=pos.z}, 1, {"forestsoils:grass_with_leaves_2"}) then - minetest.env:add_node(pos, {name="forestsoils:grass_with_leaves_1"}) - end - - end, -}) \ No newline at end of file diff --git a/forestsoils/generate.lua b/forestsoils/generate.lua deleted file mode 100644 index a4f4800..0000000 --- a/forestsoils/generate.lua +++ /dev/null @@ -1,58 +0,0 @@ --- generate - -minetest.register_on_generated(function(minp, maxp, seed) - if maxp.y >= 2 and minp.y <= 0 then - -- Generate forest soil - -- perlin like plants_lib default and "default:grass_*" - local perlin1 = minetest.get_perlin(329, 3, 0.6, 100) - -- Assume X and Z lengths are equal - local divlen = 8--16 - local divs = (maxp.x-minp.x)/divlen+1; - for divx=0,divs-1 do - for divz=0,divs-1 do - local x0 = minp.x + math.floor((divx+0)*divlen) - local z0 = minp.z + math.floor((divz+0)*divlen) - local x1 = minp.x + math.floor((divx+1)*divlen) - local z1 = minp.z + math.floor((divz+1)*divlen) - -- dirt_with_leaves_1 - local forest_soil_amount = 100 - -- Find random positions for grass based on this random - local pr = PseudoRandom(seed)--+1) - for i=0,forest_soil_amount do - local x = pr:next(x0, x1) - local z = pr:next(z0, z1) - -- Find ground level (0...38) - local ground_y = nil - for y=38,0,-1 do - local nn = minetest.get_node({x=x,y=y,z=z}).name - if nn == "default:dirt_with_grass" then - ground_y = y - break - end - end - - if ground_y then - local pos = {x=x,y=ground_y,z=z} - local pos1 = {x=x,y=ground_y+1,z=z} - local nn = minetest.get_node(pos).name - -- Check if the node can be replaced - if minetest.find_node_near(pos1, 3, {"group:tree"}) then - if table.getn(minetest.find_nodes_in_area({x=x-3, y=ground_y-1, z=z-3}, {x=x+3, y=ground_y+1, z=z+3}, {"group:tree"})) >= 4 then -- from plants_lib - minetest.set_node(pos,{name="forestsoils:dirt_with_leaves_1"}) - end - end - if minetest.find_node_near(pos, 1, {"forestsoils:dirt_with_leaves_1"}) then - minetest.set_node(pos,{name="forestsoils:grass_with_leaves_2"}) - end - if minetest.find_node_near(pos, 1, {"forestsoils:grass_with_leaves_2"}) then - minetest.set_node(pos,{name="forestsoils:grass_with_leaves_1"}) - end - if minetest.find_node_near(pos, 1, {"forestsoils:grass_with_leaves_1"}) then - minetest.set_node(pos,{name="forestsoils:dirt_with_leaves_2"}) - end - end - end - end - end - end -end) \ No newline at end of file diff --git a/forestsoils/init.lua b/forestsoils/init.lua index e859a4e..85af78a 100644 --- a/forestsoils/init.lua +++ b/forestsoils/init.lua @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------------------------- local title = "Forrest Soils" -local version = "0.0.4" +local version = "0.0.5" local mname = "forestsoils" ----------------------------------------------------------------------------------------------- diff --git a/forestsoils/nodes.lua b/forestsoils/nodes.lua index 6eab13f..e8c3560 100644 --- a/forestsoils/nodes.lua +++ b/forestsoils/nodes.lua @@ -3,9 +3,9 @@ minetest.register_node("forestsoils:dirt_with_leaves_1", { description = "Forrest Soil 1", tiles = { - "default_dirt.png^leaves_ground_9_cover.png", + "default_dirt.png^forestsoils_ground_cover.png", "default_dirt.png", - "default_dirt.png^leaves_ground_9_cover_side.png"}, + "default_dirt.png^forestsoils_ground_cover_side.png"}, is_ground_content = true, groups = { crumbly=3, @@ -21,9 +21,9 @@ minetest.register_node("forestsoils:dirt_with_leaves_1", { minetest.register_node("forestsoils:dirt_with_leaves_2", { description = "Forrest Soil 2", tiles = { - "leaves_ground_9.png", + "forestsoils_ground.png", "default_dirt.png", - "default_dirt.png^leaves_ground_9_side.png"}, + "default_dirt.png^forestsoils_ground_side.png"}, is_ground_content = true, groups = { crumbly=3, @@ -39,9 +39,9 @@ minetest.register_node("forestsoils:dirt_with_leaves_2", { minetest.register_node("forestsoils:grass_with_leaves_1", { description = "Forrest Soil 3", tiles = { - "default_grass.png^leaves_ground_9_cover2.png", + "default_grass.png^forestsoils_ground_cover2.png", "default_dirt.png", - "default_dirt.png^default_grass_side.png^leaves_ground_9_cover_side2.png"}, + "default_dirt.png^default_grass_side.png^forestsoils_ground_cover_side2.png"}, is_ground_content = true, groups = { crumbly=3, @@ -57,9 +57,9 @@ minetest.register_node("forestsoils:grass_with_leaves_1", { minetest.register_node("forestsoils:grass_with_leaves_2", { description = "Forrest Soil 4", tiles = { - "default_grass.png^leaves_ground_9_cover.png", + "default_grass.png^forestsoils_ground_cover.png", "default_dirt.png", - "default_dirt.png^default_grass_side.png^leaves_ground_9_cover_side.png"}, + "default_dirt.png^default_grass_side.png^forestsoils_ground_cover_side.png"}, is_ground_content = true, groups = { crumbly=3, diff --git a/forestsoils/textures/bw_l.png b/forestsoils/textures/bw_l.png deleted file mode 100644 index e34901d..0000000 Binary files a/forestsoils/textures/bw_l.png and /dev/null differ diff --git a/forestsoils/textures/dryplants_grass_short.png b/forestsoils/textures/dryplants_grass_short.png deleted file mode 100644 index ad186e5..0000000 Binary files a/forestsoils/textures/dryplants_grass_short.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_9.png b/forestsoils/textures/forestsoils_ground.png similarity index 100% rename from forestsoils/textures/leaves_ground_9.png rename to forestsoils/textures/forestsoils_ground.png diff --git a/forestsoils/textures/leaves_ground_9_cover.png b/forestsoils/textures/forestsoils_ground_cover.png similarity index 100% rename from forestsoils/textures/leaves_ground_9_cover.png rename to forestsoils/textures/forestsoils_ground_cover.png diff --git a/forestsoils/textures/leaves_ground_9_cover2.png b/forestsoils/textures/forestsoils_ground_cover2.png similarity index 100% rename from forestsoils/textures/leaves_ground_9_cover2.png rename to forestsoils/textures/forestsoils_ground_cover2.png diff --git a/forestsoils/textures/leaves_ground_9_cover_side.png b/forestsoils/textures/forestsoils_ground_cover_side.png similarity index 100% rename from forestsoils/textures/leaves_ground_9_cover_side.png rename to forestsoils/textures/forestsoils_ground_cover_side.png diff --git a/forestsoils/textures/leaves_ground_9_cover_side2.png b/forestsoils/textures/forestsoils_ground_cover_side2.png similarity index 100% rename from forestsoils/textures/leaves_ground_9_cover_side2.png rename to forestsoils/textures/forestsoils_ground_cover_side2.png diff --git a/forestsoils/textures/leaves_ground_9_side.png b/forestsoils/textures/forestsoils_ground_side.png similarity index 100% rename from forestsoils/textures/leaves_ground_9_side.png rename to forestsoils/textures/forestsoils_ground_side.png diff --git a/forestsoils/textures/leaves_ground.png b/forestsoils/textures/leaves_ground.png deleted file mode 100644 index ea657c4..0000000 Binary files a/forestsoils/textures/leaves_ground.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_2.png b/forestsoils/textures/leaves_ground_2.png deleted file mode 100644 index ad31879..0000000 Binary files a/forestsoils/textures/leaves_ground_2.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_3.png b/forestsoils/textures/leaves_ground_3.png deleted file mode 100644 index 7946997..0000000 Binary files a/forestsoils/textures/leaves_ground_3.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_4.png b/forestsoils/textures/leaves_ground_4.png deleted file mode 100644 index 919bdd3..0000000 Binary files a/forestsoils/textures/leaves_ground_4.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_5.png b/forestsoils/textures/leaves_ground_5.png deleted file mode 100644 index 0e91573..0000000 Binary files a/forestsoils/textures/leaves_ground_5.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_6.png b/forestsoils/textures/leaves_ground_6.png deleted file mode 100644 index 0f7ffee..0000000 Binary files a/forestsoils/textures/leaves_ground_6.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_7.png b/forestsoils/textures/leaves_ground_7.png deleted file mode 100644 index 870c213..0000000 Binary files a/forestsoils/textures/leaves_ground_7.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_8.png b/forestsoils/textures/leaves_ground_8.png deleted file mode 100644 index 8f7b6cf..0000000 Binary files a/forestsoils/textures/leaves_ground_8.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_8_cover.png b/forestsoils/textures/leaves_ground_8_cover.png deleted file mode 100644 index dd668bc..0000000 Binary files a/forestsoils/textures/leaves_ground_8_cover.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_8_cover_side.png b/forestsoils/textures/leaves_ground_8_cover_side.png deleted file mode 100644 index f2bdddc..0000000 Binary files a/forestsoils/textures/leaves_ground_8_cover_side.png and /dev/null differ diff --git a/forestsoils/textures/leaves_ground_8_side.png b/forestsoils/textures/leaves_ground_8_side.png deleted file mode 100644 index 591b552..0000000 Binary files a/forestsoils/textures/leaves_ground_8_side.png and /dev/null differ