Compare commits
4 Commits
cd93d09d01
...
master
Author | SHA1 | Date | |
---|---|---|---|
ef7d33f740 | |||
5a8794cd84 | |||
f629f54d43 | |||
455f891275 |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.0 KiB |
@ -314,6 +314,4 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
for _, pos in ipairs(locations) do
|
||||
grow_youngtree2(pos)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.log("action", "[bushes] loaded.")
|
||||
end)
|
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 657 B |
Before Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 83 B |
Before Width: | Height: | Size: 525 B |
@ -4,8 +4,6 @@ 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
|
||||
@ -65,7 +63,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 random(1,3) == 1 then
|
||||
if can_harvest and math.random(1,3) == 1 then
|
||||
amount = "2"
|
||||
else
|
||||
amount = "1"
|
||||
@ -77,7 +75,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
elseif groupcaps.choppy then
|
||||
|
||||
-- the amount of sticks may vary
|
||||
local amount = random(4, 20)
|
||||
local amount = math.random(4, 20)
|
||||
-- return some sticks
|
||||
harvested = "default:stick " .. amount
|
||||
|
||||
@ -138,7 +136,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 random(1,3) == 1) then
|
||||
if is_soil and (dirt.name == "farming:soil_wet" or math.random(1,3) == 1) then
|
||||
minetest.swap_node( pos, {name = "bushes:" .. bush_name .. "_bush"})
|
||||
end
|
||||
end
|
||||
@ -161,6 +159,7 @@ 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,
|
||||
})
|
||||
|
||||
|
||||
@ -212,4 +211,5 @@ minetest.register_node(":bushes:basket_empty", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = { dig_immediate = 3 },
|
||||
is_ground_content = false,
|
||||
})
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 6.7 KiB |
@ -1,8 +1,6 @@
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
local random = math.random
|
||||
|
||||
--Rocks
|
||||
|
||||
local cbox = {
|
||||
@ -17,12 +15,12 @@ minetest.register_node("cavestuff:pebble_1",{
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, dig_immediate=3},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:pebble_"..random(1,2))
|
||||
local stack = ItemStack("cavestuff:pebble_"..math.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,
|
||||
@ -36,7 +34,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},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1, dig_immediate=3},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -49,12 +47,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},
|
||||
groups = {cracky=3, stone=1, attached_node=1, dig_immediate=3},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:desert_pebble_"..random(1,2))
|
||||
local stack = ItemStack("cavestuff:desert_pebble_"..math.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,
|
||||
@ -68,7 +66,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},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1, dig_immediate=3},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -80,6 +78,7 @@ 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",
|
||||
@ -126,6 +125,7 @@ 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,6 +144,7 @@ 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,6 +119,7 @@ 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(),
|
||||
})
|
||||
|
||||
@ -151,6 +152,7 @@ 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,6 +44,7 @@ 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(),
|
||||
})
|
||||
|
||||
@ -72,6 +73,7 @@ minetest.register_node("dryplants:wetreed_roof", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -194,6 +196,7 @@ minetest.register_node("dryplants:wetreed_roof_corner", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -224,6 +227,7 @@ minetest.register_node("dryplants:wetreed_roof_corner_2", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -263,6 +267,7 @@ 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(),
|
||||
})
|
||||
|
||||
@ -284,6 +289,7 @@ 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(),
|
||||
})
|
||||
|
||||
@ -312,6 +318,7 @@ minetest.register_node("dryplants:reed_roof", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -342,6 +349,7 @@ minetest.register_node("dryplants:reed_roof_corner", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -372,5 +380,6 @@ minetest.register_node("dryplants:reed_roof_corner_2", {
|
||||
}
|
||||
},
|
||||
groups = {snappy=3, flammable=2},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
@ -88,6 +88,7 @@ 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 = {
|
||||
@ -110,6 +111,7 @@ 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 = {
|
||||
@ -133,6 +135,7 @@ 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 = {
|
||||
@ -156,6 +159,7 @@ 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 = {
|
||||
@ -179,6 +183,7 @@ 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 = {
|
||||
@ -201,6 +206,7 @@ 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 = {
|
||||
@ -231,6 +237,7 @@ 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 = {
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 621 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 665 B |
Before Width: | Height: | Size: 362 B |
Before Width: | Height: | Size: 708 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 102 B |
Before Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 823 B |
Before Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 734 B |
Before Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 569 B |
@ -138,6 +138,7 @@ 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 = {
|
||||
@ -179,6 +180,7 @@ 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,6 +219,7 @@ 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(),
|
||||
})
|
||||
@ -255,6 +258,7 @@ 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(),
|
||||
})
|
||||
@ -281,17 +285,15 @@ 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_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,
|
||||
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,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 671 B |
Before Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 640 B |
Before Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 461 B |
Before Width: | Height: | Size: 700 B |
Before Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 669 B |
Before Width: | Height: | Size: 814 B |
Before Width: | Height: | Size: 714 B |