mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +03:00
Added Server.Tags
This commit is contained in:
parent
cf458a515a
commit
f8798f2f4e
@ -22,12 +22,33 @@ public struct ServerInfo
|
||||
public bool Secure { get; set; }
|
||||
public uint LastTimePlayed { get; set; }
|
||||
public int Version { get; set; }
|
||||
public string Tags { get; set; }
|
||||
public string TagString { get; set; }
|
||||
public ulong SteamId { get; set; }
|
||||
public IPAddress Address { get; set; }
|
||||
public int ConnectionPort { get; set; }
|
||||
public int QueryPort { get; set; }
|
||||
|
||||
string[] _tags;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the individual tags for this server
|
||||
/// </summary>
|
||||
public string[] Tags
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _tags == null )
|
||||
{
|
||||
if ( !string.IsNullOrEmpty( TagString ) )
|
||||
{
|
||||
_tags = TagString.Split( ',' );
|
||||
}
|
||||
}
|
||||
|
||||
return _tags;
|
||||
}
|
||||
}
|
||||
|
||||
internal static ServerInfo From( gameserveritem_t item )
|
||||
{
|
||||
return new ServerInfo()
|
||||
@ -48,7 +69,7 @@ internal static ServerInfo From( gameserveritem_t item )
|
||||
Secure = item.Secure,
|
||||
LastTimePlayed = item.TimeLastPlayed,
|
||||
Version = item.ServerVersion,
|
||||
Tags = item.GameTags,
|
||||
TagString = item.GameTags,
|
||||
SteamId = item.SteamID
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user