From 3dbc6bd14175e3a38147ccb94173f7ad744c59f1 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Thu, 9 Aug 2018 14:49:06 +0100 Subject: bowls can be used as fuel, glass mixing bowls recycled into glass fragments --- utensils.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utensils.lua b/utensils.lua index 35fe7ed..4a15298 100644 --- a/utensils.lua +++ b/utensils.lua @@ -17,6 +17,12 @@ minetest.register_craft({ } }) +minetest.register_craft({ + type = "fuel", + recipe = "farming:bowl", + burntime = 10, +}) + -- saucepan minetest.register_craftitem("farming:saucepan", { @@ -153,6 +159,5 @@ minetest.register_craft( { output = "vessels:glass_fragments", recipe = { "farming:mixing_bowl", - "farming:mixing_bowl", }, }) -- cgit v1.2.3 From d7965c1784fd36706335dd46ac54688ade89cf5f Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 12 Aug 2018 15:09:44 +0100 Subject: add food_berry group --- compatibility.lua | 2 +- crops/blueberry.lua | 2 +- crops/raspberry.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compatibility.lua b/compatibility.lua index a6a6c59..ba5a169 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -173,4 +173,4 @@ if minetest.get_modpath("bushes_classic") then minetest.register_alias("bushes:raspberry", "farming:raspberries") end -end) \ No newline at end of file +end) diff --git a/crops/blueberry.lua b/crops/blueberry.lua index 500fcde..9581454 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -5,7 +5,7 @@ local S = farming.intllib minetest.register_craftitem("farming:blueberries", { description = S("Blueberries"), inventory_image = "farming_blueberries.png", - groups = {food_blueberries = 1, flammable = 2}, + groups = {food_blueberries = 1, food_berry = 1, flammable = 2}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1") end, diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 931d2ae..08dbd84 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -5,7 +5,7 @@ local S = farming.intllib minetest.register_craftitem("farming:raspberries", { description = S("Raspberries"), inventory_image = "farming_raspberries.png", - groups = {food_raspberries = 1, flammable = 2}, + groups = {food_raspberries = 1, food_berry = 1, flammable = 2}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") end, -- cgit v1.2.3 From 43b1a781792f168bb6898515e09223e65f370241 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 12 Aug 2018 15:17:06 +0100 Subject: added singular and plural grouping to berries --- crops/blueberry.lua | 2 +- crops/raspberry.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crops/blueberry.lua b/crops/blueberry.lua index 9581454..9a30387 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -5,7 +5,7 @@ local S = farming.intllib minetest.register_craftitem("farming:blueberries", { description = S("Blueberries"), inventory_image = "farming_blueberries.png", - groups = {food_blueberries = 1, food_berry = 1, flammable = 2}, + groups = {food_blueberries = 1, food_blueberry = 1, food_berry = 1, flammable = 2}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1") end, diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 08dbd84..713ea2f 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -5,7 +5,7 @@ local S = farming.intllib minetest.register_craftitem("farming:raspberries", { description = S("Raspberries"), inventory_image = "farming_raspberries.png", - groups = {food_raspberries = 1, food_berry = 1, flammable = 2}, + groups = {food_raspberries = 1, food_raspberry = 1, food_berry = 1, flammable = 2}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") end, -- cgit v1.2.3 From aa73d0babac75bf2e2549c5bbbefa89960945610 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 12 Aug 2018 15:24:52 +0100 Subject: remove bushes_classic alias for berries --- compatibility.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compatibility.lua b/compatibility.lua index ba5a169..afa98d6 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -160,7 +160,7 @@ minetest.register_alias("farming_plus:tomato", "farming:tomato_8") -- Weed minetest.register_alias("farming:weed", "default:grass_2") --- Classic Bushes compatibility +--[[ Classic Bushes compatibility if minetest.get_modpath("bushes_classic") then if eth then @@ -171,6 +171,6 @@ if minetest.get_modpath("bushes_classic") then minetest.register_alias("bushes:blueberry", "farming:blueberries") minetest.register_alias("bushes:raspberry", "farming:raspberries") -end +end]] end) -- cgit v1.2.3 From 0c7110403cf30b192549c78654f675ccb31bbc21 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Mon, 13 Aug 2018 21:03:11 +0100 Subject: cocoa pods are no longer walkable --- crops/cocoa.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crops/cocoa.lua b/crops/cocoa.lua index 19e9c6b..ecefcea 100644 --- a/crops/cocoa.lua +++ b/crops/cocoa.lua @@ -113,7 +113,7 @@ local crop_def = { drawtype = "plantlike", tiles = {"farming_cocoa_1.png"}, paramtype = "light", - walkable = true, + walkable = false, drop = { items = { {items = {'farming:cocoa_beans 1'}, rarity = 2}, -- cgit v1.2.3 From 8e03d9761a545407703aba56c1d54a6bf69acc7a Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Mon, 13 Aug 2018 21:37:56 +0100 Subject: pumpkins harvest block, use cutting board to chop into slices --- README.md | 1 + crops/pumpkin.lua | 49 ++++++++++++++++++++++++++----------------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 99ac101..0c3b3e6 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: +- 1.38 - Pumpkin grows into block, use chopping board to cut into slices, cocoa pods are no longer walkable - 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example) - 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes - 1.35 - Deprecated bronze/mese/diamond hoe's, added hoe bomb and deprecated hoe's as lucky block prizes diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index d8e8ec6..4abbe13 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -5,26 +5,6 @@ local S = farming.intllib --- pumpkin -minetest.register_node("farming:pumpkin", { - description = S("Pumpkin"), - tiles = { - "farming_pumpkin_top.png", - "farming_pumpkin_top.png", - "farming_pumpkin_side.png" - }, - groups = { - food_pumpkin = 1, choppy = 1, oddly_breakable_by_hand = 1, - flammable = 2, plant = 1 - }, - drop = { - items = { - {items = {'farming:pumpkin_slice 9'}, rarity = 1}, - } - }, - sounds = default.node_sound_wood_defaults(), -}) - -- pumpkin slice minetest.register_craftitem("farming:pumpkin_slice", { description = S("Pumpkin Slice"), @@ -46,10 +26,10 @@ minetest.register_craft({ }) minetest.register_craft({ + type = "shapeless", output = "farming:pumpkin_slice 9", - recipe = { - {"", "farming:pumpkin", ""}, - } + recipe = {"farming:pumpkin", "farming:cutting_board"}, + replacements = {{"farming:cutting_board", "farming:cutting_board"}}, }) -- jack 'o lantern @@ -201,6 +181,7 @@ crop_def.tiles = {"farming_pumpkin_7.png"} minetest.register_node("farming:pumpkin_7", table.copy(crop_def)) -- stage 8 (final) +--[[ crop_def.tiles = {"farming_pumpkin_8.png"} crop_def.groups.growing = 0 crop_def.drop = { @@ -209,3 +190,25 @@ crop_def.drop = { } } minetest.register_node("farming:pumpkin_8", table.copy(crop_def)) +]] + +minetest.register_node("farming:pumpkin_8", { + description = S("Pumpkin"), + tiles = { + "farming_pumpkin_top.png", + "farming_pumpkin_top.png", + "farming_pumpkin_side.png" + }, + groups = { + food_pumpkin = 1, choppy = 1, oddly_breakable_by_hand = 1, + flammable = 2, plant = 1 + }, +-- drop = { +-- items = { +-- {items = {'farming:pumpkin_slice 9'}, rarity = 1}, +-- } +-- }, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_alias("farming:pumpkin", "farming:pumpkin_8") -- cgit v1.2.3 From 594b09ee66ef74c3fba2c3168f686d404b8da458 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Mon, 13 Aug 2018 21:42:54 +0100 Subject: melon blocks need cutting board to chop into slices --- README.md | 2 +- crops/melon.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0c3b3e6..272ff79 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: -- 1.38 - Pumpkin grows into block, use chopping board to cut into slices, cocoa pods are no longer walkable +- 1.38 - Pumpkin grows into block, use chopping board to cut into slices, same with melon block, cocoa pods are no longer walkable - 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example) - 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes - 1.35 - Deprecated bronze/mese/diamond hoe's, added hoe bomb and deprecated hoe's as lucky block prizes diff --git a/crops/melon.lua b/crops/melon.lua index 2165558..b90a24a 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -22,10 +22,10 @@ minetest.register_craft({ }) minetest.register_craft({ + type = "shapeless", output = "farming:melon_slice 9", - recipe = { - {"", "farming:melon_8", ""}, - } + recipe = {"farming:melon_8", "farming:cutting_board"}, + replacements = {{"farming:cutting_board", "farming:cutting_board"}}, }) -- melon definition @@ -82,5 +82,5 @@ crop_def.groups = { food_melon = 1, snappy = 1, oddly_breakable_by_hand = 1, flammable = 2, plant = 1 } -crop_def.drop = "farming:melon_slice 9" +--crop_def.drop = "farming:melon_slice 9" minetest.register_node("farming:melon_8", table.copy(crop_def)) -- cgit v1.2.3 From ede6267694d790e5b5d589dffadc7e1f8e9434ae Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Mon, 13 Aug 2018 21:52:46 +0100 Subject: fix melon drop --- crops/melon.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/crops/melon.lua b/crops/melon.lua index b90a24a..1791fdf 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -83,4 +83,5 @@ crop_def.groups = { flammable = 2, plant = 1 } --crop_def.drop = "farming:melon_slice 9" +crop_def.drop = "farming:melon_8" minetest.register_node("farming:melon_8", table.copy(crop_def)) -- cgit v1.2.3 From 6f81bf0a4b4ac08a18592a4f3b4b12c43a1b0c75 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 15 Aug 2018 16:01:49 +0100 Subject: tweak compatibility aliases --- compatibility.lua | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/compatibility.lua b/compatibility.lua index afa98d6..97e201c 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -1,7 +1,4 @@ --- wait until mods are finished loading -minetest.after(0, function() - -- add food group to default apple and brown mushroom minetest.override_item("default:apple", { groups = {food_apple = 1, fleshy = 3, dig_immediate = 3, flammable = 2, @@ -56,7 +53,7 @@ minetest.register_alias("farming_plus:carrot", "farming:carrot_8") minetest.register_alias("farming_plus:carrot_item", "farming:carrot") -- Cocoa -minetest.register_alias("farming_plus:cocoa_sapling", "farming:cocoa_2") +minetest.register_alias("farming_plus:cocoa_sapling", "farming:cocoa_beans") minetest.register_alias("farming_plus:cocoa_leaves", "default:leaves") minetest.register_alias("farming_plus:cocoa", "default:apple") minetest.register_alias("farming_plus:cocoa_bean", "farming:cocoa_beans") @@ -65,7 +62,6 @@ minetest.register_alias("farming_plus:cocoa_bean", "farming:cocoa_beans") minetest.register_alias("farming_plus:orange_1", "farming:tomato_1") minetest.register_alias("farming_plus:orange_2", "farming:tomato_4") minetest.register_alias("farming_plus:orange_3", "farming:tomato_6") ---minetest.register_alias("farming_plus:orange", "farming:tomato_8") if eth then minetest.register_alias("farming_plus:orange_item", "ethereal:orange") @@ -108,8 +104,8 @@ minetest.register_alias("farming:pumpkin_face", "farming:jackolantern") minetest.register_alias("farming:pumpkin_face_light", "farming:jackolantern_on") minetest.register_alias("farming:big_pumpkin", "farming:pumpkin") minetest.register_alias("farming:big_pumpkin_side", "air") -minetest.register_alias("farming:big_pumpkin_corner", "air") minetest.register_alias("farming:big_pumpkin_top", "air") +minetest.register_alias("farming:big_pumpkin_corner", "air") minetest.register_alias("farming:scarecrow", "farming:jackolantern") minetest.register_alias("farming:scarecrow_light", "farming:jackolantern_on") minetest.register_alias("farming:pumpkin_flour", "farming:pumpkin_dough") @@ -146,8 +142,6 @@ else minetest.register_alias("farming_plus:strawberry", "farming:raspberry_4") end -minetest.register_alias("bushes:strawberry", "ethereal:strawberry") - -- Tomato minetest.register_alias("farming_plus:tomato_seed", "farming:tomato") @@ -159,18 +153,3 @@ minetest.register_alias("farming_plus:tomato", "farming:tomato_8") -- Weed minetest.register_alias("farming:weed", "default:grass_2") - ---[[ Classic Bushes compatibility -if minetest.get_modpath("bushes_classic") then - - if eth then - minetest.register_alias("bushes:strawberry", "farming:strawberry") - else - minetest.register_alias("bushes:strawberry", "farming:raspberries") - end - - minetest.register_alias("bushes:blueberry", "farming:blueberries") - minetest.register_alias("bushes:raspberry", "farming:raspberries") -end]] - -end) -- cgit v1.2.3 From b6d39b6ca332d20078068508031c01b2954e0f2c Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 15 Aug 2018 16:06:27 +0100 Subject: compatibility tweak --- compatibility.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compatibility.lua b/compatibility.lua index 97e201c..e06ad8a 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -102,7 +102,7 @@ minetest.register_alias("farming_plus:potato_seed", "farming:potato") minetest.register_alias("farming:pumpkin_seed", "farming:pumpkin_slice") minetest.register_alias("farming:pumpkin_face", "farming:jackolantern") minetest.register_alias("farming:pumpkin_face_light", "farming:jackolantern_on") -minetest.register_alias("farming:big_pumpkin", "farming:pumpkin") +minetest.register_alias("farming:big_pumpkin", "farming:jackolantern") minetest.register_alias("farming:big_pumpkin_side", "air") minetest.register_alias("farming:big_pumpkin_top", "air") minetest.register_alias("farming:big_pumpkin_corner", "air") -- cgit v1.2.3 From 47ef7f8aa4873bb864c230c3f48a24c2cc68a8ec Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 15 Aug 2018 16:12:54 +0100 Subject: tidy compatibility --- compatibility.lua | 142 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 75 insertions(+), 67 deletions(-) diff --git a/compatibility.lua b/compatibility.lua index e06ad8a..b3122ff 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -1,10 +1,19 @@ --- add food group to default apple and brown mushroom +-- check for Ethereal mod and add quick alias function +local eth = minetest.get_modpath("ethereal") +local alias = function(orig, new) + minetest.register_alias(orig, new) +end + +--= Overrides + +-- add food_* group to apple minetest.override_item("default:apple", { groups = {food_apple = 1, fleshy = 3, dig_immediate = 3, flammable = 2, leafdecay = 3, leafdecay_drop = 1}, }) +-- add food_* group to brown mushroom if minetest.registered_nodes["flowers:mushroom_brown"] then minetest.override_item("flowers:mushroom_brown", { light_source = 1, @@ -12,14 +21,13 @@ minetest.override_item("flowers:mushroom_brown", { }) end --- is Ethereal mod installed? -local eth = minetest.get_modpath("ethereal") +--= Aliases -- Banana if eth then - minetest.register_alias("farming_plus:banana_sapling", "ethereal:banana_tree_sapling") - minetest.register_alias("farming_plus:banana_leaves", "ethereal:bananaleaves") - minetest.register_alias("farming_plus:banana", "ethereal:banana") + alias("farming_plus:banana_sapling", "ethereal:banana_tree_sapling") + alias("farming_plus:banana_leaves", "ethereal:bananaleaves") + alias("farming_plus:banana", "ethereal:banana") else minetest.register_node(":ethereal:banana", { description = "Banana", @@ -39,34 +47,34 @@ else sounds = default.node_sound_leaves_defaults(), }) - minetest.register_alias("farming_plus:banana_sapling", "default:sapling") - minetest.register_alias("farming_plus:banana_leaves", "default:leaves") - minetest.register_alias("farming_plus:banana", "ethereal:banana") + alias("farming_plus:banana_sapling", "default:sapling") + alias("farming_plus:banana_leaves", "default:leaves") + alias("farming_plus:banana", "ethereal:banana") end -- Carrot -minetest.register_alias("farming_plus:carrot_seed", "farming:carrot") -minetest.register_alias("farming_plus:carrot_1", "farming:carrot_1") -minetest.register_alias("farming_plus:carrot_2", "farming:carrot_4") -minetest.register_alias("farming_plus:carrot_3", "farming:carrot_6") -minetest.register_alias("farming_plus:carrot", "farming:carrot_8") -minetest.register_alias("farming_plus:carrot_item", "farming:carrot") +alias("farming_plus:carrot_seed", "farming:carrot") +alias("farming_plus:carrot_1", "farming:carrot_1") +alias("farming_plus:carrot_2", "farming:carrot_4") +alias("farming_plus:carrot_3", "farming:carrot_6") +alias("farming_plus:carrot", "farming:carrot_8") +alias("farming_plus:carrot_item", "farming:carrot") -- Cocoa -minetest.register_alias("farming_plus:cocoa_sapling", "farming:cocoa_beans") -minetest.register_alias("farming_plus:cocoa_leaves", "default:leaves") -minetest.register_alias("farming_plus:cocoa", "default:apple") -minetest.register_alias("farming_plus:cocoa_bean", "farming:cocoa_beans") +alias("farming_plus:cocoa_sapling", "farming:cocoa_beans") +alias("farming_plus:cocoa_leaves", "default:leaves") +alias("farming_plus:cocoa", "default:apple") +alias("farming_plus:cocoa_bean", "farming:cocoa_beans") -- Orange -minetest.register_alias("farming_plus:orange_1", "farming:tomato_1") -minetest.register_alias("farming_plus:orange_2", "farming:tomato_4") -minetest.register_alias("farming_plus:orange_3", "farming:tomato_6") +alias("farming_plus:orange_1", "farming:tomato_1") +alias("farming_plus:orange_2", "farming:tomato_4") +alias("farming_plus:orange_3", "farming:tomato_6") if eth then - minetest.register_alias("farming_plus:orange_item", "ethereal:orange") - minetest.register_alias("farming_plus:orange", "ethereal:orange") - minetest.register_alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling") + alias("farming_plus:orange_item", "ethereal:orange") + alias("farming_plus:orange", "ethereal:orange") + alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling") else minetest.register_node(":ethereal:orange", { description = "Orange", @@ -86,45 +94,45 @@ else sounds = default.node_sound_leaves_defaults(), }) - minetest.register_alias("farming_plus:orange_item", "ethereal:orange") - minetest.register_alias("farming_plus:orange", "ethereal:orange") - minetest.register_alias("farming_plus:orange_seed", "default:sapling") + alias("farming_plus:orange_item", "ethereal:orange") + alias("farming_plus:orange", "ethereal:orange") + alias("farming_plus:orange_seed", "default:sapling") end -- Potato -minetest.register_alias("farming_plus:potato_item", "farming:potato") -minetest.register_alias("farming_plus:potato_1", "farming:potato_1") -minetest.register_alias("farming_plus:potato_2", "farming:potato_2") -minetest.register_alias("farming_plus:potato", "farming:potato_3") -minetest.register_alias("farming_plus:potato_seed", "farming:potato") +alias("farming_plus:potato_item", "farming:potato") +alias("farming_plus:potato_1", "farming:potato_1") +alias("farming_plus:potato_2", "farming:potato_2") +alias("farming_plus:potato", "farming:potato_3") +alias("farming_plus:potato_seed", "farming:potato") -- Pumpkin -minetest.register_alias("farming:pumpkin_seed", "farming:pumpkin_slice") -minetest.register_alias("farming:pumpkin_face", "farming:jackolantern") -minetest.register_alias("farming:pumpkin_face_light", "farming:jackolantern_on") -minetest.register_alias("farming:big_pumpkin", "farming:jackolantern") -minetest.register_alias("farming:big_pumpkin_side", "air") -minetest.register_alias("farming:big_pumpkin_top", "air") -minetest.register_alias("farming:big_pumpkin_corner", "air") -minetest.register_alias("farming:scarecrow", "farming:jackolantern") -minetest.register_alias("farming:scarecrow_light", "farming:jackolantern_on") -minetest.register_alias("farming:pumpkin_flour", "farming:pumpkin_dough") +alias("farming:pumpkin_seed", "farming:pumpkin_slice") +alias("farming:pumpkin_face", "farming:jackolantern") +alias("farming:pumpkin_face_light", "farming:jackolantern_on") +alias("farming:big_pumpkin", "farming:jackolantern") +alias("farming:big_pumpkin_side", "air") +alias("farming:big_pumpkin_top", "air") +alias("farming:big_pumpkin_corner", "air") +alias("farming:scarecrow", "farming:jackolantern") +alias("farming:scarecrow_light", "farming:jackolantern_on") +alias("farming:pumpkin_flour", "farming:pumpkin_dough") -- Rhubarb -minetest.register_alias("farming_plus:rhubarb_seed", "farming:rhubarb") -minetest.register_alias("farming_plus:rhubarb_1", "farming:rhubarb_1") -minetest.register_alias("farming_plus:rhubarb_2", "farming:rhubarb_2") -minetest.register_alias("farming_plus:rhubarb", "farming:rhubarb_3") -minetest.register_alias("farming_plus:rhubarb_item", "farming:rhubarb") +alias("farming_plus:rhubarb_seed", "farming:rhubarb") +alias("farming_plus:rhubarb_1", "farming:rhubarb_1") +alias("farming_plus:rhubarb_2", "farming:rhubarb_2") +alias("farming_plus:rhubarb", "farming:rhubarb_3") +alias("farming_plus:rhubarb_item", "farming:rhubarb") -- Strawberry if eth then - minetest.register_alias("farming_plus:strawberry_item", "ethereal:strawberry") - minetest.register_alias("farming_plus:strawberry_seed", "ethereal:strawberry") - minetest.register_alias("farming_plus:strawberry_1", "ethereal:strawberry_1") - minetest.register_alias("farming_plus:strawberry_2", "ethereal:strawberry_3") - minetest.register_alias("farming_plus:strawberry_3", "ethereal:strawberry_5") - minetest.register_alias("farming_plus:strawberry", "ethereal:strawberry_7") + alias("farming_plus:strawberry_item", "ethereal:strawberry") + alias("farming_plus:strawberry_seed", "ethereal:strawberry") + alias("farming_plus:strawberry_1", "ethereal:strawberry_1") + alias("farming_plus:strawberry_2", "ethereal:strawberry_3") + alias("farming_plus:strawberry_3", "ethereal:strawberry_5") + alias("farming_plus:strawberry", "ethereal:strawberry_7") else minetest.register_craftitem(":ethereal:strawberry", { description = "Strawberry", @@ -134,22 +142,22 @@ else on_use = minetest.item_eat(1), }) - minetest.register_alias("farming_plus:strawberry_item", "ethereal:strawberry") - minetest.register_alias("farming_plus:strawberry_seed", "ethereal:strawberry") - minetest.register_alias("farming_plus:strawberry_1", "farming:raspberry_1") - minetest.register_alias("farming_plus:strawberry_2", "farming:raspberry_2") - minetest.register_alias("farming_plus:strawberry_3", "farming:raspberry_3") - minetest.register_alias("farming_plus:strawberry", "farming:raspberry_4") + alias("farming_plus:strawberry_item", "ethereal:strawberry") + alias("farming_plus:strawberry_seed", "ethereal:strawberry") + alias("farming_plus:strawberry_1", "farming:raspberry_1") + alias("farming_plus:strawberry_2", "farming:raspberry_2") + alias("farming_plus:strawberry_3", "farming:raspberry_3") + alias("farming_plus:strawberry", "farming:raspberry_4") end -- Tomato -minetest.register_alias("farming_plus:tomato_seed", "farming:tomato") -minetest.register_alias("farming_plus:tomato_item", "farming:tomato") -minetest.register_alias("farming_plus:tomato_1", "farming:tomato_2") -minetest.register_alias("farming_plus:tomato_2", "farming:tomato_4") -minetest.register_alias("farming_plus:tomato_3", "farming:tomato_6") -minetest.register_alias("farming_plus:tomato", "farming:tomato_8") +alias("farming_plus:tomato_seed", "farming:tomato") +alias("farming_plus:tomato_item", "farming:tomato") +alias("farming_plus:tomato_1", "farming:tomato_2") +alias("farming_plus:tomato_2", "farming:tomato_4") +alias("farming_plus:tomato_3", "farming:tomato_6") +alias("farming_plus:tomato", "farming:tomato_8") -- Weed -minetest.register_alias("farming:weed", "default:grass_2") +alias("farming:weed", "default:grass_2") -- cgit v1.2.3 From 7b52870d54aca50e0d36a9263eeccc3e2d5fb2a5 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 15 Aug 2018 16:22:20 +0100 Subject: add bananaleaves for compatibility if ethereal isnt found --- compatibility.lua | 21 +++++++++++++++------ textures/banana_leaf.png | Bin 0 -> 421 bytes 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 textures/banana_leaf.png diff --git a/compatibility.lua b/compatibility.lua index b3122ff..808000d 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -1,19 +1,18 @@ --- check for Ethereal mod and add quick alias function +--= Helpers + local eth = minetest.get_modpath("ethereal") local alias = function(orig, new) minetest.register_alias(orig, new) end ---= Overrides +--= Overrides (add food_* group to apple and brown mushroom) --- add food_* group to apple minetest.override_item("default:apple", { groups = {food_apple = 1, fleshy = 3, dig_immediate = 3, flammable = 2, leafdecay = 3, leafdecay_drop = 1}, }) --- add food_* group to brown mushroom if minetest.registered_nodes["flowers:mushroom_brown"] then minetest.override_item("flowers:mushroom_brown", { light_source = 1, @@ -47,8 +46,19 @@ else sounds = default.node_sound_leaves_defaults(), }) + minetest.register_node(":ethereal:bananaleaves", { + description = "Banana Leaves", + tiles = {"banana_leaf.png"}, + inventory_image = "banana_leaf.png", + wield_image = "banana_leaf.png", + paramtype = "light", + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + sounds = default.node_sound_leaves_defaults(), + }) + alias("farming_plus:banana_sapling", "default:sapling") - alias("farming_plus:banana_leaves", "default:leaves") + alias("farming_plus:banana_leaves", "ethereal:bananaleaves") alias("farming_plus:banana", "ethereal:banana") end @@ -150,7 +160,6 @@ else alias("farming_plus:strawberry", "farming:raspberry_4") end - -- Tomato alias("farming_plus:tomato_seed", "farming:tomato") alias("farming_plus:tomato_item", "farming:tomato") diff --git a/textures/banana_leaf.png b/textures/banana_leaf.png new file mode 100644 index 0000000..5800cbf Binary files /dev/null and b/textures/banana_leaf.png differ -- cgit v1.2.3