move version to protected field

This commit is contained in:
tresabhi committed 2026-11-14 13:51:19 -06:00
1 parent 1a4ca8ca1e
commit af475a0ebc
2 files changed
+5 -4

No files matched your search

@@ -106,6 +106,7 @@ export abstract class ServerBlitzKitAPI0 extends BlitzKitAPI {
protected gameTypeSelectorStyles?: SquadBattleTypeStylesYaml;
protected combatRoles?: CombatRolesYaml;
protected tierEqualizer?: string[][];
protected version?: string;
constructor(vfs: AbstractVFS) {
super();
@@ -153,11 +154,13 @@ export abstract class ServerBlitzKitAPI0 extends BlitzKitAPI {
{ delimiter: ";" },
);
this.version = (await this.vfs.text("Data/version.txt")).split(" ")[0];
console.log("Fetching game localizations...");
await Promise.all(
locales.supported.map(async ({ locale }) => {
const root = "../../temp/game-strings";
const root = `../../temp/game-strings/${this.version}`;
const cachePath = `${root}/${locale}.json`;
if (existsSync(cachePath)) {
@@ -19,9 +19,7 @@ export abstract class ServerBlitzKitAPI9 extends ServerBlitzKitAPI8 {
provisionNativeNames[key] = provision.id;
});
const version = (await this.vfs.text("Data/version.txt")).split(" ")[0];
gameDefinitions.version = version;
gameDefinitions.version = this.version!;
gameDefinitions.nations = (
await this.vfs.yaml<AvailableNationsYaml>("Data/available_nations.yaml")
).available_nations;