public override void Entry(IModHelper helper) { _Monitor = Monitor; _Helper = helper; Config conf = helper.ReadConfig <Config>(); Pests.Init(conf); Cultivation.Init(conf); Composting.Init(conf); SMC = new SeedMakerController(helper, Monitor); SMC.HeldItemRemoved += SeedMakerController_HeldItemRemoved; helper.Events.Display.RenderingHud += Display_RenderingHud; helper.Events.GameLoop.DayStarted += GameLoop_DayStarted; helper.Events.Input.ButtonPressed += Input_ButtonPressed; helper.Events.GameLoop.UpdateTicked += GameLoop_UpdateTicked; helper.Events.GameLoop.Saving += GameLoop_Saving; helper.Events.GameLoop.SaveLoaded += GameLoop_SaveLoaded; helper.Events.GameLoop.DayEnding += GameLoop_DayEnding; helper.Events.Display.MenuChanged += Display_MenuChanged; helper.Events.World.BuildingListChanged += World_BuildingListChanged; //helper.Events.Player.Warped += Player_Warped; Helper.ConsoleCommands.Add("cpc_clearcompost", "", (string arg1, string[] arg2) => { Composting.CompostAppliedDays.Clear(); Composting.ComposterDaysLeft.Clear(); Composting.ComposterCompostLeft.Clear(); }); Helper.ConsoleCommands.Add("cpc_clearcomposterinv", "", (string arg1, string[] arg2) => { Composting.ComposterContents.Clear(); }); Helper.ConsoleCommands.Add("cpc_clearpests", "", (string arg1, string[] arg2) => { Pests.pests.Clear(); }); Helper.ConsoleCommands.Add("cpc_cleartraits", "", (string arg1, string[] arg2) => { Cultivation.CropSeeds.Clear(); Cultivation.CropTraits.Clear(); }); }
public override void Entry(IModHelper helper) { _Monitor = Monitor; _Helper = helper; Config conf = helper.ReadConfig <Config>(); Pests.Init(conf); Cultivation.Init(conf); helper.Events.Display.RenderingHud += Display_RenderingHud; helper.Events.GameLoop.DayStarted += GameLoop_DayStarted; helper.Events.Input.ButtonPressed += Input_ButtonPressed; helper.Events.GameLoop.Saving += GameLoop_Saving; helper.Events.GameLoop.SaveLoaded += GameLoop_SaveLoaded; helper.Events.GameLoop.DayEnding += GameLoop_DayEnding; }