Commit graph

64 commits

Author SHA1 Message Date
Kaphotics
73f3fef4ca Add C-Gear skin i/o (WIP)
Currently only works on saves that already have c-gear skin data, more
research to follow at a later date to set the necessary info for
enabling c-gear skins.

Allows for importing images, although a memory spike exists (due to
rotated images not being collected until after import)
2016-08-07 22:46:07 -07:00
Kaphotics
f83cfbaae1 Add mystery gift file drag&drop to slot
pgt was a pkm size, check all sizes
2016-08-06 12:57:53 -07:00
Kaphotics
98e72aefc8 Fix gen3 unknown game data setting
Grab the original data, not the expanded data.
Could always call 'clone' but the data hasn't been modified, so get the
original data.
2016-08-05 21:36:51 -07:00
Kaphotics
fdbeada3b7 Improve dragdrop from box to tabs
Previously only allowed dragging to the Preview box to load to tabs, now
if a box slot is dragged to anywhere in the window it will load.

Unrelated to previous pull request :)
2016-08-05 05:51:55 -07:00
Kaphotics
0c3ca8c749 Merge pull request #164 from Warsen/master
Improved the way drag and drop is initiated
2016-08-05 05:31:01 -07:00
Elias Carrillo
a8d76fa9fb Improved the way drag and drop is initiated.
Temp pkx file is not generated until user left-clicks and moves.
Prevents drag and drop of blank pokemon from slots previously held by dragged pokemon.
Response for left-click actions moved into left-click event.
2016-08-05 04:04:56 -07:00
Kaphotics
2acd1c5d21 Tweak savefile detection
Remove old cybergadget temp folder (interrupt is no longer used, now
using Cache), fix/modify current methods for a more maintainable method.

If GameFreak changes the filename, it'd only have to be changed in one
place.
2016-08-04 20:48:52 -07:00
Kaphotics
3f5d8fad95 Fix pk* save extension detection
A period is before the extension.

Fixes #163, thanks @JHorbach !
2016-08-03 17:48:13 -07:00
Kaphotics
3e7d694128 Fix party disappearing
Thanks ashrobb & MichiS97 !
2016-08-02 23:52:01 -07:00
Kaphotics
1fbb8b4f1a Merge pull request #158 from ajtudela/master
Better translations for spanish language
2016-08-02 18:49:25 -07:00
Kaphotics
a7d1888943 Fix Open/Save filters
Filter for opening allows past gen pkm files to be selected.
Removes old 'pokemon.ekx' injection method which nobody should be using
(use QRs!)
2016-08-02 18:46:41 -07:00
ajtudela
685e2e639a Better translations for spanish language 2016-08-02 16:37:02 +02:00
Kaphotics
43135ae274 Fix empty savedatabackup folder
Expects a 'main' on launch, none found throws an exception before the
form is shown.
2016-08-01 20:38:55 -07:00
Kaphotics
ea83159370 Add drop mysterygift into box slot
Converts to pkm (pgt/pcd -> pk4, etc), then is attempted to convert to
the format of the save file.
2016-07-31 20:31:43 -07:00
Kaphotics
b4a622e784 Minor refactoring
Expression body & ternary for less lines
2016-07-31 18:15:58 -07:00
evandixon
6b23151bb9 Changed default OpenFileDialog path for ClickOnce deployments 2016-07-31 16:43:51 -05:00
evandixon
8c5d734151 Changed resource paths for ClickOnce deployments 2016-07-31 16:40:09 -05:00
Kaphotics
62ff84268b Fix nature modification for gen4
Thanks BeyondTheHorizon!
2016-07-31 09:20:06 -07:00
Kaphotics
ceff3845b7 Add TableLayoutPanel scroll hack
Thanks @poutros !
2016-07-30 20:57:45 -07:00
Kaphotics
497bfb9397 Fix SAV3 dragdrop between slots
Thanks Destinyy!
2016-07-30 20:47:28 -07:00
Kaphotics
e7834416ea Trycatch wrap normalize path
Pretty sure cgse is unsupported on linux anyway, so the URI invalid
exception can be ignored (skipping check).

