Made parameter SpawnAliasPrefix mandatory for SpawnFromTemplate function.

This commit is contained in:
Thor Vik 2020-03-11 15:28:36 +01:00
parent 71b5140e69
commit a704693abf

View File

@ -409,7 +409,11 @@ end
function SPAWN:NewFromTemplate( SpawnTemplate, SpawnTemplatePrefix, SpawnAliasPrefix )
local self = BASE:Inherit( self, BASE:New() )
self:F( { SpawnTemplate, SpawnTemplatePrefix, SpawnAliasPrefix } )
if SpawnAliasPrefix == nil or SpawnAliasPrefix == "" then
BASE:I("ERROR: in function NewFromTemplate, required paramter SpawnAliasPrefix is not set")
return nil
end
if SpawnTemplate then
self.SpawnTemplate = SpawnTemplate -- Contains the template structure for a Group Spawn from the Mission Editor. Note that this group must have lateActivation always on!!!
self.SpawnTemplatePrefix = SpawnTemplatePrefix