Beispiel #1
0
    def handleEnterTrolleySphere(self, collEntry):
        if config.GetBool('want-doomsday', False):
            base.localAvatar.disableAvatarControls()
            self.confirm = TTDialog.TTGlobalDialog(
                doneEvent='confirmDone',
                message=SafezoneInvasionGlobals.LeaveToontownCentralAlert,
                style=TTDialog.Acknowledge)
            self.confirm.show()
            self.accept('confirmDone', self.handleConfirm)
            return

        self.notify.debug('Entering Trolley Sphere....')
        if base.localAvatar.getPos(render).getZ() < self.trolleyCar.getPos(
                render).getZ():
            return
        if self.allowedToEnter():
            self.loader.place.detectedTrolleyCollision()
        else:
            place = base.cr.playGame.getPlace()
            if place:
                place.fsm.request('stopped')
            self.dialog = TeaserPanel.TeaserPanel(pageName='minigames',
                                                  doneFunc=self.handleOkTeaser)
Beispiel #2
0
 def enterDoor(self):
     if base.config.GetBool('want-doomsday', False):
         base.localAvatar.disableAvatarControls()
         self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message=SafezoneInvasionGlobals.LeaveToontownCentralAlert, style=TTDialog.Acknowledge)
         self.confirm.show()
         self.accept('confirmDone', self.handleConfirm)
         return
     if base.localAvatar.cameraFollow == 68:
         base.localAvatar.disableAvatarControls()
         self.confirm = TTDialog.TTGlobalDialog(doneEvent='confirmDone', message="You can't run away from this robot!", style=TTDialog.Acknowledge)
         self.confirm.show()
         self.accept('confirmDone', self.handleConfirm)
         return
     if base.cr.currentEpisode == 'gyro_tale':
         if ZoneUtil.getHoodId(self.zoneId) == ToontownGlobals.OldDaisyGardens and 'toon_landmark_DG_E1' not in self.getBuilding().getName():
             return
     if self.allowedToEnter():
         messenger.send('DistributedDoor_doorTrigger')
         self.sendUpdate('requestEnter')
     else:
         place = base.cr.playGame.getPlace()
         if place:
             place.fsm.request('stopped')
         self.dialog = TeaserPanel.TeaserPanel(pageName='otherHoods', doneFunc=self.handleOkTeaser)
Beispiel #3
0
 def __handleTrialer(self):
     TeaserPanel.TeaserPanel(pageName='sixToons')
 def __restrictForward(self):
     TeaserPanel.TeaserPanel(pageName='species')
 def enterUnpaidChatWarning(self):
     self.forceHidePayButton = False
     if base.cr.productName in ['DisneyOnline-UK', 'JP', 'DE', 'BR', 'FR']:
         directFrameText = OTPLocalizer.PaidParentPasswordUKWarning
         payButtonText = OTPLocalizer.PaidParentPasswordUKWarningSet
         directButtonText = OTPLocalizer.PaidParentPasswordUKWarningContinue
     else:
         directFrameText = OTPLocalizer.PaidNoParentPasswordWarning
         payButtonText = OTPLocalizer.PaidNoParentPasswordWarningSet
         directButtonText = OTPLocalizer.PaidNoParentPasswordWarningContinue
         if 'QuickLauncher' not in str(
                 base.cr.launcher.__class__) and not base.cr.isPaid():
             directFrameText = OTPLocalizer.UnpaidNoParentPasswordWarning
             self.forceHidePayButton = True
     if self.unpaidChatWarning == None:
         guiButton = loader.loadModel('phase_3/models/gui/quit_button')
         buttonImage = (guiButton.find('**/QuitBtn_UP'),
                        guiButton.find('**/QuitBtn_DN'),
                        guiButton.find('**/QuitBtn_RLVR'))
         self.unpaidChatWarning = DirectFrame(
             parent=aspect2dp,
             pos=(0.0, 0.1, 0.4),
             relief=None,
             image=DGG.getDefaultDialogGeom(),
             image_color=OTPGlobals.GlobalDialogColor,
             image_scale=(1.2, 1.0, 0.8),
             text=directFrameText,
             text_wordwrap=TTLocalizer.TCMunpaidChatWarningWordwrap,
             text_scale=TTLocalizer.TCMunpaidChatWarning,
             text_pos=TTLocalizer.TCMunpaidChatWarningPos,
             textMayChange=0)
         self.payButton = DirectButton(
             self.unpaidChatWarning,
             image=buttonImage,
             relief=None,
             text=payButtonText,
             image_scale=(1.75, 1, 1.15),
             text_scale=TTLocalizer.TCMpayButton,
             text_pos=(0, -0.02),
             textMayChange=0,
             pos=TTLocalizer.TCMpayButtonPos,
             command=self.__handleUnpaidChatWarningPay)
         DirectButton(self.unpaidChatWarning,
                      image=buttonImage,
                      relief=None,
                      text=directButtonText,
                      textMayChange=0,
                      image_scale=(1.75, 1, 1.15),
                      text_scale=0.06,
                      text_pos=(0, -0.02),
                      pos=TTLocalizer.TCMdirectButtonTextPos,
                      command=self.__handleUnpaidChatWarningContinue)
         guiButton.removeNode()
     if base.localAvatar.cantLeaveGame or self.forceHidePayButton:
         self.payButton.hide()
     else:
         self.payButton.show()
     if base.cr.productName not in ['ES', 'JP', 'DE', 'BR', 'FR']:
         self.unpaidChatWarning.show()
     else:
         place = base.cr.playGame.getPlace()
         if place:
             place.fsm.request('stopped')
         self.teaser = TeaserPanel.TeaserPanel(
             'secretChat', self.__handleUnpaidChatWarningDone)
         if base.localAvatar.inTutorial:
             self.teaser.hidePay()
     normObs, scObs = self.isObscured()
     if not scObs:
         self.scButton.show()
     if not normObs:
         self.normalButton.show()
     return
 def _AvatarChoice__handleTrialer(self):
     TeaserPanel.TeaserPanel(pageName='sixToons')