diff --git a/default_shields.lua b/default_shields.lua index f29a8e5..1c17216 100644 --- a/default_shields.lua +++ b/default_shields.lua @@ -2,9 +2,21 @@ minetest.register_alias("castle:shield", "castle_shields:shield_1") minetest.register_alias("castle:shield_2", "castle_shields:shield_2") minetest.register_alias("castle:shield_3", "castle_shields:shield_3") --- internationalization boilerplate -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") + +-- Used for localization, choose either built-in or intllib. + +local MP, S, NS = nil + +if (minetest.get_modpath("intllib") == nil) then + S = minetest.get_translator("castle_shields") + +else + -- internationalization boilerplate + MP = minetest.get_modpath(minetest.get_current_modname()) + S, NS = dofile(MP.."/intllib.lua") + +end + --The following colors are permitted: -- "black", "blue", "brown", "cyan", "dark_green", "dark_grey", "green", "grey", "magenta", "orange", "pink", "red", "violet", "white", "yellow" @@ -15,4 +27,4 @@ local S, NS = dofile(MP.."/intllib.lua") castle_shields.register_shield("shield_1", S("Mounted Shield"), "red", "blue", "slash") castle_shields.register_shield("shield_2", S("Mounted Shield"), "cyan", "yellow", "chevron") -castle_shields.register_shield("shield_3", S("Mounted Shield"), "grey", "green", "cross") \ No newline at end of file +castle_shields.register_shield("shield_3", S("Mounted Shield"), "grey", "green", "cross") diff --git a/locale/castle_shields.it.tr b/locale/castle_shields.it.tr new file mode 100644 index 0000000..5144490 --- /dev/null +++ b/locale/castle_shields.it.tr @@ -0,0 +1,3 @@ +# textdomain:castle_shields + +Mounted Shield=Scudo appeso diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..24e5751 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain:castle_shields + +Mounted Shield= diff --git a/mod.conf b/mod.conf index 5df74cc..2e79513 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,4 @@ name = castle_shields +description = Adds decorative wall shields +depends = default, dye +optional_depends = intllib diff --git a/screenshot.png b/screenshot.png index b2cfd5f..d34c8e5 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/textures/castle_shield_back.png b/textures/castle_shield_back.png index 53cca18..46472a9 100644 Binary files a/textures/castle_shield_back.png and b/textures/castle_shield_back.png differ diff --git a/textures/castle_shield_black.png b/textures/castle_shield_black.png index cb39341..42d19a9 100644 Binary files a/textures/castle_shield_black.png and b/textures/castle_shield_black.png differ diff --git a/textures/castle_shield_blue.png b/textures/castle_shield_blue.png index 7ef3a9e..5b298aa 100644 Binary files a/textures/castle_shield_blue.png and b/textures/castle_shield_blue.png differ diff --git a/textures/castle_shield_brown.png b/textures/castle_shield_brown.png index b1c274d..7e02970 100644 Binary files a/textures/castle_shield_brown.png and b/textures/castle_shield_brown.png differ diff --git a/textures/castle_shield_cyan.png b/textures/castle_shield_cyan.png index 4bf2f4d..4d94822 100644 Binary files a/textures/castle_shield_cyan.png and b/textures/castle_shield_cyan.png differ diff --git a/textures/castle_shield_dark_green.png b/textures/castle_shield_dark_green.png index 2f6031e..1c2caf5 100644 Binary files a/textures/castle_shield_dark_green.png and b/textures/castle_shield_dark_green.png differ diff --git a/textures/castle_shield_dark_grey.png b/textures/castle_shield_dark_grey.png index 00ff607..6c66550 100644 Binary files a/textures/castle_shield_dark_grey.png and b/textures/castle_shield_dark_grey.png differ diff --git a/textures/castle_shield_green.png b/textures/castle_shield_green.png index 7b9a82a..3e76b3d 100644 Binary files a/textures/castle_shield_green.png and b/textures/castle_shield_green.png differ diff --git a/textures/castle_shield_grey.png b/textures/castle_shield_grey.png index 53ba7a3..cd368a2 100644 Binary files a/textures/castle_shield_grey.png and b/textures/castle_shield_grey.png differ diff --git a/textures/castle_shield_magenta.png b/textures/castle_shield_magenta.png index 6b60e17..5f5739f 100644 Binary files a/textures/castle_shield_magenta.png and b/textures/castle_shield_magenta.png differ diff --git a/textures/castle_shield_mask_chevron.png b/textures/castle_shield_mask_chevron.png index 59ffa37..8a6a0b2 100644 Binary files a/textures/castle_shield_mask_chevron.png and b/textures/castle_shield_mask_chevron.png differ diff --git a/textures/castle_shield_mask_cross.png b/textures/castle_shield_mask_cross.png index a032ef4..9bd3b61 100644 Binary files a/textures/castle_shield_mask_cross.png and b/textures/castle_shield_mask_cross.png differ diff --git a/textures/castle_shield_mask_slash.png b/textures/castle_shield_mask_slash.png index 1bd1174..fa6c247 100644 Binary files a/textures/castle_shield_mask_slash.png and b/textures/castle_shield_mask_slash.png differ diff --git a/textures/castle_shield_orange.png b/textures/castle_shield_orange.png index 11f4a92..aa08ec3 100644 Binary files a/textures/castle_shield_orange.png and b/textures/castle_shield_orange.png differ diff --git a/textures/castle_shield_pink.png b/textures/castle_shield_pink.png index a2b08cc..6bf89f4 100644 Binary files a/textures/castle_shield_pink.png and b/textures/castle_shield_pink.png differ diff --git a/textures/castle_shield_red.png b/textures/castle_shield_red.png index 87e8657..485c49c 100644 Binary files a/textures/castle_shield_red.png and b/textures/castle_shield_red.png differ diff --git a/textures/castle_shield_violet.png b/textures/castle_shield_violet.png index 2168cb4..3c5f915 100644 Binary files a/textures/castle_shield_violet.png and b/textures/castle_shield_violet.png differ diff --git a/textures/castle_shield_white.png b/textures/castle_shield_white.png index a124396..627062e 100644 Binary files a/textures/castle_shield_white.png and b/textures/castle_shield_white.png differ diff --git a/textures/castle_shield_yellow.png b/textures/castle_shield_yellow.png index 033d679..bfc5fa8 100644 Binary files a/textures/castle_shield_yellow.png and b/textures/castle_shield_yellow.png differ