Beispiel #1
0
def get_area(area_name):
    path = ds.get_data_directory() + 'emerald_areas.json'
    areas = jds.load_data(path)
    for a in areas:
        if a['name'] == area_name:
            return a
    raise ValueError('Invalid area name: %s' % area_name)
def load_pokemon_from_file(pkm_name, pkm_file_id):
    path = get_pokemon_file_path(pkm_name, pkm_file_id)
    pkm_data = jds.load_data(path)
    return Pokemon.from_dictionary(pkm_data)
    
Beispiel #3
0
def get_config_settings():
    return jds.load_data(_settings_directory)
def get_all_cities():
    cities = jds.load_data(_cities_data_url)['cities']
    return [City.from_dictionary(c) for c in cities]
Beispiel #5
0
def get_all_locations(version='emerald'):
    path = ds.get_data_directory() + '%s_locations.json' % version
    locations = jds.load_data(path)
    return locations
Beispiel #6
0
def get_areas(location_name, version='emerald'):
    path = ds.get_data_directory() + '%s_areas.json' % version
    areas = jds.load_data(path)
    areas_filtered = list(
        filter(lambda a: a['location'] == location_name, areas))
    return areas_filtered
Beispiel #7
0
def get_controls_map():
    controls_direct = dm.get_data_directory() + 'controls.json'
    return jds.load_data(controls_direct)
Beispiel #8
0
def get_name_id_pairs():
    data = jds.load_data(_party_file_url)
    #print(data)
    return [(name, fid) for (name, fid) in data]