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()
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()