diff --git a/api.lua b/api.lua index 299f349..91933e7 100644 --- a/api.lua +++ b/api.lua @@ -279,6 +279,14 @@ function moremush:register_mushroom(name, def) } }) + minetest.register_craft({ + output = 'moremush:'..name..'_spores', + recipe = { + {'moremush:mushroom_brown_spores'}, + {'dye:'..def.dye..''}, + } + }) + minetest.register_abm({ nodenames = {"group:mush"}, neighbors = {"default:tree", "default:mossycobble"}, diff --git a/depends.txt b/depends.txt index b13b574..9363e3c 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,4 @@ farming flowers -default \ No newline at end of file +default +dye \ No newline at end of file diff --git a/init.lua b/init.lua index a08ac6b..0b92df0 100644 --- a/init.lua +++ b/init.lua @@ -6,6 +6,13 @@ --Simple API dofile(minetest.get_modpath("moremush").."/api.lua") +minetest.register_craft({ + output = 'moremush:mushroom_brown_spores', + recipe = { + {'flowers:mushroom_brown'}, + } +}) + moremush:register_mushroom("mushroom_red", { mainname = ":flowers:mushroom_red", maindname = "flowers:mushroom_red", @@ -16,6 +23,7 @@ moremush:register_mushroom("mushroom_red", { image_2 = "moremush_red_2", image_3 = "moremush_red_3", hp = -5, + dye = "red", }) moremush:register_mushroom("mushroom_brown", { @@ -28,6 +36,7 @@ moremush:register_mushroom("mushroom_brown", { image_2 = "moremush_brown_2", image_3 = "moremush_brown_3", hp = 1, + dye = "brown", }) moremush:register_mushroom("mushroom_green", { @@ -44,7 +53,8 @@ moremush:register_mushroom("mushroom_green", { light_0 = 1, light_1 = 2, light_2 = 3, - light_3 = 4 + light_3 = 4, + dye = "green", }) moremush:register_mushroom("mushroom_blue", { @@ -61,7 +71,8 @@ moremush:register_mushroom("mushroom_blue", { light_0 = 1, light_1 = 2, light_2 = 3, - light_3 = 4 + light_3 = 4, + dye = "blue", }) moremush:register_mushroom("mushroom_boom", { @@ -78,6 +89,7 @@ moremush:register_mushroom("mushroom_boom", { light_0 = 1, light_1 = 2, light_2 = 4, - light_3 = 6 + light_3 = 6, + dye = "orange", })