feat(frontend): render weapon OD as integer (0-10 loot-profile scale)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
cbc8785c47
commit
2395bd6267
2 changed files with 2 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ export function DetailPanel({ item, onClose }: { item: InvItem; onClose: () => v
|
|||
<Row k="Workmanship" v={item.workmanship ?? '—'} />
|
||||
{item.armor_level != null && item.armor_level > 0 && <Row k="Armor" v={item.armor_level} />}
|
||||
{item.max_damage != null && item.max_damage > 0 && <Row k="Max damage" v={item.max_damage} />}
|
||||
{item.od_rating != null && <Row k="Weapon OD" v={item.od_rating > 0 ? `+${item.od_rating.toFixed(2)}` : item.od_rating.toFixed(2)} />}
|
||||
{item.od_rating != null && <Row k="Weapon OD" v={String(item.od_rating)} />}
|
||||
{item.condition_percent != null && <Row k="Condition" v={`${item.condition_percent}%`} />}
|
||||
{item.item_set_name && <Row k="Set" v={item.item_set_name} />}
|
||||
{(item.is_bonded || item.is_attuned) && <Row k="Binding" v={[item.is_bonded && 'Bonded', item.is_attuned && 'Attuned'].filter(Boolean).join(', ')} />}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@ function cell(item: InvItem, key: string): React.ReactNode {
|
|||
return item.last_updated ? item.last_updated.slice(0, 16).replace('T', ' ') : '—';
|
||||
case 'od_rating': {
|
||||
const v = item.od_rating;
|
||||
if (v == null) return '—';
|
||||
return v > 0 ? `+${v.toFixed(2)}` : v.toFixed(2);
|
||||
return v == null ? '—' : String(v);
|
||||
}
|
||||
default: {
|
||||
const v = (item as any)[key];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue