diff --git a/crafts.lua b/crafts.lua index 8c22aa68..795380a5 100644 --- a/crafts.lua +++ b/crafts.lua @@ -8,8 +8,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/door_models.lua b/door_models.lua index 15c9bc48..6542aadf 100644 --- a/door_models.lua +++ b/door_models.lua @@ -1,8 +1,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/doors_and_gates.lua b/doors_and_gates.lua index 7477a1b4..b07b468a 100644 --- a/doors_and_gates.lua +++ b/doors_and_gates.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/electronics.lua b/electronics.lua index 19acd239..a0f64051 100644 --- a/electronics.lua +++ b/electronics.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/fences.lua b/fences.lua index 7752f5ba..fc9afa9c 100644 --- a/fences.lua +++ b/fences.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/furnaces.lua b/furnaces.lua index 15ca8d36..19b60419 100644 --- a/furnaces.lua +++ b/furnaces.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/init.lua b/init.lua index 49f25c93..6b5cd375 100644 --- a/init.lua +++ b/init.lua @@ -12,11 +12,13 @@ -- local DEBUG = 0 +homedecor_modpath = minetest.get_modpath("homedecor") +intllib_modpath = minetest.get_modpath("intllib") -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end @@ -73,33 +75,33 @@ else homedecor_expect_infinite_stacks = true end -dofile(minetest.get_modpath("homedecor").."/misc_nodes.lua") -- the catch-all for all misc nodes -dofile(minetest.get_modpath("homedecor").."/tables.lua") -dofile(minetest.get_modpath("homedecor").."/electronics.lua") -dofile(minetest.get_modpath("homedecor").."/shutters.lua") -dofile(minetest.get_modpath("homedecor").."/shingles.lua") -dofile(minetest.get_modpath("homedecor").."/slopes.lua") +dofile(homedecor_modpath.."/misc_nodes.lua") -- the catch-all for all misc nodes +dofile(homedecor_modpath.."/tables.lua") +dofile(homedecor_modpath.."/electronics.lua") +dofile(homedecor_modpath.."/shutters.lua") +dofile(homedecor_modpath.."/shingles.lua") +dofile(homedecor_modpath.."/slopes.lua") -dofile(minetest.get_modpath("homedecor").."/door_models.lua") -dofile(minetest.get_modpath("homedecor").."/doors_and_gates.lua") +dofile(homedecor_modpath.."/door_models.lua") +dofile(homedecor_modpath.."/doors_and_gates.lua") -dofile(minetest.get_modpath("homedecor").."/signs_lib.lua") +dofile(homedecor_modpath.."/signs_lib.lua") -dofile(minetest.get_modpath("homedecor").."/fences.lua") +dofile(homedecor_modpath.."/fences.lua") -dofile(minetest.get_modpath("homedecor").."/lighting.lua") -dofile(minetest.get_modpath("homedecor").."/kitchen_cabinet.lua") -dofile(minetest.get_modpath("homedecor").."/refrigerator.lua") -dofile(minetest.get_modpath("homedecor").."/furnaces.lua") -dofile(minetest.get_modpath("homedecor").."/nightstands.lua") +dofile(homedecor_modpath.."/lighting.lua") +dofile(homedecor_modpath.."/kitchen_cabinet.lua") +dofile(homedecor_modpath.."/refrigerator.lua") +dofile(homedecor_modpath.."/furnaces.lua") +dofile(homedecor_modpath.."/nightstands.lua") -dofile(minetest.get_modpath("homedecor").."/crafts.lua") +dofile(homedecor_modpath.."/crafts.lua") -dofile(minetest.get_modpath("homedecor").."/furniture.lua") -dofile(minetest.get_modpath("homedecor").."/furniture_medieval.lua") -dofile(minetest.get_modpath("homedecor").."/furniture_bathroom.lua") -dofile(minetest.get_modpath("homedecor").."/furniture_recipes.lua") +dofile(homedecor_modpath.."/furniture.lua") +dofile(homedecor_modpath.."/furniture_medieval.lua") +dofile(homedecor_modpath.."/furniture_bathroom.lua") +dofile(homedecor_modpath.."/furniture_recipes.lua") -dofile(minetest.get_modpath("homedecor").."/locked.lua") +dofile(homedecor_modpath.."/locked.lua") print("[HomeDecor] "..S("Loaded!")) diff --git a/kitchen_cabinet.lua b/kitchen_cabinet.lua index 91b1a332..fcd6ea8c 100644 --- a/kitchen_cabinet.lua +++ b/kitchen_cabinet.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/lighting.lua b/lighting.lua index f0b400ff..d5fbbd14 100644 --- a/lighting.lua +++ b/lighting.lua @@ -3,8 +3,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/locked.lua b/locked.lua index 33ace60c..48823243 100644 --- a/locked.lua +++ b/locked.lua @@ -9,8 +9,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/misc_nodes.lua b/misc_nodes.lua index a0cd0deb..bcd4c868 100644 --- a/misc_nodes.lua +++ b/misc_nodes.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/nightstands.lua b/nightstands.lua index c6c74a4d..84098237 100644 --- a/nightstands.lua +++ b/nightstands.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/refrigerator.lua b/refrigerator.lua index 23e5b89a..d5a51074 100644 --- a/refrigerator.lua +++ b/refrigerator.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/shingles.lua b/shingles.lua index 4ac0cf4e..e9d3313a 100644 --- a/shingles.lua +++ b/shingles.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/shutters.lua b/shutters.lua index d1b23f5a..23664cb3 100644 --- a/shutters.lua +++ b/shutters.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/signs_lib.lua b/signs_lib.lua index 70f4c8b6..90db20bb 100644 --- a/signs_lib.lua +++ b/signs_lib.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/slopes.lua b/slopes.lua index f8f21a03..772f78ee 100644 --- a/slopes.lua +++ b/slopes.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end diff --git a/tables.lua b/tables.lua index 0d0be4f7..07edbd80 100644 --- a/tables.lua +++ b/tables.lua @@ -2,8 +2,8 @@ -- 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") +if intllib_modpath then + dofile(intllib_modpath.."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end