Exemple #1
0
 def InvalidateFlags(self):
     if not util.InSpace():
         return
     overview = form.OverView.GetIfOpen()
     if overview:
         overview.UpdateAllIconAndBackgroundFlags()
     sm.GetService('bracket').RenewFlags()
Exemple #2
0
 def Setup(self):
     self.CleanUp()
     self.AssureSetup()
     if util.InSpace():
         if self.IsTacticalOverlayActive():
             self.tacticalOverlay.Initialize()
         self.Open()
Exemple #3
0
 def _OnStateChange(self, itemID, flag, true, *args):
     if not util.InSpace():
         return
     if not self or getattr(self, 'sr', None) is None:
         return
     if self.logme:
         self.LogInfo('Tactical::OnStateChange', itemID, flag, true, *args)
     self.tacticalOverlay.CheckState(itemID, flag, true)
Exemple #4
0
 def _NewState(self, bp):
     if bp and bp.balls.get(bp.ego, None):
         if util.InSpace():
             if not uicore.layer.shipui.isopen:
                 uicore.layer.shipui.OpenView()
             else:
                 uicore.layer.shipui.SetupShip(False)
         camera = sm.GetService('sceneManager').GetActiveSpaceCamera()
         camera.LookAtMaintainDistance(bp.ego)
Exemple #5
0
 def DoBallRemove(self, ball, slimItem, terminal):
     if not self or getattr(self, 'sr', None) is None:
         return
     if ball is None:
         return
     if not util.InSpace():
         return
     if self.logme:
         self.LogInfo('Tactical::DoBallRemove', ball.id)
     uthread.pool('tactical::DoBallRemoveThread', self.DoBallRemoveThread,
                  ball, slimItem, terminal)
     self.RemoveBallFromJammers(ball)
Exemple #6
0
 def OnSessionChanged(self, isRemote, session, change):
     if util.InSpace():
         self.AssureSetup()
         self.Open()
         if self.IsTacticalOverlayActive() and not self.hideUI:
             self.tacticalOverlay.Initialize()
         self.CheckInitDrones()
         self.MarkFlagsAsDirty()
         if 'shipid' in change:
             self.tacticalOverlay.OnShipChange()
     else:
         self.CleanUp()
Exemple #7
0
 def ActivateSkillExtractor(self, item):
     if util.InSpace():
         raise UserError('SkillExtractorNotDockedInStation',
                         {'extractor': const.typeSkillExtractor})
     skillPoints = self.GetSkillHandler().GetSkillPoints()
     freeSkillPoints = self.GetSkillHandler().GetFreeSkillPoints()
     if skillPoints + freeSkillPoints < const.SKILL_TRADING_MINIMUM_SP_TO_EXTRACT:
         raise UserError(
             'SkillExtractionNotEnoughSP', {
                 'limit': const.SKILL_TRADING_MINIMUM_SP_TO_EXTRACT,
                 'extractor': const.typeSkillExtractor
             })
     if blue.pyos.packaged:
         token = sm.GetService('crestConnectionService').token
         if token is None:
             raise UserError('TokenRequiredForSkillExtraction')
     SkillExtractorWindow.OpenOrReload(itemID=item.itemID)
Exemple #8
0
 def OnSlimItemChange(self, oldSlim, newSlim):
     if not util.InSpace():
         return
     update = 0
     if getattr(newSlim, 'allianceID',
                None) and newSlim.allianceID != getattr(
                    oldSlim, 'allianceID', None):
         update = 1
     elif newSlim.corpID and newSlim.corpID != oldSlim.corpID:
         update = 2
     elif newSlim.charID != oldSlim.charID:
         update = 3
     elif newSlim.ownerID != oldSlim.ownerID:
         update = 4
     elif getattr(newSlim, 'lootRights', None) != getattr(
             oldSlim, 'lootRights', None):
         update = 5
     elif getattr(newSlim, 'isEmpty', None) != getattr(
             oldSlim, 'isEmpty', None):
         update = 6
     if update:
         self.MarkFlagsAsDirty()
Exemple #9
0
 def CheckInit(self):
     if util.InSpace() and self.IsTacticalOverlayActive(
     ) and not self.hideUI:
         self.tacticalOverlay.Initialize()
Exemple #10
0
 def InvalidateFlagsExtraLimited(self, charID):
     if util.InSpace():
         sm.GetService('bracket').RenewSingleFlag(charID)
Exemple #11
0
 def OnSuspectsAndCriminalsUpdate(self, criminalizedCharIDs,
                                  decriminalizedCharIDs):
     if util.InSpace():
         uthread.new(self.DelayedFlagStateUpdate)
Exemple #12
0
 def OnCrimewatchEngagementUpdated(self, otherCharId, timeout):
     if util.InSpace():
         uthread.new(self.DelayedFlagStateUpdate)
Exemple #13
0
 def OnSetAllianceStanding(self, *args):
     if util.InSpace():
         self.MarkFlagsAsDirty()
Exemple #14
0
 def OnSetCorpStanding(self, *args):
     if util.InSpace():
         self.MarkFlagsAsDirty()
Exemple #15
0
 def OnContactChange(self, contactIDs, contactType=None):
     if util.InSpace():
         self.MarkFlagsAsDirty()
Exemple #16
0
 def ProcessRookieStateChange(self, state):
     if util.InSpace():
         if not not (eve.rookieState and eve.rookieState < 23):
             self.CleanUp()
         elif not self.GetPanel(form.OverView.default_windowID):
             self.Setup()