mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-25 22:13:42 +01:00
Replace deprecated function 'intllib.Getter':
- Check first for 'intllib.make_gettext_pair', otherwise continue using function 'intllib.Getter'.
This commit is contained in:
parent
38d79b91a1
commit
cc26d04345
@ -1,6 +1,12 @@
|
||||
local S = function(s) return s end
|
||||
if minetest.global_exists("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
S = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
S = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
armor:register_armor("3d_armor:helmet_admin", {
|
||||
|
@ -1,6 +1,12 @@
|
||||
local S = function(s) return s end
|
||||
if minetest.global_exists("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
S = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
S = intllib.Getter()
|
||||
end
|
||||
end
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
|
@ -1,6 +1,12 @@
|
||||
local S = function(s) return s end
|
||||
if minetest.global_exists("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
S = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
S = intllib.Getter()
|
||||
end
|
||||
end
|
||||
local armor_stand_formspec = "size[8,7]" ..
|
||||
default.gui_bg ..
|
||||
|
@ -4,7 +4,13 @@ if not minetest.global_exists("unified_inventory") then
|
||||
end
|
||||
local S = function(s) return s end
|
||||
if minetest.global_exists("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
S = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
S = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
if unified_inventory.sfinv_compat_layer then
|
||||
|
@ -4,7 +4,13 @@ if not minetest.get_modpath("technic") then
|
||||
end
|
||||
local S = function(s) return s end
|
||||
if minetest.global_exists("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
S = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
S = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_craftitem("hazmat_suit:helmet_hazmat", {
|
||||
|
@ -1,6 +1,12 @@
|
||||
local S = function(s) return s end
|
||||
if minetest.global_exists("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
S = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
S = intllib.Getter()
|
||||
end
|
||||
end
|
||||
local use_moreores = minetest.get_modpath("moreores")
|
||||
local function play_sound_effect(player, name)
|
||||
|
@ -4,7 +4,13 @@ if not minetest.get_modpath("technic_worldgen") then
|
||||
end
|
||||
local S = function(s) return s end
|
||||
if minetest.global_exists("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
S = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
S = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
local stats = {
|
||||
|
Loading…
Reference in New Issue
Block a user