mapLayoutConstellations.py (1831B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\mapView\layout\mapLayoutConstellations.py 2 from eve.client.script.ui.shared.mapView.layout.mapLayoutBase import MapLayoutBase 3 from eve.client.script.ui.shared.mapView.mapViewData import mapViewData 4 from eve.client.script.ui.shared.mapView.mapViewUtil import GetConstellationCorrdinates, GetSolarSystemCoordinates 5 6 class MapLayoutConstellations(MapLayoutBase): 7 8 def PrimeLayout(self, forcePrime = False, expandedItems = None, **kwds): 9 isAbstract = kwds.get('isAbstract', False) 10 if not forcePrime and (expandedItems, isAbstract) == self.cacheKey: 11 return 12 self.cacheKey = (expandedItems, isAbstract) 13 showMarkers = mapViewData.GetKnownUniverseRegions().keys() 14 showMarkers += mapViewData.GetKnownUniverseConstellations().keys() 15 solarSystemID_position = {} 16 for constellationID, constellationItem in mapViewData.GetKnownUniverseConstellations().iteritems(): 17 if expandedItems and constellationID in expandedItems: 18 for solarSystemID in constellationItem.solarSystemIDs: 19 solarSystemItem = mapViewData.GetKnownSolarSystem(solarSystemID) 20 x, y, z = GetSolarSystemCoordinates(isAbstract, solarSystemID, solarSystemItem) 21 solarSystemID_position[solarSystemID] = (x, y, z) 22 23 showMarkers += constellationItem.solarSystemIDs 24 else: 25 x, y, z = GetConstellationCorrdinates(isAbstract, constellationID) 26 for solarSystemID in constellationItem.solarSystemIDs: 27 solarSystemID_position[solarSystemID] = (x, y, z) 28 29 self.positionsBySolarSystemID = solarSystemID_position 30 self.visibleMarkers = showMarkers