Handle all warnings
obviously the usage of null! could potentially be avoided if the object init wasn't such garbage, but here we are with years of old junk and lack of abstraction in the GUI project
Closes#2486
redirect to a common method in the event that setting to the clipboard
fails; the handling is now the same for all usages (trycatched and a
shared error message).
* Handle some nullable cases
Refactor MysteryGift into a second abstract class (backed by a byte array, or fake data)
Make some classes have explicit constructors instead of { } initialization
* Handle bits more obviously without null
* Make SaveFile.BAK explicitly readonly again
* merge constructor methods to have readonly fields
* Inline some properties
* More nullable handling
* Rearrange box actions
define straightforward classes to not have any null properties
* Make extrabyte reference array immutable
* Move tooltip creation to designer
* Rearrange some logic to reduce nesting
* Cache generated fonts
* Split mystery gift album purpose
* Handle more tooltips
* Disallow null setters
* Don't capture RNG object, only type enum
* Unify learnset objects
Now have readonly properties which are never null
don't new() empty learnsets (>800 Learnset objects no longer created,
total of 2400 objects since we also new() a move & level array)
optimize g1/2 reader for early abort case
* Access rewrite
Initialize blocks in a separate object, and get via that object
removes a couple hundred "might be null" warnings since blocks are now readonly getters
some block references have been relocated, but interfaces should expose all that's needed
put HoF6 controls in a groupbox, and disable
* Readonly personal data
* IVs non nullable for mystery gift
* Explicitly initialize forced encounter moves
* Make shadow objects readonly & non-null
Put murkrow fix in binary data resource, instead of on startup
* Assign dex form fetch on constructor
Fixes legality parsing edge cases
also handle cxd parse for valid; exit before exception is thrown in FrameGenerator
* Remove unnecessary null checks
* Keep empty value until init
SetPouch sets the value to an actual one during load, but whatever
* Readonly team lock data
* Readonly locks
Put locked encounters at bottom (favor unlocked)
* Mail readonly data / offset
Rearrange some call flow and pass defaults
Add fake classes for SaveDataEditor mocking
Always party size, no need to check twice in stat editor
use a fake save file as initial data for savedata editor, and for
gamedata (wow i found a usage)
constrain eventwork editor to struct variable types (uint, int, etc),
thus preventing null assignment errors
Gen1/2 INT: 20 slots => 4 wide x 5 high
Gen7lgpe: 25 slots => 5x5
otherwise: 6x5
(maintain 5 rows)
Database(s): 6x11
Could probably wrap the initialization logic (grabbing savefile, etc)
but works for now
This is all in prep for box sprite resizing (56x68 as evident by lgpe
sprites); figured I'd add some display flexibility to handle prior games
with non-30/box layouts.
shave off a couple pixels for popup box view to make the edges of the
box directly at the edge (-2 bot, -1 right side)
Remove some unnecessary properties from SaveFile
Enumerate checksum flag results for GC memcard checking
Remove unnecessary checks on savefile type
Add some documentation
Decapitalize some method parameters
#2305
Catches the following as SaveFiles:
"srm", // RetroArch save files
"fla", // flashcard
"SaveRAM", // BizHawk
and whatever else is added by the init
no functional change, just rewrite some logic for better flow
fix subform popup count restriction (OwnedForms requires forms to be
added/removed manually; it doesn't automatically update)
sanitize box names when dumping boxes with separate folders (and bad box
names)
replace Friendship control click to match shortcut description (used to
do nothing)
Remove some duplicate translation strings
fix gameselect string formatting
apparently systemsounds changed in a recent win10 update, Question is
now silent?? Exclamation is now the same as Asterisk (same as Beep?) Use
hand instead of Exclamation.
only use asterisk for notifications
be explicit that the string is empty rather than possibly missing
disallow encrypted export for BK4 (they're not encrypted), removes type
check
simplify replaceall in showdownset (don't call ReplaceAll 4x, just get
valid chars and rebuild)
simplify get ribbon sprite name (precompute ToLower and appended values
rearrange pkm version groups for clear break between
twins/siblings/family
clear pokelist for sav7b on non-exportable saves (prevents b1s1 from
showing markings)
rename horohoro (pgo) to non romaji lol, hide daycare/party tabs on
nonexportable save
remove some unnecessary operations
rewrite getallcontrolsoftype to remove ToList() and make generic
Closes#2109
Program boots -> load extra locations rather than constantly fetching.
These files won't change location or presence (not an external drive).
just store the locations instead of constantly fetching, we already call
detect once when loading the form anyway.
extract final pkm manipulation logic from pkm editor
add xmldoc to boxmanipulator, add utility class for enum->manip fetching
fix xmldoc referencing removed enum member
relocate boxmanip overview logic to utility class
move SAVPaths file pointer to Main for reuse #2109 , will add to
autodetect in a later commit
open/save dialog with extra extensions: ignore ones already present
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[]
savexts.txt if you wanna update it without recompiling
Keep in mind these are just aliases for raw data. No conversion is done,
it only allows the file to be filtered to.
Closes#1955#1856#1455
all common strings in forms used by multiple generations
would rather rework the individual generation strings to be unnecessary
with better interaction instead (if possible), as translating hundreds
of limited exposure strings is a drag.
instead of:
controls on form->dict of names, look up line to find control
now:
dict of names->look up control to find name
faster overall, simpler, and updates the dictionary with new control
entries. browse thru forms that call translateinterface with one
language (english), then updateall(en) and dump to get the updated
translation files.
#1864
1. faster control retrieval (fetch all once rather than search for each)
1. smaller methods & added comments (ez understanding)
3. easier to dump control list (ez translation file updates, future)
I also added comments where appropriate, because it took far too long to understand what was going on when reviewing the commit that fixed the original bug.