public static bool Prefix(ref TaleWorlds.CampaignSystem.ViewModelCollection.PartyCharacterVM __instance)
        {
            if (ScreenManager.TopScreen is GauntletPartyScreen topScreen)
            {
                if (topScreen.DebugInput.IsAltDown())
                {
                    PartyController.CurrentInstance.UpdateBlackWhiteList(__instance, BlackWhiteListType.Recruit);
                    return(false);
                }
                return(true);
            }

            return(true);
        }
Beispiel #2
0
        public static bool Prefix(ref TaleWorlds.CampaignSystem.ViewModelCollection.PartyCharacterVM __instance)
        {
            if (ScreenManager.TopScreen is GauntletPartyScreen topScreen)
            {
                if (topScreen.DebugInput.IsAltDown())
                {
                    return(PartyController.CurrentInstance.UpdateBlackWhiteList(__instance, BlackWhiteListType.Transfer));
                }
                else if (topScreen.DebugInput.IsShiftDown() && topScreen.DebugInput.IsControlDown())
                {
                    if (!PartyManagerSettings.Settings.DisableCtrlShiftTransfer)
                    {
                        return(PartyController.CurrentInstance.TransferUnits(__instance, PMTransferType.Half));
                    }
                }
                else if (topScreen.DebugInput.IsControlDown())
                {
                    if (!PartyManagerSettings.Settings.DisableCtrlTransfer)
                    {
                        return(PartyController.CurrentInstance.TransferUnits(__instance, PMTransferType.All));
                    }
                }
                else if (topScreen.DebugInput.IsShiftDown())
                {
                    if (!PartyManagerSettings.Settings.DisableCustomShiftTransfer)
                    {
                        return(PartyController.CurrentInstance.TransferUnits(__instance, PMTransferType.Custom));
                    }
                }


                return(true);
            }

            return(true);
        }
        public static bool Prefix(int upgradeIndex, ref TaleWorlds.CampaignSystem.ViewModelCollection.PartyCharacterVM __instance)
        {
            if (ScreenManager.TopScreen is GauntletPartyScreen topScreen)
            {
                if (!PartyManagerSettings.Settings.DisableCustomUpgradePaths && topScreen.DebugInput.IsControlDown() && topScreen.DebugInput.IsShiftDown())
                {
                    PartyController.ToggleUpgradePath(__instance, upgradeIndex, true);
                    return(false);
                }
                else if (!PartyManagerSettings.Settings.DisableCustomUpgradePaths && topScreen.DebugInput.IsControlDown())
                {
                    PartyController.ToggleUpgradePath(__instance, upgradeIndex, false);
                    return(false);
                }
                else if (topScreen.DebugInput.IsAltDown())
                {
                    PartyController.CurrentInstance.UpdateBlackWhiteList(__instance, BlackWhiteListType.Upgrade);
                    return(false);
                }
                return(true);
            }

            return(true);
        }