0
0
Fork 0

Add flower_pot group

This commit is contained in:
Wuzzy 2017-02-10 22:00:39 +01:00
parent 9c0a5373f9
commit 817368f023
2 changed files with 6 additions and 3 deletions

3
API.md
View File

@ -64,6 +64,9 @@ These groups are used mostly for informational purposes
* `fence_gate=1`: Fence gate * `fence_gate=1`: Fence gate
* `fence_wood=1`: Wooden fence * `fence_wood=1`: Wooden fence
* `fence_nether_brick=1`: Nether brick fence * `fence_nether_brick=1`: Nether brick fence
* `flower_pot`: Flower pot
* `flower_pot=1`: Empty flower pot
* `flower_pot=2`: Flower pot with a plant or flower
* `clock=1`: Clock * `clock=1`: Clock
* `compass`: Compass (rating doesn't matter) * `compass`: Compass (rating doesn't matter)
* `book=1`: Book * `book=1`: Book

View File

@ -47,7 +47,7 @@ minetest.register_node("mcl_flowerpots:flower_pot", {
fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2}
}, },
inventory_image = "mcl_flowerpots_flowerpot_inventory.png", inventory_image = "mcl_flowerpots_flowerpot_inventory.png",
groups = {dig_immediate=3,deco_block=1,attached_node=1}, groups = {dig_immediate=3, deco_block=1, attached_node=1, flower_pot=1},
sounds = mcl_core.node_sound_stone_defaults(), sounds = mcl_core.node_sound_stone_defaults(),
on_rightclick = function(pos, node, clicker, itemstack) on_rightclick = function(pos, node, clicker, itemstack)
local item = clicker:get_wielded_item():get_name() local item = clicker:get_wielded_item():get_name()
@ -106,7 +106,7 @@ minetest.register_node("mcl_flowerpots:flower_pot_"..flower, {
type = "fixed", type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2}
}, },
groups = {dig_immediate=3, attached_node=1,not_in_creative_inventory=1}, groups = {dig_immediate=3, attached_node=1, not_in_creative_inventory=1, flower_pot=2},
sounds = mcl_core.node_sound_stone_defaults(), sounds = mcl_core.node_sound_stone_defaults(),
on_rightclick = function(pos, item, clicker) on_rightclick = function(pos, item, clicker)
minetest.add_item({x=pos.x, y=pos.y+0.5, z=pos.z}, flower_node) minetest.add_item({x=pos.x, y=pos.y+0.5, z=pos.z}, flower_node)
@ -142,7 +142,7 @@ minetest.register_node("mcl_flowerpots:flower_pot_"..flower, {
type = "fixed", type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2}
}, },
groups = {dig_immediate=3, attached_node=1,not_in_creative_inventory=1}, groups = {dig_immediate=3, attached_node=1, not_in_creative_inventory=1, flower_pot=2},
sounds = mcl_core.node_sound_stone_defaults(), sounds = mcl_core.node_sound_stone_defaults(),
on_rightclick = function(pos, item, clicker) on_rightclick = function(pos, item, clicker)
minetest.add_item({x=pos.x, y=pos.y+0.5, z=pos.z}, flower_node) minetest.add_item({x=pos.x, y=pos.y+0.5, z=pos.z}, flower_node)