public static void RegisterQuest(QuestInformation questInformation) { if (Quests.ContainsKey(questInformation.Id) && Quests[questInformation.Id] != questInformation) { Logging.Log.Warning($"Potential conflict registering new quest. Quest {questInformation.Id} has been registered by two separate mods." + "Only the last registered one will be used."); } Quests[questInformation.Id] = questInformation; }
/// <summary> /// Registers a quest to be inserted into the game. /// </summary> /// <param name="questInformation"> /// The information on the quest to insert. /// </param> public static void RegisterQuest(QuestInformation questInformation) { if (Quests.ContainsKey(questInformation.Id) && Quests[questInformation.Id] != questInformation) { Log.Warning( $"Potential conflict registering new quest. Quest {questInformation.Id} has been registered by two separate mods." + "Only the last registered one will be used."); } questInformation.Id = IdManager.AssignNewIdSequential(Game1.content.Load <Dictionary <int, string> >("Data\\Quests")); Quests[questInformation.Id] = questInformation; }