Commit Graph

287 Commits

Author SHA1 Message Date
Kurt
5bf1e2cf45
PKM: Reduce allocation via in-place decryption logic (#4764) 2026-03-24 21:31:59 -05:00
Kurt
2faa1b10b1 Revise translation form scrape
Iterate through all constructor paths
2026-03-14 22:33:44 -05:00
Kurt
244b34b8d3 Misc translatable util update
Allow EntitySearchSetup to be translated (rearrange the initialization, no need to retain/defer).
Rename Gen9a's gender label (previously blacklisted as an "auto-updating" label).

Other gender/Stat labels currently blacklisted in DevUtil probably need to get refactored to be enums/etc, but I currently lack the time/patience to understand those editors well enough to properly support the refactoring needed.

json exports: add newline at end to match the default editorconfig settings and general convention. we don't want textfiles loading in as a string[] with an empty string last entry.
2026-03-05 21:57:08 -06:00
Kurt
f382291de4 Improve translation of Extra Slots
SAV tab shows a bunch of extra slots from miscellaneous sources. The previous logic was a little clunky with fake labels; rewrite how it works so it's a little more transparent.

Misc is no more; I've created enum members with more descriptive names.

#4735
2026-03-01 09:58:40 -06:00
Kurt
20a92f533b Split event flag/work groups to tabs
Closes #4719

More groups can be added to the enum, and re-defined via their type-char column.
Updating translations will automatically add those types to the list of translatables.

Fixes the Dark Mode bug where the first tab of the Event flag/work editor (LGPE) didn't respect dark mode; now that all all event editors are sub-tabbed, we use the workaround present in all (on shown flip back to the first tab).
2026-03-01 00:00:34 -06:00
Kurt
d690f1c5d3 Check unsaved entity on sav export
Add setting to skip the unsaved entity check
Add setting to skip the overwrite? prompt and always call Save As

Change Overwrite prompt to have distinct buttons rather than rows that can be mis-clicked.

fix some comments/strings from Pokemon=>Pokémon

add some underline shortcut key for main menu for English translation
2026-02-22 11:11:16 -06:00
Kurt
6f9daaed04 Small tweaks to HGSS ball check
small lol
would need fully implemented pal park trash byte checks, big sad
leave stuff stubbed for now, can clamp down later.

restrict some method sigs for IEncounterTemplate (rather than more-derived IEncounterable) for consistency
2026-02-20 01:36:46 -06:00
Kurt
ceb420a2a1 Misc gui tweaks
Only show Square shiny in Gen8 context (sw/sh only) to avoid confusion
Fix method name typo
Close subforms in reverse to avoid allocating a temp list
Close splash screen entirely async rather than dual Task.Run
Translate the entirety of the EntitySearchSetup (comparator button/menu now translates)
Launch box popup to the right of the main form, like the Search behavior
Fix dark mode coloring of popup box editor/group viewer images
Fix dark mode RichTextBox retaining border when it should be removed (white was annoying); was early-returning due to satisfying TextBoxBase
2026-02-15 02:19:09 -06:00
Kurt
782ee643d6 Replace box nav arrows with images 2026-02-11 23:43:54 -06:00
Kurt
20905cbe67
Add a search interface for visually filtering all slots (#4712)
* Add slot search to box editor
Alt-Click: Clears the current search.
Shift-Click: Jump to the next box with a result.
2026-02-09 22:03:18 -06:00
Kurt
733c829570 Minor tweak
Small reduction in allocation for a method that is ever so rarely used, but yay me
2026-01-10 23:17:47 -06:00
Kurt
0fe0b704d1 Minor tweaks
Allow localizing the Legality Report and File Overwrite dialogs added in .NET 10 update

Simplify evo restriction check
2026-01-10 19:27:45 -06:00
Kurt
e2c09730b5 Update 26.01.07
Sceptilite released
Revise XD eevee encounter generating for shiny requests (disregard insufficient TID/SID)
Skip "overwrite" popup if savefile was loaded from a backup (bak)
2026-01-08 00:48:28 -06:00
Kurt
3d74e763ba Misc dark mode color tweaks
Centralize remaining vibrant colors to WinFormsUtil
2026-01-08 00:26:09 -06:00
Kurt
2c541ad422
Update to .NET 10 (#4676)
* Update to .NET 10
* Property fields
* API signature updates
* Extension method blocks

* Completed dark mode support
  Outside of my control:
- vertical tab control (pkm editor)
- datetimepicker controls
- lgpe event flags (no idea)
- some control types having white-borders when they should really be gray

Box background is 50% transparency to effectively darken the image.

* Custom legality report popup
* Event diff dialog, version select dialog
* Add quick overwrite popup for export sav
* Extension methods
* Dark Mode: glow currently editing sprite
* Add invalid encounter hint for trade evolutions
* Extension properties
* Append legality hint on hover card
* Slot image loading: clear the screen-reader description if a slot is empty/invalid, rather than retain the previous description. Changing boxes would easily confuse users on this.
2025-12-31 01:42:05 -06:00
RandomGuy
870c10ea5e
Refactor SAV_Misc3 Battle Frontier editor to use object-oriented block (#4670)
* Refactor SAV_Misc3 Battle Frontier editor to use object-oriented block class

Replaces direct byte array manipulation with BattleFrontier3 struct:
- Encapsulates all offset calculations and data access
- Uses type-safe enums for facilities, modes, and stats
2025-12-29 14:56:10 -06:00
Kurt
34f3624b64
Changes for Legends: Z-A (Mega Dimension) support (#4653)
Refer to pull request notes and the eventual changelog for a high-level summary.

Co-authored-by: Matt <17801814+sora10pls@users.noreply.github.com>
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-authored-by: SciresM <8676005+SciresM@users.noreply.github.com>
2025-12-12 01:30:35 -06:00
Kurt
01dc5aa331 Remove duplicate line returns
No functional change, just an OCD nitpick
2025-12-01 22:53:27 -06:00
Kurt
6a1c14af2f Revise some method signatures 2025-11-08 14:56:15 -06:00
abcboy101
b5f5f35f2c
Update text resources from Z-A, support LATAM Spanish as a program language (#4599)
* Split zh text resources

* Reorganize language text resources

* Update language codes

Z-A uses the same abbreviations in all languages

* Update characteristics text from Z-A

* Update LATAM text resources from Z-A

* Support LATAM Spanish as a program language

* Handle duplicates
2025-10-27 11:03:48 -05:00
Kurt
e217979000 Misc zipreader tweaks
Closes #4566
signature changes, add some overloads, extract/simplify common logic

Co-Authored-By: Chris Dailey <nitz@users.noreply.github.com>
2025-09-25 17:27:14 -05:00
Kurt
83beeaa5d0 Add zipped save file r/w
Not happy that zipping the file is the solution for some homebrew apps, but it is what it is.

No need to select which file; it's always one file in the zip, and never multiple.
When exporting, if it originated from a zip, grab the original then update it with the revised contents.

Closes #4564

Co-Authored-By: Chris Dailey <nitz@users.noreply.github.com>
2025-09-24 23:25:15 -05:00
abcboy101
a75ff7b2b0
Correct Gen 5+ status conditions (#4558) 2025-09-13 12:52:17 -05:00
Kurt
ec47d75327 Misc tweaks 2025-09-07 17:29:19 -05:00
Kurt
ee02b7c176 Update save file export extension filter get
specific extensions (like dsv/gci) would return a filter of (.gci) rather than (*.gci), leading to user error when they toggle back and forth (removing the extension).

Closes #4555

unrelated: allow folder list manual text entry to anchor to the right side (expands when form is expanded)
2025-09-05 14:54:26 -05:00
Kurt
9e8d8ccc62 Update 25.08.30 2025-08-31 00:01:14 -05:00
Kurt
ea85d5e6b0 Minor clean 2025-08-16 09:21:16 -05:00
abcboy101
8f9fec0b13
PBR: Add Battle Pass, Gear, Trainer Info editors (#4540)
* Fix PBR checksums

* Fix PBR desyncs between Data/Container

- CurrentSlot.set reloads Data from Container, so copy other.Data to Data after
- When editing the OT name, use Data if the requested slot is the current slot

* Correct PBR party offset/size

* Add GameVersion.BATREV

* Add Gear Editor

* Add Battle Pass/Trainer Info Editor for PBR

* Minor tweaks

* Fix ResetGear/UpdatePresetIndexes
2025-08-10 22:43:03 -05:00
Kurt
f370c0cc39
Memory<byte> Refactoring (#4527)
`SaveFile` and `PKM` classes now use `Memory<byte>` instead of `byte[]` to store their primary backing array data.
2025-07-27 20:57:10 -05:00
Kurt
13a4d472bc
Deferred Humanization of LegalityAnalysis (#4531) 2025-07-27 20:54:58 -05:00
abcboy101
fef5ff3edb
Translate DataGridViewColumn header text (#4528)
* Localization update

* Translate DataGridViewColumn header text

Temporary label hack in SAV_FolderList is no longer needed

* Localization update
2025-07-26 08:43:23 -05:00
Kurt
42835e9aac Misc tweaks
Adds a debug hex file loader from clipboard
sav1 current box if empty -> set if box is desync'd
wb7: add comment note of "real" value
2025-07-16 23:02:57 -05:00
Kurt
157210de08 Minor tweaks
Add a mutable trainer info class that mirrors the SimpleTrainerInfo
2025-07-06 09:03:44 -05:00
Kurt
c19a4605d5 Misc tweaks
No functional change
2025-07-04 01:32:25 -05:00
Kurt
ccfa58e5f1 Split PathUtil from Util, add more xmldoc 2025-06-08 16:33:31 -05:00
Kurt
d2594d7867 Misc tweaks
nothing needed for 4.0.0, everything works as-is
2025-06-02 21:01:16 -05:00
Kurt
602b1b6371 Add more xmldoc 2025-06-01 11:08:07 -05:00
Kurt
7442e86d65 level int -> byte
Might refactor the learnset level get to byte later as a TryGet so -1 is never returned.
2025-05-17 14:45:49 -05:00
Kurt
6b7938fea1 Add mousewheel event to edge Level/EXP
Scroll up Level once to increase level, scroll down EXP to be 1 exp from level up.

Apply the same mousewheel events to Friendship, IVs/EVs/AVs/GVs, with EVs being increments of 4.
I don't think it's worth overriding keypress arrow up and down to do the same.
2025-05-16 17:11:34 -05:00
Kurt
09f0462736 Refactor methods to use Try-pattern and improve code clarity
Refactored several methods across multiple files to use the Try-pattern for better null safety and clarity. Removed unused code, such as the SingleLevelRange record, and improved type handling in BatchEditing and BoxManipUtil. Adjusted constructors and properties for consistency in classes like CustomFolderPath. Minor updates to improve code readability and maintainability.
2025-05-16 16:12:48 -05:00
Kurt
77f1b637c9 Misc tweaks 2025-05-02 01:34:49 -05:00
Kurt
5ab6dbc0ac Add cancellation to savefile detection calls
5s timeout on detection, roughly
2025-04-06 22:25:37 -05:00
Kurt
53d47e5c64 Update localizations 2025-02-23 23:34:11 -06:00
Kurt
7d59e3416a Minor tweaks
== null
to
is null
2025-01-27 16:37:37 -06:00
Kurt
37e4b06a9e Misc tweaks
Make nick/trainer'd encounters use RoM instead of string[] to truly make them readonly records, and skip 1 dereference on access
add some xmldoc
fix open file suggesting main from another folder
2025-01-04 21:43:55 -06:00
Kurt
674a778bf9 Fix form centering to non-primary screen
The first screen is configured with origin coordinates 0,0; any other screens that are arranged to the left or below will have coordinates in the negative. Negative coordinates are valid; don't sanitize.
2025-01-03 13:35:54 -06:00
Kurt
e2086d2a0d Misc tweaks
Allow pkm batch editor to take readonlyspan property names
concrete types over `default` for clarity
encounterverifier: use const values for egg levels for clarity
batchediting: fetch all properties only once
etrade4: reduce object size/init by having Contest as a property
2024-12-31 12:53:51 -06:00
Kurt
ceb669c112
Update to .NET 9, c# 13 (#4390) 2024-11-17 13:13:58 -06:00
abcboy101
e7be55242d
Support SWSH gender/fashion item editing (#4374)
* Support SWSH gender/fashion item editing

* Update translations
2024-10-25 17:00:54 -05:00
abcboy101
3707ee5eb1
Standardize language codes and improve locale handling (#4353)
Use standard BCP 47 language codes
Move Culture utils into WinFormsUtil
Detect system language on first launch
2024-09-04 18:51:35 -05:00