This commit is contained in:
Garry Newman 2018-02-22 11:36:42 +00:00
commit c58fc3f217
3 changed files with 23 additions and 4 deletions

View File

@ -480,6 +480,14 @@ internal void OnUserInvitedToLobbyAPI( LobbyInvite_t callback )
}
/// <summary>
/// Activates the steam overlay to invite friends to the CurrentLobby the user is in.
/// </summary>
public void OpenFriendInviteOverlay()
{
client.native.friends.ActivateGameOverlayInviteDialog(CurrentLobby);
}
/// <summary>
/// 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
/// </summary>

View File

@ -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()

View File

@ -112,8 +112,18 @@ public float GetFloat( ulong steamid, string name, float defaultValue = 0 )
return data;
}
/// <summary>
/// Unlocks the specified achievement for the specified user. Must have called Refresh on a steamid first.
/// Remember to use Commit after use.
/// </summary>
public bool SetAchievement( ulong steamid, string name )
{
return server.native.gameServerStats.SetUserAchievement( steamid, name );
}
/// <summary>
/// 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.
/// </summary>
public bool ClearAchievement( ulong steamid, string name )
{