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 /// 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() 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 ) {