Merge branch 'main' into spall-liner-in-tankopdiea-model-viewer

This commit is contained in:
TrèsAbhi authored and GitHub committed 2026-10-02 15:18:53 -07:00
commit 576b4f7c73
38 files changed
+661 -1024

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "bun"
directory: "/"
schedule:
interval: "daily"
+8 -1
View File
@@ -139,7 +139,14 @@ jobs:
- name: Trigger deployment
if: ${{ github.ref == 'refs/heads/production' }}
# Deploy if:
# 1. Running cron from main using content from production to target production
# 2. Running manually and targeting non-production
if: >-
${{
github.ref == 'refs/heads/production' ||
(inputs.environment != '' && inputs.environment != 'production')
}}
env:
TOKEN: ${{ secrets.GH_NODE_DEPLOY_TOKEN }}
-34
View File
@@ -5,37 +5,3 @@ Tools for everything and anything, World of Tanks Blitz.
This GitHub repository contains the code for BlitzKit and all its services. If you are here, looking to use BlitzKit, go to https://blitzkit.app/.
If you intend to contribute to the code, note that you may need to check out sensitive, closed-source submodules to locally develop certain aspects of BlitzKit. Communicate with `@tresabhi` on Discord to get started or discuss sensitive content, such as environment variables or submodules.
## Packages
| Package | Title | Source | Memo |
| ------------------------------------ | -------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [packages/core](packages/core) | | | Mutual internal code shared between all other packages. |
| [packages/i18n](packages/i18n) | | [Crowdin](https://crowdin.com/project/blitzkrieg) | Translations served as JSON shared across all other packages, including some utility code. |
| [packages/scripts](packages/scripts) | | | CLI utilities for the development and deployment of BlitzKit services. |
| [packages/varuna](packages/varuna) | Varuna | [NPM](https://www.npmjs.com/package/varuna) | React and Astro-oriented state management library, awaiting separation from BlitzKit. Unavailable from NPM at this time. |
| [packages/website](packages/website) | BlitzKit | https://blitzkit.app | The BlitzKit website provides a wide range of tools, APIs, and interconnects all other services. |
## Submodules
| Submodule | Title | Source | Memo |
| ------------------------------------------------------ | --------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [submodules/blitzkit-closed](packages/blitzkit-closed) | ClosedKit | [blitzkit/closed](https://github.com/blitzkit/closed) | Closed source, sensitive code hidden from the public to prevent bad actors from abusing the game. Discuss with `@tresabhi` on Discord for **special permission** to access. |
## Environment Variables
| Name | Source | BlitzKit Default | Memo |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `PUBLIC_WARGAMING_APPLICATION_ID` | [Wargaming Developer's Room](https://developers.wargaming.net/) | | Application ID needed to communicate with Wargaming APIs. |
| `PUBLIC_PROMOTE_OPENTEST` | | `false` | Optional boolean dictating whether the website advertises [the opentest subdomain of BlitzKit](https://opentest.blitzkit.app/). |
| `WOTB_GLOSSARY`, `WOTB_GLOSSARY_DOMAIN`, `WOTB_GLOSSARY_PATH` | | | |
| `PUBLIC_GOOGLE_TAG_MANAGER_ID` | [Google Tag Manager](https://tagmanager.google.com/) | `G-GL2JVHCGPQ` | Google Tag Manager's unique identifier for analytical purposes. |
| `PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID` | [Google Analytics](https://analytics.google.com/) | `430711767` | Google Analytics' unique property ID for [BlitzKit's apex domain](https://blitzkit.app/) and subdomains. |
| `GOOGLE_APPLICATION_CREDENTIALS` | [Google Cloud](https://cloud.google.com/) | | Google Cloud's API key, primarily used for ranking popular tanks and finding relevant tank review videos in Tankopedia. |
| `PUBLIC_DISCORD_SERVER_ID` | [BlitzKit Discord Server](https://discord.gg/nDt7AjGJQH) | `734786591205359697` | BlitzKit Discord Server's id. |
| `PUBLIC_ASSET_BASE` | [blitzkit/assets](https://github.com/blitzkit/assets) | `https://blitzkit.github.io/assets` | The root domain and path that serves the external assets like tank models and icons. |
| `PUBLIC_GUIDE_WEBSITE` | [GuidesBlitz](https://guidesblitz.com/) | `https://guidesblitz.com` | The website that serves the encyclopedia-like content in BlitzKit. |
| `SERVICING` | | `false` | Wether the website is down for servicing. |
| `GH_TOKEN` | [GitHub Fine-Grained Tokens](https://github.com/settings/personal-access-tokens) | | The GitHub API key used for checking out private submodules and pushing content to the asset repository. |
| `DATABASE_URL` | [CockroachDB](https://www.cockroachlabs.com/) | | The CockroachDB-SQL database URL used to link Wargaming and Discord users. |
| `WOTB_DLC_CDN` | | | |
+3
View File
@@ -0,0 +1,3 @@
# BlitzKit 1.31.3
This update updates BlitzKit to work with the game's new ID system for game modes.
+14
View File
@@ -0,0 +1,14 @@
# BlitzKit 1.31.4
Thank you to [Mark Greene](https://github.com/Hitjack007) for your contributions this update.
## Fixes
- [Mark Greene] BlitzKit Session now properly handles tanks removed from the game
## Technical Fixes
- BlitzKit now handles the new ID system for game-modes in WoTB
- The directory which preview versions of the game are downloaded to are now created properly
- This was the last bug standing in the way of BlitzKit Previews
- Welcome back, BlitzKit Previews!
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "blitzkit",
"version": "1.31.2",
"version": "1.31.4",
"license": "BlitzKit License",
"private": true,
"scripts": {
@@ -50,10 +50,11 @@ export abstract class ServerBlitzKitAPI1 extends ServerBlitzKitAPI0 {
async tankDefinitions() {
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) {
@@ -3,10 +3,8 @@ import {
BlitzCrewType,
ChassisDefinitionsList,
Crew,
EngineDefinitionsList,
GunDefinitionsList,
ModelDefinitions,
ResearchCost,
TankParameters,
toUniqueId,
TurretDefinitionsList,
@@ -15,10 +13,10 @@ import {
VehicleDefinitionList,
VehicleDefinitions,
} from "@blitzkit/core";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI2 } from "./2_camouflageDefinitions";
import { parse as parsePath } from "path";
import { Vector3Tuple } from "three";
import { Cache } from "./0_base";
import { ServerBlitzKitAPI2 } from "./2_camouflageDefinitions";
export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
private vector3TupleToBlitzkit(tuple: Vector3Tuple) {
@@ -55,9 +53,6 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
const gunList = await this.vfs.xml<{
root: GunDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/guns.xml`);
const enginesList = await this.vfs.xml<{
root: EngineDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/engines.xml`);
const chassisList = await this.vfs.xml<{
root: ChassisDefinitionsList;
}>(`Data/XML/item_defs/vehicles/${nation}/components/chassis.xml`);
@@ -65,10 +60,6 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
for (const tankKey in tankList.root) {
if (this.botPattern.test(tankKey)) continue;
const gunXps = new Map<number, ResearchCost>();
const turretXps = new Map<number, ResearchCost>();
const engineXps = new Map<number, ResearchCost>();
const trackXps = new Map<number, ResearchCost>();
const tank = tankList.root[tankKey];
const tankDefinition = await this.vfs.xml<{ root: VehicleDefinitions }>(
`Data/XML/item_defs/vehicles/${nation}/${tankKey}.xml`,
@@ -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] = {
+40 -81
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: average_definitions.proto
/* eslint-disable */
@@ -64,7 +64,7 @@ function createBaseAverageDefinitions(): AverageDefinitions {
export const AverageDefinitions: MessageFns<AverageDefinitions> = {
encode(message: AverageDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.averages).forEach(([key, value]: [string, AverageDefinitionsEntry]) => {
Object.entries(message.averages).forEach(([key, value]) => {
AverageDefinitions_AveragesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
if (message.samples !== undefined) {
@@ -122,13 +122,10 @@ export const AverageDefinitions: MessageFns<AverageDefinitions> = {
fromJSON(object: any): AverageDefinitions {
return {
averages: isObject(object.averages)
? (globalThis.Object.entries(object.averages) as [string, any][]).reduce(
(acc: { [key: number]: AverageDefinitionsEntry }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = AverageDefinitionsEntry.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.averages).reduce<{ [key: number]: AverageDefinitionsEntry }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = AverageDefinitionsEntry.fromJSON(value);
return acc;
}, {})
: {},
samples: isSet(object.samples) ? Samples.fromJSON(object.samples) : undefined,
time: isSet(object.time) ? globalThis.Number(object.time) : 0,
@@ -138,7 +135,7 @@ export const AverageDefinitions: MessageFns<AverageDefinitions> = {
toJSON(message: AverageDefinitions): unknown {
const obj: any = {};
if (message.averages) {
const entries = globalThis.Object.entries(message.averages) as [string, AverageDefinitionsEntry][];
const entries = Object.entries(message.averages);
if (entries.length > 0) {
obj.averages = {};
entries.forEach(([k, v]) => {
@@ -160,8 +157,8 @@ export const AverageDefinitions: MessageFns<AverageDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<AverageDefinitions>, I>>(object: I): AverageDefinitions {
const message = createBaseAverageDefinitions();
message.averages = (globalThis.Object.entries(object.averages ?? {}) as [string, AverageDefinitionsEntry][]).reduce(
(acc: { [key: number]: AverageDefinitionsEntry }, [key, value]: [string, AverageDefinitionsEntry]) => {
message.averages = Object.entries(object.averages ?? {}).reduce<{ [key: number]: AverageDefinitionsEntry }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = AverageDefinitionsEntry.fromPartial(value);
}
@@ -620,59 +617,25 @@ export const AverageDefinitionsAllStats: MessageFns<AverageDefinitionsAllStats>
fromJSON(object: any): AverageDefinitionsAllStats {
return {
battles: isSet(object.battles) ? globalThis.Number(object.battles) : 0,
capture_points: isSet(object.capturePoints)
? globalThis.Number(object.capturePoints)
: isSet(object.capture_points)
? globalThis.Number(object.capture_points)
: 0,
damage_dealt: isSet(object.damageDealt)
? globalThis.Number(object.damageDealt)
: isSet(object.damage_dealt)
? globalThis.Number(object.damage_dealt)
: 0,
damage_received: isSet(object.damageReceived)
? globalThis.Number(object.damageReceived)
: isSet(object.damage_received)
? globalThis.Number(object.damage_received)
: 0,
dropped_capture_points: isSet(object.droppedCapturePoints)
? globalThis.Number(object.droppedCapturePoints)
: isSet(object.dropped_capture_points)
capture_points: isSet(object.capture_points) ? globalThis.Number(object.capture_points) : 0,
damage_dealt: isSet(object.damage_dealt) ? globalThis.Number(object.damage_dealt) : 0,
damage_received: isSet(object.damage_received) ? globalThis.Number(object.damage_received) : 0,
dropped_capture_points: isSet(object.dropped_capture_points)
? globalThis.Number(object.dropped_capture_points)
: 0,
frags: isSet(object.frags) ? globalThis.Number(object.frags) : 0,
frags8p: isSet(object.frags8p) ? globalThis.Number(object.frags8p) : 0,
hits: isSet(object.hits) ? globalThis.Number(object.hits) : 0,
losses: isSet(object.losses) ? globalThis.Number(object.losses) : 0,
max_frags: isSet(object.maxFrags)
? globalThis.Number(object.maxFrags)
: isSet(object.max_frags)
? globalThis.Number(object.max_frags)
: 0,
max_xp: isSet(object.maxXp)
? globalThis.Number(object.maxXp)
: isSet(object.max_xp)
? globalThis.Number(object.max_xp)
: 0,
max_frags: isSet(object.max_frags) ? globalThis.Number(object.max_frags) : 0,
max_xp: isSet(object.max_xp) ? globalThis.Number(object.max_xp) : 0,
shots: isSet(object.shots) ? globalThis.Number(object.shots) : 0,
spotted: isSet(object.spotted) ? globalThis.Number(object.spotted) : 0,
survived_battles: isSet(object.survivedBattles)
? globalThis.Number(object.survivedBattles)
: isSet(object.survived_battles)
? globalThis.Number(object.survived_battles)
: 0,
win_and_survived: isSet(object.winAndSurvived)
? globalThis.Number(object.winAndSurvived)
: isSet(object.win_and_survived)
? globalThis.Number(object.win_and_survived)
: 0,
survived_battles: isSet(object.survived_battles) ? globalThis.Number(object.survived_battles) : 0,
win_and_survived: isSet(object.win_and_survived) ? globalThis.Number(object.win_and_survived) : 0,
wins: isSet(object.wins) ? globalThis.Number(object.wins) : 0,
xp: isSet(object.xp) ? globalThis.Number(object.xp) : 0,
battle_life_time: isSet(object.battleLifeTime)
? globalThis.Number(object.battleLifeTime)
: isSet(object.battle_life_time)
? globalThis.Number(object.battle_life_time)
: 0,
battle_life_time: isSet(object.battle_life_time) ? globalThis.Number(object.battle_life_time) : 0,
};
},
@@ -682,16 +645,16 @@ export const AverageDefinitionsAllStats: MessageFns<AverageDefinitionsAllStats>
obj.battles = message.battles;
}
if (message.capture_points !== 0) {
obj.capturePoints = message.capture_points;
obj.capture_points = message.capture_points;
}
if (message.damage_dealt !== 0) {
obj.damageDealt = message.damage_dealt;
obj.damage_dealt = message.damage_dealt;
}
if (message.damage_received !== 0) {
obj.damageReceived = message.damage_received;
obj.damage_received = message.damage_received;
}
if (message.dropped_capture_points !== 0) {
obj.droppedCapturePoints = message.dropped_capture_points;
obj.dropped_capture_points = message.dropped_capture_points;
}
if (message.frags !== 0) {
obj.frags = message.frags;
@@ -706,10 +669,10 @@ export const AverageDefinitionsAllStats: MessageFns<AverageDefinitionsAllStats>
obj.losses = message.losses;
}
if (message.max_frags !== 0) {
obj.maxFrags = message.max_frags;
obj.max_frags = message.max_frags;
}
if (message.max_xp !== 0) {
obj.maxXp = message.max_xp;
obj.max_xp = message.max_xp;
}
if (message.shots !== 0) {
obj.shots = message.shots;
@@ -718,10 +681,10 @@ export const AverageDefinitionsAllStats: MessageFns<AverageDefinitionsAllStats>
obj.spotted = message.spotted;
}
if (message.survived_battles !== 0) {
obj.survivedBattles = message.survived_battles;
obj.survived_battles = message.survived_battles;
}
if (message.win_and_survived !== 0) {
obj.winAndSurvived = message.win_and_survived;
obj.win_and_survived = message.win_and_survived;
}
if (message.wins !== 0) {
obj.wins = message.wins;
@@ -730,7 +693,7 @@ export const AverageDefinitionsAllStats: MessageFns<AverageDefinitionsAllStats>
obj.xp = message.xp;
}
if (message.battle_life_time !== 0) {
obj.battleLifeTime = message.battle_life_time;
obj.battle_life_time = message.battle_life_time;
}
return obj;
},
@@ -866,16 +829,12 @@ export const Samples: MessageFns<Samples> = {
fromJSON(object: any): Samples {
return {
d_1: isSet(object.d1) ? globalThis.Number(object.d1) : isSet(object.d_1) ? globalThis.Number(object.d_1) : 0,
d_7: isSet(object.d7) ? globalThis.Number(object.d7) : isSet(object.d_7) ? globalThis.Number(object.d_7) : 0,
d_30: isSet(object.d30) ? globalThis.Number(object.d30) : isSet(object.d_30) ? globalThis.Number(object.d_30) : 0,
d_60: isSet(object.d60) ? globalThis.Number(object.d60) : isSet(object.d_60) ? globalThis.Number(object.d_60) : 0,
d_90: isSet(object.d90) ? globalThis.Number(object.d90) : isSet(object.d_90) ? globalThis.Number(object.d_90) : 0,
d_120: isSet(object.d120)
? globalThis.Number(object.d120)
: isSet(object.d_120)
? globalThis.Number(object.d_120)
: 0,
d_1: isSet(object.d_1) ? globalThis.Number(object.d_1) : 0,
d_7: isSet(object.d_7) ? globalThis.Number(object.d_7) : 0,
d_30: isSet(object.d_30) ? globalThis.Number(object.d_30) : 0,
d_60: isSet(object.d_60) ? globalThis.Number(object.d_60) : 0,
d_90: isSet(object.d_90) ? globalThis.Number(object.d_90) : 0,
d_120: isSet(object.d_120) ? globalThis.Number(object.d_120) : 0,
total: isSet(object.total) ? globalThis.Number(object.total) : 0,
};
},
@@ -883,22 +842,22 @@ export const Samples: MessageFns<Samples> = {
toJSON(message: Samples): unknown {
const obj: any = {};
if (message.d_1 !== 0) {
obj.d1 = Math.round(message.d_1);
obj.d_1 = Math.round(message.d_1);
}
if (message.d_7 !== 0) {
obj.d7 = Math.round(message.d_7);
obj.d_7 = Math.round(message.d_7);
}
if (message.d_30 !== 0) {
obj.d30 = Math.round(message.d_30);
obj.d_30 = Math.round(message.d_30);
}
if (message.d_60 !== 0) {
obj.d60 = Math.round(message.d_60);
obj.d_60 = Math.round(message.d_60);
}
if (message.d_90 !== 0) {
obj.d90 = Math.round(message.d_90);
obj.d_90 = Math.round(message.d_90);
}
if (message.d_120 !== 0) {
obj.d120 = Math.round(message.d_120);
obj.d_120 = Math.round(message.d_120);
}
if (message.total !== 0) {
obj.total = Math.round(message.total);
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: camouflage_definitions.proto
/* eslint-disable */
@@ -32,7 +32,7 @@ function createBaseCamouflageDefinitions(): CamouflageDefinitions {
export const CamouflageDefinitions: MessageFns<CamouflageDefinitions> = {
encode(message: CamouflageDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.camouflages).forEach(([key, value]: [string, Camouflage]) => {
Object.entries(message.camouflages).forEach(([key, value]) => {
CamouflageDefinitions_CamouflagesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -68,13 +68,10 @@ export const CamouflageDefinitions: MessageFns<CamouflageDefinitions> = {
fromJSON(object: any): CamouflageDefinitions {
return {
camouflages: isObject(object.camouflages)
? (globalThis.Object.entries(object.camouflages) as [string, any][]).reduce(
(acc: { [key: number]: Camouflage }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = Camouflage.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.camouflages).reduce<{ [key: number]: Camouflage }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = Camouflage.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -82,7 +79,7 @@ export const CamouflageDefinitions: MessageFns<CamouflageDefinitions> = {
toJSON(message: CamouflageDefinitions): unknown {
const obj: any = {};
if (message.camouflages) {
const entries = globalThis.Object.entries(message.camouflages) as [string, Camouflage][];
const entries = Object.entries(message.camouflages);
if (entries.length > 0) {
obj.camouflages = {};
entries.forEach(([k, v]) => {
@@ -98,8 +95,8 @@ export const CamouflageDefinitions: MessageFns<CamouflageDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<CamouflageDefinitions>, I>>(object: I): CamouflageDefinitions {
const message = createBaseCamouflageDefinitions();
message.camouflages = (globalThis.Object.entries(object.camouflages ?? {}) as [string, Camouflage][]).reduce(
(acc: { [key: number]: Camouflage }, [key, value]: [string, Camouflage]) => {
message.camouflages = Object.entries(object.camouflages ?? {}).reduce<{ [key: number]: Camouflage }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = Camouflage.fromPartial(value);
}
@@ -266,16 +263,8 @@ export const Camouflage: MessageFns<Camouflage> = {
return {
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
tank_name: isSet(object.tankName)
? I18nString.fromJSON(object.tankName)
: isSet(object.tank_name)
? I18nString.fromJSON(object.tank_name)
: undefined,
tank_name_full: isSet(object.tankNameFull)
? I18nString.fromJSON(object.tankNameFull)
: isSet(object.tank_name_full)
? I18nString.fromJSON(object.tank_name_full)
: undefined,
tank_name: isSet(object.tank_name) ? I18nString.fromJSON(object.tank_name) : undefined,
tank_name_full: isSet(object.tank_name_full) ? I18nString.fromJSON(object.tank_name_full) : undefined,
};
},
@@ -288,10 +277,10 @@ export const Camouflage: MessageFns<Camouflage> = {
obj.name = I18nString.toJSON(message.name);
}
if (message.tank_name !== undefined) {
obj.tankName = I18nString.toJSON(message.tank_name);
obj.tank_name = I18nString.toJSON(message.tank_name);
}
if (message.tank_name_full !== undefined) {
obj.tankNameFull = I18nString.toJSON(message.tank_name_full);
obj.tank_name_full = I18nString.toJSON(message.tank_name_full);
}
return obj;
},
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: consumable_definitions.proto
/* eslint-disable */
@@ -88,7 +88,7 @@ function createBaseConsumableDefinitions(): ConsumableDefinitions {
export const ConsumableDefinitions: MessageFns<ConsumableDefinitions> = {
encode(message: ConsumableDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.consumables).forEach(([key, value]: [string, Consumable]) => {
Object.entries(message.consumables).forEach(([key, value]) => {
ConsumableDefinitions_ConsumablesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -124,13 +124,10 @@ export const ConsumableDefinitions: MessageFns<ConsumableDefinitions> = {
fromJSON(object: any): ConsumableDefinitions {
return {
consumables: isObject(object.consumables)
? (globalThis.Object.entries(object.consumables) as [string, any][]).reduce(
(acc: { [key: number]: Consumable }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = Consumable.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.consumables).reduce<{ [key: number]: Consumable }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = Consumable.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -138,7 +135,7 @@ export const ConsumableDefinitions: MessageFns<ConsumableDefinitions> = {
toJSON(message: ConsumableDefinitions): unknown {
const obj: any = {};
if (message.consumables) {
const entries = globalThis.Object.entries(message.consumables) as [string, Consumable][];
const entries = Object.entries(message.consumables);
if (entries.length > 0) {
obj.consumables = {};
entries.forEach(([k, v]) => {
@@ -154,8 +151,8 @@ export const ConsumableDefinitions: MessageFns<ConsumableDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<ConsumableDefinitions>, I>>(object: I): ConsumableDefinitions {
const message = createBaseConsumableDefinitions();
message.consumables = (globalThis.Object.entries(object.consumables ?? {}) as [string, Consumable][]).reduce(
(acc: { [key: number]: Consumable }, [key, value]: [string, Consumable]) => {
message.consumables = Object.entries(object.consumables ?? {}).reduce<{ [key: number]: Consumable }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = Consumable.fromPartial(value);
}
@@ -357,11 +354,7 @@ export const Consumable: MessageFns<Consumable> = {
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
cooldown: isSet(object.cooldown) ? globalThis.Number(object.cooldown) : 0,
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
game_mode_exclusive: isSet(object.gameModeExclusive)
? globalThis.Boolean(object.gameModeExclusive)
: isSet(object.game_mode_exclusive)
? globalThis.Boolean(object.game_mode_exclusive)
: false,
game_mode_exclusive: isSet(object.game_mode_exclusive) ? globalThis.Boolean(object.game_mode_exclusive) : false,
include: globalThis.Array.isArray(object?.include)
? object.include.map((e: any) => ConsumableTankFilter.fromJSON(e))
: [],
@@ -386,7 +379,7 @@ export const Consumable: MessageFns<Consumable> = {
obj.duration = message.duration;
}
if (message.game_mode_exclusive !== false) {
obj.gameModeExclusive = message.game_mode_exclusive;
obj.game_mode_exclusive = message.game_mode_exclusive;
}
if (message.include?.length) {
obj.include = message.include.map((e) => ConsumableTankFilter.toJSON(e));
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: equipment_definitions.proto
/* eslint-disable */
@@ -45,10 +45,10 @@ function createBaseEquipmentDefinitions(): EquipmentDefinitions {
export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
encode(message: EquipmentDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.presets).forEach(([key, value]: [string, EquipmentPreset]) => {
Object.entries(message.presets).forEach(([key, value]) => {
EquipmentDefinitions_PresetsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
globalThis.Object.entries(message.equipments).forEach(([key, value]: [string, Equipment]) => {
Object.entries(message.equipments).forEach(([key, value]) => {
EquipmentDefinitions_EquipmentsEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();
});
return writer;
@@ -95,22 +95,16 @@ export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
fromJSON(object: any): EquipmentDefinitions {
return {
presets: isObject(object.presets)
? (globalThis.Object.entries(object.presets) as [string, any][]).reduce(
(acc: { [key: string]: EquipmentPreset }, [key, value]: [string, any]) => {
acc[key] = EquipmentPreset.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.presets).reduce<{ [key: string]: EquipmentPreset }>((acc, [key, value]) => {
acc[key] = EquipmentPreset.fromJSON(value);
return acc;
}, {})
: {},
equipments: isObject(object.equipments)
? (globalThis.Object.entries(object.equipments) as [string, any][]).reduce(
(acc: { [key: number]: Equipment }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = Equipment.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.equipments).reduce<{ [key: number]: Equipment }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = Equipment.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -118,7 +112,7 @@ export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
toJSON(message: EquipmentDefinitions): unknown {
const obj: any = {};
if (message.presets) {
const entries = globalThis.Object.entries(message.presets) as [string, EquipmentPreset][];
const entries = Object.entries(message.presets);
if (entries.length > 0) {
obj.presets = {};
entries.forEach(([k, v]) => {
@@ -127,7 +121,7 @@ export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
}
}
if (message.equipments) {
const entries = globalThis.Object.entries(message.equipments) as [string, Equipment][];
const entries = Object.entries(message.equipments);
if (entries.length > 0) {
obj.equipments = {};
entries.forEach(([k, v]) => {
@@ -143,8 +137,8 @@ export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<EquipmentDefinitions>, I>>(object: I): EquipmentDefinitions {
const message = createBaseEquipmentDefinitions();
message.presets = (globalThis.Object.entries(object.presets ?? {}) as [string, EquipmentPreset][]).reduce(
(acc: { [key: string]: EquipmentPreset }, [key, value]: [string, EquipmentPreset]) => {
message.presets = Object.entries(object.presets ?? {}).reduce<{ [key: string]: EquipmentPreset }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[key] = EquipmentPreset.fromPartial(value);
}
@@ -152,8 +146,8 @@ export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
},
{},
);
message.equipments = (globalThis.Object.entries(object.equipments ?? {}) as [string, Equipment][]).reduce(
(acc: { [key: number]: Equipment }, [key, value]: [string, Equipment]) => {
message.equipments = Object.entries(object.equipments ?? {}).reduce<{ [key: number]: Equipment }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = Equipment.fromPartial(value);
}
+2 -2
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: gallery.proto
/* eslint-disable */
@@ -7,7 +7,7 @@ import "i18n.proto";
message GameDefinitions {
required string version = 1;
repeated string nations = 2;
map<uint32, GameMode> gameModes = 3;
map<string, GameMode> gameModes = 3;
map<uint32, GameModeRole> roles = 4;
}
+34 -43
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: game_definitions.proto
/* eslint-disable */
@@ -13,12 +13,12 @@ export const protobufPackage = "blitzkit";
export interface GameDefinitions {
version: string;
nations: string[];
gameModes: { [key: number]: GameMode };
gameModes: { [key: string]: GameMode };
roles: { [key: number]: GameModeRole };
}
export interface GameDefinitions_GameModesEntry {
key: number;
key: string;
value: GameMode | undefined;
}
@@ -48,10 +48,10 @@ export const GameDefinitions: MessageFns<GameDefinitions> = {
for (const v of message.nations) {
writer.uint32(18).string(v!);
}
globalThis.Object.entries(message.gameModes).forEach(([key, value]: [string, GameMode]) => {
Object.entries(message.gameModes).forEach(([key, value]) => {
GameDefinitions_GameModesEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join();
});
globalThis.Object.entries(message.roles).forEach(([key, value]: [string, GameModeRole]) => {
Object.entries(message.roles).forEach(([key, value]) => {
GameDefinitions_RolesEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
});
return writer;
@@ -116,22 +116,16 @@ export const GameDefinitions: MessageFns<GameDefinitions> = {
version: isSet(object.version) ? globalThis.String(object.version) : "",
nations: globalThis.Array.isArray(object?.nations) ? object.nations.map((e: any) => globalThis.String(e)) : [],
gameModes: isObject(object.gameModes)
? (globalThis.Object.entries(object.gameModes) as [string, any][]).reduce(
(acc: { [key: number]: GameMode }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = GameMode.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.gameModes).reduce<{ [key: string]: GameMode }>((acc, [key, value]) => {
acc[key] = GameMode.fromJSON(value);
return acc;
}, {})
: {},
roles: isObject(object.roles)
? (globalThis.Object.entries(object.roles) as [string, any][]).reduce(
(acc: { [key: number]: GameModeRole }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = GameModeRole.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.roles).reduce<{ [key: number]: GameModeRole }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = GameModeRole.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -145,7 +139,7 @@ export const GameDefinitions: MessageFns<GameDefinitions> = {
obj.nations = message.nations;
}
if (message.gameModes) {
const entries = globalThis.Object.entries(message.gameModes) as [string, GameMode][];
const entries = Object.entries(message.gameModes);
if (entries.length > 0) {
obj.gameModes = {};
entries.forEach(([k, v]) => {
@@ -154,7 +148,7 @@ export const GameDefinitions: MessageFns<GameDefinitions> = {
}
}
if (message.roles) {
const entries = globalThis.Object.entries(message.roles) as [string, GameModeRole][];
const entries = Object.entries(message.roles);
if (entries.length > 0) {
obj.roles = {};
entries.forEach(([k, v]) => {
@@ -172,36 +166,33 @@ export const GameDefinitions: MessageFns<GameDefinitions> = {
const message = createBaseGameDefinitions();
message.version = object.version ?? "";
message.nations = object.nations?.map((e) => e) || [];
message.gameModes = (globalThis.Object.entries(object.gameModes ?? {}) as [string, GameMode][]).reduce(
(acc: { [key: number]: GameMode }, [key, value]: [string, GameMode]) => {
message.gameModes = Object.entries(object.gameModes ?? {}).reduce<{ [key: string]: GameMode }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = GameMode.fromPartial(value);
}
return acc;
},
{},
);
message.roles = (globalThis.Object.entries(object.roles ?? {}) as [string, GameModeRole][]).reduce(
(acc: { [key: number]: GameModeRole }, [key, value]: [string, GameModeRole]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = GameModeRole.fromPartial(value);
acc[key] = GameMode.fromPartial(value);
}
return acc;
},
{},
);
message.roles = Object.entries(object.roles ?? {}).reduce<{ [key: number]: GameModeRole }>((acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = GameModeRole.fromPartial(value);
}
return acc;
}, {});
return message;
},
};
function createBaseGameDefinitions_GameModesEntry(): GameDefinitions_GameModesEntry {
return { key: 0, value: undefined };
return { key: "", value: undefined };
}
export const GameDefinitions_GameModesEntry: MessageFns<GameDefinitions_GameModesEntry> = {
encode(message: GameDefinitions_GameModesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.key !== 0) {
writer.uint32(8).uint32(message.key);
if (message.key !== "") {
writer.uint32(10).string(message.key);
}
if (message.value !== undefined) {
GameMode.encode(message.value, writer.uint32(18).fork()).join();
@@ -217,11 +208,11 @@ export const GameDefinitions_GameModesEntry: MessageFns<GameDefinitions_GameMode
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 8) {
if (tag !== 10) {
break;
}
message.key = reader.uint32();
message.key = reader.string();
continue;
}
case 2: {
@@ -243,15 +234,15 @@ export const GameDefinitions_GameModesEntry: MessageFns<GameDefinitions_GameMode
fromJSON(object: any): GameDefinitions_GameModesEntry {
return {
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
key: isSet(object.key) ? globalThis.String(object.key) : "",
value: isSet(object.value) ? GameMode.fromJSON(object.value) : undefined,
};
},
toJSON(message: GameDefinitions_GameModesEntry): unknown {
const obj: any = {};
if (message.key !== 0) {
obj.key = Math.round(message.key);
if (message.key !== "") {
obj.key = message.key;
}
if (message.value !== undefined) {
obj.value = GameMode.toJSON(message.value);
@@ -266,7 +257,7 @@ export const GameDefinitions_GameModesEntry: MessageFns<GameDefinitions_GameMode
object: I,
): GameDefinitions_GameModesEntry {
const message = createBaseGameDefinitions_GameModesEntry();
message.key = object.key ?? 0;
message.key = object.key ?? "";
message.value = (object.value !== undefined && object.value !== null)
? GameMode.fromPartial(object.value)
: undefined;
+14 -20
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: i18n.proto
/* eslint-disable */
@@ -24,7 +24,7 @@ function createBaseI18nString(): I18nString {
export const I18nString: MessageFns<I18nString> = {
encode(message: I18nString, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.locales).forEach(([key, value]: [string, string]) => {
Object.entries(message.locales).forEach(([key, value]) => {
I18nString_LocalesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -60,13 +60,10 @@ export const I18nString: MessageFns<I18nString> = {
fromJSON(object: any): I18nString {
return {
locales: isObject(object.locales)
? (globalThis.Object.entries(object.locales) as [string, any][]).reduce(
(acc: { [key: string]: string }, [key, value]: [string, any]) => {
acc[key] = globalThis.String(value);
return acc;
},
{},
)
? Object.entries(object.locales).reduce<{ [key: string]: string }>((acc, [key, value]) => {
acc[key] = String(value);
return acc;
}, {})
: {},
};
},
@@ -74,7 +71,7 @@ export const I18nString: MessageFns<I18nString> = {
toJSON(message: I18nString): unknown {
const obj: any = {};
if (message.locales) {
const entries = globalThis.Object.entries(message.locales) as [string, string][];
const entries = Object.entries(message.locales);
if (entries.length > 0) {
obj.locales = {};
entries.forEach(([k, v]) => {
@@ -90,15 +87,12 @@ export const I18nString: MessageFns<I18nString> = {
},
fromPartial<I extends Exact<DeepPartial<I18nString>, I>>(object: I): I18nString {
const message = createBaseI18nString();
message.locales = (globalThis.Object.entries(object.locales ?? {}) as [string, string][]).reduce(
(acc: { [key: string]: string }, [key, value]: [string, string]) => {
if (value !== undefined) {
acc[key] = globalThis.String(value);
}
return acc;
},
{},
);
message.locales = Object.entries(object.locales ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
if (value !== undefined) {
acc[key] = globalThis.String(value);
}
return acc;
}, {});
return message;
},
};
+14 -20
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: map_definitions.proto
/* eslint-disable */
@@ -30,7 +30,7 @@ function createBaseMapDefinitions(): MapDefinitions {
export const MapDefinitions: MessageFns<MapDefinitions> = {
encode(message: MapDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.maps).forEach(([key, value]: [string, MapDefinition]) => {
Object.entries(message.maps).forEach(([key, value]) => {
MapDefinitions_MapsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -66,13 +66,10 @@ export const MapDefinitions: MessageFns<MapDefinitions> = {
fromJSON(object: any): MapDefinitions {
return {
maps: isObject(object.maps)
? (globalThis.Object.entries(object.maps) as [string, any][]).reduce(
(acc: { [key: number]: MapDefinition }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = MapDefinition.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.maps).reduce<{ [key: number]: MapDefinition }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = MapDefinition.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -80,7 +77,7 @@ export const MapDefinitions: MessageFns<MapDefinitions> = {
toJSON(message: MapDefinitions): unknown {
const obj: any = {};
if (message.maps) {
const entries = globalThis.Object.entries(message.maps) as [string, MapDefinition][];
const entries = Object.entries(message.maps);
if (entries.length > 0) {
obj.maps = {};
entries.forEach(([k, v]) => {
@@ -96,15 +93,12 @@ export const MapDefinitions: MessageFns<MapDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<MapDefinitions>, I>>(object: I): MapDefinitions {
const message = createBaseMapDefinitions();
message.maps = (globalThis.Object.entries(object.maps ?? {}) as [string, MapDefinition][]).reduce(
(acc: { [key: number]: MapDefinition }, [key, value]: [string, MapDefinition]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = MapDefinition.fromPartial(value);
}
return acc;
},
{},
);
message.maps = Object.entries(object.maps ?? {}).reduce<{ [key: number]: MapDefinition }>((acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = MapDefinition.fromPartial(value);
}
return acc;
}, {});
return message;
},
};
+56 -97
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: model_definitions.proto
/* eslint-disable */
@@ -116,7 +116,7 @@ function createBaseModelDefinitions(): ModelDefinitions {
export const ModelDefinitions: MessageFns<ModelDefinitions> = {
encode(message: ModelDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.models).forEach(([key, value]: [string, ModelDefinition]) => {
Object.entries(message.models).forEach(([key, value]) => {
ModelDefinitions_ModelsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -152,13 +152,10 @@ export const ModelDefinitions: MessageFns<ModelDefinitions> = {
fromJSON(object: any): ModelDefinitions {
return {
models: isObject(object.models)
? (globalThis.Object.entries(object.models) as [string, any][]).reduce(
(acc: { [key: number]: ModelDefinition }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = ModelDefinition.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.models).reduce<{ [key: number]: ModelDefinition }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = ModelDefinition.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -166,7 +163,7 @@ export const ModelDefinitions: MessageFns<ModelDefinitions> = {
toJSON(message: ModelDefinitions): unknown {
const obj: any = {};
if (message.models) {
const entries = globalThis.Object.entries(message.models) as [string, ModelDefinition][];
const entries = Object.entries(message.models);
if (entries.length > 0) {
obj.models = {};
entries.forEach(([k, v]) => {
@@ -182,8 +179,8 @@ export const ModelDefinitions: MessageFns<ModelDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<ModelDefinitions>, I>>(object: I): ModelDefinitions {
const message = createBaseModelDefinitions();
message.models = (globalThis.Object.entries(object.models ?? {}) as [string, ModelDefinition][]).reduce(
(acc: { [key: number]: ModelDefinition }, [key, value]: [string, ModelDefinition]) => {
message.models = Object.entries(object.models ?? {}).reduce<{ [key: number]: ModelDefinition }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = ModelDefinition.fromPartial(value);
}
@@ -295,10 +292,10 @@ export const ModelDefinition: MessageFns<ModelDefinition> = {
if (message.initial_turret_rotation !== undefined) {
InitialTurretRotation.encode(message.initial_turret_rotation, writer.uint32(26).fork()).join();
}
globalThis.Object.entries(message.turrets).forEach(([key, value]: [string, TurretModelDefinition]) => {
Object.entries(message.turrets).forEach(([key, value]) => {
ModelDefinition_TurretsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
});
globalThis.Object.entries(message.tracks).forEach(([key, value]: [string, TrackModelDefinition]) => {
Object.entries(message.tracks).forEach(([key, value]) => {
ModelDefinition_TracksEntry.encode({ key: key as any, value }, writer.uint32(42).fork()).join();
});
if (message.bounding_box !== undefined) {
@@ -380,39 +377,23 @@ export const ModelDefinition: MessageFns<ModelDefinition> = {
fromJSON(object: any): ModelDefinition {
return {
armor: isSet(object.armor) ? Armor.fromJSON(object.armor) : undefined,
turret_origin: isSet(object.turretOrigin)
? Vector3.fromJSON(object.turretOrigin)
: isSet(object.turret_origin)
? Vector3.fromJSON(object.turret_origin)
: undefined,
initial_turret_rotation: isSet(object.initialTurretRotation)
? InitialTurretRotation.fromJSON(object.initialTurretRotation)
: isSet(object.initial_turret_rotation)
turret_origin: isSet(object.turret_origin) ? Vector3.fromJSON(object.turret_origin) : undefined,
initial_turret_rotation: isSet(object.initial_turret_rotation)
? InitialTurretRotation.fromJSON(object.initial_turret_rotation)
: undefined,
turrets: isObject(object.turrets)
? (globalThis.Object.entries(object.turrets) as [string, any][]).reduce(
(acc: { [key: number]: TurretModelDefinition }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = TurretModelDefinition.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.turrets).reduce<{ [key: number]: TurretModelDefinition }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = TurretModelDefinition.fromJSON(value);
return acc;
}, {})
: {},
tracks: isObject(object.tracks)
? (globalThis.Object.entries(object.tracks) as [string, any][]).reduce(
(acc: { [key: number]: TrackModelDefinition }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = TrackModelDefinition.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.tracks).reduce<{ [key: number]: TrackModelDefinition }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = TrackModelDefinition.fromJSON(value);
return acc;
}, {})
: {},
bounding_box: isSet(object.boundingBox)
? BoundingBox.fromJSON(object.boundingBox)
: isSet(object.bounding_box)
? BoundingBox.fromJSON(object.bounding_box)
: undefined,
bounding_box: isSet(object.bounding_box) ? BoundingBox.fromJSON(object.bounding_box) : undefined,
};
},
@@ -422,13 +403,13 @@ export const ModelDefinition: MessageFns<ModelDefinition> = {
obj.armor = Armor.toJSON(message.armor);
}
if (message.turret_origin !== undefined) {
obj.turretOrigin = Vector3.toJSON(message.turret_origin);
obj.turret_origin = Vector3.toJSON(message.turret_origin);
}
if (message.initial_turret_rotation !== undefined) {
obj.initialTurretRotation = InitialTurretRotation.toJSON(message.initial_turret_rotation);
obj.initial_turret_rotation = InitialTurretRotation.toJSON(message.initial_turret_rotation);
}
if (message.turrets) {
const entries = globalThis.Object.entries(message.turrets) as [string, TurretModelDefinition][];
const entries = Object.entries(message.turrets);
if (entries.length > 0) {
obj.turrets = {};
entries.forEach(([k, v]) => {
@@ -437,7 +418,7 @@ export const ModelDefinition: MessageFns<ModelDefinition> = {
}
}
if (message.tracks) {
const entries = globalThis.Object.entries(message.tracks) as [string, TrackModelDefinition][];
const entries = Object.entries(message.tracks);
if (entries.length > 0) {
obj.tracks = {};
entries.forEach(([k, v]) => {
@@ -446,7 +427,7 @@ export const ModelDefinition: MessageFns<ModelDefinition> = {
}
}
if (message.bounding_box !== undefined) {
obj.boundingBox = BoundingBox.toJSON(message.bounding_box);
obj.bounding_box = BoundingBox.toJSON(message.bounding_box);
}
return obj;
},
@@ -464,8 +445,8 @@ export const ModelDefinition: MessageFns<ModelDefinition> = {
(object.initial_turret_rotation !== undefined && object.initial_turret_rotation !== null)
? InitialTurretRotation.fromPartial(object.initial_turret_rotation)
: undefined;
message.turrets = (globalThis.Object.entries(object.turrets ?? {}) as [string, TurretModelDefinition][]).reduce(
(acc: { [key: number]: TurretModelDefinition }, [key, value]: [string, TurretModelDefinition]) => {
message.turrets = Object.entries(object.turrets ?? {}).reduce<{ [key: number]: TurretModelDefinition }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = TurretModelDefinition.fromPartial(value);
}
@@ -473,8 +454,8 @@ export const ModelDefinition: MessageFns<ModelDefinition> = {
},
{},
);
message.tracks = (globalThis.Object.entries(object.tracks ?? {}) as [string, TrackModelDefinition][]).reduce(
(acc: { [key: number]: TrackModelDefinition }, [key, value]: [string, TrackModelDefinition]) => {
message.tracks = Object.entries(object.tracks ?? {}).reduce<{ [key: number]: TrackModelDefinition }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = TrackModelDefinition.fromPartial(value);
}
@@ -651,7 +632,7 @@ function createBaseArmor(): Armor {
export const Armor: MessageFns<Armor> = {
encode(message: Armor, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.thickness).forEach(([key, value]: [string, number]) => {
Object.entries(message.thickness).forEach(([key, value]) => {
Armor_ThicknessEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
for (const v of message.spaced) {
@@ -708,13 +689,10 @@ export const Armor: MessageFns<Armor> = {
fromJSON(object: any): Armor {
return {
thickness: isObject(object.thickness)
? (globalThis.Object.entries(object.thickness) as [string, any][]).reduce(
(acc: { [key: number]: number }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = globalThis.Number(value);
return acc;
},
{},
)
? Object.entries(object.thickness).reduce<{ [key: number]: number }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = Number(value);
return acc;
}, {})
: {},
spaced: globalThis.Array.isArray(object?.spaced) ? object.spaced.map((e: any) => globalThis.Number(e)) : [],
};
@@ -723,7 +701,7 @@ export const Armor: MessageFns<Armor> = {
toJSON(message: Armor): unknown {
const obj: any = {};
if (message.thickness) {
const entries = globalThis.Object.entries(message.thickness) as [string, number][];
const entries = Object.entries(message.thickness);
if (entries.length > 0) {
obj.thickness = {};
entries.forEach(([k, v]) => {
@@ -742,8 +720,8 @@ export const Armor: MessageFns<Armor> = {
},
fromPartial<I extends Exact<DeepPartial<Armor>, I>>(object: I): Armor {
const message = createBaseArmor();
message.thickness = (globalThis.Object.entries(object.thickness ?? {}) as [string, number][]).reduce(
(acc: { [key: number]: number }, [key, value]: [string, number]) => {
message.thickness = Object.entries(object.thickness ?? {}).reduce<{ [key: number]: number }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = globalThis.Number(value);
}
@@ -1034,7 +1012,7 @@ export const TurretModelDefinition: MessageFns<TurretModelDefinition> = {
if (message.gun_origin !== undefined) {
Vector3.encode(message.gun_origin, writer.uint32(34).fork()).join();
}
globalThis.Object.entries(message.guns).forEach(([key, value]: [string, GunModelDefinition]) => {
Object.entries(message.guns).forEach(([key, value]) => {
TurretModelDefinition_GunsEntry.encode({ key: key as any, value }, writer.uint32(42).fork()).join();
});
if (message.yaw !== undefined) {
@@ -1112,30 +1090,15 @@ export const TurretModelDefinition: MessageFns<TurretModelDefinition> = {
fromJSON(object: any): TurretModelDefinition {
return {
bounding_box: isSet(object.boundingBox)
? BoundingBox.fromJSON(object.boundingBox)
: isSet(object.bounding_box)
? BoundingBox.fromJSON(object.bounding_box)
: undefined,
bounding_box: isSet(object.bounding_box) ? BoundingBox.fromJSON(object.bounding_box) : undefined,
armor: isSet(object.armor) ? Armor.fromJSON(object.armor) : undefined,
model_id: isSet(object.modelId)
? globalThis.Number(object.modelId)
: isSet(object.model_id)
? globalThis.Number(object.model_id)
: 0,
gun_origin: isSet(object.gunOrigin)
? Vector3.fromJSON(object.gunOrigin)
: isSet(object.gun_origin)
? Vector3.fromJSON(object.gun_origin)
: undefined,
model_id: isSet(object.model_id) ? globalThis.Number(object.model_id) : 0,
gun_origin: isSet(object.gun_origin) ? Vector3.fromJSON(object.gun_origin) : undefined,
guns: isObject(object.guns)
? (globalThis.Object.entries(object.guns) as [string, any][]).reduce(
(acc: { [key: number]: GunModelDefinition }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = GunModelDefinition.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.guns).reduce<{ [key: number]: GunModelDefinition }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = GunModelDefinition.fromJSON(value);
return acc;
}, {})
: {},
yaw: isSet(object.yaw) ? YawLimits.fromJSON(object.yaw) : undefined,
};
@@ -1144,19 +1107,19 @@ export const TurretModelDefinition: MessageFns<TurretModelDefinition> = {
toJSON(message: TurretModelDefinition): unknown {
const obj: any = {};
if (message.bounding_box !== undefined) {
obj.boundingBox = BoundingBox.toJSON(message.bounding_box);
obj.bounding_box = BoundingBox.toJSON(message.bounding_box);
}
if (message.armor !== undefined) {
obj.armor = Armor.toJSON(message.armor);
}
if (message.model_id !== 0) {
obj.modelId = Math.round(message.model_id);
obj.model_id = Math.round(message.model_id);
}
if (message.gun_origin !== undefined) {
obj.gunOrigin = Vector3.toJSON(message.gun_origin);
obj.gun_origin = Vector3.toJSON(message.gun_origin);
}
if (message.guns) {
const entries = globalThis.Object.entries(message.guns) as [string, GunModelDefinition][];
const entries = Object.entries(message.guns);
if (entries.length > 0) {
obj.guns = {};
entries.forEach(([k, v]) => {
@@ -1183,8 +1146,8 @@ export const TurretModelDefinition: MessageFns<TurretModelDefinition> = {
message.gun_origin = (object.gun_origin !== undefined && object.gun_origin !== null)
? Vector3.fromPartial(object.gun_origin)
: undefined;
message.guns = (globalThis.Object.entries(object.guns ?? {}) as [string, GunModelDefinition][]).reduce(
(acc: { [key: number]: GunModelDefinition }, [key, value]: [string, GunModelDefinition]) => {
message.guns = Object.entries(object.guns ?? {}).reduce<{ [key: number]: GunModelDefinition }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = GunModelDefinition.fromPartial(value);
}
@@ -1591,11 +1554,7 @@ export const GunModelDefinition: MessageFns<GunModelDefinition> = {
return {
armor: isSet(object.armor) ? Armor.fromJSON(object.armor) : undefined,
thickness: isSet(object.thickness) ? globalThis.Number(object.thickness) : 0,
model_id: isSet(object.modelId)
? globalThis.Number(object.modelId)
: isSet(object.model_id)
? globalThis.Number(object.model_id)
: 0,
model_id: isSet(object.model_id) ? globalThis.Number(object.model_id) : 0,
pitch: isSet(object.pitch) ? PitchLimits.fromJSON(object.pitch) : undefined,
mask: isSet(object.mask) ? globalThis.Number(object.mask) : 0,
};
@@ -1610,7 +1569,7 @@ export const GunModelDefinition: MessageFns<GunModelDefinition> = {
obj.thickness = message.thickness;
}
if (message.model_id !== 0) {
obj.modelId = Math.round(message.model_id);
obj.model_id = Math.round(message.model_id);
}
if (message.pitch !== undefined) {
obj.pitch = PitchLimits.toJSON(message.pitch);
+2 -2
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: popular_tanks.proto
/* eslint-disable */
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: provision_definitions.proto
/* eslint-disable */
@@ -35,7 +35,7 @@ function createBaseProvisionDefinitions(): ProvisionDefinitions {
export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
encode(message: ProvisionDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.provisions).forEach(([key, value]: [string, Provision]) => {
Object.entries(message.provisions).forEach(([key, value]) => {
ProvisionDefinitions_ProvisionsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -71,13 +71,10 @@ export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
fromJSON(object: any): ProvisionDefinitions {
return {
provisions: isObject(object.provisions)
? (globalThis.Object.entries(object.provisions) as [string, any][]).reduce(
(acc: { [key: number]: Provision }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = Provision.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.provisions).reduce<{ [key: number]: Provision }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = Provision.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -85,7 +82,7 @@ export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
toJSON(message: ProvisionDefinitions): unknown {
const obj: any = {};
if (message.provisions) {
const entries = globalThis.Object.entries(message.provisions) as [string, Provision][];
const entries = Object.entries(message.provisions);
if (entries.length > 0) {
obj.provisions = {};
entries.forEach(([k, v]) => {
@@ -101,8 +98,8 @@ export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<ProvisionDefinitions>, I>>(object: I): ProvisionDefinitions {
const message = createBaseProvisionDefinitions();
message.provisions = (globalThis.Object.entries(object.provisions ?? {}) as [string, Provision][]).reduce(
(acc: { [key: number]: Provision }, [key, value]: [string, Provision]) => {
message.provisions = Object.entries(object.provisions ?? {}).reduce<{ [key: number]: Provision }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = Provision.fromPartial(value);
}
@@ -292,11 +289,7 @@ export const Provision: MessageFns<Provision> = {
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
crew: isSet(object.crew) ? globalThis.Number(object.crew) : 0,
game_mode_exclusive: isSet(object.gameModeExclusive)
? globalThis.Boolean(object.gameModeExclusive)
: isSet(object.game_mode_exclusive)
? globalThis.Boolean(object.game_mode_exclusive)
: false,
game_mode_exclusive: isSet(object.game_mode_exclusive) ? globalThis.Boolean(object.game_mode_exclusive) : false,
include: globalThis.Array.isArray(object?.include)
? object.include.map((e: any) => ConsumableTankFilter.fromJSON(e))
: [],
@@ -318,7 +311,7 @@ export const Provision: MessageFns<Provision> = {
obj.crew = message.crew;
}
if (message.game_mode_exclusive !== false) {
obj.gameModeExclusive = message.game_mode_exclusive;
obj.game_mode_exclusive = message.game_mode_exclusive;
}
if (message.include?.length) {
obj.include = message.include.map((e) => ConsumableTankFilter.toJSON(e));
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: rating_leaderboard.proto
/* eslint-disable */
+16 -26
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: reviews.proto
/* eslint-disable */
@@ -34,7 +34,7 @@ function createBaseReviews(): Reviews {
export const Reviews: MessageFns<Reviews> = {
encode(message: Reviews, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.reviews).forEach(([key, value]: [string, Review]) => {
Object.entries(message.reviews).forEach(([key, value]) => {
Reviews_ReviewsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -70,13 +70,10 @@ export const Reviews: MessageFns<Reviews> = {
fromJSON(object: any): Reviews {
return {
reviews: isObject(object.reviews)
? (globalThis.Object.entries(object.reviews) as [string, any][]).reduce(
(acc: { [key: number]: Review }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = Review.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.reviews).reduce<{ [key: number]: Review }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = Review.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -84,7 +81,7 @@ export const Reviews: MessageFns<Reviews> = {
toJSON(message: Reviews): unknown {
const obj: any = {};
if (message.reviews) {
const entries = globalThis.Object.entries(message.reviews) as [string, Review][];
const entries = Object.entries(message.reviews);
if (entries.length > 0) {
obj.reviews = {};
entries.forEach(([k, v]) => {
@@ -100,15 +97,12 @@ export const Reviews: MessageFns<Reviews> = {
},
fromPartial<I extends Exact<DeepPartial<Reviews>, I>>(object: I): Reviews {
const message = createBaseReviews();
message.reviews = (globalThis.Object.entries(object.reviews ?? {}) as [string, Review][]).reduce(
(acc: { [key: number]: Review }, [key, value]: [string, Review]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = Review.fromPartial(value);
}
return acc;
},
{},
);
message.reviews = Object.entries(object.reviews ?? {}).reduce<{ [key: number]: Review }>((acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = Review.fromPartial(value);
}
return acc;
}, {});
return message;
},
};
@@ -240,11 +234,7 @@ export const Review: MessageFns<Review> = {
fromJSON(object: any): Review {
return {
last_updated: isSet(object.lastUpdated)
? globalThis.Number(object.lastUpdated)
: isSet(object.last_updated)
? globalThis.Number(object.last_updated)
: 0,
last_updated: isSet(object.last_updated) ? globalThis.Number(object.last_updated) : 0,
videos: globalThis.Array.isArray(object?.videos) ? object.videos.map((e: any) => Video.fromJSON(e)) : [],
};
},
@@ -252,7 +242,7 @@ export const Review: MessageFns<Review> = {
toJSON(message: Review): unknown {
const obj: any = {};
if (message.last_updated !== 0) {
obj.lastUpdated = message.last_updated;
obj.last_updated = message.last_updated;
}
if (message.videos?.length) {
obj.videos = message.videos.map((e) => Video.toJSON(e));
+14 -20
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: skill_definitions.proto
/* eslint-disable */
@@ -29,7 +29,7 @@ function createBaseSkillDefinitions(): SkillDefinitions {
export const SkillDefinitions: MessageFns<SkillDefinitions> = {
encode(message: SkillDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.classes).forEach(([key, value]: [string, Skill]) => {
Object.entries(message.classes).forEach(([key, value]) => {
SkillDefinitions_ClassesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -65,13 +65,10 @@ export const SkillDefinitions: MessageFns<SkillDefinitions> = {
fromJSON(object: any): SkillDefinitions {
return {
classes: isObject(object.classes)
? (globalThis.Object.entries(object.classes) as [string, any][]).reduce(
(acc: { [key: number]: Skill }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = Skill.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.classes).reduce<{ [key: number]: Skill }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = Skill.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -79,7 +76,7 @@ export const SkillDefinitions: MessageFns<SkillDefinitions> = {
toJSON(message: SkillDefinitions): unknown {
const obj: any = {};
if (message.classes) {
const entries = globalThis.Object.entries(message.classes) as [string, Skill][];
const entries = Object.entries(message.classes);
if (entries.length > 0) {
obj.classes = {};
entries.forEach(([k, v]) => {
@@ -95,15 +92,12 @@ export const SkillDefinitions: MessageFns<SkillDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<SkillDefinitions>, I>>(object: I): SkillDefinitions {
const message = createBaseSkillDefinitions();
message.classes = (globalThis.Object.entries(object.classes ?? {}) as [string, Skill][]).reduce(
(acc: { [key: number]: Skill }, [key, value]: [string, Skill]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = Skill.fromPartial(value);
}
return acc;
},
{},
);
message.classes = Object.entries(object.classes ?? {}).reduce<{ [key: number]: Skill }>((acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = Skill.fromPartial(value);
}
return acc;
}, {});
return message;
},
};
@@ -11,7 +11,7 @@ message TankDefinitions {
message TankDefinition {
required uint32 id = 1;
required string slug = 2;
map<uint32, uint32> roles = 3;
map<string, uint32> roles = 3;
required bool fixed_camouflage = 5;
repeated int32 camouflages = 6;
repeated int32 ancestors = 7;
+126 -319
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// protoc-gen-ts_proto v2.7.7
// protoc v3.19.6
// source: tank_definitions.proto
/* eslint-disable */
@@ -262,7 +262,7 @@ export interface TankDefinitions_TanksEntry {
export interface TankDefinition {
id: number;
slug: string;
roles: { [key: number]: number };
roles: { [key: string]: number };
fixed_camouflage: boolean;
camouflages: number[];
ancestors: number[];
@@ -295,7 +295,7 @@ export interface TankDefinition {
}
export interface TankDefinition_RolesEntry {
key: number;
key: string;
value: number;
}
@@ -463,7 +463,7 @@ function createBaseTankDefinitions(): TankDefinitions {
export const TankDefinitions: MessageFns<TankDefinitions> = {
encode(message: TankDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
globalThis.Object.entries(message.tanks).forEach(([key, value]: [string, TankDefinition]) => {
Object.entries(message.tanks).forEach(([key, value]) => {
TankDefinitions_TanksEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
@@ -499,13 +499,10 @@ export const TankDefinitions: MessageFns<TankDefinitions> = {
fromJSON(object: any): TankDefinitions {
return {
tanks: isObject(object.tanks)
? (globalThis.Object.entries(object.tanks) as [string, any][]).reduce(
(acc: { [key: number]: TankDefinition }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = TankDefinition.fromJSON(value);
return acc;
},
{},
)
? Object.entries(object.tanks).reduce<{ [key: number]: TankDefinition }>((acc, [key, value]) => {
acc[globalThis.Number(key)] = TankDefinition.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -513,7 +510,7 @@ export const TankDefinitions: MessageFns<TankDefinitions> = {
toJSON(message: TankDefinitions): unknown {
const obj: any = {};
if (message.tanks) {
const entries = globalThis.Object.entries(message.tanks) as [string, TankDefinition][];
const entries = Object.entries(message.tanks);
if (entries.length > 0) {
obj.tanks = {};
entries.forEach(([k, v]) => {
@@ -529,8 +526,8 @@ export const TankDefinitions: MessageFns<TankDefinitions> = {
},
fromPartial<I extends Exact<DeepPartial<TankDefinitions>, I>>(object: I): TankDefinitions {
const message = createBaseTankDefinitions();
message.tanks = (globalThis.Object.entries(object.tanks ?? {}) as [string, TankDefinition][]).reduce(
(acc: { [key: number]: TankDefinition }, [key, value]: [string, TankDefinition]) => {
message.tanks = Object.entries(object.tanks ?? {}).reduce<{ [key: number]: TankDefinition }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = TankDefinition.fromPartial(value);
}
@@ -665,7 +662,7 @@ export const TankDefinition: MessageFns<TankDefinition> = {
if (message.slug !== "") {
writer.uint32(18).string(message.slug);
}
globalThis.Object.entries(message.roles).forEach(([key, value]: [string, number]) => {
Object.entries(message.roles).forEach(([key, value]) => {
TankDefinition_RolesEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join();
});
if (message.fixed_camouflage !== false) {
@@ -1068,19 +1065,12 @@ export const TankDefinition: MessageFns<TankDefinition> = {
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
roles: isObject(object.roles)
? (globalThis.Object.entries(object.roles) as [string, any][]).reduce(
(acc: { [key: number]: number }, [key, value]: [string, any]) => {
acc[globalThis.Number(key)] = globalThis.Number(value);
return acc;
},
{},
)
? Object.entries(object.roles).reduce<{ [key: string]: number }>((acc, [key, value]) => {
acc[key] = Number(value);
return acc;
}, {})
: {},
fixed_camouflage: isSet(object.fixedCamouflage)
? globalThis.Boolean(object.fixedCamouflage)
: isSet(object.fixed_camouflage)
? globalThis.Boolean(object.fixed_camouflage)
: false,
fixed_camouflage: isSet(object.fixed_camouflage) ? globalThis.Boolean(object.fixed_camouflage) : false,
camouflages: globalThis.Array.isArray(object?.camouflages)
? object.camouflages.map((e: any) => globalThis.Number(e))
: [],
@@ -1090,23 +1080,13 @@ export const TankDefinition: MessageFns<TankDefinition> = {
successors: globalThis.Array.isArray(object?.successors)
? object.successors.map((e: any) => globalThis.Number(e))
: [],
crew: globalThis.Array.isArray(object?.crew)
? object.crew.map((e: any) => Crew.fromJSON(e))
: [],
crew: globalThis.Array.isArray(object?.crew) ? object.crew.map((e: any) => Crew.fromJSON(e)) : [],
health: isSet(object.health) ? globalThis.Number(object.health) : 0,
nation: isSet(object.nation) ? globalThis.String(object.nation) : "",
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
type: isSet(object.type) ? tankTypeFromJSON(object.type) : 0,
max_consumables: isSet(object.maxConsumables)
? globalThis.Number(object.maxConsumables)
: isSet(object.max_consumables)
? globalThis.Number(object.max_consumables)
: 0,
max_provisions: isSet(object.maxProvisions)
? globalThis.Number(object.maxProvisions)
: isSet(object.max_provisions)
? globalThis.Number(object.max_provisions)
: 0,
max_consumables: isSet(object.max_consumables) ? globalThis.Number(object.max_consumables) : 0,
max_provisions: isSet(object.max_provisions) ? globalThis.Number(object.max_provisions) : 0,
tier: isSet(object.tier) ? globalThis.Number(object.tier) : 0,
class: isSet(object.class) ? tankClassFromJSON(object.class) : 0,
testing: isSet(object.testing) ? globalThis.Boolean(object.testing) : false,
@@ -1121,47 +1101,15 @@ export const TankDefinition: MessageFns<TankDefinition> = {
? object.tracks.map((e: any) => TrackDefinition.fromJSON(e))
: [],
price: isSet(object.price) ? TankPrice.fromJSON(object.price) : undefined,
research_cost: isSet(object.researchCost)
? ResearchCost.fromJSON(object.researchCost)
: isSet(object.research_cost)
? ResearchCost.fromJSON(object.research_cost)
: undefined,
speed_forwards: isSet(object.speedForwards)
? globalThis.Number(object.speedForwards)
: isSet(object.speed_forwards)
? globalThis.Number(object.speed_forwards)
: 0,
speed_backwards: isSet(object.speedBackwards)
? globalThis.Number(object.speedBackwards)
: isSet(object.speed_backwards)
? globalThis.Number(object.speed_backwards)
: 0,
camouflage_still: isSet(object.camouflageStill)
? globalThis.Number(object.camouflageStill)
: isSet(object.camouflage_still)
? globalThis.Number(object.camouflage_still)
: 0,
camouflage_moving: isSet(object.camouflageMoving)
? globalThis.Number(object.camouflageMoving)
: isSet(object.camouflage_moving)
? globalThis.Number(object.camouflage_moving)
: 0,
camouflage_on_fire: isSet(object.camouflageOnFire)
? globalThis.Number(object.camouflageOnFire)
: isSet(object.camouflage_on_fire)
? globalThis.Number(object.camouflage_on_fire)
: 0,
equipment_preset: isSet(object.equipmentPreset)
? globalThis.String(object.equipmentPreset)
: isSet(object.equipment_preset)
? globalThis.String(object.equipment_preset)
: "",
research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined,
speed_forwards: isSet(object.speed_forwards) ? globalThis.Number(object.speed_forwards) : 0,
speed_backwards: isSet(object.speed_backwards) ? globalThis.Number(object.speed_backwards) : 0,
camouflage_still: isSet(object.camouflage_still) ? globalThis.Number(object.camouflage_still) : 0,
camouflage_moving: isSet(object.camouflage_moving) ? globalThis.Number(object.camouflage_moving) : 0,
camouflage_on_fire: isSet(object.camouflage_on_fire) ? globalThis.Number(object.camouflage_on_fire) : 0,
equipment_preset: isSet(object.equipment_preset) ? globalThis.String(object.equipment_preset) : "",
weight: isSet(object.weight) ? globalThis.Number(object.weight) : 0,
dev_name: isSet(object.devName)
? globalThis.String(object.devName)
: isSet(object.dev_name)
? globalThis.String(object.dev_name)
: "",
dev_name: isSet(object.dev_name) ? globalThis.String(object.dev_name) : "",
equalizer: isSet(object.equalizer) ? Equalizer.fromJSON(object.equalizer) : undefined,
};
},
@@ -1175,7 +1123,7 @@ export const TankDefinition: MessageFns<TankDefinition> = {
obj.slug = message.slug;
}
if (message.roles) {
const entries = globalThis.Object.entries(message.roles) as [string, number][];
const entries = Object.entries(message.roles);
if (entries.length > 0) {
obj.roles = {};
entries.forEach(([k, v]) => {
@@ -1184,7 +1132,7 @@ export const TankDefinition: MessageFns<TankDefinition> = {
}
}
if (message.fixed_camouflage !== false) {
obj.fixedCamouflage = message.fixed_camouflage;
obj.fixed_camouflage = message.fixed_camouflage;
}
if (message.camouflages?.length) {
obj.camouflages = message.camouflages.map((e) => Math.round(e));
@@ -1211,10 +1159,10 @@ export const TankDefinition: MessageFns<TankDefinition> = {
obj.type = tankTypeToJSON(message.type);
}
if (message.max_consumables !== 0) {
obj.maxConsumables = Math.round(message.max_consumables);
obj.max_consumables = Math.round(message.max_consumables);
}
if (message.max_provisions !== 0) {
obj.maxProvisions = Math.round(message.max_provisions);
obj.max_provisions = Math.round(message.max_provisions);
}
if (message.tier !== 0) {
obj.tier = Math.round(message.tier);
@@ -1241,31 +1189,31 @@ export const TankDefinition: MessageFns<TankDefinition> = {
obj.price = TankPrice.toJSON(message.price);
}
if (message.research_cost !== undefined) {
obj.researchCost = ResearchCost.toJSON(message.research_cost);
obj.research_cost = ResearchCost.toJSON(message.research_cost);
}
if (message.speed_forwards !== 0) {
obj.speedForwards = message.speed_forwards;
obj.speed_forwards = message.speed_forwards;
}
if (message.speed_backwards !== 0) {
obj.speedBackwards = message.speed_backwards;
obj.speed_backwards = message.speed_backwards;
}
if (message.camouflage_still !== 0) {
obj.camouflageStill = message.camouflage_still;
obj.camouflage_still = message.camouflage_still;
}
if (message.camouflage_moving !== 0) {
obj.camouflageMoving = message.camouflage_moving;
obj.camouflage_moving = message.camouflage_moving;
}
if (message.camouflage_on_fire !== 0) {
obj.camouflageOnFire = message.camouflage_on_fire;
obj.camouflage_on_fire = message.camouflage_on_fire;
}
if (message.equipment_preset !== "") {
obj.equipmentPreset = message.equipment_preset;
obj.equipment_preset = message.equipment_preset;
}
if (message.weight !== 0) {
obj.weight = Math.round(message.weight);
}
if (message.dev_name !== "") {
obj.devName = message.dev_name;
obj.dev_name = message.dev_name;
}
if (message.equalizer !== undefined) {
obj.equalizer = Equalizer.toJSON(message.equalizer);
@@ -1280,15 +1228,12 @@ export const TankDefinition: MessageFns<TankDefinition> = {
const message = createBaseTankDefinition();
message.id = object.id ?? 0;
message.slug = object.slug ?? "";
message.roles = (globalThis.Object.entries(object.roles ?? {}) as [string, number][]).reduce(
(acc: { [key: number]: number }, [key, value]: [string, number]) => {
if (value !== undefined) {
acc[globalThis.Number(key)] = globalThis.Number(value);
}
return acc;
},
{},
);
message.roles = Object.entries(object.roles ?? {}).reduce<{ [key: string]: number }>((acc, [key, value]) => {
if (value !== undefined) {
acc[key] = globalThis.Number(value);
}
return acc;
}, {});
message.fixed_camouflage = object.fixed_camouflage ?? false;
message.camouflages = object.camouflages?.map((e) => e) || [];
message.ancestors = object.ancestors?.map((e) => e) || [];
@@ -1331,13 +1276,13 @@ export const TankDefinition: MessageFns<TankDefinition> = {
};
function createBaseTankDefinition_RolesEntry(): TankDefinition_RolesEntry {
return { key: 0, value: 0 };
return { key: "", value: 0 };
}
export const TankDefinition_RolesEntry: MessageFns<TankDefinition_RolesEntry> = {
encode(message: TankDefinition_RolesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.key !== 0) {
writer.uint32(8).uint32(message.key);
if (message.key !== "") {
writer.uint32(10).string(message.key);
}
if (message.value !== 0) {
writer.uint32(16).uint32(message.value);
@@ -1353,11 +1298,11 @@ export const TankDefinition_RolesEntry: MessageFns<TankDefinition_RolesEntry> =
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 8) {
if (tag !== 10) {
break;
}
message.key = reader.uint32();
message.key = reader.string();
continue;
}
case 2: {
@@ -1379,15 +1324,15 @@ export const TankDefinition_RolesEntry: MessageFns<TankDefinition_RolesEntry> =
fromJSON(object: any): TankDefinition_RolesEntry {
return {
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
key: isSet(object.key) ? globalThis.String(object.key) : "",
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
};
},
toJSON(message: TankDefinition_RolesEntry): unknown {
const obj: any = {};
if (message.key !== 0) {
obj.key = Math.round(message.key);
if (message.key !== "") {
obj.key = message.key;
}
if (message.value !== 0) {
obj.value = Math.round(message.value);
@@ -1400,7 +1345,7 @@ export const TankDefinition_RolesEntry: MessageFns<TankDefinition_RolesEntry> =
},
fromPartial<I extends Exact<DeepPartial<TankDefinition_RolesEntry>, I>>(object: I): TankDefinition_RolesEntry {
const message = createBaseTankDefinition_RolesEntry();
message.key = object.key ?? 0;
message.key = object.key ?? "";
message.value = object.value ?? 0;
return message;
},
@@ -1490,11 +1435,7 @@ export const Equalizer: MessageFns<Equalizer> = {
return {
health: isSet(object.health) ? globalThis.Number(object.health) : 0,
penetration: isSet(object.penetration) ? globalThis.Number(object.penetration) : 0,
module_health: isSet(object.moduleHealth)
? globalThis.Number(object.moduleHealth)
: isSet(object.module_health)
? globalThis.Number(object.module_health)
: 0,
module_health: isSet(object.module_health) ? globalThis.Number(object.module_health) : 0,
damage: isSet(object.damage) ? globalThis.Number(object.damage) : 0,
armor: isSet(object.armor) ? globalThis.Number(object.armor) : 0,
};
@@ -1509,7 +1450,7 @@ export const Equalizer: MessageFns<Equalizer> = {
obj.penetration = message.penetration;
}
if (message.module_health !== 0) {
obj.moduleHealth = message.module_health;
obj.module_health = message.module_health;
}
if (message.damage !== 0) {
obj.damage = message.damage;
@@ -1590,8 +1531,6 @@ export const ResearchCost: MessageFns<ResearchCost> = {
return {
research_cost_type: isSet(object.xp)
? { $case: "xp", value: globalThis.Number(object.xp) }
: isSet(object.seasonalTokens)
? { $case: "seasonal_tokens", value: ResearchCostSeasonalTokens.fromJSON(object.seasonalTokens) }
: isSet(object.seasonal_tokens)
? { $case: "seasonal_tokens", value: ResearchCostSeasonalTokens.fromJSON(object.seasonal_tokens) }
: undefined,
@@ -1603,7 +1542,7 @@ export const ResearchCost: MessageFns<ResearchCost> = {
if (message.research_cost_type?.$case === "xp") {
obj.xp = Math.round(message.research_cost_type.value);
} else if (message.research_cost_type?.$case === "seasonal_tokens") {
obj.seasonalTokens = ResearchCostSeasonalTokens.toJSON(message.research_cost_type.value);
obj.seasonal_tokens = ResearchCostSeasonalTokens.toJSON(message.research_cost_type.value);
}
return obj;
},
@@ -1962,44 +1901,14 @@ export const TrackDefinition: MessageFns<TrackDefinition> = {
tier: isSet(object.tier) ? globalThis.Number(object.tier) : 0,
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
weight: isSet(object.weight) ? globalThis.Number(object.weight) : 0,
traverse_speed: isSet(object.traverseSpeed)
? globalThis.Number(object.traverseSpeed)
: isSet(object.traverse_speed)
? globalThis.Number(object.traverse_speed)
: 0,
research_cost: isSet(object.researchCost)
? ResearchCost.fromJSON(object.researchCost)
: isSet(object.research_cost)
? ResearchCost.fromJSON(object.research_cost)
: undefined,
dispersion_move: isSet(object.dispersionMove)
? globalThis.Number(object.dispersionMove)
: isSet(object.dispersion_move)
? globalThis.Number(object.dispersion_move)
: 0,
dispersion_traverse: isSet(object.dispersionTraverse)
? globalThis.Number(object.dispersionTraverse)
: isSet(object.dispersion_traverse)
? globalThis.Number(object.dispersion_traverse)
: 0,
resistance_hard: isSet(object.resistanceHard)
? globalThis.Number(object.resistanceHard)
: isSet(object.resistance_hard)
? globalThis.Number(object.resistance_hard)
: 0,
resistance_medium: isSet(object.resistanceMedium)
? globalThis.Number(object.resistanceMedium)
: isSet(object.resistance_medium)
? globalThis.Number(object.resistance_medium)
: 0,
resistance_soft: isSet(object.resistanceSoft)
? globalThis.Number(object.resistanceSoft)
: isSet(object.resistance_soft)
? globalThis.Number(object.resistance_soft)
: 0,
unlocks: globalThis.Array.isArray(object?.unlocks)
? object.unlocks.map((e: any) => Unlock.fromJSON(e))
: [],
traverse_speed: isSet(object.traverse_speed) ? globalThis.Number(object.traverse_speed) : 0,
research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined,
dispersion_move: isSet(object.dispersion_move) ? globalThis.Number(object.dispersion_move) : 0,
dispersion_traverse: isSet(object.dispersion_traverse) ? globalThis.Number(object.dispersion_traverse) : 0,
resistance_hard: isSet(object.resistance_hard) ? globalThis.Number(object.resistance_hard) : 0,
resistance_medium: isSet(object.resistance_medium) ? globalThis.Number(object.resistance_medium) : 0,
resistance_soft: isSet(object.resistance_soft) ? globalThis.Number(object.resistance_soft) : 0,
unlocks: globalThis.Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => Unlock.fromJSON(e)) : [],
};
},
@@ -2018,25 +1927,25 @@ export const TrackDefinition: MessageFns<TrackDefinition> = {
obj.weight = Math.round(message.weight);
}
if (message.traverse_speed !== 0) {
obj.traverseSpeed = message.traverse_speed;
obj.traverse_speed = message.traverse_speed;
}
if (message.research_cost !== undefined) {
obj.researchCost = ResearchCost.toJSON(message.research_cost);
obj.research_cost = ResearchCost.toJSON(message.research_cost);
}
if (message.dispersion_move !== 0) {
obj.dispersionMove = message.dispersion_move;
obj.dispersion_move = message.dispersion_move;
}
if (message.dispersion_traverse !== 0) {
obj.dispersionTraverse = message.dispersion_traverse;
obj.dispersion_traverse = message.dispersion_traverse;
}
if (message.resistance_hard !== 0) {
obj.resistanceHard = message.resistance_hard;
obj.resistance_hard = message.resistance_hard;
}
if (message.resistance_medium !== 0) {
obj.resistanceMedium = message.resistance_medium;
obj.resistance_medium = message.resistance_medium;
}
if (message.resistance_soft !== 0) {
obj.resistanceSoft = message.resistance_soft;
obj.resistance_soft = message.resistance_soft;
}
if (message.unlocks?.length) {
obj.unlocks = message.unlocks.map((e) => Unlock.toJSON(e));
@@ -2195,17 +2104,9 @@ export const EngineDefinition: MessageFns<EngineDefinition> = {
return {
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
research_cost: isSet(object.researchCost)
? ResearchCost.fromJSON(object.researchCost)
: isSet(object.research_cost)
? ResearchCost.fromJSON(object.research_cost)
: undefined,
research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined,
tier: isSet(object.tier) ? globalThis.Number(object.tier) : 0,
fire_chance: isSet(object.fireChance)
? globalThis.Number(object.fireChance)
: isSet(object.fire_chance)
? globalThis.Number(object.fire_chance)
: 0,
fire_chance: isSet(object.fire_chance) ? globalThis.Number(object.fire_chance) : 0,
power: isSet(object.power) ? globalThis.Number(object.power) : 0,
weight: isSet(object.weight) ? globalThis.Number(object.weight) : 0,
unlocks: globalThis.Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => Unlock.fromJSON(e)) : [],
@@ -2221,13 +2122,13 @@ export const EngineDefinition: MessageFns<EngineDefinition> = {
obj.name = I18nString.toJSON(message.name);
}
if (message.research_cost !== undefined) {
obj.researchCost = ResearchCost.toJSON(message.research_cost);
obj.research_cost = ResearchCost.toJSON(message.research_cost);
}
if (message.tier !== 0) {
obj.tier = Math.round(message.tier);
}
if (message.fire_chance !== 0) {
obj.fireChance = message.fire_chance;
obj.fire_chance = message.fire_chance;
}
if (message.power !== 0) {
obj.power = Math.round(message.power);
@@ -2412,27 +2313,13 @@ export const TurretDefinition: MessageFns<TurretDefinition> = {
return {
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
health: isSet(object.health) ? globalThis.Number(object.health) : 0,
view_range: isSet(object.viewRange)
? globalThis.Number(object.viewRange)
: isSet(object.view_range)
? globalThis.Number(object.view_range)
: 0,
traverse_speed: isSet(object.traverseSpeed)
? globalThis.Number(object.traverseSpeed)
: isSet(object.traverse_speed)
? globalThis.Number(object.traverse_speed)
: 0,
research_cost: isSet(object.researchCost)
? ResearchCost.fromJSON(object.researchCost)
: isSet(object.research_cost)
? ResearchCost.fromJSON(object.research_cost)
: undefined,
view_range: isSet(object.view_range) ? globalThis.Number(object.view_range) : 0,
traverse_speed: isSet(object.traverse_speed) ? globalThis.Number(object.traverse_speed) : 0,
research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined,
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
tier: isSet(object.tier) ? globalThis.Number(object.tier) : 0,
weight: isSet(object.weight) ? globalThis.Number(object.weight) : 0,
guns: globalThis.Array.isArray(object?.guns)
? object.guns.map((e: any) => GunDefinition.fromJSON(e))
: [],
guns: globalThis.Array.isArray(object?.guns) ? object.guns.map((e: any) => GunDefinition.fromJSON(e)) : [],
unlocks: globalThis.Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => Unlock.fromJSON(e)) : [],
};
},
@@ -2446,13 +2333,13 @@ export const TurretDefinition: MessageFns<TurretDefinition> = {
obj.health = Math.round(message.health);
}
if (message.view_range !== 0) {
obj.viewRange = Math.round(message.view_range);
obj.view_range = Math.round(message.view_range);
}
if (message.traverse_speed !== 0) {
obj.traverseSpeed = message.traverse_speed;
obj.traverse_speed = message.traverse_speed;
}
if (message.research_cost !== undefined) {
obj.researchCost = ResearchCost.toJSON(message.research_cost);
obj.research_cost = ResearchCost.toJSON(message.research_cost);
}
if (message.name !== undefined) {
obj.name = I18nString.toJSON(message.name);
@@ -2768,75 +2655,29 @@ export const GunDefinition: MessageFns<GunDefinition> = {
return {
gun_type: isSet(object.regular)
? { $case: "regular", value: GunDefinitionRegular.fromJSON(object.regular) }
: isSet(object.autoLoader)
? { $case: "auto_loader", value: GunDefinitionAutoLoader.fromJSON(object.autoLoader) }
: isSet(object.auto_loader)
? { $case: "auto_loader", value: GunDefinitionAutoLoader.fromJSON(object.auto_loader) }
: isSet(object.autoReloader)
? { $case: "auto_reloader", value: GunDefinitionAutoReloader.fromJSON(object.autoReloader) }
: isSet(object.auto_reloader)
? { $case: "auto_reloader", value: GunDefinitionAutoReloader.fromJSON(object.auto_reloader) }
: undefined,
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
rotation_speed: isSet(object.rotationSpeed)
? globalThis.Number(object.rotationSpeed)
: isSet(object.rotation_speed)
? globalThis.Number(object.rotation_speed)
: 0,
research_cost: isSet(object.researchCost)
? ResearchCost.fromJSON(object.researchCost)
: isSet(object.research_cost)
? ResearchCost.fromJSON(object.research_cost)
: undefined,
rotation_speed: isSet(object.rotation_speed) ? globalThis.Number(object.rotation_speed) : 0,
research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined,
weight: isSet(object.weight) ? globalThis.Number(object.weight) : 0,
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
tier: isSet(object.tier) ? globalThis.Number(object.tier) : 0,
shells: globalThis.Array.isArray(object?.shells)
? object.shells.map((e: any) => ShellDefinition.fromJSON(e))
: [],
camouflage_loss: isSet(object.camouflageLoss)
? globalThis.Number(object.camouflageLoss)
: isSet(object.camouflage_loss)
? globalThis.Number(object.camouflage_loss)
: 0,
aim_time: isSet(object.aimTime)
? globalThis.Number(object.aimTime)
: isSet(object.aim_time)
? globalThis.Number(object.aim_time)
: 0,
dispersion_base: isSet(object.dispersionBase)
? globalThis.Number(object.dispersionBase)
: isSet(object.dispersion_base)
? globalThis.Number(object.dispersion_base)
: 0,
dispersion_traverse: isSet(object.dispersionTraverse)
? globalThis.Number(object.dispersionTraverse)
: isSet(object.dispersion_traverse)
? globalThis.Number(object.dispersion_traverse)
: 0,
dispersion_shot: isSet(object.dispersionShot)
? globalThis.Number(object.dispersionShot)
: isSet(object.dispersion_shot)
? globalThis.Number(object.dispersion_shot)
: 0,
dispersion_damaged: isSet(object.dispersionDamaged)
? globalThis.Number(object.dispersionDamaged)
: isSet(object.dispersion_damaged)
? globalThis.Number(object.dispersion_damaged)
: 0,
unlocks: globalThis.Array.isArray(object?.unlocks)
? object.unlocks.map((e: any) => Unlock.fromJSON(e))
: [],
shell_capacity: isSet(object.shellCapacity)
? globalThis.Number(object.shellCapacity)
: isSet(object.shell_capacity)
? globalThis.Number(object.shell_capacity)
: 0,
assault_ranges: isSet(object.assaultRanges)
? AssaultRanges.fromJSON(object.assaultRanges)
: isSet(object.assault_ranges)
? AssaultRanges.fromJSON(object.assault_ranges)
: undefined,
camouflage_loss: isSet(object.camouflage_loss) ? globalThis.Number(object.camouflage_loss) : 0,
aim_time: isSet(object.aim_time) ? globalThis.Number(object.aim_time) : 0,
dispersion_base: isSet(object.dispersion_base) ? globalThis.Number(object.dispersion_base) : 0,
dispersion_traverse: isSet(object.dispersion_traverse) ? globalThis.Number(object.dispersion_traverse) : 0,
dispersion_shot: isSet(object.dispersion_shot) ? globalThis.Number(object.dispersion_shot) : 0,
dispersion_damaged: isSet(object.dispersion_damaged) ? globalThis.Number(object.dispersion_damaged) : 0,
unlocks: globalThis.Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => Unlock.fromJSON(e)) : [],
shell_capacity: isSet(object.shell_capacity) ? globalThis.Number(object.shell_capacity) : 0,
assault_ranges: isSet(object.assault_ranges) ? AssaultRanges.fromJSON(object.assault_ranges) : undefined,
burst: isSet(object.burst) ? Burst.fromJSON(object.burst) : undefined,
};
},
@@ -2846,18 +2687,18 @@ export const GunDefinition: MessageFns<GunDefinition> = {
if (message.gun_type?.$case === "regular") {
obj.regular = GunDefinitionRegular.toJSON(message.gun_type.value);
} else if (message.gun_type?.$case === "auto_loader") {
obj.autoLoader = GunDefinitionAutoLoader.toJSON(message.gun_type.value);
obj.auto_loader = GunDefinitionAutoLoader.toJSON(message.gun_type.value);
} else if (message.gun_type?.$case === "auto_reloader") {
obj.autoReloader = GunDefinitionAutoReloader.toJSON(message.gun_type.value);
obj.auto_reloader = GunDefinitionAutoReloader.toJSON(message.gun_type.value);
}
if (message.id !== 0) {
obj.id = Math.round(message.id);
}
if (message.rotation_speed !== 0) {
obj.rotationSpeed = message.rotation_speed;
obj.rotation_speed = message.rotation_speed;
}
if (message.research_cost !== undefined) {
obj.researchCost = ResearchCost.toJSON(message.research_cost);
obj.research_cost = ResearchCost.toJSON(message.research_cost);
}
if (message.weight !== 0) {
obj.weight = Math.round(message.weight);
@@ -2872,31 +2713,31 @@ export const GunDefinition: MessageFns<GunDefinition> = {
obj.shells = message.shells.map((e) => ShellDefinition.toJSON(e));
}
if (message.camouflage_loss !== 0) {
obj.camouflageLoss = message.camouflage_loss;
obj.camouflage_loss = message.camouflage_loss;
}
if (message.aim_time !== 0) {
obj.aimTime = message.aim_time;
obj.aim_time = message.aim_time;
}
if (message.dispersion_base !== 0) {
obj.dispersionBase = message.dispersion_base;
obj.dispersion_base = message.dispersion_base;
}
if (message.dispersion_traverse !== 0) {
obj.dispersionTraverse = message.dispersion_traverse;
obj.dispersion_traverse = message.dispersion_traverse;
}
if (message.dispersion_shot !== 0) {
obj.dispersionShot = message.dispersion_shot;
obj.dispersion_shot = message.dispersion_shot;
}
if (message.dispersion_damaged !== 0) {
obj.dispersionDamaged = message.dispersion_damaged;
obj.dispersion_damaged = message.dispersion_damaged;
}
if (message.unlocks?.length) {
obj.unlocks = message.unlocks.map((e) => Unlock.toJSON(e));
}
if (message.shell_capacity !== 0) {
obj.shellCapacity = Math.round(message.shell_capacity);
obj.shell_capacity = Math.round(message.shell_capacity);
}
if (message.assault_ranges !== undefined) {
obj.assaultRanges = AssaultRanges.toJSON(message.assault_ranges);
obj.assault_ranges = AssaultRanges.toJSON(message.assault_ranges);
}
if (message.burst !== undefined) {
obj.burst = Burst.toJSON(message.burst);
@@ -3080,34 +2921,22 @@ export const GunDefinitionAutoLoader: MessageFns<GunDefinitionAutoLoader> = {
fromJSON(object: any): GunDefinitionAutoLoader {
return {
clip_reload: isSet(object.clipReload)
? globalThis.Number(object.clipReload)
: isSet(object.clip_reload)
? globalThis.Number(object.clip_reload)
: 0,
intra_clip: isSet(object.intraClip)
? globalThis.Number(object.intraClip)
: isSet(object.intra_clip)
? globalThis.Number(object.intra_clip)
: 0,
shell_count: isSet(object.shellCount)
? globalThis.Number(object.shellCount)
: isSet(object.shell_count)
? globalThis.Number(object.shell_count)
: 0,
clip_reload: isSet(object.clip_reload) ? globalThis.Number(object.clip_reload) : 0,
intra_clip: isSet(object.intra_clip) ? globalThis.Number(object.intra_clip) : 0,
shell_count: isSet(object.shell_count) ? globalThis.Number(object.shell_count) : 0,
};
},
toJSON(message: GunDefinitionAutoLoader): unknown {
const obj: any = {};
if (message.clip_reload !== 0) {
obj.clipReload = message.clip_reload;
obj.clip_reload = message.clip_reload;
}
if (message.intra_clip !== 0) {
obj.intraClip = message.intra_clip;
obj.intra_clip = message.intra_clip;
}
if (message.shell_count !== 0) {
obj.shellCount = message.shell_count;
obj.shell_count = message.shell_count;
}
return obj;
},
@@ -3270,34 +3099,24 @@ export const GunDefinitionAutoReloader: MessageFns<GunDefinitionAutoReloader> =
fromJSON(object: any): GunDefinitionAutoReloader {
return {
shell_reloads: globalThis.Array.isArray(object?.shellReloads)
? object.shellReloads.map((e: any) => globalThis.Number(e))
: globalThis.Array.isArray(object?.shell_reloads)
shell_reloads: globalThis.Array.isArray(object?.shell_reloads)
? object.shell_reloads.map((e: any) => globalThis.Number(e))
: [],
intra_clip: isSet(object.intraClip)
? globalThis.Number(object.intraClip)
: isSet(object.intra_clip)
? globalThis.Number(object.intra_clip)
: 0,
shell_count: isSet(object.shellCount)
? globalThis.Number(object.shellCount)
: isSet(object.shell_count)
? globalThis.Number(object.shell_count)
: 0,
intra_clip: isSet(object.intra_clip) ? globalThis.Number(object.intra_clip) : 0,
shell_count: isSet(object.shell_count) ? globalThis.Number(object.shell_count) : 0,
};
},
toJSON(message: GunDefinitionAutoReloader): unknown {
const obj: any = {};
if (message.shell_reloads?.length) {
obj.shellReloads = message.shell_reloads;
obj.shell_reloads = message.shell_reloads;
}
if (message.intra_clip !== 0) {
obj.intraClip = message.intra_clip;
obj.intra_clip = message.intra_clip;
}
if (message.shell_count !== 0) {
obj.shellCount = message.shell_count;
obj.shell_count = message.shell_count;
}
return obj;
},
@@ -3663,27 +3482,15 @@ export const ShellDefinition: MessageFns<ShellDefinition> = {
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
name: isSet(object.name) ? I18nString.fromJSON(object.name) : undefined,
velocity: isSet(object.velocity) ? globalThis.Number(object.velocity) : 0,
armor_damage: isSet(object.armorDamage)
? globalThis.Number(object.armorDamage)
: isSet(object.armor_damage)
? globalThis.Number(object.armor_damage)
: 0,
module_damage: isSet(object.moduleDamage)
? globalThis.Number(object.moduleDamage)
: isSet(object.module_damage)
? globalThis.Number(object.module_damage)
: 0,
armor_damage: isSet(object.armor_damage) ? globalThis.Number(object.armor_damage) : 0,
module_damage: isSet(object.module_damage) ? globalThis.Number(object.module_damage) : 0,
caliber: isSet(object.caliber) ? globalThis.Number(object.caliber) : 0,
icon: isSet(object.icon) ? globalThis.String(object.icon) : "",
penetration: isSet(object.penetration) ? ShellPenetration.fromJSON(object.penetration) : undefined,
type: isSet(object.type) ? shellTypeFromJSON(object.type) : 0,
normalization: isSet(object.normalization) ? globalThis.Number(object.normalization) : 0,
ricochet: isSet(object.ricochet) ? globalThis.Number(object.ricochet) : 0,
explosion_radius: isSet(object.explosionRadius)
? globalThis.Number(object.explosionRadius)
: isSet(object.explosion_radius)
? globalThis.Number(object.explosion_radius)
: 0,
explosion_radius: isSet(object.explosion_radius) ? globalThis.Number(object.explosion_radius) : 0,
range: isSet(object.range) ? globalThis.Number(object.range) : 0,
};
},
@@ -3700,10 +3507,10 @@ export const ShellDefinition: MessageFns<ShellDefinition> = {
obj.velocity = Math.round(message.velocity);
}
if (message.armor_damage !== 0) {
obj.armorDamage = Math.round(message.armor_damage);
obj.armor_damage = Math.round(message.armor_damage);
}
if (message.module_damage !== 0) {
obj.moduleDamage = Math.round(message.module_damage);
obj.module_damage = Math.round(message.module_damage);
}
if (message.caliber !== 0) {
obj.caliber = message.caliber;
@@ -3724,7 +3531,7 @@ export const ShellDefinition: MessageFns<ShellDefinition> = {
obj.ricochet = message.ricochet;
}
if (message.explosion_radius !== undefined && message.explosion_radius !== 0) {
obj.explosionRadius = message.explosion_radius;
obj.explosion_radius = message.explosion_radius;
}
if (message.range !== 0) {
obj.range = Math.round(message.range);
+3 -4
View File
@@ -573,8 +573,7 @@
"equalizer": {
"title": "Equalizer",
"equalize": "Equalize",
"beta": "Beta"
"equalize": "Equalize"
},
"modules": {
"title": "Modules",
@@ -682,8 +681,8 @@
"viewRange": "View range",
"camouflageStill": "Camouflage still",
"camouflageMoving": "Moving",
"camouflageShootingStill": "Still",
"camouflageShootingMoving": "Moving",
"camouflageShootingStill": "Shooting while still",
"camouflageShootingMoving": "Shooting while moving",
"camouflageCaughtOnFire": "Caught on fire",
"width": "Width",
"height": "Height",
+10 -10
View File
@@ -13,7 +13,7 @@
"hp": "{value}од",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}град/c",
"deg_s": "{value}°/c",
"plus": "+{value}"
},
"gun_types": {
@@ -37,8 +37,8 @@
"d_1": "Вчора"
},
"branches": {
"beta": "Beta",
"development": "Development",
"beta": "Бета",
"development": "Розробка",
"opentest": "Відкритий тест",
"preview": "Preview",
"production": "Production"
@@ -340,8 +340,8 @@
},
"mixer": {
"name": "Mixer",
"button": "Mix and match",
"description": "Mix tank modules",
"button": "Змішувати та поєднувати",
"description": "Змішані танкові модулі",
"seo_description": "Mix and match hulls, turrets, and guns of tanks in World of Tanks Blitz",
"screenshot": "Знімок екрану",
"randomize": "Рандомізувати"
@@ -501,11 +501,11 @@
"tech_tree": {
"title": "Звичайний",
"battle": "1 бій",
"battles": "{count} battles",
"battles": "{count} битви",
"route": "Route {index} of {count}"
},
"game_modes": {
"title": "Game mode abilities"
"title": "Здібності ігрового режиму"
},
"review": {
"title": "Review videos",
@@ -626,7 +626,7 @@
"camouflageShootingStill": "Нерухомо",
"camouflageShootingMoving": "У русі",
"camouflageCaughtOnFire": "Caught on fire",
"width": "Width",
"width": "Ширина",
"height": "Height",
"length": "Length",
"volume": "Volume",
@@ -740,7 +740,7 @@
}
},
"gallery": {
"name": "Gallery",
"name": "Галерея",
"button": "Browse all",
"description": "Blitz player avatars",
"seo_description": "Усі World of Tanks Blitz аватари гравців",
@@ -843,7 +843,7 @@
"breakdown": {
"name": "Breakdown",
"options": {
"width": "Width",
"width": "Ширина",
"height": "Height",
"showTotal": "Show total",
"listGap": "List gap",
+149 -149
View File
@@ -7,13 +7,13 @@
"common": {
"name": "BlitzKit",
"units": {
"m": "{value} 公尺",
"mm": "{value} 毫米",
"deg": "{value} 度°",
"hp": "{value} 生命值",
"m": "{value}m",
"mm": "{value}mm",
"deg": "{value} °",
"hp": "{value}血量",
"x": "x{value}",
"percentage": "{value}%",
"deg_s": "{value}度每秒",
"deg_s": "{value}°/s",
"plus": "+{value}"
},
"gun_types": {
@@ -23,7 +23,7 @@
},
"shells": {
"ap": "穿甲弹",
"ap_cr": "硬式复合穿甲弹",
"ap_cr": "硬芯穿甲弹",
"hc": "破甲弹",
"he": "高爆弹"
},
@@ -38,10 +38,10 @@
},
"branches": {
"beta": "测试版",
"development": "Development",
"opentest": "开放测试",
"preview": "Preview",
"production": "Production"
"development": "开发分支",
"opentest": "公开测试",
"preview": "预览分支",
"production": "生产环境"
},
"locales": {
"en": "英语",
@@ -61,23 +61,23 @@
"3": "平均",
"4": "高于平均",
"5": "好",
"6": "好",
"6": "非常好",
"7": "很好",
"8": "非常好",
"9": "极品"
"8": "强势",
"9": "超强势"
},
"bkni_percentile": {
"0": "垃圾",
"1": "非常差",
"2": "很差",
"3": "差",
"4": "低于平均",
"4": "较差",
"5": "平均",
"6": "较好",
"7": "好",
"8": "很好",
"9": "非常好",
"10": "极品"
"9": "强势",
"10": "超强势"
},
"nations": {
"ussr": "苏联",
@@ -87,8 +87,8 @@
"uk": "英国",
"france": "法国",
"japan": "日本",
"european": "欧盟 (E系)",
"other": "X系"
"european": "泛欧",
"other": "混合系"
},
"nations_adjectives": {
"ussr": "苏联",
@@ -98,14 +98,14 @@
"uk": "英国",
"france": "法国",
"japan": "日本",
"european": "欧盟 (E系)",
"other": "X系"
"european": "泛欧",
"other": "混合系"
},
"tank_class_short": {
"-1": "未知",
"0": "轻型坦克",
"1": "中型坦克",
"2": "重型战车",
"2": "重型坦克",
"3": "坦克歼击车"
},
"tank_class_short_plural_lowercase": {
@@ -129,14 +129,14 @@
},
"regions": {
"normal": {
"com": "北美",
"eu": "欧洲",
"asia": "亚太地区"
"com": "北美服务器",
"eu": "欧洲服务器",
"asia": "亚太服务器"
},
"short": {
"com": "北美",
"com": "美服",
"eu": "欧洲",
"asia": "亚太地区"
"asia": "亚服"
}
},
"leagues": {
@@ -155,7 +155,7 @@
"normalized_losses": "战败率",
"normalized_misses": "未命中数",
"normalized_shots": "开火次数",
"normalized_spotted": "侦查次数",
"normalized_spotted": "侦查数",
"normalized_survived_battles": "存活率",
"normalized_win_and_survived": "胜利并幸存的概率",
"normalized_wins": "胜率",
@@ -178,7 +178,7 @@
"cumulative_shots": "总射击数",
"cumulative_spotted": "总侦查敌人数",
"cumulative_survived_battles": "存活场次",
"cumulative_win_and_survived": "胜利与存活场次",
"cumulative_win_and_survived": "胜利并存活场次",
"cumulative_wins": "胜利",
"cumulative_xp": "总经验",
"cumulative_wn8": "WN8",
@@ -203,27 +203,27 @@
"searching": "搜索中..."
},
"copy_button": {
"copied": "已拷贝!"
"copied": "已复制!"
},
"tank_search": {
"select_dialog_title": "搜索坦克",
"select_dialog_title": "查找坦克",
"swap_dialog_title": "交换坦克",
"clear_filters": "清除筛选",
"login": "登录以使用它",
"search_bar_hint": "搜寻战车……",
"recent": "最近查看的",
"clear_filters": "清空筛选器",
"login": "请先登录",
"search_bar_hint": "查找坦克……",
"recent": "最近查过",
"select_all": "全选",
"count_singular": "1 辆坦克",
"count_plural": "{count} 辆坦克",
"sorting_by": "按 {name} 排序",
"clear": "清除",
"tier": "{tier} 阶",
"clear": "清空",
"tier": "{tier} 级",
"passive": "{name} (被动)",
"active": "{name} (主动)",
"no_tanks_found": {
"body": "未找到坦克。",
"search_again": "请尝试重新搜索。",
"clear_filters": "请尝试清除筛选。"
"clear_filters": "请尝试清空筛选器。"
},
"sort": {
"meta.none": "无",
@@ -231,30 +231,30 @@
"survivability.viewRange": "侦察范围",
"survivability.camouflageStill": "静止中隐蔽值",
"survivability.camouflageMoving": "移动中隐蔽值",
"survivability.camouflageShooting": "射击隐蔽值",
"survivability.camouflageShooting": "射击隐蔽",
"survivability.volume": "体积",
"survivability.length": "长度",
"fire.dpm": "标准炮弹 每分钟伤害血量",
"fire.dpmPremium": "金币炮弹 每分钟伤害值",
"fire.dpm": "银币弹 每分钟伤害",
"fire.dpmPremium": "金币弹 每分钟伤害",
"fire.reload": "装填时间",
"fire.caliber": "口径",
"fire.standardPenetration": "标准炮弹穿透力",
"fire.premiumPenetration": "金币炮弹穿透力",
"fire.tertiaryPenetration": "第三种炮弹穿透力",
"fire.damage": "炮弹伤害值",
"fire.standardPenetration": "银币弹穿深",
"fire.premiumPenetration": "金币弹穿深",
"fire.tertiaryPenetration": "高爆弹穿深",
"fire.damage": "均伤",
"fire.moduleDamage": "模组伤害值",
"fire.shellVelocity": "炮弹飞行速度",
"fire.shellVelocity": "弹速",
"fire.shellRange": "最大射程",
"fire.shellCapacity": "携弹量",
"fire.shellCapacity": "载弹量",
"fire.aimTime": "瞄准时间",
"fire.dispersionStill": "一百米处扩散度",
"fire.dispersionMoving": "移动时扩散度",
"fire.dispersionStill": "百米精度",
"fire.dispersionMoving": "移动扩圈",
"fire.gunDepression": "俯角",
"fire.gunElevation": "仰角",
"maneuverability.forwardsSpeed": "最高前进速度",
"maneuverability.backwardsSpeed": "最高后退速度",
"maneuverability.forwardsSpeed": "前进极速",
"maneuverability.backwardsSpeed": "后退极速",
"maneuverability.power": "引擎功率",
"maneuverability.powerToWeight": "功重比",
"maneuverability.powerToWeight": "推重比",
"maneuverability.weight": "重量",
"maneuverability.traverseSpeed": "转速"
},
@@ -266,10 +266,10 @@
"label": "排序依据",
"fire": "开火",
"maneuverability": "机动性",
"survivability": "生存能力"
"survivability": "生存性"
},
"direction": {
"label": "排序算法",
"label": "排序方式",
"ascending": "升序",
"descending": "倒序"
}
@@ -301,8 +301,8 @@
},
"docs": {
"patches": {
"name": "BlitzKit 变更日志",
"seo_description": "BlitzKit Discord 机器人和网站的变更日志"
"name": "BlitzKit 更新日志",
"seo_description": "BlitzKit Discord 机器人和网站的更新日志"
}
},
"tools": {
@@ -339,44 +339,44 @@
"pool_size": "{count} 辆可生成的坦克"
},
"mixer": {
"name": "组装",
"name": "拼装器",
"button": "混合搭配",
"description": "混搭不同坦克间的模块",
"seo_description": "《坦克世界:闪击战》的车体, 炮塔, 主炮混合搭配",
"seo_description": "混搭WoTB的坦克车体、炮塔与主炮",
"screenshot": "屏幕截图",
"randomize": "随机搭配"
},
"guess": {
"name": "猜测",
"button": "这会是什么?",
"button": "这可能是什么?",
"description": "坦克剪影小游戏",
"seo_description": "看剪影猜坦克",
"search": {
"placeholder": "输入你的猜想……",
"placeholder": "输入你的猜测……",
"skip": "跳过",
"guess": "猜测",
"next": "下一个",
"no_results": "沒有結果"
"no_results": "无结果"
},
"stats": "猜对了 {correct} / {total}",
"stats": "猜对了 {correct} / {total},连对 {streak} 个",
"help": {
"title": "显示坦克?",
"description": "显示坦克而不显示名字。这轮会被视为不正确,并打破你的连续记录!",
"title": "部分揭示坦克?",
"description": "揭示坦克但不显示答案。本轮会被视为答错,并中断连对!",
"cancel": "取消",
"reveal": "显示"
"reveal": "揭示"
},
"clear": "清除",
"select_all": "全选",
"tier": "{tier} 阶"
"tier": "{tier} 级"
},
"tankopedia": {
"search": "搜索属性……",
"name": "战车百科",
"button": "搜索战车",
"description": "闪击战坦克百科全书",
"seo_description": "《坦克世界:闪击战》的所有坦克参数, 装甲, 等等...",
"tank_seo_title": "{name} - {tier} 阶 {nationality} {class} | {website} 坦克百科 | 坦克世界闪击战 (WoTB)",
"tank_seo_description": "{name} 装甲,统计资料,装备,规定配给等。 {dpm} 每分钟伤害, {alpha} 伤害值, {penetration}毫米 穿透, {speed}公里/小時 最高速度, {health} 生命值。",
"name": "坦克百科",
"button": "搜索坦克",
"description": "WoTB坦克百科",
"seo_description": "WoTB所有坦克的参数、 装甲等",
"tank_seo_title": "{name} - {tier} 级 {nationality} {class} | {website} 坦克百科 | 坦克世界闪击战(坦闪/WoTB)",
"tank_seo_description": "{name} 装甲、参数、配件、补给等。 {dpm} 每分钟伤害, {alpha} 均伤, {penetration}mm 穿深, {speed}km/h 极速, {health} 血量。",
"visualizers": {
"reload": {
"skip": "跳过"
@@ -387,15 +387,15 @@
"rotator": {
"hull": "车体",
"turret": "炮塔",
"hard": "硬地质",
"medium": "中性地質",
"soft": "軟地質",
"effective": "效率"
"hard": "公路",
"medium": "平地",
"soft": "水面",
"effective": "等效"
},
"ricochet": {
"angle": "角度",
"normalization": "转正",
"effective_angle": "有效角度",
"effective_angle": "有效倾角",
"armor": "装甲",
"no_ricochet": "高爆弹不会跳弹"
},
@@ -407,20 +407,20 @@
"flexibility": {
"yaw": "水平角度",
"pitch": "俯仰角度",
"min": "最少俯角",
"max": "最大仰角"
"min": "极限俯角",
"max": "极限仰角"
}
},
"sandbox": {
"poses": {
"hull_down": "俯角视角",
"face_hug": "抱脸视角",
"face_hug": "顶牛视角",
"default": "默认"
},
"settings": {
"armor": "装甲",
"green_penetration": "可击穿区域",
"hide_model_under_armor": "隐藏装甲下的模型",
"green_penetration": "绿色可击穿",
"hide_model_under_armor": "隐藏坦克模型",
"opaque": "不透明",
"dev_wireframe": "开发选项:网格"
},
@@ -454,14 +454,14 @@
"track": "履带"
},
"status": {
"penetration": "{damage}生命值 击穿",
"penetration": "击穿:{damage}血量",
"blocked": "抵挡伤害",
"ricochet": "跳弹",
"splash": "{damage}生命值 溅射"
"splash": "溅射:{damage}血量"
},
"stats": {
"thickness_and_angle": "{thickness}毫米 {angle}度°",
"nominal": "{thickness}毫米 装甲厚度",
"thickness_and_angle": "{thickness}mm/倾角{angle}°",
"nominal": "{thickness}mm 垂直厚度",
"ricochet_loss": "{loss}% 击穿"
}
}
@@ -490,9 +490,9 @@
"nation": "国别",
"class": "坦克车型",
"tier": "阶级",
"type": "战车类型",
"type": "坦克类型",
"dev_id": "开发参数:ID",
"dev_name": "DEV: NAME",
"dev_name": "开发者名称",
"purchase": "购买价格",
"restoration": "恢复坦克价格",
"sale": "出售价格",
@@ -500,9 +500,9 @@
},
"tech_tree": {
"title": "科技树",
"battle": "一场比赛",
"battles": "{count} 战斗场次",
"route": "路线 {index} / {count}"
"battle": "1场比赛",
"battles": "{count} 场次",
"route": "第 {index} / {count} 种科技线"
},
"game_modes": {
"title": "游戏模式技能"
@@ -514,33 +514,33 @@
"configuration": {
"title": "配置设定",
"equalizer": {
"title": "Equalizer",
"equalize": "Equalize",
"beta": "测试版"
"title": "平衡器",
"equalize": "平衡",
"beta": "测试"
},
"modules": {
"title": "坦克模块",
"stock": "白板",
"upgrade": "顶级配置"
"upgrade": "满配"
},
"equipment": {
"title": "装备",
"clear": "清除"
},
"provisions": {
"title": "规定配给",
"title": "补给",
"clear": "清除"
},
"consumables": {
"title": "消耗品",
"clear": "清除",
"info": "黄色高亮消耗品不影响坦克参数。"
"info": "以黄色标识的消耗品不影响坦克参数。"
},
"skills": {
"title": "乘员技能",
"clear": "清除",
"maximize": "最大化",
"info": "黄色高亮技能只适用于特殊情况。 按空格键可在0到7级之间快速切换。"
"info": "以黄色标识的技能只在特定情形起效。 按空格键可在0到7级之间快速切换。"
},
"miscellaneous": {
"title": "杂项"
@@ -550,48 +550,48 @@
"title": "属性",
"compare": {
"label": "比较",
"class": "{tier} 阶的 {class}",
"tier": "所有{tier} 阶的",
"class": "{tier}级{class}",
"tier": "所有{tier}级坦克",
"all": "所有坦克"
},
"values": {
"shell_index": "炮弹 {index}",
"at_distance": "在 {distance} 公尺",
"at_distance": "距离{distance}m",
"at_distance_slider_label": "距离",
"dispersion_at_distance": "在 {distance} 公尺的扩散度",
"gun_flexibility": "炮管转动界限",
"dispersion_at_distance": "在 {distance}m 的精度",
"gun_flexibility": "主炮俯仰角",
"speed": "速度",
"terrain_coefficients": "地形系数",
"terrain_coefficients": "地形适应性",
"raw_terrain_coefficients": "原始地形系数",
"power_to_weight_ratio": "功重比",
"power_to_weight_ratio": "推重比",
"hull_traverse_speed": "车体转向速率",
"camouflage": "迷彩",
"camouflage": "涂装",
"reload": "装填时间",
"crewCount": "乘员人数",
"shellNormalization": "转正",
"shellRicochet": "跳弹",
"dpm": "每分钟伤害",
"dpmEffective": "60秒内生效",
"dpmEffective": "60秒内实际输出",
"shells": "炮弹 ",
"mostOptimalShellIndex": "最优炮弹",
"shellReloads": "装填时间",
"shellReload": "装填时间",
"intraClip": "炮弹装填",
"intraClip": "短装",
"caliber": "口径",
"penetration": "穿深",
"damage": "伤害",
"damageWithoutAssault": "无突击弹的伤害",
"clipDamage": "弹匣伤害期望值",
"moduleDamage": "模组伤害",
"clipDamage": "总爆发",
"moduleDamage": "模块伤害",
"explosionRadius": "溅射半径",
"shellVelocity": "炮弹飞行速度",
"aimTime": "瞄准时间",
"dispersion": "静止時",
"dispersionMoving": "移动时",
"dispersionHullTraversing": "车体转向时",
"dispersionTurretTraversing": "炮塔转向时",
"dispersionTurretTraversing": "炮转扩圈",
"dispersionShooting": "开火时",
"dispersionGunDamaged": "主炮损坏时",
"dispersionGunDamaged": "主炮损坏扩圈",
"gunDepression": "俯角",
"gunElevation": "仰角",
"gunFrontalDepression": "车体前部俯角",
@@ -600,42 +600,42 @@
"gunRearElevation": "车体后部仰角",
"azimuthLeft": "左射界",
"azimuthRight": "右射界",
"speedForwards": "最高前进速度",
"speedBackwards": "最高后退速度",
"hardTerrainCoefficient": "硬地质",
"hardTerrainCoefficientRaw": "硬地质",
"mediumTerrainCoefficient": "中性地质",
"mediumTerrainCoefficientRaw": "中性地质",
"softTerrainCoefficient": "软地质",
"softTerrainCoefficientRaw": "软地质",
"speedForwards": "前进极速",
"speedBackwards": "后退极速",
"hardTerrainCoefficient": "公路",
"hardTerrainCoefficientRaw": "公路-原始",
"mediumTerrainCoefficient": "平地",
"mediumTerrainCoefficientRaw": "平地-原始",
"softTerrainCoefficient": "水面",
"softTerrainCoefficientRaw": "水面-原始",
"enginePower": "引擎功率",
"powerToWeightRatioHardTerrain": "硬地质",
"powerToWeightRatioMediumTerrain": "中性地质",
"powerToWeightRatioSoftTerrain": "软地质",
"powerToWeightRatioHardTerrain": "公路实际推重",
"powerToWeightRatioMediumTerrain": "平地实际推重",
"powerToWeightRatioSoftTerrain": "水面实际推重",
"weight": "重量",
"turretTraverseSpeed": "炮塔转向速率",
"gunTraverseSpeed": "炮管转向速率",
"hullTraverseHardTerrain": "硬地质",
"hullTraverseMediumTerrain": "中性地质",
"hullTraverseSoftTerrain": "软地质",
"health": "生命值",
"fireChance": "着火概率",
"hullTraverseHardTerrain": "公路上车转速率",
"hullTraverseMediumTerrain": "平地上车转速率",
"hullTraverseSoftTerrain": "水面上车转速率",
"health": "血量",
"fireChance": "发动机受击时着火概率",
"viewRange": "视野范围",
"camouflageStill": "静止时",
"camouflageStill": "静止隐蔽",
"camouflageMoving": "移动时",
"camouflageShootingStill": "静止时",
"camouflageShootingMoving": "移动时",
"camouflageCaughtOnFire": "着火时",
"camouflageShootingMoving": "移动开火隐蔽",
"camouflageCaughtOnFire": "着火时隐蔽",
"width": "宽度",
"height": "高度",
"length": "长度",
"volume": "体积",
"shellRange": "射程",
"shellCapacity": "携弹量",
"gunType": "炮管类型",
"penetrationAt250m": "两百五十米处的穿透力",
"burstShells": "爆破计数",
"burstInterShell": "爆破弹"
"shellCapacity": "载弹量",
"gunType": "主炮类型",
"penetrationAt250m": "250m处穿深",
"burstShells": "小弹夹发数",
"burstInterShell": "小弹夹短装"
}
},
"firepower": {
@@ -662,7 +662,7 @@
"name": "比较",
"button": "坦克比较",
"description": "比较坦克参数",
"seo_description": "比较《坦克世界:闪击战》中的坦克参数和装备配置",
"seo_description": "比较坦克世界闪击战中的坦克参数和装备配置",
"actions": {
"add": {
"button": "添加",
@@ -692,15 +692,15 @@
},
"modules": {
"stock": "白板",
"upgrade": "顶级配置"
"upgrade": "满配"
},
"provisions": {
"clear": "清除",
"clear_all": "清除所有坦克"
"clear": "清空此坦克",
"clear_all": "清空所有坦克"
},
"consumables": {
"clear": "清除",
"clear_all": "清除所有坦克"
"clear": "清空此坦克",
"clear_all": "清空所有坦克"
}
}
},
@@ -708,7 +708,7 @@
"name": "性能表现",
"button": "查看坦克",
"description": "坦克性能统计",
"seo_description": "最好的坦克及其在《坦克世界:闪击战》中的表现",
"seo_description": "最好的坦克及其在坦克世界闪击战中的数据",
"estimation": {
"body": "基于 {count} 个玩家的估计数据。更新于 {age} 之前。",
"hours": "{count} 小时",
@@ -726,15 +726,15 @@
"winrate": "胜率",
"players": "玩家",
"damage": "伤害",
"survival": "生存性",
"survival": "生存率",
"xp": "经验值",
"kills": "击杀数",
"spots": "侦查次数",
"spots": "侦查数",
"accuracy": "命中率",
"shots": "开火次数",
"hits": "命中数",
"damage_ratio": "伤害效率",
"damage_taken": "承受伤害值",
"damage_ratio": "伤害比率",
"damage_taken": "承受伤害",
"capture_points": "占领值"
}
}
@@ -743,11 +743,11 @@
"name": "图库",
"button": "浏览全部",
"description": "Blitz玩家头像",
"seo_description": "所有《坦克世界:闪击战》玩家头像",
"seo_description": "所有坦克世界闪击战玩家头像",
"last_updated": "最后更新于 {time}",
"search": {
"hint": "搜索頭像……",
"results": "{count} 头像"
"hint": "搜索头像……",
"results": "{count}个头像"
}
},
"session": {
+2 -1
View File
@@ -78,7 +78,8 @@ if (provider === "steam") {
console.log(`Downloading ${urls.length} packages...`);
await rm(WGPKG_DIR, { recursive: true });
await rm(WGPKG_DIR, { recursive: true, force: true });
await mkdir(WGPKG_DIR, { recursive: true });
const inputContent = urls
.map((url) => {
@@ -5,7 +5,7 @@ import {
} from "@blitzkit/core";
import { invalidate, useFrame } from "@react-three/fiber";
import type { QuicklimeEvent } from "quicklime";
import { useEffect } from "react";
import { useEffect, useRef } from "react";
import {
MeshBasicMaterial,
NormalBlending,
@@ -43,42 +43,44 @@ export function PrimaryArmorSceneComponent({
node,
thickness,
}: PrimaryArmorSceneComponentProps) {
const material = new ShaderMaterial({
fragmentShader,
vertexShader,
const material = useRef(
new ShaderMaterial({
fragmentShader,
vertexShader,
fog: true,
transparent: true,
fog: true,
transparent: true,
blending: isHalloween ? SubtractiveBlending : NormalBlending,
blending: isHalloween ? SubtractiveBlending : NormalBlending,
uniforms: UniformsUtils.merge([
UniformsLib.common,
UniformsLib.fog,
uniforms: UniformsUtils.merge([
UniformsLib.common,
UniformsLib.fog,
{
thickness: { value: null },
penetration: { value: null },
caliber: { value: null },
ricochet: { value: null },
normalization: { value: null },
isExplosive: { value: null },
canSplash: { value: null },
damage: { value: null },
explosionRadius: { value: null },
greenPenetration: { value: null },
advancedHighlighting: { value: null },
opaque: { value: null },
{
thickness: { value: null },
penetration: { value: null },
caliber: { value: null },
ricochet: { value: null },
normalization: { value: null },
isExplosive: { value: null },
canSplash: { value: null },
damage: { value: null },
explosionRadius: { value: null },
greenPenetration: { value: null },
advancedHighlighting: { value: null },
opaque: { value: null },
inverseProjectionMatrix: { value: null },
resolution: { value: new Vector2() },
spacedArmorBuffer: { value: null },
spacedArmorDepth: { value: null },
inverseProjectionMatrix: { value: null },
resolution: { value: new Vector2() },
spacedArmorBuffer: { value: null },
spacedArmorDepth: { value: null },
opacity: { value: 0 },
},
]),
});
opacity: { value: 0 },
},
]),
}),
);
useEffect(() => {
function handleShellChange() {
@@ -86,17 +88,17 @@ export function PrimaryArmorSceneComponent({
const shell =
tankopediaEphemeral.customShell ?? Duel.state.antagonist.shell;
material.uniforms.caliber.value = shell.caliber;
material.uniforms.ricochet.value = degToRad(
material.current.uniforms.caliber.value = shell.caliber;
material.current.uniforms.ricochet.value = degToRad(
isExplosive(shell.type) ? 90 : shell.ricochet!,
);
material.uniforms.normalization.value = degToRad(
material.current.uniforms.normalization.value = degToRad(
shell.normalization ?? 0,
);
material.uniforms.isExplosive.value = isExplosive(shell.type);
material.uniforms.canSplash.value = canSplash(shell.type);
material.uniforms.damage.value = shell.armor_damage;
material.uniforms.explosionRadius.value = shell.explosion_radius;
material.current.uniforms.isExplosive.value = isExplosive(shell.type);
material.current.uniforms.canSplash.value = canSplash(shell.type);
material.current.uniforms.damage.value = shell.armor_damage;
material.current.uniforms.explosionRadius.value = shell.explosion_radius;
handleProtagonistEquipmentChange(true);
handleAntagonistEquipmentChange(true);
@@ -104,17 +106,18 @@ export function PrimaryArmorSceneComponent({
invalidate();
}
function handleGreenPenetrationChange(greenPenetration: boolean) {
material.uniforms.greenPenetration.value = greenPenetration;
material.current.uniforms.greenPenetration.value = greenPenetration;
}
function handleAdvancedHighlightingChange(advancedHighlighting: boolean) {
material.uniforms.advancedHighlighting.value = advancedHighlighting;
material.current.uniforms.advancedHighlighting.value =
advancedHighlighting;
invalidate();
}
function handleOpaqueChange(opaque: boolean) {
material.uniforms.opaque.value = opaque;
material.current.uniforms.opaque.value = opaque;
}
function handleWireframeChange(wireframe: boolean) {
material.wireframe = wireframe;
material.current.wireframe = wireframe;
}
function handleProtagonistEquipmentChange(noInvalidate = false) {
const equipment = Duel.state.protagonist.equipmentMatrix;
@@ -128,7 +131,7 @@ export function PrimaryArmorSceneComponent({
? Duel.state.protagonist.tank.equalizer?.armor
: undefined) ?? 1;
material.uniforms.thickness.value =
material.current.uniforms.thickness.value =
thickness * (hasEnhancedArmor ? 1.04 : 1) * equalizer;
if (!noInvalidate) invalidate();
@@ -145,7 +148,7 @@ export function PrimaryArmorSceneComponent({
equipment,
);
material.uniforms.penetration.value =
material.current.uniforms.penetration.value =
penetration *
resolvePenetrationCoefficient(
hasCalibratedShells,
@@ -158,7 +161,7 @@ export function PrimaryArmorSceneComponent({
}
function handleTransitionEvent(event: QuicklimeEvent<number>) {
material.uniforms.opacity.value = event.data;
material.current.uniforms.opacity.value = event.data;
}
handleShellChange();
@@ -209,13 +212,14 @@ export function PrimaryArmorSceneComponent({
}, []);
useFrame(({ gl, camera }) => {
gl.getSize(material.uniforms.resolution.value).multiplyScalar(
gl.getSize(material.current.uniforms.resolution.value).multiplyScalar(
gl.getPixelRatio(),
);
material.uniforms.spacedArmorBuffer.value = spacedArmorRenderTarget.texture;
material.uniforms.spacedArmorDepth.value =
material.current.uniforms.spacedArmorBuffer.value =
spacedArmorRenderTarget.texture;
material.current.uniforms.spacedArmorDepth.value =
spacedArmorRenderTarget.depthTexture;
material.uniforms.inverseProjectionMatrix.value =
material.current.uniforms.inverseProjectionMatrix.value =
camera.projectionMatrixInverse;
});
@@ -240,7 +244,7 @@ export function PrimaryArmorSceneComponent({
{...props}
key={`${key}-include`}
renderOrder={1}
material={material}
material={material.current}
/>
);
},
@@ -27,8 +27,6 @@ export const Armor = memo(() => {
const newRenderSize = new Vector2();
useFrame(({ gl, camera, scene }) => {
gl.autoClear = true;
gl.getSize(newRenderSize).multiplyScalar(gl.getPixelRatio());
if (!newRenderSize.equals(renderSize)) {
@@ -50,6 +48,8 @@ export const Armor = memo(() => {
gl.clearDepth();
gl.render(primaryArmorScene, camera);
gl.autoClear = true;
}, 1);
return (
@@ -45,14 +45,13 @@ const consumableDefinitions = await api.consumableDefinitions();
const provisionDefinitions = await api.provisionDefinitions();
const tankDefinitions = await api.tankDefinitions();
const gameModeRoleSets: Record<number, Set<number>> = {};
const gameModeRoleSets: Record<string, Set<number>> = {};
for (const tankIdString in tankDefinitions.tanks) {
const gameMode = tankDefinitions.tanks[tankIdString];
for (const gameModeIdString in gameMode.roles) {
const role = gameMode.roles[gameModeIdString];
const gameModeId = Number(gameModeIdString);
for (const gameModeId in gameMode.roles) {
const role = gameMode.roles[gameModeId];
if (gameModeId in gameModeRoleSets) {
gameModeRoleSets[gameModeId].add(role);
@@ -63,7 +62,7 @@ for (const tankIdString in tankDefinitions.tanks) {
}
const gameModeRoles: {
gameModeId: number;
gameModeId: string;
consumables: number[];
provisions: number[];
}[] = [];
@@ -72,8 +71,7 @@ const allGameModeConsumables = new Set<number>();
const allGameModeProvisions = new Set<number>();
for (const gameModeIdString in gameModeRoleSets) {
const gameModeId = Number(gameModeIdString);
const roles = gameModeRoleSets[gameModeId];
const roles = gameModeRoleSets[gameModeIdString];
const consumables = new Set<number>();
const provisions = new Set<number>();
@@ -116,7 +114,7 @@ for (const gameModeIdString in gameModeRoleSets) {
}
gameModeRoles.push({
gameModeId: gameModeId,
gameModeId: gameModeIdString,
consumables: Array.from(consumables.values()),
provisions: Array.from(provisions.values()),
});
@@ -1,5 +1,5 @@
import { alias } from "@blitzkit/core";
import { Badge, Box, Flex, Heading, Switch, Text } from "@radix-ui/themes";
import { Box, Flex, Heading, Switch, Text } from "@radix-ui/themes";
import { useLocale } from "../../../../hooks/useLocale";
import { Duel } from "../../../../stores/duel";
import { Tankopedia } from "../../../../stores/tankopedia";
@@ -12,12 +12,7 @@ export function Equalizer() {
return (
<ConfigurationChildWrapper>
<Heading size="4">
<Flex gap="2" align="center">
{strings.website.tools.tankopedia.configuration.equalizer.title}{" "}
<Badge variant="outline">
{strings.website.tools.tankopedia.configuration.equalizer.beta}
</Badge>
</Flex>
{strings.website.tools.tankopedia.configuration.equalizer.title}
</Heading>
<Box
@@ -34,9 +29,9 @@ export function Equalizer() {
style={{
cursor: "pointer",
borderRadius: "var(--radius-3)",
backgroundImage: `url(${alias("api", `/gamemodes/45/banner.webp`)})`,
backgroundImage: `url(${alias("api", `/gamemodes/Insanity/banner.webp`)})`,
backgroundSize: "cover",
backgroundPosition: "center",
backgroundPosition: "50% 25%",
overflow: "hidden",
}}
>
@@ -25,8 +25,7 @@ export function GameModeSection() {
</Heading>
<Flex justify="center" gap="4" wrap="wrap" px="4">
{roles.map(([key, value]) => {
const id = Number(key);
{roles.map(([id, value]) => {
const gameMode = gameDefinitions.gameModes[id];
return (
@@ -17,15 +17,15 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
const bannerMatches: { name: string; path: string }[] = [];
for (const match of gameTypeSelectorStyles.Prototypes[0].components.UIDataLocalBindingsComponent.data[1][2].matchAll(
/eGameMode\.([a-zA-Z]+) -> "~res:([^"]+)"/g,
/eGameMode\.(\w+) -> "~res:([^"]+)"/g,
)) {
bannerMatches.push({ name: match[1], path: match[2] });
}
for (const match of 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 = match[2];
let path = bannerMatches.find(
(bannerMatch) => bannerMatch.name.toLowerCase() === name.toLowerCase(),
@@ -11,13 +11,6 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
.dir(`Data/Gfx/Shared/tank-supply/ammunition/big`)
.then((files) => files.filter((file) => file.endsWith("_l.txt")));
console.log(
"Shell files raw",
await vfs.dir(`Data/Gfx/Shared/tank-supply/ammunition/big`),
);
console.log("Shell file paths", files);
for (const file of files) {
const id = file.match(/(.+)_l\.txt/)![1];
const sizes = (
@@ -33,8 +26,6 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
});
}
console.log("Shell paths", paths);
return paths;
});
@@ -90,15 +90,21 @@ function Content() {
session.tracking && tankStatsB
? deltaTankStats(session.player.stats, tankStatsB)
.sort((a, b) => b.last_battle_time - a.last_battle_time)
.map((entry) => {
.flatMap((entry) => {
if (!(entry.tank_id in tankDefinitions.tanks)) return [];
const tank = tankDefinitions.tanks[entry.tank_id];
if (!(tank.id in averageDefinitions.averages)) return [];
const average = averageDefinitions.averages[tank.id];
const composite = compositeStats(
{ ...entry.all, battle_life_time: entry.battle_life_time },
average?.mu!,
average.mu!,
);
return { tank, composite };
return [{ tank, composite }];
})
: undefined,
[session.tracking && session.player, tankStatsB],