コード例 #1
0
ファイル: equipment_ctrl.py プロジェクト: webiumsk/WOT0.10.0
 def _getEntityUserString(self, entityName, avatar = None):
     extrasDict = avatar_getter.getVehicleExtrasDict(avatar)
     extraName = makeExtraName(entityName)
     if extraName in extrasDict:
         userString = extrasDict[extraName].deviceUserString
     else:
         userString = entityName
     return userString
コード例 #2
0
 def _getEntityUserString(self, entityName, avatar=None):
     extrasDict = avatar_getter.getVehicleExtrasDict(avatar)
     extraName = makeExtraName(entityName)
     if extraName in extrasDict:
         userString = extrasDict[extraName].deviceUserString
     else:
         userString = entityName
     return userString
コード例 #3
0
 def getActivationCode(self, entityName=None, avatar=None):
     activationCode = super(_MedKitItem,
                            self).getActivationCode(entityName, avatar)
     if activationCode is None and avatar_getter.isVehicleStunned(
     ) and self.isReusable:
         extrasDict = avatar_getter.getVehicleExtrasDict(avatar)
         activationCode = (extrasDict[makeExtraName('commander')].index <<
                           16) + self._descriptor.id[1]
     return activationCode
コード例 #4
0
 def getActivationCode(self, entityName = None, avatar = None):
     if not self.isEntityRequired():
         return 65536 + self._descriptor.id[1]
     extrasDict = avatar_getter.getVehicleExtrasDict(avatar)
     if entityName is None:
         return
     extraName = makeExtraName(entityName)
     if extraName not in extrasDict:
         return
     else:
         return (extrasDict[extraName].index << 16) + self._descriptor.id[1]