예제 #1
0
        public static void ResetPersistent()
        {
            FileInfo fileInfo = new FileInfo(GenFilePaths.ConceptKnowledgeFilePath);

            if (fileInfo.Exists)
            {
                fileInfo.Delete();
            }
            PlayerKnowledgeDatabase.data = new PlayerKnowledgeDatabase.ConceptKnowledge();
        }
예제 #2
0
 public static void ReloadAndRebind()
 {
     PlayerKnowledgeDatabase.data = DirectXmlLoader.ItemFromXmlFile <PlayerKnowledgeDatabase.ConceptKnowledge>(GenFilePaths.ConceptKnowledgeFilePath, true);
     foreach (ConceptDef current in DefDatabase <ConceptDef> .AllDefs)
     {
         if (!PlayerKnowledgeDatabase.data.knowledge.ContainsKey(current))
         {
             Log.Warning("Knowledge data was missing key " + current + ". Adding it...", false);
             PlayerKnowledgeDatabase.data.knowledge.Add(current, 0f);
         }
     }
 }