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 Oct 29, 2023
2 parents 8fb2e22 + 20f26c6 commit 2a08ed3
Showing 1 changed file with 36 additions and 11 deletions.
47 changes: 36 additions & 11 deletions src/announcement-data/systems/stations/KeTechPhil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,19 +537,44 @@ export default class KeTechPhil extends StationAnnouncementSystem {
let firstAdded = false

order.forEach(s => {
files.push(
{ id: firstAdded ? 's.customers for' : 's.due to short platforms customers for', opts: { delayStart: 200 } },
...this.pluraliseAudio(
shortPlatforms[s].map(crs => ({ id: crs, opts: { delayStart: 100 } })),
100,
const plats = shortPlatforms[s]

if (!firstAdded) {
if (order.length === 1 && plats.length === 1) {
files.push('m.due to a short platform at', `station.m.${plats[0]}`, 'm.customers for this station', ...s.split(','))
} else {
files.push(
'm.due to short platforms customers for',
...this.pluraliseAudio(
plats.map(crs => ({ id: crs, opts: { delayStart: 100 } })),
100,
{
prefix: 'station.m.',
finalPrefix: 'station.m.',
andId: 'm.and',
},
),
...s.split(','),
)
}
} else {
files.push(
{
prefix: 'station.m.',
finalPrefix: 'station.m.',
andId: 'm.and',
id: 's.customers for',
opts: { delayStart: 200 },
},
),
...s.split(','),
)
...this.pluraliseAudio(
plats.map(crs => ({ id: crs, opts: { delayStart: 100 } })),
100,
{
prefix: 'station.m.',
finalPrefix: 'station.m.',
andId: 'm.and',
},
),
...s.split(','),
)
}

firstAdded = true
})
Expand Down

0 comments on commit 2a08ed3

Please sign in to comment.