mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
various bug fixes
This commit is contained in:
1 parent
74fbd15c5f
commit
cbf320454f
4 files changed
+13
-8
No files matched your search
@@ -27,8 +27,10 @@ export abstract class ServerBlitzKitAPI5 extends ServerBlitzKitAPI4 {
|
|||||||
.map((level) => {
|
.map((level) => {
|
||||||
return Object.values(level).map((options) => {
|
return Object.values(level).map((options) => {
|
||||||
return {
|
return {
|
||||||
left: this.optionalDevices!.root[options.device0].id,
|
options: [
|
||||||
right: this.optionalDevices!.root[options.device1].id,
|
this.optionalDevices!.root[options.device0].id,
|
||||||
|
this.optionalDevices!.root[options.device1].id,
|
||||||
|
],
|
||||||
} satisfies EquipmentSlot;
|
} satisfies EquipmentSlot;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,16 +10,17 @@ import { withLocale } from "../../../../../hocs/withLocale";
|
|||||||
import { useAwait } from "../../../../../hooks/useAwait";
|
import { useAwait } from "../../../../../hooks/useAwait";
|
||||||
import { Tankopedia } from "../../../../../stores/tankopedia";
|
import { Tankopedia } from "../../../../../stores/tankopedia";
|
||||||
import { computeCharacteristics } from "../../../../../tankopedia/computeCharacteristics";
|
import { computeCharacteristics } from "../../../../../tankopedia/computeCharacteristics";
|
||||||
|
import type { MaybeSkeletonComponentProps } from "../../../../../types/maybeSkeletonComponentProps";
|
||||||
import styles from "./_index.module.css";
|
import styles from "./_index.module.css";
|
||||||
|
|
||||||
interface PageProps {
|
type PageProps = MaybeSkeletonComponentProps & {
|
||||||
id: number;
|
id: number;
|
||||||
}
|
};
|
||||||
|
|
||||||
const tanks = await api.tanks();
|
const tanks = await api.tanks();
|
||||||
|
|
||||||
export const Page = withErrorWrapper(
|
export const Page = withErrorWrapper(
|
||||||
withLocale<PageProps>(({ id }) => {
|
withLocale<PageProps>(({ skeleton, id }) => {
|
||||||
const protagonistTank = useAwait(() => api.tank(id), `tank-${id}`);
|
const protagonistTank = useAwait(() => api.tank(id), `tank-${id}`);
|
||||||
|
|
||||||
Tankopedia.useInitialization(protagonistTank);
|
Tankopedia.useInitialization(protagonistTank);
|
||||||
@@ -60,7 +61,7 @@ export const Page = withErrorWrapper(
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.sandbox}>
|
<div className={styles.sandbox}>
|
||||||
<TankopediaSandbox thicknessRange={thicknessRange} />
|
{!skeleton && <TankopediaSandbox thicknessRange={thicknessRange} />}
|
||||||
<TankopediaCharacteristics
|
<TankopediaCharacteristics
|
||||||
computedCharacteristics={characteristics}
|
computedCharacteristics={characteristics}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -27,5 +27,7 @@ const { id, locale } = Astro.props;
|
|||||||
<ColorScale color="amber" />
|
<ColorScale color="amber" />
|
||||||
<ColorScale color="jade" />
|
<ColorScale color="jade" />
|
||||||
|
|
||||||
<Page {locale} {id} client:load />
|
<Page {id} {locale} client:only="react">
|
||||||
|
<Page slot="fallback" {id} {locale} skeleton />
|
||||||
|
</Page>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
@@ -33,7 +33,7 @@ export function createTankState(tank: TankDefinition) {
|
|||||||
equipment: {},
|
equipment: {},
|
||||||
status: createTankStatus(),
|
status: createTankStatus(),
|
||||||
|
|
||||||
model: models.models[turret.id],
|
model: models.models[tank.id],
|
||||||
|
|
||||||
consumables: [],
|
consumables: [],
|
||||||
provisions: createDefaultProvisions(tank, gun, provisions, scripts),
|
provisions: createDefaultProvisions(tank, gun, provisions, scripts),
|
||||||
|
|||||||
Reference in new issue
Block a user