From 16cc62a1d4d7c02a84b2ddc1538f5e81404b415c Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 5 Jul 2015 10:54:18 +0100 Subject: Code tidy and tweak --- potato.lua | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) (limited to 'potato.lua') diff --git a/potato.lua b/potato.lua index 9d4a4a7..fb13d99 100644 --- a/potato.lua +++ b/potato.lua @@ -35,8 +35,11 @@ minetest.register_node("farming:potato_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(), }) @@ -49,8 +52,11 @@ minetest.register_node("farming:potato_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(), }) @@ -62,19 +68,21 @@ minetest.register_node("farming:potato_3", { waving = 1, walkable = false, buildable_to = true, - is_ground_content = true, drop = { items = { - {items = {'farming:potato'},rarity=1}, - {items = {'farming:potato'},rarity=3}, + {items = {'farming:potato'}, rarity = 1}, + {items = {'farming:potato'}, 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,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 Potato growth doesnnot 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:potato_4", { drawtype = "plantlike", @@ -84,14 +92,16 @@ minetest.register_node("farming:potato_4", { waving = 1, walkable = false, buildable_to = true, - is_ground_content = true, drop = { items = { - {items = {'farming:potato 2'},rarity=1}, - {items = {'farming:potato 3'},rarity=2}, + {items = {'farming:potato 2'}, rarity = 1}, + {items = {'farming:potato 3'}, rarity = 2}, } }, - 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 -- cgit v1.2.3