当前位置: 首页>>代码示例>>Python>>正文


Python FishGlobals.getTotalNumFish方法代码示例

本文整理汇总了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
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:27,代码来源:DistributedNPCFishermanAI.py

示例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)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:20,代码来源:DistributedNPCPetclerkAI.py

示例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()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:7,代码来源:DistributedFishingSpot.py

示例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)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:24,代码来源:FishPage.py

示例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])
开发者ID:Kawaiikat14,项目名称:Toontown-2-Revised,代码行数:13,代码来源:DistributedEstateAI.py


注:本文中的toontown.fishing.FishGlobals.getTotalNumFish方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。