Have fits filter rigs by size
This commit is contained in:
@@ -245,11 +245,17 @@ class ItemView(Display):
|
|||||||
if slot is None:
|
if slot is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Rigs don't use CPU/power, they use calibration - allow them through
|
# Rigs don't use CPU/power, they use calibration - check rig size compatibility
|
||||||
if slot == FittingSlot.RIG:
|
if slot == FittingSlot.RIG:
|
||||||
# Check if item can fit on the ship
|
# Check if item can fit on the ship
|
||||||
if not fit.canFit(item):
|
if not fit.canFit(item):
|
||||||
continue
|
continue
|
||||||
|
# Check rig size compatibility with ship
|
||||||
|
shipRigSize = fit.ship.getModifiedItemAttr("rigSize")
|
||||||
|
itemRigSize = item.attributes.get("rigSize")
|
||||||
|
if shipRigSize is not None and itemRigSize is not None:
|
||||||
|
if shipRigSize != itemRigSize.value:
|
||||||
|
continue
|
||||||
fittingItems.append(item)
|
fittingItems.append(item)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user