Fix bug #81
This commit is contained in:
parent
8b0d340344
commit
2df3d3a523
@ -57,8 +57,9 @@ local function get_remote_pos(pos, rmt_name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function get_free_server_list(pos, owner)
|
local function get_free_server_list(pos, owner)
|
||||||
|
if Stations and Stations.get_node_table then
|
||||||
local tbl = {M(pos):get_string("remote_name")}
|
local tbl = {M(pos):get_string("remote_name")}
|
||||||
for key,item in pairs(Stations:get_node_table(pos)) do
|
for key,item in pairs(Stations:get_node_table(pos) or {}) do
|
||||||
if item.single and item.owner == owner then
|
if item.single and item.owner == owner then
|
||||||
if M(pos):get_string("node_type") == M(S2P(key)):get_string("node_type") then
|
if M(pos):get_string("node_type") == M(S2P(key)):get_string("node_type") then
|
||||||
tbl[#tbl+1] = item.conn_name
|
tbl[#tbl+1] = item.conn_name
|
||||||
@ -67,6 +68,7 @@ local function get_free_server_list(pos, owner)
|
|||||||
end
|
end
|
||||||
tbl[#tbl+1] = ""
|
tbl[#tbl+1] = ""
|
||||||
return tbl
|
return tbl
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_lose_connection(pos, node_type)
|
local function on_lose_connection(pos, node_type)
|
||||||
@ -78,8 +80,11 @@ local function on_lose_connection(pos, node_type)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function on_dropdown(pos)
|
local function on_dropdown(pos)
|
||||||
|
if pos then
|
||||||
local owner = M(pos):get_string("owner")
|
local owner = M(pos):get_string("owner")
|
||||||
return table.concat(get_free_server_list(pos, owner), ",")
|
return table.concat(get_free_server_list(pos, owner), ",") or ""
|
||||||
|
end
|
||||||
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
local function update_node_data(pos, state, conn_name, remote_name, rmt_pos)
|
local function update_node_data(pos, state, conn_name, remote_name, rmt_pos)
|
||||||
|
@ -572,6 +572,8 @@ function techage.add_expoint(player, number)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Delete number with: `//lua minetest.get_player_by_name("<name>"):get_meta():set_string("techage_collider_number", "")`
|
||||||
|
|
||||||
function techage.on_remove_collider(player)
|
function techage.on_remove_collider(player)
|
||||||
if player and player.get_meta then
|
if player and player.get_meta then
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
|
@ -511,8 +511,6 @@ techage.ConstructionPlans["ta5_teleport"] = {
|
|||||||
{false, false, false, false, false, false, false, false, false, false, false},
|
{false, false, false, false, false, false, false, false, false, false, false},
|
||||||
{false, false, false, false, false, false, false, false, false, false, false},
|
{false, false, false, false, false, false, false, false, false, false, false},
|
||||||
{false, TANK4, PUMP4, TELEP, false, ARROW, false, TELEP, PIPEH, TANK4, false},
|
{false, TANK4, PUMP4, TELEP, false, ARROW, false, TELEP, PIPEH, TANK4, false},
|
||||||
{false, false, false, false, false, false, false, false, false, false, false},
|
|
||||||
{false, TANK4, PIPEH, TELEP, false, ARROW, false, TELEP, PUMP4, TANK4, false},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user