mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
ISteamApps Methods Complete
This commit is contained in:
parent
fe0d934bfc
commit
76c82bff25
@ -71,6 +71,14 @@ public async Task GetFileDetails()
|
||||
Console.WriteLine( $"fileinfo.Sha1: {fileinfo.Sha1}" );
|
||||
Console.WriteLine( $"fileinfo.Flags: {fileinfo.Flags}" );
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task CommandLine()
|
||||
{
|
||||
var cl = Apps.CommandLine;
|
||||
|
||||
Console.WriteLine( $"CommandLine: {cl}" );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,6 +29,11 @@ internal static Internal.ISteamApps steamapps
|
||||
/// </summary>
|
||||
public static bool IsSubscribed => steamapps.BIsSubscribed();
|
||||
|
||||
/// <summary>
|
||||
/// Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
||||
/// </summary>
|
||||
public static bool IsSubscribedFromFamilySharing => steamapps.BIsSubscribedFromFamilySharing();
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the license owned by the user provides low violence depots.
|
||||
/// Low violence depots are useful for copies sold in countries that have content restrictions
|
||||
@ -228,5 +233,23 @@ public static async Task<FileDetails> GetFileDetails( string filename )
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get command line if game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/.
|
||||
/// This method of passing a connect string (used when joining via rich presence, accepting an
|
||||
/// invite, etc) is preferable to passing the connect string on the operating system command
|
||||
/// line, which is a security risk. In order for rich presence joins to go through this
|
||||
/// path and not be placed on the OS command line, you must set a value in your app's
|
||||
/// configuration on Steam. Ask Valve for help with this.
|
||||
/// </summary>
|
||||
public static string CommandLine
|
||||
{
|
||||
get
|
||||
{
|
||||
var sb = SteamNative.Helpers.TakeStringBuilder();
|
||||
var len = steamapps.GetLaunchCommandLine( sb, sb.Capacity );
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user