mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
Compare commits
170
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d75a51660e | ||
|
|
ac1323a463 | ||
|
|
292f7aeac0 | ||
|
|
1ee232d104 | ||
|
|
1d301bf2fb | ||
|
|
2a8ca6d36f | ||
|
|
ed5d2e3ff4 | ||
|
|
b2684e3152 | ||
|
|
d078454711 | ||
|
|
6aae1c8ee0 | ||
|
|
a560a37a56 | ||
|
|
41486f84d4 | ||
|
|
29b12c7c28 | ||
|
|
2a3583a474 | ||
|
|
eb5e2a935c | ||
|
|
75f6f133ca | ||
|
|
f26711bad9 | ||
|
|
a8dc3313cf | ||
|
|
8087752172 | ||
|
|
cb03a86cce | ||
|
|
838ce7f35d | ||
|
|
e6f9b07b20 | ||
|
|
8afc334aa7 | ||
|
|
c7017a7a15 | ||
|
|
f1462162f4 | ||
|
|
da4c2ece32 | ||
|
|
80325aa3b2 | ||
|
|
3b937a6f35 | ||
|
|
7a8f88f224 | ||
|
|
5982fdde8c | ||
|
|
dcd7ce61f7 | ||
|
|
43021c4945 | ||
|
|
4b24cf313b | ||
|
|
d785588cf9 | ||
|
|
dd9b34ea34 | ||
|
|
7605e1d6f2 | ||
|
|
7f056500ca | ||
|
|
0c37550c05 | ||
|
|
1d928e8b72 | ||
|
|
9e2465a6e3 | ||
|
|
b061bfd267 | ||
|
|
a90e5e20ea | ||
|
|
5fcade3efa | ||
|
|
f1bb5736c0 | ||
|
|
9b45f21457 | ||
|
|
62fb80dddc | ||
|
|
ff0cac84e1 | ||
|
|
cbd2c2a719 | ||
|
|
5b16e22750 | ||
|
|
3a32624823 | ||
|
|
46374a7a26 | ||
|
|
b856268ee0 | ||
|
|
e60bbc03d2 | ||
|
|
30b18f60be | ||
|
|
754dff72b9 | ||
|
|
ef7655ab5d | ||
|
|
9491e7651a | ||
|
|
cccd96a021 | ||
|
|
16a54ea291 | ||
|
|
f5c00643e4 | ||
|
|
652f36ba6c | ||
|
|
e1957daa5c | ||
|
|
222fda0c91 | ||
|
|
c9467d68ae | ||
|
|
d64f04b2c8 | ||
|
|
a98f0e84d5 | ||
|
|
6319e438b1 | ||
|
|
90a64d4ccf | ||
|
|
cb339eab5f | ||
|
|
e6a92e2114 | ||
|
|
4bfc89302f | ||
|
|
6611088ccb | ||
|
|
8d4933dd60 | ||
|
|
4b5ee9db09 | ||
|
|
cc3aa976db | ||
|
|
9fb4607bba | ||
|
|
6f8790d148 | ||
|
|
57d63ea1d7 | ||
|
|
35894f39cf | ||
|
|
18d762c41b | ||
|
|
6ca74e2b83 | ||
|
|
56ca3e5ed4 | ||
|
|
2c059cdc59 | ||
|
|
b0d7a49b16 | ||
|
|
9dfa5a7693 | ||
|
|
e79ed0cf85 | ||
|
|
f52460e98b | ||
|
|
6a91e86b07 | ||
|
|
1fce9c1c88 | ||
|
|
6e8fdcfeef | ||
|
|
2fffd512ac | ||
|
|
16b3a59f88 | ||
|
|
ba36c600c4 | ||
|
|
9fbdaaf87f | ||
|
|
553c9d552b | ||
|
|
1b017aad48 | ||
|
|
74fefe6291 | ||
|
|
5d81b7ff5a | ||
|
|
789578f2b3 | ||
|
|
0864825513 | ||
|
|
6f11fb4a70 | ||
|
|
1567f8270c | ||
|
|
0b5d019dc8 | ||
|
|
932a04a398 | ||
|
|
05c0839936 | ||
|
|
95ae891212 | ||
|
|
3aea04b6cb | ||
|
|
1d28768bb7 | ||
|
|
14d9794f57 | ||
|
|
9cd38db684 | ||
|
|
6a5af32f6c | ||
|
|
af0b430927 | ||
|
|
8c7f851692 | ||
|
|
57a2daa5e4 | ||
|
|
63d27aec64 | ||
|
|
90c5c16b00 | ||
|
|
4d94205547 | ||
|
|
31ff50ffd8 | ||
|
|
22e4553720 | ||
|
|
8b268cb647 | ||
|
|
168a955380 | ||
|
|
37ec987a32 | ||
|
|
37b5d1c6e8 | ||
|
|
09abbbadc9 | ||
|
|
8b0f95c53d | ||
|
|
920ef6e5c4 | ||
|
|
6829ff921d | ||
|
|
c6f4a13abc | ||
|
|
67f312075a | ||
|
|
5881b5b533 | ||
|
|
aa4da2ac4e | ||
|
|
d6c1e8069d | ||
|
|
74a8df6842 | ||
|
|
157fa0c1dd | ||
|
|
0139dd45c9 | ||
|
|
9546bf5bb7 | ||
|
|
1714028e83 | ||
|
|
d178c458df | ||
|
|
415aebfd74 | ||
|
|
68fd8fcfc5 | ||
|
|
4c16af918d | ||
|
|
b16601704f | ||
|
|
3a2aa135a1 | ||
|
|
6a43773b55 | ||
|
|
fa5132aba5 | ||
|
|
c21a2bf58b | ||
|
|
55ef1ecbd8 | ||
|
|
3883eddd5d | ||
|
|
40dd752cb7 | ||
|
|
3c6ae546f6 | ||
|
|
51fe0fe41f | ||
|
|
1957d960aa | ||
|
|
7098395323 | ||
|
|
57287cea3a | ||
|
|
9158f0bb79 | ||
|
|
55e5298ba6 | ||
|
|
fcc34f7942 | ||
|
|
b70d65f37b | ||
|
|
693c3f42a6 | ||
|
|
eab868db05 | ||
|
|
5a9c463457 | ||
|
|
8119cdbb36 | ||
|
|
8ce7a205f1 | ||
|
|
e943a1af82 | ||
|
|
e4cb8b3116 | ||
|
|
4afc413d8b | ||
|
|
df93c986f9 | ||
|
|
6f9336d067 | ||
|
|
82af101f9c | ||
|
|
8e4f4c39bb |
No files matched your search
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"csharpier": {
|
||||
"version": "0.30.6",
|
||||
"commands": [
|
||||
"dotnet-csharpier"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/submodules/
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"tabWidth": 2
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
name: Build Assets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
cdn_branch:
|
||||
type: string
|
||||
required: false
|
||||
default: main
|
||||
description: What CDN branch to write to
|
||||
zip_url:
|
||||
type: string
|
||||
required: false
|
||||
description: ZIP URL to download instead of Steam client
|
||||
zip_root:
|
||||
type: string
|
||||
required: false
|
||||
description: Root dir of ZIP which houses the executable and Data dir
|
||||
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.cdn_branch }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
VIDEOS_SHEET: ${{ secrets.VIDEOS_SHEET }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
WOTB_DLC_CDN: ${{ secrets.WOTB_DLC_CDN }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_REPO: blitzkit/assets
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||
ALLOW_ROBOTS: true
|
||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||
PUBLIC_PATREON_CLIENT_ID: ${{ secrets.PUBLIC_PATREON_CLIENT_ID }}
|
||||
PUBLIC_PATREON_REDIRECT_URI: ${{ secrets.PUBLIC_PATREON_REDIRECT_URI }}
|
||||
PATREON_CLIENT_SECRET: ${{ secrets.PATREON_CLIENT_SECRET }}
|
||||
PUBLIC_NITROPAY_ID: ${{ secrets.PUBLIC_NITROPAY_ID }}
|
||||
PUBLIC_DEBUG_MISSING_I18N: false
|
||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
||||
PUBLIC_ASSET_FAST_USER: blitzkit
|
||||
PUBLIC_ASSET_FAST_REPO: assets
|
||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
||||
|
||||
jobs:
|
||||
download_client:
|
||||
name: Download client
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: (ZIP) Maximize build space
|
||||
if: github.event.inputs.zip_url != ''
|
||||
uses: easimon/maximize-build-space@master
|
||||
with:
|
||||
root-reserve-mb: 512
|
||||
swap-size-mb: 1024
|
||||
remove-dotnet: 'true'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: (Steam) Setup bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
if: github.event.inputs.zip_url == ''
|
||||
|
||||
- name: (Steam) Install dependencies
|
||||
if: github.event.inputs.zip_url == ''
|
||||
run: bun install
|
||||
|
||||
- name: (Steam) Setup DepotDownloader
|
||||
if: github.event.inputs.zip_url == ''
|
||||
run: bun run setup:depotdownloader
|
||||
|
||||
- name: (Steam) Download client
|
||||
if: github.event.inputs.zip_url == ''
|
||||
run: |
|
||||
chmod +x ./temp/depotDownloader/DepotDownloader
|
||||
./temp/depotDownloader/DepotDownloader -q -os windows -app 444200 -username ${{ secrets.DEPOT_DOWNLOADER_USERNAME }} -password "${{ secrets.DEPOT_DOWNLOADER_PASSWORD }}"
|
||||
|
||||
- name: (Steam) Apply patches
|
||||
if: github.event.inputs.zip_url == ''
|
||||
run: bun setup:patches --depot
|
||||
|
||||
- name: (ZIP) Download client
|
||||
if: github.event.inputs.zip_url != ''
|
||||
env:
|
||||
ZIP_URL: ${{ github.event.inputs.zip_url }}
|
||||
ZIP_ROOT: ${{ github.event.inputs.zip_root }}
|
||||
run: |
|
||||
wget -q -O client.zip $ZIP_URL
|
||||
unzip -q client.zip -d client
|
||||
rm client.zip
|
||||
mkdir -p depots/444202/0
|
||||
mv client/$ZIP_ROOT/* depots/444202/0
|
||||
|
||||
- name: Archive depots
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: depots
|
||||
path: depots
|
||||
|
||||
build_assets:
|
||||
name: Build assets
|
||||
runs-on: ubuntu-latest
|
||||
needs: download_client
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Setup bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Lint
|
||||
run: bun run lint:website
|
||||
|
||||
- name: Download depots
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: depots
|
||||
path: depots
|
||||
|
||||
- name: AppArmor hack
|
||||
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
|
||||
|
||||
- name: Start server and build assets
|
||||
run: |
|
||||
bun dev:website --verbosepa &
|
||||
SERVER_PID=$!
|
||||
|
||||
bun run build:assets --all-targets --depot --production
|
||||
|
||||
kill $SERVER_PID || true
|
||||
@@ -12,19 +12,6 @@ concurrency:
|
||||
env:
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||
ALLOW_ROBOTS: 'true'
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -20,8 +20,6 @@ env:
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||
|
||||
jobs:
|
||||
host:
|
||||
@@ -29,12 +27,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
# with:
|
||||
# bun-version: 1.1.33
|
||||
# with:
|
||||
# bun-version: 1.1.33
|
||||
|
||||
- name: Download release assets
|
||||
run: |
|
||||
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/blitzkit/blitzkit/releases/latest \
|
||||
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkit/releases/latest \
|
||||
| grep "browser_download_url.*bot.zip" \
|
||||
| cut -d : -f 2,3 \
|
||||
| tr -d \")
|
||||
|
||||
@@ -25,17 +25,4 @@ jobs:
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||
ALLOW_ROBOTS: 'true'
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
||||
run: bun build:ratingleaderboard --region=asia
|
||||
@@ -25,17 +25,4 @@ jobs:
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||
ALLOW_ROBOTS: 'true'
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
||||
run: bun build:ratingleaderboard --region=eu
|
||||
@@ -25,17 +25,4 @@ jobs:
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }}
|
||||
PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }}
|
||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||
ALLOW_ROBOTS: 'true'
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
||||
run: bun build:ratingleaderboard --region=com
|
||||
+108
-12
@@ -14,46 +14,110 @@ permissions:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref == 'refs/heads/main' }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
|
||||
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
|
||||
# PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
|
||||
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
|
||||
ALLOW_ROBOTS: ${{ secrets.ALLOW_ROBOTS }}
|
||||
ALLOW_ROBOTS: true
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }}
|
||||
WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }}
|
||||
DEPOT_DOWNLOADER_USERNAME: ${{ secrets.DEPOT_DOWNLOADER_USERNAME }}
|
||||
DEPOT_DOWNLOADER_PASSWORD: ${{ secrets.DEPOT_DOWNLOADER_PASSWORD }}
|
||||
STEAM_OS: windows
|
||||
STEAM_APP: 3341250
|
||||
STEAM_DEPOT: 3341251
|
||||
PUBLIC_ASSET_BRANCH: ue
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||
PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }}
|
||||
PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }}
|
||||
PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }}
|
||||
PUBLIC_GUIDE_WEBSITE: ${{ secrets.PUBLIC_GUIDE_WEBSITE }}
|
||||
SERVICING: ${{ secrets.SERVICING }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
- uses: actions/configure-pages@v5
|
||||
- name: Setup bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Configure pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 9.0
|
||||
|
||||
- name: Download Steam Depot
|
||||
run: |
|
||||
mkdir -p temp
|
||||
|
||||
echo "Downloading..."
|
||||
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/SteamRE/DepotDownloader/releases/latest | \
|
||||
grep -i "linux-x64" | \
|
||||
grep "browser_download_url" | \
|
||||
cut -d '"' -f 4)
|
||||
curl -L "$DOWNLOAD_URL" -o temp/depotDownloader.zip
|
||||
|
||||
echo "Unzipping..."
|
||||
unzip temp/depotDownloader.zip -d temp/depotDownloader
|
||||
|
||||
echo "Download complete; files:"
|
||||
ls temp/depotDownloader
|
||||
|
||||
- name: Download dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Build website
|
||||
run: bun run build:website
|
||||
- name: Restore dependencies
|
||||
run: |
|
||||
cd src/BlitzKit.CLI
|
||||
dotnet restore
|
||||
|
||||
- name: Download client
|
||||
run: |
|
||||
chmod +x temp/depotDownloader/DepotDownloader
|
||||
temp/depotDownloader/DepotDownloader \
|
||||
-username "${{ env.DEPOT_DOWNLOADER_USERNAME }}" \
|
||||
-password "${{ env.DEPOT_DOWNLOADER_PASSWORD }}" \
|
||||
-os ${{ env.STEAM_OS }} \
|
||||
-app ${{ env.STEAM_APP }} \
|
||||
-depot ${{ env.STEAM_DEPOT }} \
|
||||
-dir temp/depot \
|
||||
-filelist filelist.txt
|
||||
|
||||
- name: Download containers
|
||||
run: |
|
||||
cd src/BlitzKit.CLI
|
||||
dotnet run unpack ../../temp/depot
|
||||
|
||||
- name: Run API and build website
|
||||
run: |
|
||||
cd src/BlitzKit.CLI
|
||||
dotnet run api --depot --verbosepa &
|
||||
SERVER_PID=$!
|
||||
|
||||
cd ../..
|
||||
bun run buildonly:website
|
||||
|
||||
kill $SERVER_PID || true
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: dist/website
|
||||
|
||||
deploy-github-pages:
|
||||
@@ -69,3 +133,35 @@ jobs:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
deploy-vercel:
|
||||
if: ${{ github.ref != 'refs/heads/main' }}
|
||||
name: Deploy to Vercel
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
environment:
|
||||
name: Preview
|
||||
url: ${{ steps.url.outputs.url }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: .vercel/output/
|
||||
|
||||
- name: Install Vercel CLI
|
||||
run: bun install --global vercel
|
||||
|
||||
- name: Deploy Project Artifacts to Vercel
|
||||
shell: bash
|
||||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | tee deploy.log
|
||||
|
||||
- name: Set preview url
|
||||
id: url
|
||||
run: echo "url=$(tail -1 deploy.log)">> $GITHUB_OUTPUT
|
||||
+493
-4
@@ -1,7 +1,9 @@
|
||||
# src/BlitzKit.CLI/Protos
|
||||
|
||||
node_modules
|
||||
_node_modules
|
||||
package-lock.json
|
||||
*.env
|
||||
.env
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/playwright/.cache/
|
||||
@@ -22,9 +24,496 @@ depots
|
||||
public/sitemap*
|
||||
/firebase.json
|
||||
target
|
||||
# packages/core/src/protos/*.ts
|
||||
# packages/core/src/protos/*
|
||||
# !packages/core/src/protos/*.proto
|
||||
/.vercel
|
||||
/.astro
|
||||
.vercel
|
||||
/src
|
||||
/packages/bot/src/prisma
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from `dotnet new gitignore`
|
||||
|
||||
# dotenv files
|
||||
.env
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# Tye
|
||||
.tye/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
|
||||
# REMOVING THIS BECAUSE IT IGNORES PACKAGES LOL
|
||||
# **/[Pp]ackages/*
|
||||
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
.idea/
|
||||
|
||||
##
|
||||
## Visual studio for Mac
|
||||
##
|
||||
|
||||
|
||||
# globs
|
||||
Makefile.in
|
||||
*.userprefs
|
||||
*.usertasks
|
||||
config.make
|
||||
config.status
|
||||
aclocal.m4
|
||||
install-sh
|
||||
autom4te.cache/
|
||||
*.tar.gz
|
||||
tarballs/
|
||||
test-results/
|
||||
|
||||
# Mac bundle stuff
|
||||
*.dmg
|
||||
*.app
|
||||
|
||||
# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# Vim temporary swap files
|
||||
*.swp
|
||||
+3
-3
@@ -4,6 +4,6 @@
|
||||
[submodule "submodules/CUE4Parse"]
|
||||
path = submodules/CUE4Parse
|
||||
url = https://github.com/FabianFG/CUE4Parse
|
||||
[submodule "submodules/blitzkit-internal"]
|
||||
path = submodules/blitzkit-internal
|
||||
url = https://github.com/blitzkit/internal
|
||||
[submodule "submodules/UAssetAPI"]
|
||||
path = submodules/UAssetAPI
|
||||
url = https://github.com/atenfyr/UAssetAPI
|
||||
@@ -0,0 +1 @@
|
||||
/submodules/
|
||||
Vendored
+17
-9
@@ -12,6 +12,7 @@
|
||||
"APAC",
|
||||
"apcr",
|
||||
"applypatches",
|
||||
"arrayfy",
|
||||
"artefacts",
|
||||
"astrojs",
|
||||
"astrolib",
|
||||
@@ -36,7 +37,6 @@
|
||||
"cacheable",
|
||||
"Callouts",
|
||||
"Camo",
|
||||
"Carro",
|
||||
"CCPAOPTOUT",
|
||||
"CDON",
|
||||
"classname",
|
||||
@@ -44,7 +44,6 @@
|
||||
"closedkrieg",
|
||||
"cockroackdb",
|
||||
"Coef",
|
||||
"Combattimento",
|
||||
"cooldown",
|
||||
"corelations",
|
||||
"corsproxy",
|
||||
@@ -56,7 +55,6 @@
|
||||
"dbid",
|
||||
"Ddpf",
|
||||
"Ddsd",
|
||||
"deadrail",
|
||||
"debugflags",
|
||||
"deburr",
|
||||
"decalmask",
|
||||
@@ -75,6 +73,10 @@
|
||||
"dxgi",
|
||||
"echarts",
|
||||
"Everytime",
|
||||
"Exergizable",
|
||||
"Exergize",
|
||||
"Exergizing",
|
||||
"Exergy",
|
||||
"FASTNAME",
|
||||
"flexdirection",
|
||||
"FOURCC",
|
||||
@@ -86,7 +88,6 @@
|
||||
"gameplay",
|
||||
"glsl",
|
||||
"GLTF",
|
||||
"gtag",
|
||||
"haha",
|
||||
"highp",
|
||||
"iife",
|
||||
@@ -109,7 +110,6 @@
|
||||
"Maddoxkkm",
|
||||
"malum",
|
||||
"mantlets",
|
||||
"mediump",
|
||||
"metallicness",
|
||||
"metalness",
|
||||
"minitelrose",
|
||||
@@ -123,12 +123,14 @@
|
||||
"NEGATIVEX",
|
||||
"NEGATIVEY",
|
||||
"NEGATIVEZ",
|
||||
"Newtonsoft",
|
||||
"NITROPAY",
|
||||
"nivo",
|
||||
"nmatname",
|
||||
"noout",
|
||||
"normalmap",
|
||||
"oneof",
|
||||
"Oodle",
|
||||
"oopsies",
|
||||
"Oopsy",
|
||||
"opentest",
|
||||
@@ -136,17 +138,19 @@
|
||||
"outdir",
|
||||
"outfile",
|
||||
"ownedtanks",
|
||||
"padder",
|
||||
"paks",
|
||||
"partytown",
|
||||
"PIXELFORMAT",
|
||||
"playerachievements",
|
||||
"playerinfo",
|
||||
"playform",
|
||||
"Playtest",
|
||||
"pngjs",
|
||||
"POSITIVEX",
|
||||
"POSITIVEY",
|
||||
"POSITIVEZ",
|
||||
"precompute",
|
||||
"preforged",
|
||||
"Promisable",
|
||||
"proto",
|
||||
"protobuf",
|
||||
@@ -154,6 +158,7 @@
|
||||
"Pyogenics",
|
||||
"ratingleaderboard",
|
||||
"raycaster",
|
||||
"regen",
|
||||
"researchable",
|
||||
"Resvg",
|
||||
"rizz",
|
||||
@@ -190,9 +195,10 @@
|
||||
"TEXCOORD",
|
||||
"tresabhi",
|
||||
"tungstentip",
|
||||
"Turretless",
|
||||
"TYPELESS",
|
||||
"uasset",
|
||||
"ubjson",
|
||||
"uexp",
|
||||
"Unicum",
|
||||
"UNLOCALIZED",
|
||||
"UNORM",
|
||||
@@ -200,7 +206,9 @@
|
||||
"Unregistering",
|
||||
"unrotate",
|
||||
"unwrapper",
|
||||
"Usmap",
|
||||
"vercel",
|
||||
"Verts",
|
||||
"vickers",
|
||||
"vitepress",
|
||||
"Vovko",
|
||||
@@ -222,12 +230,12 @@
|
||||
"yolo",
|
||||
"youtuber",
|
||||
"youtubers",
|
||||
"zoomable",
|
||||
"zustand"
|
||||
],
|
||||
"deno.enable": false,
|
||||
"deno.unstable": false,
|
||||
"cSpell.enableFiletypes": ["glsl", "proto3"],
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||
"liveServer.settings.multiRootWorkspaceName": "blitzkit"
|
||||
"liveServer.settings.multiRootWorkspaceName": "blitzkit",
|
||||
"dotnet.defaultSolution": "blitzkit.sln"
|
||||
}
|
||||
Vendored
+41
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/blitzkit.sln",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/blitzkit.sln",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"--project",
|
||||
"${workspaceFolder}/blitzkit.sln"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
# BlitzKit License
|
||||
|
||||
Version 1.1, August 5th, 2025. Copyright (c) TrèsAbhi.
|
||||
|
||||
Permission is hereby granted to anyone to:
|
||||
|
||||
- Fork, clone, and download the contents of this repository.
|
||||
- Modify the code locally in private.
|
||||
- Use and run the code **only for personal, non-public testing, or educational purposes**.
|
||||
|
||||
The following restrictions apply:
|
||||
|
||||
- You may **not** deploy, host, or make this project or any derivative publicly accessible.
|
||||
- You may **not** share screenshots, recordings, or any form of media from this project unless you intend to merge your changes back into BlitzKit.
|
||||
- You may **not** use this project or its contents in any public or commercial product.
|
||||
- You may **not** redistribute modified or unmodified versions of this project.
|
||||
|
||||
Contributions:
|
||||
|
||||
- You are encouraged to propose changes or improvements via pull requests to the original BlitzKit repository.
|
||||
- Any such contributions will be considered under the same license terms unless explicitly stated otherwise.
|
||||
|
||||
Violations of this license may result in revocation of usage rights and takedown requests.
|
||||
|
||||
For questions or licensing inquiries, contact support@blitzkit.app.
|
||||
|
||||
## Notes on Existing Forks
|
||||
|
||||
All forks fall under these categories:
|
||||
|
||||
- If your fork was made from commit `8462901` (Apr 17, 2023) or between commits `2958124` (Jul 3, 2023) and `85e483e` (Jul 13, 2024), your fork falls under the **MIT license**.
|
||||
- If your fork was made from commits between `5646093` (Jul 13, 2024) and `e3f131c` (Aug 5, 2025), your fork falls under the **AGPL-3.0 license**.
|
||||
- If your fork was made between commit `f7c356d` (Apr 17, 2023) and `2958124` (Jul 3, 2023), your fork falls under **a default exclusive copyright**.
|
||||
- If your fork was made from commits between `e3f131c` (Aug 5, 2025) and today, your fork falls under **this license**.
|
||||
|
||||
MIT and AGPL-3.0 licensed fork owners:
|
||||
|
||||
- You may continue to use your fork of BlitzKit under the corresponding license.
|
||||
- You may upgrade your fork up to commit `5cab394` (Aug 4, 2025) and keep the AGPL-3.0 license.
|
||||
- You may upgrade to commit `e3f131c` (Aug 5, 2025) or beyond but have to **switch to this license** where all rules apply.
|
||||
- If you upgrade to commit `e3f131c` (Aug 5, 2025) or beyond, you must retract all public deployments of BlitzKit.
|
||||
- Existing screenshots, recordings, or any form of media can remain.
|
||||
|
||||
Default exclusive copyright fork owners:
|
||||
|
||||
- You may continue to use their forks under the AGPL-3.0 license as no license was applied to BlitzKit at the time of forking.
|
||||
|
||||
BlitzKit licensed fork owners:
|
||||
|
||||
- You may continue to upgrade to the latest commits only under the conditions of this license.
|
||||
@@ -0,0 +1,29 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.2.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlitzKit.CLI", "src\BlitzKit.CLI\BlitzKit.CLI.csproj", "{65351C93-2DB4-8401-3BE1-C253571187A1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{65351C93-2DB4-8401-3BE1-C253571187A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{65351C93-2DB4-8401-3BE1-C253571187A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{65351C93-2DB4-8401-3BE1-C253571187A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{65351C93-2DB4-8401-3BE1-C253571187A1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{65351C93-2DB4-8401-3BE1-C253571187A1} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {70DA613E-E0B8-4525-93DB-3BF91568E845}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,23 +0,0 @@
|
||||
# BlitzKit 1.27.10
|
||||
|
||||
This update changes the URLs across the whole website, removing the "tools" prefix and simplifying other aspects too.
|
||||
|
||||
## Changes
|
||||
|
||||
- Removed "full" tank names
|
||||
- For example, tanks like the "Carro 45t" had full names like "Carro Combattimento 45t" which remained pretty much unused, so they have been removed
|
||||
- Reduced the shadow below the navigation bar
|
||||
- Removed the "tools" prefix from the URLs; here are the paths:
|
||||
- `/tools/tankopedia` -> `/tanks`
|
||||
- `/tools/tankopedia/12345` -> `/tanks/tank-name`
|
||||
- `/tools/compare` -> `/compare`
|
||||
- `/tools/embed` -> `/embed`
|
||||
- `/tools/embed/embed-name` -> `/embed/embed-name`
|
||||
- `/tools/gallery` -> `/gallery`
|
||||
- `/tools/performance` -> `/performance`
|
||||
- `/tools/session` -> `/session`
|
||||
- `/tools/tier-list` -> `/tier-list`
|
||||
|
||||
## Technical Features
|
||||
|
||||
- The asset mangler now uses http headers and even more heuristics to minimize re-creating unchanged assets
|
||||
@@ -1,7 +0,0 @@
|
||||
# BlitzKit 1.27.11
|
||||
|
||||
This update affects both the bot and the website.
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Added a proper CDN domain to avoid error 429s and any slowdowns
|
||||
@@ -1,18 +0,0 @@
|
||||
# BlitzKit 1.27.12
|
||||
|
||||
This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added the ability to sort by HE shell penetration
|
||||
- The Tankopedia compare bars now account for equipment and selected shells
|
||||
- Made the hero section of the Tankopedia a bit shorter to show users that the page is scrollable
|
||||
|
||||
## Fixes
|
||||
|
||||
- The "Clear filters" button no longer shows up after clearing the search bar
|
||||
- Guns for some tanks no longer go transparent when far away from the camera
|
||||
- The dynamic armor tab no longer lags and flickers when rotating the turret of a tank
|
||||
- Reimplemented the missing tool backgrounds in the navigation bar hamburger menu
|
||||
- The navigation bar now properly goes transparent for pages that request like the Tankopedia pages
|
||||
- Removed the tank name text outline because it doesn't work on most devices
|
||||
@@ -1,19 +0,0 @@
|
||||
# BlitzKit 1.27.13
|
||||
|
||||
This update adds a feature for a future version of WoTB 👁️👃👁️
|
||||
|
||||
## Features
|
||||
|
||||
- Added compatibility for the new mechanic for the upcoming Polish Tank Destroyers
|
||||
- This code will remain dormant until the update for WoTB is released
|
||||
- Added a progress bar to the hero section of the Tankopedia to show that the model is loading
|
||||
- Reordered some Tankopedia statistics to bring important statistics like Damage to the very top
|
||||
|
||||
## Fixes
|
||||
|
||||
- The second column in the footer is now aligned on mobile devices
|
||||
- Fixed an issue that stopped the armor highlighting from working on the Kiwi browser and on older devices
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Removed permissions for robots to crawl non-blitzkit.app domains
|
||||
@@ -1,8 +0,0 @@
|
||||
# BlitzKit 1.27.14
|
||||
|
||||
This is the 14th patch for `1.27`, making it the new longest lasting version beating the previous record of `1.15.13`!
|
||||
|
||||
## Fixes
|
||||
|
||||
- Optimized the rendering of the shells in the Tankopedia search
|
||||
- The Assault Shells cursor now works on iOS devices
|
||||
@@ -1,7 +0,0 @@
|
||||
# BlitzKit 1.27.15
|
||||
|
||||
I did not see this coming
|
||||
|
||||
## Fixes
|
||||
|
||||
- The Assault Shell graph now supports damage factors of above 100% now
|
||||
@@ -1,25 +0,0 @@
|
||||
# BlitzKit 1.27.16
|
||||
|
||||
## Features
|
||||
|
||||
- Added links to GuidesBlitz to Tankopedia to aid users understand tanks beyond just numbers and stats
|
||||
- Added a gun depression and yaw visualizer
|
||||
|
||||
## Changes
|
||||
|
||||
- Made the colors of the advanced highlighting mode more subtle
|
||||
- Made the Tankopedia stat lines more condensed
|
||||
- You can now scroll the page even with your cursor on the Tankopedia sandbox
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fixed a bug where the range of increased gun depression was incorrectly doubled
|
||||
- Removed an unintended space before the "x" in the "Gun damaged" stat
|
||||
- Fixed an issue causing the 3D renderer to render frames even when off screen
|
||||
- Fixed a differential issue causing excessive rerendering of the stat lines
|
||||
- Images no longer exceed the width of the device in the docs
|
||||
- Assault shells no longer scale the module damage with distance
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Removed all code relating to the canceled "Shooting Range" mode
|
||||
@@ -1,18 +0,0 @@
|
||||
# BlitzKit 1.27.17
|
||||
|
||||
This update was released early for the website. Today, it'll be officially announced and released for the bot
|
||||
|
||||
## Features
|
||||
|
||||
- Added the shell reload visualizer to aid people in getting a feel for how long shell reloads really are
|
||||
- Added lines of stats for the burst shells
|
||||
|
||||
## Changes
|
||||
|
||||
- Removed the redundant word "Shell" from "Shell reload" and "Shell reloads"
|
||||
- Removed the penetration over distance slider
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fixed the DPM of tanks with burst shells like the ATAC
|
||||
- The DPM will still be different from the game due to a bug in World of Tanks Blitz; I am trying to get Wargaming to fix it; trust BlitzKit!
|
||||
@@ -1,25 +0,0 @@
|
||||
# BlitzKit 1.27.7
|
||||
|
||||

|
||||
|
||||
This update only affects the website.
|
||||
|
||||
## Features
|
||||
|
||||
- Added a new foggy-wireframe transition between tabs to smooth out the jarring jumps
|
||||
- Added animations pop-in and out animations on a few elements
|
||||
- The tank name title now shrinks in size as soon as a disturbance is caused
|
||||
- The shell selector, antagonist switcher, and thicknesses range now ease into frame
|
||||
- The Tankopedia search page now loads as a skeleton by default before populating with tanks, allowing for the recently viewed tanks to load without cumulative shift
|
||||
- Something similar was done to the Gallery tool
|
||||
- Gave the meta section of the website some zest with nation-based backdrops
|
||||
- The compare tabs in the Tankopedia are now centered
|
||||
|
||||
## Fixes
|
||||
|
||||
- The camera no longer snaps to the initial position when switching between tabs
|
||||
|
||||
## Technical Changes
|
||||
|
||||
- Backported some technologies from BlitzKit Reforged; you will not notice any differences in usage
|
||||
- The popular tanks and gallery indexings have been moved to the asynchronous cron job
|
||||
@@ -1,12 +0,0 @@
|
||||
# BlitzKit 1.27.8
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- The website now uses Inter as the font
|
||||
- Added a cool new non-disturbed state for the Tankopedia because why not
|
||||
|
||||
## Changes
|
||||
|
||||
- Removed the Discord plug and language changer from the homepage
|
||||
@@ -1,27 +0,0 @@
|
||||
# BlitzKit 1.27.9
|
||||
|
||||
BlitzKit's great, but there's far too many numbers. This update adds a few visualizers to help new players understand how things relate numerically.
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- Added the turret and hull traverse speed visualizer
|
||||
- Added the shell ricochet and normalization angles visualizer
|
||||
- Added the view-range visualizer
|
||||
- Added a search bar to the Tankopedia characteristics
|
||||
- Bumped the decimal places for vehicle dimensions and volume
|
||||
- Made tank ranks softer (the bars beneath the tank characteristics)
|
||||
- Gave the navigation bar better distinction from the rest of the page
|
||||
- Increased the number of characteristics rows to 3 on select devices
|
||||
- Switched to a more contrasting classic style of components across the website (it's subtle, but beautiful)
|
||||
|
||||
## Changes
|
||||
|
||||
- Removed units
|
||||
|
||||
## Fixes
|
||||
|
||||
- Clarified a few confusing row labels in the Compare tool
|
||||
- Made the Tankopedia hero section dynamically smaller on mobile phones to allow scrolling
|
||||
- Tank ranks no longer reach 0 or go above the number of vehicles in the comparison
|
||||
@@ -0,0 +1,15 @@
|
||||
`Blitz/Config/DefaultGameplayTags.ini` seems to have an exhaustive list of all maps, tanks, sets, game modes, legendary camouflages, consumables, skills, quick commands, UI components, etc.
|
||||
|
||||
`Blitz/Config/DefaultGame.ini` seems to have all locales under the name of "Cultures"
|
||||
|
||||
`Blitz/Config/DefaultDlc.ini` contains DLC info; essentially extra `pak` containers
|
||||
|
||||
`Blitz/Content/TanksStuff/Common/DT_TankClasses.uasset` seems to have all tank classes
|
||||
|
||||
`C:\Users\coola\AppData\Local\Blitz\Saved\PersistentDownloadDir\http\dl-wotblitz-gc.wargaming.net\dlc\p14y73c7_p5e_b10gg3RS_big_play\ue_localizations\development\general` has all localization files
|
||||
|
||||
`Blitz/Config/DefaultBzBattleSettings.ini` contains all modules that can take damage when a tank takes fall damage
|
||||
|
||||
`Blitz/Config/DefaultLocalizationFetcher.ini` has a list of all locales
|
||||
|
||||
`Blitz/Content/TanksStuff/Dev/DT_DAVATanks.uasset` has all DAVA-UE tank mappings
|
||||
@@ -0,0 +1 @@
|
||||
Blitz/Content/Paks/pakchunk0-Windows.pak
|
||||
+15
-15
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "blitzkit",
|
||||
"private": true,
|
||||
"version": "1.27.17",
|
||||
"version": "1.27.6",
|
||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||
"type": "module",
|
||||
"types": "./types.d.ts",
|
||||
@@ -13,6 +13,7 @@
|
||||
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
||||
"build:bot": "cd packages/scripts && bun run build:bot",
|
||||
"build:website": "bun build:prisma --no-hints && cd packages/website && bun run build",
|
||||
"buildonly:website": "bun build:prisma --no-hints && cd packages/website && bun run buildonly",
|
||||
"build:prisma": "prisma generate",
|
||||
"build:sitemap": "bun scripts/sitemap.ts",
|
||||
"build:docs": "vitepress build docs",
|
||||
@@ -21,8 +22,6 @@
|
||||
"start:bot": "bun dist/bot/main.js",
|
||||
"dev:docs": "vitepress dev docs",
|
||||
"dev:website": "cd packages/website && bun run dev",
|
||||
"dev": "bun run dev:website",
|
||||
"dev:api": "bun --filter=@blitzkit/api run dev",
|
||||
"setup:depotdownloader": "bun --filter=@blitzkit/scripts run setup:depotdownloader",
|
||||
"setup:patches": "bun --filter=@blitzkit/scripts run setup:patches",
|
||||
"start:website": "bun --filter=@blitzkit/website run start",
|
||||
@@ -33,27 +32,28 @@
|
||||
"update": "yarn upgrade --latest",
|
||||
"tunnel": "cloudflared tunnel --url http://localhost:3000",
|
||||
"discoverids": "scripts/discoverIds.ts",
|
||||
"build:protos": "bun packages/scripts/src/protos.ts",
|
||||
"protos": "rm -rf src/BlitzKit.CLI/Protos && mkdir -p src/BlitzKit.CLI/Protos && protoc packages/core/src/protos/*.proto --csharp_out=src/BlitzKit.CLI/Protos && bun packages/scripts/src/protos.ts",
|
||||
"preview:website": "cd packages/website && bun run preview",
|
||||
"build:reviews": "cd packages/scripts && bun build:reviews",
|
||||
"build:ids": "cd packages/scripts && bun build:ids",
|
||||
"prunestrings": "cd packages/scripts && bun prunestrings"
|
||||
"prunestrings": "cd packages/scripts && bun prunestrings",
|
||||
"dev:cli:unpack": "cd src/BlitzKit.CLI && dotnet run unpack \"C:/Program Files (x86)/Steam/steamapps/common/World of Tanks Blitz Playtest\" --no-overwrite",
|
||||
"mangle": "cd src/BlitzKit.CLI && dotnet run mangle",
|
||||
"mangle2": "cd src/BlitzKit.CLI && dotnet run mangle2",
|
||||
"api": "cd src/BlitzKit.CLI && dotnet run api",
|
||||
"dev:api": "cd src/BlitzKit.CLI && dotnet watch run api"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cheerio": "^1.1.2",
|
||||
"googleapis": "^144.0.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"protobufjs": "^7.5.2",
|
||||
"quicklime": "^1.2.0",
|
||||
"sharp": "^0.33.5"
|
||||
"sharp": "^0.33.5",
|
||||
"lodash-es": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.14.1",
|
||||
"prettier": "^3.5.3",
|
||||
"prisma": "^6.6.0",
|
||||
"typescript": "^5.8.3"
|
||||
"@types/node": "^22.5.4",
|
||||
"prettier": "^3.3.3",
|
||||
"prisma": "^6.0.0",
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
}
|
||||
@@ -107,8 +107,8 @@ export const auctionCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
|
||||
if (!tank) return '';
|
||||
|
||||
const name = `[${tank.name}](<https://blitzkit.app/tanks/${
|
||||
tank.slug
|
||||
const name = `[${tank.name}](<https://blitzkit.app/tools/tankopedia/${
|
||||
tank.id
|
||||
}>)`;
|
||||
const next =
|
||||
data.next_price === null
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { getAccountInfo, getClanAccountInfo } from '@blitzkit/core';
|
||||
import {
|
||||
getAccountInfo,
|
||||
getClanAccountInfo,
|
||||
linkBlitzAndDiscord,
|
||||
} from '@blitzkit/core';
|
||||
import { teal } from '@radix-ui/colors';
|
||||
import { Glow } from '../components/AllStatsOverview/components/HeroStat/components/Glow';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { linkBlitzAndDiscord } from '../core/db/linkBlitzAndDiscord';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteUsername } from '../core/discord/autocompleteUsername';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
|
||||
@@ -78,7 +78,7 @@ export const ownedTanksCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
)
|
||||
.map(
|
||||
(tank) =>
|
||||
`[${flags[tank.nation]} ${markdownEscape(unwrap(tank.name))}](<https://blitzkit.app/tanks/${tank.slug}>)`,
|
||||
`[${flags[tank.nation]} ${markdownEscape(unwrap(tank.name))}](<https://blitzkit.app/tools/tankopedia/${tank.id}>)`,
|
||||
);
|
||||
const lines = [title, ...tankList];
|
||||
|
||||
|
||||
@@ -197,10 +197,15 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
|
||||
turret.guns.forEach((gun) => {
|
||||
if (
|
||||
gun.research_cost !== undefined &&
|
||||
typeof gun.research_cost.research_cost_type!.value === 'number'
|
||||
gun.gun_type!.value.base.research_cost !== undefined &&
|
||||
typeof gun.gun_type!.value.base.research_cost
|
||||
.research_cost_type!.value === 'number'
|
||||
) {
|
||||
gunXps.set(gun.id, gun.research_cost.research_cost_type!.value);
|
||||
gunXps.set(
|
||||
gun.gun_type!.value.base.id,
|
||||
gun.gun_type!.value.base.research_cost.research_cost_type!
|
||||
.value,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { idToRegion } from '@blitzkit/core';
|
||||
import { flagUserActivity } from '../db/flagUserActivity';
|
||||
import { usersDatabase } from '../db/users';
|
||||
import { idToRegion, usersDatabase } from '@blitzkit/core';
|
||||
import { flagUserActivity } from '@blitzkit/core/src/blitzkit/flagUserActivity';
|
||||
|
||||
export async function getBlitzFromDiscord(discordId: bigint) {
|
||||
const unique = await usersDatabase.discordUser.findUnique({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { usersDatabase } from '../db/users';
|
||||
import { usersDatabase } from '@blitzkit/core';
|
||||
import { client } from '../discord/client';
|
||||
|
||||
const EXIT_EVENTS = [
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"dependencies": {
|
||||
"@octokit/plugin-throttling": "^8.2.0",
|
||||
"@octokit/rest": "^20.1.1",
|
||||
"@prisma/client": "^6.6.0",
|
||||
"@prisma/client": "^5.19.1",
|
||||
"adm-zip": "^0.5.16",
|
||||
"crc": "^4.3.2",
|
||||
"dotenv": "^16.4.5",
|
||||
|
||||
@@ -4,7 +4,6 @@ export * from './classes';
|
||||
export * from './constants';
|
||||
export * from './equipmentPrice';
|
||||
export * from './fetchBlitz';
|
||||
export * from './fetchGlossary';
|
||||
export * from './generateStats';
|
||||
export * from './getAccountAchievements';
|
||||
export * from './getAccountInfo';
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { assertSecret } from './assertSecret';
|
||||
|
||||
export function asset(path: string) {
|
||||
return `${assertSecret(import.meta.env.PUBLIC_ASSET_BASE)}/${path}`;
|
||||
return `https://raw.githubusercontent.com/${assertSecret(
|
||||
import.meta.env.PUBLIC_ASSET_REPO,
|
||||
)}/${assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH)}/${path}`;
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { usersDatabase } from './users';
|
||||
import { usersDatabase } from '@blitzkit/core';
|
||||
|
||||
export async function flagUserActivity(blitzId: number) {
|
||||
await usersDatabase.user.upsert({
|
||||
@@ -1,7 +0,0 @@
|
||||
import { fetchPB } from '../protobuf';
|
||||
import { Gallery } from '../protos';
|
||||
import { asset } from './asset';
|
||||
|
||||
export function fetchGallery() {
|
||||
return fetchPB(asset('definitions/gallery.pb'), Gallery);
|
||||
}
|
||||
@@ -13,6 +13,7 @@ export * from './discoveredIdDefinitions';
|
||||
export * from './emblemURL';
|
||||
export * from './equipmentDefinitions';
|
||||
export * from './eventManager';
|
||||
// export * from './flagUserActivity';
|
||||
export * from './gameDefinitions';
|
||||
export * from './getArchivedLatestSeasonNumber';
|
||||
// export * from './getArchivedRatingInfo';
|
||||
@@ -20,6 +21,7 @@ export * from './getArchivedRatingLeaderboard';
|
||||
// export * from './getArchivedRatingMidnightLeaderboard';
|
||||
export * from './getTimeDaysAgo';
|
||||
export * from './isExplosive';
|
||||
export * from './linkBlitzAndDiscord';
|
||||
export * from './mapDefinitions';
|
||||
export * from './modelDefinitions';
|
||||
export * from './normalizeBoundingBox';
|
||||
@@ -42,8 +44,11 @@ export * from './unwrapBlitzkitResponse';
|
||||
export * from './votes';
|
||||
// export * from './withCORSProxy';
|
||||
export * from './createDefaultProvisions';
|
||||
export * from './gallery';
|
||||
export * from './metaSortTank';
|
||||
export * from './popularTanks';
|
||||
export * from './romanize';
|
||||
export * from './tank';
|
||||
export * from './tankArmor';
|
||||
export * from './tankModel';
|
||||
export * from './tanks';
|
||||
export * from './tanksFull';
|
||||
export * from './youtubers';
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { usersDatabase } from '@blitzkit/core';
|
||||
import { flagUserActivity } from './flagUserActivity';
|
||||
import { usersDatabase } from './users';
|
||||
|
||||
export async function linkBlitzAndDiscord(discordId: bigint, blitzId: number) {
|
||||
await usersDatabase.discordUser.upsert({
|
||||
@@ -1,7 +0,0 @@
|
||||
import { fetchPB } from '../protobuf';
|
||||
import { PopularTanks } from '../protos';
|
||||
import { asset } from './asset';
|
||||
|
||||
export function fetchPopularTanks() {
|
||||
return fetchPB(asset('definitions/popular-tanks.pb'), PopularTanks);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
GunDefinition,
|
||||
GunDefinitionAutoReloader,
|
||||
GunDefinitionAutoReloaderProperties,
|
||||
ShellDefinition,
|
||||
} from '../protos';
|
||||
|
||||
@@ -15,46 +15,34 @@ export function resolveDpm(
|
||||
let dps: number;
|
||||
|
||||
if (gun.gun_type!.$case === 'regular') {
|
||||
dps = alpha / (reloadCoefficient * gun.gun_type!.value.reload);
|
||||
dps = alpha / (reloadCoefficient * gun.gun_type!.value.extension.reload);
|
||||
} else if (gun.gun_type!.$case === 'auto_loader') {
|
||||
const damage = alpha * gun.gun_type!.value.shell_count;
|
||||
let time = gun.gun_type!.value.clip_reload * reloadCoefficient;
|
||||
|
||||
if (gun.burst) {
|
||||
time +=
|
||||
(gun.gun_type!.value.shell_count / gun.burst.count - 1) *
|
||||
gun.gun_type!.value.intra_clip *
|
||||
intraClipCoefficient;
|
||||
|
||||
time +=
|
||||
(gun.gun_type!.value.shell_count / gun.burst.count) *
|
||||
(gun.burst.count - 1) *
|
||||
gun.burst.interval;
|
||||
} else {
|
||||
time +=
|
||||
(gun.gun_type!.value.shell_count - 1) *
|
||||
gun.gun_type!.value.intra_clip *
|
||||
intraClipCoefficient;
|
||||
}
|
||||
|
||||
dps = damage / time;
|
||||
dps =
|
||||
(alpha * gun.gun_type!.value.extension.shell_count) /
|
||||
(gun.gun_type!.value.extension.clip_reload * reloadCoefficient +
|
||||
(gun.gun_type!.value.extension.shell_count - 1) *
|
||||
gun.gun_type!.value.extension.intra_clip *
|
||||
intraClipCoefficient);
|
||||
} else {
|
||||
const mostOptimalShell = gun.gun_type!.value.shell_reloads.reduce<null | {
|
||||
index: number;
|
||||
reload: number;
|
||||
}>((current, reloadRaw, index) => {
|
||||
const reload =
|
||||
reloadRaw * reloadCoefficient +
|
||||
(index > 0
|
||||
? (gun.gun_type!.value as GunDefinitionAutoReloader).intra_clip *
|
||||
intraClipCoefficient
|
||||
: 0);
|
||||
const mostOptimalShell =
|
||||
gun.gun_type!.value.extension.shell_reloads.reduce<null | {
|
||||
index: number;
|
||||
reload: number;
|
||||
}>((current, reloadRaw, index) => {
|
||||
const reload =
|
||||
reloadRaw * reloadCoefficient +
|
||||
(index > 0
|
||||
? (
|
||||
gun.gun_type!.value
|
||||
.extension as GunDefinitionAutoReloaderProperties
|
||||
).intra_clip * intraClipCoefficient
|
||||
: 0);
|
||||
|
||||
if (current === null || reload < current.reload) {
|
||||
return { index, reload };
|
||||
}
|
||||
return current;
|
||||
}, null)!;
|
||||
if (current === null || reload < current.reload) {
|
||||
return { index, reload };
|
||||
}
|
||||
return current;
|
||||
}, null)!;
|
||||
|
||||
dps = alpha / mostOptimalShell?.reload;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { fetchPB } from '../protobuf';
|
||||
import { Tank } from '../protos';
|
||||
import { asset } from './asset';
|
||||
|
||||
export function fetchTank(id: string) {
|
||||
return fetchPB(asset(`tanks/${id}/meta.pb`), Tank);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { fetchPB } from '../protobuf';
|
||||
import { TankArmor } from '../protos';
|
||||
import { asset } from './asset';
|
||||
|
||||
export function fetchTankArmor(id: string) {
|
||||
return fetchPB(asset(`tanks/${id}/armor.pb`), TankArmor);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { fetchPB } from '../protobuf';
|
||||
import { TankModel } from '../protos';
|
||||
import { asset } from './asset';
|
||||
|
||||
export function fetchTankModel(id: string) {
|
||||
return fetchPB(asset(`tanks/${id}/model.pb`), TankModel);
|
||||
}
|
||||
@@ -15,22 +15,18 @@ export async function fetchTankNames() {
|
||||
tankDefinitionsArray.map(async (tank) => {
|
||||
const searchableNameDeburr: I18nString = { locales: {} };
|
||||
|
||||
Object.entries(tank.name).forEach(([key, value]) => {
|
||||
Object.entries(tank.name_full ?? tank.name).forEach(([key, value]) => {
|
||||
searchableNameDeburr.locales[key] = deburr(value);
|
||||
});
|
||||
|
||||
return {
|
||||
id: tank.id,
|
||||
name: tank.name,
|
||||
searchableName: tank.name,
|
||||
nameFull: tank.name_full,
|
||||
searchableName: tank.name_full ?? tank.name,
|
||||
searchableNameDeburr,
|
||||
camouflages: tank.camouflages
|
||||
?.map((id) =>
|
||||
SUPPORTED_LOCALES.map(
|
||||
(locale) =>
|
||||
camouflageDefinitions.camouflages[id]?.name.locales[locale],
|
||||
),
|
||||
)
|
||||
?.map((id) => SUPPORTED_LOCALES.map((locale) => camouflageDefinitions.camouflages[id]?.name.locales[locale]))
|
||||
.flat()
|
||||
.filter(Boolean)
|
||||
.map(deburr)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { fetchPB } from '../protobuf';
|
||||
import { Tanks } from '../protos';
|
||||
import { asset } from './asset';
|
||||
|
||||
export function fetchTanks() {
|
||||
return fetchPB(asset('definitions/tanks.pb'), Tanks);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { fetchPB } from '../protobuf';
|
||||
import { TanksFull } from '../protos';
|
||||
import { asset } from './asset';
|
||||
|
||||
export function fetchTanksFull() {
|
||||
return fetchPB(asset('definitions/tanks-full.pb'), TanksFull);
|
||||
}
|
||||
@@ -7,8 +7,8 @@ export function uniqueGuns(turrets: TurretDefinition[]) {
|
||||
|
||||
forEachRight(turrets, (turret) => {
|
||||
forEachRight(turret.guns, (gun) => {
|
||||
if (!gunIds.has(gun.id)) {
|
||||
gunIds.add(gun.id);
|
||||
if (!gunIds.has(gun.gun_type!.value.base.id)) {
|
||||
gunIds.add(gun.gun_type!.value.base.id);
|
||||
guns.push({ turret, gun });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -4,6 +4,4 @@ export const youtubers = [
|
||||
{ id: 'UCxRpZqMElssTdPYDK3x7wyg', name: 'N90' },
|
||||
{ id: 'UC28Hc6p2MGoB5s78eHCYkQg', name: 'GuidesBlitz' },
|
||||
{ id: 'UCLMEfqtlwLDN-UXX21RiEww', name: 'WoT Blitz Best Replays' },
|
||||
{ id: 'UC3fZbetRUFoJL0IEN7IhG0Q', name: 'EconomicsMate' },
|
||||
{ id: 'UCtsUVwBlhEnUunAKLn2dtsg', name: 'Megalion69' },
|
||||
];
|
||||
@@ -0,0 +1 @@
|
||||
export * from './users';
|
||||
@@ -1,3 +1,3 @@
|
||||
import { PrismaClient } from '../../prisma';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
export const usersDatabase = new PrismaClient();
|
||||
@@ -1,5 +1,6 @@
|
||||
export * from './blitz';
|
||||
export * from './blitzkit';
|
||||
export * from './databases';
|
||||
export * from './imgur';
|
||||
export * from './math';
|
||||
export * from './patreon';
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import { MessageFns } from '../protos';
|
||||
|
||||
export function encodePBBuffer<Type>(message: MessageFns<Type>, data: Type) {
|
||||
return Buffer.from(message.encode(data).finish());
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './encodePBBuffer';
|
||||
export * from './fetchPB';
|
||||
export * from './pbMap';
|
||||
@@ -1,883 +0,0 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/consumable_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { createBaseI18nString, I18nString } from "./i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export enum ConsumableTankCategoryFilterCategory {
|
||||
CLIP = 0,
|
||||
}
|
||||
|
||||
export function consumableTankCategoryFilterCategoryFromJSON(object: any): ConsumableTankCategoryFilterCategory {
|
||||
switch (object) {
|
||||
case 0:
|
||||
case "CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP":
|
||||
return ConsumableTankCategoryFilterCategory.CLIP;
|
||||
default:
|
||||
throw new globalThis.Error(
|
||||
"Unrecognized enum value " + object + " for enum ConsumableTankCategoryFilterCategory",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export function consumableTankCategoryFilterCategoryToJSON(object: ConsumableTankCategoryFilterCategory): string {
|
||||
switch (object) {
|
||||
case ConsumableTankCategoryFilterCategory.CLIP:
|
||||
return "CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP";
|
||||
default:
|
||||
throw new globalThis.Error(
|
||||
"Unrecognized enum value " + object + " for enum ConsumableTankCategoryFilterCategory",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export interface ConsumableDefinitions {
|
||||
consumables: { [key: number]: Consumable };
|
||||
}
|
||||
|
||||
export interface ConsumableDefinitions_ConsumablesEntry {
|
||||
key: number;
|
||||
value: Consumable | undefined;
|
||||
}
|
||||
|
||||
export interface Consumable {
|
||||
id: number;
|
||||
name: I18nString;
|
||||
cooldown: number;
|
||||
duration?: number | undefined;
|
||||
game_mode_exclusive: boolean;
|
||||
include: ConsumableTankFilter[];
|
||||
exclude: ConsumableTankFilter[];
|
||||
}
|
||||
|
||||
export interface ConsumableTankFilter {
|
||||
filter_type?:
|
||||
| { $case: "tiers"; value: ConsumableTankTierFilter }
|
||||
| { $case: "ids"; value: ConsumableTankIdsFilter }
|
||||
| { $case: "categories"; value: ConsumableTankCategoryFilter }
|
||||
| { $case: "nations"; value: ConsumableTankNationFilter }
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface ConsumableTankTierFilter {
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface ConsumableTankIdsFilter {
|
||||
ids: number[];
|
||||
}
|
||||
|
||||
export interface ConsumableTankCategoryFilter {
|
||||
categories: ConsumableTankCategoryFilterCategory[];
|
||||
}
|
||||
|
||||
export interface ConsumableTankNationFilter {
|
||||
nations: string[];
|
||||
}
|
||||
|
||||
export function createBaseConsumableDefinitions(): ConsumableDefinitions {
|
||||
return { consumables: {} };
|
||||
}
|
||||
|
||||
export const ConsumableDefinitions: MessageFns<ConsumableDefinitions> = {
|
||||
encode(message: ConsumableDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.consumables).forEach(([key, value]) => {
|
||||
ConsumableDefinitions_ConsumablesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = ConsumableDefinitions_ConsumablesEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.consumables[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableDefinitions {
|
||||
return {
|
||||
consumables: isObject(object.consumables)
|
||||
? Object.entries(object.consumables).reduce<{ [key: number]: Consumable }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = Consumable.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.consumables) {
|
||||
const entries = Object.entries(message.consumables);
|
||||
if (entries.length > 0) {
|
||||
obj.consumables = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.consumables[k] = Consumable.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableDefinitions>, I>>(base?: I): ConsumableDefinitions {
|
||||
return ConsumableDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableDefinitions>, I>>(object: I): ConsumableDefinitions {
|
||||
const message = createBaseConsumableDefinitions();
|
||||
message.consumables = Object.entries(object.consumables ?? {}).reduce<{ [key: number]: Consumable }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Consumable.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseConsumableDefinitions_ConsumablesEntry(): ConsumableDefinitions_ConsumablesEntry {
|
||||
return { key: 0, value: createBaseConsumable() };
|
||||
}
|
||||
|
||||
export const ConsumableDefinitions_ConsumablesEntry: MessageFns<ConsumableDefinitions_ConsumablesEntry> = {
|
||||
encode(message: ConsumableDefinitions_ConsumablesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Consumable.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableDefinitions_ConsumablesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableDefinitions_ConsumablesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Consumable.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableDefinitions_ConsumablesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("ConsumableDefinitions_ConsumablesEntry.key", object.key)),
|
||||
value: Consumable.fromJSON(assertSet("ConsumableDefinitions_ConsumablesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableDefinitions_ConsumablesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Consumable.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableDefinitions_ConsumablesEntry>, I>>(
|
||||
base?: I,
|
||||
): ConsumableDefinitions_ConsumablesEntry {
|
||||
return ConsumableDefinitions_ConsumablesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableDefinitions_ConsumablesEntry>, I>>(
|
||||
object: I,
|
||||
): ConsumableDefinitions_ConsumablesEntry {
|
||||
const message = createBaseConsumableDefinitions_ConsumablesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Consumable.fromPartial(object.value)
|
||||
: createBaseConsumable();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseConsumable(): Consumable {
|
||||
return {
|
||||
id: 0,
|
||||
name: createBaseI18nString(),
|
||||
cooldown: 0,
|
||||
duration: undefined,
|
||||
game_mode_exclusive: false,
|
||||
include: [],
|
||||
exclude: [],
|
||||
};
|
||||
}
|
||||
|
||||
export const Consumable: MessageFns<Consumable> = {
|
||||
encode(message: Consumable, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(18).fork()).join();
|
||||
}
|
||||
if (message.cooldown !== 0) {
|
||||
writer.uint32(24).uint32(message.cooldown);
|
||||
}
|
||||
if (message.duration !== undefined && message.duration !== undefined) {
|
||||
writer.uint32(37).float(message.duration);
|
||||
}
|
||||
if (message.game_mode_exclusive !== false) {
|
||||
writer.uint32(40).bool(message.game_mode_exclusive);
|
||||
}
|
||||
for (const v of message.include) {
|
||||
ConsumableTankFilter.encode(v!, writer.uint32(50).fork()).join();
|
||||
}
|
||||
for (const v of message.exclude) {
|
||||
ConsumableTankFilter.encode(v!, writer.uint32(58).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Consumable {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumable();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 24) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.cooldown = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 37) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.duration = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 5: {
|
||||
if (tag !== 40) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.game_mode_exclusive = reader.bool();
|
||||
continue;
|
||||
}
|
||||
case 6: {
|
||||
if (tag !== 50) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.include.push(ConsumableTankFilter.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
case 7: {
|
||||
if (tag !== 58) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.exclude.push(ConsumableTankFilter.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Consumable {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("Consumable.id", object.id)),
|
||||
name: I18nString.fromJSON(assertSet("Consumable.name", object.name)),
|
||||
cooldown: globalThis.Number(assertSet("Consumable.cooldown", object.cooldown)),
|
||||
duration: isSet(object.duration) ? globalThis.Number(object.duration) : undefined,
|
||||
game_mode_exclusive: globalThis.Boolean(assertSet("Consumable.game_mode_exclusive", object.game_mode_exclusive)),
|
||||
include: globalThis.Array.isArray(object?.include)
|
||||
? object.include.map((e: any) => ConsumableTankFilter.fromJSON(e))
|
||||
: [],
|
||||
exclude: globalThis.Array.isArray(object?.exclude)
|
||||
? object.exclude.map((e: any) => ConsumableTankFilter.fromJSON(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Consumable): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== 0) {
|
||||
obj.id = Math.round(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
if (message.cooldown !== 0) {
|
||||
obj.cooldown = Math.round(message.cooldown);
|
||||
}
|
||||
if (message.duration !== undefined && message.duration !== undefined) {
|
||||
obj.duration = message.duration;
|
||||
}
|
||||
if (message.game_mode_exclusive !== false) {
|
||||
obj.game_mode_exclusive = message.game_mode_exclusive;
|
||||
}
|
||||
if (message.include?.length) {
|
||||
obj.include = message.include.map((e) => ConsumableTankFilter.toJSON(e));
|
||||
}
|
||||
if (message.exclude?.length) {
|
||||
obj.exclude = message.exclude.map((e) => ConsumableTankFilter.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Consumable>, I>>(base?: I): Consumable {
|
||||
return Consumable.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Consumable>, I>>(object: I): Consumable {
|
||||
const message = createBaseConsumable();
|
||||
message.id = object.id ?? 0;
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.cooldown = object.cooldown ?? 0;
|
||||
message.duration = object.duration ?? undefined;
|
||||
message.game_mode_exclusive = object.game_mode_exclusive ?? false;
|
||||
message.include = object.include?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
message.exclude = object.exclude?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseConsumableTankFilter(): ConsumableTankFilter {
|
||||
return { filter_type: undefined };
|
||||
}
|
||||
|
||||
export const ConsumableTankFilter: MessageFns<ConsumableTankFilter> = {
|
||||
encode(message: ConsumableTankFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
switch (message.filter_type?.$case) {
|
||||
case "tiers":
|
||||
ConsumableTankTierFilter.encode(message.filter_type.value, writer.uint32(10).fork()).join();
|
||||
break;
|
||||
case "ids":
|
||||
ConsumableTankIdsFilter.encode(message.filter_type.value, writer.uint32(18).fork()).join();
|
||||
break;
|
||||
case "categories":
|
||||
ConsumableTankCategoryFilter.encode(message.filter_type.value, writer.uint32(26).fork()).join();
|
||||
break;
|
||||
case "nations":
|
||||
ConsumableTankNationFilter.encode(message.filter_type.value, writer.uint32(34).fork()).join();
|
||||
break;
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.filter_type = { $case: "tiers", value: ConsumableTankTierFilter.decode(reader, reader.uint32()) };
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.filter_type = { $case: "ids", value: ConsumableTankIdsFilter.decode(reader, reader.uint32()) };
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.filter_type = {
|
||||
$case: "categories",
|
||||
value: ConsumableTankCategoryFilter.decode(reader, reader.uint32()),
|
||||
};
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 34) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.filter_type = { $case: "nations", value: ConsumableTankNationFilter.decode(reader, reader.uint32()) };
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankFilter {
|
||||
return {
|
||||
filter_type: isSet(object.tiers)
|
||||
? { $case: "tiers", value: ConsumableTankTierFilter.fromJSON(object.tiers) }
|
||||
: isSet(object.ids)
|
||||
? { $case: "ids", value: ConsumableTankIdsFilter.fromJSON(object.ids) }
|
||||
: isSet(object.categories)
|
||||
? { $case: "categories", value: ConsumableTankCategoryFilter.fromJSON(object.categories) }
|
||||
: isSet(object.nations)
|
||||
? { $case: "nations", value: ConsumableTankNationFilter.fromJSON(object.nations) }
|
||||
: undefined,
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.filter_type?.$case === "tiers") {
|
||||
obj.tiers = ConsumableTankTierFilter.toJSON(message.filter_type.value);
|
||||
}
|
||||
if (message.filter_type?.$case === "ids") {
|
||||
obj.ids = ConsumableTankIdsFilter.toJSON(message.filter_type.value);
|
||||
}
|
||||
if (message.filter_type?.$case === "categories") {
|
||||
obj.categories = ConsumableTankCategoryFilter.toJSON(message.filter_type.value);
|
||||
}
|
||||
if (message.filter_type?.$case === "nations") {
|
||||
obj.nations = ConsumableTankNationFilter.toJSON(message.filter_type.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankFilter>, I>>(base?: I): ConsumableTankFilter {
|
||||
return ConsumableTankFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankFilter>, I>>(object: I): ConsumableTankFilter {
|
||||
const message = createBaseConsumableTankFilter();
|
||||
if (
|
||||
object.filter_type?.$case === "tiers" &&
|
||||
object.filter_type?.value !== undefined &&
|
||||
object.filter_type?.value !== null
|
||||
) {
|
||||
message.filter_type = { $case: "tiers", value: ConsumableTankTierFilter.fromPartial(object.filter_type.value) };
|
||||
}
|
||||
if (
|
||||
object.filter_type?.$case === "ids" &&
|
||||
object.filter_type?.value !== undefined &&
|
||||
object.filter_type?.value !== null
|
||||
) {
|
||||
message.filter_type = { $case: "ids", value: ConsumableTankIdsFilter.fromPartial(object.filter_type.value) };
|
||||
}
|
||||
if (
|
||||
object.filter_type?.$case === "categories" &&
|
||||
object.filter_type?.value !== undefined &&
|
||||
object.filter_type?.value !== null
|
||||
) {
|
||||
message.filter_type = {
|
||||
$case: "categories",
|
||||
value: ConsumableTankCategoryFilter.fromPartial(object.filter_type.value),
|
||||
};
|
||||
}
|
||||
if (
|
||||
object.filter_type?.$case === "nations" &&
|
||||
object.filter_type?.value !== undefined &&
|
||||
object.filter_type?.value !== null
|
||||
) {
|
||||
message.filter_type = {
|
||||
$case: "nations",
|
||||
value: ConsumableTankNationFilter.fromPartial(object.filter_type.value),
|
||||
};
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseConsumableTankTierFilter(): ConsumableTankTierFilter {
|
||||
return { min: 0, max: 0 };
|
||||
}
|
||||
|
||||
export const ConsumableTankTierFilter: MessageFns<ConsumableTankTierFilter> = {
|
||||
encode(message: ConsumableTankTierFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.min !== 0) {
|
||||
writer.uint32(8).uint32(message.min);
|
||||
}
|
||||
if (message.max !== 0) {
|
||||
writer.uint32(16).uint32(message.max);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankTierFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankTierFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.min = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.max = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankTierFilter {
|
||||
return {
|
||||
min: globalThis.Number(assertSet("ConsumableTankTierFilter.min", object.min)),
|
||||
max: globalThis.Number(assertSet("ConsumableTankTierFilter.max", object.max)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankTierFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.min !== 0) {
|
||||
obj.min = Math.round(message.min);
|
||||
}
|
||||
if (message.max !== 0) {
|
||||
obj.max = Math.round(message.max);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankTierFilter>, I>>(base?: I): ConsumableTankTierFilter {
|
||||
return ConsumableTankTierFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankTierFilter>, I>>(object: I): ConsumableTankTierFilter {
|
||||
const message = createBaseConsumableTankTierFilter();
|
||||
message.min = object.min ?? 0;
|
||||
message.max = object.max ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseConsumableTankIdsFilter(): ConsumableTankIdsFilter {
|
||||
return { ids: [] };
|
||||
}
|
||||
|
||||
export const ConsumableTankIdsFilter: MessageFns<ConsumableTankIdsFilter> = {
|
||||
encode(message: ConsumableTankIdsFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
writer.uint32(10).fork();
|
||||
for (const v of message.ids) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.join();
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankIdsFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankIdsFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag === 8) {
|
||||
message.ids.push(reader.uint32());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 10) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.ids.push(reader.uint32());
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankIdsFilter {
|
||||
return { ids: globalThis.Array.isArray(object?.ids) ? object.ids.map((e: any) => globalThis.Number(e)) : [] };
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankIdsFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.ids?.length) {
|
||||
obj.ids = message.ids.map((e) => Math.round(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankIdsFilter>, I>>(base?: I): ConsumableTankIdsFilter {
|
||||
return ConsumableTankIdsFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankIdsFilter>, I>>(object: I): ConsumableTankIdsFilter {
|
||||
const message = createBaseConsumableTankIdsFilter();
|
||||
message.ids = object.ids?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseConsumableTankCategoryFilter(): ConsumableTankCategoryFilter {
|
||||
return { categories: [] };
|
||||
}
|
||||
|
||||
export const ConsumableTankCategoryFilter: MessageFns<ConsumableTankCategoryFilter> = {
|
||||
encode(message: ConsumableTankCategoryFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
writer.uint32(10).fork();
|
||||
for (const v of message.categories) {
|
||||
writer.int32(v);
|
||||
}
|
||||
writer.join();
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankCategoryFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankCategoryFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag === 8) {
|
||||
message.categories.push(reader.int32() as any);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 10) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.categories.push(reader.int32() as any);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankCategoryFilter {
|
||||
return {
|
||||
categories: globalThis.Array.isArray(object?.categories)
|
||||
? object.categories.map((e: any) => consumableTankCategoryFilterCategoryFromJSON(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankCategoryFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.categories?.length) {
|
||||
obj.categories = message.categories.map((e) => consumableTankCategoryFilterCategoryToJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankCategoryFilter>, I>>(base?: I): ConsumableTankCategoryFilter {
|
||||
return ConsumableTankCategoryFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankCategoryFilter>, I>>(object: I): ConsumableTankCategoryFilter {
|
||||
const message = createBaseConsumableTankCategoryFilter();
|
||||
message.categories = object.categories?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseConsumableTankNationFilter(): ConsumableTankNationFilter {
|
||||
return { nations: [] };
|
||||
}
|
||||
|
||||
export const ConsumableTankNationFilter: MessageFns<ConsumableTankNationFilter> = {
|
||||
encode(message: ConsumableTankNationFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.nations) {
|
||||
writer.uint32(10).string(v!);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankNationFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankNationFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.nations.push(reader.string());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankNationFilter {
|
||||
return {
|
||||
nations: globalThis.Array.isArray(object?.nations) ? object.nations.map((e: any) => globalThis.String(e)) : [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankNationFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.nations?.length) {
|
||||
obj.nations = message.nations;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankNationFilter>, I>>(base?: I): ConsumableTankNationFilter {
|
||||
return ConsumableTankNationFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankNationFilter>, I>>(object: I): ConsumableTankNationFilter {
|
||||
const message = createBaseConsumableTankNationFilter();
|
||||
message.nations = object.nations?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -1,578 +0,0 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/equipment_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { createBaseI18nString, I18nString } from "./i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface EquipmentDefinitions {
|
||||
presets: { [key: string]: EquipmentPreset };
|
||||
equipments: { [key: number]: Equipment };
|
||||
}
|
||||
|
||||
export interface EquipmentDefinitions_PresetsEntry {
|
||||
key: string;
|
||||
value: EquipmentPreset | undefined;
|
||||
}
|
||||
|
||||
export interface EquipmentDefinitions_EquipmentsEntry {
|
||||
key: number;
|
||||
value: Equipment | undefined;
|
||||
}
|
||||
|
||||
export interface Equipment {
|
||||
name: I18nString;
|
||||
description: I18nString;
|
||||
}
|
||||
|
||||
export interface EquipmentPreset {
|
||||
slots: EquipmentSlot[];
|
||||
}
|
||||
|
||||
export interface EquipmentSlot {
|
||||
left: number;
|
||||
right: number;
|
||||
}
|
||||
|
||||
export function createBaseEquipmentDefinitions(): EquipmentDefinitions {
|
||||
return { presets: {}, equipments: {} };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
|
||||
encode(message: EquipmentDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.presets).forEach(([key, value]) => {
|
||||
EquipmentDefinitions_PresetsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
Object.entries(message.equipments).forEach(([key, value]) => {
|
||||
EquipmentDefinitions_EquipmentsEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = EquipmentDefinitions_PresetsEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.presets[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry2 = EquipmentDefinitions_EquipmentsEntry.decode(reader, reader.uint32());
|
||||
if (entry2.value !== undefined) {
|
||||
message.equipments[entry2.key] = entry2.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions {
|
||||
return {
|
||||
presets: isObject(object.presets)
|
||||
? Object.entries(object.presets).reduce<{ [key: string]: EquipmentPreset }>((acc, [key, value]) => {
|
||||
acc[key] = EquipmentPreset.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
equipments: isObject(object.equipments)
|
||||
? Object.entries(object.equipments).reduce<{ [key: number]: Equipment }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = Equipment.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.presets) {
|
||||
const entries = Object.entries(message.presets);
|
||||
if (entries.length > 0) {
|
||||
obj.presets = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.presets[k] = EquipmentPreset.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (message.equipments) {
|
||||
const entries = Object.entries(message.equipments);
|
||||
if (entries.length > 0) {
|
||||
obj.equipments = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.equipments[k] = Equipment.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentDefinitions>, I>>(base?: I): EquipmentDefinitions {
|
||||
return EquipmentDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentDefinitions>, I>>(object: I): EquipmentDefinitions {
|
||||
const message = createBaseEquipmentDefinitions();
|
||||
message.presets = Object.entries(object.presets ?? {}).reduce<{ [key: string]: EquipmentPreset }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = EquipmentPreset.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
message.equipments = Object.entries(object.equipments ?? {}).reduce<{ [key: number]: Equipment }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Equipment.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseEquipmentDefinitions_PresetsEntry(): EquipmentDefinitions_PresetsEntry {
|
||||
return { key: "", value: createBaseEquipmentPreset() };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions_PresetsEntry: MessageFns<EquipmentDefinitions_PresetsEntry> = {
|
||||
encode(message: EquipmentDefinitions_PresetsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
EquipmentPreset.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentDefinitions_PresetsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions_PresetsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = EquipmentPreset.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions_PresetsEntry {
|
||||
return {
|
||||
key: globalThis.String(assertSet("EquipmentDefinitions_PresetsEntry.key", object.key)),
|
||||
value: EquipmentPreset.fromJSON(assertSet("EquipmentDefinitions_PresetsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions_PresetsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = EquipmentPreset.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentDefinitions_PresetsEntry>, I>>(
|
||||
base?: I,
|
||||
): EquipmentDefinitions_PresetsEntry {
|
||||
return EquipmentDefinitions_PresetsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentDefinitions_PresetsEntry>, I>>(
|
||||
object: I,
|
||||
): EquipmentDefinitions_PresetsEntry {
|
||||
const message = createBaseEquipmentDefinitions_PresetsEntry();
|
||||
message.key = object.key ?? "";
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? EquipmentPreset.fromPartial(object.value)
|
||||
: createBaseEquipmentPreset();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseEquipmentDefinitions_EquipmentsEntry(): EquipmentDefinitions_EquipmentsEntry {
|
||||
return { key: 0, value: createBaseEquipment() };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions_EquipmentsEntry: MessageFns<EquipmentDefinitions_EquipmentsEntry> = {
|
||||
encode(message: EquipmentDefinitions_EquipmentsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Equipment.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentDefinitions_EquipmentsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions_EquipmentsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Equipment.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions_EquipmentsEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("EquipmentDefinitions_EquipmentsEntry.key", object.key)),
|
||||
value: Equipment.fromJSON(assertSet("EquipmentDefinitions_EquipmentsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions_EquipmentsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Equipment.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentDefinitions_EquipmentsEntry>, I>>(
|
||||
base?: I,
|
||||
): EquipmentDefinitions_EquipmentsEntry {
|
||||
return EquipmentDefinitions_EquipmentsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentDefinitions_EquipmentsEntry>, I>>(
|
||||
object: I,
|
||||
): EquipmentDefinitions_EquipmentsEntry {
|
||||
const message = createBaseEquipmentDefinitions_EquipmentsEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Equipment.fromPartial(object.value)
|
||||
: createBaseEquipment();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseEquipment(): Equipment {
|
||||
return { name: createBaseI18nString(), description: createBaseI18nString() };
|
||||
}
|
||||
|
||||
export const Equipment: MessageFns<Equipment> = {
|
||||
encode(message: Equipment, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(10).fork()).join();
|
||||
}
|
||||
if (message.description !== undefined) {
|
||||
I18nString.encode(message.description, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Equipment {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipment();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.description = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Equipment {
|
||||
return {
|
||||
name: I18nString.fromJSON(assertSet("Equipment.name", object.name)),
|
||||
description: I18nString.fromJSON(assertSet("Equipment.description", object.description)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Equipment): unknown {
|
||||
const obj: any = {};
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
if (message.description !== undefined) {
|
||||
obj.description = I18nString.toJSON(message.description);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Equipment>, I>>(base?: I): Equipment {
|
||||
return Equipment.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Equipment>, I>>(object: I): Equipment {
|
||||
const message = createBaseEquipment();
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.description = (object.description !== undefined && object.description !== null)
|
||||
? I18nString.fromPartial(object.description)
|
||||
: createBaseI18nString();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseEquipmentPreset(): EquipmentPreset {
|
||||
return { slots: [] };
|
||||
}
|
||||
|
||||
export const EquipmentPreset: MessageFns<EquipmentPreset> = {
|
||||
encode(message: EquipmentPreset, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.slots) {
|
||||
EquipmentSlot.encode(v!, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentPreset {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentPreset();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.slots.push(EquipmentSlot.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentPreset {
|
||||
return {
|
||||
slots: globalThis.Array.isArray(object?.slots) ? object.slots.map((e: any) => EquipmentSlot.fromJSON(e)) : [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentPreset): unknown {
|
||||
const obj: any = {};
|
||||
if (message.slots?.length) {
|
||||
obj.slots = message.slots.map((e) => EquipmentSlot.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentPreset>, I>>(base?: I): EquipmentPreset {
|
||||
return EquipmentPreset.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentPreset>, I>>(object: I): EquipmentPreset {
|
||||
const message = createBaseEquipmentPreset();
|
||||
message.slots = object.slots?.map((e) => EquipmentSlot.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseEquipmentSlot(): EquipmentSlot {
|
||||
return { left: 0, right: 0 };
|
||||
}
|
||||
|
||||
export const EquipmentSlot: MessageFns<EquipmentSlot> = {
|
||||
encode(message: EquipmentSlot, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.left !== 0) {
|
||||
writer.uint32(8).uint32(message.left);
|
||||
}
|
||||
if (message.right !== 0) {
|
||||
writer.uint32(16).uint32(message.right);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentSlot {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentSlot();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.left = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.right = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentSlot {
|
||||
return {
|
||||
left: globalThis.Number(assertSet("EquipmentSlot.left", object.left)),
|
||||
right: globalThis.Number(assertSet("EquipmentSlot.right", object.right)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentSlot): unknown {
|
||||
const obj: any = {};
|
||||
if (message.left !== 0) {
|
||||
obj.left = Math.round(message.left);
|
||||
}
|
||||
if (message.right !== 0) {
|
||||
obj.right = Math.round(message.right);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentSlot>, I>>(base?: I): EquipmentSlot {
|
||||
return EquipmentSlot.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentSlot>, I>>(object: I): EquipmentSlot {
|
||||
const message = createBaseEquipmentSlot();
|
||||
message.left = object.left ?? 0;
|
||||
message.right = object.right ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/i18n.proto";
|
||||
|
||||
message Gallery {
|
||||
repeated Avatar avatars = 1;
|
||||
}
|
||||
|
||||
message Avatar {
|
||||
required string id = 1;
|
||||
required I18nString name = 2;
|
||||
required string extension = 3;
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/gallery.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { createBaseI18nString, I18nString } from "./i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface Gallery {
|
||||
avatars: Avatar[];
|
||||
}
|
||||
|
||||
export interface Avatar {
|
||||
id: string;
|
||||
name: I18nString;
|
||||
extension: string;
|
||||
}
|
||||
|
||||
export function createBaseGallery(): Gallery {
|
||||
return { avatars: [] };
|
||||
}
|
||||
|
||||
export const Gallery: MessageFns<Gallery> = {
|
||||
encode(message: Gallery, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.avatars) {
|
||||
Avatar.encode(v!, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Gallery {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGallery();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.avatars.push(Avatar.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Gallery {
|
||||
return {
|
||||
avatars: globalThis.Array.isArray(object?.avatars) ? object.avatars.map((e: any) => Avatar.fromJSON(e)) : [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Gallery): unknown {
|
||||
const obj: any = {};
|
||||
if (message.avatars?.length) {
|
||||
obj.avatars = message.avatars.map((e) => Avatar.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Gallery>, I>>(base?: I): Gallery {
|
||||
return Gallery.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Gallery>, I>>(object: I): Gallery {
|
||||
const message = createBaseGallery();
|
||||
message.avatars = object.avatars?.map((e) => Avatar.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseAvatar(): Avatar {
|
||||
return { id: "", name: createBaseI18nString(), extension: "" };
|
||||
}
|
||||
|
||||
export const Avatar: MessageFns<Avatar> = {
|
||||
encode(message: Avatar, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== "") {
|
||||
writer.uint32(10).string(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(18).fork()).join();
|
||||
}
|
||||
if (message.extension !== "") {
|
||||
writer.uint32(26).string(message.extension);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Avatar {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseAvatar();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.extension = reader.string();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Avatar {
|
||||
return {
|
||||
id: globalThis.String(assertSet("Avatar.id", object.id)),
|
||||
name: I18nString.fromJSON(assertSet("Avatar.name", object.name)),
|
||||
extension: globalThis.String(assertSet("Avatar.extension", object.extension)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Avatar): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== "") {
|
||||
obj.id = message.id;
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
if (message.extension !== "") {
|
||||
obj.extension = message.extension;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Avatar>, I>>(base?: I): Avatar {
|
||||
return Avatar.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Avatar>, I>>(object: I): Avatar {
|
||||
const message = createBaseAvatar();
|
||||
message.id = object.id ?? "";
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.extension = object.extension ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -1,546 +0,0 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/game_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { createBaseI18nString, I18nString } from "./i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface GameDefinitions {
|
||||
version: string;
|
||||
nations: string[];
|
||||
gameModes: { [key: number]: GameMode };
|
||||
roles: { [key: number]: GameModeRole };
|
||||
}
|
||||
|
||||
export interface GameDefinitions_GameModesEntry {
|
||||
key: number;
|
||||
value: GameMode | undefined;
|
||||
}
|
||||
|
||||
export interface GameDefinitions_RolesEntry {
|
||||
key: number;
|
||||
value: GameModeRole | undefined;
|
||||
}
|
||||
|
||||
export interface GameMode {
|
||||
name: I18nString;
|
||||
}
|
||||
|
||||
export interface GameModeRole {
|
||||
provisions: number[];
|
||||
consumables: number[];
|
||||
}
|
||||
|
||||
export function createBaseGameDefinitions(): GameDefinitions {
|
||||
return { version: "", nations: [], gameModes: {}, roles: {} };
|
||||
}
|
||||
|
||||
export const GameDefinitions: MessageFns<GameDefinitions> = {
|
||||
encode(message: GameDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.version !== "") {
|
||||
writer.uint32(10).string(message.version);
|
||||
}
|
||||
for (const v of message.nations) {
|
||||
writer.uint32(18).string(v!);
|
||||
}
|
||||
Object.entries(message.gameModes).forEach(([key, value]) => {
|
||||
GameDefinitions_GameModesEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join();
|
||||
});
|
||||
Object.entries(message.roles).forEach(([key, value]) => {
|
||||
GameDefinitions_RolesEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.version = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.nations.push(reader.string());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry3 = GameDefinitions_GameModesEntry.decode(reader, reader.uint32());
|
||||
if (entry3.value !== undefined) {
|
||||
message.gameModes[entry3.key] = entry3.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 34) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry4 = GameDefinitions_RolesEntry.decode(reader, reader.uint32());
|
||||
if (entry4.value !== undefined) {
|
||||
message.roles[entry4.key] = entry4.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions {
|
||||
return {
|
||||
version: globalThis.String(assertSet("GameDefinitions.version", object.version)),
|
||||
nations: globalThis.Array.isArray(object?.nations) ? object.nations.map((e: any) => globalThis.String(e)) : [],
|
||||
gameModes: isObject(object.gameModes)
|
||||
? Object.entries(object.gameModes).reduce<{ [key: number]: GameMode }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = GameMode.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
roles: isObject(object.roles)
|
||||
? Object.entries(object.roles).reduce<{ [key: number]: GameModeRole }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = GameModeRole.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.version !== "") {
|
||||
obj.version = message.version;
|
||||
}
|
||||
if (message.nations?.length) {
|
||||
obj.nations = message.nations;
|
||||
}
|
||||
if (message.gameModes) {
|
||||
const entries = Object.entries(message.gameModes);
|
||||
if (entries.length > 0) {
|
||||
obj.gameModes = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.gameModes[k] = GameMode.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (message.roles) {
|
||||
const entries = Object.entries(message.roles);
|
||||
if (entries.length > 0) {
|
||||
obj.roles = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.roles[k] = GameModeRole.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions>, I>>(base?: I): GameDefinitions {
|
||||
return GameDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameDefinitions>, I>>(object: I): GameDefinitions {
|
||||
const message = createBaseGameDefinitions();
|
||||
message.version = object.version ?? "";
|
||||
message.nations = object.nations?.map((e) => e) || [];
|
||||
message.gameModes = Object.entries(object.gameModes ?? {}).reduce<{ [key: number]: GameMode }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(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;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseGameDefinitions_GameModesEntry(): GameDefinitions_GameModesEntry {
|
||||
return { key: 0, value: createBaseGameMode() };
|
||||
}
|
||||
|
||||
export const GameDefinitions_GameModesEntry: MessageFns<GameDefinitions_GameModesEntry> = {
|
||||
encode(message: GameDefinitions_GameModesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
GameMode.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameDefinitions_GameModesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions_GameModesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = GameMode.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions_GameModesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("GameDefinitions_GameModesEntry.key", object.key)),
|
||||
value: GameMode.fromJSON(assertSet("GameDefinitions_GameModesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions_GameModesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = GameMode.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions_GameModesEntry>, I>>(base?: I): GameDefinitions_GameModesEntry {
|
||||
return GameDefinitions_GameModesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameDefinitions_GameModesEntry>, I>>(
|
||||
object: I,
|
||||
): GameDefinitions_GameModesEntry {
|
||||
const message = createBaseGameDefinitions_GameModesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? GameMode.fromPartial(object.value)
|
||||
: createBaseGameMode();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseGameDefinitions_RolesEntry(): GameDefinitions_RolesEntry {
|
||||
return { key: 0, value: createBaseGameModeRole() };
|
||||
}
|
||||
|
||||
export const GameDefinitions_RolesEntry: MessageFns<GameDefinitions_RolesEntry> = {
|
||||
encode(message: GameDefinitions_RolesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
GameModeRole.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameDefinitions_RolesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions_RolesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = GameModeRole.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions_RolesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("GameDefinitions_RolesEntry.key", object.key)),
|
||||
value: GameModeRole.fromJSON(assertSet("GameDefinitions_RolesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions_RolesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = GameModeRole.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions_RolesEntry>, I>>(base?: I): GameDefinitions_RolesEntry {
|
||||
return GameDefinitions_RolesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameDefinitions_RolesEntry>, I>>(object: I): GameDefinitions_RolesEntry {
|
||||
const message = createBaseGameDefinitions_RolesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? GameModeRole.fromPartial(object.value)
|
||||
: createBaseGameModeRole();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseGameMode(): GameMode {
|
||||
return { name: createBaseI18nString() };
|
||||
}
|
||||
|
||||
export const GameMode: MessageFns<GameMode> = {
|
||||
encode(message: GameMode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameMode {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameMode();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameMode {
|
||||
return { name: I18nString.fromJSON(assertSet("GameMode.name", object.name)) };
|
||||
},
|
||||
|
||||
toJSON(message: GameMode): unknown {
|
||||
const obj: any = {};
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameMode>, I>>(base?: I): GameMode {
|
||||
return GameMode.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameMode>, I>>(object: I): GameMode {
|
||||
const message = createBaseGameMode();
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseGameModeRole(): GameModeRole {
|
||||
return { provisions: [], consumables: [] };
|
||||
}
|
||||
|
||||
export const GameModeRole: MessageFns<GameModeRole> = {
|
||||
encode(message: GameModeRole, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
writer.uint32(10).fork();
|
||||
for (const v of message.provisions) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.join();
|
||||
writer.uint32(18).fork();
|
||||
for (const v of message.consumables) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.join();
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameModeRole {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameModeRole();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag === 8) {
|
||||
message.provisions.push(reader.uint32());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 10) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.provisions.push(reader.uint32());
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
if (tag === 16) {
|
||||
message.consumables.push(reader.uint32());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 18) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.consumables.push(reader.uint32());
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameModeRole {
|
||||
return {
|
||||
provisions: globalThis.Array.isArray(object?.provisions)
|
||||
? object.provisions.map((e: any) => globalThis.Number(e))
|
||||
: [],
|
||||
consumables: globalThis.Array.isArray(object?.consumables)
|
||||
? object.consumables.map((e: any) => globalThis.Number(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameModeRole): unknown {
|
||||
const obj: any = {};
|
||||
if (message.provisions?.length) {
|
||||
obj.provisions = message.provisions.map((e) => Math.round(e));
|
||||
}
|
||||
if (message.consumables?.length) {
|
||||
obj.consumables = message.consumables.map((e) => Math.round(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameModeRole>, I>>(base?: I): GameModeRole {
|
||||
return GameModeRole.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameModeRole>, I>>(object: I): GameModeRole {
|
||||
const message = createBaseGameModeRole();
|
||||
message.provisions = object.provisions?.map((e) => e) || [];
|
||||
message.consumables = object.consumables?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -1,16 +1,20 @@
|
||||
// @ts-nocheck
|
||||
export * from './average_definitions.ts';
|
||||
export * from './camouflage_definitions.ts';
|
||||
export * from './consumable_definitions.ts';
|
||||
export * from './equipment_definitions.ts';
|
||||
export * from './gallery.ts';
|
||||
export * from './game_definitions.ts';
|
||||
export * from './i18n.ts';
|
||||
export * from './map_definitions.ts';
|
||||
export * from './model_definitions.ts';
|
||||
export * from './popular_tanks.ts';
|
||||
export * from './provision_definitions.ts';
|
||||
export * from './rating_leaderboard.ts';
|
||||
export * from './legacy_average_definitions.ts';
|
||||
export * from './legacy_camouflage_definitions.ts';
|
||||
export * from './legacy_consumable_definitions.ts';
|
||||
export * from './legacy_equipment_definitions.ts';
|
||||
export * from './legacy_game_definitions.ts';
|
||||
export * from './legacy_i18n.ts';
|
||||
export * from './legacy_map_definitions.ts';
|
||||
export * from './legacy_model_definitions.ts';
|
||||
export * from './legacy_provision_definitions.ts';
|
||||
export * from './legacy_rating_leaderboard.ts';
|
||||
export * from './legacy_skill_definitions.ts';
|
||||
export * from './legacy_tank_definitions.ts';
|
||||
export * from './reviews.ts';
|
||||
export * from './skill_definitions.ts';
|
||||
export * from './tank_definitions.ts';
|
||||
export * from './tank.ts';
|
||||
export * from './tank_armor.ts';
|
||||
export * from './tank_model.ts';
|
||||
export * from './tanks.ts';
|
||||
export * from './tanks_full.ts';
|
||||
export * from './utils.ts';
|
||||
File renamed without changes.
+7
-7
@@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/average_definitions.proto
|
||||
// source: packages/core/src/protos/legacy_average_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
@@ -58,7 +58,7 @@ export interface Samples {
|
||||
total: number;
|
||||
}
|
||||
|
||||
export function createBaseAverageDefinitions(): AverageDefinitions {
|
||||
function createBaseAverageDefinitions(): AverageDefinitions {
|
||||
return { averages: {}, samples: createBaseSamples(), time: 0 };
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ export const AverageDefinitions: MessageFns<AverageDefinitions> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseAverageDefinitions_AveragesEntry(): AverageDefinitions_AveragesEntry {
|
||||
function createBaseAverageDefinitions_AveragesEntry(): AverageDefinitions_AveragesEntry {
|
||||
return { key: 0, value: createBaseAverageDefinitionsEntry() };
|
||||
}
|
||||
|
||||
@@ -251,12 +251,12 @@ export const AverageDefinitions_AveragesEntry: MessageFns<AverageDefinitions_Ave
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? AverageDefinitionsEntry.fromPartial(object.value)
|
||||
: createBaseAverageDefinitionsEntry();
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseAverageDefinitionsEntry(): AverageDefinitionsEntry {
|
||||
function createBaseAverageDefinitionsEntry(): AverageDefinitionsEntry {
|
||||
return {
|
||||
mu: createBaseAverageDefinitionsAllStats(),
|
||||
sigma: createBaseAverageDefinitionsAllStats(),
|
||||
@@ -377,7 +377,7 @@ export const AverageDefinitionsEntry: MessageFns<AverageDefinitionsEntry> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseAverageDefinitionsAllStats(): AverageDefinitionsAllStats {
|
||||
function createBaseAverageDefinitionsAllStats(): AverageDefinitionsAllStats {
|
||||
return {
|
||||
battles: 0,
|
||||
capture_points: 0,
|
||||
@@ -738,7 +738,7 @@ export const AverageDefinitionsAllStats: MessageFns<AverageDefinitionsAllStats>
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseSamples(): Samples {
|
||||
function createBaseSamples(): Samples {
|
||||
return { d_1: 0, d_7: 0, d_30: 0, d_60: 0, d_90: 0, d_120: 0, total: 0 };
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/i18n.proto";
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message CamouflageDefinitions {
|
||||
map<uint32, Camouflage> camouflages = 1;
|
||||
+8
-8
@@ -2,11 +2,11 @@
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/camouflage_definitions.proto
|
||||
// source: packages/core/src/protos/legacy_camouflage_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
|
||||
import { createBaseI18nString, I18nString } from './i18n';
|
||||
import { I18nString, createBaseI18nString } from './legacy_i18n';
|
||||
|
||||
export const protobufPackage = 'blitzkit';
|
||||
|
||||
@@ -22,11 +22,11 @@ export interface CamouflageDefinitions_CamouflagesEntry {
|
||||
export interface Camouflage {
|
||||
id: number;
|
||||
name: I18nString;
|
||||
tank_name?: I18nString;
|
||||
tank_name_full?: I18nString;
|
||||
tank_name?: I18nString | undefined;
|
||||
tank_name_full?: I18nString | undefined;
|
||||
}
|
||||
|
||||
export function createBaseCamouflageDefinitions(): CamouflageDefinitions {
|
||||
function createBaseCamouflageDefinitions(): CamouflageDefinitions {
|
||||
return { camouflages: {} };
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ export const CamouflageDefinitions: MessageFns<CamouflageDefinitions> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseCamouflageDefinitions_CamouflagesEntry(): CamouflageDefinitions_CamouflagesEntry {
|
||||
function createBaseCamouflageDefinitions_CamouflagesEntry(): CamouflageDefinitions_CamouflagesEntry {
|
||||
return { key: 0, value: createBaseCamouflage() };
|
||||
}
|
||||
|
||||
@@ -221,12 +221,12 @@ export const CamouflageDefinitions_CamouflagesEntry: MessageFns<CamouflageDefini
|
||||
message.value =
|
||||
object.value !== undefined && object.value !== null
|
||||
? Camouflage.fromPartial(object.value)
|
||||
: createBaseCamouflage();
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseCamouflage(): Camouflage {
|
||||
function createBaseCamouflage(): Camouflage {
|
||||
return {
|
||||
id: 0,
|
||||
name: createBaseI18nString(),
|
||||
+1
-1
@@ -2,7 +2,7 @@ syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/i18n.proto";
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message ConsumableDefinitions {
|
||||
map<uint32, Consumable> consumables = 1;
|
||||
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -2,7 +2,7 @@ syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/i18n.proto";
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message EquipmentDefinitions {
|
||||
map<string, EquipmentPreset> presets = 1;
|
||||
@@ -0,0 +1,675 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_equipment_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
|
||||
import { I18nString, createBaseI18nString } from './legacy_i18n';
|
||||
|
||||
export const protobufPackage = 'blitzkit';
|
||||
|
||||
export interface EquipmentDefinitions {
|
||||
presets: { [key: string]: EquipmentPreset };
|
||||
equipments: { [key: number]: Equipment };
|
||||
}
|
||||
|
||||
export interface EquipmentDefinitions_PresetsEntry {
|
||||
key: string;
|
||||
value: EquipmentPreset | undefined;
|
||||
}
|
||||
|
||||
export interface EquipmentDefinitions_EquipmentsEntry {
|
||||
key: number;
|
||||
value: Equipment | undefined;
|
||||
}
|
||||
|
||||
export interface Equipment {
|
||||
name: I18nString;
|
||||
description: I18nString;
|
||||
}
|
||||
|
||||
export interface EquipmentPreset {
|
||||
slots: EquipmentSlot[];
|
||||
}
|
||||
|
||||
export interface EquipmentSlot {
|
||||
left: number;
|
||||
right: number;
|
||||
}
|
||||
|
||||
function createBaseEquipmentDefinitions(): EquipmentDefinitions {
|
||||
return { presets: {}, equipments: {} };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
|
||||
encode(
|
||||
message: EquipmentDefinitions,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
Object.entries(message.presets).forEach(([key, value]) => {
|
||||
EquipmentDefinitions_PresetsEntry.encode(
|
||||
{ key: key as any, value },
|
||||
writer.uint32(10).fork(),
|
||||
).join();
|
||||
});
|
||||
Object.entries(message.equipments).forEach(([key, value]) => {
|
||||
EquipmentDefinitions_EquipmentsEntry.encode(
|
||||
{ key: key as any, value },
|
||||
writer.uint32(18).fork(),
|
||||
).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: BinaryReader | Uint8Array,
|
||||
length?: number,
|
||||
): EquipmentDefinitions {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = EquipmentDefinitions_PresetsEntry.decode(
|
||||
reader,
|
||||
reader.uint32(),
|
||||
);
|
||||
if (entry1.value !== undefined) {
|
||||
message.presets[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry2 = EquipmentDefinitions_EquipmentsEntry.decode(
|
||||
reader,
|
||||
reader.uint32(),
|
||||
);
|
||||
if (entry2.value !== undefined) {
|
||||
message.equipments[entry2.key] = entry2.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions {
|
||||
return {
|
||||
presets: isObject(object.presets)
|
||||
? Object.entries(object.presets).reduce<{
|
||||
[key: string]: EquipmentPreset;
|
||||
}>((acc, [key, value]) => {
|
||||
acc[key] = EquipmentPreset.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
equipments: isObject(object.equipments)
|
||||
? Object.entries(object.equipments).reduce<{
|
||||
[key: number]: Equipment;
|
||||
}>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = Equipment.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.presets) {
|
||||
const entries = Object.entries(message.presets);
|
||||
if (entries.length > 0) {
|
||||
obj.presets = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.presets[k] = EquipmentPreset.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (message.equipments) {
|
||||
const entries = Object.entries(message.equipments);
|
||||
if (entries.length > 0) {
|
||||
obj.equipments = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.equipments[k] = Equipment.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentDefinitions>, I>>(
|
||||
base?: I,
|
||||
): EquipmentDefinitions {
|
||||
return EquipmentDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentDefinitions>, I>>(
|
||||
object: I,
|
||||
): EquipmentDefinitions {
|
||||
const message = createBaseEquipmentDefinitions();
|
||||
message.presets = Object.entries(object.presets ?? {}).reduce<{
|
||||
[key: string]: EquipmentPreset;
|
||||
}>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = EquipmentPreset.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
message.equipments = Object.entries(object.equipments ?? {}).reduce<{
|
||||
[key: number]: Equipment;
|
||||
}>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Equipment.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipmentDefinitions_PresetsEntry(): EquipmentDefinitions_PresetsEntry {
|
||||
return { key: '', value: createBaseEquipmentPreset() };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions_PresetsEntry: MessageFns<EquipmentDefinitions_PresetsEntry> =
|
||||
{
|
||||
encode(
|
||||
message: EquipmentDefinitions_PresetsEntry,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
EquipmentPreset.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: BinaryReader | Uint8Array,
|
||||
length?: number,
|
||||
): EquipmentDefinitions_PresetsEntry {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions_PresetsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = EquipmentPreset.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions_PresetsEntry {
|
||||
return {
|
||||
key: globalThis.String(
|
||||
assertSet('EquipmentDefinitions_PresetsEntry.key', object.key),
|
||||
),
|
||||
value: EquipmentPreset.fromJSON(
|
||||
assertSet('EquipmentDefinitions_PresetsEntry.value', object.value),
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions_PresetsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = EquipmentPreset.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentDefinitions_PresetsEntry>, I>>(
|
||||
base?: I,
|
||||
): EquipmentDefinitions_PresetsEntry {
|
||||
return EquipmentDefinitions_PresetsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<
|
||||
I extends Exact<DeepPartial<EquipmentDefinitions_PresetsEntry>, I>,
|
||||
>(object: I): EquipmentDefinitions_PresetsEntry {
|
||||
const message = createBaseEquipmentDefinitions_PresetsEntry();
|
||||
message.key = object.key ?? '';
|
||||
message.value =
|
||||
object.value !== undefined && object.value !== null
|
||||
? EquipmentPreset.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipmentDefinitions_EquipmentsEntry(): EquipmentDefinitions_EquipmentsEntry {
|
||||
return { key: 0, value: createBaseEquipment() };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions_EquipmentsEntry: MessageFns<EquipmentDefinitions_EquipmentsEntry> =
|
||||
{
|
||||
encode(
|
||||
message: EquipmentDefinitions_EquipmentsEntry,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Equipment.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: BinaryReader | Uint8Array,
|
||||
length?: number,
|
||||
): EquipmentDefinitions_EquipmentsEntry {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions_EquipmentsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Equipment.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions_EquipmentsEntry {
|
||||
return {
|
||||
key: globalThis.Number(
|
||||
assertSet('EquipmentDefinitions_EquipmentsEntry.key', object.key),
|
||||
),
|
||||
value: Equipment.fromJSON(
|
||||
assertSet('EquipmentDefinitions_EquipmentsEntry.value', object.value),
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions_EquipmentsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Equipment.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<
|
||||
I extends Exact<DeepPartial<EquipmentDefinitions_EquipmentsEntry>, I>,
|
||||
>(base?: I): EquipmentDefinitions_EquipmentsEntry {
|
||||
return EquipmentDefinitions_EquipmentsEntry.fromPartial(
|
||||
base ?? ({} as any),
|
||||
);
|
||||
},
|
||||
fromPartial<
|
||||
I extends Exact<DeepPartial<EquipmentDefinitions_EquipmentsEntry>, I>,
|
||||
>(object: I): EquipmentDefinitions_EquipmentsEntry {
|
||||
const message = createBaseEquipmentDefinitions_EquipmentsEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value =
|
||||
object.value !== undefined && object.value !== null
|
||||
? Equipment.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipment(): Equipment {
|
||||
return { name: createBaseI18nString(), description: createBaseI18nString() };
|
||||
}
|
||||
|
||||
export const Equipment: MessageFns<Equipment> = {
|
||||
encode(
|
||||
message: Equipment,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(10).fork()).join();
|
||||
}
|
||||
if (message.description !== undefined) {
|
||||
I18nString.encode(message.description, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Equipment {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipment();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.description = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Equipment {
|
||||
return {
|
||||
name: I18nString.fromJSON(assertSet('Equipment.name', object.name)),
|
||||
description: I18nString.fromJSON(
|
||||
assertSet('Equipment.description', object.description),
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Equipment): unknown {
|
||||
const obj: any = {};
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
if (message.description !== undefined) {
|
||||
obj.description = I18nString.toJSON(message.description);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Equipment>, I>>(base?: I): Equipment {
|
||||
return Equipment.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Equipment>, I>>(
|
||||
object: I,
|
||||
): Equipment {
|
||||
const message = createBaseEquipment();
|
||||
message.name =
|
||||
object.name !== undefined && object.name !== null
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.description =
|
||||
object.description !== undefined && object.description !== null
|
||||
? I18nString.fromPartial(object.description)
|
||||
: createBaseI18nString();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipmentPreset(): EquipmentPreset {
|
||||
return { slots: [] };
|
||||
}
|
||||
|
||||
export const EquipmentPreset: MessageFns<EquipmentPreset> = {
|
||||
encode(
|
||||
message: EquipmentPreset,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
for (const v of message.slots) {
|
||||
EquipmentSlot.encode(v!, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentPreset {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentPreset();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.slots.push(EquipmentSlot.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentPreset {
|
||||
return {
|
||||
slots: globalThis.Array.isArray(object?.slots)
|
||||
? object.slots.map((e: any) => EquipmentSlot.fromJSON(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentPreset): unknown {
|
||||
const obj: any = {};
|
||||
if (message.slots?.length) {
|
||||
obj.slots = message.slots.map((e) => EquipmentSlot.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentPreset>, I>>(
|
||||
base?: I,
|
||||
): EquipmentPreset {
|
||||
return EquipmentPreset.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentPreset>, I>>(
|
||||
object: I,
|
||||
): EquipmentPreset {
|
||||
const message = createBaseEquipmentPreset();
|
||||
message.slots =
|
||||
object.slots?.map((e) => EquipmentSlot.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipmentSlot(): EquipmentSlot {
|
||||
return { left: 0, right: 0 };
|
||||
}
|
||||
|
||||
export const EquipmentSlot: MessageFns<EquipmentSlot> = {
|
||||
encode(
|
||||
message: EquipmentSlot,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.left !== 0) {
|
||||
writer.uint32(8).uint32(message.left);
|
||||
}
|
||||
if (message.right !== 0) {
|
||||
writer.uint32(16).uint32(message.right);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentSlot {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentSlot();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.left = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.right = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentSlot {
|
||||
return {
|
||||
left: globalThis.Number(assertSet('EquipmentSlot.left', object.left)),
|
||||
right: globalThis.Number(assertSet('EquipmentSlot.right', object.right)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentSlot): unknown {
|
||||
const obj: any = {};
|
||||
if (message.left !== 0) {
|
||||
obj.left = Math.round(message.left);
|
||||
}
|
||||
if (message.right !== 0) {
|
||||
obj.right = Math.round(message.right);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentSlot>, I>>(
|
||||
base?: I,
|
||||
): EquipmentSlot {
|
||||
return EquipmentSlot.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentSlot>, I>>(
|
||||
object: I,
|
||||
): EquipmentSlot {
|
||||
const message = createBaseEquipmentSlot();
|
||||
message.left = object.left ?? 0;
|
||||
message.right = object.right ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends globalThis.Array<infer U>
|
||||
? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U>
|
||||
? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown }
|
||||
? { $case: T['$case']; value?: DeepPartial<T['value']> }
|
||||
: T extends {}
|
||||
? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin
|
||||
? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
|
||||
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
||||
};
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === 'object' && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@ syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/i18n.proto";
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message GameDefinitions {
|
||||
required string version = 1;
|
||||
@@ -0,0 +1,639 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_game_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
|
||||
import { I18nString, createBaseI18nString } from './legacy_i18n';
|
||||
|
||||
export const protobufPackage = 'blitzkit';
|
||||
|
||||
export interface GameDefinitions {
|
||||
version: string;
|
||||
nations: string[];
|
||||
gameModes: { [key: number]: GameMode };
|
||||
roles: { [key: number]: GameModeRole };
|
||||
}
|
||||
|
||||
export interface GameDefinitions_GameModesEntry {
|
||||
key: number;
|
||||
value: GameMode | undefined;
|
||||
}
|
||||
|
||||
export interface GameDefinitions_RolesEntry {
|
||||
key: number;
|
||||
value: GameModeRole | undefined;
|
||||
}
|
||||
|
||||
export interface GameMode {
|
||||
name: I18nString;
|
||||
}
|
||||
|
||||
export interface GameModeRole {
|
||||
provisions: number[];
|
||||
consumables: number[];
|
||||
}
|
||||
|
||||
function createBaseGameDefinitions(): GameDefinitions {
|
||||
return { version: '', nations: [], gameModes: {}, roles: {} };
|
||||
}
|
||||
|
||||
export const GameDefinitions: MessageFns<GameDefinitions> = {
|
||||
encode(
|
||||
message: GameDefinitions,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.version !== '') {
|
||||
writer.uint32(10).string(message.version);
|
||||
}
|
||||
for (const v of message.nations) {
|
||||
writer.uint32(18).string(v!);
|
||||
}
|
||||
Object.entries(message.gameModes).forEach(([key, value]) => {
|
||||
GameDefinitions_GameModesEntry.encode(
|
||||
{ key: key as any, value },
|
||||
writer.uint32(26).fork(),
|
||||
).join();
|
||||
});
|
||||
Object.entries(message.roles).forEach(([key, value]) => {
|
||||
GameDefinitions_RolesEntry.encode(
|
||||
{ key: key as any, value },
|
||||
writer.uint32(34).fork(),
|
||||
).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameDefinitions {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.version = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.nations.push(reader.string());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry3 = GameDefinitions_GameModesEntry.decode(
|
||||
reader,
|
||||
reader.uint32(),
|
||||
);
|
||||
if (entry3.value !== undefined) {
|
||||
message.gameModes[entry3.key] = entry3.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 34) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry4 = GameDefinitions_RolesEntry.decode(
|
||||
reader,
|
||||
reader.uint32(),
|
||||
);
|
||||
if (entry4.value !== undefined) {
|
||||
message.roles[entry4.key] = entry4.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions {
|
||||
return {
|
||||
version: globalThis.String(
|
||||
assertSet('GameDefinitions.version', object.version),
|
||||
),
|
||||
nations: globalThis.Array.isArray(object?.nations)
|
||||
? object.nations.map((e: any) => globalThis.String(e))
|
||||
: [],
|
||||
gameModes: isObject(object.gameModes)
|
||||
? Object.entries(object.gameModes).reduce<{ [key: number]: GameMode }>(
|
||||
(acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = GameMode.fromJSON(value);
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
)
|
||||
: {},
|
||||
roles: isObject(object.roles)
|
||||
? Object.entries(object.roles).reduce<{ [key: number]: GameModeRole }>(
|
||||
(acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = GameModeRole.fromJSON(value);
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
)
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.version !== '') {
|
||||
obj.version = message.version;
|
||||
}
|
||||
if (message.nations?.length) {
|
||||
obj.nations = message.nations;
|
||||
}
|
||||
if (message.gameModes) {
|
||||
const entries = Object.entries(message.gameModes);
|
||||
if (entries.length > 0) {
|
||||
obj.gameModes = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.gameModes[k] = GameMode.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (message.roles) {
|
||||
const entries = Object.entries(message.roles);
|
||||
if (entries.length > 0) {
|
||||
obj.roles = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.roles[k] = GameModeRole.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions>, I>>(
|
||||
base?: I,
|
||||
): GameDefinitions {
|
||||
return GameDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameDefinitions>, I>>(
|
||||
object: I,
|
||||
): GameDefinitions {
|
||||
const message = createBaseGameDefinitions();
|
||||
message.version = object.version ?? '';
|
||||
message.nations = object.nations?.map((e) => e) || [];
|
||||
message.gameModes = Object.entries(object.gameModes ?? {}).reduce<{
|
||||
[key: number]: GameMode;
|
||||
}>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(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: createBaseGameMode() };
|
||||
}
|
||||
|
||||
export const GameDefinitions_GameModesEntry: MessageFns<GameDefinitions_GameModesEntry> =
|
||||
{
|
||||
encode(
|
||||
message: GameDefinitions_GameModesEntry,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
GameMode.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: BinaryReader | Uint8Array,
|
||||
length?: number,
|
||||
): GameDefinitions_GameModesEntry {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions_GameModesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = GameMode.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions_GameModesEntry {
|
||||
return {
|
||||
key: globalThis.Number(
|
||||
assertSet('GameDefinitions_GameModesEntry.key', object.key),
|
||||
),
|
||||
value: GameMode.fromJSON(
|
||||
assertSet('GameDefinitions_GameModesEntry.value', object.value),
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions_GameModesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = GameMode.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions_GameModesEntry>, I>>(
|
||||
base?: I,
|
||||
): GameDefinitions_GameModesEntry {
|
||||
return GameDefinitions_GameModesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<
|
||||
I extends Exact<DeepPartial<GameDefinitions_GameModesEntry>, I>,
|
||||
>(object: I): GameDefinitions_GameModesEntry {
|
||||
const message = createBaseGameDefinitions_GameModesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value =
|
||||
object.value !== undefined && object.value !== null
|
||||
? GameMode.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseGameDefinitions_RolesEntry(): GameDefinitions_RolesEntry {
|
||||
return { key: 0, value: createBaseGameModeRole() };
|
||||
}
|
||||
|
||||
export const GameDefinitions_RolesEntry: MessageFns<GameDefinitions_RolesEntry> =
|
||||
{
|
||||
encode(
|
||||
message: GameDefinitions_RolesEntry,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
GameModeRole.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: BinaryReader | Uint8Array,
|
||||
length?: number,
|
||||
): GameDefinitions_RolesEntry {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions_RolesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = GameModeRole.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions_RolesEntry {
|
||||
return {
|
||||
key: globalThis.Number(
|
||||
assertSet('GameDefinitions_RolesEntry.key', object.key),
|
||||
),
|
||||
value: GameModeRole.fromJSON(
|
||||
assertSet('GameDefinitions_RolesEntry.value', object.value),
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions_RolesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = GameModeRole.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions_RolesEntry>, I>>(
|
||||
base?: I,
|
||||
): GameDefinitions_RolesEntry {
|
||||
return GameDefinitions_RolesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameDefinitions_RolesEntry>, I>>(
|
||||
object: I,
|
||||
): GameDefinitions_RolesEntry {
|
||||
const message = createBaseGameDefinitions_RolesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value =
|
||||
object.value !== undefined && object.value !== null
|
||||
? GameModeRole.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseGameMode(): GameMode {
|
||||
return { name: createBaseI18nString() };
|
||||
}
|
||||
|
||||
export const GameMode: MessageFns<GameMode> = {
|
||||
encode(
|
||||
message: GameMode,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameMode {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameMode();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameMode {
|
||||
return {
|
||||
name: I18nString.fromJSON(assertSet('GameMode.name', object.name)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameMode): unknown {
|
||||
const obj: any = {};
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameMode>, I>>(base?: I): GameMode {
|
||||
return GameMode.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameMode>, I>>(object: I): GameMode {
|
||||
const message = createBaseGameMode();
|
||||
message.name =
|
||||
object.name !== undefined && object.name !== null
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseGameModeRole(): GameModeRole {
|
||||
return { provisions: [], consumables: [] };
|
||||
}
|
||||
|
||||
export const GameModeRole: MessageFns<GameModeRole> = {
|
||||
encode(
|
||||
message: GameModeRole,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
writer.uint32(10).fork();
|
||||
for (const v of message.provisions) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.join();
|
||||
writer.uint32(18).fork();
|
||||
for (const v of message.consumables) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.join();
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameModeRole {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameModeRole();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag === 8) {
|
||||
message.provisions.push(reader.uint32());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 10) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.provisions.push(reader.uint32());
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
if (tag === 16) {
|
||||
message.consumables.push(reader.uint32());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 18) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.consumables.push(reader.uint32());
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameModeRole {
|
||||
return {
|
||||
provisions: globalThis.Array.isArray(object?.provisions)
|
||||
? object.provisions.map((e: any) => globalThis.Number(e))
|
||||
: [],
|
||||
consumables: globalThis.Array.isArray(object?.consumables)
|
||||
? object.consumables.map((e: any) => globalThis.Number(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameModeRole): unknown {
|
||||
const obj: any = {};
|
||||
if (message.provisions?.length) {
|
||||
obj.provisions = message.provisions.map((e) => Math.round(e));
|
||||
}
|
||||
if (message.consumables?.length) {
|
||||
obj.consumables = message.consumables.map((e) => Math.round(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameModeRole>, I>>(
|
||||
base?: I,
|
||||
): GameModeRole {
|
||||
return GameModeRole.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameModeRole>, I>>(
|
||||
object: I,
|
||||
): GameModeRole {
|
||||
const message = createBaseGameModeRole();
|
||||
message.provisions = object.provisions?.map((e) => e) || [];
|
||||
message.consumables = object.consumables?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends globalThis.Array<infer U>
|
||||
? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U>
|
||||
? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown }
|
||||
? { $case: T['$case']; value?: DeepPartial<T['value']> }
|
||||
: T extends {}
|
||||
? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin
|
||||
? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
|
||||
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
||||
};
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === 'object' && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/i18n.proto
|
||||
// source: packages/core/src/protos/legacy_i18n.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
@@ -97,7 +97,7 @@ export const I18nString: MessageFns<I18nString> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseI18nString_LocalesEntry(): I18nString_LocalesEntry {
|
||||
function createBaseI18nString_LocalesEntry(): I18nString_LocalesEntry {
|
||||
return { key: "", value: "" };
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/i18n.proto";
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message MapDefinitions {
|
||||
map<int32, MapDefinition> maps = 1;
|
||||
+106
-47
@@ -2,13 +2,13 @@
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/map_definitions.proto
|
||||
// source: packages/core/src/protos/legacy_map_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { createBaseI18nString, I18nString } from "./i18n";
|
||||
import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
|
||||
import { I18nString, createBaseI18nString } from './legacy_i18n';
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
export const protobufPackage = 'blitzkit';
|
||||
|
||||
export interface MapDefinitions {
|
||||
maps: { [key: number]: MapDefinition };
|
||||
@@ -24,20 +24,27 @@ export interface MapDefinition {
|
||||
name: I18nString;
|
||||
}
|
||||
|
||||
export function createBaseMapDefinitions(): MapDefinitions {
|
||||
function createBaseMapDefinitions(): MapDefinitions {
|
||||
return { maps: {} };
|
||||
}
|
||||
|
||||
export const MapDefinitions: MessageFns<MapDefinitions> = {
|
||||
encode(message: MapDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
encode(
|
||||
message: MapDefinitions,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
Object.entries(message.maps).forEach(([key, value]) => {
|
||||
MapDefinitions_MapsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
MapDefinitions_MapsEntry.encode(
|
||||
{ key: key as any, value },
|
||||
writer.uint32(10).fork(),
|
||||
).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): MapDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseMapDefinitions();
|
||||
while (reader.pos < end) {
|
||||
@@ -48,7 +55,10 @@ export const MapDefinitions: MessageFns<MapDefinitions> = {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = MapDefinitions_MapsEntry.decode(reader, reader.uint32());
|
||||
const entry1 = MapDefinitions_MapsEntry.decode(
|
||||
reader,
|
||||
reader.uint32(),
|
||||
);
|
||||
if (entry1.value !== undefined) {
|
||||
message.maps[entry1.key] = entry1.value;
|
||||
}
|
||||
@@ -66,10 +76,13 @@ export const MapDefinitions: MessageFns<MapDefinitions> = {
|
||||
fromJSON(object: any): MapDefinitions {
|
||||
return {
|
||||
maps: isObject(object.maps)
|
||||
? Object.entries(object.maps).reduce<{ [key: number]: MapDefinition }>((acc, [key, value]) => {
|
||||
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;
|
||||
},
|
||||
{},
|
||||
)
|
||||
: {},
|
||||
};
|
||||
},
|
||||
@@ -88,12 +101,18 @@ export const MapDefinitions: MessageFns<MapDefinitions> = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<MapDefinitions>, I>>(base?: I): MapDefinitions {
|
||||
create<I extends Exact<DeepPartial<MapDefinitions>, I>>(
|
||||
base?: I,
|
||||
): MapDefinitions {
|
||||
return MapDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinitions>, I>>(object: I): MapDefinitions {
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinitions>, I>>(
|
||||
object: I,
|
||||
): MapDefinitions {
|
||||
const message = createBaseMapDefinitions();
|
||||
message.maps = Object.entries(object.maps ?? {}).reduce<{ [key: number]: MapDefinition }>((acc, [key, value]) => {
|
||||
message.maps = Object.entries(object.maps ?? {}).reduce<{
|
||||
[key: number]: MapDefinition;
|
||||
}>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = MapDefinition.fromPartial(value);
|
||||
}
|
||||
@@ -103,12 +122,15 @@ export const MapDefinitions: MessageFns<MapDefinitions> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseMapDefinitions_MapsEntry(): MapDefinitions_MapsEntry {
|
||||
function createBaseMapDefinitions_MapsEntry(): MapDefinitions_MapsEntry {
|
||||
return { key: 0, value: createBaseMapDefinition() };
|
||||
}
|
||||
|
||||
export const MapDefinitions_MapsEntry: MessageFns<MapDefinitions_MapsEntry> = {
|
||||
encode(message: MapDefinitions_MapsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
encode(
|
||||
message: MapDefinitions_MapsEntry,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).int32(message.key);
|
||||
}
|
||||
@@ -118,8 +140,12 @@ export const MapDefinitions_MapsEntry: MessageFns<MapDefinitions_MapsEntry> = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): MapDefinitions_MapsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
decode(
|
||||
input: BinaryReader | Uint8Array,
|
||||
length?: number,
|
||||
): MapDefinitions_MapsEntry {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseMapDefinitions_MapsEntry();
|
||||
while (reader.pos < end) {
|
||||
@@ -152,8 +178,12 @@ export const MapDefinitions_MapsEntry: MessageFns<MapDefinitions_MapsEntry> = {
|
||||
|
||||
fromJSON(object: any): MapDefinitions_MapsEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("MapDefinitions_MapsEntry.key", object.key)),
|
||||
value: MapDefinition.fromJSON(assertSet("MapDefinitions_MapsEntry.value", object.value)),
|
||||
key: globalThis.Number(
|
||||
assertSet('MapDefinitions_MapsEntry.key', object.key),
|
||||
),
|
||||
value: MapDefinition.fromJSON(
|
||||
assertSet('MapDefinitions_MapsEntry.value', object.value),
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
@@ -168,25 +198,33 @@ export const MapDefinitions_MapsEntry: MessageFns<MapDefinitions_MapsEntry> = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<MapDefinitions_MapsEntry>, I>>(base?: I): MapDefinitions_MapsEntry {
|
||||
create<I extends Exact<DeepPartial<MapDefinitions_MapsEntry>, I>>(
|
||||
base?: I,
|
||||
): MapDefinitions_MapsEntry {
|
||||
return MapDefinitions_MapsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinitions_MapsEntry>, I>>(object: I): MapDefinitions_MapsEntry {
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinitions_MapsEntry>, I>>(
|
||||
object: I,
|
||||
): MapDefinitions_MapsEntry {
|
||||
const message = createBaseMapDefinitions_MapsEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? MapDefinition.fromPartial(object.value)
|
||||
: createBaseMapDefinition();
|
||||
message.value =
|
||||
object.value !== undefined && object.value !== null
|
||||
? MapDefinition.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseMapDefinition(): MapDefinition {
|
||||
function createBaseMapDefinition(): MapDefinition {
|
||||
return { id: 0, name: createBaseI18nString() };
|
||||
}
|
||||
|
||||
export const MapDefinition: MessageFns<MapDefinition> = {
|
||||
encode(message: MapDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
encode(
|
||||
message: MapDefinition,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
@@ -197,7 +235,8 @@ export const MapDefinition: MessageFns<MapDefinition> = {
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): MapDefinition {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseMapDefinition();
|
||||
while (reader.pos < end) {
|
||||
@@ -230,8 +269,8 @@ export const MapDefinition: MessageFns<MapDefinition> = {
|
||||
|
||||
fromJSON(object: any): MapDefinition {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("MapDefinition.id", object.id)),
|
||||
name: I18nString.fromJSON(assertSet("MapDefinition.name", object.name)),
|
||||
id: globalThis.Number(assertSet('MapDefinition.id', object.id)),
|
||||
name: I18nString.fromJSON(assertSet('MapDefinition.name', object.name)),
|
||||
};
|
||||
},
|
||||
|
||||
@@ -246,34 +285,54 @@ export const MapDefinition: MessageFns<MapDefinition> = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<MapDefinition>, I>>(base?: I): MapDefinition {
|
||||
create<I extends Exact<DeepPartial<MapDefinition>, I>>(
|
||||
base?: I,
|
||||
): MapDefinition {
|
||||
return MapDefinition.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinition>, I>>(object: I): MapDefinition {
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinition>, I>>(
|
||||
object: I,
|
||||
): MapDefinition {
|
||||
const message = createBaseMapDefinition();
|
||||
message.id = object.id ?? 0;
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.name =
|
||||
object.name !== undefined && object.name !== null
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
export type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends globalThis.Array<infer U>
|
||||
? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U>
|
||||
? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown }
|
||||
? { $case: T['$case']; value?: DeepPartial<T['value']> }
|
||||
: T extends {}
|
||||
? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
export type Exact<P, I extends P> = P extends Builtin
|
||||
? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
|
||||
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
||||
};
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
return typeof value === 'object' && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
+2
-6
@@ -2,6 +2,8 @@ syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/utils.proto";
|
||||
|
||||
message ModelDefinitions {
|
||||
map<uint32, ModelDefinition> models = 1;
|
||||
}
|
||||
@@ -20,12 +22,6 @@ message Armor {
|
||||
repeated uint32 spaced = 2;
|
||||
}
|
||||
|
||||
message Vector3 {
|
||||
required float x = 1;
|
||||
required float y = 2;
|
||||
required float z = 3;
|
||||
}
|
||||
|
||||
message InitialTurretRotation {
|
||||
required float yaw = 1;
|
||||
required float pitch = 2;
|
||||
+22
-119
@@ -2,10 +2,11 @@
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/model_definitions.proto
|
||||
// source: packages/core/src/protos/legacy_model_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { Vector3, createBaseVector3 } from "./utils";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
@@ -47,12 +48,6 @@ export interface Armor_ThicknessEntry {
|
||||
value: number;
|
||||
}
|
||||
|
||||
export interface Vector3 {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
}
|
||||
|
||||
export interface InitialTurretRotation {
|
||||
yaw: number;
|
||||
pitch: number;
|
||||
@@ -110,7 +105,7 @@ export interface PitchLimitsExtrema {
|
||||
range: number;
|
||||
}
|
||||
|
||||
export function createBaseModelDefinitions(): ModelDefinitions {
|
||||
function createBaseModelDefinitions(): ModelDefinitions {
|
||||
return { models: {} };
|
||||
}
|
||||
|
||||
@@ -192,7 +187,7 @@ export const ModelDefinitions: MessageFns<ModelDefinitions> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseModelDefinitions_ModelsEntry(): ModelDefinitions_ModelsEntry {
|
||||
function createBaseModelDefinitions_ModelsEntry(): ModelDefinitions_ModelsEntry {
|
||||
return { key: 0, value: createBaseModelDefinition() };
|
||||
}
|
||||
|
||||
@@ -265,12 +260,12 @@ export const ModelDefinitions_ModelsEntry: MessageFns<ModelDefinitions_ModelsEnt
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? ModelDefinition.fromPartial(object.value)
|
||||
: createBaseModelDefinition();
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseModelDefinition(): ModelDefinition {
|
||||
function createBaseModelDefinition(): ModelDefinition {
|
||||
return {
|
||||
armor: createBaseArmor(),
|
||||
turret_origin: createBaseVector3(),
|
||||
@@ -472,7 +467,7 @@ export const ModelDefinition: MessageFns<ModelDefinition> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseModelDefinition_TurretsEntry(): ModelDefinition_TurretsEntry {
|
||||
function createBaseModelDefinition_TurretsEntry(): ModelDefinition_TurretsEntry {
|
||||
return { key: 0, value: createBaseTurretModelDefinition() };
|
||||
}
|
||||
|
||||
@@ -545,12 +540,12 @@ export const ModelDefinition_TurretsEntry: MessageFns<ModelDefinition_TurretsEnt
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? TurretModelDefinition.fromPartial(object.value)
|
||||
: createBaseTurretModelDefinition();
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseModelDefinition_TracksEntry(): ModelDefinition_TracksEntry {
|
||||
function createBaseModelDefinition_TracksEntry(): ModelDefinition_TracksEntry {
|
||||
return { key: 0, value: createBaseTrackModelDefinition() };
|
||||
}
|
||||
|
||||
@@ -623,12 +618,12 @@ export const ModelDefinition_TracksEntry: MessageFns<ModelDefinition_TracksEntry
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? TrackModelDefinition.fromPartial(object.value)
|
||||
: createBaseTrackModelDefinition();
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseArmor(): Armor {
|
||||
function createBaseArmor(): Armor {
|
||||
return { thickness: {}, spaced: [] };
|
||||
}
|
||||
|
||||
@@ -738,7 +733,7 @@ export const Armor: MessageFns<Armor> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseArmor_ThicknessEntry(): Armor_ThicknessEntry {
|
||||
function createBaseArmor_ThicknessEntry(): Armor_ThicknessEntry {
|
||||
return { key: 0, value: 0 };
|
||||
}
|
||||
|
||||
@@ -814,99 +809,7 @@ export const Armor_ThicknessEntry: MessageFns<Armor_ThicknessEntry> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseVector3(): Vector3 {
|
||||
return { x: 0, y: 0, z: 0 };
|
||||
}
|
||||
|
||||
export const Vector3: MessageFns<Vector3> = {
|
||||
encode(message: Vector3, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.x !== 0) {
|
||||
writer.uint32(13).float(message.x);
|
||||
}
|
||||
if (message.y !== 0) {
|
||||
writer.uint32(21).float(message.y);
|
||||
}
|
||||
if (message.z !== 0) {
|
||||
writer.uint32(29).float(message.z);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Vector3 {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseVector3();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 13) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.x = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 21) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.y = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 29) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.z = reader.float();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Vector3 {
|
||||
return {
|
||||
x: globalThis.Number(assertSet("Vector3.x", object.x)),
|
||||
y: globalThis.Number(assertSet("Vector3.y", object.y)),
|
||||
z: globalThis.Number(assertSet("Vector3.z", object.z)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Vector3): unknown {
|
||||
const obj: any = {};
|
||||
if (message.x !== 0) {
|
||||
obj.x = message.x;
|
||||
}
|
||||
if (message.y !== 0) {
|
||||
obj.y = message.y;
|
||||
}
|
||||
if (message.z !== 0) {
|
||||
obj.z = message.z;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Vector3>, I>>(base?: I): Vector3 {
|
||||
return Vector3.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Vector3>, I>>(object: I): Vector3 {
|
||||
const message = createBaseVector3();
|
||||
message.x = object.x ?? 0;
|
||||
message.y = object.y ?? 0;
|
||||
message.z = object.z ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseInitialTurretRotation(): InitialTurretRotation {
|
||||
function createBaseInitialTurretRotation(): InitialTurretRotation {
|
||||
return { yaw: 0, pitch: 0, roll: 0 };
|
||||
}
|
||||
|
||||
@@ -998,7 +901,7 @@ export const InitialTurretRotation: MessageFns<InitialTurretRotation> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseTurretModelDefinition(): TurretModelDefinition {
|
||||
function createBaseTurretModelDefinition(): TurretModelDefinition {
|
||||
return {
|
||||
bounding_box: createBaseBoundingBox(),
|
||||
armor: createBaseArmor(),
|
||||
@@ -1173,7 +1076,7 @@ export const TurretModelDefinition: MessageFns<TurretModelDefinition> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseTurretModelDefinition_GunsEntry(): TurretModelDefinition_GunsEntry {
|
||||
function createBaseTurretModelDefinition_GunsEntry(): TurretModelDefinition_GunsEntry {
|
||||
return { key: 0, value: createBaseGunModelDefinition() };
|
||||
}
|
||||
|
||||
@@ -1248,12 +1151,12 @@ export const TurretModelDefinition_GunsEntry: MessageFns<TurretModelDefinition_G
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? GunModelDefinition.fromPartial(object.value)
|
||||
: createBaseGunModelDefinition();
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseYawLimits(): YawLimits {
|
||||
function createBaseYawLimits(): YawLimits {
|
||||
return { min: 0, max: 0 };
|
||||
}
|
||||
|
||||
@@ -1329,7 +1232,7 @@ export const YawLimits: MessageFns<YawLimits> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseBoundingBox(): BoundingBox {
|
||||
function createBaseBoundingBox(): BoundingBox {
|
||||
return { min: createBaseVector3(), max: createBaseVector3() };
|
||||
}
|
||||
|
||||
@@ -1409,7 +1312,7 @@ export const BoundingBox: MessageFns<BoundingBox> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseTrackModelDefinition(): TrackModelDefinition {
|
||||
function createBaseTrackModelDefinition(): TrackModelDefinition {
|
||||
return { thickness: 0, origin: createBaseVector3() };
|
||||
}
|
||||
|
||||
@@ -1487,7 +1390,7 @@ export const TrackModelDefinition: MessageFns<TrackModelDefinition> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseGunModelDefinition(): GunModelDefinition {
|
||||
function createBaseGunModelDefinition(): GunModelDefinition {
|
||||
return { armor: createBaseArmor(), thickness: 0, model_id: 0, pitch: createBasePitchLimits(), mask: undefined };
|
||||
}
|
||||
|
||||
@@ -1615,7 +1518,7 @@ export const GunModelDefinition: MessageFns<GunModelDefinition> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBasePitchLimits(): PitchLimits {
|
||||
function createBasePitchLimits(): PitchLimits {
|
||||
return { min: 0, max: 0, front: undefined, back: undefined, transition: undefined };
|
||||
}
|
||||
|
||||
@@ -1743,7 +1646,7 @@ export const PitchLimits: MessageFns<PitchLimits> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBasePitchLimitsExtrema(): PitchLimitsExtrema {
|
||||
function createBasePitchLimitsExtrema(): PitchLimitsExtrema {
|
||||
return { min: 0, max: 0, range: 0 };
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/consumable_definitions.proto";
|
||||
import "packages/core/src/protos/i18n.proto";
|
||||
import "packages/core/src/protos/legacy_consumable_definitions.proto";
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message ProvisionDefinitions {
|
||||
map<uint32, Provision> provisions = 1;
|
||||
+194
-124
@@ -2,14 +2,14 @@
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/provision_definitions.proto
|
||||
// source: packages/core/src/protos/legacy_provision_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { ConsumableTankFilter } from "./consumable_definitions";
|
||||
import { createBaseI18nString, I18nString } from "./i18n";
|
||||
import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
|
||||
import { ConsumableTankFilter } from './legacy_consumable_definitions';
|
||||
import { I18nString, createBaseI18nString } from './legacy_i18n';
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
export const protobufPackage = 'blitzkit';
|
||||
|
||||
export interface ProvisionDefinitions {
|
||||
provisions: { [key: number]: Provision };
|
||||
@@ -29,20 +29,30 @@ export interface Provision {
|
||||
exclude: ConsumableTankFilter[];
|
||||
}
|
||||
|
||||
export function createBaseProvisionDefinitions(): ProvisionDefinitions {
|
||||
function createBaseProvisionDefinitions(): ProvisionDefinitions {
|
||||
return { provisions: {} };
|
||||
}
|
||||
|
||||
export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
|
||||
encode(message: ProvisionDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
encode(
|
||||
message: ProvisionDefinitions,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
Object.entries(message.provisions).forEach(([key, value]) => {
|
||||
ProvisionDefinitions_ProvisionsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
ProvisionDefinitions_ProvisionsEntry.encode(
|
||||
{ key: key as any, value },
|
||||
writer.uint32(10).fork(),
|
||||
).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ProvisionDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
decode(
|
||||
input: BinaryReader | Uint8Array,
|
||||
length?: number,
|
||||
): ProvisionDefinitions {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseProvisionDefinitions();
|
||||
while (reader.pos < end) {
|
||||
@@ -53,7 +63,10 @@ export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = ProvisionDefinitions_ProvisionsEntry.decode(reader, reader.uint32());
|
||||
const entry1 = ProvisionDefinitions_ProvisionsEntry.decode(
|
||||
reader,
|
||||
reader.uint32(),
|
||||
);
|
||||
if (entry1.value !== undefined) {
|
||||
message.provisions[entry1.key] = entry1.value;
|
||||
}
|
||||
@@ -71,10 +84,12 @@ export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
|
||||
fromJSON(object: any): ProvisionDefinitions {
|
||||
return {
|
||||
provisions: isObject(object.provisions)
|
||||
? Object.entries(object.provisions).reduce<{ [key: number]: Provision }>((acc, [key, value]) => {
|
||||
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;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
@@ -93,112 +108,140 @@ export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ProvisionDefinitions>, I>>(base?: I): ProvisionDefinitions {
|
||||
create<I extends Exact<DeepPartial<ProvisionDefinitions>, I>>(
|
||||
base?: I,
|
||||
): ProvisionDefinitions {
|
||||
return ProvisionDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ProvisionDefinitions>, I>>(object: I): ProvisionDefinitions {
|
||||
fromPartial<I extends Exact<DeepPartial<ProvisionDefinitions>, I>>(
|
||||
object: I,
|
||||
): ProvisionDefinitions {
|
||||
const message = createBaseProvisionDefinitions();
|
||||
message.provisions = Object.entries(object.provisions ?? {}).reduce<{ [key: number]: Provision }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Provision.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
message.provisions = Object.entries(object.provisions ?? {}).reduce<{
|
||||
[key: number]: Provision;
|
||||
}>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Provision.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseProvisionDefinitions_ProvisionsEntry(): ProvisionDefinitions_ProvisionsEntry {
|
||||
function createBaseProvisionDefinitions_ProvisionsEntry(): ProvisionDefinitions_ProvisionsEntry {
|
||||
return { key: 0, value: createBaseProvision() };
|
||||
}
|
||||
|
||||
export const ProvisionDefinitions_ProvisionsEntry: MessageFns<ProvisionDefinitions_ProvisionsEntry> = {
|
||||
encode(message: ProvisionDefinitions_ProvisionsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Provision.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ProvisionDefinitions_ProvisionsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseProvisionDefinitions_ProvisionsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Provision.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
export const ProvisionDefinitions_ProvisionsEntry: MessageFns<ProvisionDefinitions_ProvisionsEntry> =
|
||||
{
|
||||
encode(
|
||||
message: ProvisionDefinitions_ProvisionsEntry,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
if (message.value !== undefined) {
|
||||
Provision.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
return writer;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ProvisionDefinitions_ProvisionsEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("ProvisionDefinitions_ProvisionsEntry.key", object.key)),
|
||||
value: Provision.fromJSON(assertSet("ProvisionDefinitions_ProvisionsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
decode(
|
||||
input: BinaryReader | Uint8Array,
|
||||
length?: number,
|
||||
): ProvisionDefinitions_ProvisionsEntry {
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseProvisionDefinitions_ProvisionsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
toJSON(message: ProvisionDefinitions_ProvisionsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Provision.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
create<I extends Exact<DeepPartial<ProvisionDefinitions_ProvisionsEntry>, I>>(
|
||||
base?: I,
|
||||
): ProvisionDefinitions_ProvisionsEntry {
|
||||
return ProvisionDefinitions_ProvisionsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ProvisionDefinitions_ProvisionsEntry>, I>>(
|
||||
object: I,
|
||||
): ProvisionDefinitions_ProvisionsEntry {
|
||||
const message = createBaseProvisionDefinitions_ProvisionsEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Provision.fromPartial(object.value)
|
||||
: createBaseProvision();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
message.value = Provision.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
export function createBaseProvision(): Provision {
|
||||
return { id: 0, name: createBaseI18nString(), crew: undefined, game_mode_exclusive: false, include: [], exclude: [] };
|
||||
fromJSON(object: any): ProvisionDefinitions_ProvisionsEntry {
|
||||
return {
|
||||
key: globalThis.Number(
|
||||
assertSet('ProvisionDefinitions_ProvisionsEntry.key', object.key),
|
||||
),
|
||||
value: Provision.fromJSON(
|
||||
assertSet('ProvisionDefinitions_ProvisionsEntry.value', object.value),
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ProvisionDefinitions_ProvisionsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Provision.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<
|
||||
I extends Exact<DeepPartial<ProvisionDefinitions_ProvisionsEntry>, I>,
|
||||
>(base?: I): ProvisionDefinitions_ProvisionsEntry {
|
||||
return ProvisionDefinitions_ProvisionsEntry.fromPartial(
|
||||
base ?? ({} as any),
|
||||
);
|
||||
},
|
||||
fromPartial<
|
||||
I extends Exact<DeepPartial<ProvisionDefinitions_ProvisionsEntry>, I>,
|
||||
>(object: I): ProvisionDefinitions_ProvisionsEntry {
|
||||
const message = createBaseProvisionDefinitions_ProvisionsEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value =
|
||||
object.value !== undefined && object.value !== null
|
||||
? Provision.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseProvision(): Provision {
|
||||
return {
|
||||
id: 0,
|
||||
name: createBaseI18nString(),
|
||||
crew: undefined,
|
||||
game_mode_exclusive: false,
|
||||
include: [],
|
||||
exclude: [],
|
||||
};
|
||||
}
|
||||
|
||||
export const Provision: MessageFns<Provision> = {
|
||||
encode(message: Provision, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
encode(
|
||||
message: Provision,
|
||||
writer: BinaryWriter = new BinaryWriter(),
|
||||
): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
@@ -221,7 +264,8 @@ export const Provision: MessageFns<Provision> = {
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Provision {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
const reader =
|
||||
input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseProvision();
|
||||
while (reader.pos < end) {
|
||||
@@ -264,7 +308,9 @@ export const Provision: MessageFns<Provision> = {
|
||||
break;
|
||||
}
|
||||
|
||||
message.include.push(ConsumableTankFilter.decode(reader, reader.uint32()));
|
||||
message.include.push(
|
||||
ConsumableTankFilter.decode(reader, reader.uint32()),
|
||||
);
|
||||
continue;
|
||||
}
|
||||
case 7: {
|
||||
@@ -272,7 +318,9 @@ export const Provision: MessageFns<Provision> = {
|
||||
break;
|
||||
}
|
||||
|
||||
message.exclude.push(ConsumableTankFilter.decode(reader, reader.uint32()));
|
||||
message.exclude.push(
|
||||
ConsumableTankFilter.decode(reader, reader.uint32()),
|
||||
);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -286,10 +334,12 @@ export const Provision: MessageFns<Provision> = {
|
||||
|
||||
fromJSON(object: any): Provision {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("Provision.id", object.id)),
|
||||
name: I18nString.fromJSON(assertSet("Provision.name", object.name)),
|
||||
id: globalThis.Number(assertSet('Provision.id', object.id)),
|
||||
name: I18nString.fromJSON(assertSet('Provision.name', object.name)),
|
||||
crew: isSet(object.crew) ? globalThis.Number(object.crew) : undefined,
|
||||
game_mode_exclusive: globalThis.Boolean(assertSet("Provision.game_mode_exclusive", object.game_mode_exclusive)),
|
||||
game_mode_exclusive: globalThis.Boolean(
|
||||
assertSet('Provision.game_mode_exclusive', object.game_mode_exclusive),
|
||||
),
|
||||
include: globalThis.Array.isArray(object?.include)
|
||||
? object.include.map((e: any) => ConsumableTankFilter.fromJSON(e))
|
||||
: [],
|
||||
@@ -325,35 +375,55 @@ export const Provision: MessageFns<Provision> = {
|
||||
create<I extends Exact<DeepPartial<Provision>, I>>(base?: I): Provision {
|
||||
return Provision.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Provision>, I>>(object: I): Provision {
|
||||
fromPartial<I extends Exact<DeepPartial<Provision>, I>>(
|
||||
object: I,
|
||||
): Provision {
|
||||
const message = createBaseProvision();
|
||||
message.id = object.id ?? 0;
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.name =
|
||||
object.name !== undefined && object.name !== null
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.crew = object.crew ?? undefined;
|
||||
message.game_mode_exclusive = object.game_mode_exclusive ?? false;
|
||||
message.include = object.include?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
message.exclude = object.exclude?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
message.include =
|
||||
object.include?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
message.exclude =
|
||||
object.exclude?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
export type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends globalThis.Array<infer U>
|
||||
? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U>
|
||||
? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown }
|
||||
? { $case: T['$case']; value?: DeepPartial<T['value']> }
|
||||
: T extends {}
|
||||
? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
export type Exact<P, I extends P> = P extends Builtin
|
||||
? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & {
|
||||
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
||||
};
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
return typeof value === 'object' && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
File renamed without changes.
+6
-6
@@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/rating_leaderboard.proto
|
||||
// source: packages/core/src/protos/legacy_rating_leaderboard.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
@@ -36,7 +36,7 @@ export interface RatingLeaderboardEntryV2 {
|
||||
kills: number;
|
||||
}
|
||||
|
||||
export function createBaseRatingLeaderboard(): RatingLeaderboard {
|
||||
function createBaseRatingLeaderboard(): RatingLeaderboard {
|
||||
return { version: undefined };
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export const RatingLeaderboard: MessageFns<RatingLeaderboard> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseRatingLeaderboardV1(): RatingLeaderboardV1 {
|
||||
function createBaseRatingLeaderboardV1(): RatingLeaderboardV1 {
|
||||
return { entries: [] };
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ export const RatingLeaderboardV1: MessageFns<RatingLeaderboardV1> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseRatingLeaderboardEntryV1(): RatingLeaderboardEntryV1 {
|
||||
function createBaseRatingLeaderboardEntryV1(): RatingLeaderboardEntryV1 {
|
||||
return { id: 0, score: 0 };
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ export const RatingLeaderboardEntryV1: MessageFns<RatingLeaderboardEntryV1> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseRatingLeaderboardV2(): RatingLeaderboardV2 {
|
||||
function createBaseRatingLeaderboardV2(): RatingLeaderboardV2 {
|
||||
return { entries: [] };
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ export const RatingLeaderboardV2: MessageFns<RatingLeaderboardV2> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseRatingLeaderboardEntryV2(): RatingLeaderboardEntryV2 {
|
||||
function createBaseRatingLeaderboardEntryV2(): RatingLeaderboardEntryV2 {
|
||||
return { id: 0, score: 0, battles: 0, wins: 0, survived: 0, damage: 0, kills: 0 };
|
||||
}
|
||||
|
||||
File renamed without changes.
+5
-7
@@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/skill_definitions.proto
|
||||
// source: packages/core/src/protos/legacy_skill_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
@@ -23,7 +23,7 @@ export interface Skill {
|
||||
skills: string[];
|
||||
}
|
||||
|
||||
export function createBaseSkillDefinitions(): SkillDefinitions {
|
||||
function createBaseSkillDefinitions(): SkillDefinitions {
|
||||
return { classes: {} };
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export const SkillDefinitions: MessageFns<SkillDefinitions> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseSkillDefinitions_ClassesEntry(): SkillDefinitions_ClassesEntry {
|
||||
function createBaseSkillDefinitions_ClassesEntry(): SkillDefinitions_ClassesEntry {
|
||||
return { key: 0, value: createBaseSkill() };
|
||||
}
|
||||
|
||||
@@ -175,14 +175,12 @@ export const SkillDefinitions_ClassesEntry: MessageFns<SkillDefinitions_ClassesE
|
||||
): SkillDefinitions_ClassesEntry {
|
||||
const message = createBaseSkillDefinitions_ClassesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Skill.fromPartial(object.value)
|
||||
: createBaseSkill();
|
||||
message.value = (object.value !== undefined && object.value !== null) ? Skill.fromPartial(object.value) : undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseSkill(): Skill {
|
||||
function createBaseSkill(): Skill {
|
||||
return { skills: [] };
|
||||
}
|
||||
|
||||
+41
-41
@@ -2,7 +2,7 @@ syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/i18n.proto";
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message TankDefinitions {
|
||||
map<uint32, TankDefinition> tanks = 1;
|
||||
@@ -10,16 +10,16 @@ message TankDefinitions {
|
||||
|
||||
message TankDefinition {
|
||||
required uint32 id = 1;
|
||||
required string slug = 2;
|
||||
map<uint32, uint32> roles = 3;
|
||||
required bool fixed_camouflage = 5;
|
||||
repeated int32 camouflages = 6;
|
||||
repeated int32 ancestors = 7;
|
||||
repeated int32 successors = 8;
|
||||
repeated Crew crew = 9;
|
||||
required uint32 health = 10;
|
||||
required string nation = 11;
|
||||
required I18nString name = 12;
|
||||
map<uint32, uint32> roles = 2;
|
||||
required bool fixed_camouflage = 4;
|
||||
repeated int32 camouflages = 5;
|
||||
repeated int32 ancestors = 6;
|
||||
repeated int32 successors = 7;
|
||||
repeated Crew crew = 8;
|
||||
required uint32 health = 9;
|
||||
required string nation = 10;
|
||||
required I18nString name = 11;
|
||||
optional I18nString name_full = 12;
|
||||
required TankType type = 13;
|
||||
required uint32 max_consumables = 14;
|
||||
required uint32 max_provisions = 15;
|
||||
@@ -108,55 +108,55 @@ message GunDefinition {
|
||||
GunDefinitionAutoLoader auto_loader = 2;
|
||||
GunDefinitionAutoReloader auto_reloader = 3;
|
||||
}
|
||||
|
||||
required uint32 id = 4;
|
||||
required float rotation_speed = 5;
|
||||
optional ResearchCost research_cost = 6;
|
||||
required uint32 weight = 7;
|
||||
required I18nString name = 8;
|
||||
required uint32 tier = 9;
|
||||
repeated ShellDefinition shells = 10;
|
||||
required float camouflage_loss = 11;
|
||||
required float aim_time = 12;
|
||||
required float dispersion_base = 13;
|
||||
required float dispersion_traverse = 14;
|
||||
required float dispersion_shot = 15;
|
||||
required float dispersion_damaged = 16;
|
||||
repeated Unlock unlocks = 17;
|
||||
required uint32 shell_capacity = 18;
|
||||
optional AssaultRanges assault_ranges = 19;
|
||||
optional Burst burst = 20;
|
||||
}
|
||||
|
||||
message GunDefinitionRegular {
|
||||
required GunDefinitionBase base = 1;
|
||||
required GunDefinitionRegularProperties extension = 2;
|
||||
}
|
||||
|
||||
message GunDefinitionRegularProperties {
|
||||
required float reload = 1;
|
||||
}
|
||||
|
||||
message GunDefinitionAutoLoader {
|
||||
required GunDefinitionBase base = 1;
|
||||
required GunDefinitionAutoLoaderProperties extension = 2;
|
||||
}
|
||||
|
||||
message GunDefinitionAutoLoaderProperties {
|
||||
required float clip_reload = 1;
|
||||
required float intra_clip = 2;
|
||||
required float shell_count = 3;
|
||||
}
|
||||
|
||||
message Burst {
|
||||
required uint32 count = 1;
|
||||
required float interval = 2;
|
||||
message GunDefinitionAutoReloader {
|
||||
required GunDefinitionBase base = 1;
|
||||
required GunDefinitionAutoReloaderProperties extension = 2;
|
||||
}
|
||||
|
||||
message GunDefinitionAutoReloader {
|
||||
message GunDefinitionAutoReloaderProperties {
|
||||
repeated float shell_reloads = 1;
|
||||
required float intra_clip = 2;
|
||||
required float shell_count = 3;
|
||||
}
|
||||
|
||||
message AssaultRanges {
|
||||
repeated AssaultRange ranges = 1;
|
||||
repeated ShellType types = 2;
|
||||
}
|
||||
|
||||
message AssaultRange {
|
||||
required float distance = 1;
|
||||
required float factor = 2;
|
||||
message GunDefinitionBase {
|
||||
required uint32 id = 1;
|
||||
required float rotation_speed = 2;
|
||||
optional ResearchCost research_cost = 3;
|
||||
required uint32 weight = 4;
|
||||
required I18nString name = 5;
|
||||
required uint32 tier = 6;
|
||||
repeated ShellDefinition shells = 7;
|
||||
required float camouflage_loss = 8;
|
||||
required float aim_time = 9;
|
||||
required float dispersion_base = 10;
|
||||
required float dispersion_traverse = 11;
|
||||
required float dispersion_shot = 12;
|
||||
required float dispersion_damaged = 13;
|
||||
repeated Unlock unlocks = 14;
|
||||
required uint32 shell_capacity = 15;
|
||||
}
|
||||
|
||||
message ShellDefinition {
|
||||
+1018
-849
File diff suppressed because it is too large.
Load diff
@@ -1,12 +0,0 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message PopularTanks {
|
||||
repeated PopularTank tanks = 1;
|
||||
}
|
||||
|
||||
message PopularTank {
|
||||
required uint32 id = 1;
|
||||
required uint32 views = 2; // views in the last 7 days
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/popular_tanks.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface PopularTanks {
|
||||
tanks: PopularTank[];
|
||||
}
|
||||
|
||||
export interface PopularTank {
|
||||
id: number;
|
||||
/** views in the last 7 days */
|
||||
views: number;
|
||||
}
|
||||
|
||||
export function createBasePopularTanks(): PopularTanks {
|
||||
return { tanks: [] };
|
||||
}
|
||||
|
||||
export const PopularTanks: MessageFns<PopularTanks> = {
|
||||
encode(message: PopularTanks, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.tanks) {
|
||||
PopularTank.encode(v!, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): PopularTanks {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBasePopularTanks();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.tanks.push(PopularTank.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): PopularTanks {
|
||||
return {
|
||||
tanks: globalThis.Array.isArray(object?.tanks) ? object.tanks.map((e: any) => PopularTank.fromJSON(e)) : [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: PopularTanks): unknown {
|
||||
const obj: any = {};
|
||||
if (message.tanks?.length) {
|
||||
obj.tanks = message.tanks.map((e) => PopularTank.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<PopularTanks>, I>>(base?: I): PopularTanks {
|
||||
return PopularTanks.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<PopularTanks>, I>>(object: I): PopularTanks {
|
||||
const message = createBasePopularTanks();
|
||||
message.tanks = object.tanks?.map((e) => PopularTank.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBasePopularTank(): PopularTank {
|
||||
return { id: 0, views: 0 };
|
||||
}
|
||||
|
||||
export const PopularTank: MessageFns<PopularTank> = {
|
||||
encode(message: PopularTank, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
if (message.views !== 0) {
|
||||
writer.uint32(16).uint32(message.views);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): PopularTank {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBasePopularTank();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.views = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): PopularTank {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("PopularTank.id", object.id)),
|
||||
views: globalThis.Number(assertSet("PopularTank.views", object.views)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: PopularTank): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== 0) {
|
||||
obj.id = Math.round(message.id);
|
||||
}
|
||||
if (message.views !== 0) {
|
||||
obj.views = Math.round(message.views);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<PopularTank>, I>>(base?: I): PopularTank {
|
||||
return PopularTank.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<PopularTank>, I>>(object: I): PopularTank {
|
||||
const message = createBasePopularTank();
|
||||
message.id = object.id ?? 0;
|
||||
message.views = object.views ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ export interface Video {
|
||||
author: string;
|
||||
}
|
||||
|
||||
export function createBaseReviews(): Reviews {
|
||||
function createBaseReviews(): Reviews {
|
||||
return { reviews: {} };
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ export const Reviews: MessageFns<Reviews> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseReviews_ReviewsEntry(): Reviews_ReviewsEntry {
|
||||
function createBaseReviews_ReviewsEntry(): Reviews_ReviewsEntry {
|
||||
return { key: 0, value: createBaseReview() };
|
||||
}
|
||||
|
||||
@@ -180,12 +180,12 @@ export const Reviews_ReviewsEntry: MessageFns<Reviews_ReviewsEntry> = {
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Review.fromPartial(object.value)
|
||||
: createBaseReview();
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseReview(): Review {
|
||||
function createBaseReview(): Review {
|
||||
return { last_updated: 0, videos: [] };
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ export const Review: MessageFns<Review> = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createBaseVideo(): Video {
|
||||
function createBaseVideo(): Video {
|
||||
return { id: "", author: "" };
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
syntax = "proto2";
|
||||
|
||||
import "packages/core/src/protos/utils.proto";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message Tank {
|
||||
required string id = 1;
|
||||
required string slug = 2;
|
||||
required I18n name = 3;
|
||||
map<string, Turret> turrets = 4;
|
||||
map<string, Gun> guns = 5;
|
||||
}
|
||||
|
||||
message Turret {
|
||||
required string id = 1;
|
||||
}
|
||||
|
||||
message Gun {
|
||||
required string id = 1;
|
||||
}
|
||||
@@ -0,0 +1,509 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/tank.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { I18n, createBaseI18n } from "./utils";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface Tank {
|
||||
id: string;
|
||||
slug: string;
|
||||
name: I18n;
|
||||
turrets: { [key: string]: Turret };
|
||||
guns: { [key: string]: Gun };
|
||||
}
|
||||
|
||||
export interface Tank_TurretsEntry {
|
||||
key: string;
|
||||
value: Turret | undefined;
|
||||
}
|
||||
|
||||
export interface Tank_GunsEntry {
|
||||
key: string;
|
||||
value: Gun | undefined;
|
||||
}
|
||||
|
||||
export interface Turret {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface Gun {
|
||||
id: string;
|
||||
}
|
||||
|
||||
function createBaseTank(): Tank {
|
||||
return { id: "", slug: "", name: createBaseI18n(), turrets: {}, guns: {} };
|
||||
}
|
||||
|
||||
export const Tank: MessageFns<Tank> = {
|
||||
encode(message: Tank, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== "") {
|
||||
writer.uint32(10).string(message.id);
|
||||
}
|
||||
if (message.slug !== "") {
|
||||
writer.uint32(18).string(message.slug);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
I18n.encode(message.name, writer.uint32(26).fork()).join();
|
||||
}
|
||||
Object.entries(message.turrets).forEach(([key, value]) => {
|
||||
Tank_TurretsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
|
||||
});
|
||||
Object.entries(message.guns).forEach(([key, value]) => {
|
||||
Tank_GunsEntry.encode({ key: key as any, value }, writer.uint32(42).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Tank {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseTank();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.slug = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18n.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 34) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry4 = Tank_TurretsEntry.decode(reader, reader.uint32());
|
||||
if (entry4.value !== undefined) {
|
||||
message.turrets[entry4.key] = entry4.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 5: {
|
||||
if (tag !== 42) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry5 = Tank_GunsEntry.decode(reader, reader.uint32());
|
||||
if (entry5.value !== undefined) {
|
||||
message.guns[entry5.key] = entry5.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Tank {
|
||||
return {
|
||||
id: globalThis.String(assertSet("Tank.id", object.id)),
|
||||
slug: globalThis.String(assertSet("Tank.slug", object.slug)),
|
||||
name: I18n.fromJSON(assertSet("Tank.name", object.name)),
|
||||
turrets: isObject(object.turrets)
|
||||
? Object.entries(object.turrets).reduce<{ [key: string]: Turret }>((acc, [key, value]) => {
|
||||
acc[key] = Turret.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
guns: isObject(object.guns)
|
||||
? Object.entries(object.guns).reduce<{ [key: string]: Gun }>((acc, [key, value]) => {
|
||||
acc[key] = Gun.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Tank): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== "") {
|
||||
obj.id = message.id;
|
||||
}
|
||||
if (message.slug !== "") {
|
||||
obj.slug = message.slug;
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18n.toJSON(message.name);
|
||||
}
|
||||
if (message.turrets) {
|
||||
const entries = Object.entries(message.turrets);
|
||||
if (entries.length > 0) {
|
||||
obj.turrets = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.turrets[k] = Turret.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (message.guns) {
|
||||
const entries = Object.entries(message.guns);
|
||||
if (entries.length > 0) {
|
||||
obj.guns = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.guns[k] = Gun.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Tank>, I>>(base?: I): Tank {
|
||||
return Tank.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Tank>, I>>(object: I): Tank {
|
||||
const message = createBaseTank();
|
||||
message.id = object.id ?? "";
|
||||
message.slug = object.slug ?? "";
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18n.fromPartial(object.name)
|
||||
: createBaseI18n();
|
||||
message.turrets = Object.entries(object.turrets ?? {}).reduce<{ [key: string]: Turret }>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = Turret.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
message.guns = Object.entries(object.guns ?? {}).reduce<{ [key: string]: Gun }>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = Gun.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseTank_TurretsEntry(): Tank_TurretsEntry {
|
||||
return { key: "", value: createBaseTurret() };
|
||||
}
|
||||
|
||||
export const Tank_TurretsEntry: MessageFns<Tank_TurretsEntry> = {
|
||||
encode(message: Tank_TurretsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Turret.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Tank_TurretsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseTank_TurretsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Turret.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Tank_TurretsEntry {
|
||||
return {
|
||||
key: globalThis.String(assertSet("Tank_TurretsEntry.key", object.key)),
|
||||
value: Turret.fromJSON(assertSet("Tank_TurretsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Tank_TurretsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Turret.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Tank_TurretsEntry>, I>>(base?: I): Tank_TurretsEntry {
|
||||
return Tank_TurretsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Tank_TurretsEntry>, I>>(object: I): Tank_TurretsEntry {
|
||||
const message = createBaseTank_TurretsEntry();
|
||||
message.key = object.key ?? "";
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Turret.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseTank_GunsEntry(): Tank_GunsEntry {
|
||||
return { key: "", value: createBaseGun() };
|
||||
}
|
||||
|
||||
export const Tank_GunsEntry: MessageFns<Tank_GunsEntry> = {
|
||||
encode(message: Tank_GunsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Gun.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Tank_GunsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseTank_GunsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Gun.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Tank_GunsEntry {
|
||||
return {
|
||||
key: globalThis.String(assertSet("Tank_GunsEntry.key", object.key)),
|
||||
value: Gun.fromJSON(assertSet("Tank_GunsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Tank_GunsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Gun.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Tank_GunsEntry>, I>>(base?: I): Tank_GunsEntry {
|
||||
return Tank_GunsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Tank_GunsEntry>, I>>(object: I): Tank_GunsEntry {
|
||||
const message = createBaseTank_GunsEntry();
|
||||
message.key = object.key ?? "";
|
||||
message.value = (object.value !== undefined && object.value !== null) ? Gun.fromPartial(object.value) : undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseTurret(): Turret {
|
||||
return { id: "" };
|
||||
}
|
||||
|
||||
export const Turret: MessageFns<Turret> = {
|
||||
encode(message: Turret, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== "") {
|
||||
writer.uint32(10).string(message.id);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Turret {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseTurret();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.string();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Turret {
|
||||
return { id: globalThis.String(assertSet("Turret.id", object.id)) };
|
||||
},
|
||||
|
||||
toJSON(message: Turret): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== "") {
|
||||
obj.id = message.id;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Turret>, I>>(base?: I): Turret {
|
||||
return Turret.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Turret>, I>>(object: I): Turret {
|
||||
const message = createBaseTurret();
|
||||
message.id = object.id ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseGun(): Gun {
|
||||
return { id: "" };
|
||||
}
|
||||
|
||||
export const Gun: MessageFns<Gun> = {
|
||||
encode(message: Gun, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== "") {
|
||||
writer.uint32(10).string(message.id);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Gun {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGun();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.string();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Gun {
|
||||
return { id: globalThis.String(assertSet("Gun.id", object.id)) };
|
||||
},
|
||||
|
||||
toJSON(message: Gun): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== "") {
|
||||
obj.id = message.id;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Gun>, I>>(base?: I): Gun {
|
||||
return Gun.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Gun>, I>>(object: I): Gun {
|
||||
const message = createBaseGun();
|
||||
message.id = object.id ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message TankArmor {
|
||||
// key can only ever be "chassis", "hull", "turret", or "gun"
|
||||
map<string, PenetrationGroup> groups = 1;
|
||||
}
|
||||
|
||||
message PenetrationGroup {
|
||||
// keys are mostly "armor_xyz" where xyz is an integer but sometimes can be
|
||||
// things like "commander", "rightTrack", etc.
|
||||
map<string, ArmorPlate> armors = 1;
|
||||
}
|
||||
|
||||
message ArmorPlate {
|
||||
// this is the thickness of the armor in millimeters
|
||||
required float thickness = 1;
|
||||
// this can be stuff like ArmorScreen which is spaced armor, FuelTank, etc.
|
||||
required string type = 2;
|
||||
}
|
||||
@@ -0,0 +1,471 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/tank_armor.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface TankArmor {
|
||||
/** key can only ever be "chassis", "hull", "turret", or "gun" */
|
||||
groups: { [key: string]: PenetrationGroup };
|
||||
}
|
||||
|
||||
export interface TankArmor_GroupsEntry {
|
||||
key: string;
|
||||
value: PenetrationGroup | undefined;
|
||||
}
|
||||
|
||||
export interface PenetrationGroup {
|
||||
/**
|
||||
* keys are mostly "armor_xyz" where xyz is an integer but sometimes can be
|
||||
* things like "commander", "rightTrack", etc.
|
||||
*/
|
||||
armors: { [key: string]: ArmorPlate };
|
||||
}
|
||||
|
||||
export interface PenetrationGroup_ArmorsEntry {
|
||||
key: string;
|
||||
value: ArmorPlate | undefined;
|
||||
}
|
||||
|
||||
export interface ArmorPlate {
|
||||
/** this is the thickness of the armor in millimeters */
|
||||
thickness: number;
|
||||
/** this can be stuff like ArmorScreen which is spaced armor, FuelTank, etc. */
|
||||
type: string;
|
||||
}
|
||||
|
||||
function createBaseTankArmor(): TankArmor {
|
||||
return { groups: {} };
|
||||
}
|
||||
|
||||
export const TankArmor: MessageFns<TankArmor> = {
|
||||
encode(message: TankArmor, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.groups).forEach(([key, value]) => {
|
||||
TankArmor_GroupsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): TankArmor {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseTankArmor();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = TankArmor_GroupsEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.groups[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): TankArmor {
|
||||
return {
|
||||
groups: isObject(object.groups)
|
||||
? Object.entries(object.groups).reduce<{ [key: string]: PenetrationGroup }>((acc, [key, value]) => {
|
||||
acc[key] = PenetrationGroup.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: TankArmor): unknown {
|
||||
const obj: any = {};
|
||||
if (message.groups) {
|
||||
const entries = Object.entries(message.groups);
|
||||
if (entries.length > 0) {
|
||||
obj.groups = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.groups[k] = PenetrationGroup.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<TankArmor>, I>>(base?: I): TankArmor {
|
||||
return TankArmor.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<TankArmor>, I>>(object: I): TankArmor {
|
||||
const message = createBaseTankArmor();
|
||||
message.groups = Object.entries(object.groups ?? {}).reduce<{ [key: string]: PenetrationGroup }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = PenetrationGroup.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseTankArmor_GroupsEntry(): TankArmor_GroupsEntry {
|
||||
return { key: "", value: createBasePenetrationGroup() };
|
||||
}
|
||||
|
||||
export const TankArmor_GroupsEntry: MessageFns<TankArmor_GroupsEntry> = {
|
||||
encode(message: TankArmor_GroupsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
PenetrationGroup.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): TankArmor_GroupsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseTankArmor_GroupsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = PenetrationGroup.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): TankArmor_GroupsEntry {
|
||||
return {
|
||||
key: globalThis.String(assertSet("TankArmor_GroupsEntry.key", object.key)),
|
||||
value: PenetrationGroup.fromJSON(assertSet("TankArmor_GroupsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: TankArmor_GroupsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = PenetrationGroup.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<TankArmor_GroupsEntry>, I>>(base?: I): TankArmor_GroupsEntry {
|
||||
return TankArmor_GroupsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<TankArmor_GroupsEntry>, I>>(object: I): TankArmor_GroupsEntry {
|
||||
const message = createBaseTankArmor_GroupsEntry();
|
||||
message.key = object.key ?? "";
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? PenetrationGroup.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBasePenetrationGroup(): PenetrationGroup {
|
||||
return { armors: {} };
|
||||
}
|
||||
|
||||
export const PenetrationGroup: MessageFns<PenetrationGroup> = {
|
||||
encode(message: PenetrationGroup, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.armors).forEach(([key, value]) => {
|
||||
PenetrationGroup_ArmorsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): PenetrationGroup {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBasePenetrationGroup();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = PenetrationGroup_ArmorsEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.armors[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): PenetrationGroup {
|
||||
return {
|
||||
armors: isObject(object.armors)
|
||||
? Object.entries(object.armors).reduce<{ [key: string]: ArmorPlate }>((acc, [key, value]) => {
|
||||
acc[key] = ArmorPlate.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: PenetrationGroup): unknown {
|
||||
const obj: any = {};
|
||||
if (message.armors) {
|
||||
const entries = Object.entries(message.armors);
|
||||
if (entries.length > 0) {
|
||||
obj.armors = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.armors[k] = ArmorPlate.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<PenetrationGroup>, I>>(base?: I): PenetrationGroup {
|
||||
return PenetrationGroup.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<PenetrationGroup>, I>>(object: I): PenetrationGroup {
|
||||
const message = createBasePenetrationGroup();
|
||||
message.armors = Object.entries(object.armors ?? {}).reduce<{ [key: string]: ArmorPlate }>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = ArmorPlate.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBasePenetrationGroup_ArmorsEntry(): PenetrationGroup_ArmorsEntry {
|
||||
return { key: "", value: createBaseArmorPlate() };
|
||||
}
|
||||
|
||||
export const PenetrationGroup_ArmorsEntry: MessageFns<PenetrationGroup_ArmorsEntry> = {
|
||||
encode(message: PenetrationGroup_ArmorsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
ArmorPlate.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): PenetrationGroup_ArmorsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBasePenetrationGroup_ArmorsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = ArmorPlate.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): PenetrationGroup_ArmorsEntry {
|
||||
return {
|
||||
key: globalThis.String(assertSet("PenetrationGroup_ArmorsEntry.key", object.key)),
|
||||
value: ArmorPlate.fromJSON(assertSet("PenetrationGroup_ArmorsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: PenetrationGroup_ArmorsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = ArmorPlate.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<PenetrationGroup_ArmorsEntry>, I>>(base?: I): PenetrationGroup_ArmorsEntry {
|
||||
return PenetrationGroup_ArmorsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<PenetrationGroup_ArmorsEntry>, I>>(object: I): PenetrationGroup_ArmorsEntry {
|
||||
const message = createBasePenetrationGroup_ArmorsEntry();
|
||||
message.key = object.key ?? "";
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? ArmorPlate.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseArmorPlate(): ArmorPlate {
|
||||
return { thickness: 0, type: "" };
|
||||
}
|
||||
|
||||
export const ArmorPlate: MessageFns<ArmorPlate> = {
|
||||
encode(message: ArmorPlate, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.thickness !== 0) {
|
||||
writer.uint32(13).float(message.thickness);
|
||||
}
|
||||
if (message.type !== "") {
|
||||
writer.uint32(18).string(message.type);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ArmorPlate {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseArmorPlate();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 13) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.thickness = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.type = reader.string();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ArmorPlate {
|
||||
return {
|
||||
thickness: globalThis.Number(assertSet("ArmorPlate.thickness", object.thickness)),
|
||||
type: globalThis.String(assertSet("ArmorPlate.type", object.type)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ArmorPlate): unknown {
|
||||
const obj: any = {};
|
||||
if (message.thickness !== 0) {
|
||||
obj.thickness = message.thickness;
|
||||
}
|
||||
if (message.type !== "") {
|
||||
obj.type = message.type;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ArmorPlate>, I>>(base?: I): ArmorPlate {
|
||||
return ArmorPlate.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ArmorPlate>, I>>(object: I): ArmorPlate {
|
||||
const message = createBaseArmorPlate();
|
||||
message.thickness = object.thickness ?? 0;
|
||||
message.type = object.type ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
syntax = "proto2";
|
||||
|
||||
import "packages/core/src/protos/utils.proto";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message TankModel {
|
||||
map<string, ModuleModel> modules = 1;
|
||||
}
|
||||
|
||||
message ModuleModel {
|
||||
required Vector3 translation = 2;
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/tank_model.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { Vector3, createBaseVector3 } from "./utils";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface TankModel {
|
||||
modules: { [key: string]: ModuleModel };
|
||||
}
|
||||
|
||||
export interface TankModel_ModulesEntry {
|
||||
key: string;
|
||||
value: ModuleModel | undefined;
|
||||
}
|
||||
|
||||
export interface ModuleModel {
|
||||
translation: Vector3;
|
||||
}
|
||||
|
||||
function createBaseTankModel(): TankModel {
|
||||
return { modules: {} };
|
||||
}
|
||||
|
||||
export const TankModel: MessageFns<TankModel> = {
|
||||
encode(message: TankModel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.modules).forEach(([key, value]) => {
|
||||
TankModel_ModulesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): TankModel {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseTankModel();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = TankModel_ModulesEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.modules[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): TankModel {
|
||||
return {
|
||||
modules: isObject(object.modules)
|
||||
? Object.entries(object.modules).reduce<{ [key: string]: ModuleModel }>((acc, [key, value]) => {
|
||||
acc[key] = ModuleModel.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: TankModel): unknown {
|
||||
const obj: any = {};
|
||||
if (message.modules) {
|
||||
const entries = Object.entries(message.modules);
|
||||
if (entries.length > 0) {
|
||||
obj.modules = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.modules[k] = ModuleModel.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<TankModel>, I>>(base?: I): TankModel {
|
||||
return TankModel.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<TankModel>, I>>(object: I): TankModel {
|
||||
const message = createBaseTankModel();
|
||||
message.modules = Object.entries(object.modules ?? {}).reduce<{ [key: string]: ModuleModel }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = ModuleModel.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseTankModel_ModulesEntry(): TankModel_ModulesEntry {
|
||||
return { key: "", value: createBaseModuleModel() };
|
||||
}
|
||||
|
||||
export const TankModel_ModulesEntry: MessageFns<TankModel_ModulesEntry> = {
|
||||
encode(message: TankModel_ModulesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
ModuleModel.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): TankModel_ModulesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseTankModel_ModulesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = ModuleModel.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): TankModel_ModulesEntry {
|
||||
return {
|
||||
key: globalThis.String(assertSet("TankModel_ModulesEntry.key", object.key)),
|
||||
value: ModuleModel.fromJSON(assertSet("TankModel_ModulesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: TankModel_ModulesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = ModuleModel.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<TankModel_ModulesEntry>, I>>(base?: I): TankModel_ModulesEntry {
|
||||
return TankModel_ModulesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<TankModel_ModulesEntry>, I>>(object: I): TankModel_ModulesEntry {
|
||||
const message = createBaseTankModel_ModulesEntry();
|
||||
message.key = object.key ?? "";
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? ModuleModel.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseModuleModel(): ModuleModel {
|
||||
return { translation: createBaseVector3() };
|
||||
}
|
||||
|
||||
export const ModuleModel: MessageFns<ModuleModel> = {
|
||||
encode(message: ModuleModel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.translation !== undefined) {
|
||||
Vector3.encode(message.translation, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ModuleModel {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseModuleModel();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.translation = Vector3.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ModuleModel {
|
||||
return { translation: Vector3.fromJSON(assertSet("ModuleModel.translation", object.translation)) };
|
||||
},
|
||||
|
||||
toJSON(message: ModuleModel): unknown {
|
||||
const obj: any = {};
|
||||
if (message.translation !== undefined) {
|
||||
obj.translation = Vector3.toJSON(message.translation);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ModuleModel>, I>>(base?: I): ModuleModel {
|
||||
return ModuleModel.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ModuleModel>, I>>(object: I): ModuleModel {
|
||||
const message = createBaseModuleModel();
|
||||
message.translation = (object.translation !== undefined && object.translation !== null)
|
||||
? Vector3.fromPartial(object.translation)
|
||||
: createBaseVector3();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
Loaded 100 of 454 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user