for i in range(1, 3):
write_best_category(out, "armor.{}".format(t), items, i)
- """out.write('category "armor.{}.{}_at_level"\n'.format(t, best[i-1]))
- out.write("{\n\tor\n\t{\n")
- for it in items:
- next_level = 0
- n = it.name
- for k in range(i):
- n = p.upgrades.get(n, "")
- if n:
- next_level = p.items[n].droplevel
- if next_level:
- out.write("\t\tand\n\t\t{\n")
- out.write('\t\t\tbase_type "{}";\n'.format(it.name))
- out.write("\t\t\tmax_item_level {};\n".format(next_level-1))
- out.write("\t\t};\n")
- else:
- out.write('\t\tbase_type "{}";\n'.format(it.name))
- out.write("\t};\n};\n")"""
out.write('category "armor.{}"\n'.format(t))
out.write("{\n\tor\n\t{\n")