Проверка шаблона шины для iOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

generateWorldConstructor.py 457B

10 months ago
123456789101112131415161718
  1. def generateWorldConstructor(c):
  2. fileName = f"{c.dir}/templates/world-constructor"
  3. fmt = c.readFile(fileName)[0]
  4. items = []
  5. for key in c.structure.world.fields:
  6. values = c.structure.world.fields[key]
  7. if (
  8. "init" in values or
  9. key == "model" or
  10. key == "net"
  11. ):
  12. ln = fmt.replace("%NAME%", key)
  13. items.append(ln)
  14. c.worldConstructor = "\n".join(items)