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


Python ZoneUtil.getHoodId方法代码示例

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


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

示例1: enteringARace

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def enteringARace(self, status):
     if not status['where'] == 'racetrack':
         return 0
     if ZoneUtil.isDynamicZone(status['zoneId']):
         return status['hoodId'] == self.hood.hoodId
     else:
         return ZoneUtil.getHoodId(status['zoneId']) == self.hood.hoodId
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:9,代码来源:GSSafeZoneLoader.py

示例2: handleStageWinEvent

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
    def handleStageWinEvent(self):
        StageInterior.notify.debug("handleStageWinEvent")

        if base.cr.playGame.getPlace().fsm.getCurrentState().getName() == "died":
            return

        self.stageDefeated = 1

        if 1:
            zoneId = ZoneUtil.getHoodId(self.zoneId)
        else:
            zoneId = ZoneUtil.getSafeZoneId(base.localAvatar.defaultZone)

        self.fsm.request(
            "teleportOut",
            [
                {
                    "loader": ZoneUtil.getLoaderName(zoneId),
                    "where": ZoneUtil.getToonWhereName(zoneId),
                    "how": "teleportIn",
                    "hoodId": zoneId,
                    "zoneId": zoneId,
                    "shardId": None,
                    "avId": -1,
                }
            ],
        )
开发者ID:GangStarrG,项目名称:src,代码行数:29,代码来源:StageInterior.py

示例3: enteringAGolfCourse

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def enteringAGolfCourse(self, status):
     if not status['where'] == 'golfcourse':
         return 0
     if ZoneUtil.isDynamicZone(status['zoneId']):
         return status['hoodId'] == self.hood.hoodId
     else:
         return ZoneUtil.getHoodId(status['zoneId']) == self.hood.hoodId
开发者ID:nate97,项目名称:src,代码行数:9,代码来源:OZSafeZoneLoader.py

示例4: doPostAnnounceGenerate

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
    def doPostAnnounceGenerate(self):
        flatDoorTypes = [DoorTypes.INT_STANDARD, DoorTypes.INT_HQ]
        if self.doorType in flatDoorTypes:
            self.bHasFlat = True
        else:
            self.bHasFlat = not self.findDoorNode('door*flat', True).isEmpty()
        self.hideDoorParts()
        self.setTriggerName()

        # Check if we are dealing with a DDL HQ door...
        if self.doorType == DoorTypes.EXT_HQ and \
           ZoneUtil.getHoodId(self.zoneId) == ToontownGlobals.DonaldsDreamland:

            # Get the doorTrigger...
            building = self.getBuilding()
            doorTrigger = building.find('**/%s' % self.getTriggerName())

            # Check if the doorTrigger hasn't been 'fixed' already...
            if not doorTrigger.getTag('fixed'):

                # Reposition the doorTrigger based on its index...
                if self.doorIndex == 0:
                    doorTrigger.setY(doorTrigger, 0.25)
                else:
                    doorTrigger.setY(doorTrigger, -0.25)

                # We are done :) Tag the door as fixed.
                doorTrigger.setTag('fixed', 'true')

        self.accept(self.getEnterTriggerEvent(), self.doorTrigger)
        self.acceptOnce('clearOutToonInterior', self.doorTrigger)
        self.setupNametag()
开发者ID:CalebSmith376,项目名称:src,代码行数:34,代码来源:DistributedDoor.py

示例5: load

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def load(self, zoneId):
     self.zoneId = zoneId
     self.parentFSMState.addChild(self.fsm)
     self.loadBattleAnims()
     self.branchZone = ZoneUtil.getBranchZone(zoneId)
     self.canonicalBranchZone = ZoneUtil.getCanonicalBranchZone(zoneId)
     self.music = base.loadMusic(self.musicFile)
     self.activityMusic = base.loadMusic(self.activityMusicFile)
     self.battleMusic = base.loadMusic(self.zone2music.get(ZoneUtil.getHoodId(zoneId), 'phase_9/audio/bgm/encntr_suit_ttc.ogg'))#'phase_3.5/audio/bgm/encntr_general_bg.ogg'))
     self.townBattle = TownBattle.TownBattle(self.townBattleDoneEvent)
     self.townBattle.load()
