updated for LuaLS findings
This commit is contained in:
@@ -226,7 +226,8 @@ function InterceptGroup:UpdateTask()
|
|||||||
return 30 -- Return to base if no intercept point could be calculated
|
return 30 -- Return to base if no intercept point could be calculated
|
||||||
end
|
end
|
||||||
|
|
||||||
local mission = nil
|
---@type table
|
||||||
|
local mission
|
||||||
if self:IsInAir() == true then
|
if self:IsInAir() == true then
|
||||||
-- If the group is in the air, create an intercept mission
|
-- If the group is in the air, create an intercept mission
|
||||||
mission = INTERCEPT.getMissionFromInAir(
|
mission = INTERCEPT.getMissionFromInAir(
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ function Mission:SpawnPersistedState() end
|
|||||||
function Mission:SpawnActive() end
|
function Mission:SpawnActive() end
|
||||||
|
|
||||||
---comment
|
---comment
|
||||||
---@param checkHealth boolean
|
---@param _checkHealth boolean
|
||||||
---@param messageIfDone boolean
|
---@param _messageIfDone boolean
|
||||||
---@diagnostic disable-next-line: unused-local
|
---@diagnostic disable-next-line: unused-local
|
||||||
function Mission:UpdateState(checkHealth, messageIfDone) end
|
function Mission:UpdateState(_checkHealth, _messageIfDone) end
|
||||||
function Mission:StartCheckingContinuous() end
|
function Mission:StartCheckingContinuous() end
|
||||||
|
|
||||||
function Mission:PercentageComplete()
|
function Mission:PercentageComplete()
|
||||||
|
|||||||
@@ -293,7 +293,8 @@ do -- INIT DCS_UTIL
|
|||||||
if Util.tableLength(group_names) < 1 then return {} end
|
if Util.tableLength(group_names) < 1 then return {} end
|
||||||
|
|
||||||
for k = 1, #group_names do
|
for k = 1, #group_names do
|
||||||
local entry = nil
|
---@type { unit : Unit|StaticObject|nil, groupname: string }|nil
|
||||||
|
local entry
|
||||||
local group = Group.getByName(group_names[k])
|
local group = Group.getByName(group_names[k])
|
||||||
if group ~= nil then
|
if group ~= nil then
|
||||||
entry = { unit = group:getUnit(1), groupname = group_names[k] }
|
entry = { unit = group:getUnit(1), groupname = group_names[k] }
|
||||||
@@ -302,7 +303,7 @@ do -- INIT DCS_UTIL
|
|||||||
end
|
end
|
||||||
|
|
||||||
if entry and entry.unit and entry.unit:isExist() == true then
|
if entry and entry.unit and entry.unit:isExist() == true then
|
||||||
units[#units + 1] = entry
|
units[#units + 1] = { groupname = entry.groupname, unit = entry.unit }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user