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); } }
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); } }
public static void BeginTabMessage(string text) { LogSimple.Message(text); LogSimple.tabDepth++; }