aerofly-missions
Version:
The Aerofly Missionsgerät converts simulator flight plan files for Aerofly FS 4, Microsoft Flight Simulator, X-Plane, GeoFS, and Garmin / Infinite Flight flight plan files. It also imports SimBrief flight plans.
37 lines (36 loc) • 961 B
JavaScript
import { FileParser } from "./FileParser.js";
export class MissionsList {
constructor(title) {
this.title = title;
this.missions = [];
}
toString() {
return `\
<[file][][]
<[tmmissions_list][][]
<[list_tmmission_definition][missions][]
// -----------------------------------------------------------------------------
${this.missions.join("")}\
>
>
>
`;
}
}
export class MissionListParser extends FileParser {
constructor(configFileContent) {
super();
this.configFileContent = configFileContent;
}
getMissionNames() {
return this.getValues(this.configFileContent, "title");
}
getMissions() {
return this.getGroups(this.configFileContent, "tmmission_definition", 3);
}
getMissionString(index) {
var _a;
const missions = this.getMissions();
return (_a = missions[index]) !== null && _a !== void 0 ? _a : "";
}
}