Ejemplo n.º 1
0
        /*********
        ** Private methods
        *********/
        private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
        {
            automate             = this.Helper.ModRegistry.GetApi <IAutomateAPI>("Pathoschild.Automate");
            industrialFurnaceAPI = this.Helper.ModRegistry.GetApi <IIndustrialFurnaceAPI>("Traktori.IndustrialFurnace");

            if (automate != null && industrialFurnaceAPI != null)
            {
                automate.AddFactory(new IndustrialFurnaceAutomationFactory(industrialFurnaceAPI));
            }
            else
            {
                if (automate is null)
                {
                    Monitor.Log("Could not detect Automate. Are you sure you have installed everything correctly?", LogLevel.Error);
                }
                if (industrialFurnaceAPI is null)
                {
                    Monitor.Log("Could not detect Industrial Furnace. Are you sure you have installed everything correctly?", LogLevel.Error);
                }
            }
        }
 public IndustrialFurnaceAutomationFactory(IIndustrialFurnaceAPI api)
 {
     this.industrialFurnaceAPI = api;
 }