... | ... |
@@ -164,9 +164,13 @@ var displayClass = { |
164 | 164 |
elsif (split('/', eis_file)[0] == 'Aircraft') { |
165 | 165 |
var path = split('/', eis_file); |
166 | 166 |
if (getprop('/sim/fg-aircraft') != nil) { |
167 |
- eis_file = getprop('/sim/fg-aircraft'); |
|
168 |
- for (var i = 1; i < size(path); i += 1) |
|
169 |
- eis_file ~= '/' ~ path[i]; |
|
167 |
+ foreach (var fg_aircraft; props.globals.getNode('/sim').getChildren('fg-aircraft')) { |
|
168 |
+ eis_file = fg_aircraft.getValue(); |
|
169 |
+ for (var i = 1; i < size(path); i += 1) |
|
170 |
+ eis_file ~= '/' ~ path[i]; |
|
171 |
+ if (io.stat(eis_file) != nil) |
|
172 |
+ break; |
|
173 |
+ } |
|
170 | 174 |
} |
171 | 175 |
else |
172 | 176 |
eis_file = getprop('/sim/fg-root') ~ '/' ~ eis_file; |