开发者ID:CalebSmith376,项目名称:src,代码行数:13,代码来源:TownLoader.py

示例6: getRequestStatus

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def getRequestStatus(self):
     zoneId = self.otherZoneId
     request = {'loader': ZoneUtil.getBranchLoaderName(zoneId),
      'where': ZoneUtil.getToonWhereName(zoneId),
      'how': 'doorIn',
      'hoodId': ZoneUtil.getHoodId(zoneId),
      'zoneId': zoneId,
      'shardId': None,
      'avId': -1,
      'allowRedirect': 0,
      'doorDoId': self.otherDoId}
     return request
开发者ID:Teku16,项目名称:MikeyTheRepository,代码行数:14,代码来源:DistributedDoor.py

示例7: enterReward

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def enterReward(self, ts = 0):
     base.localAvatar.b_setParent(ToontownGlobals.SPHidden)
     request = {'loader': ZoneUtil.getBranchLoaderName(self.extZoneId),
      'where': ZoneUtil.getToonWhereName(self.extZoneId),
      'how': 'elevatorIn',
      'hoodId': ZoneUtil.getHoodId(self.extZoneId),
      'zoneId': self.extZoneId,
      'shardId': None,
      'avId': -1,
      'bldgDoId': self.distBldgDoId}
     messenger.send('DSIDoneEvent', [request])
     return
开发者ID:MasterLoopyBM,项目名称:c0d3,代码行数:14,代码来源:DistributedSuitInterior.py

示例8: __doorsClosed

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def __doorsClosed(self, zoneId):
     if self.localToonOnBoard:
         hoodId = ZoneUtil.getHoodId(zoneId)
         loader, where = self._getDoorsClosedInfo()
         doneStatus = {'loader': loader,
          'where': where,
          'hoodId': hoodId,
          'zoneId': zoneId,
          'shardId': None}
         elevator = self.elevatorFSM
         del self.elevatorFSM
         elevator.signalDone(doneStatus)
     return
开发者ID:Teku16,项目名称:MikeyTheRepository,代码行数:15,代码来源:DistributedElevator.py

示例9: __doorsClosed

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def __doorsClosed(self, zoneId):
     if self.localToonOnBoard:
         hoodId = ZoneUtil.getHoodId(zoneId)
         loader, where = self._getDoorsClosedInfo()
         doneStatus = {'loader': loader,
          'where': where,
          'hoodId': hoodId,
          'zoneId': zoneId,
          'shardId': None}
         elevator = self.elevatorFSM
         del self.elevatorFSM
         elevator.signalDone(doneStatus)
         base.camLens.setMinFov(ToontownGlobals.CBElevatorFov/(4./3.))
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:15,代码来源:DistributedElevator.py

示例10: enterReward

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def enterReward(self, ts=0):
     base.localAvatar.b_setParent(ToontownGlobals.SPHidden)
     request = {
         "loader": ZoneUtil.getBranchLoaderName(self.extZoneId),
         "where": ZoneUtil.getToonWhereName(self.extZoneId),
         "how": "elevatorIn",
         "hoodId": ZoneUtil.getHoodId(self.extZoneId),
         "zoneId": self.extZoneId,
         "shardId": None,
         "avId": base.localAvatar.doId,
         "bldgDoId": self.distBldgDoId,
     }
     messenger.send("DSIDoneEvent", [request])
     return
开发者ID:vincent15k,项目名称:Toontown-House,代码行数:16,代码来源:DistributedSuitInterior.py

