Commit graph

76 commits

Author SHA1 Message Date
Kurt
ae6010f169 Add ranch r(/w?) support
not gonna edit the metadata

properly handle an irregular sized display box
2019-01-14 21:31:53 -08:00
Kurt
ca0e012c5c Add Heal, make status_condition a pkm property
also split out battle box slot offset fetch
if anyone finds where colo&xd store their status bits, lmk 👍
2019-01-11 22:25:48 -08:00
Kurt
bc8b48eb88 Fix sort writeback for locked slots
clear flag, update properties
#2235
2019-01-08 18:31:14 -08:00
Kurt
75202c7a89 Misc updates
reducing allocations, increasing clarity by removing some magic numbers
probably can rewrite some of the evo loading/checking for even less, but
good for now.
2019-01-06 16:22:45 -08:00
Kurt
6f22599baf Prevent slot overwriting on bulk import
https://projectpokemon.org/home/forums/topic/48912-how-to-batch-import-pokemon-boxes-without-erasing-existing-pokemon/
2018-12-28 17:58:13 -08:00
Kurt
d90f099a68 Next unoccupied after starting position 2018-12-27 13:10:55 -08:00
Kurt
f9eb1746ea Add NextOpenBoxSlot fetch for empty slot overwrites
< 0 is storage full
2018-12-27 01:08:42 -08:00
Kurt
d7a501c168 Relocate some logic to interfaces 2018-12-18 17:15:35 -08:00
Kurt
ff649009ca Misc tweaks
misc perf adjustments
add utility for slot locked check (without box argument, absolute slot
index)
localize dragdrop strings
increase dragdrop file delete delay (dropping files into discord waits
until you confirm; 10s gives enough time to hit confirm)
2018-12-17 11:17:19 -08:00
Kurt
efb9b7eba2 Misc cleanup
removes clickonce logic/reference
2018-12-10 20:32:08 -08:00
Kurt
71fab815bf Provide more slot information
remove lockedslots, store & save all teamslots for sav7
differentiate locked slots from overwrite protected slots by emitting an
enum containing info about the slot

locked = can't be replaced, period.
starter/battleteam = can't be pasted over by bulk-pastes

can eventually show more specific sprite layers to denote party
indexes/team#/starter
2018-12-04 22:59:28 -08:00
Kurt
4c1232855f Add getstring method with non-sav data 2018-12-04 22:00:57 -08:00
Kurt
1d27f64235 Allow currentbox to be changed if not overriden
Now allows modifying/deleting 'current' box.
2018-11-22 10:55:20 -08:00
Kurt
bf9344087e Update slot storage compression algo
now iterates for all boxes, and restores to the correct offset at the
end
update direct offset pointers to box specific (so that it can work on
gen3 rsefrlg saves if ever used on them).
2018-11-14 22:33:30 -08:00
Kurt
98ebf4c5cb Add sort pointer repointing
LGPE uses a list of pkm for boxes, and has pointers indicating where
each party member is at
need some logic for handling the sorting. Had suspected this a while
back so this pre-work came in handy (untested tho)

make eventflags offset ptr virtual, I might end up doing things
differently for event flags
2018-11-10 21:04:24 -08:00
Kurt
fe989d48fe Misc prep updates
Update comments / xmldoc
Add a savefile storage compressor (ie array[] with empty interstitials
-> list); return true if the compression moved anything (repopulate
views), and the count of occupied slots in the list.
Add saveblock base class; I haven't really liked how SAV6/7 do all the
logic; I'll still expose properties that will then point to a saveblock.
Cuts down clutter.
Add template Dex manipulator, with gen6/7 implementations
Speculate sequential gp/ge gameversion IDs
2018-11-01 15:38:09 -07:00
Kurt
ca0a533779 Add frlg flag toggles from thread 2018-09-27 20:01:34 -07:00
Kurt
10d73d1bf3 Redirect eventflag r/w for frlg
can't just re-call base.SetEventFlag with an adjusted flag ID since the
exception checks max.
just override the geteventflag method with a silly adjustment -- we
can't be sure if Block2 is immediately after Block2, so just adjust the
flag r/w to a different offset&flag when appropriate.

fixes r/s badgeflag get/set, oops, meant to modify FRLG's value in the
last commit.
2018-09-26 21:05:06 -07:00
Kurt
e0e628844f Update copyto protection
skip over write protected slots (locked/team), may eventually weaken the
GUI to allow modding boxdata with locked slots (which will be skipped).
2018-09-24 19:43:59 -07:00
Kurt
3cd45cf5c4 Continue extracting logic 2018-09-16 12:44:00 -07:00
Kurt
316341e140 Misc updates
Remove unused sav properties
Add translatable strings for autodetect SAV error suggestion

add speculated gg dex formtable
- no eevee forms
- increments 1 for pikachu since it already exists in table
- stops at mewtwo (no other formed-species available)

im currently setting up skeleton stuff for lgpe since we're <70 days
from release; by doing some pre-work like prior games I can get a good
idea of what needs to be adjusted prior to crunchtime!
2018-09-06 20:35:55 -07:00
Kurt
d3ec969187 Style updates
split pcd/pgt
add more xmldoc
2018-08-09 21:53:39 -07:00
Kurt
1486b7f14a Misc style & minor tweaks
Remove move combobox flicker hack (no longer necessary)
Add more Array.Empty usages
cache mysterygift sizes
seal some classes

