public VagueRelationship(List <Property> properties) { foreach (Property property in properties) { switch (property.Name) { case "hfid": HfId = Convert.ToInt32(property.Value); break; case "war_buddy": case "athlete_buddy": case "childhood_friend": case "persecution_grudge": case "supernatural_grudge": case "religious_persecution_grudge": case "artistic_buddy": case "jealous_obsession": case "grudge": case "jealous_relationship_grudge": case "scholar_buddy": case "business_rival": case "atheletic_rival": Type = GetVagueRelationshipTypeByProperty(property, property.Name); break; } } }
public HistoricalEventRelationShip(List <Property> properties, World world) : base(properties, world) { Type = "historical event relationship"; Seconds72 = -1; foreach (Property property in properties) { switch (property.Name) { case "event": Id = Convert.ToInt32(property.Value); break; case "source_hf": SourceHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "target_hf": TargetHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "year": Year = Convert.ToInt32(property.Value); break; case "relationship": RelationshipType = VagueRelationship.GetVagueRelationshipTypeByProperty(property, property.Value); break; } } SourceHf.AddEvent(this); TargetHf.AddEvent(this); }
public VagueRelationship(List <Property> properties) { foreach (Property property in properties) { switch (property.Name) { case "hfid": HfId = Convert.ToInt32(property.Value); break; case "war_buddy": property.Known = true; Type = VagueRelationshipType.WarBuddy; break; case "athlete_buddy": property.Known = true; Type = VagueRelationshipType.AthleteBuddy; break; case "childhood_friend": property.Known = true; Type = VagueRelationshipType.ChildhoodFriend; break; case "persecution_grudge": property.Known = true; Type = VagueRelationshipType.PersecutionGrudge; break; case "supernatural_grudge": property.Known = true; Type = VagueRelationshipType.SupernaturalGrudge; break; case "religious_persecution_grudge": property.Known = true; Type = VagueRelationshipType.ReligiousPersecutionGrudge; break; case "artistic_buddy": property.Known = true; Type = VagueRelationshipType.ArtisticBuddy; break; case "jealous_obsession": property.Known = true; Type = VagueRelationshipType.JealousObsession; break; case "grudge": property.Known = true; Type = VagueRelationshipType.Grudge; break; case "jealous_relationship_grudge": property.Known = true; Type = VagueRelationshipType.JealousRelationshipGrudge; break; case "scholar_buddy": property.Known = true; Type = VagueRelationshipType.ScholarBuddy; break; case "business_rival": property.Known = true; Type = VagueRelationshipType.BusinessRival; break; case "atheletic_rival": property.Known = true; Type = VagueRelationshipType.AthleticRival; break; } } }
public static VagueRelationshipType GetVagueRelationshipTypeByProperty(Property property, string key) { VagueRelationshipType type = VagueRelationshipType.Unknown; switch (key) { case "war_buddy": type = VagueRelationshipType.WarBuddy; break; case "athlete_buddy": type = VagueRelationshipType.AthleteBuddy; break; case "childhood_friend": type = VagueRelationshipType.ChildhoodFriend; break; case "persecution_grudge": type = VagueRelationshipType.PersecutionGrudge; break; case "supernatural_grudge": type = VagueRelationshipType.SupernaturalGrudge; break; case "religious_persecution_grudge": type = VagueRelationshipType.ReligiousPersecutionGrudge; break; case "artistic_buddy": type = VagueRelationshipType.ArtisticBuddy; break; case "jealous_obsession": type = VagueRelationshipType.JealousObsession; break; case "grudge": type = VagueRelationshipType.Grudge; break; case "jealous_relationship_grudge": type = VagueRelationshipType.JealousRelationshipGrudge; break; case "scholar_buddy": type = VagueRelationshipType.ScholarBuddy; break; case "business_rival": type = VagueRelationshipType.BusinessRival; break; case "atheletic_rival": type = VagueRelationshipType.AthleticRival; break; case "lover": type = VagueRelationshipType.Lover; break; case "former_lover": type = VagueRelationshipType.FormerLover; break; case "lieutenant": type = VagueRelationshipType.Lieutenant; break; default: property.Known = false; break; } if (type != VagueRelationshipType.Unknown) { property.Known = true; } return(type); }