diff --git a/Moose Development/Moose/Core/Database.lua b/Moose Development/Moose/Core/Database.lua index bb5d65987..6270f1fa6 100644 --- a/Moose Development/Moose/Core/Database.lua +++ b/Moose Development/Moose/Core/Database.lua @@ -1582,12 +1582,29 @@ end -- @param DCS#Airbase airbase Airbase. -- @return #DATABASE self function DATABASE:_RegisterAirbase(airbase) - + + 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 .. + 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() diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index 4759ebf2f..21cf26938 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -63,6 +63,11 @@ -- To be able to distinguish easily in your code the difference between a AIRBASE API call and a DCS Airbase API call, -- the first letter of the method is also capitalized. So, by example, the DCS Airbase method DCSWrapper.Airbase#Airbase.getName() -- is implemented in the AIRBASE class as @{#AIRBASE.GetName}(). +-- +-- ## Note on the "H" heli pads in the Syria map: +-- +-- As of the time of writing (Oct 2024, DCS DCS 2.9.8.1107), these 143 objects have the **same name and object ID**, which makes them unusable in Moose, e.g. you cannot find a specific one for spawning etc. +-- Waiting for Ugra and ED to fix this issue. -- -- @field #AIRBASE AIRBASE AIRBASE = { @@ -450,6 +455,7 @@ AIRBASE.TheChannel = { -- * AIRBASE.Syria.Gaziantep -- * AIRBASE.Syria.Gazipasa -- * AIRBASE.Syria.Gecitkale +-- * AIRBASE.Syria.H -- * AIRBASE.Syria.H3 -- * AIRBASE.Syria.H3_Northwest -- * AIRBASE.Syria.H3_Southwest @@ -518,6 +524,7 @@ AIRBASE.Syria={ ["Gaziantep"] = "Gaziantep", ["Gazipasa"] = "Gazipasa", ["Gecitkale"] = "Gecitkale", + ["H"] = "H", ["H3"] = "H3", ["H3_Northwest"] = "H3 Northwest", ["H3_Southwest"] = "H3 Southwest", @@ -752,12 +759,14 @@ AIRBASE.Sinai = { -- -- * AIRBASE.Kola.Banak -- * AIRBASE.Kola.Bodo +-- * AIRBASE.Kola.Ivalo -- * AIRBASE.Kola.Jokkmokk -- * AIRBASE.Kola.Kalixfors -- * AIRBASE.Kola.Kallax -- * AIRBASE.Kola.Kemi_Tornio -- * AIRBASE.Kola.Kirkenes -- * AIRBASE.Kola.Kiruna +-- * AIRBASE.Kola.Kuusamo -- * AIRBASE.Kola.Monchegorsk -- * AIRBASE.Kola.Murmansk_International -- * AIRBASE.Kola.Olenya @@ -771,20 +780,22 @@ AIRBASE.Sinai = { AIRBASE.Kola = { ["Banak"] = "Banak", ["Bodo"] = "Bodo", + ["Ivalo"] = "Ivalo", ["Jokkmokk"] = "Jokkmokk", ["Kalixfors"] = "Kalixfors", + ["Kallax"] = "Kallax", ["Kemi_Tornio"] = "Kemi Tornio", + ["Kirkenes"] = "Kirkenes", ["Kiruna"] = "Kiruna", + ["Kuusamo"] = "Kuusamo", ["Monchegorsk"] = "Monchegorsk", ["Murmansk_International"] = "Murmansk International", ["Olenya"] = "Olenya", ["Rovaniemi"] = "Rovaniemi", ["Severomorsk_1"] = "Severomorsk-1", ["Severomorsk_3"] = "Severomorsk-3", - ["Vuojarvi"] = "Vuojarvi", - ["Kirkenes"] = "Kirkenes", - ["Kallax"] = "Kallax", ["Vidsel"] = "Vidsel", + ["Vuojarvi"] = "Vuojarvi", } --- Airbases of the Afghanistan map @@ -926,7 +937,7 @@ function AIRBASE:Register(AirbaseName) -- Debug info. --self:I({airbase=AirbaseName, descriptors=self.descriptors}) - + -- Category. self.category=self.descriptors and self.descriptors.category or Airbase.Category.AIRDROME