Rename functions.lua into pvp.lua

master
upsilon 2017-04-16 16:57:09 +02:00
parent bb35ca96ee
commit 4fbf2a8738
No known key found for this signature in database
GPG Key ID: A80DAE1F266E1C3C
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
if not minetest.setting_getbool("enable_pvp") then
minetest.log("error", "[PvP Plus] PvP Plus cannot work if PvP is disabled. Please enable PvP.")
else
dofile(minetest.get_modpath(minetest.get_current_modname()).."/functions.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()).."/pvp.lua")
end

View File

@ -90,11 +90,15 @@ unified_inventory.register_button("pvp", {
end
})
------ Load tournaments ------
dofile(minetest.get_modpath(minetest.get_current_modname()).."/tournament.lua")
------------------------------
-- Make these functions private
local tournament_on_punchplayer = pvpplus.tournament_on_punchplayer
pvpplus.tournament_on_punchplayer = nil
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
pvptable[name] = {state = false}