Esempio n. 1
0
    def GetKnownUniverseRegions(self):
        if self.knownRegions is None:
            self.knownRegions = {}
            for regionID, region in self.GetStarMapCache()['regions'].iteritems():
                if IsWormholeRegion(regionID):
                    continue
                regionInfo = Bunch()
                regionInfo.neighbours = region['neighbours']
                regionInfo.solarSystemIDs = region['solarSystemIDs']
                regionInfo.constellationIDs = region['constellationIDs']
                regionInfo.center = region['center']
                regionInfo.mapPosition = WorldPosToMapPos(region['center'])
                self.knownRegions[regionID] = regionInfo

        return self.knownRegions
Esempio n. 2
0
    def GetKnownUniverseConstellations(self):
        if self.knownConstellations is None:
            self.knownConstellations = {}
            for constellationID, constellation in self.GetStarMapCache()['constellations'].iteritems():
                if IsWormholeConstellation(constellationID):
                    continue
                constellationInfo = Bunch()
                constellationInfo.regionID = constellation['regionID']
                constellationInfo.neighbours = constellation['neighbours']
                constellationInfo.solarSystemIDs = constellation['solarSystemIDs']
                constellationInfo.center = constellation['center']
                constellationInfo.mapPosition = WorldPosToMapPos(constellation['center'])
                self.knownConstellations[constellationID] = constellationInfo

        return self.knownConstellations
Esempio n. 3
0
    def GetKnownUniverseSolarSystems(self):
        if self.knownSolarSystems is None:
            self.knownSolarSystems = {}
            for systemID, system in self.GetStarMapCache()['solarSystems'].iteritems():
                if IsWormholeSystem(systemID):
                    continue
                center = system['center']
                solarSystemInfo = Bunch()
                solarSystemInfo.center = center
                solarSystemInfo.mapPosition = WorldPosToMapPos(center)
                solarSystemInfo.regionID = system['regionID']
                solarSystemInfo.constellationID = system['constellationID']
                solarSystemInfo.star = SUN_DATA[system['sunTypeID']]
                solarSystemInfo.factionID = system['factionID']
                solarSystemInfo.neighbours = system['neighbours']
                solarSystemInfo.planetCountByType = system['planetCountByType']
                self.knownSolarSystems[systemID] = solarSystemInfo

        return self.knownSolarSystems