Commit graph

7339 commits

Author SHA1 Message Date
Kaphotics
da1f7c7426 Add movepp tables for 3->6
Split from the PKX table (now removed); since PP differs between gens we
have to keep track. Not gonna add a separate binary, just use a
reference table.
2016-07-21 23:49:52 -07:00
Kaphotics
5293c30766 Continue glue removal
PersonalTable.RS exists, no need to have a hard coded ability table.
(re)moved some unnecessary stuff.
2016-07-21 23:20:10 -07:00
Kaphotics
1bceb99306 Fix gen3 ability setting
main form wouldn't set back properly, simplify loading,
fix pk4->pk4
disassociate from PKX.Gen3Abilities (to be deleted now that
PersonalTable.RS exists).
2016-07-21 23:13:58 -07:00
Kaphotics
0362268e41 Unnecessary changes
Simplify usages
2016-07-21 22:45:20 -07:00
Kaphotics
dc11719902 Improve batch editor alerts
Add detection for incomplete commands (instead of throwing and catching
exceptions).
Add 'error' skip tracking, add counter for actual files iterated over
(930 -> actual count of nonempty files for a gen6 save).

Processing folder files now writes back ONLY if the file is modified.
2016-07-20 22:43:26 -07:00
Kaphotics
583859ffd3 Change Property combo to DropDown
Allows the user to type in the property -> SuggestAppend

When the typed text is not within the list of items, the selectedindex
is -1, so abort.
2016-07-20 22:21:09 -07:00
Kaphotics
e0b2f164dc Simple out of bounds checking
PKHeX currently won't supply species > length, but if this code is
reused elsewhere -> default to species 0 like the games.
2016-07-20 20:43:18 -07:00
Kaphotics
6029913b55 Move stat calc to PKM object
ref PersonalInfo entry to calculate from

Fixes species with changed BST between gens.
Worked fine before PKX Personal was split from SAV (to fix box report),
this fixes by requiring the actual personal reference instead of looking
it up.
2016-07-20 20:40:03 -07:00
Kaphotics
45d99406f6 Only list settable & public properties
If there's anything private (like ribbon bytes) don't display em.
2016-07-19 22:26:07 -07:00
Kaphotics
985a3eec23 Update getGenderIsValid
never used, just copy the gen3/4 implementation with the earlier return
2016-07-18 23:31:09 -07:00
Kaphotics
027feebe77 Add gen3 met locations to Report view
Remove unnecessary pkx function
2016-07-18 23:28:36 -07:00
Kaphotics
02a208a74d Break PKX-SAV personaltable relationship
Opening Database and having a species in the results with species#
greater than the current loaded save file's allowed (ie volcanion in db
with loaded emerald) causes Report to throw errors when opened from
Database.
2016-07-18 23:28:10 -07:00
Kaphotics
89ad1cc896 Cast when loading sav6
fb9c18c
2016-07-18 21:39:43 -07:00
Kaphotics
fb9c18c151 Tweak casting
I'm a little too averse for extra lines of code :)

Regarding remaining discussion on #136
Resharper gives suggestion to null check
Path.GetFileNameWithoutExtension and Path.GetExtension, so it won't
hurt. Just because it's set up to work properly now doesn't mean someone
modifying it / operating systems years from now will supply the correct
arguments.
2016-07-18 20:36:52 -07:00
Kaphotics
83c2f02fd1 Merge pull request #136 from Tsunamical/master
Final Set of Code Improvement Patches
2016-07-18 20:27:41 -07:00
Kaphotics
85ffe06807 Fix setIsShiny
Thanks Wanderer1391!

Set value back only if it was the one that updated the value. No need to
prompt update after loading as it refreshes when each field loads.
2016-07-18 20:25:54 -07:00
Tyler Dunn
5c241c859b Use foreach loop in SAV_Inventory.cs
yay language usage opportunities
2016-07-18 14:53:09 -04:00
Tyler Dunn
046c4258b1 Remove initialized value for training bags
Seems we just overwrite it and ignore the initial value, let's not be
redundant.
2016-07-18 14:52:55 -04:00
Tyler Dunn
de8cebf2a4 Use Direct Casts and Conditional Access to Avoid NPEs 2016-07-18 14:51:26 -04:00
Kaphotics
016a0e3aee Reduce reliance on PKX
Certain calculations are best done with direct references.
Indirectly fixed Shiny button bug (8 <= xor < 16) for past gen games.
2016-07-17 23:40:40 -07:00
Kaphotics
f981621452 Simplify ability / entry retrieval 2016-07-17 23:04:39 -07:00
Kaphotics
475d2e877e Merge remote-tracking branch 'origin/master'
# Conflicts:
#	PersonalInfo/PersonalInfo.cs
2016-07-17 22:40:12 -07:00
Kaphotics
f5bacf236c Add&Split out PersonalTable
Will eventually have more complex operations associated with it, as the
PersonalInfo[] could not do that sort of logic.
2016-07-17 22:39:18 -07:00
Kaphotics
6852c6965b Add & Split out PersonalTable
Larger object that will eventually handle more complex logic like
form-stat finding and stat calculations.
2016-07-17 22:36:17 -07:00
Kaphotics
07e4483ef7 Prefix marking property name
Alphabetically sorting properties now has them grouped together (for
batch editor).
2016-07-17 17:07:53 -07:00
Kaphotics
760468fcae Add more user friendly command building
Thanks \ for the suggestion; user has to enter in the value (true/false,
integer).

