Update zygarde cells

use const numbers, dynamic count for cells possible
This commit is contained in:
Kurt 2017-11-11 22:48:22 -08:00
parent cfb38a771f
commit 6a73b9e6e4
5 changed files with 56 additions and 53 deletions

View file

@ -31,6 +31,7 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAVEditor));
this.tabBoxMulti = new System.Windows.Forms.TabControl();
this.Tab_Box = new System.Windows.Forms.TabPage();
this.Box = new PKHeX.WinForms.Controls.BoxEditor();
this.Tab_PartyBattle = new System.Windows.Forms.TabPage();
this.PAN_BattleBox = new System.Windows.Forms.Panel();
this.PB_Locked = new System.Windows.Forms.PictureBox();
@ -103,14 +104,13 @@
this.B_OUTPasserby = new System.Windows.Forms.Button();
this.B_CGearSkin = new System.Windows.Forms.Button();
this.B_OpenPokeBeans = new System.Windows.Forms.Button();
this.B_OpenZygardeCells = new System.Windows.Forms.Button();
this.B_CellsStickers = new System.Windows.Forms.Button();
this.B_OpenMiscEditor = new System.Windows.Forms.Button();
this.B_OpenHoneyTreeEditor = new System.Windows.Forms.Button();
this.B_OpenFriendSafari = new System.Windows.Forms.Button();
this.B_OpenRTCEditor = new System.Windows.Forms.Button();
this.B_OpenUGSEditor = new System.Windows.Forms.Button();
this.B_Roamer = new System.Windows.Forms.Button();
this.Box = new PKHeX.WinForms.Controls.BoxEditor();
this.tabBoxMulti.SuspendLayout();
this.Tab_Box.SuspendLayout();
this.Tab_PartyBattle.SuspendLayout();
@ -175,6 +175,17 @@
this.Tab_Box.Text = "Box";
this.Tab_Box.UseVisualStyleBackColor = true;
//
// Box
//
this.Box.AllowDrop = true;
this.Box.CurrentBox = -1;
this.Box.FlagIllegal = false;
this.Box.Location = new System.Drawing.Point(26, 7);
this.Box.M = null;
this.Box.Name = "Box";
this.Box.Size = new System.Drawing.Size(251, 185);
this.Box.TabIndex = 1;
//
// Tab_PartyBattle
//
this.Tab_PartyBattle.Controls.Add(this.PAN_BattleBox);
@ -766,7 +777,7 @@
this.FLP_SAVtools.Controls.Add(this.B_OUTPasserby);
this.FLP_SAVtools.Controls.Add(this.B_CGearSkin);
this.FLP_SAVtools.Controls.Add(this.B_OpenPokeBeans);
this.FLP_SAVtools.Controls.Add(this.B_OpenZygardeCells);
this.FLP_SAVtools.Controls.Add(this.B_CellsStickers);
this.FLP_SAVtools.Controls.Add(this.B_OpenMiscEditor);
this.FLP_SAVtools.Controls.Add(this.B_OpenHoneyTreeEditor);
this.FLP_SAVtools.Controls.Add(this.B_OpenFriendSafari);
@ -951,15 +962,15 @@
this.B_OpenPokeBeans.UseVisualStyleBackColor = true;
this.B_OpenPokeBeans.Click += new System.EventHandler(this.B_OpenPokeBeans_Click);
//
// B_OpenZygardeCells
// B_CellsStickers
//
this.B_OpenZygardeCells.Location = new System.Drawing.Point(189, 148);
this.B_OpenZygardeCells.Name = "B_OpenZygardeCells";
this.B_OpenZygardeCells.Size = new System.Drawing.Size(87, 23);
this.B_OpenZygardeCells.TabIndex = 26;
this.B_OpenZygardeCells.Text = "Zygarde Cells";
this.B_OpenZygardeCells.UseVisualStyleBackColor = true;
this.B_OpenZygardeCells.Click += new System.EventHandler(this.B_OpenZygardeCells_Click);
this.B_CellsStickers.Location = new System.Drawing.Point(189, 148);
this.B_CellsStickers.Name = "B_CellsStickers";
this.B_CellsStickers.Size = new System.Drawing.Size(87, 23);
this.B_CellsStickers.TabIndex = 26;
this.B_CellsStickers.Text = "Cells/Stickers";
this.B_CellsStickers.UseVisualStyleBackColor = true;
this.B_CellsStickers.Click += new System.EventHandler(this.B_CellsStickers_Click);
//
// B_OpenMiscEditor
//
@ -1021,17 +1032,6 @@
this.B_Roamer.UseVisualStyleBackColor = true;
this.B_Roamer.Click += new System.EventHandler(this.B_Roamer_Click);
//
// Box
//
this.Box.AllowDrop = true;
this.Box.CurrentBox = -1;
this.Box.FlagIllegal = false;
this.Box.Location = new System.Drawing.Point(26, 7);
this.Box.M = null;
this.Box.Name = "Box";
this.Box.Size = new System.Drawing.Size(251, 185);
this.Box.TabIndex = 1;
//
// SAVEditor
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@ -1160,7 +1160,7 @@
private System.Windows.Forms.Button B_OUTPasserby;
private System.Windows.Forms.Button B_CGearSkin;
private System.Windows.Forms.Button B_OpenPokeBeans;
private System.Windows.Forms.Button B_OpenZygardeCells;
private System.Windows.Forms.Button B_CellsStickers;
private System.Windows.Forms.Button B_OpenMiscEditor;
private System.Windows.Forms.Button B_OpenHoneyTreeEditor;
private System.Windows.Forms.Button B_OpenFriendSafari;

