v1.0.13.1 (first post-1.0 patch)

This commit is contained in:
Regalis11
2023-05-10 15:07:17 +03:00
parent 96fb49ba14
commit ee1db852b1
272 changed files with 5738 additions and 2413 deletions
+11 -7
View File
@@ -14,20 +14,20 @@ namespace Steamworks
Id = id;
}
public string Name => SteamFriends.Internal.GetClanName(Id);
public string? Name => SteamFriends.Internal?.GetClanName(Id);
public string Tag => SteamFriends.Internal.GetClanTag(Id);
public string? Tag => SteamFriends.Internal?.GetClanTag(Id);
public int ChatMemberCount => SteamFriends.Internal.GetClanChatMemberCount(Id);
public int ChatMemberCount => SteamFriends.Internal?.GetClanChatMemberCount(Id) ?? 0;
public Friend Owner => new Friend(SteamFriends.Internal.GetClanOwner(Id));
public Friend Owner => new Friend(SteamFriends.Internal?.GetClanOwner(Id) ?? 0);
public bool Public => SteamFriends.Internal.IsClanPublic(Id);
public bool Public => SteamFriends.Internal != null && SteamFriends.Internal.IsClanPublic(Id);
/// <summary>
/// Is the clan an official game group?
/// </summary>
public bool Official => SteamFriends.Internal.IsClanOfficialGameGroup(Id);
public bool Official => SteamFriends.Internal != null && SteamFriends.Internal.IsClanOfficialGameGroup(Id);
/// <summary>
/// Asynchronously fetches the officer list for a given clan
@@ -35,14 +35,18 @@ namespace Steamworks
/// <returns>Whether the request was successful or not</returns>
public async Task<bool> RequestOfficerList()
{
if (SteamFriends.Internal is null) { return false; }
var req = await SteamFriends.Internal.RequestClanOfficerList(Id);
return req.HasValue && req.Value.Success != 0x0;
}
public IEnumerable<Friend> GetOfficers()
{
for (int i = 0; i < SteamFriends.Internal.GetClanOfficerCount(Id); i++)
if (SteamFriends.Internal is null) { yield break; }
var officerCount = SteamFriends.Internal.GetClanOfficerCount(Id);
for (int i = 0; i < officerCount; i++)
{
if (SteamFriends.Internal is null) { yield break; }
yield return new Friend(SteamFriends.Internal.GetClanOfficerByIndex(Id, i));
}
}