Update db and how we generate list of replacements

This commit is contained in:
DarkPhoenix
2019-02-23 15:20:56 +03:00
parent 8b86f14ee2
commit 7d42f8dba6
2 changed files with 10 additions and 7 deletions

BIN
eve.db

Binary file not shown.

View File

@@ -804,10 +804,13 @@ class Market(object):
replTypeIDs.update({int(i) for i in item.replaceBetter.split(",") if i}) replTypeIDs.update({int(i) for i in item.replaceBetter.split(",") if i})
if not replTypeIDs: if not replTypeIDs:
return () return ()
# But as these replacements were generated with only item group and item skill # As replacements were generated without keeping track which items were published,
# requirements in mind, they sometimes include stuff we do not want to include. # filter them out here
# So here we also filter by variation group (implementing it during database items = []
# generation is not trivial and here it can be customized by overrides) for typeID in replTypeIDs:
variationItems = self.getVariationsByItems([item]) item = self.getItem(typeID)
replacementItems = {i for i in variationItems if i.ID in replTypeIDs} if not item:
return replacementItems continue
if self.getPublicityByItem(item):
items.append(item)
return items