no functionality changes
2018-08-02 20:11:42 -07:00
Kurt
f4bfdb8311 Remove unnecessary empty array allocations
yay net 4.6
read more: http://justinvp.com/2015/07/20/array-empty/
2018-08-01 18:30:51 -07:00
Kurt
02a6d26e1b Break apart BAKName into smaller components
simplifies definition & makes it easier to update bakname usage later
2018-07-29 21:51:45 -07:00
Kurt
e8644280a1 Update sav4 block detect logic
#2070
desmume inits a savefile to FFFFFF... others instead init to 00's.
check both init states, add IsRangeAll method

5f39118b8a

Thanks @Filo97 !
2018-07-25 16:00:52 -07:00
Kurt
99c790a4b0 Update File name/path/folder fields
original file path is not saved with the two listed properties, add
FileFolder and relcoate existing FilePath functions to that field

move some GetVariantSAV usages to the string method instead of byte[]
2018-07-16 21:00:43 -07:00
Kurt
a81c28f114 Upgrade FolderList to show recent/backups
sortable grid like the ReportGrid for pkm, can open/browse individual
files
2018-07-15 17:48:31 -07:00
Kurt
3a7a257a01 Add export current box to showdown pastes
Rework box fetch in SaveFile to be a little more flexible, can now fetch
a single box

Hold control to... export all boxes :)

I wonder if there's a decorator that showdown skips when importing lines
that can help differentiate the boxes since there's the potential for
hundreds output (ie comments in a showdown set?) doubt it.
2018-06-16 21:56:16 -07:00
Kurt
cb5e1239ae Refactoring
Extract game value limits
Rearrange GameVersion util logic extensions
add better gameversion fetch for generator (equivalent to pkmeditor)
2018-06-15 16:00:28 -07:00
Kurt
400774595e 0 indexed -> 1 indexed
fixes regression from 2 days ago

e216c38151 (diff-37bd5b548e2b340e5c38fd0961a3eb04L165)

Thanks @ReignOfComputer for pointing this out:
https://github.com/kwsch/PKHeX/pull/1956

(also, update GetSprite since slot is 1-30; box is now -1(and below) if
not originating from a box. Now matches the legality check side
2018-05-21 18:28:54 -07:00
Kurt
e216c38151 Misc updates
Add GetShowdownSets text output methods
Add party/box overload methods for easier slot setting api
Protect locked slots when importing BoxData
Misc saveditor simplifications
Add wc3->pk3 test
2018-05-19 20:48:03 -07:00
Kurt
d772a82953 Move batch editor logic to core
previous hurdle a year ago was propertyinfo fetching not looking at the
base class's properties; dig deeper for all properties to mimic existing
code for netframework

end result is batch editing now possible without gui
2018-05-17 22:43:07 -07:00
Kurt
e2f11edc43 Refactoring
discards, Array.Find over FirstOrDefault
2018-05-12 08:41:29 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -07:00
Kurt
4c9177fcb3 Add sort force-reverse
hold control when triggering the sort
sneaky linq to reverse a sort by:
* re-doing the initial sort, then
* reversing the sorted pkm data by using a throwaway increment
* re-doing the final sort
2018-04-30 21:39:12 -07:00
Kurt
57c625d089 Add delete criteria method providing for box clear
Can opt to not delete a slot
2018-04-30 17:29:13 -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
15ce1acfdb update box manipulation
closes #1911 , changes end to be inclusive rather than exclusive. abuse
the optional to let it fill in the end caps.
2018-04-23 19:11:55 -07:00
Kurt
9e874a0784 Add modify handling to 'sorter' dropdown
adds hatch all eggs in box(es, with shift)
2018-04-22 12:43:18 -07:00
Kurt
488b5215a7 add optional sort param 2018-04-21 15:07:58 -07:00
Kurt
f56696bf5c expand sorting capability
can replace the sorting function in SaveFile with any of the other
behaviors (or can just get->sort->set BoxData)
2018-04-04 20:30:49 -07:00
Kurt
a0eb658ef2 Extract minimum trainer information requirements
If one wanted to extend ConvertToPKM to other IEncounterables, this
would be the provided obj containing the receiver's info

allows pkm gen without a savefile, which is nice?
2018-03-28 15:55:19 -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
9bb4120ff9 add faster pkm slot presence check
instead of checking if the array is empty, only check PID and species
2018-03-18 16:22:21 -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
ee1196a57d Set playedtime accurately
closes #1847
override playtimestring if max time... better than nothing
2018-02-21 15:22:43 -08:00
Kurt
f8bf3e400b Misc tweaks
Add bulkstorage SaveFile template
remove unused using
un-virtual box property (don't override behavior)
Split new-USUM island names (unused)
Remove island names from valid egg locations (thanks Davil !)

https://projectpokemon.org/home/forums/topic/43874-bug-met-location/?tab=comments#comment-227684
2018-02-15 17:05:45 -08:00
Kurt
61b65198f2 Allow box name editing on gen2 2017-12-27 15:52:29 -08:00
Kurt
47eee3aa98 Add roto powers as held items
not gonna add sprites because these are useless, anyone can submit via
pr (image might need downscaling to <15x15)
Closes #1703

remove useless null checks (throws the exact same exception it would if
it were not there, except without detail)
2017-12-16 19:52:06 -08:00