public IEnumerator <MapComponents> GetEnumerator() { foreach (IEntry entry in pk3.TopLevelFolderEntries(MapsFolderName)) { Optional <Wad> wad = Wad.From(entry.Path.ToString(), entry.Data); if (!wad) { continue; } foreach (MapComponents mapComponents in wad.Value.GetMaps()) { // The name of the wad archive is to take place of the map // name for compatibility reasons. mapComponents.Name = entry.Path.Name; yield return(mapComponents); } } }