diff --git a/assets/js/hooks/Mapper/components/mapInterface/widgets/SystemKills/SystemKills.tsx b/assets/js/hooks/Mapper/components/mapInterface/widgets/SystemKills/SystemKills.tsx index 0f35000b..6543d54b 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/widgets/SystemKills/SystemKills.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/widgets/SystemKills/SystemKills.tsx @@ -6,6 +6,7 @@ import { KillsHeader } from './components/SystemKillsHeader'; import { useKillsWidgetSettings } from './hooks/useKillsWidgetSettings'; import { useSystemKills } from './hooks/useSystemKills'; import { KillsSettingsDialog } from './components/SystemKillsSettingsDialog'; +import { isWormholeSpace } from '@/hooks/Mapper/components/map/helpers/isWormholeSpace'; export const SystemKills: React.FC = () => { const { @@ -37,10 +38,26 @@ export const SystemKills: React.FC = () => { const isNothingSelected = !systemId && !visible; const showLoading = isLoading && kills.length === 0; + const filteredKills = useMemo(() => { + if (!settings.whOnly) return kills; + return kills.filter(kill => { + const system = systems.find(sys => sys.system_static_info.solar_system_id === kill.solar_system_id); + if (!system) { + console.warn(`System with id ${kill.solar_system_id} not found.`); + return false; + } + return isWormholeSpace(system.system_static_info.system_class); + }); + }, [kills, settings.whOnly, systems]); + return (