Beispiel #1
0
        public static void Initialize()
        {
            Directory.CreateDirectory(Path =
#if ENV_ANDROID
#if Survivalcraft
                                          //ModsManager.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, "Survivalcraft/Mods"))
                                          //ModsManager.Combine(((AndroidSdCardExternalContentProvider)ExternalContentManager.m_providers).m_rootDirectory, "Survivalcraft/Mods"))
                                          //ModsManager.Combine(Storage.GetDirectoryName(Window.Activity.GetExternalFilesDir(Environment.DirectoryPictures).AbsolutePath), "Survivalcraft/Mods"))
                                          "/sdcard/Survivalcraft/Mods"
#elif Bugs
                                          "/sdcard/Bugs/Mods"
#else
                                          "/sdcard/RuthlessConquest/Mods"
#endif
#elif USE_DATA_PATH
                                          Storage.GetSystemPath("data:Mods")
#else
                                          "Mods"
#endif
                                      );
            ModsManager.Initialize();
            ContentCache.AddPackage(Storage.OpenFile("app:Content.pak", OpenFileMode.Read));
            for (var enumerator = ModsManager.GetEntries(".pak").GetEnumerator(); enumerator.MoveNext();)
            {
                ContentCache.AddPackage(enumerator.Current.Stream);
            }
        }
Beispiel #2
0
 public static void Initialize()
 {
     ModsManager.Initialize();
     ContentCache.AddPackage("app:/Content.pak", Encoding.UTF8.GetBytes(Pad()), new byte[1]
     {
         63
     });
     LanguageControl.init(ModsManager.modSettings.languageType);
     List <FileEntry> .Enumerator enumerator = ModsManager.GetEntries(".pak").GetEnumerator();
     while (enumerator.MoveNext())
     {
         ContentCache.AddPackage(() => enumerator.Current.Stream, Encoding.UTF8.GetBytes(Pad()), new byte[1]
         {
             63
         });
     }
 }