public static void Init(ModEntry entry) { Logger = entry.Logger; SettingsDirectory = Path.Combine(entry.Path, @"ModSettings\"); if (!Directory.Exists(SettingsDirectory)) { Directory.CreateDirectory(SettingsDirectory); } BESettings.Setup(); Settings = BESettings.Get <BEMainSettings>(); BEString.Setup(entry); entry.Info.DisplayName = BEString.Get("global.mod_title"); entry.OnToggle = OnToggle; entry.OnShowGUI = OnShowGUI; entry.OnSaveGUI = OnSaveGUI; entry.OnGUI = OnGUI; isEnabled = entry.Enabled; hasUpdate = entry.HasUpdate; // scnEditorPrivates.Setup(); harmony = new Harmony(entry.Info.Id); }
public static void OnSaveGUI(ModEntry entry) { hasUpdate = entry.HasUpdate; BESettings.SaveAll(); }