diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2015-07-05 10:54:18 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2015-07-05 10:54:18 +0100 |
commit | 16cc62a1d4d7c02a84b2ddc1538f5e81404b415c (patch) | |
tree | 529f3a26bdc2d8e71427771e3516a334d9a9d909 /wheat.lua | |
parent | 6e4fa56475b4375655befc61ef868bd39a1f2a5d (diff) |
Code tidy and tweak
Diffstat (limited to 'wheat.lua')
-rw-r--r-- | wheat.lua | 90 |
1 files changed, 56 insertions, 34 deletions
@@ -22,7 +22,7 @@ minetest.register_node("farming:seed_wheat", { paramtype2 = "wallmounted", walkable = false, sunlight_propagates = true, - selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, + selection_box = farming.select, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:wheat_1") end, @@ -41,7 +41,7 @@ minetest.register_node("farming:straw", { description = "Straw", tiles = {"farming_straw.png"}, is_ground_content = false, - groups = {snappy=3, flammable=4}, + groups = {snappy = 3, flammable = 4}, sounds = default.node_sound_leaves_defaults(), }) @@ -96,12 +96,14 @@ minetest.register_node("farming:wheat_1", { tiles = {"farming_wheat_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(), }) @@ -110,12 +112,14 @@ minetest.register_node("farming:wheat_2", { tiles = {"farming_wheat_2.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(), }) @@ -128,8 +132,11 @@ minetest.register_node("farming:wheat_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(), }) @@ -142,8 +149,11 @@ minetest.register_node("farming:wheat_4", { 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(), }) @@ -157,12 +167,15 @@ minetest.register_node("farming:wheat_5", { buildable_to = true, drop = { items = { - {items = {'farming:wheat'},rarity=2}, - {items = {'farming:seed_wheat'},rarity=2}, + {items = {'farming:wheat'}, rarity = 2}, + {items = {'farming:seed_wheat'}, 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,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(), }) @@ -176,12 +189,15 @@ minetest.register_node("farming:wheat_6", { buildable_to = true, drop = { items = { - {items = {'farming:wheat'},rarity=2}, - {items = {'farming:seed_wheat'},rarity=1}, + {items = {'farming:wheat'}, rarity = 2}, + {items = {'farming:seed_wheat'}, rarity = 1}, } }, - 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(), }) @@ -195,18 +211,21 @@ minetest.register_node("farming:wheat_7", { buildable_to = true, drop = { items = { - {items = {'farming:wheat'},rarity=1}, - {items = {'farming:wheat'},rarity=3}, - {items = {'farming:seed_wheat'},rarity=1}, - {items = {'farming:seed_wheat'},rarity=3}, + {items = {'farming:wheat'}, rarity = 1}, + {items = {'farming:wheat'}, rarity = 3}, + {items = {'farming:seed_wheat'}, rarity = 1}, + {items = {'farming:seed_wheat'}, 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 Wheat 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:wheat_8", { drawtype = "plantlike", @@ -217,13 +236,16 @@ minetest.register_node("farming:wheat_8", { buildable_to = true, drop = { items = { - {items = {'farming:wheat'},rarity=1}, - {items = {'farming:wheat'},rarity=2}, - {items = {'farming:seed_wheat'},rarity=1}, - {items = {'farming:seed_wheat'},rarity=2}, + {items = {'farming:wheat'}, rarity = 1}, + {items = {'farming:wheat'}, rarity = 2}, + {items = {'farming:seed_wheat'}, rarity = 1}, + {items = {'farming:seed_wheat'}, 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 |