Esempio n. 1
0
 public void FinalizeInit()
 {
     LogSimple.FlushToFileAndOpen();
     this.researchManager.ReapplyAllMods();
     MessagesRepeatAvoider.Reset();
     GameComponentUtility.FinalizeInit();
     Current.ProgramState = ProgramState.Playing;
 }
Esempio n. 2
0
 public static void FlushToStandardLog()
 {
     if (LogSimple.messages.Count != 0)
     {
         string text = LogSimple.CompiledLog();
         Log.Message(text, false);
         LogSimple.messages.Clear();
     }
 }
Esempio n. 3
0
        public static void FlushToStandardLog()
        {
            if (LogSimple.messages.Count == 0)
            {
                return;
            }
            string text = LogSimple.CompiledLog();

            Log.Message(text);
            LogSimple.messages.Clear();
        }
Esempio n. 4
0
 public void RegisterForCrossRefResolve(IExposable s)
 {
     if (Scribe.mode != LoadSaveMode.LoadingVars)
     {
         Log.Error("Registered " + s + " for cross ref resolve, but current mode is " + Scribe.mode);
     }
     else if (s != null)
     {
         if (DebugViewSettings.logMapLoad)
         {
             LogSimple.Message("RegisterForCrossRefResolve " + ((s != null) ? s.GetType().ToString() : "null"));
         }
         crossReferencingExposables.Add(s);
     }
 }
Esempio n. 5
0
 public static void FlushToFileAndOpen()
 {
     if (LogSimple.messages.Count != 0)
     {
         string value = LogSimple.CompiledLog();
         string path  = GenFilePaths.SaveDataFolderPath + Path.DirectorySeparatorChar + "LogSimple.txt";
         using (StreamWriter streamWriter = new StreamWriter(path, false))
         {
             streamWriter.Write(value);
         }
         LongEventHandler.ExecuteWhenFinished(delegate
         {
             Application.OpenURL(path);
         });
         LogSimple.messages.Clear();
     }
 }
Esempio n. 6
0
 public void ResolveAllCrossReferences()
 {
     Scribe.mode = LoadSaveMode.ResolvingCrossRefs;
     if (DebugViewSettings.logMapLoad)
     {
         LogSimple.Message("==================Register the saveables all so we can find them later");
     }
     foreach (IExposable crossReferencingExposable in crossReferencingExposables)
     {
         ILoadReferenceable loadReferenceable = crossReferencingExposable as ILoadReferenceable;
         if (loadReferenceable != null)
         {
             if (DebugViewSettings.logMapLoad)
             {
                 LogSimple.Message("RegisterLoaded " + loadReferenceable.GetType());
             }
             loadedObjectDirectory.RegisterLoaded(loadReferenceable);
         }
     }
     if (DebugViewSettings.logMapLoad)
     {
         LogSimple.Message("==================Fill all cross-references to the saveables");
     }
     foreach (IExposable crossReferencingExposable2 in crossReferencingExposables)
     {
         if (DebugViewSettings.logMapLoad)
         {
             LogSimple.Message("ResolvingCrossRefs ExposeData " + crossReferencingExposable2.GetType());
         }
         try
         {
             Scribe.loader.curParent          = crossReferencingExposable2;
             Scribe.loader.curPathRelToParent = null;
             crossReferencingExposable2.ExposeData();
         }
         catch (Exception arg)
         {
             Log.Error("Could not resolve cross refs: " + arg);
         }
     }
     Scribe.loader.curParent          = null;
     Scribe.loader.curPathRelToParent = null;
     Scribe.mode = LoadSaveMode.Inactive;
     Clear(errorIfNotEmpty: true);
 }
 public void RegisterForCrossRefResolve(IExposable s)
 {
     if (Scribe.mode != LoadSaveMode.LoadingVars)
     {
         Log.Error(string.Concat(new object[]
         {
             "Registered ",
             s,
             " for cross ref resolve, but current mode is ",
             Scribe.mode
         }), false);
     }
     else if (s != null)
     {
         if (DebugViewSettings.logMapLoad)
         {
             LogSimple.Message("RegisterForCrossRefResolve " + ((s == null) ? "null" : s.GetType().ToString()));
         }
         this.crossReferencingExposables.Add(s);
     }
 }
Esempio n. 8
0
 public static void BeginTabMessage(string text)
 {
     LogSimple.Message(text);
     LogSimple.tabDepth++;
 }