mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 11:39:51 +01:00
feat: deprecated tanks
This commit is contained in:
1 parent
8f12a77e12
commit
0bba768fbf
6 files changed
+44
-27
No files matched your search
Vendored
+1
@@ -28,6 +28,7 @@
|
|||||||
"blitzkit",
|
"blitzkit",
|
||||||
"blitzrinth",
|
"blitzrinth",
|
||||||
"blitzstars",
|
"blitzstars",
|
||||||
|
"Callouts",
|
||||||
"Camo",
|
"Camo",
|
||||||
"CDON",
|
"CDON",
|
||||||
"classname",
|
"classname",
|
||||||
|
|||||||
@@ -813,7 +813,8 @@ export async function definitions() {
|
|||||||
: 'researchable',
|
: 'researchable',
|
||||||
tier: tank.level as Tier,
|
tier: tank.level as Tier,
|
||||||
class: tankTags[0] as TankClass,
|
class: tankTags[0] as TankClass,
|
||||||
testing: tankTags.includes('testTank') ? true : undefined,
|
testing: tankTags.includes('testTank'),
|
||||||
|
deprecated: tankTags.includes('deprecated'),
|
||||||
price: tankPrice,
|
price: tankPrice,
|
||||||
camouflage: {
|
camouflage: {
|
||||||
still: tankDefinition.root.invisibility.still,
|
still: tankDefinition.root.invisibility.still,
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import { MinusCircledIcon } from '@radix-ui/react-icons';
|
||||||
|
import { Callout, Flex } from '@radix-ui/themes';
|
||||||
|
import { ExperimentIcon } from '../../../../../components/ExperimentIcon';
|
||||||
|
import * as Duel from '../../../../../stores/duel';
|
||||||
|
|
||||||
|
export function CalloutsSection() {
|
||||||
|
const tank = Duel.use((state) => state.protagonist.tank);
|
||||||
|
|
||||||
|
if (!tank.testing && !tank.deprecated) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Flex direction="column" align="center" gap="2" mb="4">
|
||||||
|
{tank.deprecated && (
|
||||||
|
<Callout.Root color="red">
|
||||||
|
<Callout.Icon>
|
||||||
|
<MinusCircledIcon />
|
||||||
|
</Callout.Icon>
|
||||||
|
<Callout.Text>
|
||||||
|
This tank is deprecated and may display undefined behavior.
|
||||||
|
</Callout.Text>
|
||||||
|
</Callout.Root>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{tank.testing && (
|
||||||
|
<Callout.Root color="red">
|
||||||
|
<Callout.Icon>
|
||||||
|
<ExperimentIcon style={{ width: '1em', height: '1em' }} />
|
||||||
|
</Callout.Icon>
|
||||||
|
<Callout.Text>
|
||||||
|
Tanks in testing are subject to change and may not represent the
|
||||||
|
final product.
|
||||||
|
</Callout.Text>
|
||||||
|
</Callout.Root>
|
||||||
|
)}
|
||||||
|
</Flex>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { Callout, Flex } from '@radix-ui/themes';
|
|
||||||
import { ExperimentIcon } from '../../../../../components/ExperimentIcon';
|
|
||||||
import * as Duel from '../../../../../stores/duel';
|
|
||||||
|
|
||||||
export function TestingSection() {
|
|
||||||
const tank = Duel.use((state) => state.protagonist.tank);
|
|
||||||
|
|
||||||
if (!tank.testing) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Flex justify="center" mb="4">
|
|
||||||
<Callout.Root>
|
|
||||||
<Callout.Icon>
|
|
||||||
<ExperimentIcon style={{ width: '1em', height: '1em' }} />
|
|
||||||
</Callout.Icon>
|
|
||||||
<Callout.Text>
|
|
||||||
Tanks in testing are subject to change and may not represent the final
|
|
||||||
product.
|
|
||||||
</Callout.Text>
|
|
||||||
</Callout.Root>
|
|
||||||
</Flex>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -7,6 +7,7 @@ import PageWrapper from '../../../../components/PageWrapper';
|
|||||||
import { useAdExempt } from '../../../../hooks/useAdExempt';
|
import { useAdExempt } from '../../../../hooks/useAdExempt';
|
||||||
import * as Duel from '../../../../stores/duel';
|
import * as Duel from '../../../../stores/duel';
|
||||||
import * as TankopediaEphemeral from '../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../stores/tankopediaEphemeral';
|
||||||
|
import { CalloutsSection } from './components/CalloutsSection';
|
||||||
import { HistorySection } from './components/HistorySection';
|
import { HistorySection } from './components/HistorySection';
|
||||||
import { CharacteristicsSection } from './components/Model/CharacteristicsSection';
|
import { CharacteristicsSection } from './components/Model/CharacteristicsSection';
|
||||||
import { GameModeSection } from './components/Model/GameModeSection';
|
import { GameModeSection } from './components/Model/GameModeSection';
|
||||||
@@ -14,7 +15,6 @@ import { HeroSection } from './components/Model/HeroSection';
|
|||||||
import { MetaSection } from './components/Model/MetaSection';
|
import { MetaSection } from './components/Model/MetaSection';
|
||||||
import { TechTreeSection } from './components/Model/TechTreeSection';
|
import { TechTreeSection } from './components/Model/TechTreeSection';
|
||||||
import { ShotDisplaySection } from './components/ShotDisplaySection';
|
import { ShotDisplaySection } from './components/ShotDisplaySection';
|
||||||
import { TestingSection } from './components/TestingSection';
|
|
||||||
import { VideoSection } from './components/VideoSection';
|
import { VideoSection } from './components/VideoSection';
|
||||||
|
|
||||||
export default function Page({ params }: { params: { id: string } }) {
|
export default function Page({ params }: { params: { id: string } }) {
|
||||||
@@ -83,10 +83,10 @@ export default function Page({ params }: { params: { id: string } }) {
|
|||||||
<PageWrapper p="0" noMaxWidth color="purple" size={1600} gap="9">
|
<PageWrapper p="0" noMaxWidth color="purple" size={1600} gap="9">
|
||||||
<HeroSection id={id} />
|
<HeroSection id={id} />
|
||||||
<ShotDisplaySection />
|
<ShotDisplaySection />
|
||||||
|
<CalloutsSection />
|
||||||
<MetaSection />
|
<MetaSection />
|
||||||
{!exempt && <AdMidSectionResponsive />}
|
{!exempt && <AdMidSectionResponsive />}
|
||||||
<TechTreeSection />
|
<TechTreeSection />
|
||||||
<TestingSection />
|
|
||||||
<CharacteristicsSection />
|
<CharacteristicsSection />
|
||||||
{!exempt && <AdMidSectionResponsive />}
|
{!exempt && <AdMidSectionResponsive />}
|
||||||
<GameModeSection />
|
<GameModeSection />
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ export interface TankDefinition {
|
|||||||
provisions: number;
|
provisions: number;
|
||||||
tier: Tier;
|
tier: Tier;
|
||||||
class: TankClass;
|
class: TankClass;
|
||||||
testing?: boolean;
|
testing: boolean;
|
||||||
|
deprecated: boolean;
|
||||||
turrets: TurretDefinition[];
|
turrets: TurretDefinition[];
|
||||||
engines: EngineDefinition[];
|
engines: EngineDefinition[];
|
||||||
tracks: TrackDefinition[];
|
tracks: TrackDefinition[];
|
||||||
|
|||||||
Reference in new issue
Block a user