Exemplo n.º 1
0
 private void SetCentreAndLieges(CK2Title title)
 {
     if (RankedCentres == null)
     {
         RankedCentres = new Dictionary <TitleRank, CK2Title>();
     }
     RankedCentres[title.Rank] = title;
     if (title.LiegeTitle != null)
     {
         SetCentreAndLieges(title.LiegeTitle);
     }
 }
Exemplo n.º 2
0
 internal void AddBaronData(PdxSublist data, CK2Title parent)
 {
     LiegeTitleID = parent.Name;
     Type         = data.KeyValuePairs["type"];
     Buildings    = new List <CK2Building>();
     foreach (var building in World.CK2Buildings)
     {
         if (data.BoolValues.ContainsKey(building.Key) && data.BoolValues[building.Key].Single())
         {
             Buildings.Add(building.Value);
         }
     }
 }
Exemplo n.º 3
0
 private void AddTitleCultures(Dictionary <CK2Title, int> culturedTitles, CK2Title title)
 {
     if (title == null)
     {
         return;
     }
     if (!culturedTitles.ContainsKey(title))
     {
         culturedTitles[title] = 0;
     }
     culturedTitles[title]++;
     AddTitleCultures(culturedTitles, title.LiegeTitle);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Does this character directly own this title?
 /// </summary>
 /// <param name="title"></param>
 /// <returns></returns>
 public bool DoesDirectlyOwn(CK2Title title)
 {
     return(Titles.Contains(title));
 }
Exemplo n.º 5
0
 public bool IsDirectDejureLiege(CK2Title liege)
 {
     return(DejureLiegeTitle != null && (DejureLiegeTitle == liege || DejureLiegeTitle.IsDirectDejureLiege(liege)));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Returns true if the given title is the dejure liege of this title
 /// </summary>
 /// <param name="title"></param>
 /// <returns></returns>
 public bool IsDejureVassalOf(CK2Title title)
 {
     return(title == GetDejureLiege(title.Rank));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Returns true if the given title is the liege of this title
 /// </summary>
 /// <param name="title"></param>
 /// <returns></returns>
 public bool IsVassalOf(CK2Title title)
 {
     return(title == GetLiege(title.Rank));
 }
Exemplo n.º 8
0
 public void AddTitle(CK2Title title)
 {
     CK2Titles.Add(title.Name, title);
 }
Exemplo n.º 9
0
 internal void AddIndependentTitle(CK2Title ck2Title)
 {
     CK2IndependentTitles[ck2Title.Name] = ck2Title;
 }