mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
USAF agressors fix (and also for other countries with _ names in country.id)
-- reworked the DATABASE template population logic
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170204_1931' )
|
||||
env.info( 'Moose Generation Timestamp: 20170205_0829' )
|
||||
local base = _G
|
||||
|
||||
Include = {}
|
||||
@@ -7494,6 +7494,8 @@ function DATABASE:_RegisterTemplates()
|
||||
|
||||
if (CoalitionName == 'red' or CoalitionName == 'blue') and type(coa_data) == 'table' then
|
||||
--self.Units[coa_name] = {}
|
||||
|
||||
local CoalitionSide = coalition.side[string.upper(CoalitionName)]
|
||||
|
||||
----------------------------------------------
|
||||
-- build nav points DB
|
||||
@@ -7517,6 +7519,8 @@ function DATABASE:_RegisterTemplates()
|
||||
for cntry_id, cntry_data in pairs(coa_data.country) do
|
||||
|
||||
local CountryName = string.upper(cntry_data.name)
|
||||
local CountryID = cntry_data.id
|
||||
|
||||
--self.Units[coa_name][countryName] = {}
|
||||
--self.Units[coa_name][countryName]["countryId"] = cntry_data.id
|
||||
|
||||
@@ -7537,9 +7541,9 @@ function DATABASE:_RegisterTemplates()
|
||||
if GroupTemplate and GroupTemplate.units and type(GroupTemplate.units) == 'table' then --making sure again- this is a valid group
|
||||
self:_RegisterTemplate(
|
||||
GroupTemplate,
|
||||
coalition.side[string.upper(CoalitionName)],
|
||||
CoalitionSide,
|
||||
_DATABASECategory[string.lower(CategoryName)],
|
||||
country.id[string.upper(CountryName)]
|
||||
CountryID
|
||||
)
|
||||
end --if GroupTemplate and GroupTemplate.units then
|
||||
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
||||
|
||||
Reference in New Issue
Block a user