Commit graph

2180 commits

Author SHA1 Message Date
Kurt
b0e7e86c68 Add savedata sub-menu editors
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-02-04 17:32:16 -08:00
Kurt
3389a224d1 Change stat label clicks to change nature instead
Document in shortcuts
Old behavior was undocumented, and was kinda janky.

Closes #3376
2022-01-25 16:45:41 -08:00
Kurt
da9d09ea76 Misc tweaks
No functional change
2022-01-11 22:53:20 -08:00
Kurt
36bf73818e Source trainers for encounter database
Closes #3364
Related: #3358
2022-01-03 19:33:10 -08:00
sora10pls
3f1335e19f Add Zone unlock cheat to BDSP Misc Editor
As with most event work tampering, make sure you keep save backups. Accessing areas before you're intended to will almost certainly break story progression.
2022-01-03 11:06:06 -05:00
Kurt
47071b41f3
Refactoring: Span-based value writes and method signatures (#3361)
Existing `get`/`set` logic is flawed in that it doesn't work on Big Endian operating systems, and it allocates heap objects when it doesn't need to.

`System.Buffers.Binary.BinaryPrimitives` in the `System.Memory` NuGet package provides both Little Endian and Big Endian methods to read and write data; all the `get`/`set` operations have been reworked to use this new API. This removes the need for PKHeX's manual `BigEndian` class, as all functions are already covered by the BinaryPrimitives API.

The `StringConverter` has now been rewritten to accept a Span to read from & write to, no longer requiring a temporary StringBuilder.

Other Fixes included:
- The Super Training UI for Gen6 has been reworked according to the latest block structure additions.
- Cloning a Stadium2 Save File now works correctly (opening from the Folder browser list).
- Checksum & Sanity properties removed from parent PKM class, and is now implemented via interface.
2022-01-02 21:35:59 -08:00
MewTracker
d5a79079c0
Added named constant for BDSP swarms (#3362) 2022-01-02 15:43:18 -08:00
Kurt
4b8adfe28d Bump winforms proj c# lang to 10
no functional change
2022-01-02 15:04:16 -08:00
Kurt
3f769d6f52 Update 22.01.01 2022-01-02 00:53:37 -08:00
Kurt
0cf7b22363 Fix init of custom work value, fix write of named workval
Closes #3357
2022-01-01 23:23:44 -08:00
Kurt
ae70525fd5 Use correct reference for unlocking events
Was unlocking the real save file, not the editing-shadow. Oops
2022-01-01 23:15:37 -08:00
Kurt
76cac85243 Minor clean 2021-12-27 13:50:21 -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
11039f1119 Extract some event unlocking logic for core 2021-12-26 18:21:34 -08:00
Kurt
5db5f04066 Don't iterate battle forms when displaying encounter lists 2021-12-26 00:44:16 -08:00
Kurt
ac6fd085ba Update translation files 2021-12-25 19:03:11 -08:00
Kurt
13e0f35e00 Add munchlax slot checking for DPPt/BDSP honey trees
Closes #3352
2021-12-25 13:48:28 -08:00
Kurt
36a97a6eda Add misc edit to defeat all trainers & rebattle all 2021-12-20 19:26:07 -08:00
soopercool101
0f702717ca
Remove stray background pixels from Warn.png (#3330) 2021-12-17 15:04:20 -08:00
sora10pls
3e92d5a85d Add Dialga/Palkia + Roamer resets to Misc Editor
For roamers, go back to Lake Valor/Fullmoon Island, and re-interact with Mesprit/Cresselia so that the game can generate a new one.

Also add Rotom rebattle event flag, and fix consistency with flag labels.
2021-12-12 11:28:48 -05:00
Kurt
aa968f56aa File scoped namespace for drawing projects
Extract color util to separate class as it's not entirely image related.
2021-12-10 00:15:04 -08:00
Kurt
f1fe2f6a8c Minor clean 2021-12-09 19:30:12 -08:00
Kurt
cacd6e9965 More records/sealing 2021-12-05 23:54:59 -08:00
Kurt
c7de0154e3 Handle net6 warnings for nullability 2021-12-04 22:29:51 -08:00
Kurt
ba92024e54 Bump the net5 build to net6 2021-12-04 22:29:32 -08:00
Kurt
f55c5bea66 Minor clean
no functional change
2021-12-04 17:56:56 -08:00
Kurt
9a1b2719ec Add simple legal item filtering for giveall
Closes #3318

Gen8: if held item, only give if can be legally held; if dmax crystal, only give if available.
Gen8b: if held item, only give if can be legally held
Others: unimplemented; pull requests accepted.
2021-12-04 12:24:32 -08:00
Kurt
e9eebc984b Fix case sensitive resource names
Closes #3321
2021-12-04 11:03:33 -08:00
Kurt
e50bb8f288 Abstract-ify pouch items; acknowledge sort order
Closes #3320
Should better handle bdsp inventory format; shows sort order with the now-zero slots
2021-12-02 23:31:48 -08:00
Kurt
e48c81f685 Update met date & location when toggling IsEgg via GUI 2021-12-02 16:35:35 -08:00
XxPhoenix1996xX
1481831ec6
Update (ES) localization (#3317)
* Create flag_bdsp_es.txt

* Update flag_bdsp_es.txt

* Update lang_es.txt

* Update flags_c_es.txt
2021-11-30 13:19:06 -08:00
matty
f94c431712
Add PKHeX icon to generic/simple/whatever editor (#3316)
Replaces the generic winforms icon with PKHeX's icon.
2021-11-28 08:19:33 -08:00
Kurt
bc809af06c Split PKHeX.Drawing into subprojects
Allows trimmed dll usage by keeping pkm sprites in one project, and all other cosmetic UI stuff in another project
2021-11-27 15:48:08 -08:00
Kurt
b5b57ffa90 Update PluginLoader.cs 2021-11-27 13:54:38 -08:00
Kurt
cc34d40120 Update 21.11.27 2021-11-27 10:50:42 -08:00
Kurt
335baf68e6 Reorder poffin names from raw -> indexed
StreamingAssets\AssetAssistant\FureaiHiroba\fureai\masterdata\PoffinResult.json indicates which text line is used for a given MstID

Change Taste to Smooth to match community's naming
2021-11-27 10:20:22 -08:00
Kurt
be3af9fba9 Add bdsp poffin editor
The RAM is pretty dirty for unallocated poffins; slots that have never been filled will have junk with whatever the unallocated pointer was looking at.

An empty poffin slot is just marked as FF, ignores the stats for that slot. Not sure on the naming, but Matt had a single Level 60 poffin -> must be Mild? Thus, all the names are -1 from the textfile array...
2021-11-27 02:06:35 -08:00
sora10pls
8bce248d95 Crop BDSP Box Wallpapers, re-tile Grass, and fix off-by-one 2021-11-26 22:11:54 -05:00
Kurt
2bc9ff9073 Fix clamping of BDSP work value NumericUpDowns
https://projectpokemon.org/home/forums/topic/59826-work-constants-can-be-out-of-range-of-the-gui-fields-bdsp/

ty BlackShark !
2021-11-26 09:20:22 -08:00
Kurt
b7c9993bac Add Misc editor form for bdsp
Three clickables so people can stop getting confused about event-bound encounters like Darkrai/Shaymin/Spiritomb
2021-11-25 22:48:09 -08:00
Kurt
02dc4dc8a7 Automatically update v1.1 expanded records on TID/SID change
Closes #3305
I think it was actually crashing due to the bad GameClear date record, not this extra record data, but we'll still update the head record

Fix note of ENC_SV_DATA start offset now that we know the real size of Record8b
Add actual maximums for all record entries
2021-11-25 20:05:39 -08:00
Kurt
ae2c5080a5 Set nicknamed flag in GUI depending on encounter
#3311
2021-11-25 12:40:42 -08:00
Kurt
039095d75c Revise zero hw checks
fishy by default, opt in
ignore certain encounters
2021-11-24 23:03:30 -08:00
Kurt
cce0111a9d Add scalar randomizer shortcut
Okay I'll be nice, fudge your values this way.
2021-11-24 19:32:12 -08:00
Kurt
203b764829 Add zero height/weight flagging setting
because people couldn't hacc responsibly, I might as well give them a nudge in the right direction.

Doesn't mean I won't check your "random" choices distribution.
2021-11-24 19:29:02 -08:00
Kurt
d79864b049 Add seal list editor
Inject all the stickers you want.
2021-11-24 17:51:12 -08:00
Kurt
5374ca1db6 Simplify egg location set on version change 2021-11-24 14:14:11 -08:00
Kurt
29579d7b22 Autosize dropdown width for met locations
BDSP locations are pretty long.
2021-11-24 13:14:02 -08:00
Kurt
c8ae0fb275 Fix custom system flag set 2021-11-23 00:44:59 -08:00
Kurt
4b40414b8b Add BattleTower work reader, move BP get/set into it 2021-11-22 19:30:28 -08:00
Kurt
57cf384f44 Condense friendship shortcut's expression
decouples it from the GUI by doing things step by step
2021-11-22 19:03:42 -08:00
Synthlight
b32ad02c10
Add/Enable BDSP Battle Tower Points (BP). (#3309) 2021-11-22 18:56:31 -08:00
Kurt
e6cd906177 Allow saving of affixedribbon from gui
do it in batch editor `.AffixedRibbon=-1` anyways
2021-11-22 16:14:10 -08:00
Kurt
37e2804aed Update 21.11.21
Things are stable enough, and I'm not passing up that palindrome date version ;)
still 11/21 where it matters!
2021-11-21 23:08:11 -08:00
Kurt
cd5c220ddc Show correct HatchCounter value for BDSP traded eggs
Yay abstractions to hide away the quirks.

BDSP traded eggs set HT_Friendship and the CurrentHandler flag, but the HatchCounter is always the OT_Friendship value.

Trades always receive BaseFriendship, instead of a hardcoded 50. Necessary to not hardcode because it's immutable for eggs.

Clicking the hatch counter label now sets it to the legal minimum hatch counter (best), and control clicking sets it to the max (worst). Check the encounter template for the true maximum.
2021-11-21 19:53:13 -08:00
Kurt
829641d874 Set none location when eggifying 2021-11-21 18:47:57 -08:00
Kurt
2cb3b61e48 Fix egg toggling in GUI, egg location auto-select 2021-11-21 18:36:02 -08:00
Kurt
32edb660ce BDSP: Add underground item-inventory editor 2021-11-21 11:33:04 -08:00
Kurt
5e867a1830 BDSP: Show adventurestart/latest save time in trainer editor 2021-11-21 09:14:13 -08:00
Kurt
6980026ca2 Add BDSP trainer stat records
Continue crawling down the serialized savedata structure :)
2021-11-20 15:40:18 -08:00
Kurt
1d3d317665 Add initial Trainer Info editor for BDSP
Closes #3297
2021-11-20 10:34:20 -08:00
Kurt
b26f4db6ab Enforce AffixedRibbon -1
All your hacks are still hacks

Re-expose affixed ribbon in the ribbon editor for PB8
Since there's no way to change it in BDSP, flag anything non-neg1
2021-11-20 09:04:09 -08:00
Kurt
93aaad6cd4 Revert net6 to net5
would rather have pipeline builds for those keen right now
2021-11-19 23:19:41 -08:00
Kurt
c67565288c Update translatable resources
actually committing to master
2021-11-19 18:51:33 -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
b77a197b74 Add optional EXP stripe toggle for sprite draw
helps visual identification of suspect EXP values
2021-11-07 14:48:59 -08:00
Kurt
3f44acf813 Don't show blank popup when saying No on group import
ty anubis
2021-10-31 12:20:19 -07:00
TcavemanT
135610124a
Added a tooltip to the legal PictureBox to better help new users. (#3280) 2021-10-30 22:04:44 -07:00
Kurt
77d1a990cd Add setting to auto-max IVs when changing HP type
https://projectpokemon.org/home/forums/topic/59634-hidden-power-improvement-feature-request/?do=findComment&comment=270001

Default is true.
2021-10-30 12:38:00 -07:00
Kurt
32bd948f26 Fix battle frontier gold symbol set
Closes #3279
2021-10-29 20:11:30 -07:00
Kurt
533526465e Omit exclusions if empty 2021-10-25 20:03:16 -07:00
Kurt
4089a42fe0 Wait for csv export before disposing of form
https://projectpokemon.org/home/forums/topic/59622-error-generation-csv-of-box-data-report/

ty GLBBx303
2021-10-25 20:00:47 -07:00
Kurt
640cb3bad1 Update OT and language state when egging pk3
https://projectpokemon.org/home/forums/topic/59250-pkhex-210806/?do=findComment&comment=269850
2021-10-23 15:45:32 -07:00
FeralFalcon
3afd51e587
Adding a plethora of event flag data (#3273)
* Add metadata flagging for values

Allows users to set a minimum importance for the list displayed.

Could probably make this checkboxes within the flags UI.

* Add setting to filter out gen8 block names

Allows users to filter out unwanted low-value property names.

Co-authored-by: Kurt <kaphotics@gmail.com>
2021-10-23 11:25:14 -07: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
993a2d684c Update nature amps on PID text changed
Closes #3272
2021-10-15 18:27:16 -07:00
berichan
cc2f195359
Add load plugin method setting (#3263)
* Add load plugin method setting

* Remove static settings dependency, change compiler-time functions to enum-switch
2021-10-06 14:48:17 -07:00
Kurt
6deef4e76d Update version tag for winforms exe
Oops, update check fixed.
2021-09-30 23:42:28 -07:00
Kurt
93f2639de2 Update 21.10.01
Update events & go binaries with latest.
2021-09-30 23:04:02 -07:00
Kurt
4e6a38189b Force validation differently for met location list changes
Startup, load gen5 save file.
Immediately load a pk3; met location is converted to Poketransfer
When data is prepared, the validation fails and the selectedvalue is reset to 0
Future selectedvalue sets will work

Just force validation when we change the list, so that future value sets work.
Weird winforms quirk
https://stackoverflow.com/questions/14624129/setting-combobox-droppeddown-false-resets-selected-item
2021-09-17 19:20:24 -07:00
Kurt
d2d71494e3 Update debug logging for plugin fails 2021-09-16 17:04:34 -07:00
Kurt
02af45cb30 Add LGPE to block editor
thanks for nobody noticing this yet :)
2021-09-16 14:06:52 -07:00
Kurt
b9d4721553 Hide some controls if WR7 (LGPE)
User experience.

Co-Authored-By: FeralFalcon <33670476+FeralFalcon@users.noreply.github.com>
2021-09-16 13:45:41 -07:00
Kurt
c353ec1584 Fix double processing on batch modify file path
Only process a single time, and only save if processing worked.
2021-09-15 17:35:41 -07:00
Kurt
80d1712b72 Mark stuff with enums, remove unused arrays
Fix shuffled comments for FormInfo
Remove unnecessary Reset on ctor, all fields are already the default
2021-09-07 20:57:19 -07:00
Kurt
a7ed5b400f Add Trainer Class / Title property for LGPE 2021-09-04 22:04:49 -07:00
Kurt
2f3e496e6f Change defunct gen8 location memory setting to check 1%
Refer to previous commit, the apply-memory has a 1% chance of failing for 100% memories, resulting in the ability to have 0-memory HT via link trades.

In-game trades caused the previous logic, as those forget to set the HT memory (likely the same logic flaw as skipping the nickname check via game settings).
2021-08-29 13:09:26 -07:00
Kurt
87a268fa7f Clean up memory generation parameter fetching 2021-08-25 19:45:47 -07:00
Kurt
0e2dac3ff6 Minor tweaks
Empty return for invalid species encountertemplate fetch
Expose property for ck3 @ 0xD7
show legal memory context items rather than gen8 always
2021-08-25 19:23:15 -07:00
Kurt
d932be5f75 Default the box slot encounter indicator to off
Don't wanna scare the plebs; it's opt in.
2021-08-24 20:04:14 -07:00
Kurt
de2d3a43be Add toggleable setting for encounter background types
Fine archit and matt, have it whichever way you want :)
2021-08-24 19:52:06 -07:00
Kurt
e3fecdf1d5 Update translatable GUI text 2021-08-24 14:24:43 -07:00
Kurt
a121f4d617 Add optional box slot coloring, add settings 2021-08-24 14:21:35 -07:00
Kurt
302b5d1d90 Update WinFormsUtil.cs 2021-08-24 13:22:29 -07:00
Kurt
9f1a8d1da1 Split memory text string resources
Much easier to maintain and reference now
2021-08-23 23:06:51 -07:00
Kurt
28e7473f1a Condense some expressions 2021-08-22 01:26:28 -07:00
Kurt
5b42dc8ae4 Minor clean 2021-08-22 00:05:41 -07:00
Kurt
8f0fb902d1 ArgumentException -> ArgumentOutOfRangeException 2021-08-21 16:51:50 -07:00
Kurt
bedc52943e Trailing commas
No functional change
2021-08-20 13:49:20 -07:00
Kurt
c6342a163f Minor clean
variable swaps, simplifications
2021-08-20 13:42:25 -07:00
liketolike
8b4730a2ee
Update zh translation (#3241)
Adds Gen2 zh const/flag name files
Adds Gen7 zh lgpe flag names
Updates GUI translation
Updates gen3,4 const/flag files
2021-08-19 20:19:49 -07:00
Kurt
d4ce28ed12 Fix exception when opening trashbytes 2021-08-15 19:32:22 -07:00
DOTTEL Gaël
ff309fc9c5
fix french translation for form (#3243) 2021-08-15 07:43:28 -07:00
Kurt
2f9b175cd2 Show gmax for encounters in encdb 2021-08-14 17:16:53 -07:00
Kurt
44589e6fbb Minor tweaks
use switch expr for auto-backup load
trycatch plugin activator (just in case)
extract dialog prompt for easier reading
remove dead method
2021-08-13 15:37:21 -07:00
Kurt
9793e9f1a0 Minor clean
Slap on interface for EntreeSlot
De-magic some 💯 numbers to indicate what they're doing
Improve perf of move-match-relearn check
Add an "else" as valid is never both values (history verifier)
2021-08-13 15:36:30 -07:00
Kurt
4719ee7816 Trigger combobox event for event work values if value is 0
Closes #3240
Initial value is zero, so the "changed" event doesn't trigger, leaving the first combo item selected.

Co-Authored-By: CanoeHope <43196464+CanoeHope@users.noreply.github.com>
2021-08-08 12:08:14 -07:00
Kurt
76df80719a Fix inverted check
Closes #3239
Thanks @SunakazeKun !
2021-08-08 10:21:39 -07:00
sora10pls
803fe84f04 Add form strings for Eiscue, Morpeko, and Zacian/Zamazenta
Ice Face, Full Belly Mode, and Hero of Many Battles (strings trimmed where appropriate)
2021-08-07 13:22:14 -04:00
Kurt
c77543584e Widen pkm form dropdowns
Removes the hax form ID specifying; just use batch commands to mod the slot for out of bounds values.
2021-08-06 22:04:11 -07:00
Kurt
d2d10b445b Update translatable strings 2021-08-06 10:11:55 -07:00
Kurt
a939a2dbd6 Add pkmdb sorting rules for loaded database set 2021-08-06 10:09:16 -07:00
Kurt
0094492bd2 Update 21.08.06
Update mgdb with latest
2021-08-06 00:34:31 -07:00
Kurt
0f3e5095c5 Replace more linq usage 2021-08-05 22:39:38 -07:00
Kurt
5c472a400d Expand shorthand parameters
int i => int index, or whatever the value is representing.
2021-08-05 20:33:25 -07:00
Kurt
9f910120f9 Use filtered sources if available 2021-08-05 19:12:47 -07:00
Kurt
6fe918c7e2 Use filtered sources 2021-08-05 18:59:21 -07:00
Kurt
c2f6b08418 Use explicit generation for sprite fetches 2021-08-05 18:55:05 -07:00
Kurt
8d7f56a7db Remove box bar, inline sprite height calc
Skip empty slots since the input data no longer guarantees no empty slots
2021-08-05 18:54:47 -07:00
Kurt
1ea4683fbe Resize gen6 HoF editor sprite preview to large size 2021-08-05 18:23:39 -07:00
Kurt
d946ea4d88 Remove gen6/7 full dex language flag quirk
Was for cyber gadget save editor, restoring a segment that was all FF's causing it to corrupt.
Pretty sure they fixed the underlying error since it was originally found in 2014, but Cyber Gadget ceased operation of their save editor services back over a year ago, so this is no longer needed.

14/08/31 - New Update: (3900)
 - Added: Cyber screwup notification upon saving.
 - - If a 0x200 byte chunk is all 0xFF, your save will be corrupt when you write it back (not PKHeX's fault).
2021-08-05 18:20:50 -07:00
Kurt
59d480c834 Minor tweaks
Discard empty pkm files (species 0) when loading boxes or templates
Add more xmldoc
Simplify some method parameter names for readability
2021-08-05 17:05:39 -07:00
Kurt
ebb47867dd Use FileUtil tryget for pkm from path
GetPKMFormatFromExtension is now only used once internally.
2021-08-05 16:29:32 -07:00
Kurt
cc0397f087 Misc tweaks
Improved readability
2021-08-05 15:18:43 -07:00
Kurt
bd826eef5c Show trainer sprites gen6 2021-08-05 13:11:50 -07:00
Kurt
2dd3ec3e91 Update SAV_Database.Designer.cs 2021-08-05 12:27:26 -07:00
Kurt
a293f1b0b4 Handle slot delete correctly 2021-08-05 12:15:55 -07:00
Kurt
c784a0d992 Fix value -> gui
previous commits changed interface to byte; combo binding uses ints for value
2021-08-02 20:43:32 -07:00
Kurt
c1e6693b9c Change GeoTrack props to byte too
if u say so, archit
2021-08-02 20:03:11 -07:00
Kurt
1efebe51d3 Simplify Country/Region/ConsoleRegion to byte from int
Only exists in gen6/7 games.
2021-08-02 19:43:57 -07:00
Kurt
4ec60916c1 Minor refactoring for pkmeditor GUI
Cleans up some interactions to be a little more obvious
2021-07-30 18:05:17 -07:00
Kurt
a07880d1ba Localize super training flag names 2021-07-26 23:56:42 -07:00
Kurt
4ed0e30ace Minor tweaks
Muh infinitesimally small perf gainz found while waiting for next dota match
2021-07-26 23:33:56 -07:00
Kurt
c9640f8561 Comments: forme->form 2021-07-26 14:14:39 -07:00
Kurt
9c8bee19ca Gen5: Add give all musical props, b/w entree level changing
Abstract some things into their parent save block structure.
2021-07-25 23:44:03 -07:00
Kurt
9215cc129b Allow readonly slots to be dragged out from
Show hand symbol on all draggable slots
Still disallow swap operation for readonly slots.
2021-07-24 00:16:51 -07:00
Kurt
b265c349ca Remove unnecessary null check
No paths into the method are null parameters
2021-07-21 00:58:30 -07:00
Kurt
4ee72b0020 Extract pass power enum from gui logic 2021-07-21 00:58:09 -07:00
Kurt
5615d24c9c Fix conditional PID->EC copy on UpdateShiny
Should check 3-5, not 1-5, as VC transfers have separate ECs.
Replace the .Visible check; if the control isn't on the current tab page, it might report itself as invisible, and not update the text.
2021-07-16 08:40:53 -07:00
Kurt
6bed33f7f1 Minor tweaks 2021-07-15 20:40:00 -07:00
Kurt
8e5e4487ba Change interface for method call to less restricted
Don't need "Name" or "LongName" for these methods.
2021-07-13 18:22:04 -07:00
Kurt
46f50a3a56 Use named consts for magic gender values
More personal magic value comparisons
2021-07-13 18:22:04 -07:00
Kurt
3fa311f6ed Misc tweaks
more annotations - all bool->out ? are annotated now
fix gender symbol inversion (forgot to set text)
extract some methods to reduce nesting
2021-07-06 08:42:15 -07:00
Kurt
de8e855116 Replace MC->MemoryCard
Simplify some interactions to be more clear
2021-07-05 14:32:09 -07:00
Kurt
5a769312fd Finish renaming EncounterType->GroundTile
Update the localization for GroundTile for english (and Italian, which is untranslated)
2021-07-03 23:25:09 -07:00
Kurt
4452c10beb Close popups when opening saves
Works around loading saves with different import/view permissions (Gen8 content not in Gen7, etc).
2021-07-03 12:46:52 -07:00
Kurt
16c8a18928 Show box/slot offset by 1 when loading as SlotCache
Closes #3229
also revises parsing to not ToString(), and doesn't add a skip if the slot is empty
2021-07-03 09:28:35 -07:00
Kurt
103aa9aa4b
Revise EncounterArea and EncounterType for clarity (#3228)
EncounterArea now stores a more specific type'd array for encounter slots. Better iteration and less casting, as the nonspecific `Slots` fetch is rarely referenced.

EncounterType renamed to GroundTile to reflect how it actually works in Gen4. Was previously an ambiguous field that was clarified a little; we can describe it a little better now. Keep the GUI the same to not scare the end users.

Change Trash Byte properties to get/set a Span. Trash Byte legality checking easier on the garbage collector?
2021-06-29 20:58:06 -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
285876dcf7 Update SAV_Encounters.cs 2021-06-23 09:35:29 -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
BlackShark
350383cf51
Updated German translation (#3223)
* updated german language files

* added german readme
2021-06-22 20:12:15 -07:00
Kurt
1bd1c287fa Centralize gender label text/color update calls 2021-06-22 20:06:05 -07:00
Kurt
8bac5c259a Trycatch sound stop, only stop if a sound has been played
Closes #3224

mono's impl of soundplayer is different, hence the need to be a little safer here.
bdd772531d/mcs/class/System/System.Media/SoundPlayer.cs (L255)
https://referencesource.microsoft.com/#System/sys/system/Media/SoundPlayer.cs,455
2021-06-22 17:06:30 -07:00
Exorcism
3fecea9e29
Update some file for the FR language (#3220)
* Update some file for the FR language

* Update README.md

* Update MessageStrings_fr.txt

* Add files via upload

* Add files via upload

* Create text_ItemsG3Colosseum_fr.txt

* Update lang_fr.txt

* Create text_ItemsG1_ko.txt

* Create text_ItemsG1_it.txt
2021-06-18 22:10:39 -07:00
Kurt
412bd18139 Decouple incompatible conversion routes from HaX, make setting 2021-06-17 22:48:31 -07:00
Kurt
9e427ad9a0 Update translatables with latest 2021-06-15 20:01:01 -07:00
Kurt
394c5c2c95 Minor clean
Shed some unused code
2021-06-15 20:00:51 -07:00
Kurt
a6ae8845c9 Reset gender if mismatch chain 2021-06-14 22:20:17 -07:00
Kurt
9c9f0f8a94 Get criteria from set details
pretty much futureproof I guess
2021-06-14 21:11:46 -07:00
Kurt
a1ddbc7930 Add settings to use pkm tabs as criteria for Enc->PKM
Some encounters might not use the criteria completely, so it might not listen 100% of the time.
2021-06-14 20:26:12 -07:00
Kurt
e56281aff6 Update GUI translatable list
Farewell secret base descriptions. Not like the localized names would be too useful, but git history can keep em around if we ever need to reference them again (pls no)
2021-06-13 00:45:36 -07:00
Kurt
0686922d5c Rewrite gen6ao secret base handling, i/o, GUI
Closes #3177

Format sizes are now accurate to game structure sizes. Added a few more editable fields, rid of label/textbox/etc for general base editing -- use a PropertyGrid instead.

Feels nice having a bank of saves to reference + idb to discover the struct layout.
2021-06-13 00:38:47 -07:00
Kurt
665880e081 Include form in GetEncounters, iterate all forms for savefile 2021-06-11 10:58:38 -07:00
Kurt
24d6c0d713 Change "Some" EV train rating from [0,127] to (0,127] 2021-06-10 19:18:58 -07:00
Kurt
2abf95cdf8 Minor clean
expand some expressions, extract some methods, add comments
2021-06-08 20:14:55 -07:00
Kurt
71fd8b36e9 Enable batch filters for encounter database 2021-06-08 20:14:27 -07:00
Kurt
910fce9812 Change namespace to usual PKHeX.WinForms.Controls
no more oddball namespaces
2021-06-07 20:04:01 -07:00
Kurt
035584dc7c Extract templating from EditPKMUtil, rename methods 2021-06-07 20:02:57 -07:00
Kurt
e32daee3f3 Add setting to disable loading plugins 2021-06-04 14:19:22 -07:00
Kurt
3764e60b37 Show extra details for exported legality results (debug only)
same as encdb showing full encounter details, spit them out here too.
2021-06-03 17:59:53 -07:00
Kurt
5636e1ef4a Add setting to hide unavailable species.
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-06-03 17:48:32 -07:00
Kurt
34ec5416e5 Add setting to disable return-none if empty criteria
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-06-03 17:36:16 -07:00
Kurt
9ba683688e Clear tooltips when changing results
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-06-03 17:32:13 -07:00
Kurt
066aedfc21 Separate scblock ctor's
No longer need to set byte[] twice
Add value-setter checks for bad mutations (size change, bool1<->bool2 only)
2021-06-03 12:35:39 -07:00
Kurt
8c970ec991 Minor tweaks
no functional change, readability++
add more xmldoc
2021-06-03 12:04:19 -07:00
Kurt
7e32ff9b03 Add settings to toggle loading of saves for pkmdb
https://projectpokemon.org/home/forums/topic/58942-question-about-custom-backup-path-pkm-database-path-avoid-to-scan-sub-folders/
2021-06-02 10:52:20 -07:00
Kurt
138501da2f Minor clean
Condense some expressions
Use less linq
Rename some fields
2021-05-29 15:31:47 -07:00
Kurt
7a8d75aec4 Show gender in encounter browser
Extract methods, add some comments, simplify array fetch.
2021-05-27 10:27:50 -07:00
Kurt
386d9cc94f Repoint hall data fetches outside blocks
Reverts prior commit repointing which was incorrect; these are outside the sav general/storage blocks.

871f9b0627 (diff-3560dca7e50959e98ae8fa32d9403f8846b9243815d653c78a07f2a3455a1874L481)

Keep the first as General as it's some value index within the General block used to index which extrablock matches it, or something

Closes #3211
2021-05-25 22:16:04 -07:00
Exorcism
02605b402d
Update French Translation (#3209)
* Update language French (Français)

* Update French Translation

* Update MessageStrings_fr.txt

* Update text_EncounterType_fr.txt

* Update text_Ribbons_fr.txt

* Update text_Ribbons_fr.txt

* Update lang_fr.txt
2021-05-24 09:16:07 -07:00
Kurt
8cc2967395 Update MemoryAmie.cs 2021-05-23 12:51:25 -07:00
Kurt
c9499f95be Add sociability to Memory editor, add legality checks 2021-05-23 11:22:09 -07:00
Kurt
15afd6f3bc Move mail get to sav obj 2021-05-22 09:28:04 -07:00
Easy World
6b693b9b7e
Update Chinese translation (#3208) 2021-05-20 22:04:32 -07:00
Kurt
207680b2f1 Update translatable lists 2021-05-20 15:05:40 -07:00
Kurt
aa55346bde Add setting to not show changelog on update 2021-05-20 15:03:15 -07:00
Alberto Tudela
7d27136bdc
Update spanish translations (#3207)
* Update spanish translations

* MInor Folder list fixes

* Update spanish translation
2021-05-20 13:21:21 -07:00
Kurt
4b3a3a4afe Update 21.05.21 2021-05-20 09:37:15 -07:00
Kurt
f462017670 Fix padding mask
Closes #3205 -- padding char
Closes #3206 -- sav3rs doesn't use SecurityKey, it's always 0

Co-Authored-By: Michi97 <24464847+Michi97@users.noreply.github.com>
2021-05-20 08:27:08 -07:00
Kurt
2658c8b89a Update 21.05.19 2021-05-18 17:49:54 -07:00
Kurt
1d71d151e8 Add gen8 to generation dropdown 2021-05-18 16:59:19 -07:00
Kurt
5355d251a6 Align shiny checkbox same as pkmdb 2021-05-18 16:59:01 -07:00
Kurt
53e9d31545 Allow searching encounter db for shiny state
random shinies behave like not-shinies
so it only really filters for "always shiny" or "can be nonshiny".
2021-05-18 16:17:57 -07:00
Kurt
74e0cba3b0 Minor tweaks
use assert instead of manual exceptions
span
remove some dead logic
2021-05-18 16:16:48 -07:00
Kurt
2c820bfbe9 Minor tweaks 2021-05-18 13:29:55 -07:00
Kurt
565f161226 Show shiny state of encounter in db
Force shiny state for GO encounters

For encounters, this interface property is mainly just for exposing metadata for sprites.
2021-05-18 10:36:45 -07:00
Kurt
acdbda4e12 Split DateUtil from Util class 2021-05-14 16:46:48 -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
871f9b0627 Convert checksum operations to span-based
Fix SAV.Data references in SAV_Misc4 to use the General block instead
2021-05-14 12:30:40 -07:00
Kurt
d21c1fb135 Set editing mode when loading data to form
Prevents wiping of Multiplayer sprite assignment
2021-05-12 15:44:28 -07:00
Kurt
d340642b09 Minor perf improvements 2021-05-10 01:01:45 -07:00
Kurt
43af6322e8 Clean up csproj's
no functional change
yay wildcards
2021-05-09 12:57:26 -07:00
Kurt
cea2edb3e9 Add controls in one action
reduces the amount of control redraws
2021-05-09 12:10:32 -07:00
Kurt
9826067a18 Handle latest custom folder path buttons correctly
no longer tab separated paths; just show the parent folder name.
2021-05-03 16:58:23 -07:00
Kurt
f063014879 Improve clarity of plugin load failures 2021-05-02 18:27:04 -07:00
Kurt
b049c82284 Update SAV_MysteryGiftDB.cs 2021-04-21 19:36:10 -07:00
Kurt
8e1be1f911 Pre-filter gifts that aren't available for current save 2021-04-21 19:28:01 -07:00
Kurt
5607d833be Remove affixed on none-ribbon
don't care about remove all legal retaining if not removed
2021-04-21 19:19:58 -07:00
Kurt
802275ced0 Fix recently loaded tracking
Not present would return instantly; just chain it with the remove tail
2021-04-21 19:02:30 -07:00
Kurt
778aacb9cf Show larger sprite box 2021-04-19 23:30:46 -07:00
Kurt
4bb5433489 Change default setting so that "Legal!" pops up unless opted out 2021-04-14 14:09:54 -07:00
Kurt
7bc733c900 Update SK2 language coercion
Closes #3194
Exports are fine, imports with an ambiguous language (can be either JPN or INT) while illegal don't result in the above branches passing it.

Inputs with <=6 chars for OT&Nick will be ambiguous; PKM editor.
2021-04-11 20:50:34 -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
4dea69e068 Fix met location list misbehavior
PKM Editor is so spaghetti anyway
2021-04-10 10:30:10 -07:00
Kurt
329a2cbd44 Remove indirect data fetching 2021-04-09 19:44:14 -07:00
Kurt
0576b9dfba 68x56 2021-04-09 17:23:09 -07:00
Kurt
bfd581e89d Rearrange daycare for 68x56 layout 2021-04-09 17:20:42 -07:00
Kurt
9bc07b6e01 Remove unused setting 2021-04-09 17:20:30 -07:00
Kurt
5ed73e0bff Revise Party tab labels 2021-04-09 17:20:00 -07:00
Kurt
d73baebad2 Use wider sprite boxes for Mystery Gift album display 2021-04-09 16:37:32 -07:00
Kurt
b3b60894b6 Remove 40x30 sprite assets
Farewell; let's assume things are 68x56 from now on.
2021-04-09 16:24:19 -07:00
Kurt
c7b997865c Minor clean 2021-04-09 14:52:49 -07:00
Kurt
f8a2bb3229 Add missing research tab flag set
Closes #3187
2021-04-07 22:46:28 -07:00
Kurt
b0700ba281 Extract Gen7 HoF class, extend event flag count
4k flags exactly, and probably 4950 for USUM (alignment +1 byte for an even 4960)

The old flag + count (4 bytes total) are just +32 event flags.
2021-04-07 00:20:02 -07:00
Kurt
2f4b754505 Fix incorrect event flag reference
Thanks SneakyPeekyFox!

Also fix crash if pressing escape on the save differentiation popup.
2021-04-06 17:26:13 -07:00
Kurt
c05fc854b1 Update 21.04.06
Mostly because of Gen3 save editing bugfixes, forcing a new version.

Last version added the PID checks for Gen8; this one adds move ordering checks for eggs. More fun :)
2021-04-05 22:57:05 -07:00
Kurt
673c0d93a6 Extract event flag/work editing from GUI
now <200 lines for editing (ignoring the diff functions), yay
Opening the editor allocates less (no copying save file)
2021-04-05 20:52:49 -07:00
Kurt
ecf1f361fe Show encounter's full details on hover (mgdb/encdb)
Won't work neatly for Mystery Gift types since those aren't record types.
2021-04-04 12:05:00 -07:00
Kurt
790da981f0 Fix gen3 trainer card team list
don't bother casting
2021-04-01 14:16:33 -07:00
Kurt
4700fdd1e3 Set updated version when resetting personal
Closes #3180

Improves handling for corrupt gen3 saves (pokedex cheaters)
2021-04-01 13:37:39 -07:00
Kurt
4cf926f703 Update 21.04.01
Latest cumulative update release with mgdb/pget binaries updated.

There aren't any April Fools jokes in this release.
2021-03-31 21:52:15 -07:00
Kurt
645f2b4db5 Revert implicit casting
Looks like netstandard2.0 wasn't meant to receive that new c#9 goodie
2021-03-29 00:14:44 -07:00
Kurt
3822981590
Rework EncounterCriteria to be ability indexed rather than direct ability (#3179)
* Exploration: rework ability criteria to ability numbers desired

* Sync remaining changes

* Update EncounterCriteria.cs

* Add xmldoc

* Improve speed of IsDualGender check

* More xmldoc updates

Should be doing this on main but meh, this branch is gonna get merged later

* Fix typo

* Update WC7.cs

* Update PersonalInfo.cs
2021-03-23 17:05:15 -07:00
Kurt
d6dc8a0410 fix signed g7id display
>2^31 would show a negative G7SID, no more!
2021-03-20 19:38:01 -07:00
Kurt
e547a9cf63 Extract report generation from LegalityAnalysis object functions
Can replace the default functionality with your own formatter, I guess.
2021-03-20 13:21:04 -07:00
Kurt
8d3f990667 Make some properties into consts 2021-03-20 12:47:21 -07:00
Kurt
33e2c64721 Split SAV3 into version classes
Begone are the version-switch cases for value fetching.
2021-03-15 23:51:58 -07:00
Kurt
6bce4eea14 Minor clean
Annotations (nullable), some switch cases for readability
2021-03-14 16:16:55 -07:00
Kurt
4f6258e492 Add direct object editing for accessor type saves 2021-03-14 16:14:15 -07:00
Kurt
154d95982a Error message on trying to interact with deleted/removed files 2021-03-08 11:37:46 -08:00
Kurt
49541e6073 Rework mainline sav3 to not operate off chunks
Previous style was to resize the sav buffer and concat all the storage chunks at the end. Allocated a double save file.

Now, just allocate 3 buffers.
2021-03-07 23:22:07 -08:00
Kurt
9e4f1d11cc Show misc encounter details on hover 2021-03-07 12:35:26 -08:00
Kurt
8145456ca8 Add u32 hex key -> enter to jump to key (ignoring named blocks) 2021-02-27 22:34:05 -08:00
Egzon
815da3ff0c
Update spanish translation (#3160)
* Update LegalityCheckStrings_es.txt

* Update lang_es.txt
2021-02-23 06:27:27 -08:00
Easy World
595223e1af
Update lang_zh.txt (#3157) 2021-02-21 19:29:25 -08:00
Kurt
32eff161cc Repopulate translations with latest additions/removals 2021-02-21 15:22:28 -08:00
Kurt
41096fb56e Minor xmldoc / usage updates 2021-02-21 15:01:28 -08:00
Kurt
c11cf3d6d4 Extract gen4 pokedex logic 2021-02-21 09:59:10 -08:00
Kurt
a7a7be7c44 Allow loading of savpaths, load misc & party slots 2021-02-13 13:04:43 -08:00
Kurt
d5e9775081 Update RibbonEditor.Designer.cs
https://github.com/kwsch/PKHeX/issues/3146#issuecomment-777060691
2021-02-10 14:12:14 -08:00
Kurt
d4be8aa7be Update PKMEditor.cs 2021-02-10 14:02:25 -08:00
Kurt
4cabbc49a2 Add affixed ribbon drop-down
Closes #3146
2021-02-10 13:34:49 -08:00
Kurt
b0fac2dd34 Update PKMEditor.cs 2021-02-09 08:46:03 -08:00
Kurt
666a1805ba Relocate formargument logic 2021-02-08 20:42:19 -08:00
Kurt
ff7817a749 Create FormArgument extension logic 2021-02-08 20:39:46 -08:00
Kurt
37cb15749e Update FormArgument handling for gen6/7
Disassociate pk4/pk6 backing byte[] when converting to pk5|pk7, as we no longer make a copy of the byte[] in the pkm's constructor.

Change UpdatePKM to include isParty, as we want it optional to update FormArgument too.

Change FormArgument saving to be handled by FormConverter; kinda not really good to have it there, but nothing else is handling FormArgument values.

Expand IFormArgument to have all FormArgument values exposed. "Maximum" is furfrou only.
PK6: Max is in the "FormArgument" u32, and the remain/elapsed is in party stats (hence the reverting when boxed)
PK7: u8 remain, u8 elapsed, u8 max, u8 unused.
PK8: assumedly the same as PK7, given the disassembly hints that it's the same as past games (even though Furfrou and Hoopa are not in SWSH).
2021-02-08 20:26:53 -08:00
Kurt
a0351efc81 Show preview tooltip in mgdb view
Show card header to differentiate gifts
2021-02-07 08:32:01 -08:00
Kurt
a2d5d7d769 Show preview for encounter database slots on hover 2021-02-06 22:33:13 -08:00
Kurt
a7f65554ad Update formarg handling 2021-02-05 16:52:46 -08:00
Kurt
a7cc51f633 Show alolan height/weight records 2021-02-05 07:46:06 -08:00
Kurt
726f100496 Update SAV_Encounters.cs 2021-02-03 11:48:23 -08:00
Kurt
8db21c2bd0 Update 21.01.30
Latest cumulative update release with mgdb/pget binaries updated.
2021-01-30 10:46:05 -08:00
Kurt
1e86fdcea8
Fracture the encounter matching checks to allow progressive validation (#3137)
## Issue

We want to discard-but-remember any slots that aren't a perfect fit, on the off chance that a better one exists later in the search space. If there's no better match, then we gotta go with what we got.

## Example:
Wurmple exists in area `X`, and also has a more rare slot for Silcoon, with the same level for both slots. 
* We have a Silcoon that we've leveled up a few times.

Was our Silcoon originally a Wurmple, or was it caught as a Silcoon? 
* To be sure, we have to check the EC/PID if the Wurmple wouldn't evolve into Cascoon instead.
* We don't want to wholly reject that Wurmple slot, as maybe the Met Level isn't within Silcoon's slot range.

---

Existing implementation would store "deferred" matches in a list; we only need to keep 1 of these matches around (less allocation!). We also want to differentiate between a "good" deferral and a "bad" deferral; I don't think this is necessary but it's currently used by Mystery Gift matching (implemented for the Eeveelution mystery gifts which matter for evolution moves).

The existing logic didn't use inheritance, and instead had static methods being reused across generations. Quite kludgy. Also, the existing logic was a pain to modify the master encounter yield methods, as one generation's quirks had to not impact all other generations that used the method.

---

The new implementation splits out the encounter yielding methods to be separate for each generation / subset. Now, things don't have to check `WasLink` for Gen7 origin, because Pokémon Link wasn't a thing in Gen7.

---

## Future
Maybe refactoring yielders into "GameCores" that expose yielding behaviors / properties, rather than the static logic. As more generations and side-gamegroups get added (thanks LGPE/GO/GameCube), all this switch stuff gets annoying to maintain instead of just overriding/inheritance.

## Conclusion

This shouldn't impact any legality results negatively; if you notice any regressions, report them! This should reduce false flags where we didn't defer-discard an encounter when we should have (wild area mons being confused with raids).
2021-01-29 17:55:27 -08:00
Kurt
ceb14c8468 Add consistent ctrl/alt modifiers for IV/EV/AV
Closes #3132
2021-01-20 22:09:25 -08:00
Kurt
803b8675fe Rework batrev current slot handling
Show all slots even if they're uninitialized. Empty first slots but present second slots caused errors on init.
2021-01-20 20:29:26 -08:00
Kurt
4c49d489a8 Update SAV_Inventory.cs 2021-01-20 20:01:59 -08:00
Kurt
46b988b6fa Remove unused checkbox 2021-01-20 17:06:37 -08:00
Kurt
d805167e7c Save battle version value on value change 2021-01-18 18:18:42 -08:00
Kurt
680e8b711d Add some code analysis for try-return with nullable out 2021-01-17 00:05:07 -08:00
Kurt
c31285fd6d Dump csv async
Skip Sprite column completely
2021-01-16 17:25:55 -08:00
Kurt
3c42978afa Use IndexOf instead of FindIndex when possible 2021-01-16 12:47:02 -08:00
Kurt
613e6db744 Use StringConverter api consistently; use stringbuilder when possible
Retain a stringbuilder to mutate the string rather than finalizing temporary strings

yields some speed improvements (less gen0 string objects allocated)
2021-01-14 22:50:13 -08:00
Kurt
6566b0ed1f Add Pokedex flag properties
Closes #2954 ; can set directly from propertygrid already, but might as well clean things up a little bit to match the disassembly logic.

Open the simple editor center parent rather than next-form-position
2021-01-09 23:27:22 -08:00
Kurt
3e0b52195a Minor clean 2021-01-08 13:17:59 -08:00
Kurt
f615814548 Add xmldoc, increase swish util flexibility 2021-01-07 15:34:26 -08:00
Kurt
6e741a0cf0 Minor tweaks
Add xmldoc
Remove linq from memecrypto code (speed lmao)
Hide some methods that shouldn't be called directly
Name variables better for accessor const's
2021-01-06 23:30:30 -08:00
Kurt
cc43550357 Simplify more expressions 2021-01-04 17:31:43 -08:00
Kurt
cdcbc3750b Update PKMEditor.cs 2021-01-02 12:46:46 -08:00
Kurt
d02dd29e83 More version-location shenanigans
Should be behaving correctly for gen!2=>gen2 now
2021-01-02 10:35:48 -08:00
Kurt
09089da14e Use more expression return style
Reduces indentation & bracketing, a bit more concise
2021-01-01 17:08:49 -08:00
Kurt
813180453e Delete duplicate HT bit fetch method
Make expression methods
2021-01-01 16:39:33 -08:00
Kurt
7523e0e200 Make ContestStat fields byte (from int) 2021-01-01 13:39:08 -08:00
Kurt
d66486ac29 More pkm.form visibility/initialize tweaks
Gen7 started up showing a form=-1 marshadow, initialize the combobox with an empty string since we no longer set formlist if it has none
label/combobox visibility should be managed by gen2 flowlayout case below
2021-01-01 11:29:20 -08:00
Kurt
fb008be6a6 Condense some more expressions 2020-12-31 23:13:27 -08:00
Kurt
989c4314ae Hide formarg control when not present for format
Set initial visibility state to false for startup anyways; parent usercontrol should get set invisible by PKMEditor during its setup-format logic.
2020-12-31 15:15:22 -08:00
Kurt
d0d7895fa5 Only refresh localized data sources if needed (generation)
Faster same-type savefile loading
2020-12-31 15:10:37 -08:00
Kurt
f4bf9dd208 Minor clean
add download count to changelog
move 2019 changelog to uncompiled resource (for record)
2020-12-31 10:36:09 -08:00
Kurt
99292c75f9 Update 20.12.30 2020-12-30 21:16:38 -08:00
Kurt
ec4358372a Finish implementing form-argument control behavior 2020-12-30 00:32:17 -08:00
Kurt
2af9e800fb Add RotomAffection and rotoloto1/2 flag editing to GUI 2020-12-29 11:39:19 -08:00
Kurt
d9a4eacaf4 Allow deactivating all raids 2020-12-29 10:53:47 -08:00
Kurt
de840f40d4 Invert some "!is" to "is not" 2020-12-29 00:58:08 -08:00
Kurt
e8c23f6644 Simplify some repeated comparisons with expressions
Less prone for bugs since it uses the same value for all comparisons without re-specifying
2020-12-29 00:37:59 -08:00
Kurt
c119f18af3 spec->species 2020-12-28 22:22:52 -08:00
Kurt
6502c9df33 Condense some expressions, extract static class 2020-12-28 21:42:54 -08:00
Kurt
0a46f45b00 Split MetDataSource from GameDataSource 2020-12-28 21:12:46 -08:00
Kurt
74ee22e66e Make ComboItem a record 2020-12-28 11:57:34 -08:00
Kurt
a124168e87 Make FormArg editing a complex control
Shows a dropdown for alcremie only, and a number entry for everything else.

See 771086a222 for initial implementation; I don't want the lag anymore lol
2020-12-28 11:51:25 -08:00
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
4d0108331a Move LegalityAnalysis derived movesets out of class
LegalityAnalysis just does the analysis; no need to do unnecessary suggestion logic inside the object.
2020-12-24 16:36:50 -08:00
Kurt
43dd390f21 Split IContestStats, mark trades as records 2020-12-24 00:06:40 -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
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
63aa8dcd43 Bump langver to 9 for other subprojects 2020-12-21 19:12:24 -08:00
Kurt
6d030831ab Bump PKHeX.Core to C#9 language version
Add FrameworkUtil.cs which is compiled if the build isn't net5+, needed to support init setters & records
2020-12-21 16:52:11 -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
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
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
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
8778d8c6b7 Update 20.11.28 2020-11-27 21:40:36 -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
038903a2f9 Update BoxMenuStrip.cs
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2020-11-19 15:59:33 -08:00
Lusamine
6a91dfbaba
Fix parsing SID error (#3090) 2020-11-19 15:38:56 -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
Kurt
23e765e550 Add opening for rental team dumps
Dunno why anyone would want these, lol
Closes #3074
2020-11-03 20:12:42 -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
b8023605ad Update 20.10.31 2020-10-31 12:01:01 -07:00
Kurt
28767df0fb Split gamesync details to interface 2020-10-31 11:43:57 -07:00
Kurt
4012977c3c Adapt when loading new
See previous commit message
2020-10-31 09:22:13 -07:00
Kurt
c9587c16c7 Adapt dropped/opened PKM to currently loaded savefile
Closes #3067
2020-10-30 22:44:08 -07:00
Kurt
80a5d8e451 Remove layer null check
Move to the place that triggered the null
2020-10-30 19:56:16 -07:00
Kurt
7a24651aef Remove splashscreen from main form init
I want to start abstracting the main GUI to reduce the amount of things the main/pkm/sav editor classes do directly.
2020-10-28 17:27:11 -07:00
ReignOfComputer
3767a61171
Fix Stat Tooltips (#3057)
Was only updating based on Stat Nature?
2020-10-27 09:18:12 -07:00
Easy World
be7b586d7a
Update Chinese translations (#3052)
* Update lang_zh.txt

* Update LegalityCheckStrings_zh.txt
2020-10-26 07:42:00 -07:00
Kurt
9e380fdcde Update sprite on gmax field change 2020-10-25 13:47:42 -07:00
Kurt
9264150b2b Add shiny1 batch editor, add ctrl-shiny (1)
GUI: Ctrl click star to get shiny1, shift click for shiny0, any-click to get random

make Alt click modify the SID instead of PID

add SetShinySID shiny type
2020-10-25 10:42:48 -07:00
Kurt
3e1bc1f59d Show extra slots in the "Other" tab 2020-10-24 14:57:53 -07:00
Kurt
040ebb63f0 Handle more release build warnings 2020-10-24 12:38:14 -07:00
Kurt
bc33c87c6c Add click handler for crown raids
oops
hotfixing exe soon
2020-10-24 12:28:59 -07:00
Kurt
1d596225e5 Update 20.10.24 - Crown Tundra
Update mgdb with latest from the Events Gallery.

Handle nullable warnings for release build.
2020-10-24 11:59:35 -07:00
Kurt
5cdf8db912 Update GUI localization files with latest available strings 2020-10-24 11:42:29 -07:00
Kurt
8a2a25fde1 Update data structures for Crown Tundra
Adds a wild area Raid den detail editor like mainland/armor raids.
2020-10-24 11:09:29 -07:00
Kurt
14a678b57d Revise save detect logic flow
Double-Clicking SAV tab no longer hides any error message; now shows it like the auto-detect would.

Move high-level detection method to Core
2020-10-18 19:49:46 -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
7a01b1249c Minor clean
Handle more messages, add more xmldoc
2020-10-18 09:43:41 -07:00
XxPhoenix1996xX
cb8e2ed3d2
Update lang_es.txt 2020-10-17 08:25:04 -03: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
7bb51f4da2 Update 20.10.10
Update event database with latest from the event gallery repo :)

This is the last release prior to any release for Crown Tundra.
2020-10-10 00:30:21 -07:00