2014-03-09 10:38:18 +01:00
|
|
|
--[[
|
2015-01-12 17:46:22 +01:00
|
|
|
=====================================================================
|
2014-12-27 20:30:19 +01:00
|
|
|
** More Blocks **
|
|
|
|
By Calinou, with the help of ShadowNinja and VanessaE.
|
|
|
|
|
2017-02-19 13:35:16 +01:00
|
|
|
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
2015-01-11 22:21:33 +01:00
|
|
|
Licensed under the zlib license. See LICENSE.md for more information.
|
2015-01-12 17:46:22 +01:00
|
|
|
=====================================================================
|
2014-03-09 10:38:18 +01:00
|
|
|
--]]
|
|
|
|
|
|
|
|
moreblocks = {}
|
|
|
|
|
2014-12-27 20:30:19 +01:00
|
|
|
local S
|
2017-07-09 05:32:18 +02:00
|
|
|
if minetest.global_exists("intllib") then
|
2017-07-09 05:33:10 +02:00
|
|
|
if intllib.make_gettext_pair then
|
|
|
|
S = intllib.make_gettext_pair()
|
|
|
|
else
|
|
|
|
S = intllib.Getter()
|
|
|
|
end
|
2014-03-09 10:38:18 +01:00
|
|
|
else
|
|
|
|
S = function(s) return s end
|
|
|
|
end
|
2014-12-27 20:30:19 +01:00
|
|
|
moreblocks.intllib = S
|
2014-03-09 10:38:18 +01:00
|
|
|
|
|
|
|
local modpath = minetest.get_modpath("moreblocks")
|
|
|
|
|
2018-07-14 03:20:03 +02:00
|
|
|
function moreblocks.check_protection(pos, name, tool, text)
|
|
|
|
if minetest.is_protected(pos, name) then
|
|
|
|
minetest.log("action", (name ~= "" and name or "A mod")
|
|
|
|
.. " tried to " .. text
|
|
|
|
.. " at protected position "
|
|
|
|
.. minetest.pos_to_string(pos)
|
|
|
|
.. " with a " .. (tool or ""))
|
|
|
|
minetest.record_protection_violation(pos, name)
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
2014-05-02 11:45:03 +02:00
|
|
|
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")
|
2018-07-14 03:20:03 +02:00
|
|
|
dofile(modpath .. "/sweeper.lua")
|
2014-03-09 10:38:18 +01:00
|
|
|
|
2017-05-13 04:12:56 +02:00
|
|
|
if minetest.settings:get_bool("log_mods") then
|
2014-12-27 20:30:19 +01:00
|
|
|
minetest.log("action", S("[moreblocks] loaded."))
|
2014-03-09 10:38:18 +01:00
|
|
|
end
|