Пример #1
0
def init_name_gen():
    global name_gens
    path = os.path.dirname(__file__)
    for file in os.listdir(os.path.join(path, 'data/namegen')) :
        if file.endswith('.cfg') > 0 :
            libtcod.namegen_parse(os.path.join(path, 'data','namegen',file))
    name_gens = libtcod.namegen_get_sets()
Пример #2
0
def __init__(postfix):
    for file in os.listdir('../data/namegen') :
        if file.find(postfix + '.cfg') > 0 :
            libtcod.namegen_parse(os.path.join('..','data','namegen',file))
    return libtcod.namegen_get_sets()