mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Update Database.lua
- Template statics saved under first statics unit name so they can be found.
This commit is contained in:
parent
fa5afae783
commit
7f5be2829c
@ -757,7 +757,9 @@ function DATABASE:_RegisterStaticTemplate( StaticTemplate, CoalitionID, Category
|
||||
|
||||
local StaticTemplate = UTILS.DeepCopy( StaticTemplate )
|
||||
|
||||
local StaticTemplateName = env.getValueDictByKey( StaticTemplate.name )
|
||||
local StaticTemplateGroupName = env.getValueDictByKey( StaticTemplate.name )
|
||||
|
||||
local StaticTemplateName=StaticTemplate.units[1].name
|
||||
|
||||
self.Templates.Statics[StaticTemplateName] = self.Templates.Statics[StaticTemplateName] or {}
|
||||
|
||||
@ -765,7 +767,7 @@ function DATABASE:_RegisterStaticTemplate( StaticTemplate, CoalitionID, Category
|
||||
StaticTemplate.CoalitionID = CoalitionID
|
||||
StaticTemplate.CountryID = CountryID
|
||||
|
||||
self.Templates.Statics[StaticTemplateName].StaticName = StaticTemplateName
|
||||
self.Templates.Statics[StaticTemplateName].StaticName = StaticTemplateGroupName
|
||||
self.Templates.Statics[StaticTemplateName].GroupTemplate = StaticTemplate
|
||||
self.Templates.Statics[StaticTemplateName].UnitTemplate = StaticTemplate.units[1]
|
||||
self.Templates.Statics[StaticTemplateName].CategoryID = CategoryID
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user