def __handleEnterSphere(self, collEntry):
     if self.smoothStarted:
         return
     if base.localAvatar.doId == self.lastAvId and globalClock.getFrameTime() <= self.lastTime + 0.5:
         self.notify.debug('Ignoring duplicate entry for avatar.')
         return
     if not self.enableCatalog:
         FeatureComingSoonDialog.FeatureComingSoonDialog()
     else:
         if self.hasLocalAvatar:
             self.freeAvatar()
         if config.GetBool('want-pets', 1):
             base.localAvatar.lookupPetDNA()
         self.notify.debug('Entering Phone Sphere....')
         taskMgr.remove(self.uniqueName('ringDoLater'))
         self.ignore(self.phoneSphereEnterEvent)
         self.cr.playGame.getPlace().detectedPhoneCollision()
         self.hasLocalAvatar = 1
         self.sendUpdate('avatarEnter', [])
Ejemplo n.º 2
0
 def __init__(self, avatarList, parentFSM, doneEvent):
     self.toonList = {
         i: (i in [x.position for x in avatarList])
         for i in xrange(6)
     }
     self.avatarList = avatarList
     self.selectedToon = 0
     self.doneEvent = doneEvent
     self.jumpIn = None
     if base.showDisclaimer:
         FeatureComingSoonDialog.FeatureComingSoonDialog(
             text=
             "\1textShadow\1Disclaimer:\2\nThis is an ALPHA build of Project Altis! There may be many bugs and crashes! If you encounter any, PLEASE report them to the developers!\nThanks, and enjoy Project Altis!"
         )
     #self.optionsMgr = PickAToonOptions.PickAToonOptions()
     self.optionsMgr = PickAToonOptions.NewPickAToonOptions(
     )  # This is for the revamped options screen
     self.shardPicker = ShardPicker.ShardPicker()
     return
Ejemplo n.º 3
0
 def __typeAName(self):
     if not self.wantTypeAName:
         FeatureComingSoonDialog.FeatureComingSoonDialog(text="That feature is \1textShadow\1coming soon\2! Sorry about that!")
     
     else:
         if base.cr.productName in ['JP',
          'DE',
          'BR',
          'FR']:
             if base.restrictTrialers:
                 if not base.cr.isPaid():
                     dialog = TeaserPanel.TeaserPanel(pageName='typeAName')
                     return
         if self.fsm.getCurrentState().getName() == 'TypeAName':
             self.typeANameButton['text'] = TTLocalizer.TypeANameButton
             self.typeANameButton.wrtReparentTo(self.namePanel, sort=2)
             self.fsm.request('PickAName')
         else:
             self.typeANameButton['text'] = TTLocalizer.PickANameButton
             self.typeANameButton.wrtReparentTo(aspect2d, sort=2)
             self.typeANameButton.show()
             self.fsm.request('TypeAName')
