上传文件至 Common
This commit is contained in:
15
Common/CustomVersionText.cs
Normal file
15
Common/CustomVersionText.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using HarmonyLib;
|
||||
|
||||
namespace SinmaiAssist.Common;
|
||||
|
||||
public class CustomVersionText
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(MAI2System.Config), "get_displayVersionString")]
|
||||
public static bool CustomVersionString(ref string __result)
|
||||
{
|
||||
if (string.IsNullOrEmpty(SinmaiAssist.MainConfig.Common.CustomVersionText.VersionText)) return true;
|
||||
__result = SinmaiAssist.MainConfig.Common.CustomVersionText.VersionText;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user