mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-28 15:45:29 +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 bool Secure { get; set; }
|
||||||
public uint LastTimePlayed { get; set; }
|
public uint LastTimePlayed { get; set; }
|
||||||
public int Version { get; set; }
|
public int Version { get; set; }
|
||||||
public string Tags { get; set; }
|
public string TagString { get; set; }
|
||||||
public ulong SteamId { get; set; }
|
public ulong SteamId { get; set; }
|
||||||
public IPAddress Address { get; set; }
|
public IPAddress Address { get; set; }
|
||||||
public int ConnectionPort { get; set; }
|
public int ConnectionPort { get; set; }
|
||||||
public int QueryPort { 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 )
|
internal static ServerInfo From( gameserveritem_t item )
|
||||||
{
|
{
|
||||||
return new ServerInfo()
|
return new ServerInfo()
|
||||||
@ -48,7 +69,7 @@ internal static ServerInfo From( gameserveritem_t item )
|
|||||||
Secure = item.Secure,
|
Secure = item.Secure,
|
||||||
LastTimePlayed = item.TimeLastPlayed,
|
LastTimePlayed = item.TimeLastPlayed,
|
||||||
Version = item.ServerVersion,
|
Version = item.ServerVersion,
|
||||||
Tags = item.GameTags,
|
TagString = item.GameTags,
|
||||||
SteamId = item.SteamID
|
SteamId = item.SteamID
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user