Don't rely on presence of 5.x translation API (#14)

* Update mtg.lua

* Update mcl2.lua
This commit is contained in:
LoneWolfHT 2021-10-19 17:32:31 -07:00 committed by GitHub
parent 46dc08bc6f
commit fdef9c350e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -1,4 +1,12 @@
local S = minetest.get_translator(minetest.get_current_modname())
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator(minetest.get_current_modname())
else
S = function(str)
return(str)
end
end
for _, item in pairs({"lavastuff:sword", "lavastuff:pick", "lavastuff:axe", "lavastuff:shovel"}) do
local itype = item:sub(item:find(":")+1)

View File

@ -1,4 +1,12 @@
local S = minetest.get_translator(minetest.get_current_modname())
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator(minetest.get_current_modname())
else
S = function(str)
return(str)
end
end
-- Armor
--