* delete received items with the delete key
mass selection of received items for mass deletion as well
improved index selection on deletion
* tab indexing for the form
Loading the window and assigning the datasource fired the index changed event, changing the first block (array) to the (selected index of type), which was bool1. Exporting the save caused a bad block type write, yielding a bad size.
Only add the event after the constructor is finished, so that it only fires via user interaction.
Similarly reported but not exactly noticed in #2658Closes#2663
Gonna update the release with a hotfix
Cuts out about half the size; there's still a bunch of apply-value logic but it's not really big enough for a separate class.
Rename BallRandomizer->BallApplicator
Traded eggs in gen4 can have from any game (since version isn't updated on hatch).
Use the hashsets, and remove the incorrect array. The incorrect array allowed stuff like Pokéwalker to be a "valid met location", hah.
held item list now allocates less (concat arrays instead of ienumerables)
item list already prunes out of range items, so simplify data source fetch
simplify item list prune (return as list, so we can call RemoveAll instead of Where.ToList)
Typing in the key to the combobox should immediately start filtering. We can't put the block type first, as we can't quickly fetch a block by key.
So, just trim off everything but the key when we start ordering things. They're already in order by ascending key -- the known blocks have already been pulled to the top and can be sorted without modification.
Now matches Interface declaration style (iAccessorGenGame), and is consistently named with the other accessors already using the same naming style
plus they are now ordered in the file tree :)
no functional change
Not done for Array types or Object types
muh reflection, such spooky
mark Offset as non-browsable so it doesn't show up in propertygrid if the block is being edited by a grid :)
I imagine a struct-type-sensitive array property grid edit could be done via Buffer.BlockCopy to a dest array, but there's so few Array blocks... so meh
Uses reflection to grab a list of defined constants (block keys), and a list of defined block reader classes.
Show name of block in red for a more prominent hint that this block is somewhat editable :)
Closes#2658 ty @CanoeHope !
Mostly just serves as documentation; with the amount of fields being editable increasing, hard-coded GUI might not be optimal here. I'm thinking something like a PropertyGrid based on the selected block which will pull up the Block object if the key matches... for fields, something like a dynamically populated list or something.
Use reflection to grab all const declarations (private and public), and grab the name of that const. Whenever that block is mentioned in our diff, use the name instead of the key.
Helps identify what changed / remove noise if you don't care about that block.
since battle subway can have a maximum of 9999 for your record, it's silly to limit it to 100.
i also included some tab indexing so people can navigate the window with a keyboard, and a minor fix to the "record" labels so you can read them.
gen7 used same as gen6, we just need to restrict gen!=8
add placeholder LGPE origin check; that'll likely throw a wrench into things when HOME happens (next month?).
Record ID const declaration for reuse
Change 255->300 for streak max
Set record as well (ignore currently set value if modified via dropdown)
Closes#2649
Not sure if Money and BP can get a similar record-set treatment.
sometimes competitive sets have multiple moves in one slot as optional coverage moves. Handle these cases by splitting and trimming over '/'. Example: https://pastebin.com/raw/jvPziRdC (The dusk mane set)
Apparently my copypaste of the class didn't delete all the old unused controls. Ha!
Move non-gui logic to core as separate classes, in case ppl wanted to reuse them in their own projects.