Uproot plant when mycelium spreads to dirt below

This commit is contained in:
Wuzzy 2017-05-14 00:42:20 +02:00
parent 6221b060fc
commit 04478e5cd3
4 changed files with 38 additions and 33 deletions

View file

@ -18,7 +18,7 @@ local function add_simple_flower(name, desc, image, simple_selection_box)
paramtype = "light",
walkable = false,
stack_max = 64,
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,dig_by_water=1,dig_by_piston=1,deco_block=1},
groups = {dig_immediate=3,flammable=2,flower=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
@ -66,7 +66,7 @@ minetest.register_node("mcl_flowers:tallgrass", {
buildable_to = true,
is_ground_content = true,
-- CHECKME: How does tall grass behave when pushed by a piston?
groups = {dig_immediate=3, flammable=3,attached_node=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3, flammable=3,attached_node=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = wheat_seed_drop,
after_dig_node = function(pos, oldnode, oldmetadata, user)
@ -92,7 +92,7 @@ minetest.register_node("mcl_flowers:fern", {
walkable = false,
stack_max = 64,
-- CHECKME: How does a fern behave when pushed by a piston?
groups = {dig_immediate=3,flammable=2,attached_node=1,dig_by_water=1,deco_block=1},
groups = {dig_immediate=3,flammable=2,attached_node=1,non_mycelium_plant=1,dig_by_water=1,deco_block=1},
buildable_to = true,
sounds = mcl_sounds.node_sound_leaves_defaults(),
after_dig_node = function(pos, oldnode, oldmetadata, user)
@ -170,7 +170,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
minetest.remove_node(top)
end
end,
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1, dig_by_water=1,dig_by_piston=1, double_plant=1,deco_block=1},
groups = {dig_immediate=3,flammable=2,flower=1,non_mycelium_plant=1,attached_node=1, dig_by_water=1,dig_by_piston=1, double_plant=1,deco_block=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
})
@ -193,7 +193,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
minetest.dig_node(bottom)
end
end,
groups = {dig_immediate=3,flammable=2,flower=1, dig_by_water=1,dig_by_piston=1, not_in_creative_inventory = 1, double_plant=2},
groups = {dig_immediate=3,flammable=2,flower=1,non_mycelium_plant=1,dig_by_water=1,dig_by_piston=1, not_in_creative_inventory = 1, double_plant=2},
sounds = mcl_sounds.node_sound_leaves_defaults(),
})