mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-18 21:25:58 +00:00
Update CSAR.lua
CSAR now treats aircraft with AircraftType[type] <= 0 as not CSAR-capable when building the active SAR unit list, while still allowing those type keys to exist for other systems such as FARP storage setup. Added those to the type, CSAR.AircraftType["Ka-50_3"] = 0 CSAR.AircraftType["Ka-50"] = 0 CSAR.AircraftType["AV8BNA"] = 0
This commit is contained in:
@@ -504,6 +504,9 @@ CSAR.AircraftType["OH58D"] = 2
|
|||||||
CSAR.AircraftType["CH-47Fbl1"] = 31
|
CSAR.AircraftType["CH-47Fbl1"] = 31
|
||||||
CSAR.AircraftType["AH-6J"] = 2
|
CSAR.AircraftType["AH-6J"] = 2
|
||||||
CSAR.AircraftType["MH-6J"] = 2
|
CSAR.AircraftType["MH-6J"] = 2
|
||||||
|
CSAR.AircraftType["Ka-50_3"] = 0
|
||||||
|
CSAR.AircraftType["Ka-50"] = 0
|
||||||
|
CSAR.AircraftType["AV8BNA"] = 0
|
||||||
|
|
||||||
--- CSAR class version.
|
--- CSAR class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
@@ -2538,8 +2541,11 @@ function CSAR:_AddMedevacMenuItem()
|
|||||||
if _unit then
|
if _unit then
|
||||||
--self:T("Unitname ".._unit:GetName().." IsAlive "..tostring(_unit:IsAlive()).." IsPlayer "..tostring(_unit:IsPlayer()))
|
--self:T("Unitname ".._unit:GetName().." IsAlive "..tostring(_unit:IsAlive()).." IsPlayer "..tostring(_unit:IsPlayer()))
|
||||||
if _unit:IsAlive() and _unit:IsPlayer() then
|
if _unit:IsAlive() and _unit:IsPlayer() then
|
||||||
local unitName = _unit:GetName()
|
local _maxUnits = self.AircraftType[_unit:GetTypeName()]
|
||||||
_UnitList[unitName] = unitName
|
if _maxUnits == nil or _maxUnits > 0 then
|
||||||
|
local unitName = _unit:GetName()
|
||||||
|
_UnitList[unitName] = unitName
|
||||||
|
end
|
||||||
end -- end isAlive
|
end -- end isAlive
|
||||||
end -- end if _unit
|
end -- end if _unit
|
||||||
end -- end for
|
end -- end for
|
||||||
|
|||||||
Reference in New Issue
Block a user