Esempio n. 1
0
    def EndTransition(self, fromView, toView):
        uicore.animations.MorphScalar(self.loadingText, 'glowExpand', startVal=0.0, endVal=2.0, duration=3.0, curveType=uiconst.ANIM_WAVE, loops=uiconst.ANIM_REPEAT)
        uicore.animations.MorphScalar(self.loadingText, 'opacity', startVal=0.0, endVal=1.0, duration=3.0, curveType=uiconst.ANIM_WAVE, loops=uiconst.ANIM_REPEAT)
        playerEntity = sm.GetService('entityClient').GetPlayerEntity(canBlock=True)
        paperdoll = playerEntity.GetComponent('paperdoll')
        timeOutEnd = blue.os.GetWallclockTime() + PAPERDOLL_TIMEOUT
        loadingFailed = False
        while paperdoll.doll.doll.busyUpdating:
            if blue.os.GetWallclockTime() > timeOutEnd:
                loadingFailed = True
                break
            blue.synchro.Yield()

        if not loadingFailed:
            sm.GetService('sceneManager').EnableIncarnaRendering()
            sm.GetService('cameraClient').EnterWorldspace()
            charControlLayer = sm.GetService('viewState').GetView('station').layer
            uicore.registry.SetFocus(charControlLayer)
            sm.GetService('loading').FadeOut(self.fadeOutTimeMS, opacityStart=1.0)
        self.loadingText.StopAnimations()
        uicore.animations.BlinkOut(self.loadingText, sleep=True)
        blue.statistics.SetTimelineSectionName('done loading')
        uicore.animations.FadeOut(self.fadeLayer, duration=self.fadeOutTimeMS / 1000.0, sleep=True)
        self.fadeLayer.Hide()
        self.fadeLayer.Flush()
        self.fadeLayer.Close()
        del self.fadeLayer
        viewstate.Transition.EndTransition(self, fromView, toView)
        lobby = GetLobbyClass().GetIfOpen()
        if lobby is not None and not lobby.destroyed:
            lobby.UnlockUndockButton()
        return loadingFailed
Esempio n. 2
0
 def OnShipTreeClosed(self):
     self.factionTreesByFactionID = {}
     self.selectedFaction = None
     sm.GetService('audio').SendUIEvent('isis_end')
     lobbyWnd = GetLobbyClass().GetIfOpen()
     if lobbyWnd:
         lobbyWnd.Maximize(animate=False)
Esempio n. 3
0
    def Undock_Thread(self, shipID):
        if not self.exitingstation:
            lobby = GetLobbyClass().GetIfOpen()
            if lobby and not lobby.destroyed:
                lobby.SetUndockProgress(None)
            return
        undockSteps = 3
        undockDelay = 5000
        if session and session.nextSessionChange:
            duration = session.nextSessionChange - blue.os.GetSimTime()
            if duration > 0:
                undockDelay = max(undockDelay,
                                  (duration / const.SEC + 1) * 1000)
        for i in xrange(undockSteps):
            lobby = GetLobbyClass().GetIfOpen()
            if lobby and not lobby.destroyed:
                lobby.SetUndockProgress(i * 1.0 / undockSteps)
            blue.synchro.SleepSim(undockDelay / undockSteps)
            if not self.exitingstation:
                if lobby and not lobby.destroyed:
                    lobby.SetUndockProgress(None)
                return

        lobby = GetLobbyClass().GetIfOpen()
        if lobby and not lobby.destroyed:
            lobby.SetUndockProgress(1)
        self.pastUndockPointOfNoReturn = True
        self.UndockAttempt(shipID)
Esempio n. 4
0
 def MinimizeWindows(self):
     from eve.client.script.ui.shared.dockedUI import GetLobbyClass
     lobbyClass = GetLobbyClass()
     lobby = lobbyClass.GetIfOpen()
     if lobby and not lobby.destroyed and lobby.state != uiconst.UI_HIDDEN and not lobby.IsMinimized(
     ) and not lobby.IsCollapsed():
         lobby.Minimize()
         self.minimizedWindows.append(lobbyClass.default_windowID)
Esempio n. 5
0
 def OnShipTreeOpened(self):
     self.history = HistoryBuffer()
     sm.GetService('skills').GetSkills()
     self.SelectFaction(self.GetDefaultFactionID())
     lobbyWnd = GetLobbyClass().GetIfOpen()
     if lobbyWnd:
         lobbyWnd.Minimize(animate=False)
     sm.GetService('audio').SendUIEvent('isis_start')
     sm.GetService('experimentClientSvc').LogWindowOpenedActions('ShipTree')