View file

@ -515,7 +515,7 @@ namespace PKHeX.WinForms.Controls
private void B_OpenPokeblocks_Click(object sender, EventArgs e) => new SAV_PokeBlockORAS(SAV).ShowDialog();
private void B_OpenSuperTraining_Click(object sender, EventArgs e) => new SAV_SuperTrain(SAV).ShowDialog();
private void B_OpenSecretBase_Click(object sender, EventArgs e) => new SAV_SecretBase(SAV).ShowDialog();
private void B_OpenZygardeCells_Click(object sender, EventArgs e) => new SAV_ZygardeCell(SAV).ShowDialog();
private void B_CellsStickers_Click(object sender, EventArgs e) => new SAV_ZygardeCell(SAV).ShowDialog();
private void B_LinkInfo_Click(object sender, EventArgs e) => new SAV_Link6(SAV).ShowDialog();
private void B_Roamer_Click(object sender, EventArgs e) => new SAV_Roamer3(SAV).ShowDialog();
private void B_OpenEventFlags_Click(object sender, EventArgs e)
@ -986,7 +986,7 @@ namespace PKHeX.WinForms.Controls
B_OpenSecretBase.Enabled = sav.HasSecretBase;
B_OpenPokepuffs.Enabled = sav.HasPuff;
B_OpenPokeBeans.Enabled = sav.Generation == 7;
B_OpenZygardeCells.Enabled = sav.Generation == 7;
B_CellsStickers.Enabled = sav.Generation == 7;
B_OUTPasserby.Enabled = sav.HasPSS;
B_OpenBoxLayout.Enabled = sav.HasBoxWallpapers;
B_OpenWondercards.Enabled = sav.HasWondercards;

View file

@ -469,7 +469,7 @@
<metadata name="B_OpenPokeBeans.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenZygardeCells.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="B_CellsStickers.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_OpenMiscEditor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View file

@ -188,7 +188,7 @@
this.MinimumSize = new System.Drawing.Size(440, 380);
this.Name = "SAV_ZygardeCell";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Zygarde Cells";
this.Text = "Cells/Sticker Editor";
((System.ComponentModel.ISupportInitialize)(this.dgv)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_Cells)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_Collected)).EndInit();

View file

