Add beetroot items

This commit is contained in:
Wuzzy 2017-02-06 18:29:13 +01:00
parent db84957be4
commit 282e14cc18
9 changed files with 37 additions and 30 deletions

View File

@ -4,15 +4,35 @@ minetest.register_craftitem("mcl_farming:beetroot_seeds", {
inventory_image = "mcl_farming_beetroot_seeds.png",
wield_image = "mcl_farming_beetroot_seeds.png",
on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:beetroot_1")
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:beetroot_0")
end
})
minetest.register_node("mcl_farming:beetroot_0", {
paramtype = "light",
walkable = false,
drawtype = "plantlike",
drop = "",
tiles = {"mcl_farming_beetroot_0.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_core.node_sound_leaves_defaults(),
})
minetest.register_node("mcl_farming:beetroot_1", {
paramtype = "light",
walkable = false,
drawtype = "plantlike",
drop = "",
drop = {
items = {
{ items = {"mcl_farming:beetroot_seeds"}, rarity = 5 },
},
},
tiles = {"mcl_farming_beetroot_1.png"},
selection_box = {
type = "fixed",
@ -20,7 +40,7 @@ minetest.register_node("mcl_farming:beetroot_1", {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
groups = {snappy=3, not_in_creative_inventory=1,dig_by_water=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_core.node_sound_leaves_defaults(),
})
@ -28,31 +48,19 @@ minetest.register_node("mcl_farming:beetroot_2", {
paramtype = "light",
walkable = false,
drawtype = "plantlike",
drop = "",
tiles = {"mcl_farming_beetroot_2.png"},
drop = {
items = {
{ items = {"mcl_farming:beetroot_seeds"}, rarity = 4 },
},
},
tiles = {"farming_carrot_2.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
groups = {snappy=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_core.node_sound_leaves_defaults(),
})
minetest.register_node("mcl_farming:beetroot_3", {
paramtype = "light",
walkable = false,
drawtype = "plantlike",
drop = "",
tiles = {"farming_carrot_3.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
groups = {snappy=3, not_in_creative_inventory=1,dig_by_water=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_core.node_sound_leaves_defaults(),
})
@ -64,19 +72,19 @@ minetest.register_node("mcl_farming:beetroot", {
max_items = 2,
items = {
{ items = {"mcl_farming:beetroot_item"}, rarity = 1 },
{ items = {"mcl_farming:beetroot_seed 3"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seed 2"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seed 1"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seeds 3"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seeds 2"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seeds 1"}, rarity = 4 },
},
},
tiles = {"mcl_farming_beetroot_4.png"},
tiles = {"mcl_farming_beetroot_3.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
groups = {snappy=3, not_in_creative_inventory=1,dig_by_water=1},
groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_core.node_sound_leaves_defaults(),
})
@ -106,4 +114,4 @@ minetest.register_craft({
},
})
mcl_farming:add_plant("mcl_farming:beetroot", {"mcl_farming:beetroot_1", "mcl_farming:beetroot_2", "mcl_farming:beetroot_3", "mcl_farming:beetroot_4"}, 68, 3)
mcl_farming:add_plant("mcl_farming:beetroot", {"mcl_farming:beetroot_0", "mcl_farming:beetroot_1", "mcl_farming:beetroot_2"}, 68, 3)

View File

@ -92,8 +92,7 @@ dofile(minetest.get_modpath("mcl_farming").."/potatoes.lua")
dofile(minetest.get_modpath("mcl_farming").."/mushrooms.lua")
-- ========= BEETROOT =========
-- TODO: Add beetroot textures
--dofile(minetest.get_modpath("mcl_farming").."/beetroot.lua")
dofile(minetest.get_modpath("mcl_farming").."/beetroot.lua")
local time_to_load= os.clock() - init
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB