Fix fetching of prices of on-character implants
This commit is contained in:
@@ -156,7 +156,7 @@ class ImplantDisplay(d.Display):
|
||||
event.Skip()
|
||||
return
|
||||
|
||||
self.original = fit.implants if fit is not None else None
|
||||
self.original = fit.appliedImplants if fit is not None else None
|
||||
self.implants = fit.appliedImplants[:] if fit is not None else None
|
||||
if self.implants is not None:
|
||||
self.implants.sort(key=lambda implant: implant.slot or 0)
|
||||
|
||||
@@ -120,8 +120,8 @@ class PriceViewFull(StatsView):
|
||||
for booster in fit.boosters:
|
||||
booster_price += booster.item.price.price
|
||||
|
||||
if fit.implants:
|
||||
for implant in fit.implants:
|
||||
if fit.appliedImplants:
|
||||
for implant in fit.appliedImplants:
|
||||
implant_price += implant.item.price.price
|
||||
|
||||
total_price = 0
|
||||
|
||||
@@ -114,8 +114,8 @@ class PriceViewMinimal(StatsView):
|
||||
for booster in fit.boosters:
|
||||
booster_price += booster.item.price.price
|
||||
|
||||
if fit.implants:
|
||||
for implant in fit.implants:
|
||||
if fit.appliedImplants:
|
||||
for implant in fit.appliedImplants:
|
||||
implant_price += implant.item.price.price
|
||||
|
||||
fitting_price = module_price
|
||||
|
||||
@@ -41,7 +41,6 @@ class CalcAddLocalModuleCommand(wx.Command):
|
||||
if not newMod.fits(fit):
|
||||
pyfalog.warning('Module does not fit')
|
||||
return False
|
||||
|
||||
newMod.owner = fit
|
||||
try:
|
||||
fit.modules.append(newMod)
|
||||
|
||||
@@ -658,7 +658,7 @@ class MainFrame(wx.Frame):
|
||||
rebaseMap = {k.ID: v.ID for k, v in replacementsCheaper.items()}
|
||||
self.command.Submit(cmd.GuiRebaseItemsCommand(fitID=fitID, rebaseMap=rebaseMap))
|
||||
|
||||
fitItems = {i for i in Fit.fitItemIter(fit) if i is not fit.ship.item}
|
||||
fitItems = {i for i in Fit.fitItemIter(fit, forceFitImplants=True) if i is not fit.ship.item}
|
||||
self.disablerAll = wx.WindowDisabler()
|
||||
self.waitDialog = wx.BusyInfo("Please Wait...", parent=self)
|
||||
Price.getInstance().findCheaperReplacements(fitItems, updateFitCb, fetchTimeout=10)
|
||||
|
||||
Reference in New Issue
Block a user