From 33fd9e63f134f02eba1c7fcaa833109e195d3611 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sat, 6 Dec 2025 01:37:08 +0100 Subject: [PATCH] Fix rigs never passing fitting check because no cpu --- gui/builtinMarketBrowser/itemView.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/gui/builtinMarketBrowser/itemView.py b/gui/builtinMarketBrowser/itemView.py index 603ddac1f..cfe6621a6 100644 --- a/gui/builtinMarketBrowser/itemView.py +++ b/gui/builtinMarketBrowser/itemView.py @@ -240,7 +240,20 @@ class ItemView(Display): fittingItems = [] for item in items: - # Check CPU and power requirements first (fastest check) + # Check if item is a module (has a slot) + slot = Module.calculateSlot(item) + if slot is None: + continue + + # Rigs don't use CPU/power, they use calibration - allow them through + if slot == FittingSlot.RIG: + # Check if item can fit on the ship + if not fit.canFit(item): + continue + fittingItems.append(item) + continue + + # For non-rigs, check CPU and power requirements itemCpu = item.attributes.get("cpu") itemPower = item.attributes.get("power") @@ -260,11 +273,6 @@ class ItemView(Display): if itemPowerValue > pgRemaining: continue - # Check if item is a module (has a slot) - slot = Module.calculateSlot(item) - if slot is None: - continue - # Check if item can fit on the ship (most expensive check, do last) if not fit.canFit(item): continue