fix: consolidate WeaponKey type definition

- Update entities.ts WeaponKey to include all required fields (granblue_id, series, group, order)
- Use snake_case naming (granblue_id) to match API/database conventions
- Update modifiers.ts to import from entities.ts and use snake_case property
- Removes duplicate WeaponKey type and eliminates type conflicts

Fixes "Property 'granblueId' does not exist on type 'WeaponKey'" and type assignment errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Justin Edmund 2025-11-28 18:05:46 -08:00
parent c750f5b069
commit e52f6ef479
2 changed files with 6 additions and 3 deletions

View file

@ -167,10 +167,13 @@ export interface Awakening {
// WeaponKey entity
export interface WeaponKey {
id: string
granblue_id: string
name: LocalizedName
slug: string
keyType: string
series: number[]
slot: number
group: number
order: number
}
// SimpleAxSkill for weapon AX skills

View file

@ -3,7 +3,7 @@
*/
import type { Awakening } from '$lib/types/Awakening'
import type { WeaponKey } from '$lib/types/WeaponKey'
import type { WeaponKey } from '$lib/types/api/entities'
import type { SimpleAxSkill } from '$lib/types/SimpleAxSkill'
/**
@ -41,7 +41,7 @@ export function getWeaponKeyImage(
// Handle element-specific telumas (Draconic weapons)
const elementalTelumas = [15008, 16001, 16002]
const granblueId = parseInt(key.granblueId || '0')
const granblueId = parseInt(key.granblue_id || '0')
if (elementalTelumas.includes(granblueId) && weaponElement) {
filename += `-${weaponElement}`