initial commit
This commit is contained in:
47
src/types/crafting.ts
Normal file
47
src/types/crafting.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
export type Tier = 4 | 5 | 6 | 7 | 8
|
||||
export type Enchantment = 0 | 1 | 2 | 3 | 4
|
||||
|
||||
export type ItemCategory = 'Weapons' | 'Armor' | 'Gathering'
|
||||
|
||||
export type JournalType = 'warrior' | 'mage' | 'hunter' | 'toolmaker'
|
||||
|
||||
export type SortField = 'materialCost' | 'displayName' | 'tier' | 'variantType'
|
||||
|
||||
export type SortDirection = 'asc' | 'desc'
|
||||
|
||||
export interface SortState {
|
||||
field: SortField
|
||||
direction: SortDirection
|
||||
}
|
||||
|
||||
export interface Ingredient {
|
||||
itemId: string
|
||||
quantity: number
|
||||
}
|
||||
|
||||
export interface CraftingRecipe {
|
||||
outputItemId: string
|
||||
displayName: string
|
||||
tier: Tier
|
||||
enchantment: Enchantment
|
||||
category: ItemCategory
|
||||
journalType: JournalType
|
||||
ingredients: Ingredient[]
|
||||
}
|
||||
|
||||
export interface IngredientBreakdown {
|
||||
itemId: string
|
||||
displayName: string
|
||||
quantity: number
|
||||
unitPrice: number
|
||||
totalCost: number
|
||||
}
|
||||
|
||||
export interface ProfitResult {
|
||||
recipe: CraftingRecipe
|
||||
materialCost: number
|
||||
effectiveMaterialCost: number
|
||||
priceAgeMs: number | null // null = missing prices; ms since oldest manual entry
|
||||
missingPrices: boolean
|
||||
ingredientBreakdown: IngredientBreakdown[]
|
||||
}
|
||||
Reference in New Issue
Block a user