mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-05 17:40:35 +02:00
implement original intllib helper
This commit is contained in:
35
init.lua
35
init.lua
@ -9,29 +9,24 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
moreblocks = {}
|
||||
moreblocks.modname = minetest.get_current_modname()
|
||||
moreblocks.modpath = minetest.get_modpath(moreblocks.modname)
|
||||
|
||||
-- Load support for intllib.
|
||||
local MP = moreblocks.modpath
|
||||
local S = dofile(MP .. "/intllib.lua")
|
||||
|
||||
local S
|
||||
if minetest.global_exists("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
S = intllib.make_gettext_pair()
|
||||
else
|
||||
S = intllib.Getter()
|
||||
end
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
moreblocks.intllib = S
|
||||
|
||||
local modpath = minetest.get_modpath("moreblocks")
|
||||
|
||||
dofile(modpath .. "/config.lua")
|
||||
dofile(modpath .. "/circular_saw.lua")
|
||||
dofile(modpath .. "/stairsplus/init.lua")
|
||||
dofile(modpath .. "/nodes.lua")
|
||||
dofile(modpath .. "/redefinitions.lua")
|
||||
dofile(modpath .. "/crafting.lua")
|
||||
dofile(modpath .. "/aliases.lua")
|
||||
-- Load mod's modules
|
||||
dofile(MP .. "/config.lua")
|
||||
dofile(MP .. "/circular_saw.lua")
|
||||
dofile(MP .. "/stairsplus/init.lua")
|
||||
dofile(MP .. "/nodes.lua")
|
||||
dofile(MP .. "/redefinitions.lua")
|
||||
dofile(MP .. "/crafting.lua")
|
||||
dofile(MP .. "/aliases.lua")
|
||||
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
minetest.log("action", S("[moreblocks] loaded."))
|
||||
minetest.log("action", S("[MOD] moreblocks loaded."))
|
||||
end
|
||||
|
Reference in New Issue
Block a user