Fix rigs never passing fitting check because no cpu
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user