mx_archive.py 480 B

12345678910111213141516
  1. def onmx_formulas(unit, *args):
  2. """
  3. @usage: MX_FORMULAS(BinFiles...) # deprecated, matrixnet
  4. Create MatrixNet formulas archive
  5. """
  6. def iter_infos():
  7. for a in args:
  8. if a.endswith('.bin'):
  9. unit.on_mx_bin_to_info([a])
  10. yield a[:-3] + 'info'
  11. else:
  12. yield a
  13. infos = list(iter_infos())
  14. unit.onarchive_asm(['NAME', 'MxFormulas'] + infos)
  15. unit.on_mx_gen_table(infos)