Exemplo n.º 1
0
 /// <summary>Choose a new song when a delay runs out.</summary>
 private void OnTimerFinished(object source, ElapsedEventArgs e)
 {
     this.Timer.Enabled = false;
     if (!this.CurrentMusicPack.IsPlaying())
     {
         this.selectMusic(SongSpecificsV2.getCurrentConditionalString());
     }
 }
Exemplo n.º 2
0
        public Dictionary <MusicPackV2, List <string> > getLocationSpecificMusic()
        {
            Dictionary <MusicPackV2, List <string> > listOfValidDictionaries = new Dictionary <MusicPackV2, List <string> >();

            //StardewSymphony.ModMonitor.Log(SongSpecificsV2.getCurrentConditionalString(true));

            foreach (var v in this.MusicPacks)
            {
                try
                {
                    var songList = v.Value.SongInformation.getSongList(SongSpecificsV2.getCurrentConditionalString(true));
                    if (songList == null)
                    {
                        return(null);
                    }
                    if (songList.Count > 0)
                    {
                        listOfValidDictionaries.Add(v.Value, songList);
                    }
                }
                catch { }
            }
            return(listOfValidDictionaries);
        }