New revised CLEANUP class

This commit is contained in:
FlightControl
2017-06-30 10:27:44 +02:00
parent 862f2ab3ac
commit 133910ac3b
24 changed files with 524 additions and 577 deletions

View File

@@ -375,7 +375,12 @@ function DATABASE:Spawn( SpawnTemplate )
SpawnTemplate.CountryID = SpawnCountryID
SpawnTemplate.CategoryID = SpawnCategoryID
-- Ensure that for the spawned group and its units, there are GROUP and UNIT objects created in the DATABASE.
local SpawnGroup = self:AddGroup( SpawnTemplate.name )
for UnitID, UnitData in pairs( SpawnTemplate.units ) do
self:AddUnit( UnitData.name )
end
return SpawnGroup
end