Have fits filter rigs by size
This commit is contained in:
@@ -245,11 +245,17 @@ class ItemView(Display):
|
||||
if slot is None:
|
||||
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:
|
||||
# Check if item can fit on the ship
|
||||
if not fit.canFit(item):
|
||||
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)
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user