def requestTeleport(self, hoodId, zoneId, shardId, avId):
     if avId > 0:
         teleportNotify.debug('requestTeleport%s' % ((hoodId,
           zoneId,
           shardId,
           avId),))
     if localAvatar.hasActiveBoardingGroup():
         if avId > 0:
             teleportNotify.debug('requestTeleport: has active boarding group')
         rejectText = TTLocalizer.BoardingCannotLeaveZone
         localAvatar.elevatorNotifier.showMe(rejectText)
         return
     loaderId = ZoneUtil.getBranchLoaderName(zoneId)
     whereId = ZoneUtil.getToonWhereName(zoneId)
     if hoodId == ToontownGlobals.MyEstate:
         loaderId = 'safeZoneLoader'
         whereId = 'estate'
     if hoodId == ToontownGlobals.PartyHood:
         loaderId = 'safeZoneLoader'
         whereId = 'party'
     self.requestLeave({'loader': loaderId,
      'where': whereId,
      'how': 'teleportIn',
      'hoodId': hoodId,
      'zoneId': zoneId,
      'shardId': shardId,
      'avId': avId})
Example #2
0
 def requestTeleport(self, hoodId, zoneId, shardId, avId):
     if avId > 0:
         teleportNotify.debug('requestTeleport%s' %
                              ((hoodId, zoneId, shardId, avId), ))
     if localAvatar.hasActiveBoardingGroup():
         if avId > 0:
             teleportNotify.debug(
                 'requestTeleport: has active boarding group')
         rejectText = TTLocalizer.BoardingCannotLeaveZone
         localAvatar.elevatorNotifier.showMe(rejectText)
         return
     loaderId = ZoneUtil.getBranchLoaderName(zoneId)
     whereId = ZoneUtil.getToonWhereName(zoneId)
     if hoodId == ToontownGlobals.MyEstate:
         loaderId = 'safeZoneLoader'
         whereId = 'estate'
     if hoodId == ToontownGlobals.PartyHood:
         loaderId = 'safeZoneLoader'
         whereId = 'party'
     self.requestLeave({
         'loader': loaderId,
         'where': whereId,
         'how': 'teleportIn',
         'hoodId': hoodId,
         'zoneId': zoneId,
         'shardId': shardId,
         'avId': avId
     })
    def d_teleportResponse(self, avId, available, shardId, hoodId, zoneId, sendToId):
        teleportNotify.debug('sending teleportResponse%s' % ((avId, available,
            shardId, hoodId, zoneId, sendToId),)
        )

        base.cr.ttcyFriendsManager.d_teleportResponse(sendToId, available,
            shardId, hoodId, zoneId
        )
Example #4
0
    def d_teleportResponse(self, avId, available, shardId, hoodId, zoneId,
                           sendToId):
        teleportNotify.debug(
            'sending teleportResponse%s' %
            ((avId, available, shardId, hoodId, zoneId, sendToId), ))

        base.cr.ttcyFriendsManager.d_teleportResponse(sendToId, available,
                                                      shardId, hoodId, zoneId)
    def teleportGiveup(self, requesterId):
        teleportNotify.debug('received teleportGiveup(%s)' % (requesterId,))
        avatar = base.cr.identifyAvatar(requesterId)

        if not self._isValidWhisperSource(avatar):
            self.notify.warning('teleportGiveup from non-toon %s' % requesterId)
            return

        if avatar is not None:
            self.setSystemMessage(requesterId,
                OTPLocalizer.WhisperGiveupVisit % avatar.getName()
            )
Example #6
0
    def teleportGiveup(self, requesterId):
        teleportNotify.debug('received teleportGiveup(%s)' % (requesterId, ))
        avatar = base.cr.identifyAvatar(requesterId)

        if not self._isValidWhisperSource(avatar):
            self.notify.warning('teleportGiveup from non-toon %s' %
                                requesterId)
            return

        if avatar is not None:
            self.setSystemMessage(
                requesterId,
                OTPLocalizer.WhisperGiveupVisit % avatar.getName())
