From 5bf90423f1829e7570b6c9f39bbf2c33736a37d0 Mon Sep 17 00:00:00 2001 From: frzyc Date: Sat, 9 Dec 2023 15:08:24 -0500 Subject: [PATCH] Some minor scanner fixes (#1361) * scanner fixes * update debug check * more accurate main stat/set reading --- .../src/app/PageArtifact/ArtifactEditor.tsx | 12 ++-- .../src/lib/findBestArtifact.tsx | 31 +++++--- libs/gi-art-scanner/src/lib/parse.ts | 63 +++++++++-------- libs/gi-art-scanner/src/lib/processImg.ts | 70 +++++++++++-------- libs/gi-util/src/artifact/artifact.ts | 2 +- libs/img-util/src/processing.ts | 2 +- 6 files changed, 106 insertions(+), 74 deletions(-) diff --git a/apps/frontend/src/app/PageArtifact/ArtifactEditor.tsx b/apps/frontend/src/app/PageArtifact/ArtifactEditor.tsx index 55e970d4d6..006cd3d22e 100644 --- a/apps/frontend/src/app/PageArtifact/ArtifactEditor.tsx +++ b/apps/frontend/src/app/PageArtifact/ArtifactEditor.tsx @@ -83,6 +83,7 @@ import SubstatInput from './ArtifactEditor/Components/SubstatInput' import UploadExplainationModal from './ArtifactEditor/Components/UploadExplainationModal' import { textsFromImage } from './ScanningUtil' import { LocationAutocomplete } from '../Components/Character/LocationAutocomplete' +import { shouldShowDevComponents } from '../Util/Util' const allSubstatFilter = new Set(allSubstatKeys) type ResetMessage = { type: 'reset' } @@ -593,12 +594,11 @@ export default function ArtifactEditor({ - {process.env.NODE_ENV === 'development' && - debugImgs && ( - - - - )} + {shouldShowDevComponents && debugImgs && ( + + + + )}