Commit graph

19 commits

Author SHA1 Message Date
Kurt
8a08d32dff Simplify pkm constructors
remove Identifier param. 99% of the time, identifier is not provided,
resulting in a useless call

end result:
provide 'create new' and 'create from' constructors
2019-03-16 18:41:56 -07:00
Kurt
c9e894a46d Misc reductions
hide setters for LegalInfo outside assembly (shouldn't overwrite the
stored values)
update GenNumber to Gen* if appropriate; GenNumber checks for first Gen*
to match, is a little more explicit and quicker than calling twice when
checking a range
2019-02-21 20:41:04 -08:00
Kurt
2d774ac7cc Allow dynamic default savefile type load
Make extrabytes a pkm property (don't mutate array pls)
reconfigure startup loading to only initialize after initial load of sav
& pkm (using blanks if not provided)
2018-12-19 22:10:32 -08:00
Kurt
ba1a7c2bcf Fix broken tests
rework getblank for version specific
2018-11-19 16:14:49 -08:00
Kurt
28fec9882b Add pkm variant for beluga 2018-11-13 19:10:31 -08:00
Kurt
106a02eedd Fix infinite loop pk1/2 -> pk<7 2018-09-01 15:09:04 -07:00
Kurt
4dc04cb4b9 Add pelago status value check + etc
0, [9,19] are set (didn't see 15), but there's also a switch case which
references all values 0-19.

these values are used by a 80 sbyte array (4*20) in the Resort.cro

remove usages of "goto case"
2018-08-27 20:44:26 -07:00
Kurt
f079f62956 Remove fullness/enjoyment check
Although bank 6->7 deletes the values for these fields, Pokémon Refresh
can still reintroduce new values.

Closes #2090 , thanks @Lusamine !
2018-08-14 16:45:51 -07:00
Kurt
fc73eee570 Extract PokemonList* to inherited class
Logic is essentially identical; implement a base class and have the
generation specific structures implment the differences.

Reduce the verbosity a little
2018-08-05 17:28:54 -07:00
Kurt
d916be1020 Style updates 2018-07-29 13:27:48 -07:00
Kurt
64284eafef Add pk1/pk2 direct import checks
dragdrop: check
import files from folder: check
no other paths convert afaik

Closes #2074
2018-07-24 15:49:00 -07:00
Kurt
81355dfaf4 Update translatables for pkm conversion 2018-07-24 15:36:46 -07:00
Kurt
c7175fbdb4 Misc reorg
bye bye SAVUtil and PKMUtil
2018-07-20 21:32:33 -07:00
Kurt
98a1677d14 Fix property reference
oops
2018-07-12 20:36:59 -07:00
Kurt
296d1c20ed Use ITrainerInfo interface for trdata 2018-07-12 18:15:20 -07:00
Kurt
a5af7a443b Revert outer comparison
type check done in loop, whatever comes out of ConvertPKM is either the
desired type or null.
2018-06-04 21:32:15 -07:00
Kurt
59b4b8f755 Simplify pkm conversion
just loop instead of goto, let the jit handle optimization
src looks quite pretty now!
some tradeoffs made but much more maintainable now
2018-06-04 21:28:14 -07:00
Kurt
6cff642ff1 Skip format check on pk* init
also remove ck3/xk3 no-op call (no encryption for those formats, like
bk4).
2018-06-04 20:25:54 -07:00
Kurt
95b4d0820d Minor reorganization
amount of pkm obj classes is pretty high, move the static utility
classes to another folder

breaks usage of pkm.ShowdownText; removes a dependency from PKM.
2018-05-18 19:33:11 -07:00
Renamed from PKHeX.Core/PKM/PKMConverter.cs (Browse further)