From a38b5d7ddd7dcc09f1a9e460f0e9a554d90a4b7e Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:32:53 -0600 Subject: [PATCH] fix: remove show environment --- .../scripts/src/buildAssets/definitions.ts | 2 +- .../scripts/src/buildAssets/tankModels.ts | 2 +- .../HeroSection/components/Options/index.tsx | 38 ------------------- .../components/SceneProps/index.tsx | 6 +-- 4 files changed, 3 insertions(+), 45 deletions(-) diff --git a/packages/scripts/src/buildAssets/definitions.ts b/packages/scripts/src/buildAssets/definitions.ts index 5e0255cee..d356268bf 100644 --- a/packages/scripts/src/buildAssets/definitions.ts +++ b/packages/scripts/src/buildAssets/definitions.ts @@ -39,9 +39,9 @@ import { readStringDVPL } from '../core/blitz/readStringDVPL'; import { readXMLDVPL } from '../core/blitz/readXMLDVPL'; import { readYAMLDVPL } from '../core/blitz/readYAMLDVPL'; import { commitAssets } from '../core/github/commitAssets'; -import { TankParameters } from './blitzkitTankIcons'; import { DATA } from './constants'; import { Avatar } from './skillIcons'; +import { TankParameters } from './tankIcons'; function parseResearchCost(raw: number | string) { if (typeof raw === 'number') { diff --git a/packages/scripts/src/buildAssets/tankModels.ts b/packages/scripts/src/buildAssets/tankModels.ts index 0add1d2e5..9a2a759ad 100644 --- a/packages/scripts/src/buildAssets/tankModels.ts +++ b/packages/scripts/src/buildAssets/tankModels.ts @@ -7,9 +7,9 @@ import { readXMLDVPL } from '../core/blitz/readXMLDVPL'; import { readYAMLDVPL } from '../core/blitz/readYAMLDVPL'; import { commitAssets } from '../core/github/commitAssets'; import { FileChange } from '../core/github/commitMultipleFiles'; -import { TankParameters } from './blitzkitTankIcons'; import { DATA } from './constants'; import { VehicleDefinitionList } from './definitions'; +import { TankParameters } from './tankIcons'; export async function tankModels() { console.log('Building tank models...'); diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/Options/index.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/Options/index.tsx index 1e4baa024..9e9264e9d 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/Options/index.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/Options/index.tsx @@ -29,7 +29,6 @@ import { Tooltip, } from '@radix-ui/themes'; import { Suspense, useState, type RefObject } from 'react'; -import { ENVIRONMENTS } from '../../../../../constants/lightingEnvironments'; import { Pose, poseEvent } from '../../../../../core/blitzkit/pose'; import { useEquipment } from '../../../../../hooks/useEquipment'; import { useFullScreen } from '../../../../../hooks/useFullScreen'; @@ -63,9 +62,6 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { const display = TankopediaEphemeral.use((state) => state.display); const isFullScreen = useFullScreen(); const showGrid = TankopediaPersistent.use((state) => state.showGrid); - const showEnvironment = TankopediaPersistent.use( - (state) => state.showEnvironment, - ); const greenPenetration = TankopediaPersistent.use( (state) => state.greenPenetration, ); @@ -75,7 +71,6 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { const wireframe = TankopediaPersistent.use((state) => state.wireframe); const opaque = TankopediaPersistent.use((state) => state.opaque); const fullScreenAvailable = useFullscreenAvailability(); - const environment = TankopediaPersistent.use((state) => state.environment); const developerMode = App.use((state) => state.developerMode); const protagonistTank = Duel.use((state) => state.protagonist.tank); const antagonistGun = Duel.use((state) => state.antagonist.gun); @@ -517,39 +512,6 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { > Show grid - - { - mutateTankopediaPersistent((draft) => { - draft.showEnvironment = checked; - }); - }} - > - View environment - - - - Lighting - - - - {ENVIRONMENTS.map((environment) => ( - { - mutateTankopediaPersistent((draft) => { - draft.environment = environment; - }); - }} - > - {environment[0].toUpperCase() + environment.slice(1)} - - ))} - - - diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/SceneProps/index.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/SceneProps/index.tsx index ed6117405..afcff80e4 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/SceneProps/index.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/TankSandbox/components/SceneProps/index.tsx @@ -21,7 +21,6 @@ import { modelTransformEvent } from '../../../../../../../core/blitzkit/modelTra import { tankCharacteristics } from '../../../../../../../core/blitzkit/tankCharacteristics'; import { Duel } from '../../../../../../../stores/duel'; import { TankopediaEphemeral } from '../../../../../../../stores/tankopediaEphemeral'; -import { TankopediaPersistent } from '../../../../../../../stores/tankopediaPersistent'; import { TankopediaDisplay } from '../../../../../../../stores/tankopediaPersistent/constants'; import { TargetCircle } from './components/TargetCircle'; import { aimTarget } from './constants'; @@ -36,9 +35,6 @@ const [modelDefinitions, equipmentDefinitions, provisionDefinitions] = const emptyVector = new Vector2(); export function SceneProps() { - const show = TankopediaPersistent.use( - (state) => state.showGrid && !state.showEnvironment, - ); const targetCircleWrapper = useRef(null); const clientTargetCircle = useRef(null); const serverTargetCircle = useRef(null); @@ -239,7 +235,7 @@ export function SceneProps() { return ( <> - {show && display !== TankopediaDisplay.ShootingRange && ( + {display !== TankopediaDisplay.ShootingRange && (