From 2843749918c1fe1b866aa89ad33ca1eef2873d9e Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Mon, 24 Feb 2020 13:07:50 +0000 Subject: [PATCH] Hide FriendFlags --- Facepunch.Steamworks/Generated/SteamEnums.cs | 2 +- Facepunch.Steamworks/SteamFriends.cs | 22 +++++++++++++++++++- Generator/Cleanup.cs | 1 - 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Facepunch.Steamworks/Generated/SteamEnums.cs b/Facepunch.Steamworks/Generated/SteamEnums.cs index 1ff708d..358b382 100644 --- a/Facepunch.Steamworks/Generated/SteamEnums.cs +++ b/Facepunch.Steamworks/Generated/SteamEnums.cs @@ -634,7 +634,7 @@ namespace Steamworks // // EFriendFlags // - public enum FriendFlags : int + internal enum FriendFlags : int { None = 0, Blocked = 1, diff --git a/Facepunch.Steamworks/SteamFriends.cs b/Facepunch.Steamworks/SteamFriends.cs index 31ae7fd..fb05f2b 100644 --- a/Facepunch.Steamworks/SteamFriends.cs +++ b/Facepunch.Steamworks/SteamFriends.cs @@ -98,7 +98,7 @@ namespace Steamworks } } - public static IEnumerable GetFriendsWithFlag(FriendFlags flag) + private static IEnumerable GetFriendsWithFlag(FriendFlags flag) { for ( int i=0; i GetFriendsRequested() + { + return GetFriendsWithFlag( FriendFlags.FriendshipRequested ); + } + + public static IEnumerable GetFriendsClanMembers() + { + return GetFriendsWithFlag( FriendFlags.ClanMember ); + } + + public static IEnumerable GetFriendsOnGameServer() + { + return GetFriendsWithFlag( FriendFlags.OnGameServer ); + } + + public static IEnumerable GetFriendsRequestingFriendship() + { + return GetFriendsWithFlag( FriendFlags.RequestingFriendship ); + } + public static IEnumerable GetPlayedWith() { for ( int i = 0; i < Internal.GetCoplayFriendCount(); i++ ) diff --git a/Generator/Cleanup.cs b/Generator/Cleanup.cs index 024b3d2..3e71a1d 100644 --- a/Generator/Cleanup.cs +++ b/Generator/Cleanup.cs @@ -105,7 +105,6 @@ public static class Cleanup internal static string Expose( string name ) { if ( name == "FriendState" ) return "public"; - if (name == "FriendFlags") return "public"; if ( name == "MusicStatus" ) return "public"; if ( name == "ParentalFeature" ) return "public"; if ( name == "AuthResponse" ) return "public";