diff --git a/src/components/table/ProfitRow.vue b/src/components/table/ProfitRow.vue
index 41f23af..ed8014c 100644
--- a/src/components/table/ProfitRow.vue
+++ b/src/components/table/ProfitRow.vue
@@ -41,36 +41,26 @@
-
- |
+ |
@@ -184,13 +233,13 @@
Raw Materials
{{ formatSilver(result.materialCost) }}
-
- RRR ({{ result.rrr.toFixed(1) }}%)
- −{{ formatSilver(result.materialCost - result.effectiveMaterialCost) }}
-
- Craft Cost
- {{ formatSilver(result.effectiveMaterialCost) }}
+ RRR ({{ result.rrr.toFixed(1) }}%)
+ {{ formatSilver(result.effectiveMaterialCost) }}
+
+
+ RRR + Focus ({{ result.rrrFocus.toFixed(1) }}%)
+ {{ formatSilver(result.effectiveMaterialCostFocus) }}
@@ -241,24 +290,30 @@ const inputValue = ref('')
// ─── Bill of Production ───────────────────────────────────────────────────────
-const addingToBill = ref(false)
-const billQty = ref(1)
+const addingMode = ref(null)
+const billQty = ref(1)
-const isInOrder = computed(() => inOrder(props.result.recipe.outputItemId))
-const currentQty = computed(() => getQty(props.result.recipe.outputItemId))
+const isInOrderNoFocus = computed(() => inOrder(props.result.recipe.outputItemId, false))
+const currentQtyNoFocus = computed(() => getQty(props.result.recipe.outputItemId, false))
+const isInOrderFocus = computed(() => inOrder(props.result.recipe.outputItemId, true))
+const currentQtyFocus = computed(() => getQty(props.result.recipe.outputItemId, true))
-function startBill() {
- billQty.value = isInOrder.value ? currentQty.value : 1
- addingToBill.value = true
+function startBill(mode: 'nofocus' | 'focus') {
+ const already = mode === 'nofocus' ? isInOrderNoFocus.value : isInOrderFocus.value
+ const qty = mode === 'nofocus' ? currentQtyNoFocus.value : currentQtyFocus.value
+ billQty.value = already ? qty : 1
+ addingMode.value = mode
}
function confirmBill() {
- if (billQty.value > 0) upsert(props.result.recipe, billQty.value)
- addingToBill.value = false
+ if (billQty.value > 0 && addingMode.value) {
+ upsert(props.result.recipe, billQty.value, addingMode.value === 'focus')
+ }
+ addingMode.value = null
}
function cancelBill() {
- addingToBill.value = false
+ addingMode.value = null
}
// ─── Price age display ────────────────────────────────────────────────────────
diff --git a/src/components/table/TableHeader.vue b/src/components/table/TableHeader.vue
index b6dec9b..cfe48ff 100644
--- a/src/components/table/TableHeader.vue
+++ b/src/components/table/TableHeader.vue
@@ -1,21 +1,63 @@
+
+
+ |
+
+ No Focus
+ |
+
+ With Focus
+ |
+ |
+
+
+
+
+ |
{{ col.label }}
-
- {{ sortState.direction === 'asc' ? '↑' : '↓' }}
-
+ {{ sortState.direction === 'asc' ? '↑' : '↓' }}
+ ↕
+
+ |
+
+
+
+
+ {{ col.label }}
+ {{ sortState.direction === 'asc' ? '↑' : '↓' }}
↕
|
+ |
+
+
+
+ {{ col.label }}
+ |
+ |
+
+
+
+ Status
+ |
@@ -23,23 +65,19 @@
diff --git a/src/composables/useCraftingProfit.ts b/src/composables/useCraftingProfit.ts
index 3e7ea7a..6b4e12a 100644
--- a/src/composables/useCraftingProfit.ts
+++ b/src/composables/useCraftingProfit.ts
@@ -4,7 +4,7 @@ import type { CraftingRecipe, ProfitResult, IngredientBreakdown, SortState } fro
import type { FilterState, VariantType } from '../types/filters'
import { useAlbionPrices } from './useAlbionPrices'
import { formatItemId } from '../utils/formatting'
-import { cityRrr, isRrrExempt } from '../data/cityBonuses'
+import { localProductionBonus, rrrFromBonus, isRrrExempt, FOCUS_LPB } from '../data/cityBonuses'
function variantOf(outputItemId: string): VariantType {
const id = outputItemId.replace(/@\d$/, '') // strip enchantment suffix
@@ -84,15 +84,20 @@ export function useCraftingProfit(
}
const materialCost = basicCost + artefactCost
- const rrr = cityRrr(city, recipe.outputItemId)
+ const lpb = localProductionBonus(city, recipe.outputItemId)
+ const rrr = rrrFromBonus(lpb)
+ const rrrFocus = rrrFromBonus(lpb + FOCUS_LPB)
const effectiveMaterialCost = basicCost * (1 - rrr / 100) + artefactCost
+ const effectiveMaterialCostFocus = basicCost * (1 - rrrFocus / 100) + artefactCost
const priceAgeMs = missingPrices ? null : (oldestDate ? Date.now() - new Date(oldestDate).getTime() : null)
results.push({
recipe,
materialCost,
effectiveMaterialCost,
+ effectiveMaterialCostFocus,
rrr,
+ rrrFocus,
priceAgeMs,
missingPrices,
ingredientBreakdown,
diff --git a/src/composables/useProductionOrder.ts b/src/composables/useProductionOrder.ts
index 9ed2fa8..f4e1f80 100644
--- a/src/composables/useProductionOrder.ts
+++ b/src/composables/useProductionOrder.ts
@@ -5,12 +5,17 @@ import { ALL_RECIPES } from '../data/recipes'
export interface OrderItem {
recipe: CraftingRecipe
qty: number
+ focus: boolean
}
const STORAGE_KEY = 'albion-production-order'
const recipeIndex = new Map(ALL_RECIPES.map(r => [r.outputItemId, r]))
+function orderKey(outputItemId: string, focus: boolean): string {
+ return `${outputItemId}|${focus ? 'f' : 'b'}`
+}
+
function load(): Map {
try {
const raw = localStorage.getItem(STORAGE_KEY)
@@ -19,7 +24,10 @@ function load(): Map {
const result: [string, OrderItem][] = []
for (const i of items) {
const recipe = recipeIndex.get(i.recipe.outputItemId)
- if (recipe) result.push([recipe.outputItemId, { recipe, qty: i.qty }])
+ if (recipe) {
+ const focus = i.focus ?? false
+ result.push([orderKey(recipe.outputItemId, focus), { recipe, qty: i.qty, focus }])
+ }
}
return new Map(result)
}
@@ -39,17 +47,18 @@ const order = ref |