diff --git a/mods/mcl_farming/beetroot.lua b/mods/mcl_farming/beetroot.lua index 230725ff7..c0eb3db9a 100644 --- a/mods/mcl_farming/beetroot.lua +++ b/mods/mcl_farming/beetroot.lua @@ -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) diff --git a/mods/mcl_farming/init.lua b/mods/mcl_farming/init.lua index 10664e844..77f489a8c 100644 --- a/mods/mcl_farming/init.lua +++ b/mods/mcl_farming/init.lua @@ -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)) diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot.png b/mods/mcl_farming/textures/mcl_farming_beetroot.png new file mode 100644 index 000000000..e848a4dbb Binary files /dev/null and b/mods/mcl_farming/textures/mcl_farming_beetroot.png differ diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_0.png b/mods/mcl_farming/textures/mcl_farming_beetroot_0.png new file mode 100644 index 000000000..3e3162ab3 Binary files /dev/null and b/mods/mcl_farming/textures/mcl_farming_beetroot_0.png differ diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_1.png b/mods/mcl_farming/textures/mcl_farming_beetroot_1.png new file mode 100644 index 000000000..97be1d028 Binary files /dev/null and b/mods/mcl_farming/textures/mcl_farming_beetroot_1.png differ diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_2.png b/mods/mcl_farming/textures/mcl_farming_beetroot_2.png new file mode 100644 index 000000000..7000e00bc Binary files /dev/null and b/mods/mcl_farming/textures/mcl_farming_beetroot_2.png differ diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_3.png b/mods/mcl_farming/textures/mcl_farming_beetroot_3.png new file mode 100644 index 000000000..aa72b500e Binary files /dev/null and b/mods/mcl_farming/textures/mcl_farming_beetroot_3.png differ diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_seeds.png b/mods/mcl_farming/textures/mcl_farming_beetroot_seeds.png new file mode 100644 index 000000000..929200da5 Binary files /dev/null and b/mods/mcl_farming/textures/mcl_farming_beetroot_seeds.png differ diff --git a/mods/mcl_farming/textures/mcl_farming_beetroot_soup.png b/mods/mcl_farming/textures/mcl_farming_beetroot_soup.png new file mode 100644 index 000000000..8324ea7a1 Binary files /dev/null and b/mods/mcl_farming/textures/mcl_farming_beetroot_soup.png differ