This commit is contained in:
Михаил Капелько
2023-12-28 13:33:48 +03:00
parent 16026a7b47
commit d893364ff4
93 changed files with 2130 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
def generateWorldConstructor(c):
fileName = f"{c.dir}/templates/world-constructor"
fmt = c.readFile(fileName)[0]
items = []
for key in c.structure.world.fields:
values = c.structure.world.fields[key]
if (
"init" in values or
key == "model" or
key == "net"
):
ln = fmt.replace("%NAME%", key)
items.append(ln)
c.worldConstructor = "\n".join(items)