mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: cleaner stage0 hack
This commit is contained in:
1 parent
102abf49c4
commit
a973cf699b
3 files changed
+5
-11
No files matched your search
@@ -27,7 +27,7 @@ export default defineConfig({
|
|||||||
outDir: "../../dist/website",
|
outDir: "../../dist/website",
|
||||||
prefetch: { defaultStrategy: "hover", prefetchAll: true },
|
prefetch: { defaultStrategy: "hover", prefetchAll: true },
|
||||||
|
|
||||||
build: { concurrency: 4 },
|
// build: { concurrency: 4 },
|
||||||
adapter: target === "app" ? node({ mode: "standalone" }) : undefined,
|
adapter: target === "app" ? node({ mode: "standalone" }) : undefined,
|
||||||
|
|
||||||
integrations: [
|
integrations: [
|
||||||
|
|||||||
@@ -188,12 +188,9 @@ function patch(stage0: StageParameters, stage1: StageParameters) {
|
|||||||
|
|
||||||
export function aggregateStageParameters(
|
export function aggregateStageParameters(
|
||||||
base: StageParameters,
|
base: StageParameters,
|
||||||
stages: StageParameters[],
|
stages: StageParameters[]
|
||||||
stage: number
|
|
||||||
) {
|
) {
|
||||||
const stage0 = StageParameters.create();
|
const stage0 = StageParameters.create({ ...base, stage_number: 0 });
|
||||||
|
|
||||||
patch(stage0, base);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bug in Reforged: base stats are stage 1, so is the first upgrade. Manually
|
* Bug in Reforged: base stats are stage 1, so is the first upgrade. Manually
|
||||||
@@ -202,14 +199,12 @@ export function aggregateStageParameters(
|
|||||||
* stage number to -1.
|
* stage number to -1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (stage0.stage_number === 0 && import.meta.env.DEV) {
|
if (base.stage_number === 0 && import.meta.env.DEV) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Base stats are now stage 0. In-game bug fixed, please remove hack."
|
"Base stats are now stage 0. In-game bug fixed, please remove hack."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
stage0.stage_number = 0;
|
|
||||||
|
|
||||||
stages.forEach((stage) => patch(stage0, stage));
|
stages.forEach((stage) => patch(stage0, stage));
|
||||||
|
|
||||||
return stage0;
|
return stage0;
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ function Content({ id }: { id: string }) {
|
|||||||
() =>
|
() =>
|
||||||
aggregateStageParameters(
|
aggregateStageParameters(
|
||||||
tank.base_stats!,
|
tank.base_stats!,
|
||||||
tank.upgrade_stages.slice(0, protagonist.stage),
|
tank.upgrade_stages.slice(0, protagonist.stage)
|
||||||
protagonist.shell
|
|
||||||
),
|
),
|
||||||
[protagonist]
|
[protagonist]
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user