mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-15 07:43:20 +08:00
新手引导标志迁移至本体 (#2612)
This commit is contained in:
@@ -9,6 +9,7 @@ using BetterGenshinImpact.ViewModel.Message;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Net;
|
||||
using BetterGenshinImpact.GameTask;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Script.WebView;
|
||||
|
||||
@@ -195,6 +196,36 @@ public sealed class RepoWebBridge
|
||||
}
|
||||
}
|
||||
|
||||
// 设置新手引导标志位
|
||||
public bool SetGuideStatus(bool status)
|
||||
{
|
||||
try
|
||||
{
|
||||
var scriptConfig = TaskContext.Instance().Config.ScriptConfig;
|
||||
scriptConfig.GuideStatus = status;
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 获取新手引导标志位
|
||||
public bool GetGuideStatus()
|
||||
{
|
||||
try
|
||||
{
|
||||
return TaskContext.Instance().Config.ScriptConfig.GuideStatus;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetRepoJsonPath()
|
||||
{
|
||||
string updatedRepoJsonPath = Path.Combine(
|
||||
|
||||
Reference in New Issue
Block a user