Ejemplo n.º 1
0
 public static void Unsubscribe(ModMetaData mod)
 {
     Find.WindowStack.Add(Dialog_MessageBox.CreateConfirmation(I18n.ConfirmUnsubscribe(mod.Name), delegate
     {
         mod.enabled = false;
         AccessTools.Method(typeof(Verse.Steam.Workshop), "Unsubscribe").Invoke(null, new object[] { mod });
         // TODO: check callback to remove mod from list.
     }, true));
 }
 public static void Unsubscribe(ModMetaData mod, bool force = false)
 {
     if (force)
     {
         mod.enabled = false;
         AccessTools.Method(typeof(Verse.Steam.Workshop), "Unsubscribe").Invoke(null, new object[] { mod });
         return;
     }
     Find.WindowStack.Add(Dialog_MessageBox.CreateConfirmation(I18n.ConfirmUnsubscribe(mod.Name), delegate
     {
         Unsubscribe(mod, true);
     }, true));
 }