public override void Entry(IModHelper helper) { config = Helper.ReadConfig <Config>(); new ConsoleCommand("hoy_cheat", "Get all sheets without doing anything.", (c, p) => cheat(p)).register(); MenuEvents.MenuChanged += MenuEvents_MenuChanged; SaveEvents.BeforeSave += SaveEvents_BeforeSave; DataLoader.load(Helper, Helper.ModRegistry.IsLoaded("Platonymous.CustomMusic")); }
public override void Entry(IModHelper helper) { config = Helper.ReadConfig <Config>(); new ConsoleCommand("hoy_cheat", "Get all sheets without doing anything.", (c, p) => cheat(p)).register(); helper.Events.Display.MenuChanged += OnMenuChanged; helper.Events.GameLoop.Saving += OnSaving; DataLoader.load(Helper, Helper.ModRegistry.IsLoaded("Platonymous.CustomMusic")); }
private void SaveHandler_BeforeRebuilding(object sender, EventArgs e) { if (data == null) { data = new DataLoader(Helper); DataLoader.load(); } SaveHandler.BeforeRebuilding -= SaveHandler_BeforeRebuilding; }
private void OnGameLaunched(object sender, GameLaunchedEventArgs e) { DataLoader.load(Helper, Helper.ModRegistry.IsLoaded("Platonymous.CustomMusic")); }