Compare commits
10 Commits
e64982fc70
...
8a0fac277a
Author | SHA1 | Date | |
---|---|---|---|
|
8a0fac277a | ||
|
0b24486d5c | ||
|
ee4954bdad | ||
|
cf6a550378 | ||
|
c692fa2ed1 | ||
|
a20e85128f | ||
|
547e0c8e2e | ||
|
9fb25e34b9 | ||
|
c2b6f474bf | ||
|
40de57687e |
15
.github/pull_request_template.md
vendored
15
.github/pull_request_template.md
vendored
@ -1,13 +1,17 @@
|
||||
<!-- If it fixes a reported issue, specify the issue number below -->
|
||||
<!-- markdownlint-disable first-line-heading -->
|
||||
<!-- If it fixes a reported issue, specify the issue number below and remove the backticks. -->
|
||||
|
||||
Closes #
|
||||
<!-- Closes # -->
|
||||
Things added/changed:
|
||||
|
||||
<!-- Specify what the PR adds, fixes, or does -->
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
## To do
|
||||
|
||||
Draft PR / Ready for review.
|
||||
<!-- Choose one of the options above -->
|
||||
|
||||
@ -16,4 +20,5 @@ Draft PR / Ready for review.
|
||||
- [ ] Vulnerability
|
||||
|
||||
## How to test
|
||||
|
||||
<!-- Please add testing instructions here -->
|
||||
|
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@ -1,11 +0,0 @@
|
||||
on: [push, pull_request]
|
||||
name: build
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: lint
|
||||
uses: Roang-zero1/factorio-mod-luacheck@master
|
||||
with:
|
||||
luacheckrc_url: ""
|
8
.github/workflows/luacheck.yml
vendored
Normal file
8
.github/workflows/luacheck.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
on: [push, pull_request]
|
||||
name: luacheck
|
||||
jobs:
|
||||
luacheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: lunarmodules/luacheck@master
|
@ -1,6 +1,6 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
max_line_length = 999
|
||||
max_line_length = false
|
||||
|
||||
globals = {
|
||||
"tp"
|
||||
@ -10,9 +10,6 @@ read_globals = {
|
||||
string = {fields = {"split", "trim"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
|
||||
"minetest", "vector",
|
||||
|
||||
"chat2", "gamehub",
|
||||
"intllib", "areas",
|
||||
|
||||
"minetest", "vector", "chat2",
|
||||
"gamehub", "areas",
|
||||
}
|
||||
|
15
AUTHORS.md
Normal file
15
AUTHORS.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Authors
|
||||
|
||||
## Source code
|
||||
|
||||
[ChaosWormz](https://github.com/ChaosWormz) and contributors ([GNU LGPLv2.1+](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)).
|
||||
|
||||
## Media (textures and sounds)
|
||||
|
||||
[David Leal](https://github.com/Panquesito7) ([CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)):
|
||||
|
||||
- [`tpr_warp.ogg`](https://github.com/minetest-mods/teleport-request/blob/HEAD/sounds/tpr_warp.ogg)
|
||||
|
||||
[Robbie Ferguson](https://github.com/Cat5TV) ([CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/)):
|
||||
|
||||
- [`tpr_portal_parti.png`](https://github.com/minetest-mods/teleport-request/blob/HEAD/textures/tpr_portal_parti.png)
|
23
CONTRIBUTING.md
Normal file
23
CONTRIBUTING.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Contributing
|
||||
|
||||
Welcome to the [Teleport Request](https://github.com/minetest-mods/teleport-request) mod! Before contributing, **please make sure** you have read the guidelines below.\
|
||||
If you have any doubts about these guidelines, please open [an issue](https://github.com/minetest-mods/teleport-request/issues/new), and clearly state your concerns.
|
||||
|
||||
Thank you for your interest in contributing!
|
||||
|
||||
## Creating issues
|
||||
|
||||
- Why did you open the issue? What is the reason?
|
||||
- You must explain clearly the issue you are experiencing.
|
||||
- If it's a feature request, think if it's needed.
|
||||
- You **must** be polite (while commenting on or opening an issue).
|
||||
- Review your issue before submitting it.
|
||||
|
||||
## Creating pull requests
|
||||
|
||||
- First, think if your feature/bugfix/etc. is needed before opening it.
|
||||
- Explain clearly what it does, what it changes, or any additional information.
|
||||
- You must create a new branch for your new features or bug fixes.
|
||||
- You **must** be polite (while commenting on or opening a pull request).
|
||||
- Review before opening the pull request (if it has any issues, a pending change you forgot about, etc.).
|
||||
- You must enable the checkbox `Allow edits from maintainers`.
|
@ -1,5 +1,3 @@
|
||||
Copyright (C) ChaosWormz 2014-2021 and contributors
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
@ -57,7 +55,7 @@ modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
@ -113,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@ -160,7 +158,7 @@ Library.
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
@ -218,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@ -269,7 +267,7 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
@ -331,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@ -372,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@ -424,7 +422,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@ -458,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
@ -487,8 +485,7 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
|
||||
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
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@ -497,8 +494,7 @@ school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random
|
||||
Hacker.
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
95
LICENSE.txt
Normal file
95
LICENSE.txt
Normal file
@ -0,0 +1,95 @@
|
||||
License of source code
|
||||
----------------------
|
||||
|
||||
GNU Lesser General Public License, version 2.1
|
||||
Copyright (C) 2014-2024 ChaosWormz and contributors
|
||||
|
||||
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
|
||||
|
||||
Licenses of media (textures and sounds)
|
||||
---------------------------------------
|
||||
|
||||
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
Copyright (C) 2020 David Leal (halfpacho@gmail.com)
|
||||
|
||||
You are free to:
|
||||
|
||||
Share — copy and redistribute the material in any medium or format for any
|
||||
purpose, even commercially.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even
|
||||
commercially.
|
||||
|
||||
The licensor cannot revoke these freedoms as long as you follow the license
|
||||
terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license,
|
||||
and indicate if changes were made. You may do so in any reasonable manner,
|
||||
but not in any way that suggests the licensor endorses you or your use.
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must
|
||||
distribute your contributions under the same license as the original.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological
|
||||
measures that legally restrict others from doing anything the license permits.
|
||||
|
||||
Notices:
|
||||
|
||||
You do not have to comply with the license for elements of the material in the public
|
||||
domain or where your use is permitted by an applicable exception or limitation.
|
||||
|
||||
No warranties are given. The license may not give you all of the permissions necessary for
|
||||
your intended use. For example, other rights such as publicity, privacy, or moral rights
|
||||
may limit how you use the material.
|
||||
|
||||
For more details:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
-----------------------
|
||||
|
||||
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
||||
Robbie Ferguson
|
||||
|
||||
No Copyright
|
||||
|
||||
The person who associated a work with this deed has dedicated the work to
|
||||
the public domain by waiving all of his or her rights to the work worldwide
|
||||
under copyright law, including all related and neighboring rights, to the extent
|
||||
allowed by law.
|
||||
|
||||
You can copy, modify, distribute and perform the work, even for commercial
|
||||
purposes, all without asking permission. See Other Information below.
|
||||
|
||||
Other Information:
|
||||
|
||||
In no way are the patent or trademark rights of any person affected by CC0,
|
||||
nor are the rights that other persons may have in the work or in how the work
|
||||
is used, such as publicity or privacy rights.
|
||||
|
||||
Unless expressly stated otherwise, the person who associated a work with this
|
||||
deed makes no warranties about the work, and disclaims liability for all uses
|
||||
of the work, to the fullest extent permitted by applicable law.
|
||||
|
||||
When using or citing the work, you should not imply endorsement by the
|
||||
author or the affirmer.
|
||||
|
||||
For more details:
|
||||
https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
See `AUTHORS.md`.
|
80
README.md
80
README.md
@ -1,10 +1,23 @@
|
||||
# Teleport Request
|
||||
|
||||
[![Build status](https://github.com/ChaosWormz/teleport-request/workflows/build/badge.svg)](https://github.com/ChaosWormz/teleport-request/actions)
|
||||
[![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
|
||||
[![LuaCheck status](https://github.com/minetest-mods/teleport-request/workflows/luacheck/badge.svg)](https://github.com/minetest-mods/teleport-request/actions)
|
||||
[![ContentDB](https://content.minetest.net/packages/Traxie21/tpr/shields/downloads/)](https://content.minetest.net/packages/Traxie21/tpr/)
|
||||
|
||||
Allows players to request from another player to be teleported to them.
|
||||
Allows players to send a request to other players to teleport to them. Includes many more teleporting features.
|
||||
|
||||
## Installation
|
||||
|
||||
- Unzip the archive, rename the folder to `tpr` and
|
||||
place it in `.. minetest/mods/`
|
||||
|
||||
- GNU/Linux: If you use a system-wide installation place
|
||||
it in `~/.minetest/mods/`.
|
||||
|
||||
- If you only want this to be used in a single world, place
|
||||
the folder in `.. worldmods/` in your world directory.
|
||||
|
||||
For further information or help, see:\
|
||||
<https://wiki.minetest.net/Installing_Mods>
|
||||
|
||||
## Privileges
|
||||
|
||||
@ -30,7 +43,7 @@ Note there must be 2 players in order to make the commands to work: a player mus
|
||||
|
||||
There are two ways of sending a request:
|
||||
|
||||
1. A request which teleports you to the specified player (command `/tpr <player>`).\
|
||||
1. A request which teleports you to the specified player (command `/tpr <player>`).
|
||||
2. A request which teleports the specified player to you (command `/tphr <player>`).
|
||||
|
||||
To accept a request some sent you, you must use `/tpy`.\
|
||||
@ -84,45 +97,6 @@ These are the following commands available in-game:
|
||||
- **Description:** Deny a user's request to teleport to you or teleport you to them.
|
||||
- **Required privileges:** `interact, tp`
|
||||
|
||||
## Optional dependencies
|
||||
|
||||
- [areas](https://github.com/minetest-mods/areas)
|
||||
- [beerchat](https://github.com/minetest-beerchat/beerchat)
|
||||
- [chat2](https://github.com/minetest-mods/chat2)
|
||||
- [gamehub](https://github.com/shivajiva101/minetest-gamehub)
|
||||
|
||||
## Requirements
|
||||
|
||||
This mod requires MT 5.0.0+ to run.\
|
||||
Older versions not supported.
|
||||
|
||||
## Issues, suggestions, features & bugfixes
|
||||
|
||||
Report bugs or suggest ideas by [creating an issue](https://github.com/ChaosWormz/teleport-request/issues/new).\
|
||||
If you know how to fix an issue, or want something to be added, consider opening a [pull request](https://github.com/ChaosWormz/teleport-request/compare).
|
||||
|
||||
## License
|
||||
|
||||
Copyright (C) 2014-2021 ChaosWormz and contributors.
|
||||
|
||||
Teleport Request code is licensed under LGPLv2.1+, see [`LICENSE.md`](LICENSE.md).\
|
||||
[`tpr_warp.ogg`](sounds/tpr_warp.ogg) is licensed under [CC BY-SA 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/).
|
||||
|
||||
## Contributors
|
||||
|
||||
List of contributors (in no particular order):
|
||||
|
||||
- [RobbieF](https://minetest.tv) | [GitHub](https://github.com/Cat5TV)
|
||||
- [DonBatman](https://github.com/donbatman)
|
||||
- [NathanS21](http://nathansalapat.com/) | [GitHub](https://github.com/NathanSalapat)
|
||||
- [ChaosWormz](https://github.com/ChaosWormz)
|
||||
- [Panquesito7](https://github.com/Panquesito7)
|
||||
- [coil0](https://github.com/coil0)
|
||||
- [Zeno-](https://github.com/Zeno-)
|
||||
- [indriApollo](https://github.com/indriApollo)
|
||||
- [Billy-S](https://github.com/Billy-S)
|
||||
- Traxie21, the original creator of this mod (however, he/she does not have a GitHub account anymore).
|
||||
|
||||
## Configuring the mod
|
||||
|
||||
Open your `minetest.conf` located in your Minetest directory.\
|
||||
@ -140,20 +114,6 @@ Those values are the default values of the mod.\
|
||||
You can also go to your Minetest, Settings tab, All settings, Mods, and you'll find `tpr` there.\
|
||||
Or another way to do it, is changing the values in `settingtypes.txt`.
|
||||
|
||||
## Installation
|
||||
|
||||
- Unzip the archive, rename the folder to `tpr` and
|
||||
place it in .. minetest/mods/
|
||||
|
||||
- GNU/Linux: If you use a system-wide installation place
|
||||
it in ~/.minetest/mods/.
|
||||
|
||||
- If you only want this to be used in a single world, place
|
||||
the folder in .. worldmods/ in your world directory.
|
||||
|
||||
For further information or help, see:\
|
||||
<https://wiki.minetest.net/Installing_Mods>
|
||||
|
||||
## TODO
|
||||
|
||||
- Add limitations to /tpc which only allow a user to teleport X number of blocks. Prevents users from teleporting to the edge of the world.
|
||||
@ -161,4 +121,8 @@ For further information or help, see:\
|
||||
- Rewrite to place all chat commands into one single command much like how /teleport works.
|
||||
- Make evade respect land: no teleporting inside land, but instead make sure player is standing on surface or in water.
|
||||
|
||||
If you think something else should be added to this list, [submit an issue](https://github.com/ChaosWormz/teleport-request/issues/new).
|
||||
If you think something else should be added to this list, [submit an issue](https://github.com/minetest-mods/teleport-request/issues/new).
|
||||
|
||||
## License
|
||||
|
||||
See [`LICENSE.txt`](LICENSE.txt) for full license information and [`AUTHORS.md`](AUTHORS.md) for all the contributors.
|
||||
|
14
commands.lua
14
commands.lua
@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Commands
|
||||
Copyright (C) 2014-2021 ChaosWormz and contributors
|
||||
Copyright (C) 2014-2024 ChaosWormz and contributors
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@ -18,8 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
--]]
|
||||
|
||||
-- Support for intllib
|
||||
local S = tp.intllib
|
||||
local S = tp.S
|
||||
|
||||
minetest.register_chatcommand("tpr", {
|
||||
description = S("Request teleport to another player"),
|
||||
@ -67,6 +66,15 @@ minetest.register_chatcommand("tpn", {
|
||||
func = tp.tpr_deny
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("tpf", {
|
||||
description = S("Show all teleport requests, made by you or to you, that are still active"),
|
||||
privs = {interact = true, tp = true},
|
||||
func = function(player)
|
||||
tp.tpf_update_time[player] = true
|
||||
tp.list_requests(player)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("tpr_mute", {
|
||||
description = S("Mutes a player: denies them from sending you teleport requests"),
|
||||
params = S("<playername> | leave playername empty to see help message"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Configuration
|
||||
Copyright (C) 2014-2021 ChaosWormz and contributors
|
||||
Copyright (C) 2014-2024 ChaosWormz and contributors
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
536
functions.lua
536
functions.lua
@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Functions
|
||||
Copyright (C) 2014-2021 ChaosWormz and contributors
|
||||
Copyright (C) 2014-2024 ChaosWormz and contributors
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@ -18,11 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
--]]
|
||||
|
||||
-- Support for intllib
|
||||
local S = tp.intllib
|
||||
local S = tp.S
|
||||
|
||||
-- Placeholders
|
||||
local chatmsg, source, target, name2,
|
||||
local chatmsg, source, target,
|
||||
target_coords, tpc_target_coords, old_tpc_target_coords
|
||||
|
||||
local spam_prevention = {}
|
||||
@ -56,6 +55,317 @@ local function send_message(player, message)
|
||||
end
|
||||
end
|
||||
|
||||
local next_request_id = 0
|
||||
local request_list = {}
|
||||
local sender_list = {}
|
||||
local receiver_list = {}
|
||||
local area_list = {}
|
||||
|
||||
function tp.make_request(sender, receiver, direction)
|
||||
next_request_id = next_request_id+1
|
||||
request_list[next_request_id] = {
|
||||
time = os.time(),
|
||||
direction = direction or "receiver",
|
||||
receiver = receiver,
|
||||
sender = sender
|
||||
}
|
||||
|
||||
receiver_list[receiver] = receiver_list[receiver] or {count=0}
|
||||
receiver_list[receiver][next_request_id] = true
|
||||
receiver_list[receiver].count = receiver_list[receiver].count+1
|
||||
|
||||
sender_list[sender] = sender_list[sender] or {count=0}
|
||||
sender_list[sender][next_request_id] = true
|
||||
sender_list[sender].count = sender_list[sender].count+1
|
||||
|
||||
return next_request_id
|
||||
end
|
||||
|
||||
function tp.clear_request(id)
|
||||
local request = request_list[id]
|
||||
request_list[id] = nil
|
||||
|
||||
sender_list[request.sender][id] = nil
|
||||
receiver_list[request.receiver][id] = nil
|
||||
|
||||
sender_list[request.sender].count = sender_list[request.sender].count-1
|
||||
receiver_list[request.receiver].count = receiver_list[request.receiver].count-1
|
||||
|
||||
return request
|
||||
end
|
||||
|
||||
function tp.accept_request(id)
|
||||
|
||||
local request = tp.clear_request(id)
|
||||
|
||||
if request.direction == "area" then
|
||||
source = minetest.get_player_by_name(request.receiver)
|
||||
target = minetest.get_player_by_name(request.sender)
|
||||
chatmsg = S("@1 is teleporting to your protected area @2.", request.sender, minetest.pos_to_string(tpc_target_coords[request.receiver]))
|
||||
-- If source or target are not present, abort request.
|
||||
if not source or not target then
|
||||
send_message(request.receiver, S("@1 is not online right now.", request.sender))
|
||||
return
|
||||
end
|
||||
if not tpc_target_coords[request.receiver] then
|
||||
tpc_target_coords[request.sender] = old_tpc_target_coords[request.receiver]
|
||||
tp.tpp_teleport_player(request.sender, tpc_target_coords[request.sender])
|
||||
|
||||
chatmsg = S("@1 is teleporting to your protected area @2.", request.sender, minetest.pos_to_string(tpc_target_coords[request.sender]))
|
||||
else
|
||||
tp.tpp_teleport_player(request.sender, tpc_target_coords[request.receiver])
|
||||
chatmsg = S("@1 is teleporting to your protected area @2.", request.sender, minetest.pos_to_string(tpc_target_coords[request.receiver]))
|
||||
end
|
||||
|
||||
send_message(request.receiver, chatmsg)
|
||||
send_message(request.sender, S("Request Accepted!"))
|
||||
|
||||
-- Avoid abusing with area requests
|
||||
target_coords = nil
|
||||
elseif request.direction == "receiver" then
|
||||
source = minetest.get_player_by_name(request.receiver)
|
||||
target = minetest.get_player_by_name(request.sender)
|
||||
chatmsg = S("@1 is teleporting to you.", request.sender)
|
||||
-- Could happen if either player disconnects (or timeout); if so just abort
|
||||
if not source
|
||||
or not target then
|
||||
send_message(request.receiver, S("@1 is not online right now.", request.sender))
|
||||
return
|
||||
end
|
||||
|
||||
tp.tpr_teleport_player()
|
||||
|
||||
-- Avoid abusing with area requests
|
||||
target_coords = nil
|
||||
|
||||
send_message(request.receiver, chatmsg)
|
||||
|
||||
if minetest.check_player_privs(request.sender, {tp_admin = true}) == false then
|
||||
send_message(request.sender, S("Request Accepted!"))
|
||||
else
|
||||
if tp.enable_immediate_teleport then return end
|
||||
|
||||
send_message(request.sender, S("Request Accepted!"))
|
||||
return
|
||||
end
|
||||
elseif request.direction == "sender" then
|
||||
source = minetest.get_player_by_name(request.sender)
|
||||
target = minetest.get_player_by_name(request.receiver)
|
||||
chatmsg = S("You are teleporting to @1.", request.sender)
|
||||
-- Could happen if either player disconnects (or timeout); if so just abort
|
||||
if not source
|
||||
or not target then
|
||||
send_message(request.receiver, S("@1 is not online right now.", request.sender))
|
||||
return
|
||||
end
|
||||
|
||||
tp.tpr_teleport_player()
|
||||
|
||||
-- Avoid abusing with area requests
|
||||
target_coords = nil
|
||||
|
||||
send_message(request.receiver, chatmsg)
|
||||
|
||||
if minetest.check_player_privs(request.sender, {tp_admin = true}) == false then
|
||||
send_message(request.sender, S("Request Accepted!"))
|
||||
else
|
||||
if tp.enable_immediate_teleport then return end
|
||||
|
||||
send_message(request.sender, S("Request Accepted!"))
|
||||
return
|
||||
end
|
||||
end
|
||||
return request
|
||||
end
|
||||
|
||||
function tp.deny_request(id, own)
|
||||
local request = tp.clear_request(id)
|
||||
if own then
|
||||
send_message(request.sender, S("You denied your request sent to @1.", request.receiver))
|
||||
send_message(request.receiver, S("@1 denied their request sent to you.", request.sender))
|
||||
else
|
||||
if request.direction == "area" then
|
||||
send_message(request.sender, S("Area request denied."))
|
||||
send_message(request.receiver, S("You denied the request @1 sent you.", request.sender))
|
||||
spam_prevention[request.receiver] = request.sender
|
||||
elseif request.direction == "receiver" then
|
||||
send_message(request.sender, S("Teleport request denied."))
|
||||
send_message(request.receiver, S("You denied the request @1 sent you.", request.sender))
|
||||
spam_prevention[request.receiver] = request.sender
|
||||
elseif request.direction == "sender" then
|
||||
send_message(request.sender, S("Teleport request denied."))
|
||||
send_message(request.receiver, S("You denied the request @1 sent you.", request.sender))
|
||||
spam_prevention[request.receiver] = request.sender
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function tp.list_requests(playername)
|
||||
local sent_requests = tp.get_requests(playername, "sender")
|
||||
local received_requests = tp.get_requests(playername, "receiver")
|
||||
local area_requests = tp.get_requests(playername, "area")
|
||||
|
||||
local formspec
|
||||
if sent_requests.count == 0 and received_requests.count == 0 and area_requests.count == 0 then
|
||||
formspec = ("size[5,2]label[1,0.3;%s:]"):format(S("Teleport Requests"))
|
||||
formspec = formspec..("label[1,1.2;%s]"):format(S("You have no requests."))
|
||||
else
|
||||
local y = 1
|
||||
local request_list_formspec = ""
|
||||
if sent_requests.count ~= 0 then
|
||||
request_list_formspec = request_list_formspec..("label[0.2,%f;%s:]"):format(y, S("Sent by you"))
|
||||
y = y+0.7
|
||||
for request_id, _ in pairs(sent_requests) do
|
||||
if request_id ~= "count" then
|
||||
local request = request_list[request_id]
|
||||
if request.direction == "receiver" then
|
||||
request_list_formspec = request_list_formspec..("label[0.3,%f;%s]button[7,%f;1,1;deny_%s;Cancel]")
|
||||
:format(
|
||||
y, tostring(os.time()-request.time).."s ago: "..S("You are requesting to teleport to @1.", request.receiver),
|
||||
y, tostring(request_id)
|
||||
)
|
||||
elseif request.direction == "sender" then
|
||||
request_list_formspec = request_list_formspec..("label[0.3,%f;%s]button[7,%f;1,1;deny_%s;Cancel]")
|
||||
:format(
|
||||
y, tostring(os.time()-request.time).."s: "..S("You are requesting that @1 teleports to you.", request.receiver),
|
||||
y, tostring(request_id)
|
||||
)
|
||||
elseif request.direction == "area" then
|
||||
request_list_formspec = request_list_formspec..("label[0.3,%f;%s]button[7,%f;1,1;deny_%s;Cancel]")
|
||||
:format(
|
||||
y, tostring(os.time()-request.time).."s: "..S("You are requesting to teleport to @1's protected area.", request.receiver),
|
||||
y, tostring(request_id)
|
||||
)
|
||||
end
|
||||
y = y+0.8
|
||||
end
|
||||
end
|
||||
end
|
||||
if received_requests.count ~= 0 then
|
||||
y = y+0.5
|
||||
request_list_formspec = request_list_formspec..("label[0.2,%f;%s:]"):format(y, S("Sent to you"))
|
||||
y = y+0.7
|
||||
for request_id, _ in pairs(received_requests) do
|
||||
if request_id ~= "count" then
|
||||
local request = request_list[request_id]
|
||||
if request.direction == "receiver" then
|
||||
request_list_formspec = request_list_formspec..("label[0.3,%f;%s]button[6,%f;1,1;accept_%s;Accept]button[7,%f;1,1;deny_%s;Deny]")
|
||||
:format(
|
||||
y, tostring(os.time()-request.time).."s ago: "..S("@1 is requesting to teleport to you.", request.sender),
|
||||
y, tostring(request_id),
|
||||
y, tostring(request_id)
|
||||
)
|
||||
elseif request.direction == "sender" then
|
||||
request_list_formspec = request_list_formspec..("label[0.3,%f;%s]button[6,%f;1,1;accept_%s;Accept]button[7,%f;1,1;deny_%s;Deny]")
|
||||
:format(
|
||||
y, tostring(os.time()-request.time).."s ago: "..S("@1 is requesting that you teleport to them.", request.sender),
|
||||
y, tostring(request_id),
|
||||
y, tostring(request_id)
|
||||
)
|
||||
elseif request.direction == "area" then
|
||||
request_list_formspec = request_list_formspec..("label[0.3,%f;%s]button[6,%f;1,1;accept_%s;Accept]button[7,%f;1,1;deny_%s;Deny]")
|
||||
:format(
|
||||
y, tostring(os.time()-request.time).."s ago: "..S("@1 is requesting to teleport to your protected area.", request.sender),
|
||||
y, tostring(request_id),
|
||||
y, tostring(request_id)
|
||||
)
|
||||
end
|
||||
y = y+0.8
|
||||
end
|
||||
end
|
||||
end
|
||||
formspec = ("size[8,%f]label[1,0.3;%s:]"):format(math.min(y,10),S("Teleport Requests"))
|
||||
..request_list_formspec
|
||||
end
|
||||
|
||||
minetest.show_formspec(playername, "teleport_request_list", formspec)
|
||||
|
||||
local function update_time()
|
||||
if formspec == "" or string.find(formspec, S("You have no requests.")) then
|
||||
tp.tpf_update_time[playername] = false
|
||||
return
|
||||
end
|
||||
|
||||
if tp.tpf_update_time[playername] then
|
||||
-- TODO: find a way to edit the text only and update
|
||||
-- the formspec without re-calling the function.
|
||||
tp.list_requests(playername)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.after(1, update_time)
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "teleport_request_list" then return end
|
||||
|
||||
local playername = player:get_player_name()
|
||||
|
||||
local accepts = {}
|
||||
local denys = {}
|
||||
for button_name, _ in pairs(fields) do
|
||||
if string.sub(button_name, 1, 5) == "deny_" then
|
||||
table.insert(denys, tonumber(string.sub(button_name, 6)))
|
||||
elseif string.sub(button_name, 1, 7) == "accept_" then
|
||||
table.insert(accepts, tonumber(string.sub(button_name, 8)))
|
||||
end
|
||||
end
|
||||
local changes = false
|
||||
for _, id in ipairs(accepts) do
|
||||
if request_list[id] and request_list[id].receiver == playername then
|
||||
tp.accept_request(id)
|
||||
changes = true
|
||||
end
|
||||
end
|
||||
for _, id in ipairs(denys) do
|
||||
if request_list[id] and (request_list[id].sender == playername or request_list[id].receiver == playername) then
|
||||
tp.deny_request(id, request_list[id].sender == playername)
|
||||
changes = true
|
||||
end
|
||||
end
|
||||
|
||||
if changes and not fields.quit then
|
||||
tp.tpf_update_time[playername] = true
|
||||
tp.list_requests(playername)
|
||||
elseif fields.quit then
|
||||
tp.tpf_update_time[playername] = false
|
||||
end
|
||||
end)
|
||||
|
||||
function tp.get_requests(playername, party)
|
||||
local list
|
||||
if party == "sender" then
|
||||
list = sender_list
|
||||
elseif party == "receiver" then
|
||||
list = receiver_list
|
||||
elseif party == "area" then
|
||||
list = area_list
|
||||
else
|
||||
return -- Invalid party
|
||||
end
|
||||
if not list then return end
|
||||
|
||||
return list[playername] or {count=0}
|
||||
end
|
||||
|
||||
function tp.count_requests(playername, party)
|
||||
local player_list = tp.get_requests(playername, party)
|
||||
if not player_list then return 0 end
|
||||
|
||||
return player_list.count or 0
|
||||
end
|
||||
|
||||
function tp.first_request(playername, party)
|
||||
local player_list = tp.get_requests(playername, party)
|
||||
if not player_list then return end
|
||||
|
||||
for request_id, _ in pairs(player_list) do
|
||||
if request_id ~= "count" then
|
||||
return request_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local map_size = 30912
|
||||
function tp.can_teleport(to)
|
||||
return to.x < map_size and to.x > -map_size and to.y < map_size and to.y > -map_size and to.z < map_size and to.z > -map_size
|
||||
@ -206,9 +516,7 @@ function tp.tpr_send(sender, receiver)
|
||||
band = true
|
||||
end
|
||||
end, sender, receiver)
|
||||
|
||||
else
|
||||
|
||||
-- Compatibility with beerchat
|
||||
if minetest.get_modpath("beerchat") and not minetest.check_player_privs(sender, {tp_admin = true}) then
|
||||
if receiver == "" then
|
||||
@ -239,9 +547,8 @@ function tp.tpr_send(sender, receiver)
|
||||
return
|
||||
end
|
||||
|
||||
tp.tpr_list[receiver] = sender
|
||||
tp.tpr_accept(receiver)
|
||||
send_message(sender, S("You are teleporting to @1.", receiver))
|
||||
local id = tp.make_request(sender, receiver, "receiver")
|
||||
tp.accept_request(id)
|
||||
return
|
||||
end
|
||||
|
||||
@ -265,21 +572,18 @@ function tp.tpr_send(sender, receiver)
|
||||
send_message(receiver, S("@1 is requesting to teleport to you. /tpy to accept.", sender))
|
||||
send_message(sender, S("Teleport request sent! It will timeout in @1 seconds.", tp.timeout_delay))
|
||||
|
||||
-- Write name values to list and clear old values.
|
||||
tp.tpr_list[receiver] = sender
|
||||
tp.tpn_list[sender] = receiver
|
||||
local tp_id = tp.make_request(sender, receiver, "receiver")
|
||||
|
||||
-- Teleport timeout delay
|
||||
minetest.after(tp.timeout_delay, function(sender_name, receiver_name)
|
||||
if tp.tpr_list[receiver_name] and tp.tpn_list[sender_name] then
|
||||
tp.tpr_list[receiver_name] = nil
|
||||
tp.tpn_list[sender_name] = nil
|
||||
minetest.after(tp.timeout_delay, function(id)
|
||||
if request_list[id] then
|
||||
local request = tp.clear_request(id)
|
||||
|
||||
send_message(sender_name, S("Request timed-out."))
|
||||
send_message(receiver_name, S("Request timed-out."))
|
||||
send_message(request.sender, S("Request timed-out."))
|
||||
send_message(request.receiver, S("Request timed-out."))
|
||||
return
|
||||
end
|
||||
end, sender, receiver)
|
||||
end, tp_id)
|
||||
end
|
||||
end
|
||||
|
||||
@ -313,9 +617,7 @@ function tp.tphr_send(sender, receiver)
|
||||
band = true
|
||||
end
|
||||
end, sender, receiver)
|
||||
|
||||
else
|
||||
|
||||
-- Compatibility with beerchat
|
||||
if minetest.get_modpath("beerchat") and not minetest.check_player_privs(sender, {tp_admin = true}) then
|
||||
if receiver == "" then
|
||||
@ -372,22 +674,18 @@ function tp.tphr_send(sender, receiver)
|
||||
send_message(receiver, S("@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny.", sender))
|
||||
send_message(sender, S("Teleport request sent! It will timeout in @1 seconds.", tp.timeout_delay))
|
||||
|
||||
-- Write name values to list and clear old values.
|
||||
tp.tphr_list[receiver] = sender
|
||||
tp.tpn_list[sender] = receiver
|
||||
local tp_id = tp.make_request(sender, receiver, "sender")
|
||||
|
||||
-- Teleport timeout delay
|
||||
minetest.after(tp.timeout_delay, function(id)
|
||||
if request_list[id] then
|
||||
local request = tp.clear_request(id)
|
||||
|
||||
minetest.after(tp.timeout_delay, function(sender_name, receiver_name)
|
||||
if tp.tphr_list[receiver_name] and tp.tpn_list[sender_name] then
|
||||
tp.tphr_list[receiver_name] = nil
|
||||
tp.tpn_list[sender_name] = nil
|
||||
|
||||
send_message(sender_name, S("Request timed-out."))
|
||||
send_message(receiver_name, S("Request timed-out."))
|
||||
send_message(request.sender, S("Request timed-out."))
|
||||
send_message(request.receiver, S("Request timed-out."))
|
||||
return
|
||||
end
|
||||
end, sender, receiver)
|
||||
end, tp_id)
|
||||
end
|
||||
end
|
||||
|
||||
@ -442,19 +740,17 @@ function tp.tpc_send(sender, coordinates)
|
||||
send_message(area.owner, S("@1 is requesting to teleport to a protected area" ..
|
||||
" of yours @2.", sender, minetest.pos_to_string(tpc_target_coords[area.owner])))
|
||||
|
||||
tp.tpc_list[area.owner] = sender
|
||||
tp.tpn_list[sender] = area.owner
|
||||
local tp_id = tp.make_request(sender, area.owner, "area")
|
||||
|
||||
minetest.after(tp.timeout_delay, function(sender_name, receiver_name)
|
||||
if tp.tpc_list[receiver_name] and tp.tpn_list[sender_name] then
|
||||
tp.tpc_list[receiver_name] = nil
|
||||
tp.tpn_list[sender_name] = nil
|
||||
minetest.after(tp.timeout_delay, function(id)
|
||||
if request_list[id] then
|
||||
local request = tp.clear_request(id)
|
||||
|
||||
send_message(sender_name, S("Request timed-out."))
|
||||
send_message(receiver_name, S("Request timed-out."))
|
||||
send_message(request.sender, S("Request timed-out."))
|
||||
send_message(request.receiver, S("Request timed-out."))
|
||||
return
|
||||
end
|
||||
end, sender, area.owner)
|
||||
end, tp_id)
|
||||
else
|
||||
minetest.record_protection_violation(target_coords, sender)
|
||||
end
|
||||
@ -476,63 +772,27 @@ function tp.tpc_send(sender, coordinates)
|
||||
end
|
||||
|
||||
function tp.tpr_deny(name)
|
||||
if not tp.tpr_list[name] and not tp.tphr_list[name]
|
||||
and not tp.tpc_list[name] and not tp.tpn_list[name] then
|
||||
if tp.count_requests(name, "sender") == 0 and tp.count_requests(name, "receiver") == 0 then
|
||||
send_message(name, S("Usage: /tpn allows you to deny teleport/area requests sent to you by other players."))
|
||||
return
|
||||
end
|
||||
|
||||
-- Area requests
|
||||
if tp.tpc_list[name] then
|
||||
name2 = tp.tpc_list[name]
|
||||
send_message(name2, S("Area request denied."))
|
||||
send_message(name, S("You denied the request @1 sent you.", name2))
|
||||
tp.tpc_list[name] = nil
|
||||
|
||||
-- Don't allow re-denying requests.
|
||||
tp.tpn_list[name2] = nil
|
||||
if (tp.count_requests(name, "sender") + tp.count_requests(name, "receiver")) > 1 then
|
||||
-- Show formspec for decision
|
||||
tp.list_requests(name)
|
||||
tp.tpf_update_time[name] = true
|
||||
return
|
||||
end
|
||||
|
||||
-- Teleport requests
|
||||
if tp.tpr_list[name] then
|
||||
name2 = tp.tpr_list[name]
|
||||
send_message(name2, S("Teleport request denied."))
|
||||
send_message(name, S("You denied the request @1 sent you.", name2))
|
||||
local received_request = tp.first_request(name, "receiver")
|
||||
if received_request then
|
||||
tp.deny_request(received_request, false)
|
||||
return
|
||||
end
|
||||
|
||||
tp.tpr_list[name] = nil
|
||||
spam_prevention[name] = name2
|
||||
|
||||
-- Don't allow re-denying requests.
|
||||
tp.tpn_list[name2] = nil
|
||||
|
||||
elseif tp.tphr_list[name] then
|
||||
name2 = tp.tphr_list[name]
|
||||
send_message(name2, S("Teleport request denied."))
|
||||
send_message(name, S("You denied the request @1 sent you.", name2))
|
||||
|
||||
tp.tphr_list[name] = nil
|
||||
spam_prevention[name] = name2
|
||||
|
||||
-- Don't allow re-denying requests.
|
||||
tp.tpn_list[name2] = nil
|
||||
|
||||
elseif tp.tpn_list[name] then
|
||||
name2 = tp.tpn_list[name]
|
||||
send_message(name, S("You denied your request sent to @1.", name2))
|
||||
send_message(name2, S("@1 denied their request sent to you.", name))
|
||||
|
||||
if tp.tpr_list[name2] then
|
||||
tp.tpr_list[name2] = nil
|
||||
|
||||
elseif tp.tphr_list[name2] then
|
||||
tp.tphr_list[name2] = nil
|
||||
|
||||
elseif tp.tpc_list[name2] then
|
||||
tp.tpc_list[name2] = nil
|
||||
end
|
||||
|
||||
tp.tpn_list[name] = nil
|
||||
local sent_request = tp.first_request(name, "sender")
|
||||
if sent_request then
|
||||
tp.deny_request(sent_request, true)
|
||||
return
|
||||
end
|
||||
end
|
||||
@ -540,103 +800,23 @@ end
|
||||
-- Teleport Accept Systems
|
||||
function tp.tpr_accept(name)
|
||||
-- Check to prevent constant teleporting
|
||||
if not tp.tpr_list[name] and not tp.tphr_list[name]
|
||||
and not tp.tpc_list[name] then
|
||||
if tp.count_requests(name, "receiver") == 0 then
|
||||
send_message(name, S("Usage: /tpy allows you to accept teleport/area requests sent to you by other players."))
|
||||
return
|
||||
end
|
||||
|
||||
-- Area requests
|
||||
if tp.tpc_list[name] then
|
||||
|
||||
if tp.tpc_list[name] then
|
||||
name2 = tp.tpc_list[name]
|
||||
source = minetest.get_player_by_name(name)
|
||||
target = minetest.get_player_by_name(name2)
|
||||
chatmsg = S("@1 is teleporting to your protected area @2.", name2, minetest.pos_to_string(tpc_target_coords[name]))
|
||||
tp.tpc_list[name] = nil
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
-- If source or target are not present, abort request.
|
||||
if not source or not target then
|
||||
send_message(name, S("@1 is not online right now.", name2))
|
||||
tp.tpc_list[name] = nil
|
||||
return
|
||||
end
|
||||
|
||||
if not tpc_target_coords[name] then
|
||||
tpc_target_coords[name2] = old_tpc_target_coords[name]
|
||||
tp.tpp_teleport_player(name2, tpc_target_coords[name2])
|
||||
|
||||
chatmsg = S("@1 is teleporting to your protected area @2.", name2, minetest.pos_to_string(tpc_target_coords[name2]))
|
||||
else
|
||||
tp.tpp_teleport_player(name2, tpc_target_coords[name])
|
||||
chatmsg = S("@1 is teleporting to your protected area @2.", name2, minetest.pos_to_string(tpc_target_coords[name]))
|
||||
end
|
||||
|
||||
-- Don't allow re-denying requests.
|
||||
if tp.tpn_list[name] or tp.tpn_list[name2] then
|
||||
tp.tpn_list[name] = nil
|
||||
tp.tpn_list[name2] = nil
|
||||
end
|
||||
|
||||
send_message(name, chatmsg)
|
||||
send_message(name2, S("Request Accepted!"))
|
||||
|
||||
-- Avoid abusing with area requests
|
||||
target_coords = nil
|
||||
end
|
||||
|
||||
-- Teleport requests.
|
||||
if tp.tpr_list[name] then
|
||||
name2 = tp.tpr_list[name]
|
||||
source = minetest.get_player_by_name(name)
|
||||
target = minetest.get_player_by_name(name2)
|
||||
chatmsg = S("@1 is teleporting to you.", name2)
|
||||
tp.tpr_list[name] = nil
|
||||
|
||||
elseif tp.tphr_list[name] then
|
||||
name2 = tp.tphr_list[name]
|
||||
source = minetest.get_player_by_name(name2)
|
||||
target = minetest.get_player_by_name(name)
|
||||
chatmsg = S("You are teleporting to @1.", name2)
|
||||
tp.tphr_list[name] = nil
|
||||
else
|
||||
if tp.count_requests(name, "receiver") > 1 then
|
||||
-- Show formspec for decision
|
||||
tp.list_requests(name)
|
||||
tp.tpf_update_time[name] = true
|
||||
return
|
||||
end
|
||||
|
||||
-- Could happen if either player disconnects (or timeout); if so just abort
|
||||
if not source
|
||||
or not target then
|
||||
send_message(name, S("@1 is not online right now.", name2))
|
||||
tp.tpr_list[name] = nil
|
||||
tp.tphr_list[name] = nil
|
||||
return
|
||||
end
|
||||
local received_request = tp.first_request(name, "receiver")
|
||||
|
||||
tp.tpr_teleport_player()
|
||||
if not received_request then return end -- This shouldn't happen, but who knows
|
||||
|
||||
-- Avoid abusing with area requests
|
||||
target_coords = nil
|
||||
|
||||
-- Don't allow re-denying requests.
|
||||
if tp.tpn_list[name] or tp.tpn_list[name2] then
|
||||
tp.tpn_list[name] = nil
|
||||
tp.tpn_list[name2] = nil
|
||||
end
|
||||
|
||||
send_message(name, chatmsg)
|
||||
|
||||
if minetest.check_player_privs(name2, {tp_admin = true}) == false then
|
||||
send_message(name2, S("Request Accepted!"))
|
||||
else
|
||||
if tp.enable_immediate_teleport then return end
|
||||
|
||||
send_message(name2, S("Request Accepted!"))
|
||||
return
|
||||
end
|
||||
tp.accept_request(received_request)
|
||||
end
|
||||
|
||||
-- Teleport Jump - Relative Position Teleportation by number of nodes
|
||||
|
37
init.lua
37
init.lua
@ -1,6 +1,8 @@
|
||||
--[[
|
||||
Allows players to request from another player to be teleported to them, and do much more.
|
||||
Copyright (C) 2014-2021 ChaosWormz and contributors
|
||||
Allows players to request from another player to be teleported to them.
|
||||
Includes many more teleporting features. Built for Minetest.
|
||||
|
||||
Copyright (C) 2014-2024 ChaosWormz and contributors
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@ -19,23 +21,20 @@ USA
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Originally made by Traxie21 and released with the WTFPL license.
|
||||
Forum link: https://forum.minetest.net/viewtopic.php?id=4457
|
||||
|
||||
Updates by Zeno, Panquesito7 and ChaosWormz.
|
||||
License: LGPLv2.1+ for code, CC BY-SA 4.0 for sounds.
|
||||
Originally made by Traxie21 and released under the WTFPL license.
|
||||
Forum link: https://forum.minetest.net/viewtopic.php?t=4457
|
||||
--]]
|
||||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = dofile(MP.."/intllib.lua")
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
tp = {
|
||||
intllib = S,
|
||||
tpr_list = {},
|
||||
tphr_list = {},
|
||||
tpc_list = {},
|
||||
tpn_list = {}
|
||||
S = S,
|
||||
tpr_list = { },
|
||||
tphr_list = { },
|
||||
tpc_list = { },
|
||||
tpn_list = { },
|
||||
tpf_update_time = { }
|
||||
}
|
||||
|
||||
-- Clear requests when the player leaves
|
||||
@ -62,12 +61,12 @@ minetest.register_on_leaveplayer(function(name)
|
||||
end
|
||||
end)
|
||||
|
||||
dofile(MP.."/privileges.lua")
|
||||
dofile(MP.."/config.lua")
|
||||
dofile(MP.."/functions.lua")
|
||||
dofile(MP.."/commands.lua")
|
||||
dofile(MP .. "/privileges.lua")
|
||||
dofile(MP .. "/config.lua")
|
||||
dofile(MP .. "/functions.lua")
|
||||
dofile(MP .. "/commands.lua")
|
||||
|
||||
-- Log
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
minetest.log("action", S("[Teleport Request] TPS Teleport v@1 Loaded!", tp.version))
|
||||
minetest.log("action", "[MOD] Teleport Request v" .. tp.version .. " loaded!")
|
||||
end
|
||||
|
45
intllib.lua
45
intllib.lua
@ -1,45 +0,0 @@
|
||||
|
||||
-- Fallback functions for when `intllib` is not installed.
|
||||
-- Code released under Unlicense <http://unlicense.org>.
|
||||
|
||||
-- Get the latest version of this file at:
|
||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
||||
|
||||
local function format(str, ...)
|
||||
local args = { ... }
|
||||
local function repl(escape, open, num, close)
|
||||
if escape == "" then
|
||||
local replacement = tostring(args[tonumber(num)])
|
||||
if open == "" then
|
||||
replacement = replacement..close
|
||||
end
|
||||
return replacement
|
||||
else
|
||||
return "@"..open..num..close
|
||||
end
|
||||
end
|
||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
||||
end
|
||||
|
||||
local gettext, ngettext
|
||||
if minetest.get_modpath("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
gettext, ngettext = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
gettext = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
-- Fill in missing functions.
|
||||
|
||||
gettext = gettext or function(msgid, ...)
|
||||
return format(msgid, ...)
|
||||
end
|
||||
|
||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
||||
return format(n==1 and msgid or msgid_plural, ...)
|
||||
end
|
||||
|
||||
return gettext, ngettext
|
272
locale/es.po
272
locale/es.po
@ -1,272 +0,0 @@
|
||||
# Spanish translation for Teleport Request.
|
||||
# Copyright (C) 2014-2021 ChaosWormz and contributors.
|
||||
# This file is distributed under under the same license as the Teleport Request package.
|
||||
# David Leal <halfpacho@gmail.com>, 2019-2020.
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Teleport Request\n"
|
||||
"Report-Msgid-Bugs-To: David Leal\n"
|
||||
"POT-Creation-Date: 2019-07-12 5:07+0200\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: David Leal <halfpacho@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: config.lua
|
||||
msgid "Let players teleport to other players (request will be sent)"
|
||||
msgstr "Permite que los jugadores se teletransporten a otros jugadores (se enviará una solicitud)"
|
||||
|
||||
#: config.lua
|
||||
msgid "Gives full admin-access to a player."
|
||||
msgstr "Da acceso total de administrador a un jugador."
|
||||
|
||||
#: config.lua
|
||||
msgid "Allow player to teleport to coordinates (if allowed by area protection)"
|
||||
msgstr "Permite a los jugadores teletransportarse a las coordenadas especificadas (si esta permitido por la protección de la área)"
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpr_mute <player>"
|
||||
msgstr "Uso: /tpr_mute <jugador>"
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Failed to mute player @1: they have the tp_admin privilege."
|
||||
msgstr "tpr_mute: No se pudo silenciar al jugador @1: tiene el privilegio tp_admin."
|
||||
|
||||
#: init.lua
|
||||
msgid "Wait @1 seconds before you can send teleport requests to @2 again."
|
||||
msgstr "Espere @1 segundos antes de que pueda mandar solicitudes de teletransporte a @2."
|
||||
|
||||
#: init.lua
|
||||
msgid "You can now send teleport requests to @1."
|
||||
msgstr "Ya puede mandar solicitudes de teletransporte a @1."
|
||||
|
||||
#: init.lua
|
||||
msgid "You are not allowed to send requests because you're muted."
|
||||
msgstr "No tienes permiso para mandar solicitudes de teletransporte porque estás silenciado."
|
||||
|
||||
#: init.lua
|
||||
msgid "Cannot send request to @1 (you have been muted)."
|
||||
msgstr "No se puede enviar la solicitud a @1 (has sido silenciado)."
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 is already muted."
|
||||
msgstr "tpr_mute: El jugador @1 ya esta silenciado."
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 successfully muted."
|
||||
msgstr "tpr_mute: El jugador @1 ha sido silenciado con éxito."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpr_unmute <player>"
|
||||
msgstr "Uso: /tpr_unmute <player>"
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 is not muted yet."
|
||||
msgstr "tpr_mute: El jugador @1 aún no ha sido slienciado."
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 successfully unmuted."
|
||||
msgstr "tpr_mute: El sonido del jugador @1 ha sido activado con éxito."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpr <Player name>"
|
||||
msgstr "Uso: /tpr <jugador>"
|
||||
|
||||
#: init.lua
|
||||
msgid "There is no player by that name. Keep in mind this is case-sensitive, and the player must be online."
|
||||
msgstr "No hay jugador con ese nombre. Tenga en cuenta que esto es caso-sensitivo, y el jugador debe de estar én línea."
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request denied, player is in the gamehub!"
|
||||
msgstr "Solicitud denegada, ¡el jugador esta en el centro de juegos!"
|
||||
|
||||
#: init.lua
|
||||
msgid "You are teleporting to @1."
|
||||
msgstr "Te estas teletransportando a @1."
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is requesting to teleport to you. /tpy to accept."
|
||||
msgstr "@1 esta pidiendo teletransportarse a ti. /tpy para aceptar."
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request sent! It will timeout in @1 seconds."
|
||||
msgstr "¡Solicitud enviada! Se agotara en @1 segundos."
|
||||
|
||||
#: init.lua
|
||||
msgid "Request timed-out."
|
||||
msgstr "La solicitud enviada expiró."
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is teleporting to you."
|
||||
msgstr "@1 se esta teletransportando a ti."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tphr <Player name>"
|
||||
msgstr "Uso: /tphr <jugador>"
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny."
|
||||
msgstr "@1 esta pidiendo que tu te teletransportes a el/ella. /tpy para aceptar, /tpn para denegar."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpc <x, y, z>"
|
||||
msgstr "Uso: /tpc <x, y, z>"
|
||||
|
||||
#: init.lua
|
||||
msgid "You cannot teleport to a location outside the map!"
|
||||
msgstr "¡No puedes teletransportarte afuera del mundo!"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleporting to: @1, @2, @3"
|
||||
msgstr "Teletransportandose a: @1, @2, @3"
|
||||
|
||||
#: init.lua
|
||||
msgid "Area request sent! Waiting for @1 to accept your request. It will timeout in @2 seconds."
|
||||
msgstr "¡Solicitud de área enviada! Esperando a @1 que acepte tu solicitud. Se agotara en @2 segundos."
|
||||
|
||||
#: init.lua
|
||||
msgid ", or "
|
||||
msgstr ", o a "
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is requesting to teleport to a protected area of yours @2."
|
||||
msgstr "@1 solicita teletransportarse a una área protegida tuya @2."
|
||||
|
||||
#: init.lua
|
||||
msgid "Error: You do not have permission to teleport to those coordinates."
|
||||
msgstr "Error: No tienes permiso para teletransportarte a esas coordenadas."
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request denied."
|
||||
msgstr "Solicitud denegada."
|
||||
|
||||
#: init.lua
|
||||
msgid "You denied the request @1 sent you."
|
||||
msgstr "Tú denegaste la solicitud de teletransporte que @1 te mando."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpn allows you to deny teleport/area requests sent to you by other players."
|
||||
msgstr "Uso: /tpn te permite denegar solicitudes enviadas para ti de otros jugadores."
|
||||
|
||||
msgid "You denied your request sent to @1."
|
||||
msgstr "Tú denegaste la solicitud de teletransporte enviada a @1."
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 denied their request sent to you."
|
||||
msgstr "@1 denego su solicitud de teletransporte enviada a usted."
|
||||
|
||||
#: init.lua
|
||||
msgid "Area request denied."
|
||||
msgstr "Solicitud de área denegada."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpy allows you to accept teleport/area requests sent to you by other players."
|
||||
msgstr "Uso: /tpy te permite aceptar solicitudes enviadas para ti de otros jugadores."
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is teleporting to your protected area @2."
|
||||
msgstr "@1 se esta teletransportando a tu área protegida @2."
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is not online right now."
|
||||
msgstr "@1 no esta en línea ahora mismo."
|
||||
|
||||
#: init.lua
|
||||
msgid "Request Accepted!"
|
||||
msgstr "¡Solicitud aceptada!"
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: <x|y|z> <number>"
|
||||
msgstr "Uso: <x|y|z> <numero>"
|
||||
|
||||
#: init.lua
|
||||
msgid "Not a number!"
|
||||
msgstr "¡No un número!"
|
||||
|
||||
#: init.lua
|
||||
msgid "Not a valid axis. Valid options are X, Y or Z"
|
||||
msgstr "Eje invalido. Opciones validas son x, y, o z"
|
||||
|
||||
#: init.lua
|
||||
msgid "EVADE!"
|
||||
msgstr "¡EVADIR!"
|
||||
|
||||
#: init.lua
|
||||
msgid "Request teleport to another player."
|
||||
msgstr "Enviar solicitud para teletransportarte a otro jugador."
|
||||
|
||||
#: init.lua
|
||||
msgid "<playername> | leave playername empty to see help message"
|
||||
msgstr "<jugador> | Deje el nombre del jugador vacío para ver el mensaje de ayuda"
|
||||
|
||||
#: init.lua
|
||||
msgid "Request player to teleport to you"
|
||||
msgstr "Solicita al jugador que se teletransporte a ti."
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to coordinates"
|
||||
msgstr "Teletransportarse a las coordenadas especificadas."
|
||||
|
||||
#: init.lua
|
||||
msgid "<coordinates> | leave coordinates empty to see help message"
|
||||
msgstr "<coordenadas> | Deje las coordenadas vacías para ver el mensaje de ayuda"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to relative position"
|
||||
msgstr "Teletransportarse a la posición relativa."
|
||||
|
||||
#: init.lua
|
||||
msgid "<axis> <distance> | leave empty to see help message"
|
||||
msgstr "<eje> <distancia> | Deje vacío para ver el mensaje de ayuda"
|
||||
|
||||
#: init.lua
|
||||
msgid "Evade Enemy"
|
||||
msgstr "Evadir enemigo."
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to a place (i.e., spawn, shop)."
|
||||
msgstr "Teletransportarse a un lugar (p.ej., la tienda, la ciudad)."
|
||||
|
||||
#: init.lua
|
||||
msgid "<place> | leave empty to see available places"
|
||||
msgstr "<lugar> | Deje vacío para ver los lugares disponibles"
|
||||
|
||||
#: init.lua
|
||||
msgid "There are no places yet."
|
||||
msgstr "Todavia no hay lugares."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpp <place>"
|
||||
msgstr "Uso: /tpp <lugar>"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleporting to @1."
|
||||
msgstr "Teletransportandose a @1."
|
||||
|
||||
#: init.lua
|
||||
msgid "There is no place by that name. Keep in mind this is case-sensitive."
|
||||
msgstr "No hay lugar con ese nombre. Tenga en cuenta que esto es caso-sensitivo."
|
||||
|
||||
#: init.lua
|
||||
msgid "Accept teleport requests from another player"
|
||||
msgstr "Aceptar solicitudes de otro jugador."
|
||||
|
||||
#: init.lua
|
||||
msgid "Deny teleport requests from another player"
|
||||
msgstr "Denegar solicitudos de otro jugador."
|
||||
|
||||
#: init.lua
|
||||
msgid "Mutes a player: denies them from sending you teleport requests"
|
||||
msgstr "Silencia a un jugador: le niega el envío de solicitudes de teletransporte"
|
||||
|
||||
#: init.lua
|
||||
msgid "Unmutes a player: allow them to send you teleport requests again"
|
||||
msgstr "Activar el sonido de un jugador: permite que te envíe solicitudes de teletransporte nuevamente"
|
||||
|
||||
#: init.lua
|
||||
msgid "[Teleport Request] TPS Teleport v@1 Loaded!"
|
||||
msgstr "[TPS] Solicitud de teletransporte v@1 Cargado!"
|
245
locale/pt_BR.po
245
locale/pt_BR.po
@ -1,245 +0,0 @@
|
||||
# Brazilian Portuguese translation for Teleport Request.
|
||||
# Copyright (C) 2014-2021 ChaosWormz and contributors.
|
||||
# This file is distributed under under the same license as the Teleport Request package.
|
||||
# Animetrom <contatoanimetrom@gmail.com>, 2020.
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Teleport Request\n"
|
||||
"Report-Msgid-Bugs-To: Animetrom\n"
|
||||
"POT-Creation-Date: 2020-03-19 5:07+0200\n"
|
||||
"PO-Revision-Date: 2020-03-19\n"
|
||||
"Last-Translator: Animetrom <contatoanimetrom@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: config.lua
|
||||
msgid "Let players teleport to other players (request will be sent)"
|
||||
msgstr "Permita que os jogadores se teletransportem para outros jogadores (a solicitacao sera' enviada)"
|
||||
|
||||
#: config.lua
|
||||
msgid "Gives full admin-access to a player."
|
||||
msgstr "Da acesso de administrador completo a um jogador."
|
||||
|
||||
#: config.lua
|
||||
msgid "Allow player to teleport to coordinates (if allowed by area protection)"
|
||||
msgstr "Permitir que o jogador se teletransporte para coordenadas (se permitido pela protecao da area)"
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Failed to mute player @1: they have the tp_admin privilege."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "You are not allowed to send requests because you're muted."
|
||||
msgstr "Voce nao tem permissao para enviar solicitacoes porque esta' sem som."
|
||||
|
||||
#: init.lua
|
||||
msgid "Cannot send request to @1 (you have been muted)."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 is already muted."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 successfully muted."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpr_unmute <player>"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 is not muted yet."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 successfully unmuted."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpr <Player name>"
|
||||
msgstr "Use: /tpr <Nome do jogador>"
|
||||
|
||||
#: init.lua
|
||||
msgid "There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"
|
||||
msgstr "Nao existe nenhum jogador com esse nome. Lembre-se de que isso diferencia maiusculas de minusculas e o player deve estar online"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request denied, player is in the gamehub!"
|
||||
msgstr "Pedido de teleporte negado, o jogador esta' no gamehub!"
|
||||
|
||||
#: init.lua
|
||||
msgid "You are teleporting to @1."
|
||||
msgstr "Voce esta' se teletransportando para @1."
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is requesting to teleport to you. /tpy to accept"
|
||||
msgstr "@1 esta' solicitando o teletransporte para voce. /tpy para aceitar"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request sent! It will timeout in @1 seconds"
|
||||
msgstr "Pedido de teleporte enviado! Tempo limite em @1 segundos"
|
||||
|
||||
#: init.lua
|
||||
msgid "Request timed-out."
|
||||
msgstr "O pedido expirou."
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is teleporting to you."
|
||||
msgstr "@1 esta' se teletransportando para voce."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tphr <Player name>"
|
||||
msgstr "Use: /tphr <Nome do jogador>"
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny"
|
||||
msgstr "@1 esta' solicitando que voce se teletransporte para ele. /tpy para aceitar; /tpn para negar"
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpc <x, y, z>"
|
||||
msgstr "Use: /tpc <x, y, z>"
|
||||
|
||||
#: init.lua
|
||||
msgid "You cannot teleport to a location outside the map!"
|
||||
msgstr "Voce nao pode se teletransportar para um local fora do mapa!"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleporting to: @1, @2, @3"
|
||||
msgstr "Teleportar para: @1, @2, @3"
|
||||
|
||||
#: init.lua
|
||||
msgid "Error: @1 is protected by @2."
|
||||
msgstr "Erro: @1 e' protegido por @2."
|
||||
|
||||
#: init.lua
|
||||
msgid "Error: You do not have permission to teleport to those coordinates."
|
||||
msgstr "Erro: voce nao tem permissao para se teletransportar para essas coordenadas."
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request denied."
|
||||
msgstr "Pedido de teleporte negado."
|
||||
|
||||
#: init.lua
|
||||
msgid "You denied the request @1 sent you."
|
||||
msgstr "Voce negou a solicitacao @1 enviei a voce."
|
||||
|
||||
#: init.lua
|
||||
msgid "You denied your request sent to @1."
|
||||
msgstr "Voce negou sua solicitacao enviada para @1."
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 denied their request sent to you."
|
||||
msgstr "@1 negou o pedido enviado a voce."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpn allows you to deny teleport requests sent to you by other players."
|
||||
msgstr "Use: /tpn permite negar solicitacoes de teleporte enviadas a voce por outros jogadores."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpy allows you to accept teleport requests sent to you by other players"
|
||||
msgstr "Use: /tpy permite que voce aceite solicitacoes de teleporte enviadas a voce por outros jogadores"
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 doesn't exist, or just disconnected/left (by timeout)."
|
||||
msgstr "@1 nao existe ou apenas desconectado / deixado (por tempo limite)."
|
||||
|
||||
#: init.lua
|
||||
msgid "Request Accepted!"
|
||||
msgstr "Pedido aceito!"
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: <x|y|z> <number>"
|
||||
msgstr "Use: <x|y|z> <numero>"
|
||||
|
||||
#: init.lua
|
||||
msgid "Not a number!"
|
||||
msgstr "Nao e' um numero!"
|
||||
|
||||
#: init.lua
|
||||
msgid "Not a valid axis. Valid options are X, Y or Z"
|
||||
msgstr "Nao e' um eixo valido. Opcoes validas sao X, Y ou Z"
|
||||
|
||||
#: init.lua
|
||||
msgid "EVADE!"
|
||||
msgstr "EVADE!"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to a place (i.e., spawn, shop)."
|
||||
msgstr "Teleporte para um lugar (i.e., spawn, shop)."
|
||||
|
||||
#: init.lua
|
||||
msgid "<place> | leave empty to see available places"
|
||||
msgstr "<Lugar> | deixe em branco para ver os lugares disponiveis"
|
||||
|
||||
#: init.lua
|
||||
msgid "There are no places yet."
|
||||
msgstr "Ainda nao ha lugares."
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpp <place>"
|
||||
msgstr "Use: /tpp <Lugar>"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleporting to @1."
|
||||
msgstr "Teleportar para @1."
|
||||
|
||||
#: init.lua
|
||||
msgid "There is no place by that name. Keep in mind this is case-sensitive."
|
||||
msgstr "Nao ha' lugar com esse nome. Lembre-se de que isso diferencia maiusculas de minusculas."
|
||||
|
||||
#: init.lua
|
||||
msgid "Request teleport to another player."
|
||||
msgstr "Solicitar teleporte para outro jogador."
|
||||
|
||||
#: init.lua
|
||||
msgid "<playername> | leave playername empty to see help message"
|
||||
msgstr "<nome do jogador> | deixe o nome do jogador em branco para ver a mensagem de ajuda"
|
||||
|
||||
#: init.lua
|
||||
msgid "Request player to teleport to you"
|
||||
msgstr "Solicitar que o jogador se teleporte para voce"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to coordinates"
|
||||
msgstr "Teleporte para coordenadas"
|
||||
|
||||
#: init.lua
|
||||
msgid "<coordinates> | leave coordinates empty to see help message"
|
||||
msgstr "<coordenadas> | deixe as coordenadas vazias para ver a mensagem de ajuda"
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to relative position"
|
||||
msgstr "Teleporte para a posicao relativa"
|
||||
|
||||
#: init.lua
|
||||
msgid "<axis> <distance> | leave empty to see help message"
|
||||
msgstr "<eixo> <distancia> | deixe em branco para ver a mensagem de ajuda"
|
||||
|
||||
#: init.lua
|
||||
msgid "Evade Enemy"
|
||||
msgstr "Iludir o Inimigo"
|
||||
|
||||
#: init.lua
|
||||
msgid "Accept teleport requests from another player"
|
||||
msgstr "Aceitar pedidos de teleporte de outro jogador"
|
||||
|
||||
#: init.lua
|
||||
msgid "Deny teleport requests from another player"
|
||||
msgstr "Negar pedidos de teleporte de outro jogador"
|
||||
|
||||
#: init.lua
|
||||
msgid "Mutes a player: denies them from sending you teleport requests"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Unmutes a player: allow them to send you teleport requests again"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "[Teleport Request] TPS Teleport v@1 Loaded!"
|
||||
msgstr "[Solicitacao de Teleporte] Teletransporte TPS v@1 Carregado!"
|
@ -1,268 +0,0 @@
|
||||
# Template translation for Teleport Request.
|
||||
# Copyright (C) 2014-2021 ChaosWormz and contributors.
|
||||
# This file is distributed under under the same license as the Teleport Request package.
|
||||
# David Leal <halfpacho@gmail.com>, 2019-2020.
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Teleport Request\n"
|
||||
"Report-Msgid-Bugs-To: David Leal\n"
|
||||
"POT-Creation-Date: 2019-07-12 5:07+0200\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: David Leal <halfpacho@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: config.lua
|
||||
msgid "Let players teleport to other players (request will be sent)"
|
||||
msgstr ""
|
||||
|
||||
#: config.lua
|
||||
msgid "Gives full admin-access to a player."
|
||||
msgstr ""
|
||||
|
||||
#: config.lua
|
||||
msgid "Allow player to teleport to coordinates (if allowed by area protection)"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Failed to mute player @1: they have the tp_admin privilege."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Wait @1 seconds before you can send teleport requests to @2 again."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "You can now send teleport requests to @1."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "You are not allowed to send requests because you're muted."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Cannot send request to @1 (you have been muted)."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 is already muted."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 successfully muted."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpr_unmute <player>"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 is not muted yet."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "tpr_mute: Player @1 successfully unmuted."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpr <Player name>"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "There is no player by that name. Keep in mind this is case sensitive, and the player must be online."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request denied, player is in the gamehub!"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "You are teleporting to @1."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is requesting to teleport to you. /tpy to accept."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request sent! It will timeout in @1 seconds."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Request timed-out."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is teleporting to you."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tphr <Player name>"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpc <x, y, z>"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "You cannot teleport to a location outside the map!"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleporting to: @1, @2, @3"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Area request sent! Waiting for @1 to accept your request. It will timeout in @2 seconds."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid ", or "
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is requesting to teleport to a protected area of yours @2."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Error: You do not have permission to teleport to those coordinates."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpn allows you to deny teleport/area requests sent to you by other players."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Area request denied."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport request denied."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "You denied the request @1 sent you."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpy allows you to accept teleport/area requests sent to you by other players."
|
||||
msgstr ""
|
||||
|
||||
msgid "You denied your request sent to @1."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 denied their request sent to you."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is teleporting to your protected area @2."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "@1 is not online right now."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Request Accepted!"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: <x|y|z> <number>"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Not a number!"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Not a valid axis. Valid options are X, Y or Z"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "EVADE!"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to a place (i.e., spawn, shop)."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "<place> | leave empty to see available places"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "There are no places yet."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Usage: /tpp <place>"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleporting to @1."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "There is no place by that name. Keep in mind this is case-sensitive."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Request teleport to another player."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "<playername> | leave playername empty to see help message"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Request player to teleport to you"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to coordinates"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "<coordinates> | leave coordinates empty to see help message"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Teleport to relative position"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "<axis> <distance> | leave empty to see help message"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Evade Enemy"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Accept teleport requests from another player"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Deny teleport requests from another player"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Mutes a player: denies them from sending you teleport requests"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "Unmutes a player: allow them to send you teleport requests again"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua
|
||||
msgid "[Teleport Request] TPS Teleport v@1 Loaded!"
|
||||
msgstr ""
|
@ -53,4 +53,3 @@ Teleporting to @1.=
|
||||
There is no place by that name. Keep in mind this is case-sensitive.=
|
||||
Accept teleport/area requests from another player=
|
||||
Deny teleport/area requests from another player=
|
||||
[Teleport Request] TPS Teleport v@1 Loaded!=
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
Let players teleport to other players (request will be sent)=Permite que los jugadores se teletransporten a otros jugadores (se enviará una solicitud)
|
||||
Gives full admin-access to a player.=Da acceso total de administrador a un jugador.
|
||||
Allow player to teleport to coordinates (if allowed by area protection)=Permite a los jugadores teletransportarse a las coordenadas especificadas (si esta permitido por la protección de la área)
|
||||
Allow player to teleport to coordinates (if allowed by area protection)=Permite a los jugadores teletransportarse a las coordenadas especificadas (si esta permitido por la protección del área)
|
||||
Wait @1 seconds before you can send teleport requests to @2 again.=Espere @1 segundos antes de que pueda mandar solicitudes de teletransporte a @2.
|
||||
You can now send teleport requests to @1.=Ya puede mandar solicitudes de teletransporte a @1.
|
||||
You are not allowed to send requests because you're muted.=No tienes permiso para mandar solicitudes de teletransporte porque estás silenciado.
|
||||
Usage: /tpr <Player name>=Uso: /tpr <jugador>
|
||||
There is no player by that name. Keep in mind this is case-sensitive, and the player must be online.=No hay jugador con ese nombre. Tenga en cuenta que esto es caso-sensitivo, y el jugador debe de estar én línea.
|
||||
There is no player by that name. Keep in mind this is case-sensitive, and the player must be online.=No hay jugador con ese nombre. Tenga en cuenta que esto es caso-sensitivo, y el jugador debe de estar en línea.
|
||||
Teleport request denied, player is in the gamehub!=Solicitud denegada, ¡el jugador esta en el centro de juegos!
|
||||
You are teleporting to @1.=Te estas teletransportando a @1.
|
||||
@1 is requesting to teleport to you. /tpy to accept.=@1 esta pidiendo teletransportarse a ti. /tpy para aceptar.
|
||||
@ -17,7 +17,7 @@ Request timed-out.=La solicitud enviada expiró.
|
||||
Usage: /tphr <Player name>=Uso: /tphr <jugador>
|
||||
@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny.=@1 esta pidiendo que tu te teletransportes a el/ella. /tpy para aceptar, /tpn para denegar.
|
||||
Usage: /tpc <x, y, z>=Uso: /tpc <x, y, z>
|
||||
You cannot teleport to a location outside the map!=¡No puedes teletransportarte afuera del mundo!
|
||||
You cannot teleport to a location outside the map!=¡No puedes teletransportarte afuera de los límites!
|
||||
Teleporting to: @1, @2, @3=Teletransportandose a: @1, @2, @3
|
||||
Area request sent! Waiting for @1 to accept your request. It will timeout in @2 seconds.=¡Solicitud de área enviada! Esperando a @1 que acepte tu solicitud. Se agotara en @2 segundos.
|
||||
, or=, o a
|
||||
@ -34,7 +34,7 @@ Usage: /tpy allows you to accept teleport/area requests sent to you by other pla
|
||||
@1 is not online right now.=@1 no esta en línea ahora mismo.
|
||||
Request Accepted!=¡Solicitud aceptada!
|
||||
Usage: <x|y|z> <number>=Uso: <x|y|z> <numero>
|
||||
Not a number!=¡No un número!
|
||||
Not a number!=¡No es un número!
|
||||
Not a valid axis. Valid options are X, Y or Z=Eje invalido. Opciones validas son x, y, o z
|
||||
EVADE!=¡EVADIR!
|
||||
Request teleport to another player=Enviar solicitud para teletransportarte a otro jugador
|
||||
@ -52,5 +52,4 @@ Usage: /tpp <place>=Uso: /tpp <lugar>
|
||||
Teleporting to @1.=Teletransportandose a @1.
|
||||
There is no place by that name. Keep in mind this is case-sensitive.=No hay lugar con ese nombre. Tenga en cuenta que esto es caso-sensitivo.
|
||||
Accept teleport/area requests from another player=Aceptar solicitudes de otro jugador
|
||||
Deny teleport/area requests from another player=Denegar solicitudos de otro jugador
|
||||
[Teleport Request] TPS Teleport v@1 Loaded!=[TPS] Solicitud de teletransporte v@1 Cargado!
|
||||
Deny teleport/area requests from another player=Denegar solicitudes de otro jugador
|
||||
|
@ -47,4 +47,3 @@ Teleport to relative position=Teleporte para a posicao relativa
|
||||
Evade Enemy=Iludir o Inimigo
|
||||
Accept teleport requests from another player=Aceitar pedidos de teleporte de outro jogador
|
||||
Deny teleport requests from another player=Negar pedidos de teleporte de outro jogador
|
||||
[Teleport Request] TPS Teleport v@1 Loaded!=[Solicitacao de Teleporte] Teletransporte TPS v@1 Carregado!
|
||||
|
6
mod.conf
6
mod.conf
@ -1,6 +1,6 @@
|
||||
name = tpr
|
||||
optional_depends = areas, intllib, beerchat, chat2, gamehub
|
||||
description = Allows players to send a request to other players to teleport to them, and do much more.
|
||||
title = Teleport Request
|
||||
optional_depends = areas, beerchat, chat2, gamehub
|
||||
description = Allows players to send a request to other players to teleport to them. Includes many more teleporting features.
|
||||
min_minetest_version = 5.0.0
|
||||
license = LGPLv2.1
|
||||
forum = https://forum.minetest.net/viewtopic.php?t=4457
|
||||
|
@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Configuration
|
||||
Copyright (C) 2014-2021 ChaosWormz and contributors
|
||||
Privileges
|
||||
Copyright (C) 2014-2024 ChaosWormz and contributors
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@ -18,8 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
--]]
|
||||
|
||||
-- Support for intllib
|
||||
local S = tp.intllib
|
||||
local S = tp.S
|
||||
|
||||
minetest.register_privilege("tp", {
|
||||
description = S("Let players teleport to other players (request will be sent)"),
|
||||
|
@ -1,20 +0,0 @@
|
||||
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
|
||||
Copyright (C) 2020 David Leal (halfpacho@gmail.com) & ChaosWormz
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
|
||||
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
|
||||
|
||||
Notices:
|
||||
|
||||
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
|
||||
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
|
||||
|
||||
For more details:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 745 B |
Loading…
x
Reference in New Issue
Block a user