Esempio n. 1
0
 def _canActivate(self, entityName=None, avatar=None):
     result, error = super(_MedKitItem,
                           self)._canActivate(entityName, avatar)
     return (True, IgnoreEntitySelection(
         '', None)) if not result and type(error) not in (
             NeedEntitySelection, NotApplyingError
         ) and avatar_getter.isVehicleStunned() and self.isReusable else (
             result, error)
Esempio n. 2
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