forked from mtcontrib/farming
Code tweak and tidy
This commit is contained in:
parent
16cc62a1d4
commit
928dad3c4c
74
carrot.lua
74
carrot.lua
@ -35,12 +35,14 @@ minetest.register_node("farming:carrot_1", {
|
|||||||
tiles = {"farming_carrot_1.png"},
|
tiles = {"farming_carrot_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
selection_box = farming.select,
|
||||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
groups = {
|
||||||
|
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
|
not_in_creative_inventory = 1, growing = 1
|
||||||
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -49,12 +51,14 @@ minetest.register_node("farming:carrot_2", {
|
|||||||
tiles = {"farming_carrot_2.png"},
|
tiles = {"farming_carrot_2.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
selection_box = farming.select,
|
||||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
groups = {
|
||||||
|
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
|
not_in_creative_inventory = 1, growing = 1
|
||||||
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -63,12 +67,14 @@ minetest.register_node("farming:carrot_3", {
|
|||||||
tiles = {"farming_carrot_3.png"},
|
tiles = {"farming_carrot_3.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
selection_box = farming.select,
|
||||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
groups = {
|
||||||
|
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
|
not_in_creative_inventory = 1, growing = 1
|
||||||
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -77,12 +83,14 @@ minetest.register_node("farming:carrot_4", {
|
|||||||
tiles = {"farming_carrot_4.png"},
|
tiles = {"farming_carrot_4.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
selection_box = farming.select,
|
||||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
groups = {
|
||||||
|
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
|
not_in_creative_inventory = 1, growing = 1
|
||||||
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -95,8 +103,11 @@ minetest.register_node("farming:carrot_5", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
selection_box = farming.select,
|
||||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
groups = {
|
||||||
|
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
|
not_in_creative_inventory = 1, growing = 1
|
||||||
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -109,8 +120,11 @@ minetest.register_node("farming:carrot_6", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
drop = "",
|
drop = "",
|
||||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
selection_box = farming.select,
|
||||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
groups = {
|
||||||
|
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
|
not_in_creative_inventory = 1, growing = 1
|
||||||
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -122,19 +136,21 @@ minetest.register_node("farming:carrot_7", {
|
|||||||
waving = 1,
|
waving = 1,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
is_ground_content = true,
|
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {'farming:carrot'},rarity=1},
|
{items = {'farming:carrot'}, rarity = 1},
|
||||||
{items = {'farming:carrot 2'},rarity=3},
|
{items = {'farming:carrot 2'}, rarity = 3},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
selection_box = farming.select,
|
||||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
groups = {
|
||||||
|
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
|
not_in_creative_inventory = 1, growing = 1
|
||||||
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
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", {
|
minetest.register_node("farming:carrot_8", {
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
@ -144,14 +160,16 @@ minetest.register_node("farming:carrot_8", {
|
|||||||
waving = 1,
|
waving = 1,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
is_ground_content = true,
|
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {'farming:carrot 2'},rarity=1},
|
{items = {'farming:carrot 2'}, rarity = 1},
|
||||||
{items = {'farming:carrot 3'},rarity=2},
|
{items = {'farming:carrot 3'}, rarity = 2},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
selection_box = farming.select,
|
||||||
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
|
groups = {
|
||||||
|
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
|
||||||
|
not_in_creative_inventory = 1
|
||||||
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user