public static bool Prefix(BattleTech.UI.ModManagerScreen __instance, BattleTech.UI.HBSDOTweenToggle ___modsEnabledToggleBox) { if (___modsEnabledToggleBox.IsToggled() == false) { ___modsEnabledToggleBox.SetToggled(true); } return(false); }
public static void Postfix(BattleTech.UI.ModManagerScreen __instance) { //if(ModLoader.ModDefs) if (__instance.tempLoadedMods.ContainsKey(ModTek.MODTEK_DEF_NAME) == false) { __instance.tempLoadedMods.Add(ModTek.MODTEK_DEF_NAME, ModTek.SettingsDef.ToVanilla()); } else { __instance.tempLoadedMods[ModTek.MODTEK_DEF_NAME] = ModTek.SettingsDef.ToVanilla(); } }
public static bool Prefix(BattleTech.UI.ModManagerScreen __instance, ref bool __result) { __result = false; foreach (var mod in ModTek.allModDefs) { if (mod.Value.PendingEnable != mod.Value.Enabled) { __result = true; return(false); } } return(false); }
public static bool Prefix(BattleTech.UI.ModManagerScreen __instance, string button) { if (button == "revert") { foreach (var mod in ModTek.allModDefs) { mod.Value.PendingEnable = mod.Value.Enabled; } __instance.installedModsPanel.RefreshListViewItems(); return(false); } else if (button == "save") { //ActiveOrDefaultSettings_SaveUserSettings.SaveModsState = true; return(true); } return(true); }
public static bool Prefix(BattleTech.UI.ModManagerScreen __instance) { PlayerPrefs.SetInt("ModsEnabled", 1); return(true); }