mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 21:26:08 +01:00
move version to protected field
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user