示例11: handleMintWinEvent

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def handleMintWinEvent(self):
     MintInterior.notify.debug('handleMintWinEvent')
     if base.cr.playGame.getPlace().fsm.getCurrentState().getName() == 'died':
         return
     self.mintDefeated = 1
     if 1:
         zoneId = ZoneUtil.getHoodId(self.zoneId)
     else:
         zoneId = ZoneUtil.getSafeZoneId(base.localAvatar.defaultZone)
     self.fsm.request('teleportOut', [{'loader': ZoneUtil.getLoaderName(zoneId),
                                      'where': ZoneUtil.getToonWhereName(zoneId),
                                      'how': 'teleportIn',
                                      'hoodId': zoneId,
                                      'zoneId': zoneId,
                                      'shardId': None,
                                      'avId': -1}])
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:18,代码来源:MintInterior.py

示例12: exitCogdoBuilding

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def exitCogdoBuilding(self):
     if base.localAvatar.hp < 0:
         return
     base.localAvatar.b_setParent(ToontownGlobals.SPHidden)
     request = {
         "loader": ZoneUtil.getBranchLoaderName(self.extZoneId),
         "where": ZoneUtil.getToonWhereName(self.extZoneId),
         "how": "elevatorIn",
         "hoodId": ZoneUtil.getHoodId(self.extZoneId),
         "zoneId": self.extZoneId,
         "shardId": None,
         "avId": -1,
         "bldgDoId": self.distBldgDoId,
     }
     messenger.send("DSIDoneEvent", [request])
     return
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:18,代码来源:DistributedCogdoInterior.py

示例13: __doorsClosed

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def __doorsClosed(self, zoneId):
     if self.localToonOnBoard:
         self.localAvatar.stopGlitchKiller()
         hoodId = ZoneUtil.getHoodId(zoneId)
         loader = 'suitInterior'
         where = 'suitInterior'
         if base.cr.wantCogdominiums:
             loader = 'cogdoInterior'
             where = 'cogdoInterior'
         doneStatus = {'loader': loader,
          'where': where,
          'hoodId': hoodId,
          'zoneId': zoneId,
          'shardId': None}
         elevator = self.elevatorFSM
         del self.elevatorFSM
         elevator.signalDone(doneStatus)
     return
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:20,代码来源:DistributedElevatorFSM.py

示例14: doPostAnnounceGenerate

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
    def doPostAnnounceGenerate(self):
        flatDoorTypes = [DoorTypes.INT_STANDARD, DoorTypes.INT_HQ]
        if self.doorType in flatDoorTypes:
            self.bHasFlat = True
        else:
            self.bHasFlat = not self.findDoorNode('door*flat', True).isEmpty()
        self.hideDoorParts()
        self.setTriggerName()

        if self.doorType == DoorTypes.EXT_HQ and ZoneUtil.getHoodId(self.zoneId) == ToontownGlobals.DonaldsDreamland:
            building = self.getBuilding()
            doorTrigger = building.find('**/%s' % self.getTriggerName())

            if not doorTrigger.getTag('fixed'):
                doorTrigger.setY(doorTrigger, 0.25 if not self.doorIndex else -0.25)
                doorTrigger.setTag('fixed', 'true')

        self.accept(self.getEnterTriggerEvent(), self.doorTrigger)
        self.acceptOnce('clearOutToonInterior', self.doorTrigger)
        self.setupNametag()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:22,代码来源:DistributedDoor.py

示例15: isInThisHq

# 需要导入模块: from toontown.hood import ZoneUtil [as 别名]
# 或者: from toontown.hood.ZoneUtil import getHoodId [as 别名]
 def isInThisHq(self, status):
     if ZoneUtil.isDynamicZone(status['zoneId']):
         return status['hoodId'] == self.hood.hoodId
     else:
         return ZoneUtil.getHoodId(status['zoneId']) == self.hood.hoodId
开发者ID:gamerdave54321,项目名称:Toontown-House-Code,代码行数:7,代码来源:CogHQLoader.py


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