Commit Graph

1260 Commits

Author SHA1 Message Date
Kurt
c19a4605d5 Misc tweaks
No functional change
2025-07-04 01:32:25 -05:00
Kurt
1258d96883 Add some CodeAnalysis attributes 2025-06-28 00:38:05 -05:00
Kurt
5e0ee30235 Split ShinyUtil.GetIsShiny into separate methods
Some past gen usages weren't passing the bitXor compare `8` and were thus using the Gen6+ 16 value. Let's be explicit.
2025-06-28 00:36:46 -05:00
Kurt
8c85a03d78 simplify mysterygift clone
move declaration to derived class, can return specific type now
don't use AbilityType directly, use the ability permission computed property for legality checks. probably can remove this explicit MG method in the future.
2025-06-19 23:36:59 -05:00
Kurt
870dbb1ce3 MysteryGift.Empty -> IsEmpty 2025-06-19 23:35:21 -05:00
Kurt
416e519073 Misc tweaks
No functional change, just xmldoc and small inlining
2025-06-14 21:39:49 -05:00
Kurt
56e06dcbc1 Update SAV_MysteryGiftDB.cs 2025-06-09 16:55:41 -05:00
Kurt
ccfa58e5f1 Split PathUtil from Util, add more xmldoc 2025-06-08 16:33:31 -05:00
Kurt
93d9292d83 Minor clean 2025-05-30 17:41:54 -05:00
Kurt
fd766a5506 Filter db search dropdowns for current context
"why can't I find Yveltal in SV?" because it doesn't exist in the game
now matches the dropdowns of the main PKM editor
2025-05-29 10:04:06 -05:00
Kurt
48954533b5 Make mysterygifts memory-backed objects 2025-05-24 00:10:57 -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
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
275f5fb5df Misc tweaks
Seal some classes
Use derived pkm class for template->pk* moves (pk3/pa8)
Revise inventory9 to better handle empty slots
Cache legality for Summary report grid (does this make it faster?? seems to open instantly); add shift-quit to skip prompt
Fix handling for level range on encountercriteria passing level range for gen3/4 encounter slot method1/etc lead checks
2025-05-07 23:06:40 -05:00
Kurt
f730f7d19a
Feature: Localization of Battle Templates (Showdown Set) (#4482)
* Localization capability for each language, import & export
* Lines with stat names (IVs/EVs) can be configured to many representations (X/X/X/X/X/X, HABCDS, etc).
* Add nonstandard localizations
* Add token types for Showdown's new set format
* Add new program settings for hover & export styles. Allows users to select which presentation format they want for the hover previews, as well as the set export format.
* Revises preview hover GUI to use new settings
* Revises export events to use new settings
* Moves no longer indicate end of set
* Enhance robustness of stat parsing
* Expand all settings in settings editor on form load
* Extract clipboard -> sets operation to api for maintainability & reusability
2025-05-01 23:16:36 -05:00
Kurt
b8eb980241 Enhance folder path tracking
Internal metadata, not really useful but maybe in the future.
2025-04-20 11:06:54 -05:00
Kurt
ef2152cf3b Misc tweaks for cxd encounters/viewing
convert, adapt to save file on view (fixes viewing gen3 ot/nick'd encounters in cxd)
display original string in cxd format (useful for jpn->eng->ENG colo, for string matching? might need to revert)
hard-match version for colo gift (MATTLE) to not confuse 10ANIV
2025-04-15 02:50:25 -05:00
Kurt
fbfa28a0cf Sunset PKX -> Latest
Relocate gender ratio info to EntityGender
farewell PKX; once a behemoth catch-all of >4000 lines, now no more. 😢
2025-04-13 11:44:28 -05:00
Kurt
9218f97971 Rename item pouch legal lists, make public
No longer need to protect for immutability since they're now ReadOnlySpan.
2025-04-13 11:42:59 -05:00
Kurt
92cd8feaf1 Use entitycontext for xmldoc instead of lump 2025-04-13 11:34:17 -05:00
rganhoto
7219e39b0f
Pokedex - fix cannot unsee forms in Gen4 (#4466) 2025-04-10 13:11:44 -05:00
Kurt
5ab6dbc0ac Add cancellation to savefile detection calls
5s timeout on detection, roughly
2025-04-06 22:25:37 -05:00
Kurt
f4cfc39173 Gen9+: Show gold Battle Memory ribbon if 7+
https://bulbapedia.bulbagarden.net/wiki/List_of_Ribbons_in_the_games#Battle_Memory_Ribbons
> As of Scarlet and Violet, Pokémon that obtained seven out of the eight possible Ribbons will also display this version, owing to the fact that the World Ability Ribbon hadn't been officially obtainable for 8 years as of the game's release
2025-03-10 00:32:15 -05:00
Kurt
356db93e9f Settings: version select typeable combobox
Was annoying cycling through all these versions that start with the same character. Works well enough to just do it

bv5: ignore checksum integrity, the checksum is over the decrypted data (not while encrypted).
2025-03-02 01:11:29 -06:00
Kurt
4bdd673fd0 Add label for LGPE arrived datetime
Allow editing of memories while an egg (SW/SH traded eggs with memories...)
2025-02-25 20:38:13 -06:00
Kurt
dfda71dddd Rename default label names 2025-02-25 20:37:34 -06:00
Kurt
c8ec63992b Rework entity import settings param passing
Closes #4418

Introduce a readonly record struct to contain all the settings selected. Add simple static get for none/all to disable/force the updates.

Split the UpdateRecord behavior out of UpdatePKM (adapt to save file) so that it behaves similarly to UpdateDex.
Only AdaptToSaveFile when opening a file in the PKM Editor.
2025-02-23 15:50:17 -06:00
Kurt
65df18ae66 Extract entity/template game presence filter 2025-02-23 11:25:47 -06:00
Kurt
acfdd9bab3 misc tweaks
reduce allocation lol
2025-02-23 11:19:50 -06:00
Kurt
8cb14379a6 Resize Gen3 RTC editor buttons
Allows for long-winded languages like German to better label button text :)

Closes #4449
2025-02-21 20:07:48 -06:00
Kurt
4fa83b905f Better clamp corrupt sav2 mail boxsize reads 2025-01-29 02:02:43 -06:00
Kurt
7d59e3416a Minor tweaks
== null
to
is null
2025-01-27 16:37:37 -06:00
Kurt
2976480792 Minor tweaks
File.WriteAllBytes now accepts span on .NET 9 yay
2025-01-16 22:16:40 -06:00
Kurt
0549cfda4a Rework SCBlock to Memory<byte> 2025-01-16 20:55:07 -06:00
Kurt
ab215d0721
Enhance EncounterCriteria and template->pkm adherance (#4411)
Change the EncounterCriteria object to a readonly record struct, and introduce extra properties to indicate how flexible we are with random results.
2025-01-04 22:45:30 -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
b94ab9acb4 Minor clean
No functional change
2025-01-04 01:24:29 -06:00
Kurt
520c849287 Fix Gen1 party+clear
Closes #4410

Also fix trash bytes persistence (only overwrite nickname with default if it visually differs from what is present in the textbox).
Add trash edits to Gen3 HoF
2025-01-03 21:33:22 -06:00
Kurt
a1a15fe5b2 Fix opening Gen3 HoF editor
Closes #4409
(icon reference needed to point to the static resource)

Add SAV3 property to check for misconfigured (small) sizes, to disallow editing extdata blocks that don't exist (no exception thrown for the small saves, can't open the GUI)
Rearrange GUI, handle exception when copypasting bad PID and saving, add sprite, add Clear button instead of auto-clearing on species:0, add shiny checkbox (readonly)
2025-01-03 13:32:24 -06:00
Kurt
abc1e785d8 Remove fullness/enjoyment from PKM, use interface
No need to carry this baggage further since SV ditched it. PLA and BDSP only have it because there's a gap in the structure that *we assume* is unused (rather than reserved), and is worth checking for legality (unused bytes shouldn't be used).
2025-01-02 20:19:29 -06:00
Kurt
30fdfb29e7 Add context to TrashByte editor
rather than just Generation, context is also important to help select glyphs for different games (Gen7b differing from Gen7?)
2025-01-02 20:17:17 -06:00
Kurt
88c7256841 Extract common technical record applications
Get a neat API for it to provide an "option" of what all you want set.
Ends up deduplicating some logic in batch editor as well.
2025-01-02 19:51:03 -06:00
Kurt
f77899ab73 Extract entity extension list fetch
No need to have a static member in PKM for something that is only used outside of PKM.cs (save files, GUI, aka file naming)
2025-01-02 19:48:56 -06:00
Kurt
243c4102dc Reduce some allocations in SpeciesName
implement the net9 shortcut for species name lookup from span
don't fetch japanese/spanish names twice or build dictionaries for them
2024-12-31 13:15:02 -06:00
Kurt
83df635e04 Add more DPPt underground stats, update names
Closes #4405
2024-12-23 19:31:01 -08:00
R-YaTian
c198ab08e0
Gen 6: Fix Pokemon Link data saving, enable modify BP and PM (#4401)
* Gen6: Fix Pokemon Link data saving, enable modify BP and PM
2024-12-16 20:35:48 -06:00
Pasquale Nardiello
8e42776610
Fixed HallFame3 logic and added GUI for manipulation (#4395)
* Fixed HallFame3 logic and added GUI for manipulation
2024-12-16 20:28:42 -06:00
Pasquale Nardiello
a75e09780c
Added Initial edito for Secret Bases in RSE (#4386)
* Started making Secret base 3 editor

* Completed Initial RSE secret bases manipulation.
2024-12-16 20:23:50 -06:00
Kurt
872c79f124 Add gen1 hall of fame editor
Closes #4403

Co-Authored-By: ShadowMario3 <36941677+ShadowMario3@users.noreply.github.com>
2024-12-16 19:37:58 -06:00
Kurt
ceb669c112
Update to .NET 9, c# 13 (#4390) 2024-11-17 13:13:58 -06:00