コード例 #1
0
 public static bool Prefix(BattleTech.UI.ModManagerScreen __instance, BattleTech.UI.HBSDOTweenToggle ___modsEnabledToggleBox)
 {
     if (___modsEnabledToggleBox.IsToggled() == false)
     {
         ___modsEnabledToggleBox.SetToggled(true);
     }
     return(false);
 }
コード例 #2
0
 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();
     }
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 public static bool Prefix(BattleTech.UI.ModManagerScreen __instance)
 {
     PlayerPrefs.SetInt("ModsEnabled", 1);
     return(true);
 }