2019-07-18 01:04:52 +02:00
|
|
|
--[[
|
|
|
|
Configuration
|
2019-12-02 02:11:07 +01:00
|
|
|
Copyright (C) 2015-2019 ChaosWormz and contributors
|
2019-07-18 01:04:52 +02: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-19 22:53:49 +02:00
|
|
|
-- Load support for intllib.
|
|
|
|
local MP = minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
local S, NS = dofile(MP.."/intllib.lua")
|
|
|
|
|
|
|
|
-- Timeout delay and mod version.
|
2019-08-08 02:44:03 +02:00
|
|
|
tp.timeout_delay = tonumber(minetest.settings:get("tp.timeout_delay")) or 60
|
2019-08-06 06:05:39 +02:00
|
|
|
tp.version = "1.5"
|
2019-07-19 22:53:49 +02:00
|
|
|
|
2019-08-08 02:44:03 +02:00
|
|
|
-- Enable teleporting immediately to the specified player for those with "tp_admin" privilege.
|
|
|
|
tp.enable_immediate_teleport = minetest.settings:get_bool("tp.enable_immediate_teleport")
|
2019-07-28 02:34:36 +02:00
|
|
|
|
2019-07-26 02:39:26 +02:00
|
|
|
local chatmsg, source, target, name2, target_coords, pos
|
2019-07-19 22:53:49 +02:00
|
|
|
|
2019-07-18 01:04:52 +02:00
|
|
|
-- Set the values of the positions of your places, players will be able to teleport to them (no matter if it is protected, or not).
|
2019-08-07 05:19:30 +02:00
|
|
|
-- You must activate "enable_tpp_command" in order to make this to work.
|
2019-08-06 06:05:39 +02:00
|
|
|
tp.available_places = {
|
2019-07-18 01:04:52 +02:00
|
|
|
spawn = {x = 0, y = 0, z = 0}, -- Set coordinates of spawn here.
|
|
|
|
shop = {x = 0, y = 0, z = 0}, -- Set coordinates of the shop here.
|
|
|
|
}
|
2019-07-19 22:53:49 +02:00
|
|
|
|
2019-07-26 00:39:58 +02:00
|
|
|
-- Enable tpp command
|
2019-08-08 02:44:03 +02:00
|
|
|
tp.enable_tpp_command = minetest.settings:get_bool("tp.enable_tpp_command")
|
2019-07-26 00:39:58 +02:00
|
|
|
|
2019-07-19 22:53:49 +02:00
|
|
|
-- Register privileges
|
|
|
|
minetest.register_privilege("tp", {
|
|
|
|
description = S("Let players teleport to other players (request will be sent)"),
|
|
|
|
give_to_singleplayer = false,
|
|
|
|
give_to_admin = true,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_privilege("tp_admin", {
|
|
|
|
description = S("Gives full admin-access to a player."),
|
|
|
|
give_to_singleplayer = false,
|
|
|
|
give_to_admin = true,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_privilege("tp_tpc", {
|
|
|
|
description = S("Allow player to teleport to coordinates (if allowed by area protection)"),
|
|
|
|
give_to_singleplayer = false,
|
|
|
|
give_to_admin = true,
|
|
|
|
})
|