Fix couple of price-related bugs

This commit is contained in:
DarkPhoenix
2018-09-19 04:51:14 +03:00
parent c53e7964bf
commit f598e8e3c2
2 changed files with 8 additions and 3 deletions

View File

@@ -50,10 +50,13 @@ class Price(ViewColumn):
if not price or not price.isValid:
return False
if isinstance(stuff, Drone) or isinstance(stuff, Cargo):
price.price *= stuff.amount
# Fetch actual price as float to not modify its value on Price object
price = price.price
return formatAmount(price.price, 3, 3, 9, currency=True)
if isinstance(stuff, Drone) or isinstance(stuff, Cargo):
price *= stuff.amount
return formatAmount(price, 3, 3, 9, currency=True)
def delayedText(self, mod, display, colItem):
sPrice = ServicePrice.getInstance()

View File

@@ -234,3 +234,5 @@ class PriceWorkerThread(threading.Thread):
self.wait[x.typeID].append(callback)
# Import market sources only to initialize price source modules, they register on their own
from .marketSources import *