Provides a list of properties for a pkm file that have setters
(CanWrite).
2016-07-17 17:06:50 -07:00
Kaphotics
d6d2503051 Fix marking setters
Markings[x] didn't prompt the MarkByte to update, just force each bit
manually like ribbons.
2016-07-17 17:05:26 -07:00
Kaphotics
ed7351b117 Remove unused resource references
Old and unpurged.
2016-07-17 17:03:56 -07:00
Kaphotics
28547b00f7 Relocate g6 integrity checks
Move into the object.
2016-07-17 16:01:06 -07:00
Kaphotics
2799cfbe47 Merge pull request #135 from evandixon/master
Made internal PKHeX.Util.getStringList functions public
2016-07-17 15:30:20 -07:00
evandixon
315a079152 Made internal PKHeX.Util.getStringList functions public 2016-07-17 14:54:33 -05:00
Kaphotics
ce3f5f24d8 Add form translation for Ribbons/Medals 2016-07-17 11:38:19 -07:00
Kaphotics
b604b30aa1 Merge pull request #134 from Tsunamical/cs
Additional Code Style Fixes
2016-07-17 10:10:45 -07:00
Tyler Dunn
641f1f61f6 Additional Code Style Fixes 2016-07-17 13:09:01 -04:00
Kaphotics
9e7b56bead Fix super training level4 not being disabled
Thanks @Tsunamical ! Resolves #133
2016-07-17 09:32:34 -07:00
Kaphotics
2c5de67510 Tweak gen3 ribbon editing
Contest Ribbons now have dynamic pictures.
2016-07-16 21:42:03 -07:00
Kaphotics
df51269c7e Add gen3 met locations
English only for now.
2016-07-16 21:31:49 -07:00
Kaphotics
ee4a846aee Delete old ribbon editor
Replaced by simpler forms.
2016-07-16 20:03:33 -07:00
Kaphotics
3fb86f6dc5 Update ribbons
Added all gen3-6 ribbons.

Fixed bugs:
* Increased speed that the subform pops up (yay profiling!) --
TableLayoutPanel would be reconfigured on every row added; adding a lot
of rows constantly reconfigures, so disable the layout updates so that
it only procs at the end.
* Cleaned up display of the ribbons, fixed width (40x40) instead of
autosize. Now display 3 per row.
* Now display the golden "complete" ribbon for g6 memory ribbons.
2016-07-16 19:59:53 -07:00
Kaphotics
ba74b043e2 Fateful Encounter fix
Met location of 0xFF for pkm without an 'obedience' flag.
2016-07-16 17:59:04 -07:00
Kaphotics
deb7502ee5 Distribution checkboxes to correct panel
Also fixed checkbox enable/disable (didn't consider prefix)
2016-07-16 17:52:07 -07:00
Kaphotics
8a0976e6e3 Minor updates
Expose the buttons for medal/ribbon
2016-07-16 17:19:26 -07:00
Kaphotics
34fb98179c Add Ribbon/Super Training editor
Split from the existing form, now can handle multiple generations.
Need to rename / add ribbon images so that they show up in the box. WIP.
2016-07-16 16:13:33 -07:00
Kaphotics
b47b26222f More descriptive pkm properties (ribbon/training)
Adding new update for editors
2016-07-16 15:52:33 -07:00
Kaphotics
7ed0f1adf8 Move property reflection to util 2016-07-16 10:00:50 -07:00
Kaphotics
cb353e0065 Disallow box sorting if no boxes 2016-07-14 20:37:18 -07:00
Kaphotics
a1c0db27c3 Sync current changelog
Decent summary I guess...
2016-07-14 20:37:11 -07:00
Kaphotics
69e7f19101 Add Japanese prompt for <=Gen3 games 2016-07-14 20:22:24 -07:00
Kaphotics
b6e9202158 Allow batch editor without HaX
May be a mistake :)

Tweak ability display to behave properly regarding gen1/2 saves if ever
implemented
2016-07-14 20:15:05 -07:00
Kaphotics
260c80a3d0 Sync
why. does. this. not. commit.
2016-07-12 22:20:18 -07:00