public static void ExposeDataPostfix(AreaManager __instance)
 {
     if (Scribe.mode == LoadSaveMode.ResolvingCrossRefs)
     {
         AreaExtLoadHelper.OnResolveCrossRef(__instance.map.uniqueID);
     }
 }
Esempio n. 2
0
        public static void RegisterLoadIDReadFromXmlPostfix(LoadIDsWantedBank __instance, string targetLoadID, Type targetType, string pathRelToParent, IExposable parent)
        {
            if (targetType == typeof(Area) || targetType.IsInstanceOfType(typeof(Area)))
            {
                if (targetLoadID.StartsWith("@!"))
                {
                    Dictionary <string, ILoadReferenceable> allObjectByLoadID = fieldAllObjectsByLoadID.GetValue(fieldLoadedObjectDirectory.GetValue(Scribe.loader.crossRefs))
                                                                                as Dictionary <string, ILoadReferenceable>;

                    AreaExt areaExt = AreaExtLoadHelper.OnLoadingVars(targetLoadID);
                    if (!allObjectByLoadID.ContainsKey(targetLoadID))
                    {
                        allObjectByLoadID.Add(targetLoadID, areaExt);
                    }
                }
            }
        }