diff --git a/Moose Development/Moose/Core/Spawn.lua b/Moose Development/Moose/Core/Spawn.lua index 5f3533801..6a88872b6 100644 --- a/Moose Development/Moose/Core/Spawn.lua +++ b/Moose Development/Moose/Core/Spawn.lua @@ -1184,6 +1184,7 @@ end --- This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types. -- @param #SPAWN self +-- @param #table SpawnZoneTable A table with @{Core.Zone} objects. If nil or empty, the method returns self without effect. -- @param #table SpawnZoneTable A table with @{Core.Zone} objects. If this table is given, then each spawn will be executed within the given list of @{Core.Zone}s objects. -- @param #boolean RandomizePositionInZone If nil or true, also the position inside the selected random zone will be randomized. Set to false to use the center of the zone. -- @return #SPAWN self @@ -1201,6 +1202,9 @@ end function SPAWN:InitRandomizeZones( SpawnZoneTable, RandomizePositionInZone ) --self:F( { self.SpawnTemplatePrefix, SpawnZoneTable } ) + if not SpawnZoneTable then + return self + end local temptable = {} for _,_temp in pairs(SpawnZoneTable) do temptable[#temptable+1] = _temp