1
0
mirror of https://codeberg.org/tenplus1/mobs_monster.git synced 2025-07-04 17:30:21 +02:00

tidy code

This commit is contained in:
tenplus1
2023-08-13 11:02:47 +01:00
parent 0c4794c446
commit 2661e900e7
13 changed files with 27 additions and 39 deletions

View File

@ -2,21 +2,8 @@
-- Load support for intllib.
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
-- Check for translation method
local S
if minetest.get_translator then
S = minetest.get_translator("mobs_monster") -- 5.x translation function
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
mobs.intllib_monster = S
-- Translation support
local S = minetest.get_translator("mobs_monster")
-- Check for custom mob spawn file
local input = io.open(path .. "spawn.lua", "r")
@ -65,4 +52,4 @@ if minetest.get_modpath("lucky_block") then
end
print ("[MOD] Mobs Redo Monsters loaded")
print ("[MOD] Mobs Monster loaded")