def GetPOSMgr(): if session.solarsystemid is not None: moniker = Moniker('posMgr', session.solarsystemid) moniker.SetSessionCheck({'solarsystemid': session.solarsystemid}) return moniker raise RuntimeError('POSMgr only available in-flight but session is %s' % (session, ))
def GetEntityAccess(): if session.solarsystemid is not None: moniker = Moniker('entity', session.solarsystemid2) moniker.SetSessionCheck({'solarsystemid': session.solarsystemid}) return moniker raise RuntimeError( 'EntityAccess only available in-flight but session is %s' % (session, ))
def GetEntityLocation(): if session.solarsystemid2 is not None: moniker = Moniker('entity', session.solarsystemid2) moniker.SetSessionCheck({'solarsystemid2': session.solarsystemid2}) return moniker raise RuntimeError( 'EntityLocation only available with in a valid solarsystem %s' % (session, ))
def GetAgent(agentID, stationID=None): if stationID is not None: nodeID = sm.services['machoNet'].CheckAddressCache( 'station', stationID) if nodeID is not None: sm.services['machoNet'].SetNodeOfAddress('agentMgr', agentID, nodeID) return Moniker('agentMgr', agentID)
def GetShipAccess(): if session.solarsystemid: moniker = Moniker('ship', (session.solarsystemid, const.groupSolarSystem)) moniker.SetSessionCheck({'solarsystemid': session.solarsystemid}) elif session.stationid2: moniker = Moniker('ship', (session.stationid2, const.groupStation)) moniker.SetSessionCheck({'stationid2': session.stationid2}) return moniker
def GetWarStatistic(warID): return Moniker('warStatisticMgr', warID)
def GetWarEx(allianceOrCorpID, isMaster = 0): if macho.mode == 'server': isMaster = isMaster or sm.StartServiceAndWaitForRunningState('warRegistry').IsAllianceOrCorpLocal(allianceOrCorpID) return Moniker('warRegistry', (allianceOrCorpID, isMaster))
def GetCorpRegistryEx(corpID, isMaster = 0): if macho.mode == 'server': isMaster = isMaster or sm.StartServiceAndWaitForRunningState('corpRegistry').IsCorpLocal(corpID) return Moniker('corpRegistry', (corpID, isMaster))
def CharGetDogmaLocation(): moniker = Moniker('dogmaIM', GetLocationBindParams()) moniker.SetSessionCheck(GetLocationSessionCheck()) return moniker
def GetPlanetBaseManager(planetID): return Moniker('planetBaseBroker', planetID)
def GetStationInventoryMgr(stationID): return Moniker('invbroker', (stationID, const.groupStation))
def GetSolarSystemInventoryMgr(solarsystemID): return Moniker('invbroker', (solarsystemID, const.groupSolarSystem))
def GetCorpStationManagerEx(stationID): return Moniker('corpStationMgr', stationID)
def GetReprocessingManagerEx(stationID): return Moniker('reprocessingSvc', stationID)
def CharGetSkillHandler(): moniker = Moniker('skillMgr', GetLocationBindParams()) moniker.SetSessionCheck(GetLocationSessionCheck()) return moniker
def GetFleet(fleetID = None): fleetID = fleetID or session.fleetid moniker = Moniker('fleetObjectHandler', fleetID) return moniker
def GetPlanet(planetID): return Moniker('planetMgr', planetID)
def GetWorldSpaceInventoryMgr(worldSpaceID): return Moniker('invbroker', (worldSpaceID, const.groupWorldSpace))
def GetPlanetOrbitalRegistry(solarSystemID): return Moniker('planetOrbitalRegistryBroker', solarSystemID)
def CharGetCrimewatchLocation(): moniker = Moniker('crimewatch', GetLocationBindParams()) moniker.SetSessionCheck(GetLocationSessionCheck()) return moniker
def GetStationDogmaLocation(): moniker = Moniker('dogmaIM', (session.stationid2, const.groupStation)) moniker.SetSessionCheck({'stationid2': session.stationid2}) return moniker
def GetBallPark(solarsystemID): moniker = Moniker('beyonce', solarsystemID) moniker.SetSessionCheck({'solarsystemid': solarsystemID}) return moniker
def GetStationShipAccess(): moniker = Moniker('ship', (session.stationid2, const.groupStation)) moniker.SetSessionCheck({'stationid2': session.stationid2}) return moniker
def GetCourierMissionCreator(stationID): return Moniker('missionMgr', ('courier', stationID))