From fbd63f06375d35ba372f0f119cca783a6d4c784d Mon Sep 17 00:00:00 2001 From: sys4-fr Date: Tue, 28 Feb 2017 22:53:00 +0100 Subject: [PATCH] Add bonemeal support --- README.md | 11 +++++------ depends.txt | 1 + init.lua | 26 ++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a1853f6..f4f626b 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,19 @@ This simple mod extend the flowers mod from MT_Game by adding more flowers. Dependence: - flowers -Optional Dependecies: +Optional Dependencies: - farming - vessels +- bonemeal by TenPlus1 (https://forum.minetest.net/viewtopic.php?f=9&t=16446) For now this mod add: -- Wild carrot: - Flowers spawn into biomes grassland, deciduous_forest and coniferous_forest. +- Wild carrot: spawn into biomes grassland, deciduous_forest and coniferous_forest. - Bunch of flowers: If farming mod is loaded then you can craft a bunch of flowers with any items from the flower group and a string of cotton. - Bunch into a vase: - If farming and vessels mods are loaded then you can craft a bunch into a vase and place it where you want. + If farming and vessels mods are loaded then you can craft a bunch into a vase which you can place anywhere. LICENCES: -- Code: GPLv3 -- Textures: WTFPL v2 +- Code & Textures: GPLv3 diff --git a/depends.txt b/depends.txt index bc9e094..8877f3e 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,4 @@ flowers farming? vessels? +bonemeal? diff --git a/init.lua b/init.lua index 1f98236..c1eb936 100644 --- a/init.lua +++ b/init.lua @@ -90,3 +90,29 @@ if minetest.get_modpath("farming") then end end +-- Bonemeal flowers registration for adding dirt decoration +if minetest.get_modpath("bonemeal") and bonemeal then + local green_grass = { + "default:grass_2", "default:grass_3", "default:grass_4", + "default:grass_5", "", "" + } + local dry_grass = { + "default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4", + "default:dry_grass_5", "", "" + } + local flowers = { + "flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium", + "flowers:rose", "flowers:tulip", "flowers:viola", "moreflowers:wild_carrot" + } + + local dirt_with_grass_deco = { + {"default:dirt_with_grass", green_grass, flowers} + } + + local dirt_with_dry_grass_deco = { + {"default:dirt_with_dry_grass", dry_grass, flowers} + } + + bonemeal:add_deco(dirt_with_grass_deco) + bonemeal:add_deco(dirt_with_dry_grass_deco) +end