Fixed compilation script

This commit is contained in:
2025-05-01 21:58:06 +02:00
parent fc726cbb37
commit a0dbac6eca
+7 -6
View File
@@ -31,12 +31,13 @@ def compile(root, target):
compiled += string
compiled += "\nend --Main\n"
apiFileName = os.path.join(root, "api" , "SpearheadApi.lua")
with open(apiFileName, 'r') as apiFile:
part = "do --Spearhead API\n"
part += apiFile.read()
part += "\nend --Spearhead API\n"
compiled += part
# Legacy, Spearhead API is now added as part of the classes
# apiFileName = os.path.join(root, "api" , "SpearheadApi.lua")
# with open(apiFileName, 'r') as apiFile:
# part = "do --Spearhead API\n"
# part += apiFile.read()
# part += "\nend --Spearhead API\n"
# compiled += part
with open(target, "w") as targetFile:
targetFile.write(compiled)