diff --git a/bushes_classic/cooking.lua b/bushes_classic/cooking.lua index 6e56619..677cb44 100644 --- a/bushes_classic/cooking.lua +++ b/bushes_classic/cooking.lua @@ -1,12 +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 = plantslib.intllib -- Basket diff --git a/bushes_classic/init.lua b/bushes_classic/init.lua index 40eb976..f06c50c 100644 --- a/bushes_classic/init.lua +++ b/bushes_classic/init.lua @@ -2,14 +2,8 @@ -- now maintained by VanessaE -- -- License: WTFPL --- 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 = plantslib.intllib bushes_classic = {} diff --git a/bushes_classic/nodes.lua b/bushes_classic/nodes.lua index caa886e..fe8c5a8 100644 --- a/bushes_classic/nodes.lua +++ b/bushes_classic/nodes.lua @@ -1,12 +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 = plantslib.intllib plantlife_bushes = {} diff --git a/flowers_plus/depends.txt b/flowers_plus/depends.txt index c8f7251..6a66906 100644 --- a/flowers_plus/depends.txt +++ b/flowers_plus/depends.txt @@ -1 +1,2 @@ plants_lib + diff --git a/flowers_plus/init.lua b/flowers_plus/init.lua index 67cfbf1..d25734c 100644 --- a/flowers_plus/init.lua +++ b/flowers_plus/init.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 = plantslib.intllib -- This file supplies a few additional plants and some related crafts -- for the plantlife modpack. Last revision: 2013-04-24 diff --git a/plants_lib/depends.txt b/plants_lib/depends.txt index 4ad96d5..c48fe0d 100644 --- a/plants_lib/depends.txt +++ b/plants_lib/depends.txt @@ -1 +1,3 @@ default +intllib? + diff --git a/plants_lib/init.lua b/plants_lib/init.lua index b92bd4b..f206635 100644 --- a/plants_lib/init.lua +++ b/plants_lib/init.lua @@ -26,17 +26,17 @@ plantslib.actionslist_aircheck = {} plantslib.actionslist_no_aircheck = {} plantslib.modpath = minetest.get_modpath("plants_lib") -plantslib.intllib_modpath = minetest.get_modpath("intllib") plantslib.total_no_aircheck_calls = 0 +-- Boilerplate to support localized strings if intllib mod is installed. local S -if plantslib.intllib_modpath then - dofile(plantslib.intllib_modpath.."/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 +plantslib.intllib = S local DEBUG = false --... except if you want to spam the console with debugging info :-) diff --git a/poisonivy/depends.txt b/poisonivy/depends.txt index c8f7251..6a66906 100644 --- a/poisonivy/depends.txt +++ b/poisonivy/depends.txt @@ -1 +1,2 @@ plants_lib + diff --git a/poisonivy/init.lua b/poisonivy/init.lua index 3674d3e..bb32121 100644 --- a/poisonivy/init.lua +++ b/poisonivy/init.lua @@ -1,14 +1,7 @@ -- This file supplies poison ivy for the plantlife modpack -- Last revision: 2013-01-24 --- 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 = plantslib.intllib local SPAWN_DELAY = 1000 local SPAWN_CHANCE = 200