Exemple #1
0
        /// <summary>The mod entry point.</summary>
        /// <param name="helper" />
        public override void Entry(IModHelper helper)
        {
            DeclareGlobals(helper);

            modAssetEditor = new AssetEditor();
            helper.Content.AssetEditors.Add(modAssetEditor);

            helper.Events.GameLoop.GameLaunched += (sender, args) =>
            {
                CheckForContentPatcherAPI();
                ContentPackHelper.RegisterTokens();
                ContentPackHelper.CheckForValidContentPacks();
                ModConfigMenuHelper.TryLoadModConfigMenu();
                LoadAssets();
            };
            helper.Events.GameLoop.SaveLoaded += (sender, args) =>
            {
                ContentPackHelper.ReloadContentPacks();
                ContentPackHelper.ProcessConfigOverrides();
                CheckBundleData();
            };
            helper.Events.GameLoop.DayStarted += (sender, args) =>
            {
                ContentPackHelper.ProcessDailyUpdates();
                CheckBundleData();
            };

            AddConsoleCommands();

            ApplyPatches();
        }
Exemple #2
0
 private void LoadAssets()
 {
     Monitor.Log(AssetEditor.LoadAssets() ? "Loaded assets" : "Failed to load assets");
 }