From 6f16b41d351351a658d2bb06f0c5d398facaf262 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 13 Dec 2025 14:35:29 -0800 Subject: [PATCH] misc: util tweaks, database page fixes, mock updates --- src/lib/utils/jobUtils.ts | 14 +++++++------- src/lib/utils/proficiency.ts | 8 ++++---- .../(app)/database/characters/new/+page.svelte | 3 +++ src/routes/(app)/database/summons/new/+page.svelte | 1 + src/routes/(app)/database/weapons/new/+page.svelte | 1 + src/stories/mocks/characters.ts | 2 +- src/stories/mocks/jobs.ts | 2 +- 7 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/lib/utils/jobUtils.ts b/src/lib/utils/jobUtils.ts index 2213f1ea..3e3f620b 100644 --- a/src/lib/utils/jobUtils.ts +++ b/src/lib/utils/jobUtils.ts @@ -186,15 +186,15 @@ export function getSkillCategoryColor(skill: JobSkill): string { */ export function formatJobProficiency(proficiency: [number, number]): string[] { const weaponTypes: Record = { - 1: 'Sword', + 1: 'Sabre', 2: 'Dagger', - 3: 'Spear', - 4: 'Axe', - 5: 'Staff', - 6: 'Gun', + 3: 'Axe', + 4: 'Spear', + 5: 'Bow', + 6: 'Staff', 7: 'Melee', - 8: 'Bow', - 9: 'Harp', + 8: 'Harp', + 9: 'Gun', 10: 'Katana' } diff --git a/src/lib/utils/proficiency.ts b/src/lib/utils/proficiency.ts index ef6067f7..e0a508bb 100644 --- a/src/lib/utils/proficiency.ts +++ b/src/lib/utils/proficiency.ts @@ -6,11 +6,11 @@ export const PROFICIENCY_LABELS: Record = { 2: 'Dagger', 3: 'Axe', 4: 'Spear', - 5: 'Staff', - 6: 'Gun', + 5: 'Bow', + 6: 'Staff', 7: 'Melee', - 8: 'Bow', - 9: 'Harp', + 8: 'Harp', + 9: 'Gun', 10: 'Katana' } diff --git a/src/routes/(app)/database/characters/new/+page.svelte b/src/routes/(app)/database/characters/new/+page.svelte index d519eecb..fe320e1c 100644 --- a/src/routes/(app)/database/characters/new/+page.svelte +++ b/src/routes/(app)/database/characters/new/+page.svelte @@ -65,6 +65,9 @@ gender: 0, proficiency1: 0, proficiency2: 0, + season: 0, + series: [] as number[], + gacha_available: false, // Stats minHp: 0, diff --git a/src/routes/(app)/database/summons/new/+page.svelte b/src/routes/(app)/database/summons/new/+page.svelte index 9b74da37..f8fc2370 100644 --- a/src/routes/(app)/database/summons/new/+page.svelte +++ b/src/routes/(app)/database/summons/new/+page.svelte @@ -56,6 +56,7 @@ // Taxonomy element: 0, series: '', + promotions: [] as number[], // Stats minHp: 0, diff --git a/src/routes/(app)/database/weapons/new/+page.svelte b/src/routes/(app)/database/weapons/new/+page.svelte index 4779a09f..33cfc15a 100644 --- a/src/routes/(app)/database/weapons/new/+page.svelte +++ b/src/routes/(app)/database/weapons/new/+page.svelte @@ -56,6 +56,7 @@ proficiency: 0, series: 0, newSeries: 0, + promotions: [] as number[], // Stats minHp: 0, diff --git a/src/stories/mocks/characters.ts b/src/stories/mocks/characters.ts index ae4d1c5c..2ba2469d 100644 --- a/src/stories/mocks/characters.ts +++ b/src/stories/mocks/characters.ts @@ -9,7 +9,7 @@ export const mockCharacter: Character = { rarity: 3, // SSR special: false, uncap: { flb: true, ulb: true, transcendence: false }, - proficiency: [1, 2] // Katana, Dagger + proficiency: [1, 2] // Sabre, Dagger }; export const mockSpecialCharacter: Character = { diff --git a/src/stories/mocks/jobs.ts b/src/stories/mocks/jobs.ts index 9acb029f..d5827ba7 100644 --- a/src/stories/mocks/jobs.ts +++ b/src/stories/mocks/jobs.ts @@ -14,7 +14,7 @@ export const mockJobNoUM: Job = { id: 'job-2', granblueId: '100001', name: { en: 'Dark Fencer', ja: 'ダークフェンサー' }, - proficiency: [1, 2], // Sword, Dagger + proficiency: [1, 2], // Sabre, Dagger row: 3, ultimateMastery: false };