Skip to content

Commit

Permalink
Merge branch 'main' into deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Apr 28, 2024
2 parents af5e2cb + 2262c7f commit 75457ef
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 13 deletions.
Binary file removed audio/TL/700/stations/high/SPL.mp3
Binary file not shown.
Binary file modified audio/TL/700/stations/high/STP.mp3
Binary file not shown.
Binary file added audio/TL/700/stations/high/STP_HL.mp3
Binary file not shown.
Binary file removed audio/TL/700/stations/low/SPL.mp3
Binary file not shown.
Binary file modified audio/TL/700/stations/low/STP.mp3
Binary file not shown.
Binary file added audio/TL/700/stations/low/STP_HL.mp3
Binary file not shown.
Binary file added audio/station/ketech/celia/station/e/KIR.mp3
Binary file not shown.
Binary file added audio/station/ketech/celia/station/e/WAW.mp3
Binary file not shown.
Binary file added audio/station/ketech/celia/station/m/KIR.mp3
Binary file not shown.
Binary file added audio/station/ketech/celia/station/m/WAW.mp3
Binary file not shown.
Binary file not shown.
Binary file modified audio/station/ketech/phil/station/e/KIR.mp3
Binary file not shown.
Binary file added audio/station/ketech/phil/station/e/WAW.mp3
Binary file not shown.
Binary file modified audio/station/ketech/phil/station/m/KIR.mp3
Binary file not shown.
Binary file added audio/station/ketech/phil/station/m/WAW.mp3
Binary file not shown.
7 changes: 5 additions & 2 deletions src/announcement-data/systems/stations/AmeyCelia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default class AmeyCelia extends AmeyPhil {
'North London Railways',
'South Central Trains',
'steam special',
'Transport for Wales',
'Wessex',
'Virgin Trains the Sussex Scot',
'West Anglia Great Northern Railway',
Expand Down Expand Up @@ -387,8 +388,8 @@ export default class AmeyCelia extends AmeyPhil {
'heavy rain',
'high winds',
'industrial action',
'large numbers of passengers alighting from the trains at',
'large numbers of passengers joining the trains at',
// 'large numbers of passengers alighting from the trains at',
// 'large numbers of passengers joining the trains at',
'no driver available',
'objects being thrown onto the line',
'objects on the line',
Expand Down Expand Up @@ -1707,6 +1708,7 @@ export default class AmeyCelia extends AmeyPhil {
'KGX',
'KID',
'KIL',
'KIR',
'KIT',
'KIV',
'KKB',
Expand Down Expand Up @@ -2784,6 +2786,7 @@ export default class AmeyCelia extends AmeyPhil {
'WAR',
'WAS',
'WAT',
'WAW',
'WBC',
'WBD',
'WBL',
Expand Down
37 changes: 28 additions & 9 deletions src/announcement-data/systems/stations/AmeyPhil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface INextTrainAnnouncementOptions {
vias: CallingAtPoint[]
callingAt: CallingAtPoint[]
firstClassLocation: FirstClassLocation
coaches: string | null
coaches: string
}

export interface IStandingTrainAnnouncementOptions extends Omit<INextTrainAnnouncementOptions, 'chime'> {
Expand Down Expand Up @@ -88,7 +88,7 @@ export interface ILivePlatformAlterationAnnouncementOptions {
terminatingStationCode: string[]
vias: CallingAtPoint[][]
callingAt?: CallingAtPoint[]
coaches: string | null
coaches: string
fromLive: true
}

Expand Down Expand Up @@ -3311,6 +3311,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
'WAR',
'WAS',
'WAT',
'WAW',
'WBC',
'WBD',
'WBL',
Expand Down Expand Up @@ -4529,7 +4530,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
...(await this.getCallingPoints(
options.callingAt,
options.terminatingStationCode,
options.coaches ? parseInt(options.coaches.split(' ')[0]) : null,
options.coaches !== 'None' ? parseInt(options.coaches.split(' ')[0]) : null,
false,
)),
)
Expand All @@ -4545,7 +4546,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
...(await this.getShortPlatforms(
options.callingAt,
options.terminatingStationCode,
options.coaches ? parseInt(options.coaches.split(' ')[0]) : null,
options.coaches !== 'None' ? parseInt(options.coaches.split(' ')[0]) : null,
)),
)

Expand All @@ -4556,7 +4557,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
)
}

if (options.coaches) {
if (options.coaches !== 'None') {
const coaches = options.coaches.split(' ')[0]

// Platforms share the same audio as coach numbers
Expand All @@ -4571,7 +4572,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
...(await this.getRequestStops(
options.callingAt,
options.terminatingStationCode,
options.coaches ? parseInt(options.coaches.split(' ')[0]) : null,
options.coaches !== 'None' ? parseInt(options.coaches.split(' ')[0]) : null,
)),
)

Expand Down Expand Up @@ -4636,7 +4637,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
...(await this.getCallingPoints(
options.callingAt,
options.terminatingStationCode,
options.coaches ? parseInt(options.coaches.split(' ')[0]) : null,
options.coaches !== 'None' ? parseInt(options.coaches.split(' ')[0]) : null,
true,
)),
)
Expand All @@ -4652,15 +4653,15 @@ export default class AmeyPhil extends StationAnnouncementSystem {
...(await this.getShortPlatforms(
options.callingAt,
options.terminatingStationCode,
options.coaches ? parseInt(options.coaches.split(' ')[0]) : null,
options.coaches !== 'None' ? parseInt(options.coaches.split(' ')[0]) : null,
)),
)

files.push(
...(await this.getRequestStops(
options.callingAt,
options.terminatingStationCode,
options.coaches ? parseInt(options.coaches.split(' ')[0]) : null,
options.coaches !== 'None' ? parseInt(options.coaches.split(' ')[0]) : null,
)),
)

Expand Down Expand Up @@ -5330,6 +5331,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
name: 'Coach count',
default: '8 coaches',
options: [
'None',
'1 coach',
'2 coaches',
'3 coaches',
Expand All @@ -5342,6 +5344,14 @@ export default class AmeyPhil extends StationAnnouncementSystem {
'10 coaches',
'11 coaches',
'12 coaches',
'13 coaches',
'14 coaches',
'15 coaches',
'16 coaches',
'17 coaches',
'18 coaches',
'19 coaches',
'20 coaches',
].map(c => ({ title: c, value: c })),
type: 'select',
},
Expand Down Expand Up @@ -5570,6 +5580,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
name: 'Coach count',
default: '8 coaches',
options: [
'None',
'1 coach',
'2 coaches',
'3 coaches',
Expand All @@ -5582,6 +5593,14 @@ export default class AmeyPhil extends StationAnnouncementSystem {
'10 coaches',
'11 coaches',
'12 coaches',
'13 coaches',
'14 coaches',
'15 coaches',
'16 coaches',
'17 coaches',
'18 coaches',
'19 coaches',
'20 coaches',
].map(c => ({ title: c, value: c })),
type: 'select',
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/AmeyLiveTrainAnnouncements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ export function LiveTrainAnnouncements<SystemKeys extends string>({
min: m === '00' ? '00 - hundred-hours' : m,
isDelayed: delayMins > 5,
toc,
coaches: train.length ? `${train.length} coaches` : null,
coaches: train.length ? `${train.length} coaches` : 'None',
platform: getPlatform(train.platform, systemKey),
terminatingStationCode: getStation(train.destination[0], systemKey),
vias,
Expand Down Expand Up @@ -670,7 +670,7 @@ export function LiveTrainAnnouncements<SystemKeys extends string>({
min: m === '00' ? '00 - hundred-hours' : m,
isDelayed: delayMins > 5,
toc,
coaches: train.length ? `${train.length} coaches` : null,
coaches: train.length ? `${train.length} coaches` : 'None',
platform: getPlatform(train.platform, systemKey),
terminatingStationCode: getStation(train.destination[0], systemKey),
vias,
Expand Down
9 changes: 9 additions & 0 deletions src/data/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,15 @@ const changelog: IChangelogVersion[] = [
fixes: ['[Live Announcements] Don\'t announce pick-up only stops within "calling at"'],
otherChanges: ['Migrated from GitHub Pages to Cloudflare R2 (for audio storage) and Pages (for the website)'],
},
{
date: '2024-04-29',
additions: [
'[Amey Phil & Celia] Add Warrington West and Kirkby stations',
'[Amey Phil & Celia] Add up to 20 coaches to a train',
'[Amey Celia] Add Transport for Wales',
],
fixes: ['[Class 700] Fix wrong St Pancras audio'],
},
]

export default changelog

0 comments on commit 75457ef

Please sign in to comment.