forked from minetest-mods/moreblocks
Big cleanup. Fix intllib support.
This commit is contained in:
parent
4b682f4730
commit
cd65ed0930
@ -1,6 +1,7 @@
|
|||||||
+---- zlib/libpng license ----+
|
zlib license
|
||||||
|
============
|
||||||
|
|
||||||
Copyright (c) 2013-2014 Calinou and contributors
|
Copyright (c) 2011-2014 Calinou and contributors
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
More Blocks
|
More Blocks
|
||||||
==========
|
===========
|
||||||
|
|
||||||
More Blocks for Minetest (http://minetest.net), a free and open source infinite
|
More Blocks for Minetest (http://minetest.net), a free and open source infinite
|
||||||
world block sandbox game.
|
world block sandbox game.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
local S = moreblocks.gettext
|
local S = moreblocks.intllib
|
||||||
|
|
||||||
circular_saw = {}
|
circular_saw = {}
|
||||||
|
|
||||||
circular_saw.known_stairs = setmetatable({}, {
|
circular_saw.known_stairs = setmetatable({}, {
|
||||||
|
22
init.lua
22
init.lua
@ -1,19 +1,22 @@
|
|||||||
--[[
|
--[[
|
||||||
-- More Blocks (moreblocks) by Calinou
|
======================================================================
|
||||||
-- Licensed under the zlib/ license for code and CC BY-SA 3.0 for textures, see LICENSE.txt for info.
|
** More Blocks **
|
||||||
|
By Calinou, with the help of ShadowNinja and VanessaE.
|
||||||
|
|
||||||
|
Copyright (c) 2011-2014 Calinou and contributors.
|
||||||
|
Licensed under the zlib license. See LICENSE.txt for more information.
|
||||||
|
======================================================================
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
moreblocks = {}
|
moreblocks = {}
|
||||||
|
|
||||||
-- Load translation library if intllib is installed
|
local S
|
||||||
|
if minetest.get_modpath("intllib") then
|
||||||
local S -- Load translation library if intllib is installed:
|
S = intllib.Getter()
|
||||||
if intllib then
|
|
||||||
S = intllib.Getter(minetest.get_current_modname())
|
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
end
|
end
|
||||||
moreblocks.gettext = S
|
moreblocks.intllib = S
|
||||||
|
|
||||||
local modpath = minetest.get_modpath("moreblocks")
|
local modpath = minetest.get_modpath("moreblocks")
|
||||||
|
|
||||||
@ -26,6 +29,5 @@ dofile(modpath .. "/crafting.lua")
|
|||||||
dofile(modpath .. "/aliases.lua")
|
dofile(modpath .. "/aliases.lua")
|
||||||
|
|
||||||
if minetest.setting_getbool("log_mods") then
|
if minetest.setting_getbool("log_mods") then
|
||||||
print(S("[moreblocks] loaded."))
|
minetest.log("action", S("[moreblocks] loaded."))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local S = moreblocks.gettext
|
local S = moreblocks.intllib
|
||||||
|
|
||||||
local sound_wood = default.node_sound_wood_defaults()
|
local sound_wood = default.node_sound_wood_defaults()
|
||||||
local sound_stone = default.node_sound_stone_defaults()
|
local sound_stone = default.node_sound_stone_defaults()
|
||||||
|
Loading…
Reference in New Issue
Block a user