Ejemplo n.º 4
0
    def __init__(self):
        DirectObject.__init__(self)
        base.cr.DMENU_SCREEN = self
        self.seq = None
        base.cr.avChoice = None
        self.allButtons = []
        base.transitions.fadeOut(0)
        base.camera.setPosHpr(Point3(MAIN_POS), VBase3(MAIN_HPR))
        base.transitions.getFadeInIval(1).start()
        if base.showDisclaimer:
            FeatureComingSoonDialog.FeatureComingSoonDialog(
                text=TTLocalizer.PopupAlphaDisclaimer)
        self.background2d = OnscreenImage(
            image='phase_3.5/maps/loading/toon.jpg', parent=render2d)
        self.background2d.setScale(render2d, Vec3(1))
        self.background2d.setBin('background', 1)
        self.background2d.setTransparency(1)
        self.background2d.setColorScale(1, 1, 1, 1)
        self.background = loader.loadModel(
            'phase_3.5/models/modules/tt_m_ara_int_toonhall')
        self.background.reparentTo(render)
        self.background.setPosHpr(-25, 0, 8.1, -95, 0, 0)

        self.surlee = Toon.Toon()
        self.surlee.setName('Doctor Surlee')
        self.surlee.setPickable(0)
        self.surlee.setPlayerType(CCNonPlayer)
        dna = ToonDNA.ToonDNA()
        dna.newToonFromProperties('pls', 'ls', 'l', 'm', 9, 0, 9, 9, 98, 27,
                                  86, 27, 38, 27)
        self.surlee.setDNA(dna)
        self.surlee.loop('scientistGame')
        self.surlee.reparentTo(self.background)
        self.surlee.setPosHpr(13, 24, 0.025, -180, 0, 0)

        self.dimm = Toon.Toon()
        self.dimm.setName('Doctor Dimm')
        self.dimm.setPickable(0)
        self.dimm.setPlayerType(CCNonPlayer)
        dna = ToonDNA.ToonDNA()
        dna.newToonFromProperties('fll', 'ss', 's', 'm', 15, 0, 15, 15, 99, 27,
                                  86, 27, 39, 27)
        self.dimm.setDNA(dna)
        self.dimm.loop('scientistGame')
        self.dimm.reparentTo(self.background)
        self.dimm.setPosHpr(16, 24, 0.025, -180, 0, 0)

        surleeHand = self.surlee.find('**/def_joint_right_hold')
        clipBoard = loader.loadModel(
            'phase_4/models/props/tt_m_prp_acs_clipboard')
        surleeHandNode = surleeHand.attachNewNode('ClipBoard')
        clipBoard.instanceTo(surleeHandNode)
        surleeHandNode.setH(180)
        surleeHandNode.setScale(render, 1.0)
        surleeHandNode.setPos(0, 0, 0.1)

        dimmHand = self.dimm.find('**/def_joint_right_hold')
        sillyReader = loader.loadModel(
            'phase_4/models/props/tt_m_prp_acs_sillyReader')
        dimHandNode = dimmHand.attachNewNode('SillyReader')
        sillyReader.instanceTo(dimHandNode)
        dimHandNode.setH(180)
        dimHandNode.setScale(render, 1.0)
        dimHandNode.setPos(0, 0, 0.1)

        self.sky = loader.loadModel('phase_3.5/models/props/TT_sky')
        SkyUtil.startCloudSky(self)
        base.camera.setPosHpr(MAIN_POS, MAIN_HPR)

        self.logo = OnscreenImage(image=GameLogo, scale=(.5, .5, .25))
        self.logo.reparentTo(aspect2d)
        self.logo.setTransparency(TransparencyAttrib.MAlpha)
        scale = self.logo.getScale()
        self.logo.setPos(0, 0, .6)
        self.logo.setColorScale(Vec4(0, 0, 0, 0))
        fadeInLogo = (LerpColorScaleInterval(self.logo, 1, Vec4(1, 1, 1, 1),
                                             Vec4(1, 1, 1, 0))).start()
        self.releaseNotesBox = None
        self.releaseNotesText = None
        self.createButtons()

        self.fadeOut = None
        self.optionsMgr = PickAToonOptions.NewPickAToonOptions()
        self.quitConfirmation = DMenuQuit.DMenuQuit()
        self.newsMgr = DMenuNewsManager.DMenuNewsManager()

        self.accept('doQuitGame', self.doQuitFunc)
        self.accept('doCancelQuitGame', self.doCancelQuitFunc)
        self.patNode = None

        # TT: We need these to run the Pick A Toon screen
        self.patAvList = base.cr.PAT_AVLIST
        self.patFSM = base.cr.PAT_LOGINFSM
        self.patDoneEvent = base.cr.PAT_DONEEVENT
Ejemplo n.º 5
0
 def __doToggleNewGui(self):
     FeatureComingSoonDialog.FeatureComingSoonDialog()
