diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -178,7 +178,8 @@ end -- flora group local function f_flora(itemstring, def) if def.groups.flora == 1 then - return S("This block belongs to the Flora 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 Flora blocks. On desert sand, it will wither and die and turn into a dry shrub.") + local groupname = doc.sub.items.get_group_name("flora") + return string.format(S("This block belongs to the %s 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 %s blocks. On desert sand, it will wither and die and turn into a dry shrub."), groupname, groupname) else return "" end @@ -198,13 +199,14 @@ end local function f_leafdecay(itemstring, def) local formstring = "" if def.groups.leafdecay ~= nil then + local groupname = doc.sub.items.get_group_name("tree") if def.groups.leafdecay_drop ~= nil then - formstring = string.format(S("This block may drop as an item when no trunk is nearby. This is prevented if any block of the group “Tree Trunks” is nearby (up to a distance of %d), the block is completely surrounded by blocks which are neither air or a liquid or it has been manually placed by a player."), def.groups.leafdecay) + formstring = string.format(S("This block may drop as an item when no trunk is nearby. This is prevented if any block of the group “%s” is nearby (up to a distance of %d), the block is completely surrounded by blocks which are neither air or a liquid or it has been manually placed by a player."), groupname, def.groups.leafdecay) else if def.drop ~= "" and def.drop ~= nil and def.drop ~= itemstring then - formstring = string.format(S("This block may decay when no trunk is nearby. When decaying, it disappears and may drop one of its mining drops (but never itself). Decay is prevented if any block of the group “Tree Trunks” is nearby (up to a distance of %d), the block is completely surrounded by blocks which are neither air or a liquid or it has been placed by a player."), def.groups.leafdecay) + formstring = string.format(S("This block may decay when no trunk is nearby. When decaying, it disappears and may drop one of its mining drops (but never itself). Decay is prevented if any block of the group “%s” is nearby (up to a distance of %d), the block is completely surrounded by blocks which are neither air or a liquid or it has been placed by a player."), groupname, def.groups.leafdecay) else - formstring = string.format(S("This block may decay and disappear when no trunk is nearby. Decay is prevented if any block of the group “Tree Trunks” is nearby (up to a distance of %d), the block is completely surrounded by blocks which are neither air or a liquid or it has been placed by a player."), def.groups.leafdecay) + formstring = string.format(S("This block may decay and disappear when no trunk is nearby. Decay is prevented if any block of the group “%s” is nearby (up to a distance of %d), the block is completely surrounded by blocks which are neither air or a liquid or it has been placed by a player."), groupname, def.groups.leafdecay) end end end |