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


Python ZoneUtil.isGoofySpeedwayZone方法代码示例

本文整理汇总了Python中src.toontown.hood.ZoneUtil.isGoofySpeedwayZone方法的典型用法代码示例。如果您正苦于以下问题:Python ZoneUtil.isGoofySpeedwayZone方法的具体用法?Python ZoneUtil.isGoofySpeedwayZone怎么用?Python ZoneUtil.isGoofySpeedwayZone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在src.toontown.hood.ZoneUtil的用法示例。


在下文中一共展示了ZoneUtil.isGoofySpeedwayZone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: handleWaitForSetZoneResponse

# 需要导入模块: from src.toontown.hood import ZoneUtil [as 别名]
# 或者: from src.toontown.hood.ZoneUtil import isGoofySpeedwayZone [as 别名]
 def handleWaitForSetZoneResponse(self, requestStatus):
     hoodId = requestStatus['hoodId']
     canonicalHoodId = ZoneUtil.getCanonicalZoneId(hoodId)
     toHoodPhrase = ToontownGlobals.hoodNameMap[canonicalHoodId][0]
     hoodName = ToontownGlobals.hoodNameMap[canonicalHoodId][-1]
     zoneId = requestStatus['zoneId']
     requestStatus['loader'] = 'cogHQLoader' if ZoneUtil.isCogHQZone(hoodId) else requestStatus['loader']
     loaderName = requestStatus['loader']
     avId = requestStatus.get('avId', -1)
     ownerId = requestStatus.get('ownerId', avId)
     if base.config.GetBool('want-qa-regression', 0):
         self.notify.info('QA-REGRESSION: NEIGHBORHOODS: Visit %s' % hoodName)
     count = ToontownGlobals.hoodCountMap[canonicalHoodId]
     if loaderName == 'safeZoneLoader':
         count += ToontownGlobals.safeZoneCountMap[canonicalHoodId]
     elif loaderName == 'townLoader':
         count += ToontownGlobals.townCountMap[canonicalHoodId]
     if not loader.inBulkBlock:
         if hoodId == ToontownGlobals.MyEstate:
             if avId == -1:
                 loader.beginBulkLoad('hood', TTLocalizer.HeadingToYourEstate, count, 1, TTLocalizer.TIP_ESTATE, zoneId)
             else:
                 owner = base.cr.identifyAvatar(ownerId)
                 if owner == None:
                     friend = base.cr.identifyAvatar(avId)
                     if friend != None:
                         avName = friend.getName()
                         loader.beginBulkLoad('hood', TTLocalizer.HeadingToFriend % avName, count, 1, TTLocalizer.TIP_ESTATE, zoneId)
                     else:
                         self.notify.warning("we can't perform this teleport")
                         return
                 else:
                     avName = owner.getName()
                     loader.beginBulkLoad('hood', TTLocalizer.HeadingToEstate % avName, count, 1, TTLocalizer.TIP_ESTATE, zoneId)
         elif ZoneUtil.isCogHQZone(zoneId):
             loader.beginBulkLoad('hood', TTLocalizer.HeadingToHood % {'to': toHoodPhrase,
              'hood': hoodName}, count, 1, TTLocalizer.TIP_COGHQ, zoneId)
         elif ZoneUtil.isGoofySpeedwayZone(zoneId):
             loader.beginBulkLoad('hood', TTLocalizer.HeadingToHood % {'to': toHoodPhrase,
              'hood': hoodName}, count, 1, TTLocalizer.TIP_KARTING, zoneId)
         else:
             loader.beginBulkLoad('hood', TTLocalizer.HeadingToHood % {'to': toHoodPhrase,
              'hood': hoodName}, count, 1, TTLocalizer.TIP_GENERAL, zoneId)
     if hoodId == ToontownGlobals.Tutorial:
         self.loadDnaStoreTutorial()
     else:
         if not hasattr(self, 'dnaStore'):
             self.loadDnaStore()
     hoodClass = self.getHoodClassByNumber(canonicalHoodId)
     self.hood = hoodClass(self.fsm, self.hoodDoneEvent, self.dnaStore, hoodId)
     self.hood.load()
     self.hood.loadLoader(requestStatus)
     if not base.placeBeforeObjects:
         loader.endBulkLoad('hood')
     return
开发者ID:ToontownBattlefront,项目名称:Toontown-Battlefront,代码行数:57,代码来源:PlayGame.py


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