Commit graph

746 commits

Author SHA1 Message Date
Kurt
7298910f04 Simplify some logic
The save editor buttons were originally checked for visibility in order to determine if we should hide the groupbox completely. This didn't work if the groupbox wasn't being displayed (get visibility checks if it is currently rendered, in addition to can be shown). So the "enabled" state was used to determine if it should be shown.

Now that we have the "Blocks" raw editing always being shown, the GroupBox will always be shown. Can just set the visibility directly, rather than doing the workaround.

Make the hall of fame editors slightly less SaveFile_type-specific.
2020-12-28 10:26:08 -08:00
Kurt
ee5349ff98 moar is or 2020-12-25 12:30:26 -08:00
Kurt
4a8a495d04 Condense some switch expressions
Should be it for now; exhaustively searched for all that made sense to change
2020-12-25 10:58:33 -08:00
Kurt
93910df2c6 Use new switch statements 2020-12-23 17:14:38 -08:00
Kurt
7e4eb86e93 c#9 is not sugar 2020-12-22 21:24:41 -08:00
Kurt
e34c8df044 Revise some method signatures 2020-12-22 20:50:33 -08:00
Kurt
997e0751f3 Minor clean
Handle remainder of c#9 sugar
Fix some spelling mistakes
2020-12-21 23:37:07 -08:00
Kurt
514b60b447 Merge type check with usage in if statements
if x is y with z property true, then :D
2020-12-21 22:33:48 -08:00
Kurt
63aa8dcd43 Bump langver to 9 for other subprojects 2020-12-21 19:12:24 -08:00
Kurt
62018cce1a Unify concepts with different names
AltForm & Form & Forme => Form
GenNumber & Generation => Generation

Extract out SpeciesForm interface, and re-add IGeneration

