mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2024-08-21 13:54:06 +02:00
commit
48d0614778
@ -106,7 +106,7 @@ tp_enable_tpp_command = false
|
|||||||
```
|
```
|
||||||
Those values are the default values of the mod.
|
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.
|
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 `settingstypes.txt`.
|
Or another way to do it, is changing the values in `settingtypes.txt`.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
- Unzip the archive, rename the folder to tpr and
|
- Unzip the archive, rename the folder to tpr and
|
||||||
|
7
init.lua
7
init.lua
@ -194,7 +194,7 @@ function tp.tpr_send(sender, receiver)
|
|||||||
chat2.send_message(minetest.get_player_by_name(sender), S("Teleport request sent! It will timeout in @1 seconds", tp.timeout_delay), 0xFFFFFF)
|
chat2.send_message(minetest.get_player_by_name(sender), S("Teleport request sent! It will timeout in @1 seconds", tp.timeout_delay), 0xFFFFFF)
|
||||||
end
|
end
|
||||||
minetest.chat_send_player(receiver, S("@1 is requesting to teleport to you. /tpy to accept", sender))
|
minetest.chat_send_player(receiver, S("@1 is requesting to teleport to you. /tpy to accept", sender))
|
||||||
minetest.chat_send_player(sender, S("Teleport request sent! It will timeout in @1 seconds", timeout_delay))
|
minetest.chat_send_player(sender, S("Teleport request sent! It will timeout in @1 seconds", tp.timeout_delay))
|
||||||
-- Write name values to list and clear old values.
|
-- Write name values to list and clear old values.
|
||||||
tp.tpr_list[receiver] = sender
|
tp.tpr_list[receiver] = sender
|
||||||
-- Teleport timeout delay
|
-- Teleport timeout delay
|
||||||
@ -266,7 +266,7 @@ function tp.tphr_send(sender, receiver)
|
|||||||
chat2.send_message(minetest.get_player_by_name(sender), S("Teleport request sent! It will timeout in @1 seconds", tp.timeout_delay), 0xFFFFFF)
|
chat2.send_message(minetest.get_player_by_name(sender), S("Teleport request sent! It will timeout in @1 seconds", tp.timeout_delay), 0xFFFFFF)
|
||||||
end
|
end
|
||||||
minetest.chat_send_player(receiver, S("@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny", sender))
|
minetest.chat_send_player(receiver, S("@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny", sender))
|
||||||
minetest.chat_send_player(sender, S("Teleport request sent! It will timeout in @1 seconds", timeout_delay))
|
minetest.chat_send_player(sender, S("Teleport request sent! It will timeout in @1 seconds", tp.timeout_delay))
|
||||||
-- Write name values to list and clear old values.
|
-- Write name values to list and clear old values.
|
||||||
tp.tphr_list[receiver] = sender
|
tp.tphr_list[receiver] = sender
|
||||||
-- Teleport timeout delay
|
-- Teleport timeout delay
|
||||||
@ -381,8 +381,7 @@ end
|
|||||||
-- Teleport Accept Systems
|
-- Teleport Accept Systems
|
||||||
function tp.tpr_accept(name, param)
|
function tp.tpr_accept(name, param)
|
||||||
-- Check to prevent constant teleporting.
|
-- Check to prevent constant teleporting.
|
||||||
if not tp.tpr_list[name]
|
if not tp.tpr_list[name] and not tp.tphr_list[name] then
|
||||||
and not tp.tphr_list[name]
|
|
||||||
minetest.chat_send_player(name, S("Usage: /tpy allows you to accept teleport requests sent to you by other players"))
|
minetest.chat_send_player(name, S("Usage: /tpy allows you to accept teleport requests sent to you by other players"))
|
||||||
if minetest.get_modpath("chat2") then
|
if minetest.get_modpath("chat2") then
|
||||||
chat2.send_message(minetest.get_player_by_name(name), S("Usage: /tpy allows you to accept teleport requests sent to you by other players"), 0xFFFFFF)
|
chat2.send_message(minetest.get_player_by_name(name), S("Usage: /tpy allows you to accept teleport requests sent to you by other players"), 0xFFFFFF)
|
||||||
|
Loading…
Reference in New Issue
Block a user