Compare commits

...

4 Commits

Author SHA1 Message Date
mckaygerhard 2f881a219b merge admin gloves feature from do0dleme fork
* Merge branch 'main' of https://github.com/do0dleme/3d_armor_gloves into stable-0.4
* later try to merge into main
2023-01-07 16:12:36 -04:00
mckaygerhard be5366331a backuarg compat with 0.4, intllib vs get_translator 2023-01-07 16:12:31 -04:00
doodle f3af4aee6e
Add admin gloves texture 2022-09-05 11:00:09 +08:00
doodle 2bc36b419e
Add admin gloves 2022-09-05 10:59:03 +08:00
4 changed files with 30 additions and 2 deletions

View File

@ -1,6 +1,26 @@
-- 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
table.insert(armor.elements, "hands")
@ -8,6 +28,14 @@ end
-- 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
armor:register_armor("3d_armor_gloves:gloves_wood", {
description = S("Wood Gauntlets"),

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B