For those using PKHeX as a dependency, this should be a pretty straightforward manual replacement... GenNumber and AltForm should be quick find-replace`s.
2020-12-10 20:42:30 -08:00
Kurt
6f7602f2ad Change signatures to use readonly if possible
Extract get/set team methods for battle video
2020-12-05 06:09:33 -08:00
Kurt
e72c80613e Extract metadata/state tracking from SaveFile obj 2020-12-05 05:36:23 -08:00
Kurt
0eb7bf7a4b Add alert if database load fails
Task is executed without reporting exceptions; continue after the task with another that checks if it failed.
2020-11-28 14:53:32 -08:00
Kurt
9b178fefe2 Xmldoc, minor tweaks
Move form-info logic from FormConverter to AltFormInfo; now FormConverter is entirely form=>string[]
Add a bunch of xmldoc
Make pogo no-end-date cmp agaisnt UTCnow rather than local now.
2020-11-27 11:51:02 -08:00
Kurt
81110b4231 Upgrade netcore build to NET 5.0
keep with the times, kids

handle some compiler messages
2020-11-14 08:20:48 -08:00
Kurt
df5ebd1f54 Minor clean
Resolve some messages
2020-11-11 21:01:41 -08:00
Kurt
f3ad96d056 Update KChart.cs 2020-11-06 11:20:52 -08:00
sora10pls
5c401fa936 Update GetIsNative for KChart
We want to show that the Species is native if it appears in any Dex (Galar, Armor, Crown), not just the main Galar Dex.
2020-11-03 12:02:08 -05:00
Kurt
4012977c3c Adapt when loading new
See previous commit message
2020-10-31 09:22:13 -07:00
Kurt
cce4707604
Enable nullable for winforms csproj (#3037)
Handle all warnings
obviously the usage of null! could potentially be avoided if the object init wasn't such garbage, but here we are with years of old junk and lack of abstraction in the GUI project
2020-10-18 11:02:39 -07:00
Kurt
0a6534a208 Extend individual transfer count to 999mil
Closes #3028
Thanks @CarlosofKalos !

Setting 9999 for both on Rattata; capturing the 10,000th didn't increment, but transferring the 10,000th did.

Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2020-10-12 14:16:55 -07:00
Kurt
bb65f2d2c2 Show trainer name&id for registered Stadium teams in dropdown 2020-10-09 20:31:13 -07:00
Kurt
9d21e5acdd Add GUI for Capture Records
Accessible from Pokedex window
ur welcome matt
2020-10-08 18:06:29 -07:00
Kurt
262561d5d1 Fix stad1 missing team types
off by 1 (8=>9, and EN has unused interstitial teams).
Fix last-viewed-slot indication color tracking
2020-10-03 19:48:56 -07:00
Kurt
7efaa5ab71 Minor clean
collapse some expressions
handle some compiler messages
2020-10-03 18:59:36 -07:00
Kurt
816f24e3db Add Misc pkm array viewer for Stadium saves
Readonly slots

Things could be expanded on to use interfaces and wrappers for a "SlotReference" and properties for readonly.

But that's kinda unnecessary
2020-10-03 18:22:29 -07:00
Kurt
22f37910f0 Remove unnecessary single-member interfaces 2020-09-27 18:19:28 -07:00
Kurt
2b7e06e217 Refactoring
Extract some logic, suppress some compiler messages
2020-09-18 22:11:13 -07:00
soopercool101
63be1fb0e7
Update Underground Editor UI (#2988) 2020-09-14 19:05:49 -07:00
Egzon
4b1a9a89da
Add support for reading and editing Underground Items (#2987)
Adds a sub-editor with localized support for editing Underground Items.
2020-09-13 14:55:50 -07:00
Kurt
01fb233e48 Minor tweaks
Extract some interfaces
Suppress some warning messages with commented reasons if appropriate
2020-09-09 12:47:24 -07:00
Kurt
5d3bc289b6 seal hunting
Mark things as sealed as they shouldn't be inherited from or overriden in a derived class.
2020-09-07 13:51:13 -07:00
Kurt
9191f023a3 Minor clean
Nullability annotations and some logic simplification
2020-09-06 11:24:54 -07:00
Kurt
cf9e5ec37f Minor refactoring
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
2020-09-06 10:53:13 -07:00
Kurt
c2ec4d55e4 Minor clean
Add some xmldoc, remove some empty lines, move some small logic pieces to a better spot
2020-09-03 14:28:51 -07:00
Kurt
b03a5f2818 Fix pika beach score reading
fix reads as little endian instead of big endian
fix truncation if editor value from byte => ushort
Closes #2976
2020-09-01 16:05:52 -07:00
Kurt
9667e86446 Simplify dreamworld encounter init
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.
2020-08-30 19:51:44 -07:00
Kurt
bd11affa13 Minor clean 2020-08-30 19:24:40 -07:00
Kurt
75da70069c Remove access to modified captured variable
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
2020-08-30 15:48:11 -07:00
Kurt
890f3375c9 Misc clean 2020-08-18 15:39:45 -07:00
Matt
f9b4c1950b
Add Catch Rate to KChart (#2972) 2020-08-15 16:13:15 -07:00
Kurt
541c9761df Minor clean
Make flag indexes immutable
Rename some properties for clarity
2020-08-14 20:23:54 -07:00
Kurt
12d9397c8c Split GO from "GG" gameversion
Make Gen7b as the combined ver for that expression
2020-08-06 18:24:20 -07:00
Kurt
85d1b0e7ad Split gen6/7 affection stats to interface
not in future formats, doesn't belong
2020-08-02 11:06:30 -07:00
Regnum
9e40fa132f
Improved Pokewalker Editing (#2958)
* 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)
2020-08-01 09:20:13 -07:00
Kurt
e84ce77008 Split memories from main pkm class to interface
pk6/7/8, not pb7
2020-07-31 17:25:14 -07:00
Kurt
b7211000b0 Split Country/Region/ConsoleRegion from ITrainerInfo
Only present in mainline gen6/7 game pairs, so it's not wise to have it for all games
2020-07-31 13:53:42 -07:00
Kurt
36684ab867 Minor clean
Simplify some expressions
2020-07-31 11:20:48 -07:00
Kurt
6bb2612059 Restart program on settings reset 2020-07-25 09:51:56 -07:00
Kurt
318016e9e5 Fix re-layout on grid refresh
closes #2946
2020-07-21 23:50:23 -05:00