diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-01-18 11:34:31 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-01-18 11:34:31 +0000 |
commit | b0aa729329b966aa95edd22f8246ac9083de50d6 (patch) | |
tree | 94b6436364d3d0b81284da20483c7248c32cb2b8 | |
parent | 3b185e00993aeafee7209f9c3025bf173e134be1 (diff) |
added bakedclay flowers to decoration
-rw-r--r-- | api.txt | 5 | ||||
-rw-r--r-- | init.lua | 38 | ||||
-rw-r--r-- | mods.lua | 4 |
3 files changed, 31 insertions, 16 deletions
@@ -45,11 +45,12 @@ Adding Dirt Decoration bonemeal:add_deco({ dirt_node, {grass_node_list}, {decor_node_list} }) -This command will add grass and decoration to specific dirt types. +This command will add grass and decoration to specific dirt types, use "" to +add an empty node. e.g. -bonemeal:add_deco({"default:dirt_with_dry_grass", {"default:dry_grass_1", "air"}, +bonemeal:add_deco({"default:dirt_with_dry_grass", {"default:dry_grass_1", ""}, {"flowers:rose", "flowers:viola"} }) @@ -180,26 +180,36 @@ local function check_crops(pos, nodename) end
---helper tables
+--helper tables ( "" denotes a blank item )
local green_grass = {
- "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5"
+ "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"
+ "default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4",
+ "default:dry_grass_5", "", ""
}
local flowers = {
- "air", "flowers:dandelion_white", "flowers:dandelion_yellow",
- "flowers:geranium", "flowers:rose", "flowers:tulip", "flowers:viola",
+ "flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium",
+ "flowers:rose", "flowers:tulip", "flowers:viola", ""
}
+-- add additional bakedclay flowers if enabled
+if minetest.get_modpath("bakedclay") then
+ flowers[7] = "bakedclay:delphinium"
+ flowers[8] = "bakedclay:thistle"
+ flowers[9] = "bakedclay:lazarus"
+ flowers[10] = "bakedclay:mannagrass"
+end
+
-- default biomes deco
local deco = {
{"default:dirt_with_dry_grass", dry_grass, flowers},
- {"default:sand", {}, {"default:dry_shrub", "air", "air"} },
- {"default:desert_sand", {}, {"default:dry_shrub", "air", "air"} },
- {"default:silver_sand", {}, {"default:dry_shrub", "air", "air"} },
+ {"default:sand", {}, {"default:dry_shrub", "", ""} },
+ {"default:desert_sand", {}, {"default:dry_shrub", "", "", ""} },
+ {"default:silver_sand", {}, {"default:dry_shrub", "", "", ""} },
}
-- add grass and flower/plant decoration for specific dirt types
@@ -245,12 +255,16 @@ local function check_soil(pos, nodename) -- place random decoration (rare)
if math.random(1, 5) == 5 then
- nod = decor[math.random(1, #decor)] or "air"
- minetest.swap_node(pos2, {name = nod})
+ nod = decor[math.random(1, #decor)] or ""
+ if nod ~= "" then
+ minetest.set_node(pos2, {name = nod})
+ end
else
-- place random grass (common)
- nod = grass[math.random(1, #grass)] or "air"
- minetest.swap_node(pos2, {name = nod})
+ nod = grass[math.random(1, #grass)] or ""
+ if nod ~= "" then
+ minetest.set_node(pos2, {name = nod})
+ end
end
particle_effect(pos2)
@@ -56,8 +56,8 @@ if minetest.get_modpath("ethereal") then }) bonemeal:add_deco({ - {"ethereal:crystal_dirt", {"ethereal:crystalgrass", "air", "air", "air", "air"}, {}}, - {"ethereal:fiery_dirt", {"ethereal:dry_shrub", "air", "air", "air", "air"}, {}}, + {"ethereal:crystal_dirt", {"ethereal:crystalgrass", "", "", "", ""}, {}}, + {"ethereal:fiery_dirt", {"ethereal:dry_shrub", "", "", "", ""}, {}}, }) end |