Commit graph

223 commits

Author SHA1 Message Date
Kurt
d47bb1d297
Update .NET Runtime to .NET 8.0 (#4082)
With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
2023-12-03 20:13:20 -08:00
Kurt
738c51d596 Save/Open file dialog init
Initialize outside of object initializer, solves warnings if any property sets throw exceptions
2023-10-14 19:26:56 -07:00
Kurt
fd02b97ce1 Misc tweaks
Allow nickname->species with span
add ConstantExpected annotations
Correct Gen8b ability set calling CommonEdits instead of direct setter
Slightly better perf on gen5/gen8+ location fetch
Misc pkm ctor fixes for b2w2 trade & wc3 eggs
wurmple evo now has an enum to be more explicit
no recursion for gen5 generator
fix showdown line length check allowing 86 instead of 80
2023-08-27 23:05:50 -07:00
Kurt
04e7baaeee Fix Stat Editor randomize buttons centering
Hiding and Showing doesn't trigger an update to the FlowLayoutPanel's width; force a layout to happen so the size updates prior to re-centering controls. Only move if it is a different X coordinate (perf?)
2023-07-08 19:29:46 -07:00
Manu
43c67fd455
Add wc5full compatibility (#3854)
* Add WC5Full compatibility

* Add .wc5full to mystery gift filter
2023-04-04 07:19:54 -07:00
Kurt
812aa0a2d3 ThrowIfNull net7 2023-02-23 01:07:46 -08:00
Kurt
5aca291a7a Update translatables via devutil dump 2023-01-25 20:36:47 -08:00
Kurt
88830e0d00
Update from .NET Framework 4.6 to .NET 7 (#3729)
Updates from net46->net7, dropping support for mono in favor of using the latest runtime (along with the performance/API improvements). Releases will be posted as 64bit only for now.

Refactors a good amount of internal API methods to be more performant and more customizable for future updates & fixes.

Adds functionality for Batch Editor commands to `>`, `<` and <=/>=

TID/SID properties renamed to TID16/SID16 for clarity; other properties exposed for Gen7 / display variants.

Main window has a new layout to account for DPI scaling (8 point grid)

Fixed: Tatsugiri and Paldean Tauros now output Showdown form names as Showdown expects
Changed: Gen9 species now interact based on the confirmed National Dex IDs (closes #3724)
Fixed: Pokedex set all no longer clears species with unavailable non-base forms (closes #3720)
Changed: Hyper Training suggestions now apply for level 50 in SV. (closes #3714)
Fixed: B2/W2 hatched egg met locations exclusive to specific versions are now explicitly checked (closes #3691)
Added: Properties for ribbon/mark count (closes #3659)
Fixed: Traded SV eggs are now checked correctly (closes #3692)
2023-01-21 20:02:33 -08:00
Kurt
9131febef0 Remove incorrect line start for translation files 2022-11-24 20:03:05 -08:00
Kurt
03182ebd3d Update 22.11.24
Adds support for Scarlet & Violet.

Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-11-24 17:42:17 -08:00
Kurt
2cb2531288 Add more xmldoc 2022-08-21 01:39:16 -07:00
Kurt
d8c8a13885 Add bizhawk footer handler
Optimize some of the other handlers.
2022-06-25 11:14:00 -07:00
Kurt
fc754b346b
File scoped namespaces (#3529)
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces)

Updates all the files, one less level of indentation.

Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
2022-06-18 11:04:24 -07:00
Kurt
30e549faf5 Clamp subway/forest values for numeric control
stop with bad cheats lol
2022-05-27 12:20:49 -07:00
Kurt
be9c947dd6 Use tuples and ComboItem, not anonymous class
Little more explicit
2022-05-06 15:43:51 -07:00
Kurt
41578132cf Minor tweaks
Add Get/Set Relearn method to PKM.cs
Alpha Mastered move now indicates incomplete text entry (like moves/relearn)
Split up legal move indication helper class, use DI to allow other implementations of DataSource to be returned (pkhex mobile?).
Remove unused gender refresh method (see previous added UserControl commit)
Add helper method to center control within control
2022-05-02 18:11:31 -07:00
Kurt
a5ee845c3b Decouple event flag/work from SaveFile 2022-04-09 18:12:57 -07:00
Kurt
ae74ee7931 Minor tweaks
Translation util only for debug build (unused in release)
Simplify some plugin load expressions
2022-02-26 21:45:31 -08:00
Kurt
2cef0c23a6 Update localization dumping util 2022-02-04 17:37:13 -08:00
Kurt
18ecad9743 Update program GUI abstractions
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
2022-02-04 17:36:51 -08:00
Kurt
cc8ac7a4f1 Remove unnecessary warning suppression
fixed dat .editorconfig in vs22
Catching general exceptions is okay because this program handles user modified data that can potentially be corrupt.
2021-12-27 12:09:15 -08:00
Kurt
723514e89c
Update 21.11.19 - Brilliant Diamond & Shining Pearl (#3289)
Big thanks to @SciresM @sora10pls @Lusamine @architdate @ReignOfComputer for testing and contributing code / test cases. Can't add co-authors from the PR menu :(

Builds will fail because azure pipelines not yet updated with net6.
2021-11-19 18:23:49 -08:00
Kurt
009e37662f
Startup Enhancements, Gen1/2 Save Indication, Export SAV cleaned up (#3275)
* Providing pkm/sav files via command line (dragging files onto exe / associated file launched) will more intelligently source a partner sav/pkm object if not provided.
* Gen1/2 mainline save files now indicate if they are VC era or GB era (legality implications) in the program title bar.
* Fixes loading VC era save backups not being recognized as VC era (`.bak` extension hides `.dat`)
* Export BAK moved to the SAV tab, which allows Export main to be deleted and Export SAV to be used as the single-click for exporting saves. `CTRL-E` is still the hotkey.
2021-10-21 22:13:21 -07:00
Kurt
302b5d1d90 Update WinFormsUtil.cs 2021-08-24 13:22:29 -07:00
Kurt
bedc52943e Trailing commas
No functional change
2021-08-20 13:49:20 -07:00
Kurt
49488bb503 Use invariant culture for ToUpper/ToLower
Turkish is quite the language; let's try to prevent any errors down the road for internal/game string case changes.
2021-06-24 09:16:36 -07:00
Kurt
a10b35190c Minor tweaks
off by 1 max range for gen2 slot -> pk2
SetRandomIVs already sets IVs inside the method, retval is for knowing what the new value sare
show WC8 restricted version rather than defaulting to SH
pass the rand object rather than fetching for the current thread every loop for Unown & random IV shuffling
Use ToLowerInvariant for resource fetching, should resolve the turkish issue
Check typeof(T) first, not that we check for ToolStripItem or ContextMenuStrip with this function.
2021-06-24 00:36:04 -07:00
Kurt
3e7775fc44
Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately (#3222)
* Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately

Don't store within the object, track the slot origin data separately.

Batch editing now pre-filters if using Box/Slot/Identifier logic; split up mods/filters as they're starting to get pretty hefty.

- Requesting a Box Data report now shows all slots in the save file (party, misc)
- Can now exclude backup saves from database search via toggle (separate from settings preventing load entirely)
- Replace some linq usages with direct code

* Remove WasLink virtual in PKM

Inline any logic, since we now have encounter objects to indicate matching, rather than the proto-legality logic checking properties of a PKM.

* Use Fateful to directly check gen5 mysterygift origins

No other encounter types in gen5 apply Fateful

* Simplify double ball comparison

Used to be separate for deferral cases, now no longer needed to be separate.

* Grab move/relearn reference and update locally

Fix relearn move identifier

* Inline defog HM transfer preference check

HasMove is faster than getting moves & checking contains. Skips allocation by setting values directly.

* Extract more met location metadata checks: WasBredEgg

* Replace Console.Write* with Debug.Write*

There's no console output UI, so don't include them in release builds.

* Inline WasGiftEgg, WasEvent, and WasEventEgg logic

Adios legality tags that aren't entirely correct for the specific format. Just put the computations in EncounterFinder.
2021-06-22 20:23:48 -07:00
Kurt
aa55346bde Add setting to not show changelog on update 2021-05-20 15:03:15 -07:00
Kurt
50b15cd740 Use range/index
More in line with modernizing the codebase with latest c# syntax

improve web-qr decode speed slightly (no linq skiptake)
get money/coin mask without a temporary string (lol performance)
2021-05-14 15:30:55 -07:00
Kurt
0d45075d4b
Rewrite settings handling; enhance some user experiences (#3193)
- Settings now stored as json next to exe
- Settings now exposes all legality checking setttings that can be changed
- Slot hovering now can play cries in MGDB/PKMDB/etc, not just the main boxes.
- Enhanced hover text for mystery gifts and encounters that have movesets
- Show recently loaded save files in ctrl-f browser
- Toggle auto-load savefile setting to be none/detect-latest/last-loaded
- Custom extensions & extra backup paths can now be configured directly in the json settings
- Settings editor now uses propertygrid & tabs.
2021-04-11 18:09:54 -07:00
Kurt
09089da14e Use more expression return style
Reduces indentation & bracketing, a bit more concise
2021-01-01 17:08:49 -08:00
Kurt
7e4eb86e93 c#9 is not sugar 2020-12-22 21:24:41 -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
d225f3391a Split up DataUtil to separate files
ya i know there's already a localizeutil class, whatever
2020-12-21 19:13:18 -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
98ef0299b6 Add xmldoc for save meta/state tracking
Move some logic around to the more appropriate spot
2020-12-07 19:49:04 -08:00
Kurt
e72c80613e Extract metadata/state tracking from SaveFile obj 2020-12-05 05:36:23 -08:00
Kurt
fefc38bacb Minor debug optimizations
Trees:
- Only retain the objects needed after calculation
- Reduce size of TreeCoordinates and remove allocation penalty (now a struct)

No more warnings for Release compilation :D
2020-11-28 14:55:09 -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
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
2b7e06e217 Refactoring
Extract some logic, suppress some compiler messages
2020-09-18 22:11:13 -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
Jonathan Herbert
6eb348848d
Handle Exception When Adding Font File (#2977) 2020-08-25 11:42:08 -07:00
Kurt
993673f0de Minor clean
no functional change
2020-06-27 23:36:53 -05:00
Kurt
6fb2ebe039 Minor clean
add some xmldoc
2020-06-21 19:46:06 -05:00
Kurt
546412e410 Rename class/method name 2020-04-14 10:59:16 -07:00
Kermalis
5bdfd74862
Fix sav path after exporting to new name (#2791) 2020-03-18 22:15:34 -07:00
Kurt
1520210e68 Revert overload usage
yay core/framework enhancements
2020-01-25 18:12:58 -08:00
Kurt
38759be662 Update gui translations with latest
For dev update utility, move them to the new location in PKHeX.WinForms project
2020-01-25 18:06:04 -08:00