Esempio n. 1
0
def planet_name_ids(planet_ids):
    """
    Get list of text representing pairs planet name and system id.
    :param planet_ids: list if planet ids
    :return: list of string <name>:<id>
    """
    universe = fo.getUniverse()
    return [fo.to_str('P', planet_id, safe_name(universe.getPlanet(planet_id))) for planet_id in planet_ids]
Esempio n. 2
0
def planet_name_ids(planet_ids):
    """
    Get list of text representing pairs planet name and system id.
    :param planet_ids: list if planet ids
    :return: list of string <name>:<id>
    """
    universe = fo.getUniverse()
    return [fo.to_str("P", planet_id, safe_name(universe.getPlanet(planet_id))) for planet_id in planet_ids]
Esempio n. 3
0
def sys_name_ids(sys_ids):
    """
    Get list of text representing pairs system name and system id.
    :param sys_ids: list if system ids
    :return: list of string <name>:<id>
    """
    universe = fo.getUniverse()
    return [fo.to_str('S', sys_id, safe_name(universe.getSystem(sys_id))) for sys_id in sys_ids]
Esempio n. 4
0
def sys_name_ids(sys_ids):
    """
    Get list of text representing pairs system name and system id.
    :param sys_ids: list if system ids
    :return: list of string <name>:<id>
    """
    universe = fo.getUniverse()
    return [
        fo.to_str('S', sys_id, safe_name(universe.getSystem(sys_id)))
        for sys_id in sys_ids
    ]
Esempio n. 5
0
 def _safe_planet_name(planet_id):
     planet = fo.getUniverse().getPlanet(planet_id)
     return fo.to_str('P', planet_id, (planet and planet.name) or "?")
Esempio n. 6
0
 def _safe_planet_name(planet_id):
     planet = fo.getUniverse().getPlanet(planet_id)
     return fo.to_str('P', planet_id, (planet and planet.name) or "?")