Nasal/multiplayer.nas: in Pilot List, added column showing id of nearest airport.
Requires changes to flightgear to populate /ai/models/multiplayer[]/sim/tower/airport-id.
This commit is contained in:
parent
f591120032
commit
4e94cdc906
1 changed files with 9 additions and 2 deletions
|
@ -188,7 +188,7 @@ var dialog = {
|
|||
slant: getprop("/sim/gui/selected-style/fonts/mp-list/slant") or 0,
|
||||
};
|
||||
|
||||
me.header = ["view", " callsign", " model", func dialog.dist_hdr, func dialog.alt_hdr ~ " ", " brg", "chat", "ignore" ~ " ", " code", "ver", " set"];
|
||||
me.header = ["view", " callsign", " model", func dialog.dist_hdr, func dialog.alt_hdr ~ " ", " brg", "chat", "ignore" ~ " ", " code", "ver", "airport", " set"];
|
||||
me.columns = [
|
||||
{ type: "checkbox", legend: "", property: "view", halign: "right", "pref-height": 14, "pref-width": 14, callback: "multiplayer.view_select", argprop: "callsign", },
|
||||
{ type: "text", property: "callsign", format: " %s", label: "-----------", halign: "fill" , font: me.font },
|
||||
|
@ -201,6 +201,7 @@ var dialog = {
|
|||
argprop: "callsign", label: "---------", halign: "right", font: me.font },
|
||||
{ type: "text", property: "id-code", format: " %s", label: "-----", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: "sim/multiplay/protocol-version", format: " %s", label: "--", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: "airport-id", format: "%s", label: "----", halign: "fill" , font: me.font },
|
||||
{ type: "text", property: "set-loaded", format: "%s", label: "----", halign: "fill" , font: me.font },
|
||||
];
|
||||
me.cs_warnings = {};
|
||||
|
@ -378,6 +379,11 @@ var dialog = {
|
|||
if (set != nil) set_numchildren = size(set.getChildren());
|
||||
var set_loaded = (set_numchildren >= 2);
|
||||
|
||||
var airport_id = n.getNode("sim/tower/airport-id");
|
||||
if (airport_id != nil) {
|
||||
airport_id = airport_id.getValue();
|
||||
}
|
||||
|
||||
n.setValues({
|
||||
"model-short": n.getNode("model-installed").getValue() ? mp.model : "[" ~ mp.model ~ "]",
|
||||
"set-loaded": set_loaded ? " *" : " ",
|
||||
|
@ -386,7 +392,8 @@ var dialog = {
|
|||
"distance-to-nm": distance * M2NM,
|
||||
"position/altitude-m": n.getNode("position/altitude-ft").getValue() * FT2M,
|
||||
"controls/invisible": contains(ignore, mp.callsign),
|
||||
"id-code": idcode
|
||||
"id-code": idcode,
|
||||
"airport-id": airport_id,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue