summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crafts.lua9
-rw-r--r--depends.txt1
-rw-r--r--init.lua8
-rw-r--r--node_defs.lua9
4 files changed, 7 insertions, 20 deletions
diff --git a/crafts.lua b/crafts.lua
index 746f2a1..515a097 100644
--- a/crafts.lua
+++ b/crafts.lua
@@ -1,11 +1,4 @@
--- Boilerplate to support localized strings if intllib mod is installed.
-local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
-else
- S = function ( s ) return s end
-end
+local S = moretrees.intllib
for i in ipairs(moretrees.treelist) do
local treename = moretrees.treelist[i][1]
diff --git a/depends.txt b/depends.txt
index cacd7e6..1cd5974 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1,4 +1,5 @@
default
plants_lib
moreblocks?
+intllib?
diff --git a/init.lua b/init.lua
index 786b9e9..9c36883 100644
--- a/init.lua
+++ b/init.lua
@@ -45,12 +45,12 @@ end
-- Boilerplate to support localized strings if intllib mod is installed.
local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter()
else
- S = function ( s ) return s end
+ S = function(s) return s end
end
+moretrees.intllib = S
-- infinite stacks checking
diff --git a/node_defs.lua b/node_defs.lua
index d8bf7e9..c5ad566 100644
--- a/node_defs.lua
+++ b/node_defs.lua
@@ -1,11 +1,4 @@
--- Boilerplate to support localized strings if intllib mod is installed.
-local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
-else
- S = function ( s ) return s end
-end
+local S = moretrees.intllib
moretrees.avoidnodes = {}