shipcasterSvc.py (1823B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\parklife\shipcasterSvc.py 2 from carbon.common.script.sys.service import Service 3 from eve.client.script.ui.inflight.selectedItemWnd import SelectedItemWnd 4 5 class ShipcasterSvc(Service): 6 __guid__ = 'svc.shipcaster' 7 __servicename__ = 'Shipcaster' 8 __displayname__ = 'Shipcaster service' 9 __startupdependencies__ = ['sessionMgr'] 10 __notifyevents__ = ['OnShipcasterTargetStateChanged'] 11 12 def JumpThroughShipcaster(self, shipcasterID, toSolarsystemID, toLandingPadID): 13 self.LogNotice('Jump through Shipcaster', shipcasterID, toSolarsystemID, toLandingPadID) 14 self.sessionMgr.PerformSessionChange('jump', sm.RemoteSvc('shipcasterTravelMgr').CmdJumpThroughShipcaster, shipcasterID, toSolarsystemID, toLandingPadID) 15 16 def GetFactionLandingPads(self, factionID): 17 return sm.RemoteSvc('shipCasterLandingPadMgr').GetFactionLandingPads(factionID) 18 19 def GetAllLandingPads(self): 20 return sm.RemoteSvc('shipCasterLandingPadMgr').GetAllLandingPads() 21 22 def GetFactionsWithShipcaster(self): 23 return sm.RemoteSvc('shipCasterLauncherMgr').GetFactionsWithShipcaster() 24 25 def CanJumpStarterShipcaster(self): 26 return sm.RemoteSvc('starterShipcasterTravelMgr').CanCharacterJump() 27 28 def JumpThroughStarterShipcaster(self, shipcasterID): 29 self.LogNotice('Jump through Starter Shipcaster', shipcasterID) 30 self.sessionMgr.PerformSessionChange('jump', sm.RemoteSvc('starterShipcasterTravelMgr').CmdJumpThroughStarterShipcaster, shipcasterID) 31 32 def OnShipcasterTargetStateChanged(self, itemID): 33 selectedItemWnd = SelectedItemWnd.GetIfOpen() 34 if selectedItemWnd and selectedItemWnd.itemID == itemID: 35 selectedItemWnd.OnItemIDSelected(itemID)