2016-06-11 17:56:37 +10:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace ClassicalSharp.Entities {
|
|
|
|
|
|
|
|
|
|
public sealed class TabList : IGameComponent {
|
|
|
|
|
public TabListEntry[] Entries = new TabListEntry[256];
|
|
|
|
|
|
2016-11-27 14:47:09 +11:00
|
|
|
|
public void Init(Game game) { }
|
|
|
|
|
public void Ready(Game game) { }
|
|
|
|
|
public void OnNewMapLoaded(Game game) { }
|
2016-06-11 17:56:37 +10:00
|
|
|
|
public void Dispose() { }
|
2016-11-27 14:47:09 +11:00
|
|
|
|
public void OnNewMap(Game game) { }
|
2016-06-11 17:56:37 +10:00
|
|
|
|
|
2016-11-27 14:47:09 +11:00
|
|
|
|
public void Reset(Game game) {
|
|
|
|
|
for (int i = 0; i < Entries.Length; i++)
|
2016-06-11 17:56:37 +10:00
|
|
|
|
Entries[i] = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class TabListEntry {
|
|
|
|
|
|
|
|
|
|
/// <summary> Unformatted name of the player for autocompletion, etc. </summary>
|
|
|
|
|
/// <remarks> Colour codes are always removed from this. </remarks>
|
|
|
|
|
public string PlayerName;
|
|
|
|
|
|
|
|
|
|
/// <summary> Formatted name for display in the player list. </summary>
|
|
|
|
|
/// <remarks> Can include colour codes. </remarks>
|
|
|
|
|
public string ListName;
|
|
|
|
|
|
|
|
|
|
/// <summary> Name of the group this player is in. </summary>
|
|
|
|
|
/// <remarks> Can include colour codes. </remarks>
|
|
|
|
|
public string GroupName;
|
|
|
|
|
|
|
|
|
|
/// <summary> Player's rank within the group. (0 is highest) </summary>
|
|
|
|
|
/// <remarks> Multiple group members can share the same rank,
|
|
|
|
|
/// so a player's group rank is not a unique identifier. </remarks>
|
|
|
|
|
public byte GroupRank;
|
|
|
|
|
|
2017-05-21 12:30:51 +10:00
|
|
|
|
public TabListEntry(string playerName, string listName,
|
2016-11-27 14:47:09 +11:00
|
|
|
|
string groupName, byte groupRank) {
|
2016-06-11 17:56:37 +10:00
|
|
|
|
PlayerName = playerName;
|
|
|
|
|
ListName = listName;
|
|
|
|
|
GroupName = groupName;
|
|
|
|
|
GroupRank = groupRank;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|