Example #1
0
        public override void OnApplicationStart()
        {
            Instance = this;

            Directory.CreateDirectory("./UserData/FavCatImport");

            ClassInjector.RegisterTypeInIl2Cpp <CustomPickerList>();
            ClassInjector.RegisterTypeInIl2Cpp <CustomPicker>();

            ApiSnifferPatch.DoPatch();

            FavCatSettings.RegisterSettings();

            MelonLogger.Log("Creating database");
            Database = new LocalStoreDatabase(FavCatSettings.DatabasePath, FavCatSettings.ImageCachePath);

            Database.ImageHandler.TrimCache(FavCatSettings.MaxCacheSizeBytes).NoAwait();

            ExpansionKitApi.RegisterWaitConditionBeforeDecorating(WaitForInitDone());

            foreach (var methodInfo in typeof(AvatarPedestal).GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public).Where(it => it.Name.StartsWith("Method_Private_Void_ApiContainer_") && it.GetParameters().Length == 1))
            {
                Harmony.Patch(methodInfo, new HarmonyMethod(typeof(FavCatMod), nameof(AvatarPedestalPatch)));
            }
        }
Example #2
0
        public override void OnApplicationStart()
        {
            ClassInjector.RegisterTypeInIl2Cpp <CustomParticleSettingsUiHandler>();

            MelonPreferences.CreateCategory(SettingsCategory, "Particle and DynBone limits").CreateEntry("dummy", false, "ignore this", true);

            ExpansionKitApi.RegisterWaitConditionBeforeDecorating(WaitForUixPrefabsAndRegister());
        }
Example #3
0
        public override void OnApplicationStart()
        {
            Instance = this;

            Directory.CreateDirectory("./UserData/FavCatImport");

            ClassInjector.RegisterTypeInIl2Cpp <CustomPickerList>();
            ClassInjector.RegisterTypeInIl2Cpp <CustomPicker>();

            ApiSnifferPatch.DoPatch();

            FavCatSettings.RegisterSettings();

            MelonLogger.Log("Creating database");
            Database = new LocalStoreDatabase(FavCatSettings.DatabasePath, FavCatSettings.ImageCachePath);

            Database.ImageHandler.TrimCache(FavCatSettings.MaxCacheSizeBytes).NoAwait();

            ExpansionKitApi.RegisterWaitConditionBeforeDecorating(WaitForInitDone());
        }
 public override void OnApplicationStart()
 {
     ExpansionKitApi.RegisterWaitConditionBeforeDecorating(WaitAndRegisterEmojiButtons());
 }
Example #5
0
 private static void setupUIExpansion()
 {
     ExpansionKitApi.RegisterWaitConditionBeforeDecorating(createButton());
 }