Update dry shrub creating rule

master
Wuzzy 2017-05-29 01:53:58 +02:00
parent 252c8632aa
commit 53eec5fdf6
2 changed files with 16 additions and 3 deletions

View File

@ -135,7 +135,7 @@ local export_longdesc = {
["default:ice"] = S("Ice is found in arctic regions. It can appear either in huge glacier formations below snow blocks, or above water."),
["default:dirt"] = S("Dirt is found often directly under the surface and very common in many regions of the world. When exposed to sunlight, the surface of dirt may change, depending on its neighbors."),
["default:sand"] = S("Sand is found in large quantities at beaches, but it occasionally appears in small chunks around the world."),
["default:desert_sand"] = S("Usually found in huge quantities at the surface of deserts. Members of the @1 group will slowly turn into dry shrubs when placed on desert sand.", groupname_flora),
["default:desert_sand"] = S("Usually found in huge quantities at the surface of deserts."),
["default:silver_sand"] = S("Silver sand can be found in cold biomes in the form of so-called cold deserts."),
["default:gravel"] = S("This block consists of a couple of loose stones and can't support itself. It is common only at the beaches of very cold regions, but it can be found in small quantities on the surface and underground."),
["default:clay"] = S("Clay is a rather soft material and it sometimes found in sand beaches."),
@ -194,7 +194,7 @@ local export_longdesc = {
["doors:gate_pine_wood_closed"] = fencegatedesc,
["doors:gate_aspen_wood_closed"] = fencegatedesc,
["default:dry_shrub"] = S("An unremarkable dead plant which is common in deserts and snowy biomes. Small plants which are members of the @1 group placed on desert sand will sooner or later turn into dry shrubs.", groupname_flora),
["default:dry_shrub"] = S("An unremarkable dead plant which is common in deserts and snowy biomes. Small plants which are members of the @1 group placed on silver sand or desert sand will sooner or later turn into dry shrubs.", groupname_flora),
["default:rail"] = S("Rails can be used to build transport tracks for carts. Normal rails slightly slow down carts due to friction."),
["carts:powerrail"] = S("Rails can be used to build transport tracks for carts. Powered rails will accelerate moving carts, up to a maximum speed."),
["carts:brakerail"] = S("Rails can be used to build transport tracks for carts. Brake rails will heavily slow down carts, much more than normal rails."),

View File

@ -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)