mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Add bonemealing callback for double flowers.
* Adds a _mcl_on_bonemealing callback to the double flowers.
This commit is contained in:
parent
fdc7f4634d
commit
ea1d52baab
1 changed files with 8 additions and 0 deletions
|
@ -243,10 +243,16 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
||||||
if name == "double_grass" then
|
if name == "double_grass" then
|
||||||
bottom_groups.compostability = 50
|
bottom_groups.compostability = 50
|
||||||
end
|
end
|
||||||
|
local on_bonemealing
|
||||||
if is_flower then
|
if is_flower then
|
||||||
bottom_groups.flower = 1
|
bottom_groups.flower = 1
|
||||||
bottom_groups.place_flowerlike = 1
|
bottom_groups.place_flowerlike = 1
|
||||||
bottom_groups.dig_immediate = 3
|
bottom_groups.dig_immediate = 3
|
||||||
|
on_bonemealing = function(pointed_thing, placer)
|
||||||
|
local pos = pointed_thing.under
|
||||||
|
minetest.add_item(pos, "mcl_flowers:"..name)
|
||||||
|
return true
|
||||||
|
end
|
||||||
else
|
else
|
||||||
bottom_groups.place_flowerlike = 2
|
bottom_groups.place_flowerlike = 2
|
||||||
bottom_groups.handy = 1
|
bottom_groups.handy = 1
|
||||||
|
@ -381,6 +387,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
||||||
minetest.remove_node(top)
|
minetest.remove_node(top)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
_mcl_on_bonemealing = on_bonemealing,
|
||||||
groups = bottom_groups,
|
groups = bottom_groups,
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
mesh = mesh
|
mesh = mesh
|
||||||
|
@ -419,6 +426,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
||||||
minetest.remove_node(bottom)
|
minetest.remove_node(bottom)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
_mcl_on_bonemealing = on_bonemealing,
|
||||||
groups = top_groups,
|
groups = top_groups,
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue