Add traditional species list & selections

This commit is contained in:
Kurt
2016-11-09 08:23:47 -08:00
parent d5b6f151fe
commit 6f62bc685e
9 changed files with 137 additions and 12 deletions

View File

@@ -7,7 +7,7 @@ namespace PKHeX
public static class GameInfo
{
private static readonly string[] ptransp = { "ポケシフター", "Poké Transfer", "Poké Fret", "Pokétrasporto", "Poképorter", "Pokétransfer", "포케시프터", "ポケシフター" };
public static readonly string[] lang_val = { "ja", "en", "fr", "it", "de", "es", "ko", "zh", "pt" };
public static readonly string[] lang_val = { "ja", "en", "fr", "it", "de", "es", "ko", "zh", "zh2", "pt" };
private const string DefaultLanguage = "en";
private static readonly GameStrings[] Languages = new GameStrings[lang_val.Length];

View File

@@ -159,9 +159,9 @@ private void verifyNickname()
AddLine(Severity.Indeterminate, "Language ID > 8.", CheckIdentifier.Language);
return;
}
if (pkm.Format <= 7 && pkm.Language > 9)
if (pkm.Format <= 7 && pkm.Language > 10)
{
AddLine(Severity.Indeterminate, "Language ID > 9.", CheckIdentifier.Language);
AddLine(Severity.Indeterminate, "Language ID > 10.", CheckIdentifier.Language);
return;
}

View File

@@ -1223,7 +1223,7 @@ private void changeMainLanguage(object sender, EventArgs e)
// Set the culture (makes it easy to pass language to other forms)
Properties.Settings.Default.Language = curlanguage;
Properties.Settings.Default.Save();
Thread.CurrentThread.CurrentCulture = new CultureInfo(curlanguage);
Thread.CurrentThread.CurrentCulture = new CultureInfo(curlanguage.Substring(0, 2));
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
}
private void InitializeStrings()
@@ -1281,7 +1281,6 @@ private void InitializeLanguage()
// Set the various ComboBox DataSources up with their allowed entries
setCountrySubRegion(CB_Country, "countries");
CB_3DSReg.DataSource = Util.getUnsortedCBList("regions3ds");
CB_Language.DataSource = Util.getUnsortedCBList("languages");
GameInfo.InitializeDataSources(GameStrings);
@@ -1297,6 +1296,11 @@ private void populateFilteredDataSources()
if (SAV.Generation > 1)
CB_HeldItem.DataSource = new BindingSource(GameInfo.ItemDataSource.Where(i => i.Value <= SAV.MaxItemID).ToList(), null);
var languages = Util.getUnsortedCBList("languages");
if (SAV.Generation < 7)
languages = languages.Where(l => l.Value <= 8).ToList(); // Korean
CB_Language.DataSource = languages;
CB_Ball.DataSource = new BindingSource(GameInfo.BallDataSource.Where(b => b.Value <= SAV.MaxBallID).ToList(), null);
CB_Species.DataSource = new BindingSource(GameInfo.SpeciesDataSource.Where(s => s.Value <= SAV.MaxSpeciesID).ToList(), null);
DEV_Ability.DataSource = new BindingSource(GameInfo.AbilityDataSource.Where(a => a.Value <= SAV.MaxAbilityID).ToList(), null);

View File

@@ -3568,6 +3568,9 @@
<ItemGroup>
<None Include="Resources\img\item\item_920.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\text\zh\text_Species_zh2.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -196,6 +196,8 @@ public static uint LCRNG(ref uint seed)
Util.getSpeciesList("es"), // none
Util.getSpeciesList("es"), // 7
Util.getSpeciesList("ko"), // 8
Util.getSpeciesList("zh"), // 9 Simplified
Util.getSpeciesList("zh2"), // 10 Traditional
};
public static string getSpeciesName(int species, int lang)

View File

@@ -17296,7 +17296,9 @@ internal class Resources {
///4,ITA (Italiano)
///5,GER (Deutsch)
///7,ESP (Español)
///8,KOR (한국어).
///8,KOR (한국어)
///9,CHS (汉字简化方案)
///10,CHT (漢字簡化方案).
/// </summary>
internal static string languages {
get {
@@ -23881,7 +23883,7 @@ internal class Resources {
}
/// <summary>
/// Looks up a localized string similar to Spiky
/// Looks up a localized string similar to Picoreja
///
///
///
@@ -24133,8 +24135,7 @@ internal class Resources {
///
///
///
///
/// /// [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_es {
get {
@@ -24143,7 +24144,7 @@ internal class Resources {
}
/// <summary>
/// Looks up a localized string similar to Spiky
/// Looks up a localized string similar to Picoreja
///
///
///
@@ -24395,8 +24396,7 @@ internal class Resources {
///
///
///
///
/// /// [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_Forms_es1 {
get {
@@ -33391,6 +33391,119 @@ internal class Resources {
}
}
/// <summary>
/// Looks up a localized string similar to 
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_species_zh2 {
get {
return ResourceManager.GetString("text_species_zh2", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Probetraining mit Purmel!
///Zeigs Puponcho mit einem Fokusschuss!

View File

@@ -7186,4 +7186,7 @@
<data name="item_920" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\item\item_920.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="text_species_zh2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\text\zh\text_Species_zh2.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
</root>

Binary file not shown.