Ejemplo n.º 6
0
    def __init__(self):
        DirectObject.__init__(self)
        base.cr.DMENU_SCREEN = self
        self.seq = None
        self.isSeqPlaying = False # .isPlaying() doesnt want to work
        base.cr.avChoice = None

        fadeSequence = Sequence(
            Func(base.transitions.fadeOut, .001),
            Wait(.5),
            Func(base.transitions.fadeIn, .5),
            base.camera.posHprInterval(1, Point3(MAIN_POS), VBase3(MAIN_HPR), blendType = 'easeInOut')).start()
        if base.showDisclaimer:
            FeatureComingSoonDialog.FeatureComingSoonDialog(text = '\1textShadow\1Disclaimer:\2\nThis is an ALPHA build of Project Altis! Expect the server to restart a lot, and expect crashes and other bugs. Please report bugs to the team. Thanks, and enjoy Project Altis!')
        self.background2d = OnscreenImage(image = 'phase_3.5/maps/loading/toon.jpg', parent = aspect2d)
        self.background2d.setScale(2, 1, 1)
        self.background2d.setBin('background', 1)
        self.background2d.setTransparency(1)
        self.background2d.setColorScale(1, 1, 1, .2)
        self.background = loader.loadModel('phase_3.5/models/modules/tt_m_ara_int_toonhall')
        self.background.reparentTo(render)
        self.background.setPosHpr(-25, 0, 8.1, -95, 0, 0)
        ropes = loader.loadModel('phase_4/models/modules/tt_m_ara_int_ropes')
        ropes.reparentTo(self.background)
        self.sillyMeter = Actor.Actor('phase_4/models/props/tt_a_ara_ttc_sillyMeter_default', {'arrowTube': 'phase_4/models/props/tt_a_ara_ttc_sillyMeter_arrowFluid',
            'phaseOne': 'phase_4/models/props/tt_a_ara_ttc_sillyMeter_phaseOne',
            'phaseTwo': 'phase_4/models/props/tt_a_ara_ttc_sillyMeter_phaseTwo',
            'phaseThree': 'phase_4/models/props/tt_a_ara_ttc_sillyMeter_phaseThree',
            'phaseFour': 'phase_4/models/props/tt_a_ara_ttc_sillyMeter_phaseFour',
            'phaseFourToFive': 'phase_4/models/props/tt_a_ara_ttc_sillyMeter_phaseFourToFive',
            'phaseFive': 'phase_4/models/props/tt_a_ara_ttc_sillyMeter_phaseFive'})

        self.sillyMeter.reparentTo(self.background)
        self.sillyMeter.makeSubpart('arrow', ['uvj_progressBar*', 'def_springA'])
        self.sillyMeter.makeSubpart('meter', ['def_pivot'], ['uvj_progressBar*', 'def_springA'])
        self.audio3d = Audio3DManager.Audio3DManager(base.sfxManagerList[0], camera)

        self.phase3Sfx = self.audio3d.loadSfx('phase_4/audio/sfx/tt_s_prp_sillyMeterPhaseThree.ogg')
        self.phase3Sfx.setLoop(True)
        self.arrowSfx = self.audio3d.loadSfx('phase_4/audio/sfx/tt_s_prp_sillyMeterArrow.ogg')
        self.arrowSfx.setLoop(False)
        self.phase3Sfx.setVolume(0.2)
        self.arrowSfx.setVolume(0.2)

        self.animSeq = Sequence(Sequence(ActorInterval(self.sillyMeter, 'arrowTube', partName = 'arrow', constrainedLoop = 0, startFrame = 236, endFrame = 247), Func(self.arrowSfx.play)), Parallel(ActorInterval(self.sillyMeter, 'arrowTube', partName = 'arrow', duration = 604800, constrainedLoop = 1, startFrame = 247, endFrame = 276), Sequence(Func(self.phase3Sfx.play), Func(self.audio3d.attachSoundToObject, self.phase3Sfx, self.sillyMeter))))
        self.animSeq.start()
        self.smPhase1 = self.sillyMeter.find('**/stage1')
        self.smPhase1.show()
        self.smPhase2 = self.sillyMeter.find('**/stage2')
        self.smPhase2.hide()
        self.smPhase3 = self.sillyMeter.find('**/stage3')
        self.smPhase3.hide()
        self.smPhase4 = self.sillyMeter.find('**/stage4')
        self.smPhase4.hide()

        thermometerLocator = self.sillyMeter.findAllMatches('**/uvj_progressBar')[1]
        thermometerMesh = self.sillyMeter.find('**/tube')
        thermometerMesh.setTexProjector(thermometerMesh.findTextureStage('default'), thermometerLocator, self.sillyMeter)

        self.sillyMeter.loop('phaseOne', partName = 'meter')
        self.sillyMeter.setBlend(frameBlend = base.wantSmoothAnims)

        self.surlee = Toon.Toon()
        self.surlee.setName('Doctor Surlee')
        self.surlee.setPickable(0)
        self.surlee.setPlayerType(CCNonPlayer)
        dna = ToonDNA.ToonDNA()
        dna.newToonFromProperties('pls', 'ls', 'l', 'm', 9, 0, 9, 9, 98, 27, 86, 27, 38, 27)
        self.surlee.setDNA(dna)
        self.surlee.loop('scientistGame')
        self.surlee.reparentTo(self.background)
        self.surlee.setPosHpr(13, 24, 0.025, -180, 0, 0)

        self.dimm = Toon.Toon()
        self.dimm.setName('Doctor Dimm')
        self.dimm.setPickable(0)
        self.dimm.setPlayerType(CCNonPlayer)
        dna = ToonDNA.ToonDNA()
        dna.newToonFromProperties('fll', 'ss', 's', 'm', 15, 0, 15, 15, 99, 27, 86, 27, 39, 27)
        self.dimm.setDNA(dna)
        self.dimm.loop('scientistGame')
        self.dimm.reparentTo(self.background)
        self.dimm.setPosHpr(16, 24, 0.025, -180, 0, 0)

        surleeHand = self.surlee.find('**/def_joint_right_hold')
        clipBoard = loader.loadModel('phase_4/models/props/tt_m_prp_acs_clipboard')
        surleeHandNode = surleeHand.attachNewNode('ClipBoard')
        clipBoard.instanceTo(surleeHandNode)
        surleeHandNode.setH(180)
        surleeHandNode.setScale(render, 1.0)
        surleeHandNode.setPos(0, 0, 0.1)

        dimmHand = self.dimm.find('**/def_joint_right_hold')
        sillyReader = loader.loadModel('phase_4/models/props/tt_m_prp_acs_sillyReader')
        dimHandNode = dimmHand.attachNewNode('SillyReader')
        sillyReader.instanceTo(dimHandNode)
        dimHandNode.setH(180)
        dimHandNode.setScale(render, 1.0)
        dimHandNode.setPos(0, 0, 0.1)

        self.banana = self.background.find('**/gagBanana')

        self.bananaClicker = CollisionTraverser()
        # self.bananaClicker.showCollisions(render)
        self.collHandlerQueue = CollisionHandlerQueue()

        self.bananaRayNode = CollisionNode('bananaMouseRay')
        self.bananaRayNP = base.camera.attachNewNode(self.bananaRayNode)
        self.bananaRayNode.setIntoCollideMask(BitMask32.bit(0))
        self.bananaRayNode.setFromCollideMask(BitMask32.bit(1))
        self.banana.setCollideMask(BitMask32.bit(1))
        self.ray = CollisionRay()
        self.bananaRayNode.addSolid(self.ray)
        self.bananaClicker.addCollider(self.bananaRayNP, self.collHandlerQueue)
        self.accept('mouse1', self.slipAndSlideOnThisBananaPeelHaHaHa)

        for frame in render.findAllMatches('*/doorFrame*'):
            frame.removeNode()

        self.sky = loader.loadModel('phase_3.5/models/props/TT_sky')
        SkyUtil.startCloudSky(self)
        base.camera.setPosHpr(MAIN_POS, MAIN_HPR)

        self.logo = OnscreenImage(image = GameLogo, scale = (.5, .5, .25))
        self.logo.reparentTo(aspect2d)
        self.logo.setTransparency(TransparencyAttrib.MAlpha)
        scale = self.logo.getScale()
        self.logo.setPos(0, 0, .5)
        self.logo.setColorScale(Vec4(0, 0, 0, 0))
        fadeInLogo = (LerpColorScaleInterval(self.logo, 1, Vec4(1, 1, 1, 1), Vec4(1, 1, 1, 0))).start()

        self.createButtons()

        self.fadeOut = None
        self.optionsMgr = PickAToonOptions.NewPickAToonOptions()
        self.quitConfirmation = DMenuQuit.DMenuQuit()
        self.accept('doQuitGame', self.doQuitFunc)
        self.accept('doCancelQuitGame', self.doCancelQuitFunc)
        self.patNode = None

        if DMENU_GAME == 'Toontown':
            # TT: We need these to run the Pick A Toon screen
            self.patAvList = base.cr.PAT_AVLIST
            self.patFSM = base.cr.PAT_LOGINFSM
            self.patDoneEvent = base.cr.PAT_DONEEVENT
 def acceptItem(self, mailbox, index, callback):
     FeatureComingSoonDialog.FeatureComingSoonDialog(
         'For the new interior to apply, you will need to relog!')
     if hasattr(mailbox, 'mailboxGui') and mailbox.mailboxGui:
         mailbox.acceptItem(self, index, callback)
         mailbox.mailboxGui.justExit()
 def __giftToggle(self):
     messenger.send('wakeup')
     FeatureComingSoonDialog.FeatureComingSoonDialog("Woah! That feature is \n\1textShadow\1coming soon\2! Sorry about that!")
     '''
Ejemplo n.º 9
0
def judgeName(name):
    FeatureComingSoonDialog.FeatureComingSoonDialog()
    #Do name checking here
    #For now, just block every name they try typing in
    return False