public static void LoadAllBios()
 {
     foreach (PawnBio current in DirectXmlLoader.LoadXmlDataInResourcesFolder <PawnBio>("Backstories/Solid"))
     {
         current.name.ResolveMissingPieces(null);
         if (current.childhood == null || current.adulthood == null)
         {
             PawnNameDatabaseSolid.AddPlayerContentName(current.name, current.gender);
         }
         else
         {
             current.PostLoad();
             current.ResolveReferences();
             foreach (string current2 in current.ConfigErrors())
             {
                 Log.Error(current2, false);
             }
             SolidBioDatabase.allBios.Add(current);
             current.childhood.shuffleable = false;
             current.childhood.slot        = BackstorySlot.Childhood;
             current.adulthood.shuffleable = false;
             current.adulthood.slot        = BackstorySlot.Adulthood;
             BackstoryHardcodedData.InjectHardcodedData(current);
             BackstoryDatabase.AddBackstory(current.childhood);
             BackstoryDatabase.AddBackstory(current.adulthood);
         }
     }
 }
 public static void LoadAllBios()
 {
     foreach (PawnBio item in DirectXmlLoader.LoadXmlDataInResourcesFolder <PawnBio>("Backstories/Solid"))
     {
         item.name.ResolveMissingPieces(null);
         if (item.childhood == null || item.adulthood == null)
         {
             PawnNameDatabaseSolid.AddPlayerContentName(item.name, item.gender);
         }
         else
         {
             item.PostLoad();
             item.ResolveReferences();
             foreach (string item2 in item.ConfigErrors())
             {
                 Log.Error(item2);
             }
             SolidBioDatabase.allBios.Add(item);
             item.childhood.shuffleable = false;
             item.childhood.slot        = BackstorySlot.Childhood;
             item.adulthood.shuffleable = false;
             item.adulthood.slot        = BackstorySlot.Adulthood;
             BackstoryHardcodedData.InjectHardcodedData(item);
             BackstoryDatabase.AddBackstory(item.childhood);
             BackstoryDatabase.AddBackstory(item.adulthood);
         }
     }
 }
Example #3
0
 public static void LoadAllBios()
 {
     foreach (PawnBio pawnBio in DirectXmlLoader.LoadXmlDataInResourcesFolder <PawnBio>("Backstories/Solid"))
     {
         pawnBio.name.ResolveMissingPieces(null);
         if (pawnBio.childhood == null || pawnBio.adulthood == null)
         {
             PawnNameDatabaseSolid.AddPlayerContentName(pawnBio.name, pawnBio.gender);
         }
         else
         {
             pawnBio.PostLoad();
             pawnBio.ResolveReferences();
             foreach (string text in pawnBio.ConfigErrors())
             {
                 Log.Error(text, false);
             }
             SolidBioDatabase.allBios.Add(pawnBio);
             pawnBio.childhood.shuffleable = false;
             pawnBio.childhood.slot        = BackstorySlot.Childhood;
             pawnBio.adulthood.shuffleable = false;
             pawnBio.adulthood.slot        = BackstorySlot.Adulthood;
             BackstoryHardcodedData.InjectHardcodedData(pawnBio);
             BackstoryDatabase.AddBackstory(pawnBio.childhood);
             BackstoryDatabase.AddBackstory(pawnBio.adulthood);
         }
     }
 }
Example #4
0
 public static void ReloadAllBackstories()
 {
     foreach (Backstory current in DirectXmlLoader.LoadXmlDataInResourcesFolder <Backstory>("Backstories/Shuffled"))
     {
         current.PostLoad();
         current.ResolveReferences();
         foreach (string current2 in current.ConfigErrors(false))
         {
             Log.Error(current.Title + ": " + current2);
         }
         BackstoryDatabase.AddBackstory(current);
     }
     SolidBioDatabase.LoadAllBios();
 }
Example #5
0
 public static void ReloadAllBackstories()
 {
     foreach (Backstory item in DirectXmlLoader.LoadXmlDataInResourcesFolder <Backstory>("Backstories/Shuffled"))
     {
         item.PostLoad();
         item.ResolveReferences();
         foreach (string item2 in item.ConfigErrors(false))
         {
             Log.Error(item.Title + ": " + item2);
         }
         BackstoryDatabase.AddBackstory(item);
     }
     SolidBioDatabase.LoadAllBios();
 }
 public static void ReloadAllBackstories()
 {
     foreach (Backstory backstory in DirectXmlLoader.LoadXmlDataInResourcesFolder <Backstory>("Backstories/Shuffled"))
     {
         backstory.PostLoad();
         backstory.ResolveReferences();
         foreach (string str in backstory.ConfigErrors(false))
         {
             Log.Error(backstory.title + ": " + str, false);
         }
         BackstoryDatabase.AddBackstory(backstory);
     }
     SolidBioDatabase.LoadAllBios();
 }