Example #7
0
 def __teleportResponse(self, avId, available, shardId, hoodId, zoneId):
     teleportNotify.debug('__teleportResponse%s' % ((avId,
       available,
       shardId,
       hoodId,
       zoneId),))
     if avId != self.avId:
         return
     if available == 0:
         teleportNotify.debug('__teleportResponse: not available')
         self.fsm.request('notAvailable')
     elif available == 2:
         teleportNotify.debug('__teleportResponse: ignored')
         self.fsm.request('ignored')
     elif shardId != base.localAvatar.defaultShard:
         teleportNotify.debug('__teleportResponse: otherShard')
         self.fsm.request('otherShard', [shardId, hoodId, zoneId])
     else:
         teleportNotify.debug('__teleportResponse: teleport')
         self.fsm.request('teleport', [shardId, hoodId, zoneId])
Example #8
0
 def enterTeleport(self, shardId, hoodId, zoneId):
     shardName = base.cr.getShardName(shardId)
     if shardName is None:
         shardName = 'unknown'
     hoodsVisited = base.localAvatar.hoodsVisited
     canonicalHoodId = ZoneUtil.getCanonicalZoneId(hoodId)
     if hoodId == ToontownGlobals.MyEstate:
         teleportNotify.debug('enterTeleport: estate')
         if shardId == base.localAvatar.defaultShard:
             shardId = None
         place = base.cr.playGame.getPlace()
         place.requestTeleport(hoodId, zoneId, shardId, self.avId)
         unloadTeleportPanel()
     elif canonicalHoodId not in hoodsVisited + ToontownGlobals.HoodsAlwaysVisited:
         teleportNotify.debug('enterTeleport: unknownHood')
         self.fsm.request('unknownHood', [hoodId])
     else:
         if shardId == base.localAvatar.defaultShard:
             shardId = None
         teleportNotify.debug('enterTeleport: requesting teleport')
         place = base.cr.playGame.getPlace()
         place.requestTeleport(hoodId, zoneId, shardId, self.avId)
         unloadTeleportPanel()
     return
    def d_teleportGiveup(self, requesterId, sendToId):
        teleportNotify.debug('sending teleportGiveup(%s) to %s' % (requesterId, sendToId))

        base.cr.ttcyFriendsManager.d_teleportGiveup(sendToId)
    def teleportResponse(self, avId, available, shardId, hoodId, zoneId):
        teleportNotify.debug('received teleportResponse%s' % ((avId, available,
            shardId, hoodId, zoneId),)
        )

        messenger.send('teleportResponse', [avId, available, shardId, hoodId, zoneId])
    def d_teleportGiveup(self, requesterId):
        teleportNotify.debug('sending d_teleportGiveup(%s)' % (requesterId,))

        base.cr.ttcyFriendsManager.d_teleportGiveup(self.doId)
Example #12
0
 def teleportInDone(self):
     if hasattr(self, 'fsm'):
         teleportNotify.debug('teleportInDone: %s' % self.nextState)
         self.fsm.request(self.nextState, [1])
Example #13
0
    def d_teleportGiveup(self, requesterId):
        teleportNotify.debug('sending d_teleportGiveup(%s)' % (requesterId, ))

        base.cr.ttcyFriendsManager.d_teleportGiveup(self.doId)
Example #14
0
    def d_teleportGiveup(self, requesterId, sendToId):
        teleportNotify.debug('sending teleportGiveup(%s) to %s' %
                             (requesterId, sendToId))

        base.cr.ttcyFriendsManager.d_teleportGiveup(sendToId)
Example #15
0
    def teleportResponse(self, avId, available, shardId, hoodId, zoneId):
        teleportNotify.debug('received teleportResponse%s' %
                             ((avId, available, shardId, hoodId, zoneId), ))

        messenger.send('teleportResponse',
                       [avId, available, shardId, hoodId, zoneId])
 def teleportInDone(self):
     if hasattr(self, 'fsm'):
         teleportNotify.debug('teleportInDone: %s' % self.nextState)
         self.fsm.request(self.nextState, [1])