From 796976cd478ae53820fbb890a468b9a864b72728 Mon Sep 17 00:00:00 2001 From: laurirasanen Date: Thu, 19 Sep 2019 16:25:43 +0300 Subject: [PATCH] Add SteamFriends.GetFromSource --- Facepunch.Steamworks/SteamFriends.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Facepunch.Steamworks/SteamFriends.cs b/Facepunch.Steamworks/SteamFriends.cs index dda0fcf..2f3263b 100644 --- a/Facepunch.Steamworks/SteamFriends.cs +++ b/Facepunch.Steamworks/SteamFriends.cs @@ -136,6 +136,14 @@ public static IEnumerable GetPlayedWith() } } + public static IEnumerable GetFromSource( SteamId steamid ) + { + for ( int i = 0; i < Internal.GetFriendCountFromSource( steamid ); i++ ) + { + yield return new Friend( Internal.GetFriendFromSourceByIndex( steamid, i ) ); + } + } + /// /// The dialog to open. Valid options are: /// "friends",