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

eureka: 5.57 notes, array support for notes #3166

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions ui/eureka/eureka.js
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,7 @@ const defaultOptions = {
cn: '施恩布德的术师队',
ko: '은덕의 술사들',
},
fieldNotes: 12,
shortLabel: {
en: 'Heal',
fr: 'Miséricorde',
Expand Down Expand Up @@ -2137,7 +2138,7 @@ const defaultOptions = {
cn: '进攻野营地',
ko: '야영지 선제 공격',
},
fieldNotes: 6,
fieldNotes: [6, 12],
shortLabel: {
en: 'Camping',
fr: 'Idéaux',
Expand Down Expand Up @@ -3621,7 +3622,9 @@ class EurekaTracker {
// Adds field note drops, name, id & rarity of those
if (this.zoneInfo.treatNMsAsSkirmishes && this.options.EnrichedSTQ && nm.fieldNotes) {
for (const note of fieldNotesList) {
if (note.id === nm.fieldNotes)
if (typeof nm.fieldNotes === 'string')
nmNote = [note];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is nmNote declared?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow
I need to some doing PRs while half-asleep

if (note.id in nmNote)
enriched.innerHTML = `#${note.id}: ${note.shortName} ${gRarityIcon.repeat(note.rarity)}`;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this just overwrite the previous text if there are two notes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was pondering whether to add it on the same line or to make it smaller, not sure yet. It can get kinda long but the user can choose to disable enriched content anyway, so maybe we should go with 2 on the same line ? only happens for a single skirmish anyway

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple lines is probably ok!

}
}
Expand Down