mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-23 10:53:10 +00:00
65c5890e1f
Reduces allocation, improves locality of data since the contents take less size than a pointer (can pass byval)
30 lines
771 B
C#
30 lines
771 B
C#
namespace PKHeX.Core
|
|
{
|
|
public sealed class TeamLock
|
|
{
|
|
public readonly int Species;
|
|
public readonly string Comment;
|
|
public readonly NPCLock[] Locks;
|
|
|
|
public TeamLock(int species, NPCLock[] locks)
|
|
{
|
|
Species = species;
|
|
Locks = locks;
|
|
Comment = string.Empty;
|
|
}
|
|
|
|
public TeamLock(int species, string comment, NPCLock[] locks)
|
|
{
|
|
Species = species;
|
|
Locks = locks;
|
|
Comment = comment;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
if (Comment.Length == 0)
|
|
return $"{(Species)Species} [{Locks.Length}]";
|
|
return $"{(Species)Species} [{Locks.Length}] - {Comment}";
|
|
}
|
|
}
|
|
}
|