diff --git a/basis/hyperloop.lua b/basis/hyperloop.lua index a694e32..ceeb677 100644 --- a/basis/hyperloop.lua +++ b/basis/hyperloop.lua @@ -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) diff --git a/basis/lib.lua b/basis/lib.lua index bfbe84a..33d2120 100644 --- a/basis/lib.lua +++ b/basis/lib.lua @@ -572,6 +572,8 @@ function techage.add_expoint(player, number) end end +-- Delete number with: `//lua minetest.get_player_by_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() diff --git a/doc/plans.lua b/doc/plans.lua index 3cf0476..282997c 100644 --- a/doc/plans.lua +++ b/doc/plans.lua @@ -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}, } --