def InvalidateFlags(self): if not util.InSpace(): return overview = form.OverView.GetIfOpen() if overview: overview.UpdateAllIconAndBackgroundFlags() sm.GetService('bracket').RenewFlags()
def Setup(self): self.CleanUp() self.AssureSetup() if util.InSpace(): if self.IsTacticalOverlayActive(): self.tacticalOverlay.Initialize() self.Open()
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)
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)
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)
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()
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)
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()
def CheckInit(self): if util.InSpace() and self.IsTacticalOverlayActive( ) and not self.hideUI: self.tacticalOverlay.Initialize()
def InvalidateFlagsExtraLimited(self, charID): if util.InSpace(): sm.GetService('bracket').RenewSingleFlag(charID)
def OnSuspectsAndCriminalsUpdate(self, criminalizedCharIDs, decriminalizedCharIDs): if util.InSpace(): uthread.new(self.DelayedFlagStateUpdate)
def OnCrimewatchEngagementUpdated(self, otherCharId, timeout): if util.InSpace(): uthread.new(self.DelayedFlagStateUpdate)
def OnSetAllianceStanding(self, *args): if util.InSpace(): self.MarkFlagsAsDirty()
def OnSetCorpStanding(self, *args): if util.InSpace(): self.MarkFlagsAsDirty()
def OnContactChange(self, contactIDs, contactType=None): if util.InSpace(): self.MarkFlagsAsDirty()
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()