diff --git a/scripts/buildAssets/definitions.ts b/scripts/buildAssets/definitions.ts index 0b87de030..41a7c5f08 100644 --- a/scripts/buildAssets/definitions.ts +++ b/scripts/buildAssets/definitions.ts @@ -440,6 +440,7 @@ export async function definitions(production: boolean) { } }); const crew: Crew[] = []; + const fixedCamouflage = tankTags.includes('eventCamouflage_user'); Object.entries(tankDefinition.root.crew).forEach(([key, value]) => { let entry: Crew; @@ -478,6 +479,7 @@ export async function definitions(production: boolean) { tankDefinitions[tankId] = { id: tankId, + fixedCamouflage: fixedCamouflage ? true : undefined, crew, weight: tankDefinition.root.hull.weight, health: tankDefinition.root.hull.maxHealth, diff --git a/src/app/tools/tankopedia/[id]/components/Characteristics/components/Miscellaneous.tsx b/src/app/tools/tankopedia/[id]/components/Characteristics/components/Miscellaneous.tsx index 68b10978a..a7cb600e9 100644 --- a/src/app/tools/tankopedia/[id]/components/Characteristics/components/Miscellaneous.tsx +++ b/src/app/tools/tankopedia/[id]/components/Characteristics/components/Miscellaneous.tsx @@ -41,22 +41,24 @@ export function Miscellaneous() { Miscellaneous - { - mutateTankopediaTemporary((draft) => { - draft.camouflage = !camouflage; - }); - }} - /> + {!tank.fixedCamouflage && ( + { + mutateTankopediaTemporary((draft) => { + draft.camouflage = !camouflage; + }); + }} + /> + )} 0} diff --git a/src/core/blitzkrieg/tankDefinitions.ts b/src/core/blitzkrieg/tankDefinitions.ts index 6df4c7093..3cadb52a7 100644 --- a/src/core/blitzkrieg/tankDefinitions.ts +++ b/src/core/blitzkrieg/tankDefinitions.ts @@ -34,6 +34,7 @@ export interface Crew { } export interface TankDefinition { id: number; + fixedCamouflage?: boolean; crew: Crew[]; health: number; nation: string;