#AIRBASE - Add Syria Airbases

This commit is contained in:
Applevangelist
2026-06-14 13:44:44 +02:00
parent b8e114101b
commit 9326cfad1c
2 changed files with 400 additions and 79 deletions
+8 -7
View File
@@ -1380,12 +1380,12 @@ function DATABASE:_RegisterDynamicGroup(Groupname)
local DCSUnitName = DCSUnit:getName()
-- Add unit.
self:I(string.format("Register Unit: %s", tostring(DCSUnitName)))
self:T(string.format("Register Unit: %s", tostring(DCSUnitName)))
self:AddUnit( tostring(DCSUnitName), true )
end
else
self:E({"Group does not exist: ", DCSGroup})
self:T({"Group does not exist: ", DCSGroup})
end
return self
end
@@ -1488,27 +1488,28 @@ end
-- @return #DATABASE self
function DATABASE:_RegisterAirbase(airbase)
local IsSyria = UTILS.GetDCSMap() == "Syria" and true or false
local countHSyria = 0
--local IsSyria = UTILS.GetDCSMap() == "Syria" and true or false
--local countHSyria = 0
if airbase then
-- Get the airbase name.
local DCSAirbaseName = airbase:getName()
-- DCS 2.9.8.1107 added 143 helipads all named H with the same object ID ..
--[[ DCS 2.9.8.1107 added 143 helipads all named H with the same object ID ..
if IsSyria and DCSAirbaseName == "H" and countHSyria > 0 then
--[[
--
local p = airbase:getPosition().p
local mgrs = COORDINATE:New(p.x,p.z,p.y):ToStringMGRS()
self:I("Airbase on Syria map named H @ "..mgrs)
countHSyria = countHSyria + 1
if countHSyria > 1 then return self end
--]]
--
return self
elseif IsSyria and DCSAirbaseName == "H" and countHSyria == 0 then
countHSyria = countHSyria + 1
end
--]]
-- This gave the incorrect value to be inserted into the airdromeID for DCS 2.5.6. Is fixed now.
local airbaseID=airbase:getID()