Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZO fix disc scanner in controller mode #2633

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions libs/zzz/disc-scanner/src/lib/processImg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,12 @@ export async function processEntry(
const substatTextIndex = whiteTexts.findIndex((t) =>
t.toLowerCase().includes('sub-stats')
)
const setEffectTextIndex = whiteTexts.findIndex((t) =>
let setEffectTextIndex = whiteTexts.findIndex((t) =>
t.toLowerCase().includes('set effect')
)
if (
mainStatTextIndex === -1 ||
substatTextIndex === -1 ||
setEffectTextIndex === -1
) {
if (setEffectTextIndex === -1) setEffectTextIndex = whiteTexts.length - 1

if (mainStatTextIndex === -1 || substatTextIndex === -1) {
retProcessed.texts.push(
'Could not detect main stat, substats or set effect.'
)
Expand All @@ -108,8 +106,7 @@ export async function processEntry(
if (
setLvlTexts.length === 0 ||
mainStatTexts.length === 0 ||
substatTexts.length === 0 ||
setEffectTexts.length === 0
substatTexts.length === 0
) {
retProcessed.texts.push(
'Could not detect main stat, substats or set effect.'
Expand All @@ -120,7 +117,7 @@ export async function processEntry(
// Join all text above the "Main Stat" text due to set text wrapping
let { slotKey, setKey } = parseSetSlot([setLvlTexts.join('')])
if (!setKey) {
setKey = parseSet(setEffectTexts)
if (setEffectTexts.length) setKey = parseSet(setEffectTexts)
if (!setKey) {
setKey = 'AstralVoice'
retProcessed.texts.push(
Expand Down
Loading