Проверка шаблона шины для iOS
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

generateWorldConstructor.py 457B

11 个月前
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)