Commit graph

71 commits

Author SHA1 Message Date
ReignOfComputer
6c42e3b1bb Enhance Invalid Convert Error (#2305)
Makes it clearer for conversion failure with Pokemon files - prevent confusion with save files.
2019-05-13 15:38:33 -07:00
Kurt
520c9da5c9 Update string loading
Remove usage of linq for sorting, use array.sort for in-place sorting.
Wasteful creating temp sorted buffers then enumerating them to dump into
the list.
2019-04-29 21:55:43 -07:00
Kurt
e1a3c8edb3 Add RTC reset, allows game to define on continue
Closes #2273 , thanks @SatoMew !
2019-03-30 12:34:51 -07:00
Kurt
cce362b98a Relocate FFFF trim (and 0000) to same location 2019-03-20 22:13:09 -07:00
Kurt
fad5e4bdee Expand comboitem loading for simple cases
slightly less gc pressure, precompute capacity
2019-03-18 21:55:33 -07:00
Kurt
82a40cb965 Misc updates
add comboitem list to string[]
add regions list as cached comboitem list
lock resource cache on fetch
extract alola time list generating
2019-03-18 21:34:21 -07:00
Kurt
202f911d45 Tidy up comboitem fetch naming 2019-02-15 11:47:35 -08:00
Kurt
9c521919e5 Reverse array in place 2019-02-15 11:46:02 -08:00
Kurt
e82b4de657 Misc clean
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
2019-02-11 22:39:12 -08:00
Kurt
9715a08342 Fix custom hex parse
hurr dont write your own parsers
Closes #2256
2019-02-10 10:19:05 -08:00
Kurt
cda06bc701 Increase custom parse speed
remove double string replace (now less allocations); only add up values
if they're valid numbers.

builtin int.Parse throws with "1 2", but users can type stupid stuff
like that in the program (so we parse as 12).
2019-02-08 18:29:26 -08:00
Kurt
383d4b7700 "" -> string.Empty
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
2019-02-07 21:40:20 -08:00
Kurt
59b41937e1 Misc variable name changes
readability++
2019-02-06 23:28:02 -08:00
Kurt
29253ed636 More cleaning 2019-02-03 20:28:03 -08:00
Kurt
6ed9f979de Continued refactoring
removing null results as indicators of no data (c# 8 sooooon)
2019-02-01 23:26:43 -08:00
Kurt
aa022fad40 Misc refactoring
remove some null usages, return an empty array instead
reduce as arg
2019-02-01 23:08:03 -08:00
Kurt
13c13d5f49 Update 1MB invalid savefile message
trickles down to memcard, which is still invalid. Use a more generic
message if a memcard is the same size as a regular savefile.
2019-01-22 19:32:22 -08:00
Kurt
13090c0ced misc gen1 updates
sav1: assign personal table based on (detected/provided) version
catchrate editor: allow to use savefile personal
remove gb era prompt whenever gb/blank loaded; have it as a setting (can
be overridden for VC now). keep allowgbera as autodetect
personaltable: track format for debugging purposes/info

update translations
2019-01-21 20:06:02 -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
6c0ad30b9a Add gp1-pb7 conversion
Add drop to pkmeditor & drop to saveditor
2018-11-21 20:48:55 -08:00
Evan Dixon
9c87ad2977 Port tests to .Net Core (#2156)
* Rewrite tests with XUnit and .Net Core
* Add better "because" message
* Skipping test that was not ready & convert the fact to a theory
* Tweak casing
* Convert select date tests to theories
* Make the GetStringList load lock safer
2018-11-06 15:25:35 -08:00
Kurt
3cd45cf5c4 Continue extracting logic 2018-09-16 12:44:00 -07:00
Kurt
b280ffcfef style updates
should be pretty much it
2018-09-14 22:37:47 -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
cc20bb38d7 misc updates
use arrays instead of list when capacity known
use enums for const decoration
remove unnecessary aliases
2018-09-01 19:55:08 -07:00
Kurt
633f0e1da9 Extract filetype detection, add xmldoc 2018-08-17 23:23:44 -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
d916be1020 Style updates 2018-07-29 13:27:48 -07:00
Kurt
75801e22e0 Update egg location -> encounter generating checks
WasEgg only checks for EncounterEgg valid locations; check for any value
instead.
2018-07-26 14:55:49 -07:00
Kurt
81355dfaf4 Update translatables for pkm conversion 2018-07-24 15:36:46 -07:00
Kurt
2e02ec9719 Refactoring
Move some logic out of saveditor/subs
2018-07-07 11:20:05 -07:00
Evan Dixon
8a0a2de7b2 Elaborate on unsupported message (#2038) 2018-07-01 07:37:31 -07:00
Kurt
9f8edc89bf Refactoring
put some string[] behind IReadOnlyList to prevent any consumer from
modifying it
2018-06-30 09:59:48 -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
dcfeff7bf3 Update batch editing
Permit all possible properties in the dropdown, handle can't write cases
(many) as well as can't read (I don't think there are any of these).

https://projectpokemon.org/home/forums/topic/45789-how-to-require-a-pkm-equals-a-shiny-pid-in-batch-editor/?do=findComment&comment=232757
2018-06-13 18:52:09 -07:00
Kurt
3b84f33776 Misc changes
Revert linq chain
Closes #1987

change encountermatch comparison (never null), add comparison for vc
output
remove unused strings (will get removed from translation files in later
update)
2018-06-10 00:26:33 -07:00
Kurt
d724dffcc3 Update translations
Add secret debug hotkey to trigger update of translation files
2018-05-31 22:40:55 -07:00
Kurt
c31ab63a1a Initialize mgdb for tests that need it initialized
don't initialize multiple times
2018-05-27 15:57:28 -07:00
Kurt
dbb23f33c8 Update trim call for strings
7ef8a88678 (commitcomment-29123689)

A better fix may be to just make all line endings consistent ('\n'), but
string resource loading time is negligible
2018-05-24 21:16:55 -07:00
ReignOfComputer
a81b43cd4f Fixed Off By One Error in Single Box Dump (#1956)
Huh, how long has this been here :O
2018-05-21 18:24:29 -07:00
Kurt
30dc87df7e Misc ui fixes
move distinct filter to reflectutil as it is spitting out
inherited(overriden) property names after the current class' property
name.
remove original (default) memory strings; had removed Items.Clear()
earlier (why would I need to clear if there was nothing there?) but
there was something there needing to be cleared. Remove the useless
initialization to fix that :)

Thanks Davil!
https://projectpokemon.org/home/forums/topic/45321-distsupertrain/
2018-05-20 07:46:59 -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
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
335379bd2e Remove unneeded string
#1893
2018-04-08 17:54:09 -07:00
Kurt
6ac8ed0098 Update translations
all supported langs now have all 3 translatable resources; translate
away!
2018-04-08 09:19:19 -07:00
Kurt
1d4e815689 Extract more mesage strings
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.
2018-04-06 21:23:09 -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
Kurt
e5aa39a6bb Refactoring
get language list now doesn't return new objects (or re-enumerate)
update rand usage to be inclusive for top bound, extend shuffle to
collections
remove unnecessary location overrides (already overriden in legal fetch)
2017-12-14 20:58:55 -08:00
Kurt
5bc2e6da88 Refactoring
de-linq some areas where direct accessing is possible (list/array)
2017-12-04 20:16:54 -08:00