public void RemovePart(QuestPart part) { if (!parts.Contains(part)) { Log.Error("Tried to remove QuestPart which doesn't exist: " + part.ToStringSafe() + ", quest=" + this.ToStringSafe()); return; } part.quest = null; parts.Remove(part); }
public void AddPart(QuestPart part) { if (parts.Contains(part)) { Log.Error("Tried to add the same QuestPart twice: " + part.ToStringSafe() + ", quest=" + this.ToStringSafe()); return; } part.quest = this; parts.Add(part); }