示例#1
0
 def __isAchieveValid(self, block, name):
     return (
         block,
         name) in self.__acceptableAchieves or makeAchievesStorageName(
             block
         ) in self.__acceptableAchieves and name in self.__dossier.getBlock(
             block)
示例#2
0
def _buildComLayoutSet(dossierType, comLayout):
    global _EXCLUDED_ACHIEVES
    result = set()
    for layout in comLayout:
        if hasattr(layout, 'recordsLayout'):
            result.update(set(((layout.name, r) for r in layout.recordsLayout)))
        result.add(achievements.makeAchievesStorageName(layout.name))

    for dt in (_COMMON_DOSSIERS_TYPE, dossierType):
        result -= set(_EXCLUDED_ACHIEVES[dt])
        result |= set(_CUSTOM_ACHIEVES[dt])

    return result
示例#3
0
def _buildComLayoutSet(dossierType, comLayout):
    global _EXCLUDED_ACHIEVES
    result = set()
    for layout in comLayout:
        if hasattr(layout, 'recordsLayout'):
            result.update(set(((layout.name, r) for r in layout.recordsLayout)))
        else:
            result.add(achievements.makeAchievesStorageName(layout.name))

    for dt in (_COMMON_DOSSIERS_TYPE, dossierType):
        result -= set(_EXCLUDED_ACHIEVES[dt])
        result |= set(_CUSTOM_ACHIEVES[dt])

    return result
示例#4
0
 def __getPredefinedValue(self, getter):
     value = getter(self.getRecordName())
     if value is None:
         value = getter(achievements.makeAchievesStorageName(self._block))
     return value
示例#5
0
 def __isAchieveValid(self, block, name):
     return (block, name) in self.__acceptableAchieves or makeAchievesStorageName(block) in self.__acceptableAchieves and name in self.__dossier.getBlock(block)
 def __getPredefinedValue(self, getter):
     value = getter(self.getRecordName())
     if value is None:
         value = getter(achievements.makeAchievesStorageName(self._block))
     return value