def __init__(self, intCompactDescr, count=0, proxy=None, isBoughtForCredits=False): FittingItem.__init__(self, intCompactDescr, proxy, isBoughtForCredits) self._count = count
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
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)
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)