Code tweak and tidy

This commit is contained in:
TenPlus1 2015-07-05 11:01:44 +01:00
parent 16cc62a1d4
commit 928dad3c4c
1 changed files with 46 additions and 28 deletions

View File

@ -35,12 +35,14 @@ minetest.register_node("farming:carrot_1", {
tiles = {"farming_carrot_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(),
})
@ -49,12 +51,14 @@ minetest.register_node("farming:carrot_2", {
tiles = {"farming_carrot_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(),
})
@ -63,12 +67,14 @@ minetest.register_node("farming:carrot_3", {
tiles = {"farming_carrot_3.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(),
})
@ -77,12 +83,14 @@ minetest.register_node("farming:carrot_4", {
tiles = {"farming_carrot_4.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(),
})
@ -95,8 +103,11 @@ minetest.register_node("farming:carrot_5", {
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(),
})
@ -109,8 +120,11 @@ minetest.register_node("farming:carrot_6", {
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(),
})
@ -122,19 +136,21 @@ minetest.register_node("farming:carrot_7", {
waving = 1,
walkable = false,
buildable_to = true,
is_ground_content = true,
drop = {
items = {
{items = {'farming:carrot'},rarity=1},
{items = {'farming:carrot 2'},rarity=3},
{items = {'farming:carrot'}, rarity = 1},
{items = {'farming:carrot 2'}, 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 Carrot 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:carrot_8", {
drawtype = "plantlike",
@ -144,14 +160,16 @@ minetest.register_node("farming:carrot_8", {
waving = 1,
walkable = false,
buildable_to = true,
is_ground_content = true,
drop = {
items = {
{items = {'farming:carrot 2'},rarity=1},
{items = {'farming:carrot 3'},rarity=2},
{items = {'farming:carrot 2'}, rarity = 1},
{items = {'farming:carrot 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(),
})
})