mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +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
@@ -22,11 +22,15 @@ export function Node({ id, highlight, nextIds }: NodeProps) {
|
||||
const tank = tankDefinitions.tanks[id];
|
||||
const nextTanks = nextIds?.map((id) => tankDefinitions.tanks[id]);
|
||||
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(
|
||||
(xp, tank) =>
|
||||
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,
|
||||
);
|
||||
const averages = averageDefinitions.averages[tank.id]?.mu;
|
||||
|
||||
@@ -53,10 +53,11 @@ export function TechTreeSection() {
|
||||
const totalXp = line.reduce(
|
||||
(xp, id) =>
|
||||
xp +
|
||||
(tankDefinitions.tanks[id].xp === undefined ||
|
||||
(tankDefinitions.tanks[id].researchCost === undefined ||
|
||||
tankDefinitions.tanks[id].tier === 1
|
||||
? 0
|
||||
: tankDefinitions.tanks[id].xp),
|
||||
: (tankDefinitions.tanks[id].researchCost.researchCostType!
|
||||
.value as number)),
|
||||
0,
|
||||
);
|
||||
const totalCredits = line.reduce(
|
||||
|
||||
Reference in new issue
Block a user