mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: simplified duel state
This commit is contained in:
1 parent
7314f1d9b1
commit
66016dedf0
13 files changed
+276
-246
No files matched your search
@@ -14,8 +14,13 @@ export type TankopediaSortBy = 'tier' | 'name';
|
||||
export type TankopediaSortDirection = 'ascending' | 'descending';
|
||||
export type TankopediaTestTankDisplay = 'include' | 'exclude' | 'only';
|
||||
export type TankopediaMode = 'model' | 'armor';
|
||||
|
||||
type Tankopedia = {
|
||||
export interface DuelMember {
|
||||
tank: TankDefinition;
|
||||
turret: TurretDefinition;
|
||||
gun: GunDefinition;
|
||||
shell: ShellDefinition;
|
||||
}
|
||||
interface Tankopedia {
|
||||
sort: {
|
||||
by: TankopediaSortBy;
|
||||
direction: TankopediaSortDirection;
|
||||
@@ -39,24 +44,7 @@ type Tankopedia = {
|
||||
};
|
||||
};
|
||||
mode: TankopediaMode;
|
||||
} & (
|
||||
| {
|
||||
areTanksAssigned: true;
|
||||
protagonist: {
|
||||
tank: TankDefinition;
|
||||
turret: TurretDefinition;
|
||||
gun: GunDefinition;
|
||||
shell: ShellDefinition;
|
||||
};
|
||||
antagonist: {
|
||||
tank: TankDefinition;
|
||||
turret: TurretDefinition;
|
||||
gun: GunDefinition;
|
||||
shell: ShellDefinition;
|
||||
};
|
||||
}
|
||||
| { areTanksAssigned: false }
|
||||
);
|
||||
}
|
||||
|
||||
export const useTankopedia = create<Tankopedia>()(
|
||||
subscribeWithSelector<Tankopedia>(() => ({
|
||||
|
||||
Reference in new issue
Block a user