#151 continues!
2016-07-30 11:25:45 -07:00
Kaphotics
b69096d6f4 Further attempts to fix linux issue
#151

ToList a bunch.
2016-07-30 10:47:28 -07:00
Kaphotics
4a14d663ad Tweak random PID gen on changing fields
Fixes quirky behavior of changing nature/gender on gen3/4 games.
2016-07-29 22:30:06 -07:00
Kaphotics
9f40505f3a More descriptive Gen3 sav prompt
Pops up (E) (RS) (FRLG) instead of "Generation 3"
2016-07-29 21:14:08 -07:00
Kaphotics
0e8b82b5fc Fix EXP dropping to level threshold
Only set back if the fields have been loaded.
2016-07-29 19:38:16 -07:00
Kaphotics
3b6f1e2c58 Attempt at a FlowLayoutPanel scroll hack
Thanks @evandixon for the link to a 'fix', lets see if it works.

#149
2016-07-29 16:00:56 -07:00
Kaphotics
654ff292e6 Add nature/gender recalc PID on <=gen4 2016-07-28 22:54:29 -07:00
Kaphotics
1411749fbd Move shiny PID creation to PKM class 2016-07-28 22:33:16 -07:00
Kaphotics
57899a7da9 Add unknown gen3 game detection
Bad cheats invalidating that Game Code!

Thanks @poutros !

Resolves #146
2016-07-28 22:08:23 -07:00
Kaphotics
67a375ecae Fix SAV4:Gen4 met locations
Do gen4 metloc check after gen3, THEN do gen5.

Thanks @poutros !

Fixes #140
2016-07-28 21:46:30 -07:00
Kaphotics
f63cbb4c26 Tweak move bindingsource iteration
Create datasource before the foreach to avoid multiple .Where(),
possibly fixing #151
2016-07-28 18:36:02 -07:00
Kaphotics
7f2dd7a3a4 Fix form clearing on load
y tho
2016-07-27 19:25:36 -07:00
Kaphotics
2f25fa99d9 Tweak Gen3 Version Detect Inputs
International = Yes
Japanese = No

FR = Yes
LG = No

Reassigns Personal Table for FR/LG so that Deoxys stats are calculated
correctly.
2016-07-27 18:59:10 -07:00
Kaphotics
07f0d688dc Fix gen3 unown form display/edit 2016-07-27 18:20:15 -07:00
Kaphotics
47c6168ac4 Add gen4 formes to personal
Manual tweaks
2016-07-27 18:08:08 -07:00
Kaphotics
282030b1e7 Add Pokémon Link I/O
Thanks @suloku !

Resolves #137

Added recalculation for data's internal checksum.
2016-07-26 20:18:48 -07:00
Kaphotics
f9bd271967 Bug fixes
Box Wallpapers
Stop returning the first box wallpaper regardless of box

EXP:
Changing level/exp wouldn't update stats (EXP needed to be set back to
PKM object)

Drag&Drop:
If the file exists and is locked for editing, the try { } will fail ->
so will delete since the file is locked.
Never seen or heard it happen, but is possible.
2016-07-25 22:40:05 -07:00
Kaphotics
cc1621879e Add gen3-5 box wallpapers
Put the [BoxWallpaper] fetching into a single class.
2016-07-24 21:11:11 -07:00
Kaphotics
945ac79b1f Misc gen3 fixes
Fix boolean get/set, fix met location, add gen3 egg gift location
2016-07-23 14:55:12 -07:00
Kaphotics
2443ace5f8 Fix loading past gen formats
Mainly from database viewer, also skip annoying MessageBox if loaded
from Database.
2016-07-23 14:16:23 -07:00
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
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
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
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
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