Commit graph

240 commits

Author SHA1 Message Date
Kurt
9ee2b08ce5 Update rare flag logic
Closes #2601

Add ComponentModel attributes for properties, add u64 typeconverter for
propertygrid
2019-12-26 13:39:07 -08:00
Kurt
0a8c791e10 Pad with null terminators rather than 0
Can have a single digit (not forced to 3), so null terminate I assume.
2019-12-25 21:31:49 -08:00
Kurt
97c3c6b610 Add raid/den detail browser
Hold alt when hitting activate all to dump instead
I've seen DenType=5 Event=2 for at least one raid so far... not sure if
the event/rare properties are accurate.
2019-12-23 23:30:21 -08:00
Kurt
ce463d057a Add Pikachu Beach Score editing for YW saves
Closes #2585
2019-12-21 15:17:05 -08:00
Kurt
4bf71de621 Minor clean
automatically update total_watt if insufficient
SAV8 is not SAV8SWSH
#2583
2019-12-12 22:58:18 -08:00
Atzgi
d9c59666e0 Add watt in trainer data editor (#2583) 2019-12-12 16:27:01 -08:00
Kurt
8acb336d51 Use enum for species comparisons
slightly easier to read with named values
2019-12-08 17:39:19 -08:00
Kurt
7b6d2bfa48 Fix trainerID trainer card write 2019-12-06 16:59:54 -08:00
Kurt
f45d730faf Add TrainerID for trainer card
Closes #2556
2019-12-03 19:54:34 -08:00
Kurt
e9b9141eda
Fix property name typo
efec331741 (r36246093)

ty @AnalogMan151
2019-12-03 10:39:57 -08:00
Frank
efec331741 add some customization options in MyStatus8 (#2552) 2019-12-02 13:40:09 -08:00
Kurt
89b4bc81b9 Update raid structure unknowns 2019-11-29 18:48:12 -08:00
Kurt
3c4e668d9a Add alcremie formArg gui
Closes #2538
Standardize nomenclature as FormArgument, add interface for those
exposing the property.
2019-11-29 10:44:52 -08:00
Kurt
48a87397ec Split daycare8 to its own file
Add method to fetch daycare seeds from metadata
2019-11-28 21:13:53 -08:00
Kurt
d3bd37a950 tweak last saved string format
ty @sora10pls for testing
2019-11-26 23:10:28 -08:00
Kurt
bac6032152 Update last saved parsing
year is years-since-1900
month is months-since-jan (jan=0)
2019-11-26 19:15:05 -08:00
Kurt
6627d7e2f4 Minor clean 2019-11-26 10:45:36 -08:00
Kurt
6987edd7a3 Simplify expression
no allocations
2019-11-25 23:34:49 -08:00
Kurt
c0270b18e4 Add trainer card number editing 2019-11-25 23:26:01 -08:00
Kurt
87a498ac05 Add flag api 2019-11-25 22:50:53 -08:00
Kurt
67565aa71d Update structure note comment 2019-11-23 07:12:20 -08:00
Kurt
5a38e118e8 Add raid spawn initial docs
linq dump code I used for ez vis:
var sav = new SAV8SWSH(File.ReadAllBytes(@"D:\Kurt\Downloads\main
(7)"));
var blocks = sav.Blocks;
var raid = blocks.Raid;
raid.GetAllRaids().Dump();
2019-11-21 22:55:21 -08:00
Kurt
1ffee3de02 Add raid/fashion block accessors
set breakpoint at end of ctor... immediate window dump:
System.IO.File.WriteAllBytes(@"E:\raid.bin", Raid.Data);
2019-11-21 22:26:24 -08:00
Kurt
adf33404b3 Add Trainer Card block 2019-11-18 17:57:18 -08:00
Kurt
fac5182d4b Add a ChangeAllCount to current value dropdown 2019-11-18 16:25:27 -08:00
Kurt
5cf58dbb5f Fix dex clearing on setting altform/gender 2019-11-18 16:21:11 -08:00
Ammako
acf5df07be Box Layout fixes (#2449)
* Enforce box name length in Box Layout

* Fix G4 box renaming

* Fix G7 box renaming
2019-11-18 16:01:36 -08:00
Kurt
d077d8549e Add alcremie form display for dex edit
Nothing for the PKM Editor; not sure how I want to handle the reused
FormDuration work value.

For the meantime, just use the Batch Editor for a targeted write.

Closes #2441
2019-11-17 09:34:04 -08:00
Kurt
0716e50fd6 Add Gigantamax owned flag logic
Closes #2430 ty @igniscitrinus !
2019-11-16 13:10:46 -08:00
Kurt
b172008981 Fix Check All behavior
- Gender specific forms now set the correct flags
- Regular click on Check All doesn't set shiny flags
- Shift click on Check All sets shiny flags too.

Closes #2425 thanks @igniscitrinus !
2019-11-16 09:28:32 -08:00
Kurt
cefb56a749 Sword/Shield Update 2019-11-15 17:52:08 -08:00
Kurt
a6b6383538 Handle more messages
un-nest some classes, tooltip/menu disposing
2019-10-27 20:39:15 -07:00
Kurt
9401b7a790 More readonly struct tweaks
help dat compiler
minor clean elsewhere
2019-10-26 23:18:25 -07:00
Kurt
46640d48a3 Misc clean
un-nest classes,
move some logic to core,
update some get-only properties that return arrays to methods
2019-10-26 12:58:55 -07:00
Kurt
e3efa65160 Cleanup
handle messages for dirty cleaning :)
2019-10-26 12:33:58 -07:00
Kurt
64a5c30356 Add 4th uint of fashion data
struct is really 16 bytes, and female uses 8 bits of the final uint
Closes #2407
2019-10-25 19:54:50 -07:00
Kurt
12a8dc66b6 Fix displayed bit set for gen6
Zukan5/6 was pushing 0 for the formBit, which was an incorrect value. I
probably should have abstracted things since gen5/6 don't behave the
same as gen7

rewrite the SetDisplayedFlag for more clarity, and to early-return
without checking displayed state if the flag is being cleared.
2019-10-19 18:24:37 -07:00
Kurt
923b581fed Fix language flag set
looks like it was unfinished
2019-10-19 18:18:44 -07:00
Kurt
d4ce0644c8 Simplify block property names
[...]Block -> [...]  since it's kinda redundant, we already know by its
type.
Rename offset ints that collide
2019-10-18 20:42:03 -07:00
Kurt
abe87eb369 Relocate maison stats to block access 2019-10-18 20:13:21 -07:00
Kurt
e05d75eeb7 More training bags
giff swsh
2019-10-17 23:02:01 -07:00
Kurt
c24851129f Add super training block details & to block access
Use some properties in the super training editor, not gonna rewrite that
even though it really needs it :)
2019-10-17 20:13:17 -07:00
Kurt
cf955e9fc7 Fix sav7 init
guess I never launched this format the entire week
2019-10-16 19:08:13 -07:00
Kurt
2367fbd69a Add docs for super training block 2019-10-16 18:49:01 -07:00
Kurt
02420d3e93
PKHeX.Core Nullable cleanup (#2401)
* Handle some nullable cases

Refactor MysteryGift into a second abstract class (backed by a byte array, or fake data)
Make some classes have explicit constructors instead of { } initialization

* Handle bits more obviously without null

* Make SaveFile.BAK explicitly readonly again

* merge constructor methods to have readonly fields

* Inline some properties

* More nullable handling

* Rearrange box actions

define straightforward classes to not have any null properties

* Make extrabyte reference array immutable

* Move tooltip creation to designer

* Rearrange some logic to reduce nesting

* Cache generated fonts
* Split mystery gift album purpose
* Handle more tooltips
* Disallow null setters
* Don't capture RNG object, only type enum

* Unify learnset objects
Now have readonly properties which are never null
don't new() empty learnsets (>800 Learnset objects no longer created,
total of 2400 objects since we also new() a move & level array)
optimize g1/2 reader for early abort case

* Access rewrite
Initialize blocks in a separate object, and get via that object
removes a couple hundred "might be null" warnings since blocks are now readonly getters
some block references have been relocated, but interfaces should expose all that's needed
put HoF6 controls in a groupbox, and disable

* Readonly personal data
* IVs non nullable for mystery gift
* Explicitly initialize forced encounter moves
* Make shadow objects readonly & non-null
Put murkrow fix in binary data resource, instead of on startup
* Assign dex form fetch on constructor
Fixes legality parsing edge cases
also handle cxd parse for valid; exit before exception is thrown in FrameGenerator

* Remove unnecessary null checks
* Keep empty value until init
SetPouch sets the value to an actual one during load, but whatever

* Readonly team lock data
* Readonly locks
Put locked encounters at bottom (favor unlocked)

* Mail readonly data / offset
Rearrange some call flow and pass defaults
Add fake classes for SaveDataEditor mocking
Always party size, no need to check twice in stat editor
use a fake save file as initial data for savedata editor, and for
gamedata (wow i found a usage)
constrain eventwork editor to struct variable types (uint, int, etc),
thus preventing null assignment errors
2019-10-16 18:47:31 -07:00
Kurt
4baf745af8 Use some c#8 sugar
static local functions
switch expressions
using usings :)

nullable next?
2019-10-07 18:40:09 -07:00
Kurt
40db929166 Re-add resources for inventory editor
Closes #2398
2019-10-04 21:23:54 -07:00
Kurt
87f43a47d8 Bump lang version to 8
some lang upgrades
2019-10-04 20:10:50 -07:00
Kurt
d3b0c392b2 Minor tweaks
no functional change
2019-10-03 22:21:33 -07:00
Kurt
8d8adde2b1 sealed
sealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealed
2019-10-03 19:09:02 -07:00