public void AddRelatedCulture(Culture other) { if (RelationChild.Contains(other)) { return; } RelationChild.Add(other); RelationParent.Add(other); other.AddRelatedCulture(this); }
public void RemoveSkillRelation(Skill skill) { if (!RelationChild.Contains(skill)) { return; } RelationChild.Remove(skill); RelationParent.Remove(skill); skill.RemoveSkillRelation(this); }
public void RemoveCultureRelation(Culture culture) { if (!RelationChild.Contains(this)) { return; } RelationChild.Remove(culture); RelationChild.Remove(culture); culture.RemoveCultureRelation(this); }
/// <summary> /// Helper function for adding skill relations. /// Adds to both this skill and to <paramref name="relation"/>. /// </summary> /// <param name="relation">The skill this skill is related to.</param> public void AddSkillRelation(Skill relation) { // if already in list, don't add it again. if (RelationChild.Contains(relation)) { return; } // add to this skill RelationChild.Add(relation); RelationParent.Add(relation); // add to the other skill, if it already exists in relation it // will not be added again. relation.AddSkillRelation(this); }