From 24c0edcbcb9163a1bc39cf72e2c33483ba01f675 Mon Sep 17 00:00:00 2001 From: speedis Date: Fri, 16 Feb 2018 22:50:19 +0100 Subject: [PATCH 1/3] Added servers stats SetAchievement --- Facepunch.Steamworks/Server/Stats.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Facepunch.Steamworks/Server/Stats.cs b/Facepunch.Steamworks/Server/Stats.cs index 2238205..e30a22d 100644 --- a/Facepunch.Steamworks/Server/Stats.cs +++ b/Facepunch.Steamworks/Server/Stats.cs @@ -112,8 +112,18 @@ public float GetFloat( ulong steamid, string name, float defaultValue = 0 ) return data; } + /// + /// Unlocks the specified achievement for the specified user. Must have called Refresh on a steamid first. + /// Remember to use Commit after use. + /// + public bool SetAchievement( ulong steamid, string name ) + { + return server.native.gameServerStats.SetUserAchievement( steamid, name ); + } + /// /// Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first. + /// Remember to use Commit after use. /// public bool ClearAchievement( ulong steamid, string name ) { From 63b31976c04da4f50cc80b1f3d66f2503e09cbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Straubmeier?= Date: Tue, 20 Feb 2018 11:55:59 +0100 Subject: [PATCH 2/3] Workshop.Item.Download returns a boolean --- Facepunch.Steamworks/Interfaces/Workshop.Item.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Facepunch.Steamworks/Interfaces/Workshop.Item.cs b/Facepunch.Steamworks/Interfaces/Workshop.Item.cs index 21d943d..24fda87 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.Item.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.Item.cs @@ -48,19 +48,20 @@ internal static Item From( SteamNative.SteamUGCDetails_t details, Workshop works return item; } - public void Download( bool highPriority = true ) + public bool Download( bool highPriority = true ) { - if ( Installed ) return; - if ( Downloading ) return; + if ( Installed ) return true; + if ( Downloading ) return true; if ( !workshop.ugc.DownloadItem( Id, highPriority ) ) { Console.WriteLine( "Download Failed" ); - return; + return false; } workshop.OnFileDownloaded += OnFileDownloaded; workshop.OnItemInstalled += OnItemInstalled; + return true; } public void Subscribe() From 6b5f8f7481a1d4a75d7c0068fe83b71791e37dae Mon Sep 17 00:00:00 2001 From: Daniel Menard Date: Tue, 20 Feb 2018 15:55:38 -0500 Subject: [PATCH 3/3] Added method to show friends invite overlay to Lobby class --- Facepunch.Steamworks/Client/Lobby.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Facepunch.Steamworks/Client/Lobby.cs b/Facepunch.Steamworks/Client/Lobby.cs index bcf8afe..df9c0a5 100644 --- a/Facepunch.Steamworks/Client/Lobby.cs +++ b/Facepunch.Steamworks/Client/Lobby.cs @@ -480,6 +480,14 @@ internal void OnUserInvitedToLobbyAPI( LobbyInvite_t callback ) } + /// + /// Activates the steam overlay to invite friends to the CurrentLobby the user is in. + /// + public void OpenFriendInviteOverlay() + { + client.native.friends.ActivateGameOverlayInviteDialog(CurrentLobby); + } + /// /// Called when a user invites the current user to a lobby. The first parameter is the lobby the user was invited to, the second is the CSteamID of the person who invited this user ///