1
0

Fix error of backguard compatibility for 0.4 due usage of core translator

* use compatibility code for intllib lib in 0.4 series
* added dependency around intllib for 0.4
* closes: https://codeberg.org/minenux/mobs_balrog/issues/2
This commit is contained in:
mckaygerhard 2021-11-29 20:54:32 -05:00
parent e8f5a7062d
commit 45d63343a6
2 changed files with 16 additions and 2 deletions

2
depends.txt Normal file
View File

@ -0,0 +1,2 @@
mobs
intllib?

View File

@ -41,8 +41,20 @@
-- Used for localization
local S = minetest.get_translator("mobs_balrog")
local S, NS
if minetest.get_translator ~= nil then
S = minetest.get_translator(core.get_current_modname())
else
if minetest.get_modpath("intllib") then
local MP = minetest.get_modpath("intllib")
S, NS = dofile(MP.."/lib/intllib.lua")
else
S = function(str, ...)
local args={...}
return str:gsub("@%d+", function(match) return args[tonumber(match:sub(2))] end )
end
end
end
--
-- Balrog's spawn settings