resolved conflicts from main

This commit is contained in:
2024-10-11 20:58:42 +02:00
3 changed files with 11 additions and 8 deletions
+7 -1
View File
@@ -1,6 +1,7 @@
import os import os
import sys import sys
import glob import glob
import datetime
def compileClasses(classesPath): def compileClasses(classesPath):
resultString = "" resultString = ""
@@ -15,7 +16,12 @@ def compileClasses(classesPath):
def compile(root, target): def compile(root, target):
classPath = os.path.join(root, "classes") classPath = os.path.join(root, "classes")
classes = compileClasses(classPath) classes = compileClasses(classPath)
compiled = ""
dateTime = f"""--[[
Spearhead Compile Time: {datetime.datetime.now().isoformat()}
]]"""
compiled = f"{dateTime}\n"
compiled += classes compiled += classes
mainFileName = os.path.join(root, "main.lua") mainFileName = os.path.join(root, "main.lua")
+2 -3
View File
@@ -26,7 +26,7 @@ do
elseif first == "[" then elseif first == "[" then
result.isBackup = false result.isBackup = false
else else
table.insert(Spearhead.MissionEditingWarnings, "Could not parse the CAP config for group: " .. groupName) Spearhead.AddMissionEditorWarning("Could not parse the CAP config for group: " .. groupName)
return nil return nil
end end
@@ -62,8 +62,7 @@ do
end end
return result return result
else else
table.insert(Spearhead.MissionEditingWarnings, Spearhead.AddMissionEditorWarning("CAP Group with name: " .. groupName .. "should have at least 3 parts, but has " .. partCount)
"CAP Group with name: " .. groupName .. "should have at least 3 parts, but has " .. partCount)
return nil return nil
end end
end end
+2 -4
View File
@@ -881,13 +881,11 @@ do --setup route util
---@return table ---@return table
local function GetCAPTargetTypes(attackHelos) local function GetCAPTargetTypes(attackHelos)
local targetTypes = { local targetTypes = {
[1] = "Fighters", [1] = "Planes",
[2] = "Multirole fighters",
[3] = "Bombers"
} }
if attackHelos then if attackHelos then
targetTypes[4] = "Helicopters" targetTypes[2] = "Helicopters"
end end
return targetTypes return targetTypes