Skip to content

Commit

Permalink
增加删除合法精灵按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
Aster145 committed Oct 22, 2023
1 parent 535fe61 commit 524e88b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions PKHeXPluginExample/ExamplePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ private void AddPluginControl(ToolStripDropDownItem tools)//在这个示例中
c5.Click += (s, e) => ModifyLV();
var c6 = new ToolStripMenuItem($"删除全部精灵");//按钮5,删除全部精灵1
c6.Click += (s, e) => Deleteallpkm();
var c7 = new ToolStripMenuItem($"删除合法精灵");//按钮6,删除合法精灵1
c7.Click += (s, e) => MessageBox.Show("不要乱点!!!!!!!!!!!!!!!!!!!\n这个功能还没有写好,呆逼!\n如果你知道这个功能怎么写请联系我\nQQ1451179481");
//c7.Click += (s, e) => DeleteLegalpkm();

//ctrl.DropDownItems.Add(c2);
//ctrl.DropDownItems.Add(c3);
Expand All @@ -57,6 +60,11 @@ private void AddPluginControl(ToolStripDropDownItem tools)//在这个示例中

ctrl.DropDownItems.Add(c6);//按钮5,删除全部精灵2
Console.WriteLine($"{Name} added menu items.");

ctrl.DropDownItems.Add(c7);

//ctrl.DropDownItems.Add(c6);//按钮6,删除非法精灵2
//Console.WriteLine($"{Name} added menu items.");
}

private void ModifySaveFile()//按钮3;全部设置为百变怪3
Expand All @@ -77,6 +85,13 @@ private void Deleteallpkm()
sav.ModifyBoxes(delpkm);
SaveFileEditor.ReloadSlots();
}//按钮5,删除全部精灵3

private void DeleteLegalpkm()
{
var sav = SaveFileEditor.SAV;
sav.ModifyBoxes(delLegalpkm);
SaveFileEditor.ReloadSlots();
}//按钮6,删除非法精灵3
public static void ModifyPKM(PKM pkm)
{
// Make everything Bulbasaur! 让一切变成妙蛙种子!
Expand Down Expand Up @@ -125,6 +140,12 @@ public static void delpkm(PKM pkm)

}//按钮5,删除全部精灵4

public static void delLegalpkm(PKM pkm)
{
pkm.Species = (int)Species.None;//删除

}//按钮6,删除非法精灵4

public void NotifySaveLoaded()//当PKHeX加载一个新的存档文件时,NotifySaveLoaded方法会被调用。
{
Console.WriteLine($"{Name} was notified that a Save File was just loaded.");
Expand Down

0 comments on commit 524e88b

Please sign in to comment.