Ejemplo n.º 1
0
        private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
        {
            IConvenientChestsAPI convenientChestsAPI = Helper.ModRegistry.GetApi <IConvenientChestsAPI>("aEnigma.ConvenientChests");

            if (convenientChestsAPI != null)
            {
                Monitor.Log("Convenient Chests found, integration enabled");
            }
            else
            {
                convenientChestsAPI = new MockConvenientChestsAPI();
            }

            var itemPatcher     = new ItemPatcher(Helper, Monitor);
            var spritePatcher   = new SpritePatcher(Helper, Monitor);
            var farmhandMonitor = new FarmhandMonitor(Helper, Monitor);
            var savers          = new ISaver[]
            {
                new InventorySaver(Helper, Monitor, convenientChestsAPI),
                new FarmhandInventorySaver(Helper, Monitor, convenientChestsAPI),
                new LocationSaver(Helper, Monitor, convenientChestsAPI),
                new LocationInventorySaver(Helper, Monitor, convenientChestsAPI)
            };
            var saveManager = new SaveManager(Helper, Monitor, farmhandMonitor, savers);

            Helper.ReadConfig <ModConfig>();
            Helper.Content.AssetEditors.Add(spritePatcher);
            itemPatcher.Start();
            saveManager.Start();
        }
Ejemplo n.º 2
0
        private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
        {
            var itemPatcher     = new ItemPatcher(Helper, Monitor);
            var spritePatcher   = new SpritePatcher(Helper, Monitor);
            var farmhandMonitor = new FarmhandMonitor(Helper, Monitor);
            var savers          = new ISaver[]
            {
                new InventorySaver(Helper, Monitor),
                new FarmhandInventorySaver(Helper, Monitor),
                new LocationSaver(Helper, Monitor),
                new LocationInventorySaver(Helper, Monitor)
            };
            var saveManager = new SaveManager(Helper, Monitor, farmhandMonitor, savers);

            Helper.ReadConfig <ModConfig>();
            Helper.Content.AssetEditors.Add(spritePatcher);
            itemPatcher.Start();
            saveManager.Start();
        }
Ejemplo n.º 3
0
        private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
        {
            var convenientChestsApi = Helper.ModRegistry.GetApi <IConvenientChestsApi>("aEnigma.ConvenientChests");

            var spritePatcher = new SpritePatcher(Helper, Monitor);
            var itemPatcher   = new ItemPatcher(Helper, Monitor);
            var menuChanger   = new MenuChanger(Helper, Monitor);
            var saveManager   = new SaveManager(Helper, Monitor,
                                                new FarmhandMonitor(Helper, Monitor),
                                                new InventorySaver(Helper, Monitor, convenientChestsApi),
                                                new FarmhandInventorySaver(Helper, Monitor, convenientChestsApi),
                                                new LocationSaver(Helper, Monitor, convenientChestsApi),
                                                new LocationInventorySaver(Helper, Monitor, convenientChestsApi));

            Helper.ReadConfig <ModConfig>();
            Helper.Content.AssetEditors.Add(spritePatcher);
            itemPatcher.Start();
            saveManager.Start();
            menuChanger.Start();
        }