summaryrefslogtreecommitdiff
path: root/blueberry.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2015-07-05 10:54:18 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2015-07-05 10:54:18 +0100
commit16cc62a1d4d7c02a84b2ddc1538f5e81404b415c (patch)
tree529f3a26bdc2d8e71427771e3516a334d9a9d909 /blueberry.lua
parent6e4fa56475b4375655befc61ef868bd39a1f2a5d (diff)
Code tidy and tweak
Diffstat (limited to 'blueberry.lua')
-rw-r--r--blueberry.lua40
1 files changed, 25 insertions, 15 deletions
diff --git a/blueberry.lua b/blueberry.lua
index 6b3422d..f785c23 100644
--- a/blueberry.lua
+++ b/blueberry.lua
@@ -32,12 +32,14 @@ minetest.register_node("farming:blueberry_1", {
tiles = {"farming_blueberry_1.png"},
paramtype = "light",
sunlight_propagates = true,
- waving = 1,
walkable = false,
buildable_to = true,
drop = "",
- selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
- groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ selection_box = farming.select,
+ groups = {
+ snappy = 3, flammable = 2, plant = 1, attached_node = 1,
+ not_in_creative_inventory = 1, growing = 1
+ },
sounds = default.node_sound_leaves_defaults(),
})
@@ -50,8 +52,11 @@ minetest.register_node("farming:blueberry_2", {
walkable = false,
buildable_to = true,
drop = "",
- selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
- groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ selection_box = farming.select,
+ groups = {
+ snappy = 3, flammable = 2, plant = 1, attached_node = 1,
+ not_in_creative_inventory = 1, growing = 1
+ },
sounds = default.node_sound_leaves_defaults(),
})
@@ -64,12 +69,15 @@ minetest.register_node("farming:blueberry_3", {
walkable = false,
buildable_to = true,
drop = "",
- selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
- groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ selection_box = farming.select,
+ groups = {
+ snappy = 3, flammable = 2, plant = 1, attached_node = 1,
+ not_in_creative_inventory = 1, growing = 1
+ },
sounds = default.node_sound_leaves_defaults(),
})
--- Last stage of Blueberry growth does not have growing=1 so abm never has to check these
+-- Last stage of growth does not have growing group so abm never checks these
minetest.register_node("farming:blueberry_4", {
drawtype = "plantlike",
@@ -79,15 +87,17 @@ minetest.register_node("farming:blueberry_4", {
waving = 1,
walkable = false,
buildable_to = true,
- is_ground_content = true,
drop = {
items = {
- {items = {'farming:blueberries 2'},rarity=1},
- {items = {'farming:blueberries'},rarity=2},
- {items = {'farming:blueberries'},rarity=3},
+ {items = {'farming:blueberries 2'}, rarity = 1},
+ {items = {'farming:blueberries'}, rarity = 2},
+ {items = {'farming:blueberries'}, rarity = 3},
}
},
- selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
- groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ selection_box = farming.select,
+ groups = {
+ snappy = 3, flammable = 2, plant = 1, attached_node = 1,
+ not_in_creative_inventory=1
+ },
sounds = default.node_sound_leaves_defaults(),
-})
+}) \ No newline at end of file