diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -192,7 +192,19 @@ end local function f_flora(itemstring, def) if def.groups.flora == 1 then local groupname = doc.sub.items.get_group_name("flora") - return S("This block belongs to the @1 group. It a living organism which likes to grow and spread on dirt with grass or dirt with dry grass when it is in light. Spreading will stop when the surrounding area is too crammed with @2 blocks. On desert sand, it will wither and die and turn into a dry shrub.", groupname, groupname) + -- Dry shrub rule not complete; flora dies on group:sand except default:sand. But that's okay. + -- The missing nodes will be covered on their own entries by the f_and_dry_shrub factoid. + return S("This block belongs to the @1 group. It a living organism which likes to grow and spread on dirt with grass or dirt with dry grass when it is in light. Spreading will stop when the surrounding area is too crammed with @2 blocks. On silver sand and desert sand, it will wither and die and turn into a dry shrub.", groupname, groupname) + else + return "" + end +end + +-- sand nodes which turn flora blocks into dry shrub (e.g. silver sand, desert sand) +local function f_sand_dry_shrub(itemstring, def) + if def.groups.sand == 1 and itemstring ~= "default:sand" then + + return S("Flowers and other blocks in the @1 group will slowly turn into dry shrubs when placed on this block.", doc.sub.items.get_group_name("flora")) else return "" end @@ -265,6 +277,7 @@ doc.sub.items.register_factoid("nodes", "use", f_hoe_soil) doc.sub.items.register_factoid("nodes", "groups", f_cools_lava) doc.sub.items.register_factoid("nodes", "groups", f_fire) doc.sub.items.register_factoid("nodes", "groups", f_flora) +doc.sub.items.register_factoid("nodes", "groups", f_sand_dry_shrub) doc.sub.items.register_factoid("nodes", "groups", f_leafdecay) doc.sub.items.register_factoid("nodes", "groups", f_soil) doc.sub.items.register_factoid("nodes", "groups", f_spreading_dirt_type) |