Skip to content

Commit

Permalink
Updates for ring meister
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Moitié committed Mar 11, 2024
1 parent 8420340 commit f2f62a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion build/api/getSeason.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export default async function getSeason(cars: Array<carType>, tracks: Array<trac
return seasonResponse.data.map((series) => {
const carClasses = series.car_class_ids.map((carClassId) => carClassMap[carClassId]);
const seriesCars = carClasses.reduce((carry, carClass) => {
if (carClass === undefined || carry[0] === null) {
return [null];
}
const carsInClass = carClass.cars_in_class.map((carInClass) => carMap[carInClass.car_id]);
return [...carry, ...carsInClass];
}, []);
Expand Down Expand Up @@ -112,7 +115,7 @@ export default async function getSeason(cars: Array<carType>, tracks: Array<trac
licenceGroupName: licenseMap[series.license_group].group_name,
minlicenselevel: licenceGroupToMinlicenselevel[series.license_group],
isFixedSetup: series.fixed_setup,
carclasses: carClasses.map((carClass) => ({ shortname: carClass.short_name })),
carclasses: carClasses.map((carClass) => ({ shortname: carClass ? carClass.short_name : null })),
cars: seriesCars.map(({ sku }) => ({ sku })),
seasonid: series.season_id,
};
Expand Down
12 changes: 6 additions & 6 deletions src/data/offWeeks.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,22 @@ export default {
4828: {
offWeeks: [
2.1, 3.1, 4.1, 5.1, 6.1, 8.1, 9.1, 12.1, 14.1, 14.1, 14.1, 16.1, 18.1, 18.1, 18.1, 21.1, 21.1,
]
],
},
// 496 │ 4829 │ Road │ C │ Formula A - Grand Prix Tour - Fixed │ 2024-12-10
4829: {
offWeeks: [
2.1, 3.1, 4.1, 5.1, 6.1, 8.1, 9.1, 12.1, 14.1, 14.1, 14.1, 16.1, 18.1, 18.1, 18.1, 21.1, 21.1,
]
],
},
// 374 │ 4831 │ Road │ C │ INDYCAR iRacing Series | 2024-09-17
4831: {
offWeeks: [
1.1, 2.1, 2.1, 2.1, 4.1, 5.1, 8.1, 9.1, 12.1, 12.1, 12.1, 15.1,
],
},
// Prelim Draft Master - Fixed
99998: {
// 538 │ 4822 │ Oval │ D │ Draft Master - Fixed
4822: {
carByWeek: [
[10068], // 1 [Legacy] NASCAR Cup Chevrolet Impala COT - 2009
[10481, 10530, 10459], // 2 NASCAR Trucks
Expand Down Expand Up @@ -219,8 +219,8 @@ export default {
['NASCAR 2022 NG'], // 12 NASCAR Next Gen
],
},
// Prelim Ring Meister
99999: {
// 526 │ 4820 │ Sports Car │ C │ Ring Meister Ricmotech Series - Fixed
4820: {
carByWeek: [
[10306], // 1 Cadillac CTS-V Racecar
[10548], // 2 Renault Clio
Expand Down

0 comments on commit f2f62a3

Please sign in to comment.