mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2024-08-20 21:34:06 +02:00
Reformatted/indented source
This commit is contained in:
parent
42d4bc82e7
commit
2ae3d6932f
9
init.lua
9
init.lua
@ -19,8 +19,8 @@ local function tpr_send(name, param)
|
||||
sender = name
|
||||
receiver = param
|
||||
value_carryover = param
|
||||
--Check for empty parameter
|
||||
|
||||
--Check for empty parameter
|
||||
if receiver == "" then
|
||||
minetest.chat_send_player(sender, "Usage: /tpr <Player name>")
|
||||
return
|
||||
@ -77,7 +77,6 @@ function reset_request(name)
|
||||
|
||||
if tpr_list[value_carryover] ~= nil then
|
||||
tpr_list[value_carryover] = nil
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@ -88,7 +87,6 @@ function reset_request2(name)
|
||||
|
||||
if tphr_list[value_carryover2] ~= nil then
|
||||
tphr_list[value_carryover2] = nil
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@ -98,13 +96,11 @@ sender = tpr_list[value_carryover]
|
||||
if tpr_list[value_carryover] ~= nil then
|
||||
tpr_list[value_carryover] = nil
|
||||
minetest.chat_send_player(sender, 'Teleport request denied :C')
|
||||
|
||||
end
|
||||
sender2 = tphr_list[value_carryover2]
|
||||
if tphr_list[value_carryover2] ~= nil then
|
||||
tphr_list[value_carryover2] = nil
|
||||
minetest.chat_send_player(sender2, 'Teleport request denied :C')
|
||||
|
||||
end
|
||||
end
|
||||
--Teleport Accept Systems
|
||||
@ -122,7 +118,6 @@ local function tpr_accept(name, param)
|
||||
|
||||
if tpr_list[name] == nil and tphr_list[name] == nil then
|
||||
minetest.chat_send_player(name, "Usage: /tpy allows you to accept teleport requests sent to you by other players")
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
@ -168,8 +163,8 @@ local function tpr_accept(name, param)
|
||||
requester:setpos(p)
|
||||
|
||||
-- Set name values to nil to prevent re-teleporting on the same request.
|
||||
|
||||
tpr_list[name] = nil
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user