forked from mtcontrib/3d_armor
		
	Replace deprecated function 'intllib.Getter':
- Check first for 'intllib.make_gettext_pair', otherwise continue using function 'intllib.Getter'.
This commit is contained in:
		@@ -1,6 +1,12 @@
 | 
			
		||||
local S = function(s) return s end
 | 
			
		||||
if minetest.global_exists("intllib") then
 | 
			
		||||
	S = intllib.Getter()
 | 
			
		||||
	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
 | 
			
		||||
	S = intllib.Getter()
 | 
			
		||||
	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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user