示例#1
0
        public void ForceRefresh()
        {
            this.monitor.Log("Force refresh requested");

            QuestFrameworkMod.InvalidateCache();
            this.mod.QuestController.RefreshAllManagedQuestsInQuestLog();
            this.mod.QuestController.RefreshBulletinboardQuestOffer();
            this.mod.EventManager.Refreshed.Fire(new EventArgs(), this);
        }
        public void AddOffer(QuestOffer schedule)
        {
            if (QuestFrameworkMod.Instance.Status < State.LAUNCHING)
            {
                throw new InvalidOperationException($"Unable to add quest schedule in state `{QuestFrameworkMod.Instance.Status}`.");
            }

            this.Offers.Add(schedule);
            QuestFrameworkMod.InvalidateCache();
        }
示例#3
0
 internal QuestApi(QuestFrameworkMod mod)
 {
     this.mod     = mod;
     this.monitor = mod.Monitor;
     this.Events  = new QuestFrameworkEvents(this.mod.EventManager);
 }
示例#4
0
 internal static void InvalidateCache(string name, string[] args)
 {
     QuestFrameworkMod.InvalidateCache();
     Monitor.Log("Quest assets cache invalidated.", LogLevel.Info);
 }