PKHeX/PKHeX.Core/Legality/LearnSource/MoveLearnInfo.cs
Kurt 2c541ad422
Update to .NET 10 (#4676)
* Update to .NET 10
* Property fields
* API signature updates
* Extension method blocks

* Completed dark mode support
  Outside of my control:
- vertical tab control (pkm editor)
- datetimepicker controls
- lgpe event flags (no idea)
- some control types having white-borders when they should really be gray

Box background is 50% transparency to effectively darken the image.

* Custom legality report popup
* Event diff dialog, version select dialog
* Add quick overwrite popup for export sav
* Extension methods
* Dark Mode: glow currently editing sprite
* Add invalid encounter hint for trade evolutions
* Extension properties
* Append legality hint on hover card
* Slot image loading: clear the screen-reader description if a slot is empty/invalid, rather than retain the previous description. Changing boxes would easily confuse users on this.
2025-12-31 01:42:05 -06:00

29 lines
1.2 KiB
C#

using System.Text;
using static PKHeX.Core.LearnMethod;
namespace PKHeX.Core;
/// <summary>
/// Small struct that stores the where &amp; how details a move can be learned.
/// </summary>
/// <param name="Method">How the move was learned</param>
/// <param name="Environment">Where the move was learned</param>
/// <param name="Argument">Conditions in which the move was learned</param>
public readonly record struct MoveLearnInfo(LearnMethod Method, LearnEnvironment Environment, byte Argument = 0)
{
/// <summary>
/// Summarizes the move learn info into a human-readable format and appends it to the provided <see cref="StringBuilder"/>.
/// </summary>
/// <param name="sb">The <see cref="StringBuilder"/> to append the summary to.</param>
/// <param name="strings">The localized strings to use for displaying the learning method.</param>
public void Summarize(StringBuilder sb, MoveSourceLocalization strings)
{
var localizedMethod = strings.Localize(Method);
if (Environment.IsSpecified)
sb.Append(Environment).Append('-');
sb.Append(localizedMethod);
if (Method is LevelUp)
sb.AppendFormat(strings.LevelUpSuffix, Argument);
}
}