예제 #1
0
        public static void RegisterSettings()
        {
            ModPrefs.RegisterCategory(SettingsCategory, "Join Notifier");

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingShouldBlink, true, "Blink HUD icon on join");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingShouldPlaySound, true, "Play sound on join");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingJoinShowName, true, "Show joined names");

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingLeaveBlink, false, "Blink HUD icon on leave");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingLeaveSound, false, "Play sound on leave");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingLeaveShowName, false, "Show left names");

            ModPrefs.RegisterPrefFloat(SettingsCategory, SettingSoundVolume, .3f, "Sound volume (0-1)");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingUseUiMixer, true, "Notifications are affected by UI volume slider");
            ModPrefs.RegisterPrefInt(SettingsCategory, SettingTextSize, 36, "Text size (pt)");

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingNotifyPublic, false, "Notify in public instances");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingNotifyFriends, true, "Notify in friends[+] instances");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingNotifyPrivate, true, "Notify in private instances");

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingShowFriendsOnly, false, "Show friend join/leave only");
            ModPrefs.RegisterPrefString(SettingsCategory, SettingJoinIconColor, "127 191 255", "Join icon color (r g b)");
            ModPrefs.RegisterPrefString(SettingsCategory, SettingLeaveIconColor, "153 82 51", "Leave icon color (r g b)");

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingShowFriendsInDifferentColor, true, "Show friend names in different color");
            ModPrefs.RegisterPrefString(SettingsCategory, SettingFriendsJoinColor, "224 224 0", "Friend join name color (r g b)");
            ModPrefs.RegisterPrefString(SettingsCategory, SettingFriendsLeaveColor, "201 201 0", "Friend leave name color (r g b)");
        }
        public override void OnApplicationStart()
        {
            ModPrefs.RegisterCategory(ModCategory, "Mirror Resolution");
            ModPrefs.RegisterPrefInt(ModCategory, MaxResPref, 4096, "Max eye texture size");
            ModPrefs.RegisterPrefInt(ModCategory, MirrorMsaaPref, 0, "Mirror MSAA (0=default)");
            ModPrefs.RegisterPrefBool(ModCategory, AllMirrorsAutoPref, false, "Force auto resolution");

            unsafe
            {
                var methodInfo            = Il2CppType.Of <VRC_MirrorReflection>().GetMethod(nameof(VRC_MirrorReflection.GetReflectionData), BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
                var originalMethodPointer = *(IntPtr *)IL2CPP.il2cpp_method_get_from_reflection(methodInfo.Pointer);
                CompatHook((IntPtr)(&originalMethodPointer), typeof(MirrorResolutionUnlimiterMod).GetMethod(nameof(GetReflectionData), System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) !.MethodHandle.GetFunctionPointer());
            }

            OnModSettingsApplied();

            if (AppDomain.CurrentDomain.GetAssemblies().Any(it => it.GetName().Name.StartsWith("UIExpansionKit")))
            {
                MelonModLogger.Log("Adding UIExpansionKit buttons");
                typeof(UiExtensionsAddon)
                .GetMethod(nameof(UiExtensionsAddon.Init),
                           System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static) !
                .Invoke(null, new object[0]);
            }
        }
예제 #3
0
 public override void OnApplicationStart()
 {
     MelonModLogger.Log("Mod loaded.");
     ModPrefs.RegisterCategory(ModCategory, "Desktop Camera");
     ModPrefs.RegisterPrefInt(ModCategory, CameraSpeedPref, 5, "Basic camera speed");
     ModPrefs.RegisterPrefInt(ModCategory, CameraSpeedAltPref, 20, "Alt camera speed (ALT pressed)");
     OnModSettingsApplied();
 }
예제 #4
0
        public override void OnApplicationStart()
        {
            ModPrefs.RegisterCategory(CoreLimiterPrefCategory, "Core Limiter");
            ModPrefs.RegisterPrefInt(CoreLimiterPrefCategory, MaxCoresPref, 4, "Maximum cores");
            ModPrefs.RegisterPrefBool(CoreLimiterPrefCategory, SkipHyperThreadsPref, true, "Don't use both threads of a core");

            MelonModLogger.Log($"[CoreLimiter] Have {Environment.ProcessorCount} processor cores");

            ApplyAffinity();
        }
예제 #5
0
        public static void RegisterSettings()
        {
            ModPrefs.RegisterCategory(CategoryName, "Graphics settings");

            ModPrefs.RegisterPrefInt(CategoryName, MsaaLevel, -1, "MSAA Level (1/2/4/8)");
            ModPrefs.RegisterPrefBool(CategoryName, AllowMsaa, true, "Enable MSAA");
            ModPrefs.RegisterPrefBool(CategoryName, AnisoFilter, true, "Enable anisotropic filtering");
            ModPrefs.RegisterPrefBool(CategoryName, RealtimeShadows, true, "Realtime shadows");
            ModPrefs.RegisterPrefBool(CategoryName, SoftShadows, true, "Soft shadows");
            ModPrefs.RegisterPrefInt(CategoryName, PixelLights, -1, "Max pixel lights");
            ModPrefs.RegisterPrefInt(CategoryName, TextureLimit, -1, "Texture decimation");
            ModPrefs.RegisterPrefInt(CategoryName, GraphicsTier, -1, "Graphics tier (1/2/3)");
        }
예제 #6
0
        public override void OnApplicationStart()
        {
            ModPrefs.RegisterCategory(ModCategory, "Camera Resolution");
            ModPrefs.RegisterPrefString(ModCategory, Resolution1NamePref, "1080p", "Resolution 1 Name:");
            ModPrefs.RegisterPrefString(ModCategory, Resolution2NamePref, "4K", "Resolution 2 Name:");
            ModPrefs.RegisterPrefString(ModCategory, Resolution3NamePref, "8K", "Resolution 3 Name:");
            ModPrefs.RegisterPrefInt(ModCategory, Resolution1Pref, 1080, "Resolution 1: (Photo height, unstable > 4320)");
            ModPrefs.RegisterPrefInt(ModCategory, Resolution2Pref, 2160, "Resolution 2: (Photo height, unstable > 4320)");
            ModPrefs.RegisterPrefInt(ModCategory, Resolution3Pref, 4320, "Resolution 3: (Photo height, unstable > 4320)");
            ModPrefs.RegisterPrefInt(ModCategory, ResolutionPref, 2, "Default resolution setting (1-3)");

            ExpansionKitApi.RegisterSimpleMenuButton(ExpandedMenu.CameraQuickMenu, ModPrefs.GetString(ModCategory, Resolution1NamePref), Resolution1);
            ExpansionKitApi.RegisterSimpleMenuButton(ExpandedMenu.CameraQuickMenu, ModPrefs.GetString(ModCategory, Resolution2NamePref), Resolution2);
            ExpansionKitApi.RegisterSimpleMenuButton(ExpandedMenu.CameraQuickMenu, ModPrefs.GetString(ModCategory, Resolution3NamePref), Resolution3);
        }
예제 #7
0
 private static unsafe void RegisterModPrefs()
 {
     ModPrefs.RegisterCategory("NDB", "Multiplayer Dynamic Bones");
     ModPrefs.RegisterPrefBool("NDB", "EnabledByDefault", true, "Enabled by default");
     ModPrefs.RegisterPrefBool("NDB", "OnlyMe", false, "Only I can interact with other bones");
     ModPrefs.RegisterPrefBool("NDB", "OnlyFriends", false, "Only me and friends can interact with my and friend's bones");
     ModPrefs.RegisterPrefBool("NDB", "DisallowDesktoppers", false, "Desktoppers's colliders and bones won't be multiplayer'd");
     ModPrefs.RegisterPrefBool("NDB", "DistanceDisable", true, "Disable bones if beyond a distance");
     ModPrefs.RegisterPrefFloat("NDB", "DistanceToDisable", 4f, "Distance limit");
     ModPrefs.RegisterPrefBool("NDB", "DisallowInsideColliders", true, "Disallow inside colliders");
     ModPrefs.RegisterPrefFloat("NDB", "ColliderSizeLimit", 1f, "Collider size limit");
     ModPrefs.RegisterPrefInt("NDB", "DynamicBoneUpdateRate", 60, "Dynamic bone update rate");
     ModPrefs.RegisterPrefBool("NDB", "EnableJustIfVisible", true, "Enable dynamic bones just if they are on view");
     ModPrefs.RegisterPrefFloat("NDB", "VisibilityUpdateRate", 1f, "Visibility update rate (seconds)");
     ModPrefs.RegisterPrefBool("NDB", "OnlyHandColliders", false, "Only enable colliders in hands");
     ModPrefs.RegisterPrefBool("NDB", "KeybindsEnabled", true, "Enable keyboard actuation(F1, F4 and F8)");
     ModPrefs.RegisterPrefBool("NDB", "OptimizeOnly", false, "Just optimize the dynamic bones of the scene, don't enable interaction");
     ModPrefs.RegisterPrefInt("NDB", "UpdateMode", 0, "A value of 2 will notify the user when a new version of the mod is avaiable, while 1 will not.");
 }
예제 #8
0
        public static void RegisterSettings()
        {
            ModPrefs.RegisterCategory(SettingsCategory, "Join Notifier");

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingShouldBlink, true, "Blink HUD icon on join");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingShouldPlaySound, true, "Play sound on join");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingJoinShowName, true, "Show joined names");

            ModPrefs.RegisterPrefFloat(SettingsCategory, SettingSoundVolume, .3f, "Sound volume (0-1)");
            ModPrefs.RegisterPrefInt(SettingsCategory, SettingTextSize, 36, "Text size (pt)");

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingNotifyPublic, false, "Notify in public instances");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingNotifyFriends, true, "Notify in friends[+] instances");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingNotifyPrivate, true, "Notify in private instances");

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingLeaveBlink, false, "Blink HUD icon on leave");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingLeaveSound, false, "Play sound on leave");
            ModPrefs.RegisterPrefBool(SettingsCategory, SettingLeaveShowName, false, "Show left names");

            // ModPrefs.RegisterPrefColor(SettingsCategory, SettingJoinIconColor, new Color(0.50F, 0.75F, 1F), hideFromList: true);
            // ModPrefs.RegisterPrefColor(SettingsCategory, SettingLeaveIconColor, new Color(0.6f, 0.32f, 0.2f), hideFromList: true);

            ModPrefs.RegisterPrefBool(SettingsCategory, SettingUseUiMixer, true, "Notifications are UI sounds", hideFromList: true);
        }
예제 #9
0
 private void CreateConfig()
 {
     ModPrefs.RegisterPrefInt("RandomSong", "RandomSongBagSize", randomSongBagSize);
 }