Fix bug #81
This commit is contained in:
parent
8b0d340344
commit
2df3d3a523
@ -57,16 +57,18 @@ local function get_remote_pos(pos, rmt_name)
|
||||
end
|
||||
|
||||
local function get_free_server_list(pos, owner)
|
||||
local tbl = {M(pos):get_string("remote_name")}
|
||||
for key,item in pairs(Stations:get_node_table(pos)) do
|
||||
if item.single and item.owner == owner then
|
||||
if M(pos):get_string("node_type") == M(S2P(key)):get_string("node_type") then
|
||||
tbl[#tbl+1] = item.conn_name
|
||||
if Stations and Stations.get_node_table then
|
||||
local tbl = {M(pos):get_string("remote_name")}
|
||||
for key,item in pairs(Stations:get_node_table(pos) or {}) do
|
||||
if item.single and item.owner == owner then
|
||||
if M(pos):get_string("node_type") == M(S2P(key)):get_string("node_type") then
|
||||
tbl[#tbl+1] = item.conn_name
|
||||
end
|
||||
end
|
||||
end
|
||||
tbl[#tbl+1] = ""
|
||||
return tbl
|
||||
end
|
||||
tbl[#tbl+1] = ""
|
||||
return tbl
|
||||
end
|
||||
|
||||
local function on_lose_connection(pos, node_type)
|
||||
@ -78,8 +80,11 @@ local function on_lose_connection(pos, node_type)
|
||||
end
|
||||
|
||||
local function on_dropdown(pos)
|
||||
local owner = M(pos):get_string("owner")
|
||||
return table.concat(get_free_server_list(pos, owner), ",")
|
||||
if pos then
|
||||
local owner = M(pos):get_string("owner")
|
||||
return table.concat(get_free_server_list(pos, owner), ",") or ""
|
||||
end
|
||||
return ""
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
-- Delete number with: `//lua minetest.get_player_by_name("<name>"):get_meta():set_string("techage_collider_number", "")`
|
||||
|
||||
function techage.on_remove_collider(player)
|
||||
if player and player.get_meta then
|
||||
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, 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