public static ThreadSafeLinkedList <T> TakeResolvedRefList <T>(CrossRefHandler __instance, string toAppendToPathRelToParent) { string text = Scribe.loader.curPathRelToParent; if (!toAppendToPathRelToParent.NullOrEmpty()) { text = text + "/" + toAppendToPathRelToParent; } return(TakeResolvedRefList <T>(__instance, text, Scribe.loader.curParent)); }
public static ThreadSafeLinkedList <T> TakeResolvedRefList <T>(CrossRefHandler __instance, string pathRelToParent, IExposable parent) { List <string> list = __instance.loadIDs.TakeList(pathRelToParent, parent); ThreadSafeLinkedList <T> list2 = new ThreadSafeLinkedList <T>(); if (list != null) { for (int i = 0; i < list.Count; i++) { list2.Add(__instance.loadedObjectDirectory.ObjectWithLoadID <T>(list[i])); } } return(list2); }
public static void load(ref List <Thing> thingsToLoad, string fileLocation, Thing currentSource) { Log.Message("ScribeINIT, loding from:" + fileLocation); Scribe.loader.InitLoading(fileLocation); //Scribe.EnterNode("Stargate"); Log.Message("DeepProfiler.Start()"); DeepProfiler.Start("Load non-compressed things"); // List<Thing> list2 = (List<Thing>)null; Log.Message("Scribe_Collections.LookList"); Scribe_Collections.Look <Thing>(ref thingsToLoad, "things", LookMode.Deep); Log.Message("List1Count:" + thingsToLoad.Count); Log.Message("DeepProfiler.End()"); DeepProfiler.End(); //Scribe.ExitNode(); Scribe.mode = LoadSaveMode.Inactive; //Log.Message("list: " + thingsToLoad.Count.ToString()); Log.Message("Exit Node"); //Scribe.ExitNode(); Log.Message("ResolveAllCrossReferences"); //CrossRefHandler var c = new CrossRefHandler(); c.ResolveAllCrossReferences(); Log.Message("DoAllPostLoadInits"); var p = new PostLoadIniter(); p.DoAllPostLoadInits(); Log.Message("Return"); }