Example #1
0
        public void Awake()
        {
            SetupConfig();
            LobbyViewType = (StaticValues.LobbyViewType)SelectViewMode.Value;
            SceneType     = (StaticValues.SceneType)SelectedScene.Value;

            CommandHelper.AddToConsoleWhenReady();

            On.RoR2.UI.CharacterSelectController.Awake += CharacterSelectController_Awake;

            // BACKGROUND ELEMENTS //
            if (DisableShaking.Value)
            {
                On.RoR2.PreGameShakeController.Awake += SetShakerInactive;
            }

            // SURVIVORS IN LOBBY //

            switch (LobbyViewType)
            {
            case LobbyViewType.Default:
                break;

            case LobbyViewType.Hide:
                On.RoR2.UI.CharacterSelectController.OnNetworkUserLoadoutChanged += HideOnSelected;
                break;

            case LobbyViewType.Zoom:
                On.RoR2.UI.CharacterSelectController.SelectSurvivor += ZoomOnSelected;
                break;
            }
            if (SurvivorsInLobby.Value && LivePreview.Value)
            {
                On.RoR2.UI.CharacterSelectController.OnNetworkUserLoadoutChanged += UpdateCharacterPreview;
            }
            if (ReplayAnim.Value)
            {
                On.RoR2.UI.CharacterSelectController.OnNetworkUserLoadoutChanged += ReplayAnimationOnSelect;
            }
        }
Example #2
0
        public void SetupConfig()
        {
            //default new Color32((byte)0.981, (byte)0.356, (byte)0.356, (byte)1.000)
            //250.155, 90.78, 90.78
            // Lights
            Light_Color           = Config.Bind("Lights", "Hex Color", "default", "Change the default color of the light"); //#fa5a5a
            Light_Flicker_Disable = Config.Bind("Lights", "Disable FlickerLight", true, "Makes the light not flicker anymore.");
            Light_Intensity       = Config.Bind("Lights", "Intensity", 1f, "Change the intensity of the light.");

            //UI
            PostProcessing = Config.Bind("UI", "Disable Post Processing", true, "Disables the blurry post processing.");
            HideFade       = Config.Bind("UI", "Hide Fade", true, "There's a dark fade on the top and bottom, this disables it.");
            BlurValue      = Config.Bind("UI", "Adjust Blur (Not Implemented)", 255, "Adjusts the blur behind the UI elements on the left and right." +
                                         "\n0:fully transparent - 255:default");
            UIScale = Config.Bind("UI", "UI Scale", 1f, "Resizes the UIs on the left and right."); //def 1f

            //BG
            MeshProps         = Config.Bind("Background", "Hide MeshProps", false, "Hides all the background meshprops.");
            PhysicsProps      = Config.Bind("Background", "Hide Physics Props", false, "Hides only the physics props like the Chair.");
            DisableShaking    = Config.Bind("Background", "Disable Shaking", false, "Disables the random shaking that rattles the ship.");
            CharacterPadScale = Config.Bind("Background", "Character Display Scale", 1f, "Resizes character displays. "); //def 1f
            SurvivorsInLobby  = Config.Bind("Background", "Survivors In Lobby", true, "Shows survivors in the lobby." +
                                            "\nThese background survivors don't reflect the loadouts in the lobby.");

            //Custom BG
            SelectedScene = Config.Bind("Background", "Select Scene", 0, "0 = Default");

            //other
            SelectViewMode = Config.Bind("Other", "Select View Mode (Requires SurvivorsInLobby set to true)", 0, "0 = None" +
                                         "\n1 = Disappear on selection" +
                                         "\n2 = Zoom on selection"); //def 1f
            ReplayAnim  = Config.Bind("Background", "Replay Animation", true, "Replays the animation for the selected character.");
            LivePreview = Config.Bind("Background", "Live Preview", true, "Updates the appearance for the selected character.");


            LobbyViewType = (StaticValues.LobbyViewType)SelectViewMode.Value;
            SceneType     = (StaticValues.SceneType)SelectedScene.Value;
        }