mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 14:30:56 +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}";
|
|
}
|
|
}
|
|
}
|