Merge branch 'main' into dev-rinth

This commit is contained in:
TrèsAbhi committed 2024-04-22 12:43:22 -05:00
commit 13a901c839
38 files changed
+876 -308

No files matched your search

@@ -65,5 +65,6 @@ export default async function commitMultipleFiles(
repo,
ref: `heads/${branch}`,
sha: newCommitData.sha,
force: true,
});
}
@@ -430,8 +430,12 @@ export function tankCharacteristics(
const height = size[0];
const length = size[1];
const volume = width * height * length;
const shellNormalization = shell.normalization ?? 0;
const shellRicochet = shell.ricochet;
return {
shellNormalization,
shellRicochet,
dpm,
dpmMaximum,
dpmEffective,
+30
View File
@@ -0,0 +1,30 @@
import { asset } from './asset';
export interface VideoDefinitions {
[id: number]: {
videos: string[];
lastUpdated: number;
};
}
export const videoDefinitions = fetch(asset('definitions/videos.csv'))
.then((response) => response.text())
.then((text) =>
text
.split('\n')
.map((line) => {
const [idString, lastUpdatedString, ...videos] = line.split(',');
const id = Number(idString);
const lastUpdated = Number(lastUpdatedString);
return { id, videos, lastUpdated };
})
.filter(({ videos }) => videos.length > 0)
.reduce<VideoDefinitions>((accumulator, { id, videos, lastUpdated }) => {
accumulator[id] = {
videos,
lastUpdated,
};
return accumulator;
}, {}),
);