cynoTravelSvc.py (4826B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\parklife\cynoTravelSvc.py 2 from carbon.common.script.sys.service import Service 3 from eveexceptions import UserError 4 from player_messaging.client.ui_message import prompt_player_fsd_dialog 5 6 class CynoTravelSvc(Service): 7 __guid__ = 'svc.cynoTravel' 8 __servicename__ = 'CynoTravel' 9 __displayname__ = 'Cyno Travel service' 10 __startupdependencies__ = ['sessionMgr', 'michelle', 'fleet'] 11 __notifyevents__ = ['OnGroupJumpAnchorActivated', 'OnGroupJumpedPassenger'] 12 13 def OnGroupJumpAnchorActivated(self, toSolarsystemID, numPassengers): 14 prompt_player_fsd_dialog('GroupJumpAnchorActivated', {'toSolarsystemID': toSolarsystemID, 15 'numPassengers': numPassengers}) 16 17 def OnGroupJumpedPassenger(self, anchorCharID, toSolarsystemID): 18 prompt_player_fsd_dialog('GroupJumpedPassenger', {'anchorCharID': anchorCharID, 19 'toSolarsystemID': toSolarsystemID}) 20 21 def JumpToFleetModuleBeacon(self, charID, solarsystemID, beaconID): 22 bp = self.michelle.GetRemotePark() 23 if bp is None: 24 return 25 self.LogNotice('Jump To Module Beacon Fleet', charID, beaconID, solarsystemID) 26 self.sessionMgr.PerformSessionChange('jump', bp.CmdJumpToFleetModuleBeacon, charID, beaconID, solarsystemID) 27 28 def JumpToFleetDeployableBeacon(self, deployableID, solarsystemID, beaconID): 29 bp = self.michelle.GetRemotePark() 30 if bp is None: 31 return 32 self.LogNotice('Jump To Deployable Beacon Fleet', deployableID, solarsystemID, beaconID) 33 self.sessionMgr.PerformSessionChange('jump', bp.CmdJumpToFleetDeployableBeacon, deployableID, solarsystemID, beaconID) 34 35 def JumpToStructureBeacon(self, solarsystemID, structureID): 36 bp = self.michelle.GetRemotePark() 37 if bp is None: 38 return 39 self.LogNotice('Jump to structure beacon', structureID) 40 self.sessionMgr.PerformSessionChange('jump', sm.RemoteSvc('structureCynoBeaconMgr').CmdJumpToStructureBeacon, structureID, solarsystemID) 41 42 def BridgeToFleetModuleBeacon(self, charID, solarsystemID, beaconID): 43 bp = self.michelle.GetRemotePark() 44 if bp is None: 45 return 46 bp.CmdBridgeToFleetModuleBeacon(charID, beaconID, solarsystemID) 47 48 def BridgeToFleetDeployableBeacon(self, deployableID, solarsystemID, beaconID): 49 bp = self.michelle.GetRemotePark() 50 if bp is None: 51 return 52 self.LogNotice('Bridge To Deployable Beacon Fleet', deployableID, solarsystemID, beaconID) 53 self.sessionMgr.PerformSessionChange('jump', bp.CmdBridgeToFleetDeployableBeacon, deployableID, solarsystemID, beaconID) 54 55 def BridgeToBeaconStructure(self, solarsystemID, structureID): 56 bp = self.michelle.GetRemotePark() 57 if bp is None: 58 return 59 if not session.fleetid: 60 raise UserError('FleetNotInFleet') 61 sm.RemoteSvc('structureCynoBeaconMgr').CmdBridgeToStructureBeacon(structureID, solarsystemID) 62 63 def JumpThroughFleet(self, otherCharID, otherShipID): 64 bp = self.michelle.GetRemotePark() 65 if bp is None: 66 return 67 bridge = self.fleet.GetActiveBridgeForShip(otherShipID) 68 if bridge is None: 69 return 70 solarsystemID, beaconID = bridge 71 self.LogNotice('Jump Through Fleet', otherCharID, otherShipID, beaconID, solarsystemID) 72 self.sessionMgr.PerformSessionChange('jump', bp.CmdJumpThroughFleet, otherCharID, otherShipID, beaconID, solarsystemID) 73 74 def GroupJumpToFleetModuleBeacon(self, charID, solarsystemID, beaconID): 75 bp = self.michelle.GetRemotePark() 76 if bp is None: 77 return 78 self.LogNotice('GroupJump To Module Beacon Fleet', charID, beaconID, solarsystemID) 79 self.sessionMgr.PerformSessionChange('jump', bp.CmdGroupJumpToFleetModuleBeacon, charID, beaconID, solarsystemID) 80 81 def GroupJumpToFleetDeployableBeacon(self, deployableID, solarsystemID, beaconID): 82 bp = self.michelle.GetRemotePark() 83 if bp is None: 84 return 85 self.LogNotice('GroupJump To Deployable Beacon Fleet', deployableID, solarsystemID, beaconID) 86 self.sessionMgr.PerformSessionChange('jump', bp.CmdGroupJumpToFleetDeployableBeacon, deployableID, solarsystemID, beaconID) 87 88 def GroupJumpToStructureBeacon(self, solarsystemID, structureID): 89 bp = self.michelle.GetRemotePark() 90 if bp is None: 91 return 92 if not session.fleetid: 93 raise UserError('FleetNotInFleet') 94 self.LogNotice('GroupJump to structure beacon', structureID) 95 self.sessionMgr.PerformSessionChange('jump', sm.RemoteSvc('structureCynoBeaconMgr').CmdGroupJumpToStructureBeacon, structureID, solarsystemID)