示例#1
0
文件: efs.py 项目: bsmr-eve/Pyfa
 def getT2ItemsWhere(additionalFilter, mustBeOffensive=False, category="Module"):
     # Used to obtain a smaller subset of items while still containing examples of each group.
     T2_META_LEVEL = 5
     metaLevelAttrID = getAttributeInfo("metaLevel").attributeID
     categoryID = getCategory(category).categoryID
     result = gamedata_session.query(Item).join(ItemEffect, Group, Attribute).\
               filter(
                   additionalFilter,
                   Attribute.attributeID == metaLevelAttrID,
                   Attribute.value == T2_META_LEVEL,
                   Group.categoryID == categoryID,
               ).all()
     if mustBeOffensive:
         result = filter(lambda t: t.offensive is True, result)
     return list(result)
示例#2
0
文件: efs.py 项目: juliusbentz/Pyfa
 def getT2ItemsWhere(additionalFilter, mustBeOffensive=False, category="Module"):
     # Used to obtain a smaller subset of items while still containing examples of each group.
     T2_META_LEVEL = 5
     metaLevelAttrID = getAttributeInfo("metaLevel").attributeID
     categoryID = getCategory(category).categoryID
     result = gamedata_session.query(Item).join(ItemEffect, Group, Attribute).\
               filter(
                   additionalFilter,
                   Attribute.attributeID == metaLevelAttrID,
                   Attribute.value == T2_META_LEVEL,
                   Group.categoryID == categoryID,
               ).all()
     if mustBeOffensive:
         result = filter(lambda t: t.offensive is True, result)
     return list(result)