v1.0.13.1 (first post-1.0 patch)
This commit is contained in:
@@ -9,11 +9,11 @@ namespace Steamworks.Data
|
||||
{
|
||||
public struct ServerInfo : IEquatable<ServerInfo>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public int Ping { get; set; }
|
||||
public string GameDir { get; set; }
|
||||
public string Map { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string? GameDir { get; set; }
|
||||
public string? Map { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public uint AppId { get; set; }
|
||||
public int Players { get; set; }
|
||||
public int MaxPlayers { get; set; }
|
||||
@@ -22,19 +22,19 @@ namespace Steamworks.Data
|
||||
public bool Secure { get; set; }
|
||||
public uint LastTimePlayed { get; set; }
|
||||
public int Version { get; set; }
|
||||
public string TagString { get; set; }
|
||||
public string? TagString { get; set; }
|
||||
public ulong SteamId { get; set; }
|
||||
public uint AddressRaw { get; set; }
|
||||
public IPAddress Address { get; set; }
|
||||
public IPAddress? Address { get; set; }
|
||||
public int ConnectionPort { get; set; }
|
||||
public int QueryPort { get; set; }
|
||||
|
||||
string[] _tags;
|
||||
string[]? _tags;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the individual tags for this server
|
||||
/// </summary>
|
||||
public string[] Tags
|
||||
public string[]? Tags
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -97,13 +97,13 @@ namespace Steamworks.Data
|
||||
/// </summary>
|
||||
public void AddToHistory()
|
||||
{
|
||||
SteamMatchmaking.Internal.AddFavoriteGame( SteamClient.AppId, AddressRaw, (ushort)ConnectionPort, (ushort)QueryPort, k_unFavoriteFlagHistory, (uint)Epoch.Current );
|
||||
SteamMatchmaking.Internal?.AddFavoriteGame( SteamClient.AppId, AddressRaw, (ushort)ConnectionPort, (ushort)QueryPort, k_unFavoriteFlagHistory, (uint)Epoch.Current );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If this server responds to source engine style queries, we'll be able to get a list of rules here
|
||||
/// </summary>
|
||||
public async Task<Dictionary<string, string>> QueryRulesAsync()
|
||||
public async Task<Dictionary<string, string>?> QueryRulesAsync()
|
||||
{
|
||||
return await SourceServerQuery.GetRules( this );
|
||||
}
|
||||
@@ -113,7 +113,7 @@ namespace Steamworks.Data
|
||||
/// </summary>
|
||||
public void RemoveFromHistory()
|
||||
{
|
||||
SteamMatchmaking.Internal.RemoveFavoriteGame( SteamClient.AppId, AddressRaw, (ushort)ConnectionPort, (ushort)QueryPort, k_unFavoriteFlagHistory );
|
||||
SteamMatchmaking.Internal?.RemoveFavoriteGame( SteamClient.AppId, AddressRaw, (ushort)ConnectionPort, (ushort)QueryPort, k_unFavoriteFlagHistory );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -121,7 +121,7 @@ namespace Steamworks.Data
|
||||
/// </summary>
|
||||
public void AddToFavourites()
|
||||
{
|
||||
SteamMatchmaking.Internal.AddFavoriteGame( SteamClient.AppId, AddressRaw, (ushort)ConnectionPort, (ushort)QueryPort, k_unFavoriteFlagFavorite, (uint)Epoch.Current );
|
||||
SteamMatchmaking.Internal?.AddFavoriteGame( SteamClient.AppId, AddressRaw, (ushort)ConnectionPort, (ushort)QueryPort, k_unFavoriteFlagFavorite, (uint)Epoch.Current );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -129,7 +129,7 @@ namespace Steamworks.Data
|
||||
/// </summary>
|
||||
public void RemoveFromFavourites()
|
||||
{
|
||||
SteamMatchmaking.Internal.RemoveFavoriteGame( SteamClient.AppId, AddressRaw, (ushort)ConnectionPort, (ushort)QueryPort, k_unFavoriteFlagFavorite );
|
||||
SteamMatchmaking.Internal?.RemoveFavoriteGame( SteamClient.AppId, AddressRaw, (ushort)ConnectionPort, (ushort)QueryPort, k_unFavoriteFlagFavorite );
|
||||
}
|
||||
|
||||
public bool Equals( ServerInfo other )
|
||||
@@ -139,7 +139,7 @@ namespace Steamworks.Data
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Address.GetHashCode() + SteamId.GetHashCode() + ConnectionPort.GetHashCode() + QueryPort.GetHashCode();
|
||||
return (Address?.GetHashCode() ?? 0) + SteamId.GetHashCode() + ConnectionPort.GetHashCode() + QueryPort.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user