X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fcommon%2FZeldaIcon.js;h=9194cde7fc2f58b250f2e021a58c47e59bde9910;hb=6976d85a7117de53f7d42dee3de1f6b8fcb9726d;hp=c53f4fd68def288ae2f231e11dc65b486796237f;hpb=f1c8c3cc53a09d1c261875d2f482b6e19bc48a9a;p=alttp.git diff --git a/resources/js/components/common/ZeldaIcon.js b/resources/js/components/common/ZeldaIcon.js index c53f4fd..9194cde 100644 --- a/resources/js/components/common/ZeldaIcon.js +++ b/resources/js/components/common/ZeldaIcon.js @@ -27,6 +27,7 @@ const getIconURL = name => { case 'ether': case 'fairy': case 'fighter-shield': + case 'fighter-sword': case 'fire-rod': case 'fire-shield': case 'flippers': @@ -59,6 +60,24 @@ const getIconURL = name => { case 'small-key': case 'somaria': return `/item/${name}.png`; + case 'dungeon-ct': + case 'dungeon-dp': + case 'dungeon-ep': + case 'dungeon-gt': + case 'dungeon-hc': + case 'dungeon-ip': + case 'dungeon-mm': + case 'dungeon-pd': + case 'dungeon-sp': + case 'dungeon-sw': + case 'dungeon-th': + case 'dungeon-tr': + case 'dungeon-tt': + return `/dungeon/${name.substr(8)}.png`; + case 'crystal-switch': + case 'crystal-switch-blue': + case 'crystal-switch-red': + return `/icon/${name}.png`; default: return ''; } @@ -69,14 +88,17 @@ const ZeldaIcon = ({ name }) => { const invert = name.startsWith('not-'); const strippedName = invert ? name.substr(4) : name; + const src = getIconURL(strippedName); const title = t(`icon.zelda.${name}`); return - {title} + {src ? + {title} + : null} {invert ?