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:
parent
e5c3f2070f
commit
8acfb79c0e
@ -718,6 +718,8 @@ function DATABASE:_RegisterTemplates()
|
|||||||
|
|
||||||
if (CoalitionName == 'red' or CoalitionName == 'blue') and type(coa_data) == 'table' then
|
if (CoalitionName == 'red' or CoalitionName == 'blue') and type(coa_data) == 'table' then
|
||||||
--self.Units[coa_name] = {}
|
--self.Units[coa_name] = {}
|
||||||
|
|
||||||
|
local CoalitionSide = coalition.side[string.upper(CoalitionName)]
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
-- build nav points DB
|
-- build nav points DB
|
||||||
@ -741,6 +743,8 @@ function DATABASE:_RegisterTemplates()
|
|||||||
for cntry_id, cntry_data in pairs(coa_data.country) do
|
for cntry_id, cntry_data in pairs(coa_data.country) do
|
||||||
|
|
||||||
local CountryName = string.upper(cntry_data.name)
|
local CountryName = string.upper(cntry_data.name)
|
||||||
|
local CountryID = cntry_data.id
|
||||||
|
|
||||||
--self.Units[coa_name][countryName] = {}
|
--self.Units[coa_name][countryName] = {}
|
||||||
--self.Units[coa_name][countryName]["countryId"] = cntry_data.id
|
--self.Units[coa_name][countryName]["countryId"] = cntry_data.id
|
||||||
|
|
||||||
@ -761,9 +765,9 @@ function DATABASE:_RegisterTemplates()
|
|||||||
if GroupTemplate and GroupTemplate.units and type(GroupTemplate.units) == 'table' then --making sure again- this is a valid group
|
if GroupTemplate and GroupTemplate.units and type(GroupTemplate.units) == 'table' then --making sure again- this is a valid group
|
||||||
self:_RegisterTemplate(
|
self:_RegisterTemplate(
|
||||||
GroupTemplate,
|
GroupTemplate,
|
||||||
coalition.side[string.upper(CoalitionName)],
|
CoalitionSide,
|
||||||
_DATABASECategory[string.lower(CategoryName)],
|
_DATABASECategory[string.lower(CategoryName)],
|
||||||
country.id[string.upper(CountryName)]
|
CountryID
|
||||||
)
|
)
|
||||||
end --if GroupTemplate and GroupTemplate.units then
|
end --if GroupTemplate and GroupTemplate.units then
|
||||||
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||||
env.info( 'Moose Generation Timestamp: 20170204_1931' )
|
env.info( 'Moose Generation Timestamp: 20170205_0829' )
|
||||||
local base = _G
|
local base = _G
|
||||||
|
|
||||||
Include = {}
|
Include = {}
|
||||||
@ -7494,6 +7494,8 @@ function DATABASE:_RegisterTemplates()
|
|||||||
|
|
||||||
if (CoalitionName == 'red' or CoalitionName == 'blue') and type(coa_data) == 'table' then
|
if (CoalitionName == 'red' or CoalitionName == 'blue') and type(coa_data) == 'table' then
|
||||||
--self.Units[coa_name] = {}
|
--self.Units[coa_name] = {}
|
||||||
|
|
||||||
|
local CoalitionSide = coalition.side[string.upper(CoalitionName)]
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
-- build nav points DB
|
-- build nav points DB
|
||||||
@ -7517,6 +7519,8 @@ function DATABASE:_RegisterTemplates()
|
|||||||
for cntry_id, cntry_data in pairs(coa_data.country) do
|
for cntry_id, cntry_data in pairs(coa_data.country) do
|
||||||
|
|
||||||
local CountryName = string.upper(cntry_data.name)
|
local CountryName = string.upper(cntry_data.name)
|
||||||
|
local CountryID = cntry_data.id
|
||||||
|
|
||||||
--self.Units[coa_name][countryName] = {}
|
--self.Units[coa_name][countryName] = {}
|
||||||
--self.Units[coa_name][countryName]["countryId"] = cntry_data.id
|
--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
|
if GroupTemplate and GroupTemplate.units and type(GroupTemplate.units) == 'table' then --making sure again- this is a valid group
|
||||||
self:_RegisterTemplate(
|
self:_RegisterTemplate(
|
||||||
GroupTemplate,
|
GroupTemplate,
|
||||||
coalition.side[string.upper(CoalitionName)],
|
CoalitionSide,
|
||||||
_DATABASECategory[string.lower(CategoryName)],
|
_DATABASECategory[string.lower(CategoryName)],
|
||||||
country.id[string.upper(CountryName)]
|
CountryID
|
||||||
)
|
)
|
||||||
end --if GroupTemplate and GroupTemplate.units then
|
end --if GroupTemplate and GroupTemplate.units then
|
||||||
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||||
env.info( 'Moose Generation Timestamp: 20170204_1931' )
|
env.info( 'Moose Generation Timestamp: 20170205_0829' )
|
||||||
local base = _G
|
local base = _G
|
||||||
|
|
||||||
Include = {}
|
Include = {}
|
||||||
@ -7494,6 +7494,8 @@ function DATABASE:_RegisterTemplates()
|
|||||||
|
|
||||||
if (CoalitionName == 'red' or CoalitionName == 'blue') and type(coa_data) == 'table' then
|
if (CoalitionName == 'red' or CoalitionName == 'blue') and type(coa_data) == 'table' then
|
||||||
--self.Units[coa_name] = {}
|
--self.Units[coa_name] = {}
|
||||||
|
|
||||||
|
local CoalitionSide = coalition.side[string.upper(CoalitionName)]
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
-- build nav points DB
|
-- build nav points DB
|
||||||
@ -7517,6 +7519,8 @@ function DATABASE:_RegisterTemplates()
|
|||||||
for cntry_id, cntry_data in pairs(coa_data.country) do
|
for cntry_id, cntry_data in pairs(coa_data.country) do
|
||||||
|
|
||||||
local CountryName = string.upper(cntry_data.name)
|
local CountryName = string.upper(cntry_data.name)
|
||||||
|
local CountryID = cntry_data.id
|
||||||
|
|
||||||
--self.Units[coa_name][countryName] = {}
|
--self.Units[coa_name][countryName] = {}
|
||||||
--self.Units[coa_name][countryName]["countryId"] = cntry_data.id
|
--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
|
if GroupTemplate and GroupTemplate.units and type(GroupTemplate.units) == 'table' then --making sure again- this is a valid group
|
||||||
self:_RegisterTemplate(
|
self:_RegisterTemplate(
|
||||||
GroupTemplate,
|
GroupTemplate,
|
||||||
coalition.side[string.upper(CoalitionName)],
|
CoalitionSide,
|
||||||
_DATABASECategory[string.lower(CategoryName)],
|
_DATABASECategory[string.lower(CategoryName)],
|
||||||
country.id[string.upper(CountryName)]
|
CountryID
|
||||||
)
|
)
|
||||||
end --if GroupTemplate and GroupTemplate.units then
|
end --if GroupTemplate and GroupTemplate.units then
|
||||||
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user