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})
if not replTypeIDs:
return ()
# But as these replacements were generated with only item group and item skill
# requirements in mind, they sometimes include stuff we do not want to include.
# So here we also filter by variation group (implementing it during database
# generation is not trivial and here it can be customized by overrides)
variationItems = self.getVariationsByItems([item])
replacementItems = {i for i in variationItems if i.ID in replTypeIDs}
return replacementItems
# As replacements were generated without keeping track which items were published,
# filter them out here
items = []
for typeID in replTypeIDs:
item = self.getItem(typeID)
if not item:
continue
if self.getPublicityByItem(item):
items.append(item)
return items