Compare commits
4 Commits
f099d7658b
...
2f881a219b
Author | SHA1 | Date | |
---|---|---|---|
2f881a219b | |||
be5366331a | |||
|
f3af4aee6e | ||
|
2bc36b419e |
32
init.lua
32
init.lua
@ -1,6 +1,26 @@
|
|||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
-- Intllib
|
||||||
|
local S
|
||||||
|
if minetest.get_translator ~= nil then
|
||||||
|
S = minetest.get_translator("ethereal") -- 5.x translation function
|
||||||
|
else
|
||||||
|
if minetest.get_modpath("intllib") then
|
||||||
|
dofile(minetest.get_modpath("intllib") .. "/init.lua")
|
||||||
|
if intllib.make_gettext_pair then
|
||||||
|
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
|
||||||
|
else
|
||||||
|
gettext = intllib.Getter() -- old text file method
|
||||||
|
end
|
||||||
|
S = gettext
|
||||||
|
else -- boilerplate function
|
||||||
|
S = function(str, ...)
|
||||||
|
local args = {...}
|
||||||
|
return str:gsub("@%d+", function(match)
|
||||||
|
return args[tonumber(match:sub(2))]
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if minetest.global_exists("armor") and armor.elements then
|
if minetest.global_exists("armor") and armor.elements then
|
||||||
table.insert(armor.elements, "hands")
|
table.insert(armor.elements, "hands")
|
||||||
@ -8,6 +28,14 @@ end
|
|||||||
|
|
||||||
-- Regisiter Gloves/Gauntlets
|
-- Regisiter Gloves/Gauntlets
|
||||||
|
|
||||||
|
armor:register_armor("3d_armor_gloves:gloves_admin", {
|
||||||
|
description = S("Admin Gauntlets"),
|
||||||
|
inventory_image = "3d_armor_gloves_inv_gloves_admin.png",
|
||||||
|
groups = {armor_hands=1000, armor_heal=100, armor_use=0, not_in_creative_inventory=1},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("admingloves", "3d_armor_gloves:gloves_admin")
|
||||||
|
|
||||||
if armor.materials.wood then
|
if armor.materials.wood then
|
||||||
armor:register_armor("3d_armor_gloves:gloves_wood", {
|
armor:register_armor("3d_armor_gloves:gloves_wood", {
|
||||||
description = S("Wood Gauntlets"),
|
description = S("Wood Gauntlets"),
|
||||||
|
BIN
textures/3d_armor_gloves_gloves_admin.png
Normal file
BIN
textures/3d_armor_gloves_gloves_admin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 328 B |
BIN
textures/3d_armor_gloves_gloves_admin_preview.png
Normal file
BIN
textures/3d_armor_gloves_gloves_admin_preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 301 B |
BIN
textures/3d_armor_gloves_inv_gloves_admin.png
Normal file
BIN
textures/3d_armor_gloves_inv_gloves_admin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 298 B |
Loading…
x
Reference in New Issue
Block a user