Esempio n. 6
0
 def OnCorporationApplicationChanged(self, corpID, applicantID,
                                     applicationID, newApplication):
     self.LogInfo(self.__class__.__name__,
                  'OnCorporationApplicationChanged')
     if self.recruitment is not None:
         self.recruitment.OnCorporationApplicationChanged(
             corpID, applicantID, applicationID, newApplication)
     if applicantID == session.charid and util.IsStation(
             session.locationid):
         from eve.client.script.ui.shared.dockedUI import GetLobbyClass
         lobby = GetLobbyClass().GetIfOpen()
         if lobby:
             lobby.ShowOffices()
Esempio n. 7
0
    def EndTransition(self, fromView, toView):
        sm.GetService('audio').SendUIEvent('transition_pod_reanimate')
        self.notifyContainer.Close()
        sm.GetService('loading').FadeOut(500)
        duration = max(blue.os.desiredSimDilation, 0.3) * 2
        self.AnimateUIIn(duration=duration)
        Transition.EndTransition(self, fromView, toView)
        for notificationTypeID in self.DELAYED_NOTIFICATIONS:
            sm.GetService('notificationSvc').ProcessDelayedNotifications(notificationTypeID)

        from eve.client.script.ui.shared.dockedUI import GetLobbyClass
        lobby = GetLobbyClass().GetIfOpen()
        if lobby:
            lobby.BlinkButton('medical')
Esempio n. 8
0
 def OnOfficeRentalChanged(self, corporationID, officeID, folderID):
     oldOfficeID = None
     if self.itemIDOfficeFolderIDByCorporationID is not None:
         if self.itemIDOfficeFolderIDByCorporationID.has_key(corporationID):
             oldOfficeID = self.itemIDOfficeFolderIDByCorporationID[
                 corporationID].itemID
     if officeID is not None and folderID is not None:
         self.AddOffice(corporationID, officeID, folderID)
     else:
         self.RemoveOffice(corporationID, officeID, folderID)
     from eve.client.script.ui.shared.dockedUI import GetLobbyClass
     lobby = GetLobbyClass().GetIfOpen()
     if lobby:
         lobby.ReloadOfficesIfVisible()
         if officeID is None:
             lobby.LoadButtons()
     if corporationID != eve.session.corpid:
         return
Esempio n. 9
0
 def StartTransition(self, fromView, toView):
     viewstate.Transition.StartTransition(self, fromView, toView)
     viewState = sm.GetService('viewState')
     self.fadeLayer = uiprimitives.Container(name='transition_overlay', parent=viewState.overlayLayerParent, pickState=uiconst.TR2_SPS_OFF, bgColor=util.Color.BLACK, opacity=0.0)
     height = uicore.desktop.height
     width = uicore.desktop.width
     self.loadingText = uicontrols.Label(parent=self.fadeLayer, text=localization.GetByLabel('UI/Worldspaces/Common/Loading'), fontsize=50, align=uiconst.CENTER, top=100, color=util.Color.WHITE, glowFactor=1.0, glowColor=(1.0, 1.0, 1.0, 0.1), uppercase=uiconst.WINHEADERUPPERCASE)
     stationRace = evetypes.GetRaceID(eve.stationItem.stationTypeID)
     backgroundToUse = self.racialLoadingBackgrounds[stationRace]
     uiprimitives.Sprite(name='aura', parent=self.fadeLayer, texturePath=backgroundToUse, align=uiconst.CENTER, width=width, height=height)
     if fromView is not None:
         if getattr(fromView, 'cachedPlayerPos', None) is not None and getattr(fromView, 'cachedPlayerRot', None) is not None:
             toView.cachedPlayerPos = fromView.cachedPlayerPos
             toView.cachedPlayerRot = fromView.cachedPlayerRot
         if getattr(fromView, 'cachedCameraYaw', None) is not None and getattr(fromView, 'cachedCameraPitch', None) is not None and getattr(fromView, 'cachedCameraZoom', None) is not None:
             toView.cachedCameraYaw = fromView.cachedCameraYaw
             toView.cachedCameraPitch = fromView.cachedCameraPitch
             toView.cachedCameraZoom = fromView.cachedCameraZoom
     uicore.animations.FadeIn(self.fadeLayer, duration=self.fadeInTimeMS / 1000.0, sleep=True)
     lobby = GetLobbyClass().GetIfOpen()
     if lobby is not None and not lobby.destroyed:
         lobby.LockUndockButton()
