summaryrefslogtreecommitdiff
path: root/ferns/treefern.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ferns/treefern.lua')
-rw-r--r--ferns/treefern.lua19
1 files changed, 11 insertions, 8 deletions
diff --git a/ferns/treefern.lua b/ferns/treefern.lua
index 01d7318..db4bc37 100644
--- a/ferns/treefern.lua
+++ b/ferns/treefern.lua
@@ -4,9 +4,12 @@
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
--- Looked at code from: default , trees
+-- Looked at code from: default , trees
-----------------------------------------------------------------------------------------------
+-- support for i18n
+local S = plantlife_i18n.gettext
+
assert(abstract_ferns.config.enable_treefern == true)
abstract_ferns.grow_tree_fern = function(pos)
@@ -17,14 +20,14 @@ abstract_ferns.grow_tree_fern = function(pos)
and minetest.get_node(pos_01).name ~= "default:junglegrass" then
return
end
-
+
local size = math.random(1, 4) + math.random(1, 4)
if (size > 5) then
size = 10 - size
end
size = size + 1
local crown = ({ "ferns:tree_fern_leaves", "ferns:tree_fern_leaves_02" })[math.random(1, 2)]
-
+
local i = 1
local brk = false
while (i < size) do
@@ -53,7 +56,7 @@ end
-- TODO: Both of these nodes look the same?
minetest.register_node("ferns:tree_fern_leaves", {
- description = "Tree Fern Crown (Dicksonia)",
+ description = S("Tree Fern Crown (Dicksonia)"),
drawtype = "plantlike",
visual_scale = math.sqrt(8),
paramtype = "light",
@@ -122,7 +125,7 @@ minetest.register_node("ferns:tree_fern_leaves_02", {
-- FERN TRUNK
-----------------------------------------------------------------------------------------------
minetest.register_node("ferns:fern_trunk", {
- description = "Fern Trunk (Dicksonia)",
+ description = S("Fern Trunk (Dicksonia)"),
drawtype = "nodebox",
paramtype = "light",
tiles = {
@@ -142,8 +145,8 @@ minetest.register_node("ferns:fern_trunk", {
sounds = default.node_sound_wood_defaults(),
after_destruct = function(pos,oldnode)
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
- if node.name == "ferns:fern_trunk" then
- minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
+ if node.name == "ferns:fern_trunk" then
+ minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
minetest.add_item(pos,"ferns:fern_trunk")
end
end,
@@ -153,7 +156,7 @@ minetest.register_node("ferns:fern_trunk", {
-- TREE FERN SAPLING
-----------------------------------------------------------------------------------------------
minetest.register_node("ferns:sapling_tree_fern", {
- description = "Tree Fern Sapling (Dicksonia)",
+ description = S("Tree Fern Sapling (Dicksonia)"),
drawtype = "plantlike",
paramtype = "light",
paramtype2 = "facedir",