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 += string
compiled += "\nend --Main\n" compiled += "\nend --Main\n"
apiFileName = os.path.join(root, "api" , "SpearheadApi.lua") # Legacy, Spearhead API is now added as part of the classes
with open(apiFileName, 'r') as apiFile: # apiFileName = os.path.join(root, "api" , "SpearheadApi.lua")
part = "do --Spearhead API\n" # with open(apiFileName, 'r') as apiFile:
part += apiFile.read() # part = "do --Spearhead API\n"
part += "\nend --Spearhead API\n" # part += apiFile.read()
compiled += part # part += "\nend --Spearhead API\n"
# compiled += part
with open(target, "w") as targetFile: with open(target, "w") as targetFile:
targetFile.write(compiled) targetFile.write(compiled)