Esempio n. 1
0
        /*********
        ** Public methods
        *********/
        /// <summary>The mod entry point, called after the mod is first loaded.</summary>
        /// <param name="helper">Provides methods for interacting with the mod directory, such as read/writing a config file or custom JSON files.</param>
        public override void Entry(IModHelper helper)
        {
            // initialize fields
            Instance = this;
            log      = new(this);
            UID      = ModManifest.UniqueID;

            // load config
            Config = Helper.ReadConfig <ModConfig>();
            ModConfig.VerifyConfigValues(Config, Instance);

            // hook events
            Helper.Events.GameLoop.GameLaunched += OnGameLaunched;
            Helper.Events.GameLoop.SaveLoaded   += OnSaveLoaded;
            Helper.Events.GameLoop.DayStarted   += delegate { CoreLogic.IncreaseTreeAges(); };
        }