2019-07-08 20:23:57 -05:00
|
|
|
--[[
|
2019-12-01 19:11:07 -06:00
|
|
|
Allows players to request from another player to be teleported to them, and do much more.
|
2020-01-09 21:13:59 -06:00
|
|
|
Copyright (C) 2014-2020 ChaosWormz and contributors
|
2019-07-17 18:04:52 -05:00
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
|
|
USA
|
|
|
|
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
|
2019-07-08 20:23:57 -05:00
|
|
|
Originally made by Traxie21 and released with the WTFPL license.
|
2019-07-17 18:04:52 -05:00
|
|
|
Forum link: https://forum.minetest.net/viewtopic.php?id=4457
|
|
|
|
|
|
|
|
Updates by Zeno, Panquesito7 and ChaosWormz.
|
2019-11-22 12:56:08 -06:00
|
|
|
License: LGPLv2.1+ for everything.
|
2019-07-08 20:23:57 -05:00
|
|
|
--]]
|
2014-07-26 09:20:32 +03:00
|
|
|
|
2019-07-15 13:52:31 -05:00
|
|
|
-- Load support for intllib.
|
|
|
|
local MP = minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
local S, NS = dofile(MP.."/intllib.lua")
|
|
|
|
|
2020-01-01 20:00:50 -06:00
|
|
|
tp = {
|
|
|
|
intllib = S
|
|
|
|
}
|
|
|
|
|
2019-08-05 23:04:38 -05:00
|
|
|
tp.tpr_list = {}
|
|
|
|
tp.tphr_list = {}
|
2014-07-26 09:20:32 +03:00
|
|
|
|
2019-07-28 18:03:32 -05:00
|
|
|
-- Clear requests when the player leaves
|
|
|
|
minetest.register_on_leaveplayer(function(name)
|
2019-08-05 23:04:38 -05:00
|
|
|
if tp.tpr_list[name] then
|
|
|
|
tp.tpr_list[name] = nil
|
2019-07-28 18:03:32 -05:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2019-08-05 23:04:38 -05:00
|
|
|
if tp.tphr_list[name] then
|
|
|
|
tp.tphr_list[name] = nil
|
2019-07-28 18:03:32 -05:00
|
|
|
return
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
2020-01-09 21:13:59 -06:00
|
|
|
dofile(MP.."/privileges.lua")
|
|
|
|
dofile(MP.."/config.lua")
|
|
|
|
dofile(MP.."/functions.lua")
|
|
|
|
dofile(MP.."/commands.lua")
|
2014-07-30 12:30:37 +10:00
|
|
|
|
2019-07-08 20:23:57 -05:00
|
|
|
-- Log
|
2019-07-15 13:52:31 -05:00
|
|
|
if minetest.settings:get_bool("log_mods") then
|
2019-08-05 23:04:38 -05:00
|
|
|
minetest.log("action", S("[Teleport Request] TPS Teleport v@1 Loaded!", tp.version))
|
2019-07-15 13:52:31 -05:00
|
|
|
end
|