mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
Merge branch 'main' into data-driven
This commit is contained in:
commit
4fc57d7fc1
9 files changed
+22
-22
No files matched your search
@@ -50,10 +50,11 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
|
||||
async tanks() {
|
||||
const tankDefinitions = TankDefinitions.create();
|
||||
|
||||
const gameModeNativeNames: Record<string, number> = {};
|
||||
const gameModeNativeNames: Record<string, string> = {};
|
||||
|
||||
const squadBattleTypeGameModeNativeNameMatches =
|
||||
this.squadBattleTypeStyles!.Prototypes[0].components.UIDataLocalBindingsComponent.data[1][2].matchAll(
|
||||
/"(\d+)" -> "(battleType\/([a-zA-Z]+))"/g,
|
||||
/eGameMode\.(\w+) -> "(battleType\/([a-zA-Z]+))"/g,
|
||||
);
|
||||
const gameTypeGameModeNativeNameMatches =
|
||||
this.gameTypeSelectorStyles!.Prototypes[0].components.UIDataLocalBindingsComponent.data[1][2].matchAll(
|
||||
@@ -61,8 +62,7 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
|
||||
);
|
||||
|
||||
for (const match of squadBattleTypeGameModeNativeNameMatches) {
|
||||
const id = Number(match[1]);
|
||||
gameModeNativeNames[match[3]] = id;
|
||||
gameModeNativeNames[match[3]] = match[1];
|
||||
}
|
||||
|
||||
for (const match of gameTypeGameModeNativeNameMatches) {
|
||||
|
||||
@@ -27,9 +27,9 @@ export abstract class ServerBlitzKitAPI9 extends ServerBlitzKitAPI8 {
|
||||
).available_nations;
|
||||
|
||||
for (const match of this.squadBattleTypeStyles!.Prototypes[0].components.UIDataLocalBindingsComponent.data[1][2].matchAll(
|
||||
/"(\d+)" -> "(battleType\/([a-zA-Z]+))"/g,
|
||||
/eGameMode\.(\w+) -> "(battleType\/([a-zA-Z]+))"/g,
|
||||
)) {
|
||||
const id = Number(match[1]);
|
||||
const id = match[1];
|
||||
const name = this.getString(match[2]);
|
||||
|
||||
gameDefinitions.gameModes[id] = {
|
||||
|
||||
Reference in new issue
Block a user