Commit graph

138 commits

Author SHA1 Message Date
Kurt
17553e6b6a Fix parse exception
deleting tid/sid text -> int.Parse("") fails
2018-06-06 21:51:43 -07:00
Kurt
19e9e4e761 Update form gender update
#1982
2018-06-06 18:59:01 -07:00
Kurt
450d40535d Relocate hypertraining properties to interface
lessen temp array creation, speed++
2018-06-05 21:31:42 -07:00
Kurt
27e917551f Simplify conteststat editor usage
make consistent with interface names
2018-06-02 22:04:32 -07:00
Kurt
ae3b6a7fa1 Simplify IContestStats usage
remove new[] creating for checking if any contest stats exist
(HasContestStats)
2018-06-02 21:19:03 -07:00
Kurt
2061f23e26 Misc simplifications
fixes suggestion requests for invalid gameversion pkms
2018-05-27 17:57:45 -07:00
Kurt
1b8fe201c0 Misc simplifications
Simplify some pkmeditor logic, pull out togglemarking
2018-05-27 10:24:28 -07:00
Kurt
3eecb0cf8f Switch to textchanged
more responsive; checking legality won't update (could always force
validation to all...)
2018-05-25 20:42:56 -07:00
Kurt
bb55532c4a Rework TID/SID loading
Move TID/SID load to after version set (special handling for pk1/pk2
which don't store version, just call manually).
Update TID/SID on every gameversion change anyway
Rename LoadOTID to LoadOT since it does not deal with ID.

Closes #1962
2018-05-24 16:53:54 -07:00
Kurt
c349ab8218 Relocate vc lang detect to pkx
reusable
2018-05-24 16:53:54 -07:00
Kurt
22d5756a19 Show u16/u16 for invalid generation TID/SID format 2018-05-22 18:58:06 -07:00
ReignOfComputer
044ae4e6fe Correct Control Switching for G2->G7 (#1957)
Is there a reason for having GSC newTrack as USUM? This causes `origintrack = newTrack;` not to happen and thus controls don't switch from G2->G7 correctly.
2018-05-21 20:19:00 -07:00
Kurt
199b6f2caf Add move rand for batch editor
Also add Move Rand & Move Reset to box modify contextmenu
2018-05-20 14:29:13 -07:00
Kurt
23083317d7 Refactoring
pull out GameStrings

add debug output for crystal headbutt trees
fix qrpkm item access
2018-05-18 21:35:57 -07:00
Kurt
857919bd28 Add basic plugin sys
reference PKHeX.Core, main window loads assemblies & initializes
providing an ISaveProvider and the menustrip control (to insert controls
into)

pretty rough but should allow for inserting external control buttons &
allowing it to edit the UI a little

example: https://github.com/kwsch/PKHeXPluginExample
feedback is appreciated
2018-05-13 12:49:29 -07:00
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -07:00
Kurt
815705bc5e Fix gender handling
Closes #1933

if not allowed to be genderless, flag as invalid gender
only permit valid genders after genderless is ruled out
(both done by checking the low bit)
2018-05-10 18:53:23 -07:00
Kurt
16ed4353b2 More generator updates
Store 4g giratina held item for enc->pkm legality
revise usages of GetSaneGender
Rearrange some logic
Better handle impossible version encounters (gen4)

gen 1-5 done, stuck on 659 - bunnelby egg...?
2018-05-09 17:50:56 -07:00
Kurt
232427d002 Rework slot interactivity a little
decentralize some logic, individual view providers now provide the
details rather than detecting from a huge array.

#1925
2018-05-05 08:07:22 -07:00
Kurt
02dc49641c Rearrange version changing logic
set the new version, then update the controls
#1923 ; exist logic overrode rby/gsc to gen7 locations, which didn't
trigger the TID view update.
2018-05-04 17:59:04 -07:00
Kurt
676b5905bf Show other TID/SID in hover tooltip 2018-05-03 22:44:39 -07:00
Kurt
d15b0b439c Show SID for vc->7+
#1923
sometimes (hacked data) can have SID values; don't exclusively follow
the GB era TID only rule.
2018-05-02 22:28:41 -07:00
Kurt
8dcee4e0ee Add 3 more advanced sorters
Primary->Secondary typing
Generation->Version
Base Stat Total
2018-04-30 21:20:28 -07:00
Kurt
116f600cb7 Apply default language if none
Closes #1920
2018-04-30 18:48:21 -07:00
Kurt
f060bab844 Use new trainer ID editing control in SAV_Trainer7 2018-04-28 11:52:48 -07:00
Kurt
71faaee31c Refactor savefile tid/sid to int
can now use TrainerID editor control on a savefile... soon?
2018-04-28 11:06:58 -07:00
Kurt
43507a5ae5 Add TrainerID control
Now shows tid7/sid7 when gen7+
2018-04-28 09:34:54 -07:00
Kurt
294a61c4c1 Update pkmeditor GB gui loop behavior
updating HP causes SPD to be updated, which is based on SPA; since SPA
is yet to be updated, we trigger constant updates on an SPA > 15 until
we crash.

just use the SPD IV which is already capped by the pkmdata
(this shouldn't refresh fields anyway when loading... whatever).

Closes #1914
2018-04-25 20:17:58 -07:00
Kurt
3f6b1acc93 Add fixed gender checks for non-GBA/NDS games
Closes #1912 , genderless ~= fixed gender I guess; shouldn't get these
gender-errors unless it's manually tampered data/ShowdownSet

remove unnecessary code in:
* PKMEditor (>=255 is already covered by == 255 and the fact that gt is
always <= 255)
* VerifyGender (3 <= x <= 5) check is already early-returned via
PIDGender check above

Update IsGenderValid knowing that VC mons have a gennumber <= 2
2018-04-23 19:58:29 -07:00
Kurt
f6dda90f52 Add icons
icons are credit to Dave Gandy's Font Awesome pack on flaticon.com
https://www.flaticon.com/packs/font-awesome
2018-04-21 22:31:11 -07:00
Kurt
bb03505144 Better handle g2 unown form changing
Closes #1897
2018-04-16 16:01:30 -07:00
Kurt
508f056d33 Clear move pp on move deletion
closes #1894
2018-04-09 06:10:26 -07:00
Kurt
5e96c6e035 Extract main window strings to translatable class
Similar to LegalityCheckStrings
no resource files yet, will generate those tomorrow(?)

some strings are not translatable (useless gen6 passerby export text),
not really worth
2018-04-05 21:25:18 -07:00
wwwwwwzx
8710c7a517 Translations update (#1887)
* Update Chinese translation file - 2

* Fix up base stats label translations
2018-04-04 22:45:14 -07:00
Kurt
e026a8ab49 Add default trainer info
use in pkmeditor and utilize
2018-03-28 18:52:50 -07:00
Kurt
99a4c55579 Relocate some logic to core
party stats set when setting a slot to a save file
simplify set/delete slotchange duplicate logic
suggest better met locations beyond VC transfers
hatching a gen6 egg applies memories automatically
2018-03-25 19:05:49 -07:00
Kurt
42f5f9b051 Add smart move[] setter
Closes #1871 (smart-move setting is also done by batch editor)
2018-03-20 08:35:41 -07:00
Kurt
e4c2b5d77a Split PPMax & PPCurrent edit methods
As noted in #1866
2018-03-19 16:21:29 -07:00
Kurt
dc0cf34ed5 Inherit sizing mode
as noted:

https://projectpokemon.org/home/forums/topic/44417-messed-stat-screen-in-new-version/
2018-03-19 16:15:46 -07:00
ReignOfComputer
a03a54a331 Fix Suggested Move Set (#1866)
* Use FieldsLoaded to stop updates
2018-03-19 09:03:27 -07:00
ReignOfComputer
d41df2420f Fix HaX Mode (#1869)
- Pass HaX to StatEditor once everything else loads
- Fix Hacked Stats enabled check
2018-03-19 08:10:20 -07:00
Kurt
1aa70a16a4 Reduce bst green scalar
average*2 resulted in a value that was too-green relative to the stats.
use the rescaling from KChart
2018-03-18 11:21:00 -07:00
Kurt
56bd39b336 Add base stat indication (with colors)
Thanks @zaksabeast for feedback in IRC
2018-03-18 10:38:29 -07:00
Kurt
102550174e Simplification
invalid/unknown usages were incorrectly interchangable; dex-sets were
looking at Unknown which was impossible for some cases.

only use GameVersion.Unknown as a temp placeholder for later resolution
by the user.
2018-03-11 18:07:48 -07:00
Kurt
2bd9d99d9e Refactoring
WinForms->Core logic absorbing (CommonEdits)
loading ShowdownSet now applies properties to PKM instead of PKMEditor
Contest/IVs for Static/Trades are no longer set by default (less object
allocations), and are now checked by the encounter generator
2018-03-10 18:03:09 -08:00
Kurt
e4210e2b3e Misc api improvements
extract common nature amp logic
generic ienumerable copyto which now returns count of elements copied
(maybe useful later). prior usages never tried to copy an enumerable
larger than the dest array (now length checked).
2018-02-28 21:50:50 -08:00
ReignOfComputer
faab067f80 Fix Inverted Max PP Shortcut (#1855)
https://github.com/kwsch/PKHeX/issues/1854#issuecomment-369270152
2018-02-28 08:58:04 -08:00
Kurt
9fb7268434 Fix hidden power combobox
closes #1852
2018-02-27 17:48:19 -08:00
Kurt
1411933e27 Relocate pkm stat controls to separate usercontrol
splits the logic up
change hypertrain from ctrl (prevents 30/31 setting) to shift (allows)
2018-02-26 21:22:35 -08:00