Esempio n. 1
0
        private void MixedGripUpdate()
        {
            if (Global.Lobby.PlayersInLobby.Where(x => x.ControlledCharacter.Initialized).Count() != CurrentPlayers.Count())
            {
                RefreshPlayerList();
            }
            else
            {
                if (CustomKeybindings.GetKeyDown(MixedGrip.TOGGLE_KEY, out int playerID))
                {
                    try
                    {
                        var character = SplitScreenManager.Instance.LocalPlayers[playerID].AssignedCharacter;

                        var info = CurrentPlayers.Where(it => it.CharacterUID == character.UID).FirstOrDefault();

                        ToggleGripHotkey(info, character);
                    }
                    catch (Exception e)
                    {
                        Debug.LogWarning("Exception on player grip toggle: " + e.ToString());
                    }
                }

                foreach (CharacterInfo info in CurrentPlayers)
                {
                    if (CharacterManager.Instance.GetCharacter(info.CharacterUID) is Character c && c.IsLocalPlayer)
                    {
                        //UpdatePlayerInput(info, c);

                        UpdateCharacterSlots(info, c);
                    }
                }
            }
        }
Esempio n. 2
0
        internal void Awake()
        {
            Instance = this;

            var harmony = new Harmony(GUID);

            harmony.PatchAll();

            // custom keybindings
            CustomKeybindings.AddAction(TOGGLE_KEY, KeybindingsCategory.CustomKeybindings, ControlType.Both);

            SetupConfig();

            s_rpcObj = new GameObject("MixedGripRPC");
            DontDestroyOnLoad(s_rpcObj);
            s_rpcObj.AddComponent <GripManager>();
        }
Esempio n. 3
0
        internal void Awake()
        {
            Instance = this;

            SwapAnimations        = Config.Bind(CTG, "Swap animations to alternate style?", true, "For swords, axes and maces, should animations be swapped to the alternate style (1h/2h)?");
            AutoSwapOnEquipChange = Config.Bind(CTG, "Automatically swap grip on equipment change?", true, "Should Mixed Grip automatically swap your grip for you when changing equipment?");
            BalanceWeaponsOnSwap  = Config.Bind(CTG, "Balance weapons on grip-swap?", true, "Should weapon stats be balanced according to the amount the attack speed changed?");

            var harmony = new Harmony(GUID);

            harmony.PatchAll();

            CustomKeybindings.AddAction(TOGGLE_KEY, KeybindingsCategory.CustomKeybindings, ControlType.Both);

            rpcObject = new GameObject("MixedGripRPC");
            DontDestroyOnLoad(rpcObject);
            rpcObject.AddComponent <GripManager>();
        }
Esempio n. 4
0
        internal void Awake()
        {
            Instance = this;

            var harmony = new Harmony(GUID);

            harmony.PatchAll();

            // custom keybindings
            CustomKeybindings.AddAction(ToggleKey, CustomKeybindings.KeybindingsCategory.Actions, CustomKeybindings.ControlType.Both, 5);

            config = SetupConfig();
            config.Register();

            rpcObj = new GameObject("MixedGripRPC");
            DontDestroyOnLoad(rpcObj);
            rpcObj.AddComponent <GripManager>();
        }