Example #1
0
        public override string ToString(FormatType format, object supplement = null)
        {
            switch (format)
            {
            case FormatType.Brief:
                return($"{SongId}.{SongTitle} [{ChartRatingClass} {ChartRating}({ChartConstant})]");

            case FormatType.Detail:
                //获取所有歌曲别名
                string allAnotherName = "";
                foreach (var item in PluginArcaeaSong2anothername.Where(x => x.SongId == SongId))
                {
                    allAnotherName += item.AnotherName.AnotherName + ",";
                }
                allAnotherName = allAnotherName.TrimEnd(',');
                if (allAnotherName.IsNullOrWhiteSpace())
                {
                    allAnotherName = null;
                }
                return($"{SongId}.{SongTitle} [{ChartRatingClass} {ChartConstant}]\n" +
                       allAnotherName?.Be($"别名:{allAnotherName}\n") +
                       SongArtist?.Be($"曲师:{SongArtist}\n") +
                       JacketDesigner?.Be($"画师:{JacketDesigner}\n") +
                       SongBpm?.Be($"BPM:{SongBpm}\n") +
                       SongLength?.Be($"歌曲长度:{SongLength}\n") +
                       SongPack?.Be($"曲包:{SongPack}\n") +
                       ChartDesigner?.Be($"谱师:{ChartDesigner}\n") +
                       ChartAllNotes?.Be($"note总数:{ChartAllNotes}\n地键:{ChartFloorNotes}\n天键:{ChartSkyNotes}\n蛇:{ChartArcNotes}\n长条:{ChartHoldNotes}"));
            }
            return(null);
        }
Example #2
0
        public override string ToString(FormatType format, object supplement = null)
        {
            string constantDesc = GetBriefConstant();
            string designerDesc = GetBriefChartDesigner();
            string allNotesDesc = GetBriefAllNotes();

            switch (format)
            {
            case FormatType.Brief:
                return($"{SongId}.{SongTitle}{constantDesc?.Be($" [{constantDesc}]")}");

            case FormatType.Detail:
                return($"{JacketUrl?.Be(new KouImage(JacketUrl, this).ToKouResourceString())}" +
                       $"{SongId}.{SongTitle}\n" +
                       constantDesc?.Be($"定数:{constantDesc}\n") +
                       Aliases?.Be($"别名:{Aliases.Select(p => p.Alias).ToStringJoin(',')}\n") +
                       SongArtist?.Be($"曲师:{SongArtist}\n") +
                       designerDesc?.Be($"谱师:{designerDesc}\n") +
                       JacketDesigner?.Be($"画师:{JacketDesigner}\n") +
                       SongBpm?.Be($"BPM:{SongBpm}\n") +
                       SongLength?.Be($"歌曲长度:{SongLength}\n") +
                       SongPack?.Be($"曲包:{SongPack.GetKouEnumFirstName().ToTitleCase()}\n") +
                       allNotesDesc?.Be($"总键数:{allNotesDesc}\n"));
            }
            return(null);
        }
        private List <SongPack> CreateSongPackDetails(List <OfficialDlcItem> officialDlcList, List <DlcMatch <OfficialDlcItem, ExistingDlcItem> > dlcMatches)
        {
            var rv = new List <SongPack>();

            foreach (var group in dlcMatches.GroupBy(x => x.UniqueKey).Where(x => x.Count() > 1))
            {
                Console.WriteLine($"Key {group.Key} found {group.Count()} times");
            }
            var matchesByUniqueKey = dlcMatches.ToDictionary(x => x.UniqueKey);

            foreach (var pack in officialDlcList.GroupBy(x => x.SongPack))
            {
                var spi = new SongPack
                {
                    Name = pack.Key
                };

                foreach (var song in pack)
                {
                    var songSort = _sortCalculator.CreateSortDetails(song);
                    spi.ItemsInPack.Add(new SongPack.PurchasedStatus {
                        OfficialDlcItem = song, IsPurchased = matchesByUniqueKey[songSort.UniqueKey].MatchResult == MatchResultType.Matched
                    });
                }

                rv.Add(spi);
            }

            return(rv);
        }
Example #4
0
 public override string GetAutoCitedSupplement(List <string> citedFieldNames)
 {
     return($"{citedFieldNames.BeIfContains(nameof(SongArtist), $"\n   曲师:{SongArtist}")}" +
            $"{citedFieldNames.BeIfContains(nameof(SongBpm), $"\n   BPM:{SongBpm}")}" +
            $"{citedFieldNames.BeIfContains(nameof(SongPack), $"\n   曲包:{SongPack.GetKouEnumFirstName()}")}" +
            $"{citedFieldNames.BeIfContains(nameof(SongLength), $"\n   长度:{SongLength}")}" +
            $"{citedFieldNames.BeIfContains(nameof(SongAppend.ChartDesigner), $"\n   谱师:{GetBriefChartDesigner()}")}" +
            $"{citedFieldNames.BeIfContains(nameof(SongAppend.ChartAllNotes), $"\n   总键数:{GetBriefAllNotes()}")}" +
            $"{citedFieldNames.BeIfContains(nameof(JacketDesigner), $"\n   画师:{JacketDesigner}")}");
 }