mirror of
https://github.com/soarqin/DSP_Mods_TO.git
synced 2025-12-15 11:03:32 +08:00
WIP
This commit is contained in:
@@ -148,6 +148,28 @@ public class CruiseAssistPlugin : BaseUnityPlugin
|
||||
internal static readonly List<ICruiseAssistExtensionAPI> Extensions = [];
|
||||
private Harmony _harmony;
|
||||
private static bool _initialized;
|
||||
|
||||
public static void AddHistory(int id)
|
||||
{
|
||||
if (History.Count >= 128)
|
||||
{
|
||||
History.RemoveAt(0);
|
||||
}
|
||||
History.Add(id);
|
||||
HistoryDistinct = Enumerable.Reverse(History).Distinct().ToList();
|
||||
}
|
||||
|
||||
public static void RemoveHistoryAt(int index)
|
||||
{
|
||||
History.RemoveAt(index);
|
||||
HistoryDistinct = Enumerable.Reverse(History).Distinct().ToList();
|
||||
}
|
||||
|
||||
public static void ClearHistory()
|
||||
{
|
||||
History.Clear();
|
||||
HistoryDistinct.Clear();
|
||||
}
|
||||
|
||||
public static bool HasBookmark(int id) => BookmarkSet.Contains(id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user