From 4f1d753c2d1c6a345033c0e263b2b59f7817add4 Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Sat, 21 Oct 2023 17:56:05 +0100 Subject: [PATCH] fix(TfW trainfx): wrong script for departing --- .../systems/rolling-stock/TfWTrainFx.tsx | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/announcement-data/systems/rolling-stock/TfWTrainFx.tsx b/src/announcement-data/systems/rolling-stock/TfWTrainFx.tsx index c6b4943bd..5dbd96491 100644 --- a/src/announcement-data/systems/rolling-stock/TfWTrainFx.tsx +++ b/src/announcement-data/systems/rolling-stock/TfWTrainFx.tsx @@ -18,12 +18,11 @@ interface IStoppedAtStationAnnouncementOptions { interface IDepartingStopAnnouncementOptions { nextStationCode: string - terminatesAtCode: string + terminatesHere: boolean } interface IApproachingStopAnnouncementOptions { nextStationCode: string - terminatesAtCode: string gapType: 'gap' | 'step' | 'step down' | 'none' } @@ -75,7 +74,7 @@ export default class TfWTrainFx extends TrainAnnouncementSystem { } private async playDepartingStopAnnouncement(options: IDepartingStopAnnouncementOptions, download: boolean = false): Promise { - const { nextStationCode, terminatesAtCode } = options + const { nextStationCode, terminatesHere } = options const files: AudioItem[] = [] @@ -83,8 +82,6 @@ export default class TfWTrainFx extends TrainAnnouncementSystem { return } - files.push(...this.getTerminationInfo(terminatesAtCode, 'low')) - files.push( { id: 'conjoiners.the next stop is', @@ -93,7 +90,7 @@ export default class TfWTrainFx extends TrainAnnouncementSystem { `stations.high.${nextStationCode}`, ) - if (nextStationCode === terminatesAtCode) { + if (terminatesHere) { files.push('conjoiners.our final station') } @@ -544,11 +541,10 @@ export default class TfWTrainFx extends TrainAnnouncementSystem { options: this.AvailableStationItemMaps.high, type: 'select', }, - terminatesAtCode: { - name: 'Terminates at', - default: this.AvailableDestinationOptions[0].value, - options: this.AvailableDestinationOptions, - type: 'select', + terminatesHere: { + name: 'Terminates here', + default: false, + type: 'boolean', }, }, },