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]
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]
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]
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 ]
def _safe_planet_name(planet_id): planet = fo.getUniverse().getPlanet(planet_id) return fo.to_str('P', planet_id, (planet and planet.name) or "?")