def __init__(self,
              intCompactDescr,
              count=0,
              proxy=None,
              isBoughtForCredits=False):
     FittingItem.__init__(self, intCompactDescr, proxy, isBoughtForCredits)
     self._count = count
示例#2
0
 def __init__(self,
              intCompactDescr,
              count=0,
              defaultCount=0,
              proxy=None,
              isBoughtForCredits=False):
     """
     Ctor.
     
     @param intCompactDescr: item int compact descriptor
     @param count: count of shells in ammo bay
     @param defaultCount: count default shells in ammo bay
     @param proxy: instance of ItemsRequester
     """
     FittingItem.__init__(self, intCompactDescr, proxy, isBoughtForCredits)
     self._count = count
     self._defaultCount = defaultCount
示例#3
0
 def mayInstall(self, vehicle, slotIdx=None):
     installPossible, reason = FittingItem.mayInstall(
         self, vehicle, slotIdx)
     if not installPossible and reason == 'too heavy':
         return (False, 'too heavy chassis')
     return (installPossible, reason)
示例#4
0
 def mayInstall(self, vehicle, slotIdx=None):
     installPossible, reason = FittingItem.mayInstall(self, vehicle)
     if not installPossible and reason == 'not for current vehicle':
         return (False, 'need turret')
     return (installPossible, reason)