Commit graph

2168 commits

Author SHA1 Message Date
Kurt
3285ecada9 Add MemoryCard detection as latest sav, pkmdb 2023-05-01 16:51:17 -07:00
sora10pls
d55bf21466 Minor fix to LGPE fashion cheat
oops
2023-04-30 12:14:05 -04:00
sora10pls
6eb82e3847 Add unlock all fashion cheat for LGPE 2023-04-30 12:01:08 -04:00
Eelen
ce431d1df4
Update CHS translations (#3869)
Co-authored-by: Leo <103500840+wubinwww@users.noreply.github.com>
2023-04-27 15:35:10 -07:00
Kurt
583a036d65 Remove eager check of Current
The SaveUtil's ienumerable can be of different collection types, and the result is usually is a collection with >0 count
I think I was initially confused (years and years ago) about "MoveNext" if it discarded the first result.

Remove the eager check of the enumerator's current value because it hasn't yet been moved from the uninitialized state.

Closes #3871

Dispose of the enumerator on the early empty return, since the later async code will dispose once all have been iterated.
2023-04-26 21:41:38 -07:00
Lusamine
62597d17e1 Update Designer automatic code generation 2023-04-21 23:29:50 -05:00
Lusamine
18cbb8158c Standardize MinDate/MaxDate values
3DS ranges from 1/1/2000 to 12/31/2050. After that, it rolls to
1/1/2050. Switch ranges from 1/1/2000 to 12/31/2060 as the settable
range. However, date continues advancing normally after 12/31/2060.
Allow the maximum Switch date range to be 12/31/2099 to match maximum
Met date. This should be comfortably far in advance for anyone who is
alive today.
2023-04-21 22:27:22 -05:00
Kurt
5bdc6b9ef8
Privatize some static fields, more robust legal helper classes. (#3865)
* Uses LearnSource more throughout the codebase when appropriate, rather than loosely coupled pivot methods.
* Hides Learnset/EggMove data inside the LearnSource classes.
* Extracts functionality from the large Legal class & partial Table*.cs files into better performing helper classes.
* Cleans up some code from prior LearnSource commits.
2023-04-20 21:23:15 -07:00
Kurt
9a768dded3 Permit pkrs strain 0 & 8 on Gen3+ context
Ruby & Sapphire had a bug that only looped when (rand) == 0 !!! instead of (rand & 7) == 0.
End result is that the pkrs giving method yields strains 0 & 8 with 30/255 & 1/255 rarity.

Gen2: z80 assembly does NOT work as intended, and has a separate bug that causes strains 9+ to never be obtainable. So close to a neat statistical separation.

Revise the GUI to disable the events on field loading, and allow for selecting Strain0 w/ days !0.
VC2->7 does not transfer pkrs; not that it matters since Gen3++ transfers can spread every strain.

Thanks @SNBeast for clarification on Gen2's assembly logic and repro!

Co-Authored-By: SNBeast <21327530+snbeast@users.noreply.github.com>
2023-04-20 21:20:25 -07:00
Lusamine
b08581aecf Final adjustments to SV Trainer Editor, update localization files 2023-04-16 18:16:41 -05:00
Lusamine
78031f09f1 Better align components of gen 9 Trainer Data Editor 2023-04-16 18:16:41 -05:00
Jonathan Herbert
8fca2075d9
Add Game Start Time Editor For Scarlet and Violet (#3861) 2023-04-16 13:16:34 -07:00
Kurt
fa9a809751
Encapsulate item pouch arrays/etc for finer control (#3860)
* Extract/encapsulate inventory legal arrays to interface+class

Hiding them behind methods allows these to be left as ReadOnlySpan<ushort> and thus never allocate on the heap.
Also refactors out some logic for checking if an item is legal.

End result feels more maintainable and is less bloaty (no more passing in a nullable func)

Batch editing
* Add HasType filter

```
=HasType=11
.HeldItem=Meadow Plate
```

slaps a meadow plate on any pkm with grass type
Use `=PersonalType1=11` for only primary grass types; only-secondary-type grass will not match it.
2023-04-16 12:58:07 -07:00
Kurt
c73264d4f3 Minor minor perf
Small changes to reduce some allocations
2023-04-15 01:58:37 -07:00
Kurt
ecef31f167 Minor clean 2023-04-13 00:05:10 -07:00
Kurt
b5262d69b0 Dispose of file-loaded bitmap after use
Image.FromFile locks the file until the object is disposed; adjust all uses of Image.FromFile to dispose when finished.

Closes #3857 ty @SNBeast !
2023-04-12 23:22:33 -07:00
Kurt
7b0313aa6a Update 23.04.06 2023-04-06 21:52:23 -07:00
Jonathan Herbert
7ea0e21b7d
Add Button To Unlock All Fashion in BDSP Misc Edits (#3856) 2023-04-06 20:54:42 -07:00
Kurt
aeb6595887 Show move elemental type in PKM Editor
Note this is only SV types, so moves that had their type changed (=>dark/steel/fairy) will be inaccurate in past game formats.

Would need time to dump the info.
2023-04-04 14:38:07 -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
e53ca4b1af Allow setting to 11th slot for !PCD
Oops
2023-04-03 15:43:13 -07:00
Kurt
37eb076bd4 Use placeholder sprite for not-yet-affixed
ty matt
2023-04-01 17:46:10 -07:00
Kurt
c3e51d414d Add click event for affixing ribbons easier
Click affix ribbon via cosmetic tab to open Ribbons (same as Ribbons Button). None affixed, but ribbons/marked available, will show an empty square.
Click possessed ribbon to affix.
2023-04-01 17:23:04 -07:00
Kurt
3b54ac6ecc Show affixedribbon next to markings
new Visual Studio version made my designer code ugly
maybe I should refactor the GUI like they recommend :P
2023-04-01 16:52:12 -07:00
Kurt
0d3bbe15b7 Add lechonk wc9 to pickle 2023-04-01 15:20:14 -07:00
Kurt
4384cadefc Add more xmldoc 2023-03-31 13:00:34 -07:00
sora10pls
bd05da2b94 Revise SV stake collection cheat
Chains in front of the ruins are now removed when activating the cheat
Also reorder and label more blocks
2023-03-28 18:25:56 -04:00
sora10pls
6b5d4ec3ea Add, label, and reorder more SV save blocks
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2023-03-28 16:01:21 -04:00
Kurt
79ca670044 Replace party/boxdata get with more performant use
Read directly from the save file.
Batch Editor no longer updates dex, HT details, or updates acquired counts when placing back in the SAV.
2023-03-28 12:49:21 -07:00
Kurt
5c13183d02 Less allocation, minor tweaks
NET 8 will have a Shuffle method, which can get rid of the overload in Util.
Batch Editor no longer crashes the program when selecting OT_Trash/HT_Trash/Nickname_Trash via dropdown.
2023-03-27 00:11:42 -07:00
Kurt
82309cf99d Use Memory<byte> for Gen4 saves
Instead of allocating a buffer for Storage/General, just point within the raw Data, as a Memory<byte> reference. Most of the uses were already using it as span.
2023-03-26 15:16:12 -07:00
Kurt
aa13c93e65 Add misc generic constraints
Resolves some allocation analyzer issues
2023-03-25 23:28:28 -07:00
Kurt
0087ccb44f Use span for savefile slot API
No more offset fetch
2023-03-25 23:14:50 -07:00
Kurt
5ce3e734b8
Skip initial cctor alloc on non-byte primitives (#3850)
Runtime/jit repoints these to the dll rather than heap if we're Little Endian (always, otherwise will allocate like before).

Eliminates quite a few static constructors, so even faster startup. Items later.
2023-03-25 17:55:55 -07:00
Kurt
4615e3577a Span-ify MoveSetApplicator 2023-03-21 21:02:13 -07:00
Manu
f611c4a728
Update Italian translation (#3845) 2023-03-20 07:13:05 -07:00
javierhimura
7af65a4683
Filter Block Dump data (#3840)
* Allow the filter results in BlockDump combobox. Write a text in the dropdown
2023-03-19 12:33:12 -07:00
javierhimura
66d897c41a
ResetBoxNames in UpdateBoxViewers (#3839) 2023-03-19 10:33:55 -07:00
Kurt
662cc99141 Rework mail slot swapping
Closes #3831
2023-03-10 19:49:35 -08:00
BlackShark
cb0ef52676
Minor UI fixes (#3823)
* Resized SettingsEditor

* Fixed mislabeled Gen 3 MiscEditor
2023-03-03 00:52:19 -08:00
Kurt
57d32456f6 Update 23.02.27 2023-02-27 19:21:56 -08:00
Eelen
353ca40f42
Update CHS Translations (#3802)
Co-authored-by: wu professor <103500840+wubinwww@users.noreply.github.com>
2023-02-27 18:15:13 -08:00
Manu
8de4b8b90f
Update Italian translation for Copy Raid button (#3814) 2023-02-27 05:52:18 -08:00
Kurt
7b93491025 Tab separated country/region tables
https://github.com/kwsch/PKHeX/pull/3810#issuecomment-1445519631

SuggestAppend for gen4/5 trainer country/region editor
Add country:0 for 3DS locale for consistency
Use — for "None"
2023-02-26 17:41:22 -08:00
abcboy101
30aa1cc9aa
Add Geonet location editing for Gen 4/5 (#3810)
* Add Geonet location to SAV4 and SAV5

* Allow commas to be escaped in subregion names

* Add missing 3DS subregions

* Add Geonet location editing

* Ensure null values are kept as the first option in GetCountryRegionList

* Add Geonet locations in CHS/CHT
2023-02-26 16:33:53 -08:00
Lusamine
0fa4ec8dce Fully update button naming/localization for propagating SV raids
Standardizes capitalization of "raid" in the editor and updates
shortcuts to indicate holding Shift to propagate seed.

Closes #3807
2023-02-23 11:08:33 -06:00
Kurt
812aa0a2d3 ThrowIfNull net7 2023-02-23 01:07:46 -08:00
Eelen
92b841881d
Update CHS translations (#3776)
Co-authored-by: wu professor <103500840+wubinwww@users.noreply.github.com>
2023-02-12 11:16:56 -08:00
Kurt
39a7007541 Extract Bulk Analysis components 2023-02-08 17:24:47 -08:00
Kurt
b8b499a797 +1char lgpe CP textbox
Now 5 digits visible.
2023-02-07 21:52:31 -08:00