summaryrefslogblamecommitdiff
path: root/mapnames.py
blob: 5c01280489bedc64155cbad5a3ed3d640ec66fa3 (plain) (tree)


















                                            
map_names = {}


def read_map_names(file='mapnames.txt'):
    with open(file) as f:
        for l in f.readlines():
            try:
                index = l.index(' ')
                map_id = l[:index]
                map_name = l[index + 1:-1]
                map_names[map_id] = map_name
            except ValueError:
                pass

    return map_names

if len(map_names) < 1:
    read_map_names()