Skip to content

Commit

Permalink
Merge pull request #225 from davwheat/feat/electrostar
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat authored Jun 2, 2024
2 parents ebcd2c5 + db25daa commit 050ba21
Show file tree
Hide file tree
Showing 42 changed files with 32 additions and 6 deletions.
Binary file added audio/SN/377/our final destination.MP3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified audio/SN/377/stations/ANG.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/BAN.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/BCS.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/BMO.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/CLJ.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/DDG.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/DUR.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/ECR.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/GBS.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/GTW.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/HDM.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/HHE.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/HOV.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/HWY.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/LAC.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/LMS.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/MYB.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/NLT.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/PLD.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/PRP.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/SDH.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/SOL.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/SRS.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/SRU.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/SSE.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/SUD.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/WCX.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/WRH.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/WRP.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/WRU.mp3
Binary file not shown.
Binary file added audio/SN/377/stations/WRW.mp3
Binary file not shown.
Binary file modified audio/SN/377/stations/WWO.mp3
Binary file not shown.
Binary file not shown.
Binary file modified audio/SN/377/the next station is.mp3
Binary file not shown.
Binary file modified audio/SN/377/this train is the southern service to.mp3
Binary file not shown.
Binary file modified audio/SN/377/we are now approaching.mp3
Binary file not shown.
Binary file added audio/SN/377/you cannot use oyster.mp3
Binary file not shown.
38 changes: 32 additions & 6 deletions src/announcement-data/systems/rolling-stock/BombardierXstar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import TrainAnnouncementSystem from '../../TrainAnnouncementSystem'
interface IApproachingStationAnnouncementOptions {
stationCode: string
mindTheGap: boolean
keepBelongings: boolean
cannotUseOyster: boolean
}

interface IStoppedAtStationAnnouncementOptions {
Expand Down Expand Up @@ -65,8 +67,6 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
readonly FILE_PREFIX = 'SN/377'
readonly SYSTEM_TYPE = 'train'

private readonly stationsWithUnattendedBaggageAnnouncement = ['GTW']

private async playApproachingStationAnnouncement(options: IApproachingStationAnnouncementOptions, download: boolean = false): Promise<void> {
const files: AudioItem[] = []

Expand All @@ -77,8 +77,14 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
files.push('please mind the gap between the train and the platform')
}

if (this.stationsWithUnattendedBaggageAnnouncement.includes(options.stationCode)) {
files.push('please do not leave unattended items of luggage in the train or on the station', '61016')
if (options.keepBelongings) {
if (options.mindTheGap) files.push('and')

files.push('please do not leave unattended items of luggage in the train or on the station')
}

if (options.cannotUseOyster) {
files.push('you cannot use oyster')
}

await this.playAudioFiles(files, download)
Expand Down Expand Up @@ -166,6 +172,7 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
'BKS',
'BMG',
'BMN',
'BMO',
'BMS',
'BNH',
'BOG',
Expand Down Expand Up @@ -211,6 +218,7 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
'CTN',
'CUX',
'CWU',
'DDG',
'DEA',
'DEP',
'DFD',
Expand Down Expand Up @@ -324,6 +332,7 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
'NGT',
'NHD',
'NHE',
'NLT',
'NSB',
'NUF',
'NVH',
Expand Down Expand Up @@ -365,6 +374,7 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
'SCY',
'SDA',
'SDG',
'SDH',
'SDW',
'SEE',
'SEF',
Expand All @@ -385,10 +395,13 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
'SOU',
'SPH',
'SPU',
'SRS',
'SRT',
'SRU',
'SSE',
'SSS',
'STU',
'SUD',
'SUO',
'SUP',
'SVO',
Expand All @@ -409,6 +422,7 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
'WAM',
'WAT',
'WCB',
'WCX',
'WDU',
'WGA',
'WHA',
Expand All @@ -418,6 +432,8 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
'WMA',
'WRH',
'WRP',
'WRU',
'WRW',
'WSE',
'WTR',
'WVF',
Expand Down Expand Up @@ -453,6 +469,16 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
type: 'boolean',
default: true,
},
keepBelongings: {
name: 'Keep belongings with you?',
type: 'boolean',
default: false,
},
cannotUseOyster: {
name: 'Cannot use Oyster/Contactless beyond here?',
type: 'boolean',
default: false,
},
},
},
} as CustomAnnouncementTab<keyof IApproachingStationAnnouncementOptions>,
Expand Down Expand Up @@ -525,8 +551,8 @@ export default class BombardierXstar extends TrainAnnouncementSystem {
},
{
label: 'BTP 61016',
play: this.playAudioFiles.bind(this, ['61016']),
download: this.playAudioFiles.bind(this, ['61016'], true),
play: this.playAudioFiles.bind(this, ['please keep your bags and personal belongings with you', '61016']),
download: this.playAudioFiles.bind(this, ['please keep your bags and personal belongings with you', '61016'], true),
},
],
},
Expand Down

0 comments on commit 050ba21

Please sign in to comment.