Change Ability array to IReadOnlyList, add method to check ability index in personal data
Suppress some message warnings
Change EvolutionChain short-circuit for VC to jump from gen6 directly down to gen2. There aren't any notradeback 1 situations, so a notradeback1 will always start with g=1, so no need for the other if-continue.
Simplify pk5 conversion
precompute result size
set Gen5 as lumped group for common encounters
remove linq usage (besides Sum call, whatever)
GetEncounters now only filters the in-game static encounters rather than the dreamworld too, as those are already filtered by separate arrays.
Get the variable rather than indexing into the array each time
Simplify some expressions in sav7 for readability
Make SAV_EventFlags use comboitem explicitly by type rather than an anonymous type with same member names
* Added PokeWalker Courses, Watts, and Steps editing
* Use util method for getting bitflags
* Keep old cheat method
Change signature so that the default value passed is to unlock all; can pass 0 instead to lock all
* Pass reference to derived sav4-type object
Wev'e already type-tested once, capture the reference and pass it into the appropriate load/save methods.
* Add control anchoring for window resizing
Also widen the labels for localization (longer strings possibly)
Also clamp give all for TMs to 1 instead of whatever the giveall value is, like for prior games' HMs
reuse the "free space" bool; no real benefit in increasing the amount of abstraction (even though that's my current urge for legality)
Because we pass in a reference to the raid block, rather than obtain the reference from the to-be-edited save file object (which was cloned), we need to restore the unmodified data to the save file instead of copying the modified save data.
Bad explanation, but we've edited the origin save data. Revert to original.
Co-Authored-By: sciresm <sciresm@users.noreply.github.com>
Co-Authored-By: Matt <sora10pls@users.noreply.github.com>
Co-Authored-By: Archit Date <architdate@gmail.com>
Closes#2826
It doesn't find it in the SM table, but didn't return -1
rework logic flow to return when found, rather than after loop finishes.
Also fix display off-by-1 since we're not using zero indexing for our entry numbers.
Thanks @Ammako !
Unfinished text edits aren't pushed until after the combobox changes index
#2820
can't tell the numericupdown to finalize entry, even with a Focus() call to the combobox (to change focus from the numericupdown).
* 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
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 :)