Update PKHeX exports

Target typed new for Nests, Dynamax Adventures, and Trades
This commit is contained in:
sora10pls 2021-01-01 13:34:47 -05:00
parent 955ba9fed6
commit e8ddd9be61
4 changed files with 5 additions and 5 deletions

View File

@ -64,11 +64,11 @@ IEnumerable<string> Summary(EncounterNest8 e)
curMin = i;
if (i == max)
yield return $" new EncounterStatic8N(Nest{index:00},{curMin},{i},{flawless}) {{ Species = {e.Species:000}, Ability = {ability}{gender}{altform}{giga} }},{comment}";
yield return $" new(Nest{index:000},{curMin},{i},{flawless}) {{ Species = {e.Species:000}, Ability = {ability}{gender}{altform}{giga} }},{comment}";
}
else if (curMin != -1)
{
yield return $" new EncounterStatic8N(Nest{index:00},{curMin},{i - 1},{flawless}) {{ Species = {e.Species:000}, Ability = {ability}{gender}{altform}{giga} }},{comment}";
yield return $" new(Nest{index:000},{curMin},{i - 1},{flawless}) {{ Species = {e.Species:000}, Ability = {ability}{gender}{altform}{giga} }},{comment}";
curMin = -1;
}
}

View File

@ -48,7 +48,7 @@ public string GetSummary(IReadOnlyList<string> species)
var moves = $", Moves = new[] {{{Move0:000},{Move1:000},{Move2:000},{Move3:000}}}";
var game = Version != 0 ? Version == 1 ? ", Version = GameVersion.SW" : ", Version = GameVersion.SH" : "";
var g = IsGigantamax ? ", CanGigantamax = true" : "";
return $" new EncounterStatic8U({(int)Species:000},{AltForm},{Level:00}) {{ Ability = A{Ability}{gender}{moves}{g}{game} }},{comment}";
return $" new({(int)Species:000},{AltForm},{Level:00}) {{ Ability = A{Ability}{gender}{moves}{g}{game} }},{comment}";
}
}
}

View File

@ -138,7 +138,7 @@ public string GetSummary(IReadOnlyList<string> species)
var ball = Ball == Ball.Poke ? string.Empty : $", Ball = {Ball}";
return
$" new EncounterTrade8({(int)Species:000},{Level:00},{Memory:00},{TextVar:000},{Feeling:00},{Intensity}) {{ {ability}{tid}{ivs}{dyna}{otgender}{gender}{shiny}{nature}{giga}{relearn}{altform}{ball} }},{comment}";
$" new({(int)Species:000},{Level:00},{Memory:00},{TextVar:000},{Feeling:00},{Intensity}) {{ {ability}{tid}{ivs}{dyna}{otgender}{gender}{shiny}{nature}{giga}{relearn}{altform}{ball} }},{comment}";
}
}
}

View File

@ -347,7 +347,7 @@ public void DumpNestEntries()
foreach (var game in new[] { 1, 2 })
{
var tables = nest_encounts.Tables.Where(z => z.GameVersion == game).ToList();
var entries = tables.Select((_, x) => $"private const int Nest{x:00} = {x + 100_000};");
var entries = tables.Select((_, x) => $"private const int Nest{x:000} = {x + 100_000};");
var encounters = tables.SelectMany((z, x) => z.GetSummary(speciesNames, x)).ToArray();
var path1 = GetPath($"nestHex{game}.txt");