mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: more errors from proto migration
This commit is contained in:
1 parent
b5cb2acdf4
commit
320aead17b
5 files changed
+20
-16
No files matched your search
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
"build:assets": "bun --filter=@blitzkit/scripts run build:assets",
|
"build:assets": "bun --filter=@blitzkit/scripts run build:assets",
|
||||||
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
"build:averages": "bun --filter=@blitzkit/scripts run build:averages",
|
||||||
"build:bot": "rm -rf dist/bot && mkdir -p dist/bot/prisma && bun build src/index.ts src/workers/bot.ts src/workers/render.ts --outdir dist/bot --target=bun --splitting --sourcemap=inline --external sharp && cp -R src/lang dist/bot/lang && prisma generate && cp prisma/schema.prisma dist/bot/prisma/schema.prisma && cp -R node_modules/prisma/*.node dist/bot/prisma && cd dist/bot && bun init -y && bun add sharp",
|
"build:bot": "rm -rf dist/bot && mkdir -p dist/bot/prisma && bun build src/index.ts src/workers/bot.ts src/workers/render.ts --outdir dist/bot --target=bun --splitting --sourcemap=inline --external sharp && cp -R src/lang dist/bot/lang && prisma generate && cp prisma/schema.prisma dist/bot/prisma/schema.prisma && cp -R node_modules/prisma/*.node dist/bot/prisma && cd dist/bot && bun init -y && bun add sharp",
|
||||||
"build:website": "prisma generate && bun --filter=@blitzkit/website run build",
|
"build:website": "prisma generate && bun build:protos && bun --filter=@blitzkit/website run build",
|
||||||
"build:sitemap": "bun scripts/sitemap.ts",
|
"build:sitemap": "bun scripts/sitemap.ts",
|
||||||
"build:docs": "vitepress build docs",
|
"build:docs": "vitepress build docs",
|
||||||
"build:ratingleaderboard": "bun --script scripts/buildRatingLeaderboard.ts",
|
"build:ratingleaderboard": "bun --script scripts/buildRatingLeaderboard.ts",
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { TankClass } from '@blitzkit/core';
|
import { TankClass } from '@blitzkit/core';
|
||||||
import type { ComponentProps, ReactNode } from 'react';
|
import type { ComponentProps, ReactNode } from 'react';
|
||||||
import { StupidCat } from '../StupidCat';
|
|
||||||
import { ClassHeavy } from './components/ClassHeavy';
|
import { ClassHeavy } from './components/ClassHeavy';
|
||||||
import { ClassLight } from './components/ClassLight';
|
import { ClassLight } from './components/ClassLight';
|
||||||
import { ClassMedium } from './components/ClassMedium';
|
import { ClassMedium } from './components/ClassMedium';
|
||||||
@@ -14,5 +13,4 @@ export const classIcons: Record<
|
|||||||
[TankClass.HEAVY]: ClassHeavy,
|
[TankClass.HEAVY]: ClassHeavy,
|
||||||
[TankClass.LIGHT]: ClassLight,
|
[TankClass.LIGHT]: ClassLight,
|
||||||
[TankClass.MEDIUM]: ClassMedium,
|
[TankClass.MEDIUM]: ClassMedium,
|
||||||
[TankClass.UNRECOGNIZED]: StupidCat,
|
|
||||||
};
|
};
|
||||||
@@ -122,18 +122,19 @@ export function TankCard({ tank, onSelect }: TankCardProps) {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
return (dimensions[0] * dimensions[1] * dimensions[2]).toFixed(0);
|
return (dimensions.x * dimensions.y * dimensions.z).toFixed(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'survivability.length':
|
case 'survivability.length': {
|
||||||
return Math.max(
|
const bounds = normalizeBoundingBox(
|
||||||
...normalizeBoundingBox(
|
unionBoundingBox(
|
||||||
unionBoundingBox(
|
tankModelDefinition.boundingBox,
|
||||||
tankModelDefinition.boundingBox,
|
turretModelDefinition.boundingBox,
|
||||||
turretModelDefinition.boundingBox,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
).toFixed(0);
|
);
|
||||||
|
|
||||||
|
return Math.max(bounds.x, bounds.y, bounds.z).toFixed(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [tankopediaSort.by]);
|
}, [tankopediaSort.by]);
|
||||||
|
|
||||||
|
|||||||
@@ -22,11 +22,15 @@ export function Node({ id, highlight, nextIds }: NodeProps) {
|
|||||||
const tank = tankDefinitions.tanks[id];
|
const tank = tankDefinitions.tanks[id];
|
||||||
const nextTanks = nextIds?.map((id) => tankDefinitions.tanks[id]);
|
const nextTanks = nextIds?.map((id) => tankDefinitions.tanks[id]);
|
||||||
const thisTankXp =
|
const thisTankXp =
|
||||||
tank.xp === undefined || tank.tier === 1 ? 0 : tank.xp! / xpMultiplier;
|
tank.researchCost === undefined || tank.tier === 1
|
||||||
|
? 0
|
||||||
|
: (tank.researchCost.researchCostType!.value as number)! / xpMultiplier;
|
||||||
const nextTanksXp = nextTanks?.reduce(
|
const nextTanksXp = nextTanks?.reduce(
|
||||||
(xp, tank) =>
|
(xp, tank) =>
|
||||||
xp +
|
xp +
|
||||||
(tank.xp === undefined || tank.tier === 1 ? 0 : tank.xp! / xpMultiplier),
|
(tank.researchCost === undefined || tank.tier === 1
|
||||||
|
? 0
|
||||||
|
: (tank.researchCost.researchCostType!.value as number) / xpMultiplier),
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
const averages = averageDefinitions.averages[tank.id]?.mu;
|
const averages = averageDefinitions.averages[tank.id]?.mu;
|
||||||
|
|||||||
@@ -53,10 +53,11 @@ export function TechTreeSection() {
|
|||||||
const totalXp = line.reduce(
|
const totalXp = line.reduce(
|
||||||
(xp, id) =>
|
(xp, id) =>
|
||||||
xp +
|
xp +
|
||||||
(tankDefinitions.tanks[id].xp === undefined ||
|
(tankDefinitions.tanks[id].researchCost === undefined ||
|
||||||
tankDefinitions.tanks[id].tier === 1
|
tankDefinitions.tanks[id].tier === 1
|
||||||
? 0
|
? 0
|
||||||
: tankDefinitions.tanks[id].xp),
|
: (tankDefinitions.tanks[id].researchCost.researchCostType!
|
||||||
|
.value as number)),
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
const totalCredits = line.reduce(
|
const totalCredits = line.reduce(
|
||||||
|
|||||||
Reference in new issue
Block a user