forked from mtcontrib/mobs_monster
update translation detection
This commit is contained in:
parent
fd1807e746
commit
deea6597da
@ -1,5 +1,5 @@
|
|||||||
default
|
default
|
||||||
mobs
|
mobs
|
||||||
intllib?
|
|
||||||
lucky_block?
|
lucky_block?
|
||||||
toolranks?
|
toolranks?
|
||||||
|
intllib?
|
||||||
|
23
init.lua
23
init.lua
@ -1,23 +1,11 @@
|
|||||||
|
|
||||||
local path = minetest.get_modpath("mobs_monster")
|
-- Load support for intllib.
|
||||||
|
local path = minetest.get_modpath(minetest.get_current_modname())
|
||||||
-- Intllib
|
local S = minetest.get_translator and minetest.get_translator("mobs_monster") or
|
||||||
local S
|
dofile(path .. "/intllib.lua")
|
||||||
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
|
|
||||||
else
|
|
||||||
S = function(s) return s end
|
|
||||||
end
|
|
||||||
mobs.intllib = S
|
mobs.intllib = S
|
||||||
|
|
||||||
-- Monsters
|
-- Monsters
|
||||||
|
|
||||||
dofile(path .. "/dirt_monster.lua") -- PilzAdam
|
dofile(path .. "/dirt_monster.lua") -- PilzAdam
|
||||||
dofile(path .. "/dungeon_master.lua")
|
dofile(path .. "/dungeon_master.lua")
|
||||||
dofile(path .. "/oerkki.lua")
|
dofile(path .. "/oerkki.lua")
|
||||||
@ -28,6 +16,7 @@ dofile(path .. "/lava_flan.lua") -- Zeg9
|
|||||||
dofile(path .. "/mese_monster.lua")
|
dofile(path .. "/mese_monster.lua")
|
||||||
dofile(path .. "/spider.lua") -- AspireMint
|
dofile(path .. "/spider.lua") -- AspireMint
|
||||||
|
|
||||||
|
-- Lucky Blocks
|
||||||
dofile(path .. "/lucky_block.lua")
|
dofile(path .. "/lucky_block.lua")
|
||||||
|
|
||||||
print ("[MOD] Mobs Redo Monsters loaded")
|
print (S("[MOD] Mobs Redo Monsters loaded"))
|
||||||
|
3
intllib.lua
Normal file
3
intllib.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- Support for the old multi-load method
|
||||||
|
dofile(minetest.get_modpath("intllib").."/init.lua")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user