Fix some minor issues

This commit is contained in:
Panquesito7 2020-05-03 13:38:22 -05:00
parent b5643fa131
commit 2fe2febab6
No known key found for this signature in database
GPG Key ID: 3C482B03FD220E68
3 changed files with 6 additions and 6 deletions

@ -8,4 +8,4 @@ jobs:
- name: lint - name: lint
uses: Roang-zero1/factorio-mod-luacheck@master uses: Roang-zero1/factorio-mod-luacheck@master
with: with:
luacheckrc_url: https://raw.githubusercontent.com/ChaosWormz/teleport-request/master/.luacheckrc luacheckrc_url: https://raw.githubusercontent.com/ChaosWormz/teleport-request/master/.luacheckrc

@ -10,11 +10,9 @@ read_globals = {
string = {fields = {"split", "trim"}}, string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn"}}, table = {fields = {"copy", "getn"}},
"minetest", "core", "minetest", "vector",
"vector", "ItemStack",
"dump", "dump2",
"chat2", "gamehub", "chat2", "gamehub",
"intllib", "areas", "intllib", "areas",
} }

@ -462,8 +462,10 @@ function tp.tpc_send(sender, coordinates)
tp.tpn_list[sender] = area.owner tp.tpn_list[sender] = area.owner
minetest.after(tp.timeout_delay, function(name) minetest.after(tp.timeout_delay, function(name)
if tp.tpc_list[name] then if tp.tpc_list[name] and tp.tpn_list[sender] then
tp.tpc_list[name] = nil tp.tpc_list[name] = nil
tp.tpn_list[sender] = nil
minetest.chat_send_player(sender, S("Request timed-out.")) minetest.chat_send_player(sender, S("Request timed-out."))
minetest.chat_send_player(area.owner, S("Request timed-out.")) minetest.chat_send_player(area.owner, S("Request timed-out."))