mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: fixed camo
This commit is contained in:
1 parent
b1a1e07f7d
commit
1c3e98678f
3 files changed
+21
-16
No files matched your search
@@ -440,6 +440,7 @@ export async function definitions(production: boolean) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
const crew: Crew[] = [];
|
const crew: Crew[] = [];
|
||||||
|
const fixedCamouflage = tankTags.includes('eventCamouflage_user');
|
||||||
|
|
||||||
Object.entries(tankDefinition.root.crew).forEach(([key, value]) => {
|
Object.entries(tankDefinition.root.crew).forEach(([key, value]) => {
|
||||||
let entry: Crew;
|
let entry: Crew;
|
||||||
@@ -478,6 +479,7 @@ export async function definitions(production: boolean) {
|
|||||||
|
|
||||||
tankDefinitions[tankId] = {
|
tankDefinitions[tankId] = {
|
||||||
id: tankId,
|
id: tankId,
|
||||||
|
fixedCamouflage: fixedCamouflage ? true : undefined,
|
||||||
crew,
|
crew,
|
||||||
weight: tankDefinition.root.hull.weight,
|
weight: tankDefinition.root.hull.weight,
|
||||||
health: tankDefinition.root.hull.maxHealth,
|
health: tankDefinition.root.hull.maxHealth,
|
||||||
|
|||||||
+18
-16
@@ -41,22 +41,24 @@ export function Miscellaneous() {
|
|||||||
<Heading size="4">Miscellaneous</Heading>
|
<Heading size="4">Miscellaneous</Heading>
|
||||||
|
|
||||||
<Flex gap="2" align="center">
|
<Flex gap="2" align="center">
|
||||||
<GenericTankComponentButton
|
{!tank.fixedCamouflage && (
|
||||||
icon={asset('icons/camo.webp')}
|
<GenericTankComponentButton
|
||||||
selected={camouflage}
|
icon={asset('icons/camo.webp')}
|
||||||
iconStyles={{
|
selected={camouflage}
|
||||||
top: '50%',
|
iconStyles={{
|
||||||
left: '50%',
|
top: '50%',
|
||||||
transform: 'translate(calc(-50% + 4px), calc(-50% + 4px))',
|
left: '50%',
|
||||||
}}
|
transform: 'translate(calc(-50% + 4px), calc(-50% + 4px))',
|
||||||
first
|
}}
|
||||||
last
|
first
|
||||||
onClick={() => {
|
last
|
||||||
mutateTankopediaTemporary((draft) => {
|
onClick={() => {
|
||||||
draft.camouflage = !camouflage;
|
mutateTankopediaTemporary((draft) => {
|
||||||
});
|
draft.camouflage = !camouflage;
|
||||||
}}
|
});
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<GenericTankComponentButton
|
<GenericTankComponentButton
|
||||||
icon={asset('icons/boosters/equipment.webp')}
|
icon={asset('icons/boosters/equipment.webp')}
|
||||||
selected={cooldownBooster > 0}
|
selected={cooldownBooster > 0}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export interface Crew {
|
|||||||
}
|
}
|
||||||
export interface TankDefinition {
|
export interface TankDefinition {
|
||||||
id: number;
|
id: number;
|
||||||
|
fixedCamouflage?: boolean;
|
||||||
crew: Crew[];
|
crew: Crew[];
|
||||||
health: number;
|
health: number;
|
||||||
nation: string;
|
nation: string;
|
||||||
|
|||||||
Reference in new issue
Block a user