diff --git a/components/about/ChangelogUnit/index.tsx b/components/about/ChangelogUnit/index.tsx index d63d8375..759154d9 100644 --- a/components/about/ChangelogUnit/index.tsx +++ b/components/about/ChangelogUnit/index.tsx @@ -71,10 +71,16 @@ const ChangelogUnit = ({ id, type, image }: Props) => { src = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/character-grid/${id}_${image}.jpg` break case 'weapon': - src = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${id}.jpg` + src = + image === '03' + ? `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${id}_${image}.jpg` + : `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${id}.jpg` break case 'summon': - src = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${id}.jpg` + src = + image === '04' + ? `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${id}_${image}.jpg` + : `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${id}.jpg` break } diff --git a/components/about/ContentUpdate/index.tsx b/components/about/ContentUpdate/index.tsx index 094eb3f5..0118da0f 100644 --- a/components/about/ContentUpdate/index.tsx +++ b/components/about/ContentUpdate/index.tsx @@ -17,6 +17,7 @@ interface Props { event: string newItems?: UpdateObject uncappedItems?: UpdateObject + transcendedItems?: UpdateObject numNotes: number } const ContentUpdate = ({ @@ -25,6 +26,7 @@ const ContentUpdate = ({ event, newItems, uncappedItems, + transcendedItems, numNotes, }: Props) => { const { t: updates } = useTranslation('updates') @@ -100,6 +102,42 @@ const ContentUpdate = ({ return section } + function transcendItemElements(key: 'character' | 'weapon' | 'summon') { + let elements: React.ReactNode[] = [] + if (transcendedItems && transcendedItems[key]) { + const items = transcendedItems[key] + elements = items + ? items.map((id) => { + return key === 'character' || key === 'summon' ? ( + + ) : ( + + ) + }) + : [] + } + return elements + } + + function transcendItemSection(key: 'character' | 'weapon' | 'summon') { + let section: React.ReactNode = '' + + if (transcendedItems && transcendedItems[key]) { + const items = transcendedItems[key] + section = + items && items.length > 0 ? ( +
+

{updates(`labels.transcends.${key}s`)}

+
{transcendItemElements(key)}
+
+ ) : ( + '' + ) + } + + return section + } + return (
{newItemSection('character')} {uncapItemSection('character')} + {transcendItemSection('character')} {newItemSection('weapon')} {uncapItemSection('weapon')} + {transcendItemSection('weapon')} {newItemSection('summon')} {uncapItemSection('summon')} + {transcendItemSection('summon')} {numNotes > 0 ? (
diff --git a/components/about/UpdatesPage/index.tsx b/components/about/UpdatesPage/index.tsx index 02d7c8b4..587fd955 100644 --- a/components/about/UpdatesPage/index.tsx +++ b/components/about/UpdatesPage/index.tsx @@ -78,6 +78,52 @@ const UpdatesPage = () => { return (

{common('about.segmented_control.updates')}

+ + + { (w) => w && w.object.id === mainhand.id ) + let suffix = '' + if ( + weapon && + weapon.object.uncap.transcendence && + weapon.uncap_level == 6 + ) { + if (weapon.transcendence_step >= 1 && weapon.transcendence_step < 5) { + suffix = '_02' + } else if (weapon.transcendence_step === 5) { + suffix = '_03' + } + } + if (mainhand.element == 0 && weapon && weapon.element) { url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${mainhand.granblue_id}_${weapon.element}.jpg` } else { - url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${mainhand.granblue_id}.jpg` + url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${mainhand.granblue_id}${suffix}.jpg` } } @@ -230,10 +243,22 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => { const gridWeapon = weaponGrid[position] if (weapon && gridWeapon) { + let suffix = '' + if (weapon.uncap.transcendence && gridWeapon.uncap_level == 6) { + if ( + gridWeapon.transcendence_step >= 1 && + gridWeapon.transcendence_step < 5 + ) { + suffix = '_02' + } else if (gridWeapon.transcendence_step === 5) { + suffix = '_03' + } + } + if (weapon.element == 0 && gridWeapon.element) { url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}_${gridWeapon.element}.jpg` } else { - url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg` + url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}${suffix}.jpg` } } diff --git a/components/weapon/WeaponUnit/index.tsx b/components/weapon/WeaponUnit/index.tsx index 41e9f1e3..b3d2f818 100644 --- a/components/weapon/WeaponUnit/index.tsx +++ b/components/weapon/WeaponUnit/index.tsx @@ -201,16 +201,27 @@ const WeaponUnit = ({ if (gridWeapon) { const weapon = gridWeapon.object! + let suffix = '' + if (weapon.uncap.transcendence && gridWeapon.uncap_level == 6) { + if ( + gridWeapon.transcendence_step >= 1 && + gridWeapon.transcendence_step < 5 + ) { + suffix = '_02' + } else if (gridWeapon.transcendence_step === 5) { + suffix = '_03' + } + } if (unitType == 0) { if (gridWeapon.object.element == 0 && gridWeapon.element) imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}_${gridWeapon.element}.jpg` else - imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}.jpg` + imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}${suffix}.jpg` } else { if (gridWeapon.object.element == 0 && gridWeapon.element) imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}_${gridWeapon.element}.jpg` else - imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg` + imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}${suffix}.jpg` } } diff --git a/public/locales/en/updates.json b/public/locales/en/updates.json index aa5b8031..a41e8f29 100644 --- a/public/locales/en/updates.json +++ b/public/locales/en/updates.json @@ -8,6 +8,11 @@ "weapons": "New weapon uncaps", "summons": "New summon uncaps" }, + "transcends": { + "characters": "New character transcendence", + "weapons": "New weapon transcendence", + "summons": "New summon transcendence" + }, "features": "New features", "updates": "Other updates" }, diff --git a/public/locales/ja/updates.json b/public/locales/ja/updates.json index af478ff8..4cc56243 100644 --- a/public/locales/ja/updates.json +++ b/public/locales/ja/updates.json @@ -8,6 +8,11 @@ "weapons": "武器の新上限解放", "summons": "召喚石の新上限解放" }, + "transcends": { + "characters": "キャラクターの新限界超越", + "weapons": "武器の新限界超越", + "summons": "召喚石の新限界超越" + }, "features": "新機能", "updates": "その他の更新" },