public static bool Load(UnityModManager.ModEntry modEntry) { setting = UnityModManager.ModSettings.Load <ModSetting>(modEntry); logger = modEntry.Logger; var harmony = HarmonyInstance.Create(modEntry.Info.Id); harmony.PatchAll(Assembly.GetExecutingAssembly()); modEntry.OnGUI = OnGUI; modEntry.OnHideGUI = OnHideGUI; modEntry.OnSaveGUI = OnSaveGUI; return(true); }
public static bool Load(UnityModManager.ModEntry modEntry) { mod = modEntry; setting = UnityModManager.ModSettings.Load <ModSetting>(mod); HarmonyInstance.Create(modEntry.Info.Id).PatchAll(Assembly.GetExecutingAssembly()); mod.OnGUI = OnGUI; mod.OnHideGUI = OnHideGUI; mod.OnSaveGUI = OnSaveGUI; mod.Info.DisplayName = $"一键收获({setting.harvestHotkey})/浇水喂食({setting.refillHotkey}) (本人所有mod均在群内免费发布,未授权任何二次售卖)"; //if(GetH($"{mod.Path}info.json") != "206ac72410fd0c88019b4808ab465f30") //{ // worktest = "Mod文件校验不正确,请到交流群内下载"; //} mod.Logger.Log(GetH($"{mod.Path}info.json")); return(true); }