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) => {
|
||||
return Object.values(level).map((options) => {
|
||||
return {
|
||||
left: this.optionalDevices!.root[options.device0].id,
|
||||
right: this.optionalDevices!.root[options.device1].id,
|
||||
options: [
|
||||
this.optionalDevices!.root[options.device0].id,
|
||||
this.optionalDevices!.root[options.device1].id,
|
||||
],
|
||||
} satisfies EquipmentSlot;
|
||||
});
|
||||
})
|
||||
|
||||
@@ -10,16 +10,17 @@ import { withLocale } from "../../../../../hocs/withLocale";
|
||||
import { useAwait } from "../../../../../hooks/useAwait";
|
||||
import { Tankopedia } from "../../../../../stores/tankopedia";
|
||||
import { computeCharacteristics } from "../../../../../tankopedia/computeCharacteristics";
|
||||
import type { MaybeSkeletonComponentProps } from "../../../../../types/maybeSkeletonComponentProps";
|
||||
import styles from "./_index.module.css";
|
||||
|
||||
interface PageProps {
|
||||
type PageProps = MaybeSkeletonComponentProps & {
|
||||
id: number;
|
||||
}
|
||||
};
|
||||
|
||||
const tanks = await api.tanks();
|
||||
|
||||
export const Page = withErrorWrapper(
|
||||
withLocale<PageProps>(({ id }) => {
|
||||
withLocale<PageProps>(({ skeleton, id }) => {
|
||||
const protagonistTank = useAwait(() => api.tank(id), `tank-${id}`);
|
||||
|
||||
Tankopedia.useInitialization(protagonistTank);
|
||||
@@ -60,7 +61,7 @@ export const Page = withErrorWrapper(
|
||||
</div>
|
||||
|
||||
<div className={styles.sandbox}>
|
||||
<TankopediaSandbox thicknessRange={thicknessRange} />
|
||||
{!skeleton && <TankopediaSandbox thicknessRange={thicknessRange} />}
|
||||
<TankopediaCharacteristics
|
||||
computedCharacteristics={characteristics}
|
||||
/>
|
||||
|
||||
@@ -27,5 +27,7 @@ const { id, locale } = Astro.props;
|
||||
<ColorScale color="amber" />
|
||||
<ColorScale color="jade" />
|
||||
|
||||
<Page {locale} {id} client:load />
|
||||
<Page {id} {locale} client:only="react">
|
||||
<Page slot="fallback" {id} {locale} skeleton />
|
||||
</Page>
|
||||
</BaseLayout>
|
||||
@@ -33,7 +33,7 @@ export function createTankState(tank: TankDefinition) {
|
||||
equipment: {},
|
||||
status: createTankStatus(),
|
||||
|
||||
model: models.models[turret.id],
|
||||
model: models.models[tank.id],
|
||||
|
||||
consumables: [],
|
||||
provisions: createDefaultProvisions(tank, gun, provisions, scripts),
|
||||
|
||||
Reference in new issue
Block a user