public void PlaySong() { currentState = true; if (JukeBoxCore.orignalSongList.Count <= 0) { JukeBoxCore.orignalSongList.AddRange(DefDatabase <SongDef> .AllDefs); } if (JukeBoxCore.customSongList.Count <= 0) { JukeBoxCore.Scanning(); if (JukeBoxCore.customSongList.Count <= 0) { Log.Error("Songs Folder is Empty"); return; } } DefDatabase <SongDef> .Clear(); DefDatabase <SongDef> .Add(JukeBoxCore.customSongList); Find.MusicManagerPlay.ForceStartSong(DefDatabase <SongDef> .GetRandom(), false); }
public void Synchronize() { JukeBoxCore.Scanning(); }