Beispiel #1
0
 static void Postfix(MapFileCompressor __instance, ref IEnumerable <Thing> __result)
 {
     if (!SaveCompression.doSaveCompression)
     {
         return;
     }
     __result = thingsToSpawn[__instance.map.uniqueID];
 }
Beispiel #2
0
 static bool Prefix(MapFileCompressor __instance)
 {
     if (!SaveCompression.doSaveCompression)
     {
         return(true);
     }
     SaveCompression.Load(__instance.map);
     return(false);
 }
Beispiel #3
0
        static void Postfix(MapFileCompressor __instance, ref IEnumerable <Thing> __result)
        {
            if (!SaveCompression.doSaveCompression)
            {
                return;
            }

            MultiplayerMapComp comp = __instance.map.MpComp();

            __result = comp.tempLoadedThings;
            comp.tempLoadedThings = null;
        }
        static void Postfix(MapFileCompressor __instance, ref IEnumerable <Thing> __result)
        {
            if (!SaveCompression.doSaveCompression)
            {
                return;
            }

            int mapId = __instance.map.uniqueID;

            __result = thingsToSpawn[mapId];
            thingsToSpawn.Remove(mapId);
        }
Beispiel #5
0
        static bool Prefix(MapFileCompressor __instance)
        {
            if (!SaveCompression.doSaveCompression)
            {
                return(true);
            }

            if (Scribe.mode == LoadSaveMode.LoadingVars)
            {
                SaveCompression.Load(__instance.map);
            }
            else if (Scribe.mode == LoadSaveMode.Saving)
            {
                SaveCompression.Save(__instance.map);
            }

            return(false);
        }
Beispiel #6
0
 static bool Prefix(MapFileCompressor __instance) => !SaveCompression.doSaveCompression;