minor fixes (#38)

Co-authored-by: dutchie032 <dutchie032>
This commit is contained in:
2025-05-25 14:25:38 +02:00
committed by GitHub
co-authored by dutchie032 <dutchie032>
parent 14589e261f
commit 61d2792524
5 changed files with 13 additions and 3 deletions
Binary file not shown.
@@ -195,7 +195,7 @@ function MissionCommandsHelper:AddOverviewCommand(groupID)
if enabled == true then
local mission = self.missionsByCode[code]
if mission and mission.priority == "primary" then
if mission and mission:getState() == "ACTIVE" and mission.priority == "primary" then
text = text .. formatLine(mission)
end
end
@@ -207,7 +207,7 @@ function MissionCommandsHelper:AddOverviewCommand(groupID)
if enabled == true then
local mission = self.missionsByCode[code]
if mission and mission.priority == "secondary" then
if mission and mission:getState() == "ACTIVE" and mission.priority == "secondary" then
text = text .. formatLine(mission)
end
end
@@ -77,6 +77,7 @@ function SupplyUnitsTracker:Update()
end
---@private
---@param unit Unit
function SupplyUnitsTracker:IsSupplyUnit(unit)
if unit == nil then return false end
@@ -84,6 +85,10 @@ function SupplyUnitsTracker:IsSupplyUnit(unit)
return true
end
if unit:hasAttribute("Helicopters") and unit:hasAttribute("Transports") then
return true
end
return false
end
@@ -174,6 +174,11 @@ function BuildableMission:SpawnActive()
---@param time number
local checkForCrateTasks = function (selfA, time)
selfA:CheckCratesInZone()
if selfA:getState() == "COMPLETED" then
return nil
end
return time + 10
end
+1 -1
View File
@@ -54,7 +54,7 @@ Spearhead.LoadingDone()
Spearhead.internal.GlobalStageManager:printFullOverview()
--Check lines of code in directory per file:
-- Get-ChildItem . -Include *.lua -Recurse | foreach {""+(Get-Content $_).Count + " => " + $_.name }; && GCI . -Include *.lua* -Recurse | foreach{(GC $_).Count} | measure-object -sum | % Sum
-- Get-ChildItem . -Include *.lua -Recurse | foreach {""+(Get-Content $_).Count + " => " + $_.name }; GCI . -Include *.lua* -Recurse | foreach{(GC $_).Count} | measure-object -sum | % Sum
-- find . -name '*.lua' | xargs wc -l
--- ==================== DEBUG ORDER OR ZONE VEC ===========================