anti_cracker/init.lua

41 lines
1.0 KiB
Lua
Raw Permalink Normal View History

2016-02-10 08:29:37 -08:00
--
-- Mod Ant-Cracker
--
-- Inicializador de scripts Lua
--
-- Notificador de Inicializador
local notificar = function(msg)
if minetest.setting_get("log_mods") then
minetest.debug("[ANT-CRACKER]"..msg)
end
end
local modpath = minetest.get_modpath("anti_cracker")
-- Variavel global
anti_cracker = {}
local d_anticheat = minetest.setting_getbool("disable_anticheat")
if not d_anticheat then
d_anticheat = false
end
2016-02-10 08:29:37 -08:00
-- Carregar scripts
notificar("Carregando scripts...")
dofile(modpath.."/diretrizes.lua")
dofile(modpath.."/metodos.lua")
if anti_cracker.diretrizes.anti_noclip then
dofile(modpath.."/anti_noclip.lua")
2016-02-10 15:48:04 -08:00
end
if anti_cracker.diretrizes.anti_fast and d_anticheat == false then
2016-02-10 15:48:04 -08:00
dofile(modpath.."/anti_fast.lua")
end
if anti_cracker.diretrizes.anti_dug_fast and d_anticheat == false then
dofile(modpath.."/anti_dug_fast.lua")
end
2016-02-10 08:29:37 -08:00
notificar("OK")
if d_anticheat then
minetest.log("error", "[ANTI_CRACKER]: Alguns recursos do anti_cracker foram desabilitados porque o anti_cheat padrao foi desabilitado")
end