src/helpers/MSFS/ConfigFiles/parseCFGFile.js
/**
 * Add airplane object to CFG FIle
 *
 * @export
 * @argument {Object} airplaneObject Pass the airplane json object to add it to the .CFG file
 * @argument {Number} planeNumber Plane number for in the aircraft.cfg, only do when overriding!
 * @example addAirplane({"title":"Airbus A320 Neo Asobo","model":"","panel":"","sound":"","texture":"","kb_checklists":"Boeing747-400_check","kb_reference":"Boeing747-400_ref","description":"TT:AIRCRAFT.DESCRIPTION","wip_indicator":0,"ui_manufacturer":"TT:AIRCRAFT.UI_MANUFACTURER","ui_type":"TT:AIRCRAFT.UI_MODEL","ui_variation":"TT:AIRCRAFT.LIVERY.DEFAULT","ui_typerole":"Commercial Airliner","ui_createdby":"Asobo Studio","ui_thumbnailfile":"","ui_certified_ceiling":"39800","ui_max_range":"3500","ui_autonomy":"7","ui_fuel_burn_rate":"5300","atc_id":"ASX320","atc_id_enable":"0","atc_airline":"","atc_flight_number":"1123","atc_heavy":"1","atc_parking_types":"GATE,RAMP,CARGO","atc_parking_codes":"","atc_id_color":"","atc_id_font":"","isAirTraffic":"0","isUserSelectable":"1"})
 */
Add airplane object to CFG FIle
@export
@argument {Object} airplaneObject Pass the airplane json object to add it to the .CFG file
@argument {Number} planeNumber Plane number for in the aircraft.cfg, only do when overriding.
Add airplane object to CFG FIle @export @argument { Object } airplaneObject Pass the airplane json object to add it to the . CFG file @argument { Number } planeNumber Plane number for in the aircraft . cfg only do when overriding .
function addAirplane(airplaneObject, planeNumber) {
  planeNumber = planeNumber || getHighestPlaneNumber() + 1;
  airplaneObject = checkAirplaneObject(airplaneObject);
  let airplaneCFG = parseCFGFile();
  airplaneCFG.FLTSIM[planeNumber] = airplaneObject;
  fs.writeFileSync(CFGpath, ini.stringify(airplaneCFG));
  return;
}
function addAirplane ( airplaneObject , planeNumber ) { planeNumber = planeNumber || getHighestPlaneNumber ( ) + 1 ; airplaneObject = checkAirplaneObject ( airplaneObject ) ; let airplaneCFG = parseCFGFile ( ) ; airplaneCFG . FLTSIM [ planeNumber ] = airplaneObject ; fs . writeFileSync ( CFGpath , ini . stringify ( airplaneCFG ) ) ; return ; }
Add airplane object to CFG FIle
 @export
 @argument {Object} airplaneObject Pass the airplane json object to add it to the .CFG file
 @argument {Number} planeNumber Plane number for in the aircraft.cfg, only do when overriding!
Add airplane object to CFG FIle @export @argument { Object } airplaneObject Pass the airplane json object to add it to the . CFG file @argument { Number } planeNumber Plane number for in the aircraft . cfg only do when overriding!
//Check if all values are in here, if not set them to an empty string :)