Esempio n. 10
0
    def DoFitShips(self, *args):
        fitting = self.fitting
        fitRigs = self.rigCB.GetValue()
        toActuallyFit = self.canFitNum
        fittingName = self.fitNameEdit.GetValue()
        fittingSvc = sm.GetService('fittingSvc')
        chargesByType, dronesByType, fightersByTypeID, iceByType, itemTypes, modulesByFlag, rigsToFit, subsystems = fittingSvc.GetTypesToFit(
            fitting, None)
        if fitRigs or not rigsToFit:
            cargoItemsByType = {}
        else:
            cargoItemsByType = defaultdict(int)
            for flagID, typeID in modulesByFlag.iteritems():
                if flagID in const.rigSlotFlags:
                    cargoItemsByType[typeID] += 1

            cargoItemsByType = dict(cargoItemsByType)
        lobby = GetLobbyClass().GetIfOpen()
        if lobby is None:
            return
        lobby.CheckCanAccessService('fitting')
        maxAvailableFitting, missingForFullFit = self._GetMaxAvailabeAndMissingForFullFit(
            itemTypes, modulesByFlag, toActuallyFit)
        if missingForFullFit:
            self.SetInventoryStatus()
            eve.Message('uiwarning03')
            return
        try:
            self.PrepareForMultiFitCall()
            fittingSvc.DoFitManyShips(chargesByType, dronesByType,
                                      fightersByTypeID, fitRigs, fitting,
                                      iceByType, cargoItemsByType,
                                      toActuallyFit, modulesByFlag,
                                      fittingName)
        finally:
            uthread.new(self.ResetUIAfterFitting)
Esempio n. 11
0
    def OnCorporationChanged(self, corpID, change):
        bAdd, bRemove = self.GetAddRemoveFromChange(change)
        if self.corporationByCorporationID is not None:
            if bAdd:
                if len(change) != len(self.corporationByCorporationID.header):
                    self.LogWarn(
                        'IncorrectNumberOfColumns ignoring change as Add change:',
                        change)
                    return
                line = []
                for columnName in self.corporationByCorporationID.header:
                    line.append(change[columnName][1])

                self.corporationByCorporationID[corpID] = line
            else:
                if not self.corporationByCorporationID.has_key(corpID):
                    return
                if bRemove:
                    del self.corporationByCorporationID[corpID]
                else:
                    corporation = self.corporationByCorporationID[corpID]
                    for columnName in corporation.header:
                        if not change.has_key(columnName):
                            continue
                        setattr(corporation, columnName, change[columnName][1])

                    if cfg.corptickernames.data.has_key(corpID):
                        header = cfg.corptickernames.header
                        line = cfg.corptickernames.data[corpID]
                        i = -1
                        for columnName in header:
                            i = i + 1
                            if not change.has_key(columnName):
                                continue
                            line[i] = change[columnName][1]

            updateDivisionNames = 0
            loadLogo = 0
            showOffices = 0
            loadButtons = 0
            resetCorpWindow = 0
            if eve.session.corpid == corpID:
                if 'division1' in change or 'division2' in change or 'division3' in change or 'division4' in change or 'division5' in change or 'division6' in change or 'division7' in change:
                    updateDivisionNames = 1
            if 'shape1' in change or 'shape2' in change or 'shape3' in change or 'color1' in change or 'color2' in change or 'color3' in change or 'typeface' in change:
                if eve.session.corpid == corpID:
                    loadLogo = 1
            if self.corp__locations.HasCorporationOffice(corpID):
                showOffices = 1
            if 'ceoID' in change and eve.session.corpid == corpID:
                oldCeoID, newCeoID = change['ceoID']
                if eve.session.charid in change['ceoID']:
                    loadButtons = 1
                self.corp__members.MemberCanRunForCEO_ = None
                resetCorpWindow = 1
                showOffices = 1
            if resetCorpWindow:
                sm.GetService('corpui').ResetWindow(1)
            if loadLogo:
                sm.GetService('corpui').LoadLogo(corpID)
            if updateDivisionNames:
                uthread.new(self.__UpdateDivisionNamesInTheUI
                            ).context = 'svc.corp.OnCorporationChanged'
            from eve.client.script.ui.shared.dockedUI import GetLobbyClass
            lobby = GetLobbyClass().GetIfOpen()
            if lobby:
                if showOffices:
                    lobby.ReloadOfficesIfVisible()
                if loadButtons:
                    lobby.LoadButtons()
Esempio n. 12
0
 def BlinkButton(self, what):
     lobby = GetLobbyClass().GetIfOpen()
     if lobby:
         lobby.BlinkButton(what)