bsides / horizoverlay

A simple horizontal damage meter overlay for Final Fantasy XIV. It currently shows player dps, damage %, hps, max hit, encounter duration and total dps. It's super configurable! It supports English, Portuguese, Chinese (S/T) and French.
Apache License 2.0
127 stars 48 forks source link

cactbot started reporting errors after updating #142

Closed Viking602 closed 2 years ago

Viking602 commented 2 years ago

cactbot started reporting errors after updating Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'. (Source: , Line: 0) [2021/12/5 3:28:56] Info: BrowserConsole: Uncaught Error: Cannot find module './sge.png' (Source: https://bsides.github.io/horizoverlay/static/js/2.b7868ab6.chunk.js, Line: 1) [2021/12/5 3:28:58] Info: BrowserConsole: Error: Cannot find module './sge.png' (Source: https://bsides.github.io/horizoverlay/static/js/2.b7868ab6.chunk.js, Line: 1 image

MyTechnoHunter commented 2 years ago

no, the first line is not anything to do with this overlay.. the second bit is dealing with a missing icon for the new endwalker jobs.. please have the author update!

ngld commented 2 years ago

If you change the following section https://github.com/bsides/horizoverlay/blob/4d402abffd62a59521d6f8377d1de936eddb696b/src/CombatantHorizontal.js#L61-L75 to this instead

if (config.showJobIcon) {
  jobIcon = './'
  if (data.Job === '') {
    // well there are a lot of things that doesn't have a job, like summoner's pets and alike. Lets assume them all.
    let newIcon
    newIcon = 'error'
    for (const otherIcon of otherIcons) {
      if (name.indexOf(otherIcon) >= 0) newIcon = otherIcon
    }
    jobIcon += newIcon
  } else {
    jobIcon += data.Job.toLowerCase()
  }
  try {
    jobIcon = images(`${jobIcon}.png`)
  } catch (e) {
    console.error(e);
    jobIcon = null;
  }
}

it'll still log errors for the missing icons but at least it'll work. The icons for the new jobs are still missing, of course.

ek68794998 commented 2 years ago

I created PR #143 to add the role colors and icons, as well as patch the code above so that future job additions don't break the overlay. Tested locally while waiting in queue (lol) using a dungeon run I had just finished:

image

Viking602 commented 2 years ago

I created PR #143 to add the role colors and icons, as well as patch the code above so that future job additions don't break the overlay. Tested locally while waiting in queue (lol) using a dungeon run I had just finished:

image

Great! Thanks!

bsides commented 2 years ago

Thank you all very much for the contribution!