本文整理汇总了Python中toontown.fishing.FishGlobals.getTotalNumFish方法的典型用法代码示例。如果您正苦于以下问题:Python FishGlobals.getTotalNumFish方法的具体用法?Python FishGlobals.getTotalNumFish怎么用?Python FishGlobals.getTotalNumFish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.fishing.FishGlobals
的用法示例。
在下文中一共展示了FishGlobals.getTotalNumFish方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: completeSale
# 需要导入模块: from toontown.fishing import FishGlobals [as 别名]
# 或者: from toontown.fishing.FishGlobals import getTotalNumFish [as 别名]
def completeSale(self, sell):
avId = self.air.getAvatarIdFromSender()
if self.busy != avId:
self.air.writeServerEvent('suspicious', avId=avId, issue='DistributedNPCFishermanAI.completeSale busy with %s' % self.busy)
self.notify.warning('somebody called setMovieDone that I was not busy with! avId: %s' % avId)
return
if sell:
av = simbase.air.doId2do.get(avId)
if av:
#maybe: recreate Disney-style fishManager that does the above code?
trophyResult = self.air.fishManager.creditFishTank(av)
if trophyResult:
movieType = NPCToons.SELL_MOVIE_TROPHY
extraArgs = [len(av.fishCollection), FishGlobals.getTotalNumFish()]
else:
movieType = NPCToons.SELL_MOVIE_COMPLETE
extraArgs = []
self.d_setMovie(avId, movieType, extraArgs)
else:
av = simbase.air.doId2do.get(avId)
if av:
self.d_setMovie(avId, NPCToons.SELL_MOVIE_NOFISH)
self.sendClearMovie(None)
return
示例2: fishSold
# 需要导入模块: from toontown.fishing import FishGlobals [as 别名]
# 或者: from toontown.fishing.FishGlobals import getTotalNumFish [as 别名]
def fishSold(self):
avId = self.air.getAvatarIdFromSender()
if self.busy != avId:
self.air.writeServerEvent('suspicious', avId=avId, issue='DistributedNPCPetshopAI.fishSold busy with %s' % self.busy)
self.notify.warning('somebody called fishSold that I was not busy with! avId: %s' % avId)
return
av = simbase.air.doId2do.get(avId)
if av:
trophyResult = self.air.fishManager.creditFishTank(av)
if trophyResult:
movieType = NPCToons.SELL_MOVIE_TROPHY
extraArgs = [len(av.fishCollection), FishGlobals.getTotalNumFish()]
else:
movieType = NPCToons.SELL_MOVIE_COMPLETE
extraArgs = []
self.d_setMovie(avId, movieType, extraArgs)
self.transactionType = 'fish'
self.sendClearMovie(None)
示例3: __showSellFishConfirmDialog
# 需要导入模块: from toontown.fishing import FishGlobals [as 别名]
# 或者: from toontown.fishing.FishGlobals import getTotalNumFish [as 别名]
def __showSellFishConfirmDialog(self, numFishCaught):
self.__makeGui()
msg = TTLocalizer.STOREOWNER_TROPHY % (numFishCaught, FishGlobals.getTotalNumFish())
self.sellFishConfirmDialog.setMessage(msg)
self.sellFishConfirmDialog.show()
示例4: updatePage
# 需要导入模块: from toontown.fishing import FishGlobals [as 别名]
# 或者: from toontown.fishing.FishGlobals import getTotalNumFish [as 别名]
def updatePage(self):
if hasattr(self, 'collectedTotal'):
self.collectedTotal['text'] = TTLocalizer.FishPageCollectedTotal % (len(base.localAvatar.fishCollection), FishGlobals.getTotalNumFish())
if hasattr(self, 'rod'):
rod = base.localAvatar.fishingRod
rodName = TTLocalizer.FishingRodNameDict[rod]
rodWeightRange = FishGlobals.getRodWeightRange(rod)
self.rod['text'] = TTLocalizer.FishPageRodInfo % (rodName, rodWeightRange[0], rodWeightRange[1])
if self.mode == FishPage_Tank:
if hasattr(self, 'picker'):
newTankFish = base.localAvatar.fishTank.getFish()
self.picker.update(newTankFish)
elif self.mode == FishPage_Collection:
if hasattr(self, 'browser'):
self.browser.update()
elif self.mode == FishPage_Trophy:
if hasattr(self, 'trophies'):
for trophy in self.trophies:
trophy.setLevel(-1)
for trophyId in base.localAvatar.getFishingTrophies():
self.trophies[trophyId].setLevel(trophyId)
示例5: completeFishSale
# 需要导入模块: from toontown.fishing import FishGlobals [as 别名]
# 或者: from toontown.fishing.FishGlobals import getTotalNumFish [as 别名]
def completeFishSale(self):
avId = self.air.getAvatarIdFromSender()
av = self.air.doId2do.get(avId)
if not av:
return
if self.air.fishManager.creditFishTank(av):
self.sendUpdateToAvatarId(avId, 'thankSeller', [ToontownGlobals.FISHSALE_TROPHY, len(av.fishCollection), FishGlobals.getTotalNumFish()])
else:
self.sendUpdateToAvatarId(avId, 'thankSeller', [ToontownGlobals.FISHSALE_COMPLETE, 0, 0])