Added luacheck config
This commit is contained in:
@@ -57,11 +57,13 @@ jobs:
|
|||||||
globals = {
|
globals = {
|
||||||
"env", "net", "trigger", "timer", "Object", "land", "coord", "coalition",
|
"env", "net", "trigger", "timer", "Object", "land", "coord", "coalition",
|
||||||
"Unit", "Group", "Airbase", "StaticObject", "SceneryObject", "world",
|
"Unit", "Group", "Airbase", "StaticObject", "SceneryObject", "world",
|
||||||
"country", "missionCommands", "Controller", "Weapon", "atmosphere", "country"
|
"country", "missionCommands", "Controller", "Weapon", "atmosphere", "country",
|
||||||
|
"lfs", "AI"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std = "lua51c+spearhead_lib+dcs_lib"
|
std = "lua51c+spearhead_lib+dcs_lib"
|
||||||
|
self = false
|
||||||
|
|
||||||
max_line_length = false
|
max_line_length = false
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -125,8 +125,6 @@ do --- privates
|
|||||||
end
|
end
|
||||||
|
|
||||||
local spawnTemplate = Util.deepCopyTable(spawnData.groupTemplate)
|
local spawnTemplate = Util.deepCopyTable(spawnData.groupTemplate)
|
||||||
---@type Array<string>
|
|
||||||
local removeableUnitNames = {}
|
|
||||||
--[[
|
--[[
|
||||||
TODO: Spawn units at "current"/LastKnown position with them going to the next waypoint.
|
TODO: Spawn units at "current"/LastKnown position with them going to the next waypoint.
|
||||||
ONLY when perstable data is found.
|
ONLY when perstable data is found.
|
||||||
@@ -138,12 +136,6 @@ do --- privates
|
|||||||
local name = unit["name"] --[[@as string]]
|
local name = unit["name"] --[[@as string]]
|
||||||
|
|
||||||
SpearheadEvents.addOnUnitLostEventListener(name, self)
|
SpearheadEvents.addOnUnitLostEventListener(name, self)
|
||||||
local state = Persistence.UnitState(name)
|
|
||||||
if state then
|
|
||||||
if state.isDead == true then
|
|
||||||
removeableUnitNames[#removeableUnitNames+1] = name
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if override and override.emptyLoadouts == true then
|
if override and override.emptyLoadouts == true then
|
||||||
if unit["payload"] and unit["payload"]["pylons"] then
|
if unit["payload"] and unit["payload"]["pylons"] then
|
||||||
@@ -171,7 +163,6 @@ do --- privates
|
|||||||
|
|
||||||
local group = coalition.addGroup(country, spawnData.category, spawnTemplate)
|
local group = coalition.addGroup(country, spawnData.category, spawnTemplate)
|
||||||
|
|
||||||
|
|
||||||
for _, unit in pairs(group:getUnits()) do
|
for _, unit in pairs(group:getUnits()) do
|
||||||
self:CheckUnitAndReplaceIfPersistentDead(unit)
|
self:CheckUnitAndReplaceIfPersistentDead(unit)
|
||||||
if isPersistent == true then
|
if isPersistent == true then
|
||||||
|
|||||||
Reference in New Issue
Block a user