Пример #1
0
        public override void Entry(IModHelper helper)
        {
            Utils.Initialize(Helper, Monitor, ModManifest);

            Helper.Events.GameLoop.GameLaunched += GameLoop_GameLaunched;
            Helper.Events.GameLoop.SaveLoaded   += GameLoop_SaveLoaded;

            InitializeEditors();

            LegendaryFishPatches.Initialize(Helper, Monitor);

            if (_isAndroid)
            {
                AndroidShopMenuPatch.Initialize(Helper, Monitor);
                Helper.Events.Display.MenuChanged += AndroidPlsHaveMercyOnMe;
            }

            new ReturnTrain(Helper, Monitor);
            new InteractionHandler(Helper, Monitor);

            Config = Helper.ReadConfig <ModConfig>();

            string dataPath = Path.Combine("data", "data.json");

            Data = helper.Data.ReadJsonFile <ModData>(dataPath);

            //disable if recatch legendary fish is installed
            if (Config.EnableRecatchWorthlessUndonatedLegends &&
                !Helper.ModRegistry.IsLoaded("cantorsdust.RecatchLegendaryFish"))
            {
                Monitor.Log("Enabling the recatch of legendaries...");
                RecatchLegends = true;
            }
            else
            {
                Monitor.Log("Disabling the recatch of legendaries from this mod. (if cantorsdust.RecatchLegendaryFish is installed, behaviour will default to that mod's)");
                RecatchLegends = false;
            }


            if (Config.EnableDebugCommands)
            {
                if (_isAndroid)
                {
                    Helper.ConsoleCommands.Add("donatefish", "", AndroidDonateFish);
                }
                else
                {
                    Helper.ConsoleCommands.Add("donatefish", "", OpenDonationMenuCommand);
                }

                Helper.ConsoleCommands.Add("aquariumprogress", "", OpenAquariumCollectionMenu);
                Helper.ConsoleCommands.Add("removedonatedfish", "", RemoveDonatedFish);
            }
        }
Пример #2
0
        public override void Entry(IModHelper helper)
        {
            Utils.Initialize(Helper, Monitor, ModManifest);

            Helper.Events.GameLoop.GameLaunched += GameLoop_GameLaunched;
            Helper.Events.GameLoop.SaveLoaded   += GameLoop_SaveLoaded;
            Helper.Events.GameLoop.UpdateTicked += GameLoop_UpdateTicked;
            Helper.Events.GameLoop.DayStarted   += GameLoop_DayStarted;
            Helper.Events.Input.ButtonPressed   += Input_ButtonPressed;

            if (_isAndroid)
            {
                AndroidShopMenuPatch.Initialize(Helper, Monitor);
                Helper.Events.Display.MenuChanged += AndroidPlsHaveMercyOnMe;
            }

            new ReturnTrain(Helper, Monitor);
            new InteractionHandler(Helper, Monitor);

            Config = Helper.ReadConfig <ModConfig>();

            string dataPath = Path.Combine("data", "data.json");

            Data = helper.Data.ReadJsonFile <ModData>(dataPath);

            LegendaryFishPatches.Initialize(Helper, Monitor);


            if (Config.EnableDebugCommands)
            {
                if (_isAndroid)
                {
                    Helper.ConsoleCommands.Add("donatefish", "", AndroidDonateFish);
                }
                else
                {
                    Helper.ConsoleCommands.Add("donatefish", "", OpenDonationMenuCommand);
                }

                Helper.ConsoleCommands.Add("aquariumprogress", "", OpenAquariumCollectionMenu);
                Helper.ConsoleCommands.Add("removedonatedfish", "", RemoveDonatedFish);
            }
        }