@ -32,6 +32,7 @@ namespace PKHeX.WinForms
// Populate Grid
dgv.Rows.Add(cellcount);
var locations = SAV.SM ? locationsSM : locationsUSUM;
for (int i = 0; i < cellcount; i++)
{
if (cells[i] > 2)
@ -41,12 +42,14 @@ namespace PKHeX.WinForms
dgv.Rows[i].Cells[1].Value = locations[i];
dgv.Rows[i].Cells[2].Value = states[cells[i]];
}
if (SAV.USUM)
L_Cells.Visible = NUD_Cells.Visible = false;
}
private const int cellstotal = 0x142/2;
private const int cellscollected = 0x152/2;
private const int celloffset = 198;
private const int cellcount = 95;
private const int cellstotal = 161;
private const int cellscollected = 169;
private const int celloffset = 0xC6;
private int cellcount => SAV.USUM ? 100 : 95;
private readonly string[] states = {"None", "Available", "Received"};
private void B_Save_Click(object sender, EventArgs e)
@ -92,7 +95,7 @@ namespace PKHeX.WinForms
#region locations -- lazy
private readonly string[] locations =
private readonly string[] locationsSM =
{
"Verdant Cave - Trial Site",
"Ruins of Conflict - Outside",
@ -192,36 +195,36 @@ namespace PKHeX.WinForms
};
private readonly string[] locationsUSUM =
{
"Hau'oli City(Shopping) Salon Outside",
"Hau'oli City(Shopping) MalasadaShop Outside",
"Hau'oli City(Shopping) Ilima's House 2F",
"Hau'oli City (Shopping) Salon Outside",
"Hau'oli City (Shopping) MalasadaShop Outside",
"Hau'oli City (Shopping) Ilima's House 2F",
"Malie City Library 1F",
"Hau'oli City(Marina) Outside",
"Hau'oli City (Marina) Outside",
"Route 2 SouthEast House",
"Hau'oli City(Shopping) Ilima's House Outside",
"Hau'oli City(Shopping) CityHall",
"Hau'oli City (Shopping) Ilima's House Outside",
"Hau'oli City (Shopping) CityHall",
"Heahea City Hotel 3F",
"Route 2 BerryField House",
"Route 2 BerryField House Outside",
"Royal Avenue NorthEast",
"Hau'oli City(Shopping) PokemonCenter Outside",
"Hau'oli City (Shopping) PokemonCenter Outside",
"Royal Avenue South",
"Hokulani Observatory Room",
"Hokulani Observatory InfoDesk",
"Hau'oli City(Shopping) CityHall Outside",
"Hau'oli City (Shopping) CityHall Outside",
"Konikoni City Olivia's JewelryShop 2F",
"Heahea City Surfboard Outside",
"Po Town SouthWest",
"*** researching No.21 ***",
"Hau'oli City(Shopping) NorthWest of PoliceStation",
"Hau'oli City(Marina) FerryTerminal Outside",
"Hau'oli City (Shopping) NorthWest of Police Station",
"Hau'oli City (Marina) FerryTerminal Outside",
"Route 2 SouthEast House Outside",
"Route 2 PokemonCenter Outside",
"Heahea City West",
"Heahea City Hotel Outside(West)",
"Heahea City Hotel Outside(East)",
"Heahea City ResearchLab Outside(East)",
"Heahea City ResearchLab Outside(South)",
"Heahea City ResearchLab Outside (South)",
"Heahea City GameFreak",
"Hokulani Observatory DeadEnd",
"Heahea City GameFreak Building 3F",
@ -236,18 +239,18 @@ namespace PKHeX.WinForms
"Hano Beach",
"Hano Resort South",
"Hano Resort Lobby",
"Konikoni City Lighthouse(Diglett's Tunnel)",
"Konikoni City Lighthouse (Diglett's Tunnel)",
"Royal Dome 1F",
"Route 8 AetherBase Outside",
"Route 8 FossilRestorationCenter Outside",
"Konikoni City West",
"Konikoni City Restaurant 1F",
"Iki Town SouthWest",
"Hau'oli City(Shopping) Ilima's House SwimPool",
"Hau'oli City (Shopping) Ilima's House SwimPool",
"*** researching No.53",
"Route 5 South of PokemonCenter",
"*** researching No.55",
"Malie City(Outer) RecyclePlant Outside",
"Malie City (Outer) RecyclePlant Outside",
"Malie City FerryTerminal Outside",
"Malie City ApparelShop Outside",
"Malie City Salon Outside",
@ -260,28 +263,28 @@ namespace PKHeX.WinForms
"Mt.Hokulani",
"Mt.Blush PowerPlant",
"Route 13",
"Route 14 Front of Megamart(Abandoned)",
"Route 14 Front of Megamart (Abandoned)",
"Route 14 North",
"Route 15 islet Surfboard Outside",
"Route 17 PoliceStation Outside",
"Route 17 PoliceStation",
"Po Town PokemonCenter Outside",
"*** researching No.75",
"Po Town ShadyHouse Outside(East)",
"Po Town ShadyHouse Outside (East)",
"Po Town PokemonCenter",
"Po Town ShadyHouse 1F",
"Route 13 Motel Outside",
"Po Town ShadyHouse 2F Outside",
"Route 17 South of PoTown",
"Ula'ula Meadow",
"Po Town ShadyHouse Outside(West)x3",
"Po Town ShadyHouse Outside(West)x3",
"Po Town ShadyHouse Outside(West)x3",
"Po Town ShadyHouse Outside (West) 1",
"Po Town ShadyHouse Outside (West) 2",
"Po Town ShadyHouse Outside (West) 3",
"Seafolk Village SouthEast Wiscash(Mina's Ship) Outside",
"Seafolk Village SouthWest Huntail",
"Seafolk Village SouthWest Huntail Outside",
"Seafolk Village SouthEast Wiscash(Mina's Ship)",
"Seafolk Village West Wailord(Restaurant)",
"Seafolk Village SouthEast Wiscash (Mina's Ship)",
"Seafolk Village West Wailord (Restaurant)",
"Seafolk Village East Gyarados",
"Poni Wilds SouthEast",
"Ancient Poni Path Hapu's House(Kitchen)",