- restore old $FG_HOME in <help>
- print target path to terminal - minor optimization
This commit is contained in:
parent
8c4a9aefb7
commit
d52d4e9a8b
2 changed files with 5 additions and 4 deletions
|
@ -75,7 +75,7 @@
|
||||||
<line></line>
|
<line></line>
|
||||||
<line>Exported data are written to:</line>
|
<line>Exported data are written to:</line>
|
||||||
<line>  ~/.fgfs/ufo-model-export.xml (Unix)</line>
|
<line>  ~/.fgfs/ufo-model-export.xml (Unix)</line>
|
||||||
<line>  My Documents\ufo-model-export.xml (Microsoft Windows)</line>
|
<line>  %APPDATA%\flightgear.org\ufo-model-export.xml (Microsoft Windows)</line>
|
||||||
</help>
|
</help>
|
||||||
</sim>
|
</sim>
|
||||||
|
|
||||||
|
|
|
@ -78,8 +78,7 @@ coord_dist_sq = func(xyz0, xyz1) {
|
||||||
|
|
||||||
# sort vector of strings (bubblesort)
|
# sort vector of strings (bubblesort)
|
||||||
#
|
#
|
||||||
sort = func(list) {
|
sort = func(l) {
|
||||||
var l = list;
|
|
||||||
while (1) {
|
while (1) {
|
||||||
var n = 0;
|
var n = 0;
|
||||||
for (var i = 0; i < size(l) - 1; i += 1) {
|
for (var i = 0; i < size(l) - 1; i += 1) {
|
||||||
|
@ -775,7 +774,9 @@ exportData = func {
|
||||||
var tmp = "save-ufo-data";
|
var tmp = "save-ufo-data";
|
||||||
save = props.globals.getNode(tmp, 1);
|
save = props.globals.getNode(tmp, 1);
|
||||||
props.copy(modelmgr.get_data(), save);
|
props.copy(modelmgr.get_data(), save);
|
||||||
savexml(getprop("/sim/fg-home") ~ "/ufo-model-export.xml", save.getPath());
|
var path = getprop("/sim/fg-home") ~ "/ufo-model-export.xml";
|
||||||
|
savexml(path, save.getPath());
|
||||||
|
print("model data exported to ", path);
|
||||||
props.globals.removeChild(tmp);
|
props.globals.removeChild(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue