예제 #1
0
    def Undock_Thread(self, shipID):
        from eve.client.script.ui.station.lobby import Lobby
        if not self.exitingstation:
            lobby = Lobby.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 = Lobby.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 = Lobby.GetIfOpen()
        if lobby and not lobby.destroyed:
            lobby.SetUndockProgress(1)
        self.pastUndockPointOfNoReturn = True
        self.UndockAttempt(shipID)
예제 #2
0
 def OnShipTreeClosed(self):
     self.factionTreesByFactionID = {}
     self.selectedFaction = None
     sm.GetService('audio').SendUIEvent('isis_end')
     lobbyWnd = Lobby.GetIfOpen()
     if lobbyWnd:
         lobbyWnd.Maximize(animate=False)
예제 #3
0
 def OnShipTreeOpened(self):
     self.history = HistoryBuffer()
     sm.GetService('skills').MySkills(renew=True)
     self.SelectFaction(self.GetDefaultFactionID())
     lobbyWnd = Lobby.GetIfOpen()
     if lobbyWnd:
         lobbyWnd.Minimize(animate=False)
     sm.GetService('audio').SendUIEvent('isis_start')
예제 #4
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.station.lobby import Lobby
     lobby = Lobby.GetIfOpen()
     if lobby:
         lobby.ReloadOfficesIfVisible()
         if officeID is None:
             lobby.LoadButtons()
     if corporationID != eve.session.corpid:
         return
예제 #5
0
 def ReloadLobby(self):
     from eve.client.script.ui.station.lobby import Lobby
     Lobby.CloseIfOpen()
     Lobby.Open()
예제 #6
0
 def BlinkButton(self, what):
     from eve.client.script.ui.station.lobby import Lobby
     lobby = Lobby.GetIfOpen()
     if lobby:
         lobby.BlinkButton(what)
    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.station.lobby import Lobby
            lobby = Lobby.GetIfOpen()
            if lobby:
                if showOffices:
                    lobby.ReloadOfficesIfVisible()
                if loadButtons:
                    lobby.LoadButtons()