Exemplo n.º 1
0
        /*********
        ** Entry
        *********/
        /// <summary> The mod's entry point. </summary>
        /// <param name="helper"> Provides helper methods for mods. </param>
        public override void Entry(IModHelper helper)
        {
            RefMod.ModHelper  = helper;
            RefMod.ModMonitor = this.Monitor;
            RefMod.i18n       = helper.Translation;
            RefMod.Config     = this.Helper.ReadConfig <ModConfig>();

            // use instances
            _AlchemyFramework    = new AlchemyFramework();
            _Edits               = new AvailableEdits();
            _TileActionFramework = new TileActionFramework();
            _TilesheetCompat     = new TilesheetCompatibility();

            /* other methods */
            ContentPackData();

            /* Hook Events */
            helper.Events.GameLoop.SaveLoaded            += this.SaveLoaded;
            helper.Events.GameLoop.UpdateTicked          += this.UpdateTicked;
            helper.Events.Multiplayer.ModMessageReceived += this.ModMessageReceived;
            helper.Events.Input.ButtonPressed            += this.ButtonPressed;
            helper.Events.GameLoop.DayStarted            += this.DayStarted;

            /* Console Commands */
            helper.ConsoleCommands.Add("bve_purgesavedeletedtiles", "Removes the deleted tiles on a map from the Delete Tile Actions " +
                                       "\n\n Best used when you are changing maps mid save (and that map has the Delete Tile Actions)", this.ConsoleCommands);
            helper.ConsoleCommands.Add("bve_alchemy", "Alchemy related commands \n\n" +
                                       "Usage: bve_alchemy <args> \n" +
                                       "<args>:\n" +
                                       "----------\n" +
                                       "trigger: unlock and trigger the alchemy menu \n\n" +
                                       "Example Usage:\n" +
                                       "bve_alchemy trigger", this.ConsoleCommands);
        }
Exemplo n.º 2
0
        /*********
        ** Entry
        *********/
        public override void Entry(IModHelper helper)
        {
            // set 'i18n' as 'helper.Translation'
            this.i18n = helper.Translation;

            /// <summary> create instance of TileActionFramework class <see cref="TileActionFramework"/> </summary>
            TileActionFramework = new TileActionFramework(helper, Monitor);

            /* other methods */
            ContentPackData();

            /* Helper Events */
            helper.Events.GameLoop.SaveLoaded            += this.SaveLoaded;
            helper.Events.GameLoop.UpdateTicked          += this.UpdateTicked;
            helper.Events.Multiplayer.ModMessageReceived += this.ModMessageReceived;
            helper.Events.Input.ButtonPressed            += this.ButtonPressed;

            /* Console Commands */
            helper.ConsoleCommands.Add("bve_purgesavedeletedtiles", "Removes the deleted tiles on a map from the Delete Tile Actions " +
                                       "\n\n Best used when you are changing maps mid save (and that map has the Delete Tile Actions)", this.ConsoleCommands_PurgeSaveDeletedTiles);
        }