Compare commits
36 Commits
ferns_rm_b
...
cd93d09d01
Author | SHA1 | Date | |
---|---|---|---|
cd93d09d01 | |||
ac33f684b2 | |||
079a5c1ff8 | |||
156d31280a | |||
183c043066 | |||
3239650e68 | |||
6bdb533906 | |||
c62610f544 | |||
8e2148ffc3 | |||
5ac025cda4 | |||
efe869d386 | |||
b597f99014 | |||
637f96e215 | |||
fa9f30043f | |||
d97f25e112 | |||
86896848d5 | |||
5b66d54632 | |||
031260a62d | |||
d4e83d7e78 | |||
8d65559828 | |||
ec8132b06c | |||
4dcf14ce1f | |||
d7b543f5d7 | |||
f661500cb3 | |||
c2681261e0 | |||
2c433e0b57 | |||
1f52bbea19 | |||
10ff005066 | |||
80b548535a | |||
45a8064d3d | |||
1696d8bd8f | |||
091ce416d0 | |||
5dfa02c037 | |||
8b42a45d78 | |||
b6ed0316b7 | |||
114eaff7f1 |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.2 KiB |
@ -314,4 +314,6 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
for _, pos in ipairs(locations) do
|
||||
grow_youngtree2(pos)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
minetest.log("action", "[bushes] loaded.")
|
||||
|
BIN
bushes/textures/old & unused/BlockBranch1.png
Normal file
After Width: | Height: | Size: 72 KiB |
BIN
bushes/textures/old & unused/BlockBranch1L.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
bushes/textures/old & unused/BlockBranch1R.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
bushes/textures/old & unused/BushBranches1.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
bushes/textures/old & unused/BushBranches1sm.png
Normal file
After Width: | Height: | Size: 609 B |
BIN
bushes/textures/old & unused/BushBranches1sm2.png
Normal file
After Width: | Height: | Size: 620 B |
BIN
bushes/textures/old & unused/BushBranches1sm3.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
bushes/textures/old & unused/BushBranches1sm4.png
Normal file
After Width: | Height: | Size: 540 B |
BIN
bushes/textures/old & unused/BushBranchesCenter.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
bushes/textures/old & unused/BushBranchesSide1.png
Normal file
After Width: | Height: | Size: 657 B |
BIN
bushes/textures/old & unused/BushBranchesSide2.png
Normal file
After Width: | Height: | Size: 693 B |
BIN
bushes/textures/old & unused/blank.png
Normal file
After Width: | Height: | Size: 83 B |
BIN
bushes/textures/old & unused/moretrees_pine_leaves3.png
Normal file
After Width: | Height: | Size: 525 B |
@ -4,6 +4,8 @@ local S = minetest.get_translator("bushes_classic")
|
||||
plantlife_bushes = {}
|
||||
|
||||
-- TODO: add support for nodebreakers? those dig like mese picks
|
||||
local random = math.random
|
||||
|
||||
plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
if not (digger and pos and oldnode) then
|
||||
return
|
||||
@ -63,7 +65,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
|
||||
-- with a chance of 1/3, return 2 bushes
|
||||
local amount
|
||||
if can_harvest and math.random(1,3) == 1 then
|
||||
if can_harvest and random(1,3) == 1 then
|
||||
amount = "2"
|
||||
else
|
||||
amount = "1"
|
||||
@ -75,7 +77,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
elseif groupcaps.choppy then
|
||||
|
||||
-- the amount of sticks may vary
|
||||
local amount = math.random(4, 20)
|
||||
local amount = random(4, 20)
|
||||
-- return some sticks
|
||||
harvested = "default:stick " .. amount
|
||||
|
||||
@ -136,7 +138,7 @@ minetest.register_abm({
|
||||
local dirt = minetest.get_node(dirtpos)
|
||||
local is_soil = minetest.get_item_group(dirt.name, "soil") or minetest.get_item_group(dirt.name, "potting_soil")
|
||||
|
||||
if is_soil and (dirt.name == "farming:soil_wet" or math.random(1,3) == 1) then
|
||||
if is_soil and (dirt.name == "farming:soil_wet" or random(1,3) == 1) then
|
||||
minetest.swap_node( pos, {name = "bushes:" .. bush_name .. "_bush"})
|
||||
end
|
||||
end
|
||||
@ -159,7 +161,6 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
||||
paramtype2 = "facedir",
|
||||
on_use = minetest.item_eat(18),
|
||||
groups = { dig_immediate = 3 },
|
||||
is_ground_content = false,
|
||||
})
|
||||
|
||||
|
||||
@ -211,5 +212,4 @@ minetest.register_node(":bushes:basket_empty", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { dig_immediate = 3 },
|
||||
is_ground_content = false,
|
||||
})
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 8.9 KiB |
@ -1,6 +1,8 @@
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
local random = math.random
|
||||
|
||||
--Rocks
|
||||
|
||||
local cbox = {
|
||||
@ -15,12 +17,12 @@ minetest.register_node("cavestuff:pebble_1",{
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1, dig_immediate=3},
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:pebble_"..math.random(1,2))
|
||||
local stack = ItemStack("cavestuff:pebble_"..random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
@ -34,7 +36,7 @@ minetest.register_node("cavestuff:pebble_2",{
|
||||
drop = "cavestuff:pebble_1",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1, dig_immediate=3},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -47,12 +49,12 @@ minetest.register_node("cavestuff:desert_pebble_1",{
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1, dig_immediate=3},
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:desert_pebble_"..math.random(1,2))
|
||||
local stack = ItemStack("cavestuff:desert_pebble_"..random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:desert_pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
@ -66,7 +68,7 @@ minetest.register_node("cavestuff:desert_pebble_2",{
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1, dig_immediate=3},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -78,7 +80,6 @@ minetest.register_node("cavestuff:stalactite_1",{
|
||||
drawtype="nodebox",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
groups = {cracky=3,attached_node=1},
|
||||
is_ground_content = false,
|
||||
description = S("Stalactite"),
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
@ -125,7 +126,6 @@ minetest.register_node("cavestuff:stalactite_2",{
|
||||
drawtype="nodebox",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
groups = {cracky=3,attached_node=1,not_in_creative_inventory=1},
|
||||
is_ground_content = false,
|
||||
drop = "cavestuff:stalactite_1",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
@ -144,7 +144,6 @@ minetest.register_node("cavestuff:stalactite_3",{
|
||||
drawtype="nodebox",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
groups = {cracky=3,attached_node=1,not_in_creative_inventory=1},
|
||||
is_ground_content = false,
|
||||
drop = "cavestuff:stalactite_1",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
@ -119,7 +119,6 @@ minetest.register_node("dryplants:grass", {
|
||||
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -152,7 +151,6 @@ minetest.register_node("dryplants:hay", {
|
||||
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
|
@ -153,4 +153,4 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
for _, pos in ipairs(locations) do
|
||||
grow_juncus(pos)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
@ -44,7 +44,6 @@ minetest.register_node("dryplants:wetreed_slab", {
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -73,7 +72,6 @@ minetest.register_node("dryplants:wetreed_roof", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -196,7 +194,6 @@ minetest.register_node("dryplants:wetreed_roof_corner", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -227,7 +224,6 @@ minetest.register_node("dryplants:wetreed_roof_corner_2", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -267,7 +263,6 @@ minetest.register_node("dryplants:reed", {
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"dryplants_reed.png"},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -289,7 +284,6 @@ minetest.register_node("dryplants:reed_slab", {
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -318,7 +312,6 @@ minetest.register_node("dryplants:reed_roof", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -349,7 +342,6 @@ minetest.register_node("dryplants:reed_roof_corner", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -380,6 +372,5 @@ minetest.register_node("dryplants:reed_roof_corner_2", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
@ -88,7 +88,6 @@ minetest.register_node("dryplants:reedmace_spikes", {
|
||||
flammable=2,
|
||||
not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = 'dryplants:reedmace_sapling',
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -111,7 +110,6 @@ minetest.register_node("dryplants:reedmace_top", {
|
||||
flammable=2,
|
||||
not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = 'dryplants:reedmace_sapling',
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -135,7 +133,6 @@ minetest.register_node("dryplants:reedmace_height_2", {
|
||||
flammable=2--,
|
||||
--not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = 'dryplants:reedmace_sapling',
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -159,7 +156,6 @@ minetest.register_node("dryplants:reedmace_height_3", {
|
||||
flammable=2--,
|
||||
--not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = 'dryplants:reedmace_sapling',
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -183,7 +179,6 @@ minetest.register_node("dryplants:reedmace_height_3_spikes", {
|
||||
flammable=2--,
|
||||
--not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = 'dryplants:reedmace_sapling',
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -206,7 +201,6 @@ minetest.register_node("dryplants:reedmace", {
|
||||
flammable=2,
|
||||
not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = 'dryplants:reedmace_sapling',
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -237,7 +231,6 @@ minetest.register_node("dryplants:reedmace_bottom", {
|
||||
flammable=2,
|
||||
not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = 'dryplants:reedmace_sapling',
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
|
BIN
dryplants/textures/not_in_use/big_pic_8.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
dryplants/textures/not_in_use/big_pic_9.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
dryplants/textures/not_in_use/dryplants_cattailsG_m2.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
dryplants/textures/not_in_use/dryplants_juncus_02_left.png
Normal file
After Width: | Height: | Size: 352 B |
BIN
dryplants/textures/not_in_use/dryplants_juncus_02_right.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
dryplants/textures/not_in_use/dryplants_juncus_02_whole2.png
Normal file
After Width: | Height: | Size: 621 B |
BIN
dryplants/textures/not_in_use/dryplants_juncus_03_left.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
dryplants/textures/not_in_use/dryplants_juncus_03_right.png
Normal file
After Width: | Height: | Size: 387 B |
BIN
dryplants/textures/not_in_use/dryplants_juncus_03_whole2.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_01.png
Normal file
After Width: | Height: | Size: 362 B |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_02.png
Normal file
After Width: | Height: | Size: 708 B |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_03.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_04.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_bottom_left.png
Normal file
After Width: | Height: | Size: 122 B |
After Width: | Height: | Size: 189 B |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_left.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_right.png
Normal file
After Width: | Height: | Size: 196 B |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_top_left.png
Normal file
After Width: | Height: | Size: 102 B |
BIN
dryplants/textures/not_in_use/dryplants_reedmace_top_right.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
dryplants/textures/not_in_use/reedmace2.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
dryplants/textures/not_in_use/reedmace3.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
dryplants/textures/not_in_use/reedmace4.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
dryplants/textures/not_in_use/reedtest.png
Normal file
After Width: | Height: | Size: 333 B |
BIN
dryplants/textures/not_in_use/texturing.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
dryplants/textures/old/dryplants_grass_short_old3.png
Normal file
After Width: | Height: | Size: 823 B |
BIN
dryplants/textures/old/dryplants_grass_short_old4.png
Normal file
After Width: | Height: | Size: 337 B |
BIN
dryplants/textures/old/dryplants_juncus_02_left_old.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
dryplants/textures/old/dryplants_juncus_02_right_old.png
Normal file
After Width: | Height: | Size: 389 B |
BIN
dryplants/textures/old/dryplants_juncus_03_left_old.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
dryplants/textures/old/dryplants_juncus_03_right_old.png
Normal file
After Width: | Height: | Size: 400 B |
BIN
dryplants/textures/old/dryplants_reedmace_bottom_left_old2.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
dryplants/textures/old/dryplants_reedmace_bottom_old4.png
Normal file
After Width: | Height: | Size: 734 B |
BIN
dryplants/textures/old/dryplants_reedmace_bottom_right_old2.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
dryplants/textures/old/dryplants_reedmace_left_old2.png
Normal file
After Width: | Height: | Size: 191 B |
BIN
dryplants/textures/old/dryplants_reedmace_old8.png
Normal file
After Width: | Height: | Size: 698 B |
BIN
dryplants/textures/old/dryplants_reedmace_right_old2.png
Normal file
After Width: | Height: | Size: 200 B |
BIN
dryplants/textures/old/dryplants_reedmace_spikes_old3.png
Normal file
After Width: | Height: | Size: 556 B |
BIN
dryplants/textures/old/dryplants_reedmace_top_left_old2.png
Normal file
After Width: | Height: | Size: 99 B |
BIN
dryplants/textures/old/dryplants_reedmace_top_old3.png
Normal file
After Width: | Height: | Size: 404 B |
BIN
dryplants/textures/old/dryplants_reedmace_top_right_old2.png
Normal file
After Width: | Height: | Size: 120 B |
BIN
dryplants/textures/old/dryplants_reedmace_water_old2.png
Normal file
After Width: | Height: | Size: 569 B |
@ -79,3 +79,31 @@ minetest.register_craft({
|
||||
output = "dye:green",
|
||||
recipe = {"group:horsetail"},
|
||||
})
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:pick_wood",
|
||||
recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:shovel_wood",
|
||||
recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:axe_wood",
|
||||
recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:sword_wood",
|
||||
recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:hoe_wood",
|
||||
recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
|
||||
})]]
|
||||
|
248
ferns/fern.lua
@ -4,6 +4,7 @@
|
||||
-- by Mossmanikin
|
||||
-- Contains code from: biome_lib
|
||||
-- Looked at code from: default, flowers, painting, trees
|
||||
-- Dependencies: biome_lib
|
||||
-- Supports: dryplants, stoneage, sumpf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- some inspiration from here
|
||||
@ -11,10 +12,19 @@
|
||||
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_alias("ferns:fern_03", "default:fern_3")
|
||||
minetest.register_alias("ferns:fern_02", "default:fern_2")
|
||||
minetest.register_alias("ferns:fern_01", "default:fern_1")
|
||||
assert(abstract_ferns.config.enable_lady_fern == true)
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
|
||||
-- Maintain backward compatibilty
|
||||
-- minetest-0.5: Begin
|
||||
local default_ferns = minetest.registered_items["default:fern_1"] or false
|
||||
if default_ferns then
|
||||
minetest.register_alias("ferns:fern_03", "default:fern_3")
|
||||
minetest.register_alias("ferns:fern_02", "default:fern_2")
|
||||
minetest.register_alias("ferns:fern_01", "default:fern_1")
|
||||
end
|
||||
-- minetest-0.5: End
|
||||
minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
|
||||
minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
|
||||
@ -23,87 +33,183 @@ minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
|
||||
|
||||
local nodenames = {}
|
||||
|
||||
local function create_nodes()
|
||||
local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
|
||||
local vscales = { 1, math.sqrt(8), math.sqrt(11) }
|
||||
local descs = { S("Lady-fern (Athyrium)"), nil, nil }
|
||||
|
||||
for i = 1, 3 do
|
||||
local node_on_place = nil
|
||||
if i == 1 then
|
||||
node_on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random fern
|
||||
local stack = ItemStack("ferns:fern_0"..math.random(1,4))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
|
||||
end
|
||||
end
|
||||
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
|
||||
minetest.register_node(nodenames[i], {
|
||||
description = descs[i] or (S("Lady-fern (Athyrium)").." " .. string.format("%02d", i)),
|
||||
inventory_image = "ferns_fern.png",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = vscales[i],
|
||||
paramtype = "light",
|
||||
tiles = { images[i] },
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
|
||||
},
|
||||
drop = "ferns:fern_01",
|
||||
on_place = node_on_place
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Init
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
for i = 1, 3 do
|
||||
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
|
||||
if default_ferns then
|
||||
for i = 1, 3 do
|
||||
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
|
||||
end
|
||||
else
|
||||
create_nodes()
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Spawning
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_decoration({ -- near trees (woodlands)
|
||||
decoration = nodenames,
|
||||
deco_type = "simple",
|
||||
flags = "all_floors",
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:desert_sand",
|
||||
"default:sand",
|
||||
"default:jungletree",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:sumpf"
|
||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
biome_lib.register_on_generate({ -- near trees (woodlands)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:desert_sand",
|
||||
"default:sand",
|
||||
"default:jungletree",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 30,
|
||||
rarity = 62,--63,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"group:tree"},
|
||||
near_nodes_size = 3,--4,
|
||||
near_nodes_vertical = 2,--3,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C (too hot?)
|
||||
temp_min = 0.75, -- -12 °C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
y_min = 1, -- above sea level
|
||||
param2 = 0,
|
||||
param2_max = 179,
|
||||
spawn_by = "group:tree",
|
||||
num_spawn_by = 1,
|
||||
fill_ratio = 0.1,
|
||||
})
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
minetest.register_decoration({ -- near stone (mountains)
|
||||
decoration = nodenames,
|
||||
deco_type = "simple",
|
||||
flags = "all_floors",
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"group:falling_node",
|
||||
--"default:jungletree",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:sumpf"
|
||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
biome_lib.register_on_generate({ -- near stone (mountains)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"group:falling_node",
|
||||
--"default:jungletree",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 35,
|
||||
rarity = 40,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"group:stone"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_count = 16,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C (too hot?)
|
||||
temp_min = 0.75, -- -12 °C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
y_min = 1, -- above sea level
|
||||
param2 = 0,
|
||||
param2_max = 179,
|
||||
spawn_by = "group:stone",
|
||||
num_spawn_by = 1,
|
||||
fill_ratio = 0.3,
|
||||
})
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
minetest.register_decoration({ -- near stone (mountains)
|
||||
decoration = nodenames,
|
||||
deco_type = "simple",
|
||||
flags = "all_floors",
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
"default:stone_with_tin",
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver",
|
||||
"sumpf:sumpf"
|
||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
||||
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
"default:stone_with_tin", -- minetest >= 0.4.16
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 1200,--1600, -- maybe too much? :D
|
||||
rarity = 25,--15,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {
|
||||
"default:stone_with_iron",
|
||||
--"default:stone_with_copper",
|
||||
--"default:stone_with_mese",
|
||||
--"default:stone_with_gold",
|
||||
--"default:stone_with_diamond",
|
||||
"default:stone_with_tin", -- minetest >= 0.4.16
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver"
|
||||
--"moreores:mineral_mithril"
|
||||
},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 4,--5,--6,
|
||||
near_nodes_count = 2,--3,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C (too hot?)
|
||||
temp_min = 0.75, -- -12 °C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
y_min = 1, -- above sea level
|
||||
param2 = 0,
|
||||
param2_max = 179,
|
||||
spawn_by = {
|
||||
"default:stone_with_iron",
|
||||
--"default:stone_with_copper",
|
||||
--"default:stone_with_mese",
|
||||
--"default:stone_with_gold",
|
||||
--"default:stone_with_diamond",
|
||||
"default:stone_with_tin",
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver"
|
||||
--"moreores:mineral_mithril"
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
"default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
"default:stone_with_tin", -- minetest >= 0.4.16
|
||||
"moreores:mineral_tin",
|
||||
"moreores:mineral_silver",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 70,
|
||||
rarity = 25,--15,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {
|
||||
"default:stone"
|
||||
},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 2,--6,
|
||||
near_nodes_count = 3,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C (too hot?)
|
||||
temp_min = 0.75, -- -12 °C
|
||||
random_facedir = { 0, 179 },
|
||||
},
|
||||
num_spawn_by = 1,
|
||||
fill_ratio = 0.8,
|
||||
})
|
||||
nodenames
|
||||
)
|
||||
end
|
||||
|
@ -7,6 +7,8 @@
|
||||
-- Supports: vines
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_giant_treefern == true)
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
-- lot of code, lot to load
|
||||
@ -136,7 +138,6 @@ minetest.register_node("ferns:tree_fern_leaves_giant", {
|
||||
attached_node=1,
|
||||
not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = {
|
||||
max_items = 2,
|
||||
items = {
|
||||
@ -178,7 +179,6 @@ minetest.register_node("ferns:tree_fern_leave_big", {
|
||||
attached_node=1,
|
||||
not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_destruct = function(pos,oldnode)
|
||||
@ -217,7 +217,6 @@ minetest.register_node("ferns:tree_fern_leave_big_end", {
|
||||
attached_node=1,
|
||||
not_in_creative_inventory=1
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
@ -256,7 +255,6 @@ minetest.register_node("ferns:fern_trunk_big_top", {
|
||||
not_in_creative_inventory=1,
|
||||
leafdecay=3 -- to support vines
|
||||
},
|
||||
is_ground_content = false,
|
||||
drop = "ferns:fern_trunk_big",
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
@ -283,15 +281,17 @@ minetest.register_node("ferns:fern_trunk_big", {
|
||||
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
|
||||
},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "ferns:fern_trunk_big" or node.name == "ferns:fern_trunk_big_top" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"ferns:fern_trunk_big")
|
||||
end
|
||||
end,
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
if digger == nil then return end
|
||||
local np = {x=pos.x,y=pos.y+1,z=pos.z}
|
||||
local nn = minetest.get_node(np)
|
||||
if nn.name == "ferns:fern_trunk_big" or
|
||||
nn.name == "ferns:fern_trunk_big_top"
|
||||
then
|
||||
minetest.node_dig(np, nn, digger)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -329,50 +329,54 @@ minetest.register_abm({
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- in jungles
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
"default:sand",
|
||||
"default:desert_sand"--,
|
||||
--"dryplants:grass_short"
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
"default:sand",
|
||||
"default:desert_sand"--,
|
||||
--"dryplants:grass_short"
|
||||
},
|
||||
max_count = 12,--27,
|
||||
avoid_nodes = {"group:tree"},
|
||||
avoid_radius = 3,--4,
|
||||
rarity = 85,
|
||||
seed_diff = 329,
|
||||
min_elevation = 1,
|
||||
near_nodes = {"default:jungletree"},
|
||||
near_nodes_size = 6,
|
||||
near_nodes_vertical = 2,--4,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
max_count = 12,--27,
|
||||
avoid_nodes = {"group:tree"},
|
||||
avoid_radius = 3,--4,
|
||||
rarity = 85,
|
||||
seed_diff = 329,
|
||||
min_elevation = 1,
|
||||
near_nodes = {"default:jungletree"},
|
||||
near_nodes_size = 6,
|
||||
near_nodes_vertical = 2,--4,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_ferns.grow_giant_tree_fern
|
||||
)
|
||||
abstract_ferns.grow_giant_tree_fern
|
||||
)
|
||||
end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
},
|
||||
max_count = 10,--27,
|
||||
rarity = 90,
|
||||
seed_diff = 329,
|
||||
neighbors = {"default:desert_sand"},
|
||||
ncount = 1,
|
||||
min_elevation = 1,
|
||||
near_nodes = {"default:water_source", "default:river_water_source"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 1.0,
|
||||
temp_max = -1.0,
|
||||
temp_min = 1.0,
|
||||
},
|
||||
max_count = 10,--27,
|
||||
rarity = 90,
|
||||
seed_diff = 329,
|
||||
neighbors = {"default:desert_sand"},
|
||||
ncount = 1,
|
||||
min_elevation = 1,
|
||||
near_nodes = {"default:water_source", "default:river_water_source"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_max = -1.0,
|
||||
humidity_min = 1.0,
|
||||
temp_max = -1.0,
|
||||
temp_min = 1.0,
|
||||
},
|
||||
abstract_ferns.grow_giant_tree_fern
|
||||
)
|
||||
abstract_ferns.grow_giant_tree_fern
|
||||
)
|
||||
end
|
||||
|
@ -8,6 +8,8 @@
|
||||
-- Supports: dryplants, stoneage, sumpf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_horsetails == true)
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("ferns")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -69,45 +71,101 @@ end
|
||||
|
||||
create_nodes()
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Spawning
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if abstract_ferns.config.enable_horsetails_spawning == true then
|
||||
minetest.register_abm({
|
||||
nodenames = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_coniferous_litter",
|
||||
"default:desert_sand",
|
||||
"default:sand",
|
||||
"dryplants:grass_short",
|
||||
"stoneage:grass_with_silex",
|
||||
"default:mossycobble",
|
||||
"default:gravel"
|
||||
},
|
||||
interval = 1200,
|
||||
chance = 400,
|
||||
label = "[ferns] spawn horsetails",
|
||||
min_y = 1,
|
||||
max_y = 48,
|
||||
action = function(pos, node)
|
||||
local p_top = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local n_top = minetest.get_node_or_nil(p_top)
|
||||
if not n_top or n_top.name ~= "air" then return end
|
||||
|
||||
local NEAR_DST = 2
|
||||
if #minetest.find_nodes_in_area(
|
||||
{x=pos.x-NEAR_DST, y=pos.y-1, z=pos.z-NEAR_DST},
|
||||
{x=pos.x+NEAR_DST, y=pos.y+1, z=pos.z+NEAR_DST},
|
||||
{"default:water_source","default:river_water_source","default:gravel"}
|
||||
) < 1 then return
|
||||
end
|
||||
|
||||
local plant_to_spawn = node_names[math.random(1, #node_names)]
|
||||
|
||||
minetest.swap_node(p_top, {name = plant_to_spawn, param2 = 0})
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Generating
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_decoration({ -- near trees (woodlands)
|
||||
decoration = node_names,
|
||||
deco_type = "simple",
|
||||
flags = "all_floors",
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_coniferous_litter",
|
||||
"sumpf:sumpf"
|
||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = 35,
|
||||
rarity = 40,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {
|
||||
"group:water", -- likes water (of course)
|
||||
"default:gravel", -- near those on gravel
|
||||
"default:sand", -- some like sand
|
||||
"default:clay", -- some like clay
|
||||
"stoneage:grass_with_silex",
|
||||
"default:mossycobble",
|
||||
"default:cobble",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
near_nodes_size = 3,
|
||||
near_nodes_vertical = 2,--3,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C
|
||||
temp_min = 0.53, -- 0 °C, dies back in winter
|
||||
--random_facedir = { 0, 179 },
|
||||
},
|
||||
y_min = 1, -- above sea level
|
||||
spawn_by = {
|
||||
"group:water", -- likes water (of course)
|
||||
"default:gravel", -- near those on gravel
|
||||
"default:sand", -- some like sand
|
||||
"default:clay", -- some like clay
|
||||
"stoneage:grass_with_silex",
|
||||
"default:mossycobble",
|
||||
"default:cobble",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
num_spawn_by = 1,
|
||||
fill_ratio = 0.1,
|
||||
})
|
||||
node_names
|
||||
)
|
||||
end
|
||||
|
||||
minetest.register_decoration({ -- near trees (woodlands)
|
||||
decoration = node_names,
|
||||
deco_type = "simple",
|
||||
flags = "all_floors",
|
||||
place_on = {
|
||||
"default:gravel", -- roots go deep
|
||||
"default:mossycobble",
|
||||
"stoneage:dirt_with_silex",
|
||||
"stoneage:grass_with_silex",
|
||||
"stoneage:sand_with_silex", -- roots go deep
|
||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:gravel", -- roots go deep
|
||||
"default:mossycobble",
|
||||
"stoneage:dirt_with_silex",
|
||||
"stoneage:grass_with_silex",
|
||||
"stoneage:sand_with_silex", -- roots go deep
|
||||
},
|
||||
max_count = 35,
|
||||
rarity = 20,
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
humidity_min = 0.4,
|
||||
temp_max = -0.5, -- 55 °C
|
||||
temp_min = 0.53, -- 0 °C, dies back in winter
|
||||
--random_facedir = { 0, 179 },
|
||||
},
|
||||
y_min = 1, -- above sea level
|
||||
fill_ratio = 0.1,
|
||||
})
|
||||
node_names
|
||||
)
|
||||
end
|
||||
|
@ -1,7 +1,21 @@
|
||||
abstract_ferns = {}
|
||||
|
||||
dofile(minetest.get_modpath("ferns").."/fern.lua")
|
||||
dofile(minetest.get_modpath("ferns").."/horsetail.lua")
|
||||
dofile(minetest.get_modpath("ferns").."/treefern.lua")
|
||||
dofile(minetest.get_modpath("ferns").."/gianttreefern.lua")
|
||||
dofile(minetest.get_modpath("ferns").."/settings.lua")
|
||||
|
||||
if abstract_ferns.config.enable_lady_fern == true then
|
||||
dofile(minetest.get_modpath("ferns").."/fern.lua")
|
||||
end
|
||||
|
||||
if abstract_ferns.config.enable_horsetails == true then
|
||||
dofile(minetest.get_modpath("ferns").."/horsetail.lua")
|
||||
end
|
||||
|
||||
if abstract_ferns.config.enable_treefern == true then
|
||||
dofile(minetest.get_modpath("ferns").."/treefern.lua")
|
||||
end
|
||||
|
||||
if abstract_ferns.config.enable_giant_treefern == true then
|
||||
dofile(minetest.get_modpath("ferns").."/gianttreefern.lua")
|
||||
end
|
||||
|
||||
dofile(minetest.get_modpath("ferns").."/crafting.lua")
|
||||
|
@ -1,2 +1,2 @@
|
||||
name = ferns
|
||||
depends = default
|
||||
depends = default, biome_lib
|
||||
|
43
ferns/settings.lua
Normal file
@ -0,0 +1,43 @@
|
||||
-- In case you don't wanna have errors:
|
||||
|
||||
-- Only change what's behind a "=" (or "--").
|
||||
-- Don't use caps (behind a "=").
|
||||
|
||||
-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around).
|
||||
-- Spelling is important.
|
||||
-- If "true" or "false" is necessary as setting, everything(!) which is not spelled "true" will be read as if it were "false" (even "1", "True"...)
|
||||
|
||||
-- If you wanna comment something (for example to remember the default value), you can do this by putting "--" in front of the comment.
|
||||
-- You can put "--" at the end of a line with "=" in it, or at the beginning of an empty/new line (minetest will ignore what's behind it then).
|
||||
-- But don't put "--" in front of a line with "=" in it (or else minetest will ignore the setting and you might get an error).
|
||||
|
||||
-- If something is still unclear, don't hesitate to post your question @ https://forum.minetest.net/viewtopic.php?id=6921
|
||||
|
||||
abstract_ferns.config = {}
|
||||
|
||||
-- Which plants should generate/spawn?
|
||||
abstract_ferns.config.enable_lady_fern = true
|
||||
abstract_ferns.config.enable_horsetails = true
|
||||
abstract_ferns.config.enable_treefern = true
|
||||
abstract_ferns.config.enable_giant_treefern = true
|
||||
|
||||
-- Where should they generate/spawn? (if they generate/spawn)
|
||||
--
|
||||
-- Lady-Fern
|
||||
abstract_ferns.config.lady_ferns_near_tree = true
|
||||
abstract_ferns.config.lady_ferns_near_rock = true
|
||||
abstract_ferns.config.lady_ferns_near_ores = true -- if there's a bunch of ferns there's ores nearby, this one causes a huge fps drop
|
||||
abstract_ferns.config.lady_ferns_in_groups = false -- this one is meant as a replacement of Ferns_near_Ores: ferns tend to generate in groups, less fps drop, no hint for nearby ores
|
||||
--
|
||||
-- Horsetails
|
||||
abstract_ferns.config.enable_horsetails_spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel
|
||||
abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod)
|
||||
abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod)
|
||||
--
|
||||
-- Tree_Fern
|
||||
abstract_ferns.config.enable_treeferns_in_jungle = true
|
||||
abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches
|
||||
--
|
||||
-- Giant_Tree_Fern
|
||||
abstract_ferns.config.enable_giant_treeferns_in_jungle = true
|
||||
abstract_ferns.config.enable_giant_treeferns_in_oases = true -- for oases and tropical beaches
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 765 B |
BIN
ferns/textures/not_in_use/archaeplantae_horsetails.png
Normal file
After Width: | Height: | Size: 308 B |
BIN
ferns/textures/not_in_use/big picture 3.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
ferns/textures/not_in_use/ferns_fern_big_left.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
ferns/textures/not_in_use/ferns_fern_big_right.png
Normal file
After Width: | Height: | Size: 623 B |
BIN
ferns/textures/not_in_use/ferns_fern_mid_left.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
ferns/textures/not_in_use/ferns_fern_mid_right.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
ferns/textures/not_in_use/ferns_fern_tree_bl.png
Normal file
After Width: | Height: | Size: 554 B |
BIN
ferns/textures/not_in_use/ferns_fern_tree_br.png
Normal file
After Width: | Height: | Size: 544 B |
BIN
ferns/textures/not_in_use/ferns_fern_trunk_big_crown.png
Normal file
After Width: | Height: | Size: 681 B |
BIN
ferns/textures/old/archaeplantae_fern_old4.png
Normal file
After Width: | Height: | Size: 368 B |
BIN
ferns/textures/old/comb.png
Normal file
After Width: | Height: | Size: 112 B |
BIN
ferns/textures/old/ferns_5_old.png
Normal file
After Width: | Height: | Size: 461 B |
BIN
ferns/textures/old/ferns_6_old.png
Normal file
After Width: | Height: | Size: 700 B |
BIN
ferns/textures/old/ferns_7_old.png
Normal file
After Width: | Height: | Size: 677 B |