diff --git a/public/images/stations/air-filtering-unit-icon.png b/public/images/stations/air-filtering-unit-icon.png deleted file mode 100644 index 59055c251..000000000 Binary files a/public/images/stations/air-filtering-unit-icon.png and /dev/null differ diff --git a/public/images/stations/bitcoin-farm-icon.png b/public/images/stations/bitcoin-farm-icon.png deleted file mode 100644 index fda59a8c8..000000000 Binary files a/public/images/stations/bitcoin-farm-icon.png and /dev/null differ diff --git a/public/images/stations/booze-generator-icon.png b/public/images/stations/booze-generator-icon.png deleted file mode 100644 index d699a54b5..000000000 Binary files a/public/images/stations/booze-generator-icon.png and /dev/null differ diff --git a/public/images/stations/christmas-tree-icon.png b/public/images/stations/christmas-tree-icon.png deleted file mode 100644 index 464e17cc9..000000000 Binary files a/public/images/stations/christmas-tree-icon.png and /dev/null differ diff --git a/public/images/stations/defective-wall-icon.png b/public/images/stations/defective-wall-icon.png deleted file mode 100644 index 47579741b..000000000 Binary files a/public/images/stations/defective-wall-icon.png and /dev/null differ diff --git a/public/images/stations/generator-icon.png b/public/images/stations/generator-icon.png deleted file mode 100644 index 5ff2d3de9..000000000 Binary files a/public/images/stations/generator-icon.png and /dev/null differ diff --git a/public/images/stations/gym-icon.png b/public/images/stations/gym-icon.png deleted file mode 100644 index da4584d99..000000000 Binary files a/public/images/stations/gym-icon.png and /dev/null differ diff --git a/public/images/stations/hall-of-fame-icon.png b/public/images/stations/hall-of-fame-icon.png deleted file mode 100644 index 0e0fdc529..000000000 Binary files a/public/images/stations/hall-of-fame-icon.png and /dev/null differ diff --git a/public/images/stations/heating-icon.png b/public/images/stations/heating-icon.png deleted file mode 100644 index 9f6306858..000000000 Binary files a/public/images/stations/heating-icon.png and /dev/null differ diff --git a/public/images/stations/illumination-icon.png b/public/images/stations/illumination-icon.png deleted file mode 100644 index 47c571c62..000000000 Binary files a/public/images/stations/illumination-icon.png and /dev/null differ diff --git a/public/images/stations/intelligence-center-icon.png b/public/images/stations/intelligence-center-icon.png deleted file mode 100644 index cd6cd1318..000000000 Binary files a/public/images/stations/intelligence-center-icon.png and /dev/null differ diff --git a/public/images/stations/lavatory-icon.png b/public/images/stations/lavatory-icon.png deleted file mode 100644 index afa744af0..000000000 Binary files a/public/images/stations/lavatory-icon.png and /dev/null differ diff --git a/public/images/stations/library-icon.png b/public/images/stations/library-icon.png deleted file mode 100644 index 5ed633d2b..000000000 Binary files a/public/images/stations/library-icon.png and /dev/null differ diff --git a/public/images/stations/medstation-icon.png b/public/images/stations/medstation-icon.png deleted file mode 100644 index 2195b733e..000000000 Binary files a/public/images/stations/medstation-icon.png and /dev/null differ diff --git a/public/images/stations/nutrition-unit-icon.png b/public/images/stations/nutrition-unit-icon.png deleted file mode 100644 index 52b657706..000000000 Binary files a/public/images/stations/nutrition-unit-icon.png and /dev/null differ diff --git a/public/images/stations/rest-space-icon.png b/public/images/stations/rest-space-icon.png deleted file mode 100644 index 4bdcfe495..000000000 Binary files a/public/images/stations/rest-space-icon.png and /dev/null differ diff --git a/public/images/stations/scav-case-icon.png b/public/images/stations/scav-case-icon.png deleted file mode 100644 index b654416a7..000000000 Binary files a/public/images/stations/scav-case-icon.png and /dev/null differ diff --git a/public/images/stations/security-icon.png b/public/images/stations/security-icon.png deleted file mode 100644 index b3e97631e..000000000 Binary files a/public/images/stations/security-icon.png and /dev/null differ diff --git a/public/images/stations/shooting-range-icon.png b/public/images/stations/shooting-range-icon.png deleted file mode 100644 index b9fd64a68..000000000 Binary files a/public/images/stations/shooting-range-icon.png and /dev/null differ diff --git a/public/images/stations/solar-power-icon.png b/public/images/stations/solar-power-icon.png deleted file mode 100644 index f95270bfe..000000000 Binary files a/public/images/stations/solar-power-icon.png and /dev/null differ diff --git a/public/images/stations/stash-icon.png b/public/images/stations/stash-icon.png deleted file mode 100644 index ba1568265..000000000 Binary files a/public/images/stations/stash-icon.png and /dev/null differ diff --git a/public/images/stations/vents-icon.png b/public/images/stations/vents-icon.png deleted file mode 100644 index 860a7670b..000000000 Binary files a/public/images/stations/vents-icon.png and /dev/null differ diff --git a/public/images/stations/water-collector-icon.png b/public/images/stations/water-collector-icon.png deleted file mode 100644 index 7742dbe7a..000000000 Binary files a/public/images/stations/water-collector-icon.png and /dev/null differ diff --git a/public/images/stations/weapon-rack-icon.png b/public/images/stations/weapon-rack-icon.png deleted file mode 100644 index 09cd42c16..000000000 Binary files a/public/images/stations/weapon-rack-icon.png and /dev/null differ diff --git a/public/images/stations/workbench-icon.png b/public/images/stations/workbench-icon.png deleted file mode 100644 index f3e5231ce..000000000 Binary files a/public/images/stations/workbench-icon.png and /dev/null differ diff --git a/src/components/barter-tooltip/index.js b/src/components/barter-tooltip/index.js index 5738a6dd4..0fd3075f5 100644 --- a/src/components/barter-tooltip/index.js +++ b/src/components/barter-tooltip/index.js @@ -2,24 +2,27 @@ import { useTranslation } from 'react-i18next'; import { useMemo } from 'react'; import { useSelector } from 'react-redux'; import { Link } from 'react-router-dom'; +import { Icon } from '@mdi/react'; +import { + mdiCached, + mdiProgressWrench +} from '@mdi/js'; import ItemImage from '../item-image/index.js'; import formatPrice from '../../modules/format-price.js'; import { isAnyDogtag, getDogTagCost } from '../../modules/dogtags.js'; import { getCheapestPrice } from '../../modules/format-cost-items.js'; import { getDurationDisplay } from '../../modules/format-duration.js'; - -import { Icon } from '@mdi/react'; -import { - mdiCached, - mdiProgressWrench -} from '@mdi/js'; +import useHideoutData from '../../features/hideout/index.js'; +import useTraderData from '../../features/traders/index.js'; import './index.css'; function BarterTooltip({ barter, showTitle = true, title, allowAllSources = false, crafts, barters, useBarterIngredients, useCraftIngredients }) { const settings = useSelector((state) => state.settings); const { t } = useTranslation(); + const { data: hideout } = useHideoutData(); + const { data: traders } = useTraderData(); if (barters && typeof useBarterIngredients === 'undefined') { useBarterIngredients = true; @@ -73,13 +76,16 @@ function BarterTooltip({ barter, showTitle = true, title, allowAllSources = fals let titleElement = ''; if (showTitle) { - const trader = barter.trader ? - `${barter.trader.name} ${t('LL{{level}}', { level: barter.level })}` : - `${barter.station.name} ${barter.level}`; + const source = barter.trader + ? traders.find(t => t.id === barter.trader.id) + : hideout.find(s => s.id === barter.station.id); + const sourceLevelText = barter.trader ? + `${source.name} ${t('LL{{level}}', { level: barter.level })}` : + `${source.name} ${barter.level}`; const tipTitle = barter.trader ? - t('Barter at {{trader}}', { trader: trader }) : - t('Craft at {{station}}', {station: trader}); + t('Barter at {{trader}}', { trader: sourceLevelText }) : + t('Craft at {{station}}', {station: sourceLevelText}); titleElement = (