From 4d00d4506e3aac9742a7e2ab847aea2ed6efe176 Mon Sep 17 00:00:00 2001 From: Philippe Dellaert Date: Mon, 26 Dec 2022 13:20:55 -0800 Subject: [PATCH] refactor: update atc command with new link and information (#389) * refactor: update atc command with new link and information Based on changes in flybywiresim/docs#691 * CHANGELOG for refactor: update atc command with new link and information * Typo fix on CHANGELOG Co-authored-by: NUT <87286435+NUTTTTTTTT@users.noreply.github.com> --- .github/CHANGELOG.md | 1 + src/commands/aircraft/atc.ts | 61 ++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index b323e413..c9662647 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -2,6 +2,7 @@ Update _ December 2022 +- refactor: update atc command with new link and information (26/12/2022) - feat: stickies for forum posts which get posted on forum post create (19/12/2022) - refactor: outdated information + links in commands (08/12/2022) - fix: fix latlong image typo and prime meridian alignment (04/12/2022) diff --git a/src/commands/aircraft/atc.ts b/src/commands/aircraft/atc.ts index ed5db6b6..b6191dac 100644 --- a/src/commands/aircraft/atc.ts +++ b/src/commands/aircraft/atc.ts @@ -1,36 +1,37 @@ -import { CommandDefinition } from '../../lib/command'; -import { makeEmbed, makeLines } from '../../lib/embed'; +import { MessageCommandDefinition } from '../../lib/command'; +import { makeEmbed } from '../../lib/embed'; import { CommandCategory } from '../../constants'; -export const atc: CommandDefinition = { +const genericAtcEmbed = makeEmbed({ + title: 'FlyByWire A32NX | Using the built-in Microsoft Flight Simulator ATC', + description: 'There are multiple ways of using the built-in ATC of MSFS:', + fields: [ + { + name: 'Loading a Flight Plan from the MSFS World Map', + value: 'Ensures the Flight Plan from the MSFS World Map is imported into the aircraft\'s MCDU, without synchronizing changes back to MSFS ATC.', + inline: false, + }, + { + name: 'Using a Flight Plan from the MSFS World Map with MSFS ATC', + value: 'This mode loads the Flight Plan from the MSFS World Map into the aircraft\'s MCDU and attempts to synchronize all changes made back to MSFS ATC.', + inline: false, + }, + { + name: 'Importing a SimBrief Flight Plan and using MSFS ATC', + value: 'When importing the Flight Plan from SimBrief and not building a Flight Plan through the MSFS World Map, this mode will attempt to synchronize the Flight Plan back to MSFS ATC.', + inline: false, + }, + { + name: 'More information', + value: 'Please read the [Flight Planning guide](https://docs.flybywiresim.com/fbw-a32nx/feature-guides/flight-planning/) for more details.', + inline: false, + }, + ], +}); + +export const atc: MessageCommandDefinition = { name: 'atc', category: CommandCategory.AIRCRAFT, description: 'Provides details on the use of the built-in ATC and a link to the cFMS special notes section.', - executor: (msg) => { - const atcEmbed = makeEmbed({ - title: 'FlyByWire A32NX | Using the built-in Microsoft Flight Simulator ATC', - description: makeLines([ - 'There are multiple ways of using the built-in ATC of MSFS:', - ]), - fields: [ - { - name: 'Synchronizing the MCDU flight plan back to MSFS ATC', - value: 'In this mode, you only select a departure airport and gate (or runway). You should not select a destination airport. Once the EFB setting for **Sync MSFS Flight Plan** is set to **Save**, any flight plan entered, or loaded, into the MCDU F-PLN page, will be synced to the MSFS ATC service.', - inline: false, - }, - { - name: 'Loading the same flight plan in the World Planner and the MCDU', - value: 'In this mode, the EFB setting for **Sync MSFS Flight Plan** should be set to **None**. You can then load a flight plan into the World Planner (for instance through exporting it from Simbrief, or by letting the World Planner build one for you) and once the aircraft has loaded and has been powered up, you enter or load the same flight plan in the MCDU.', - inline: false, - }, - { - name: 'More information', - value: 'Please read cFMS special notes [here.](https://docs.flybywiresim.com/fbw-a32nx/feature-guides/cFMS/#special-notes)', - inline: false, - }, - ], - }); - - return msg.channel.send({ embeds: [atcEmbed] }); - }, + genericEmbed: genericAtcEmbed, };