mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +03:00
Documentation Rework (#599)
This commit is contained in:
parent
132b1a579b
commit
c106d01fcb
@ -9,9 +9,19 @@ namespace Steamworks
|
|||||||
//
|
//
|
||||||
// ESteamIPType
|
// ESteamIPType
|
||||||
//
|
//
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies the type of IP.
|
||||||
|
/// </summary>
|
||||||
internal enum SteamIPType : int
|
internal enum SteamIPType : int
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// IPv4
|
||||||
|
/// </summary>
|
||||||
Type4 = 0,
|
Type4 = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// IPv6
|
||||||
|
/// </summary>
|
||||||
Type6 = 1,
|
Type6 = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,6 +41,9 @@ public enum Universe : int
|
|||||||
//
|
//
|
||||||
// EResult
|
// EResult
|
||||||
//
|
//
|
||||||
|
/// <summary>
|
||||||
|
/// Determines the result of a request.
|
||||||
|
/// </summary>
|
||||||
public enum Result : int
|
public enum Result : int
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
|
@ -27,41 +27,41 @@ internal static void InstallEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// posted after the user gains ownership of DLC and that DLC is installed
|
/// Posted after the user gains ownership of DLC and that DLC is installed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<AppId> OnDlcInstalled;
|
public static event Action<AppId> OnDlcInstalled;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// posted after the user gains executes a Steam URL with command line or query parameters
|
/// Posted after the user gains executes a Steam URL with command line or query parameters
|
||||||
/// such as steam://run/appid//-commandline/?param1=value1(and)param2=value2(and)param3=value3 etc
|
/// such as steam://run/appid//-commandline/?param1=value1(and)param2=value2(and)param3=value3 etc
|
||||||
/// while the game is already running. The new params can be queried
|
/// while the game is already running. The new params can be queried
|
||||||
/// with GetLaunchQueryParam and GetLaunchCommandLine
|
/// with GetLaunchQueryParam and GetLaunchCommandLine.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnNewLaunchParameters;
|
public static event Action OnNewLaunchParameters;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the active user is subscribed to the current App ID
|
/// Gets whether or not the active user is subscribed to the current App ID.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsSubscribed => Internal.BIsSubscribed();
|
public static bool IsSubscribed => Internal.BIsSubscribed();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
/// Gets whether or not the user borrowed this game via Family Sharing. If true, call GetAppOwner() to get the lender SteamID.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsSubscribedFromFamilySharing => Internal.BIsSubscribedFromFamilySharing();
|
public static bool IsSubscribedFromFamilySharing => Internal.BIsSubscribedFromFamilySharing();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the license owned by the user provides low violence depots.
|
/// Gets whether or not the license owned by the user provides low violence depots.
|
||||||
/// Low violence depots are useful for copies sold in countries that have content restrictions
|
/// Low violence depots are useful for copies sold in countries that have content restrictions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsLowViolence => Internal.BIsLowViolence();
|
public static bool IsLowViolence => Internal.BIsLowViolence();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether the current App ID license is for Cyber Cafes.
|
/// Gets whether or not the current App ID license is for Cyber Cafes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsCybercafe => Internal.BIsCybercafe();
|
public static bool IsCybercafe => Internal.BIsCybercafe();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CChecks if the user has a VAC ban on their account
|
/// Gets whether or not the user has a VAC ban on their account.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsVACBanned => Internal.BIsVACBanned();
|
public static bool IsVACBanned => Internal.BIsVACBanned();
|
||||||
|
|
||||||
@ -77,19 +77,22 @@ internal static void InstallEvents()
|
|||||||
public static string[] AvailableLanguages => Internal.GetAvailableGameLanguages().Split( new[] { ',' }, StringSplitOptions.RemoveEmptyEntries );
|
public static string[] AvailableLanguages => Internal.GetAvailableGameLanguages().Split( new[] { ',' }, StringSplitOptions.RemoveEmptyEntries );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the active user is subscribed to a specified AppId.
|
/// Gets whether or not the active user is subscribed to a specified App ID.
|
||||||
/// Only use this if you need to check ownership of another game related to yours, a demo for example.
|
/// Only use this if you need to check ownership of another game related to yours, a demo for example.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="appid">The App ID of the DLC to check.</param>
|
||||||
public static bool IsSubscribedToApp( AppId appid ) => Internal.BIsSubscribedApp( appid.Value );
|
public static bool IsSubscribedToApp( AppId appid ) => Internal.BIsSubscribedApp( appid.Value );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the user owns a specific DLC and if the DLC is installed
|
/// Gets whether or not the user owns a specific DLC and if the DLC is installed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="appid">The App ID of the DLC to check.</param>
|
||||||
public static bool IsDlcInstalled( AppId appid ) => Internal.BIsDlcInstalled( appid.Value );
|
public static bool IsDlcInstalled( AppId appid ) => Internal.BIsDlcInstalled( appid.Value );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the time of the purchase of the app
|
/// Returns the time of the purchase of the app.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param>The App ID to check the purchase time for.</param>
|
||||||
public static DateTime PurchaseTime( AppId appid = default )
|
public static DateTime PurchaseTime( AppId appid = default )
|
||||||
{
|
{
|
||||||
if ( appid == 0 )
|
if ( appid == 0 )
|
||||||
@ -99,14 +102,14 @@ internal static void InstallEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the user is subscribed to the current app through a free weekend
|
/// Checks if the user is subscribed to the current app through a free weekend.
|
||||||
/// This function will return false for users who have a retail or other type of license
|
/// This function will return false for users who have a retail or other type of license.
|
||||||
/// Before using, please ask your Valve technical contact how to package and secure your free weekened
|
/// Before using, please ask your Valve technical contact how to package and secure your free weekened.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsSubscribedFromFreeWeekend => Internal.BIsSubscribedFromFreeWeekend();
|
public static bool IsSubscribedFromFreeWeekend => Internal.BIsSubscribedFromFreeWeekend();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns metadata for all available DLC
|
/// Returns metadata for all available DLC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IEnumerable<DlcInformation> DlcInformation()
|
public static IEnumerable<DlcInformation> DlcInformation()
|
||||||
{
|
{
|
||||||
@ -128,17 +131,19 @@ public static IEnumerable<DlcInformation> DlcInformation()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Install/Uninstall control for optional DLC
|
/// Install control for optional DLC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="appid">The App ID of the DLC to install.</param>
|
||||||
public static void InstallDlc( AppId appid ) => Internal.InstallDLC( appid.Value );
|
public static void InstallDlc( AppId appid ) => Internal.InstallDLC( appid.Value );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Install/Uninstall control for optional DLC
|
/// Uninstall control for optional DLC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="appid">The App ID of the DLC to uninstall.</param>
|
||||||
public static void UninstallDlc( AppId appid ) => Internal.UninstallDLC( appid.Value );
|
public static void UninstallDlc( AppId appid ) => Internal.UninstallDLC( appid.Value );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns null if we're not on a beta branch, else the name of the branch
|
/// Gets the name of the beta branch that is launched, or <see langword="null"/> if the application is not running on a beta branch.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CurrentBetaName
|
public static string CurrentBetaName
|
||||||
{
|
{
|
||||||
@ -152,16 +157,19 @@ public static string CurrentBetaName
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allows you to force verify game content on next launch.
|
/// Force verify game content on next launch.
|
||||||
///
|
/// <para>
|
||||||
/// If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a server),
|
/// If you detect the game is out-of-date (for example, by having the client detect a version mismatch with a server),
|
||||||
/// you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
/// you can call MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="missingFilesOnly">Whether or not to only verify missing files.</param>
|
||||||
public static void MarkContentCorrupt( bool missingFilesOnly ) => Internal.MarkContentCorrupt( missingFilesOnly );
|
public static void MarkContentCorrupt( bool missingFilesOnly ) => Internal.MarkContentCorrupt( missingFilesOnly );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of all installed depots for a given App ID in mount order
|
/// Gets a list of all installed depots for a given App ID in mount order.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="appid">The App ID.</param>
|
||||||
public static IEnumerable<DepotId> InstalledDepots( AppId appid = default )
|
public static IEnumerable<DepotId> InstalledDepots( AppId appid = default )
|
||||||
{
|
{
|
||||||
if ( appid == 0 )
|
if ( appid == 0 )
|
||||||
@ -177,9 +185,10 @@ public static string CurrentBetaName
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the install folder for a specific AppID.
|
/// Gets the install folder for a specific App ID.
|
||||||
/// This works even if the application is not installed, based on where the game would be installed with the default Steam library location.
|
/// This works even if the application is not installed, based on where the game would be installed with the default Steam library location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="appid">The App ID.</param>
|
||||||
public static string AppInstallDir( AppId appid = default )
|
public static string AppInstallDir( AppId appid = default )
|
||||||
{
|
{
|
||||||
if ( appid == 0 )
|
if ( appid == 0 )
|
||||||
@ -192,26 +201,32 @@ public static string CurrentBetaName
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The app may not actually be owned by the current user, they may have it left over from a free weekend, etc.
|
/// Gets whether or not the app is owned by the current user. The app may not actually be owned by the current user; they may have it left over from a free weekend, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="appid">The App ID.</param>
|
||||||
public static bool IsAppInstalled( AppId appid ) => Internal.BIsAppInstalled( appid.Value );
|
public static bool IsAppInstalled( AppId appid ) => Internal.BIsAppInstalled( appid.Value );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed..
|
/// Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static SteamId AppOwner => Internal.GetAppOwner().Value;
|
public static SteamId AppOwner => Internal.GetAppOwner().Value;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the associated launch parameter if the game is run via steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
/// Gets the associated launch parameter if the game is run via steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
||||||
/// Parameter names starting with the character '@' are reserved for internal use and will always return an empty string.
|
/// <para>
|
||||||
/// Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game,
|
/// Parameter names starting with the character '<c>@</c>' are reserved for internal use and will always return an empty string.
|
||||||
|
/// Parameter names starting with an underscore '<c>_</c>' are reserved for steam features -- they can be queried by the game,
|
||||||
/// but it is advised that you not param names beginning with an underscore for your own features.
|
/// but it is advised that you not param names beginning with an underscore for your own features.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="param">The name of the parameter.</param>
|
||||||
|
/// <returns>The launch parameter value.</returns>
|
||||||
public static string GetLaunchParam( string param ) => Internal.GetLaunchQueryParam( param );
|
public static string GetLaunchParam( string param ) => Internal.GetLaunchQueryParam( param );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the download progress for optional DLC.
|
/// Gets the download progress for optional DLC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="appid">The App ID to check the progress for.</param>
|
||||||
public static DownloadProgress DlcDownloadProgress( AppId appid )
|
public static DownloadProgress DlcDownloadProgress( AppId appid )
|
||||||
{
|
{
|
||||||
ulong punBytesDownloaded = 0;
|
ulong punBytesDownloaded = 0;
|
||||||
@ -224,16 +239,16 @@ public static DownloadProgress DlcDownloadProgress( AppId appid )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the buildid of this app, may change at any time based on backend updates to the game.
|
/// Gets the Build ID of this app, which can change at any time based on backend updates to the game.
|
||||||
/// Defaults to 0 if you're not running a build downloaded from steam.
|
/// Defaults to <c>0</c> if you're not running a build downloaded from steam.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int BuildId => Internal.GetAppBuildId();
|
public static int BuildId => Internal.GetAppBuildId();
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Asynchronously retrieves metadata details about a specific file in the depot manifest.
|
/// Asynchronously retrieves metadata details about a specific file in the depot manifest.
|
||||||
/// Currently provides:
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="filename">The name of the file.</param>
|
||||||
public static async Task<FileDetails?> GetFileDetailsAsync( string filename )
|
public static async Task<FileDetails?> GetFileDetailsAsync( string filename )
|
||||||
{
|
{
|
||||||
var r = await Internal.GetFileDetails( filename );
|
var r = await Internal.GetFileDetails( filename );
|
||||||
@ -253,9 +268,9 @@ public static DownloadProgress DlcDownloadProgress( AppId appid )
|
|||||||
/// Get command line if game was launched via Steam URL, e.g. steam://run/appid//command line/.
|
/// 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
|
/// 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
|
/// 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
|
/// 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
|
/// 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.
|
/// configuration on Steam. Ask Valve for help with this.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string CommandLine
|
public static string CommandLine
|
||||||
{
|
{
|
||||||
@ -267,8 +282,10 @@ public static string CommandLine
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// check if game is a timed trial with limited playtime
|
/// Check if game is a timed trial with limited playtime.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="secondsAllowed">The amount of seconds left on the timed trial.</param>
|
||||||
|
/// <param name="secondsPlayed">The amount of seconds played on the timed trial.</param>
|
||||||
public static bool IsTimedTrial( out int secondsAllowed, out int secondsPlayed )
|
public static bool IsTimedTrial( out int secondsAllowed, out int secondsPlayed )
|
||||||
{
|
{
|
||||||
uint a = 0;
|
uint a = 0;
|
||||||
|
@ -13,7 +13,7 @@ public static class SteamClient
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialize the steam client.
|
/// Initialize the steam client.
|
||||||
/// If asyncCallbacks is false you need to call RunCallbacks manually every frame.
|
/// If <paramref name="asyncCallbacks"/> is false you need to call <see cref="RunCallbacks"/> manually every frame.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Init( uint appid, bool asyncCallbacks = true )
|
public static void Init( uint appid, bool asyncCallbacks = true )
|
||||||
{
|
{
|
||||||
@ -25,7 +25,7 @@ public static void Init( uint appid, bool asyncCallbacks = true )
|
|||||||
|
|
||||||
if ( !SteamAPI.Init() )
|
if ( !SteamAPI.Init() )
|
||||||
{
|
{
|
||||||
throw new System.Exception( "SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId." );
|
throw new System.Exception( "SteamApi_Init returned false. Steam isn't running, couldn't find Steam, App ID is ureleased, Don't own App ID." );
|
||||||
}
|
}
|
||||||
|
|
||||||
AppId = appid;
|
AppId = appid;
|
||||||
@ -94,6 +94,9 @@ internal static void ShutdownInterfaces()
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsValid => initialized;
|
public static bool IsValid => initialized;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the steam client.
|
||||||
|
/// </summary>
|
||||||
public static void Shutdown()
|
public static void Shutdown()
|
||||||
{
|
{
|
||||||
if ( !IsValid ) return;
|
if ( !IsValid ) return;
|
||||||
@ -119,13 +122,15 @@ public static void RunCallbacks()
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if the current user's Steam client is connected to the Steam servers.
|
/// Checks if the current user's Steam client is connected to the Steam servers.
|
||||||
/// If it's not then no real-time services provided by the Steamworks API will be enabled. The Steam
|
/// <para>
|
||||||
|
/// If it's not, no real-time services provided by the Steamworks API will be enabled. The Steam
|
||||||
/// client will automatically be trying to recreate the connection as often as possible. When the
|
/// client will automatically be trying to recreate the connection as often as possible. When the
|
||||||
/// connection is restored a SteamServersConnected_t callback will be posted.
|
/// connection is restored a SteamServersConnected_t callback will be posted.
|
||||||
/// You usually don't need to check for this yourself. All of the API calls that rely on this will
|
/// You usually don't need to check for this yourself. All of the API calls that rely on this will
|
||||||
/// check internally. Forcefully disabling stuff when the player loses access is usually not a
|
/// check internally. Forcefully disabling stuff when the player loses access is usually not a
|
||||||
/// very good experience for the player and you could be preventing them from accessing APIs that do not
|
/// very good experience for the player and you could be preventing them from accessing APIs that do not
|
||||||
/// need a live connection to Steam.
|
/// need a live connection to Steam.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsLoggedOn => SteamUser.Internal.BLoggedOn();
|
public static bool IsLoggedOn => SteamUser.Internal.BLoggedOn();
|
||||||
|
|
||||||
@ -138,28 +143,30 @@ public static void RunCallbacks()
|
|||||||
public static SteamId SteamId => SteamUser.Internal.GetSteamID();
|
public static SteamId SteamId => SteamUser.Internal.GetSteamID();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns the local players name - guaranteed to not be NULL.
|
/// returns the local players name - guaranteed to not be <see langword="null"/>.
|
||||||
/// this is the same name as on the users community profile page
|
/// This is the same name as on the user's community profile page.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Name => SteamFriends.Internal.GetPersonaName();
|
public static string Name => SteamFriends.Internal.GetPersonaName();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// gets the status of the current user
|
/// Gets the status of the current user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static FriendState State => SteamFriends.Internal.GetPersonaState();
|
public static FriendState State => SteamFriends.Internal.GetPersonaState();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns the appID of the current process
|
/// Returns the App ID of the current process.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static AppId AppId { get; internal set; }
|
public static AppId AppId { get; internal set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if your executable was launched through Steam and relaunches it through Steam if it wasn't
|
/// Checks if your executable was launched through Steam and relaunches it through Steam if it wasn't.
|
||||||
/// this returns true then it starts the Steam client if required and launches your game again through it,
|
/// <para>
|
||||||
|
/// This returns true then it starts the Steam client if required and launches your game again through it,
|
||||||
/// and you should quit your process as soon as possible. This effectively runs steam://run/AppId so it
|
/// and you should quit your process as soon as possible. This effectively runs steam://run/AppId so it
|
||||||
/// may not relaunch the exact executable that called it, as it will always relaunch from the version
|
/// may not relaunch the exact executable that called it, as it will always relaunch from the version
|
||||||
/// installed in your Steam library folder/
|
/// installed in your Steam library folder/
|
||||||
/// Note that during development, when not launching via Steam, this might always return true.
|
/// Note that during development, when not launching via Steam, this might always return true.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool RestartAppIfNecessary( uint appid )
|
public static bool RestartAppIfNecessary( uint appid )
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Undocumented Parental Settings
|
/// Class for utilizing the Steam Friends API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SteamFriends : SteamClientClass<SteamFriends>
|
public class SteamFriends : SteamClientClass<SteamFriends>
|
||||||
{
|
{
|
||||||
@ -39,54 +39,54 @@ internal void InstallEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when chat message has been received from a friend. You'll need to turn on
|
/// Invoked when a chat message has been received from a friend. You'll need to enable
|
||||||
/// ListenForFriendsMessages to recieve this. (friend, msgtype, message)
|
/// <see cref="ListenForFriendsMessages"/> to recieve this. (friend, msgtype, message)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Friend, string, string> OnChatMessage;
|
public static event Action<Friend, string, string> OnChatMessage;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a chat message has been received in a Steam group chat that we are in. Associated Functions: JoinClanChatRoom. (friend, msgtype, message)
|
/// Invoked when a chat message has been received in a Steam group chat that we are in. Associated Functions: JoinClanChatRoom. (friend, msgtype, message)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Friend, string, string> OnClanChatMessage;
|
public static event Action<Friend, string, string> OnClanChatMessage;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// called when a friends' status changes
|
/// Invoked when a friends' status changes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Friend> OnPersonaStateChange;
|
public static event Action<Friend> OnPersonaStateChange;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the user tries to join a game from their friends list
|
/// Invoked when the user tries to join a game from their friends list.
|
||||||
/// rich presence will have been set with the "connect" key which is set here
|
/// Rich presence will have been set with the "connect" key which is set here.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Friend, string> OnGameRichPresenceJoinRequested;
|
public static event Action<Friend, string> OnGameRichPresenceJoinRequested;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Posted when game overlay activates or deactivates
|
/// Invoked when game overlay activates or deactivates.
|
||||||
/// the game can use this to be pause or resume single player games
|
/// The game can use this to be pause or resume single player games.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<bool> OnGameOverlayActivated;
|
public static event Action<bool> OnGameOverlayActivated;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the user tries to join a different game server from their friends list
|
/// Invoked when the user tries to join a different game server from their friends list.
|
||||||
/// game client should attempt to connect to specified server when this is received
|
/// Game client should attempt to connect to specified server when this is received.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<string, string> OnGameServerChangeRequested;
|
public static event Action<string, string> OnGameServerChangeRequested;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the user tries to join a lobby from their friends list
|
/// Invoked when the user tries to join a lobby from their friends list.
|
||||||
/// game client should attempt to connect to specified lobby when this is received
|
/// Game client should attempt to connect to specified lobby when this is received.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, SteamId> OnGameLobbyJoinRequested;
|
public static event Action<Lobby, SteamId> OnGameLobbyJoinRequested;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Callback indicating updated data about friends rich presence information
|
/// Invoked when a friend's rich presence data is updated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Friend> OnFriendRichPresenceUpdate;
|
public static event Action<Friend> OnFriendRichPresenceUpdate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dispatched when an overlay browser instance is navigated to a
|
/// Invoked when an overlay browser instance is navigated to a
|
||||||
/// protocol/scheme registered by RegisterProtocolInOverlayBrowser()
|
/// protocol/scheme registered by <see cref="RegisterProtocolInOverlayBrowser(string)"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<string> OnOverlayBrowserProtocol;
|
public static event Action<string> OnOverlayBrowserProtocol;
|
||||||
|
|
||||||
@ -140,16 +140,28 @@ private static IEnumerable<Friend> GetFriendsWithFlag(FriendFlags flag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets an <see cref="IEnumerable{T}"/> of friends that the current user has.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>An <see cref="IEnumerable{T}"/> of friends.</returns>
|
||||||
public static IEnumerable<Friend> GetFriends()
|
public static IEnumerable<Friend> GetFriends()
|
||||||
{
|
{
|
||||||
return GetFriendsWithFlag(FriendFlags.Immediate);
|
return GetFriendsWithFlag(FriendFlags.Immediate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets an <see cref="IEnumerable{T}"/> of blocked users that the current user has.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>An <see cref="IEnumerable{T}"/> of blocked users.</returns>
|
||||||
public static IEnumerable<Friend> GetBlocked()
|
public static IEnumerable<Friend> GetBlocked()
|
||||||
{
|
{
|
||||||
return GetFriendsWithFlag(FriendFlags.Blocked);
|
return GetFriendsWithFlag(FriendFlags.Blocked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets an <see cref="IEnumerable{T}"/> of friend requests that the current user has.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>An <see cref="IEnumerable{T}"/> of friend requests.</returns>
|
||||||
public static IEnumerable<Friend> GetFriendsRequested()
|
public static IEnumerable<Friend> GetFriendsRequested()
|
||||||
{
|
{
|
||||||
return GetFriendsWithFlag( FriendFlags.FriendshipRequested );
|
return GetFriendsWithFlag( FriendFlags.FriendshipRequested );
|
||||||
@ -195,7 +207,7 @@ public static IEnumerable<Clan> GetClans()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The dialog to open. Valid options are:
|
/// Opens a specific overlay window. Valid options are:
|
||||||
/// "friends",
|
/// "friends",
|
||||||
/// "community",
|
/// "community",
|
||||||
/// "players",
|
/// "players",
|
||||||
@ -267,18 +279,33 @@ internal static async Task CacheUserInformationAsync( SteamId steamid, bool name
|
|||||||
await Task.Delay( 500 );
|
await Task.Delay( 500 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a small avatar of the user with the given <paramref name="steamid"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="steamid">The <see cref="SteamId"/> of the user to get.</param>
|
||||||
|
/// <returns>A <see cref="Data.Image"/> with a value if the image was successfully retrieved.</returns>
|
||||||
public static async Task<Data.Image?> GetSmallAvatarAsync( SteamId steamid )
|
public static async Task<Data.Image?> GetSmallAvatarAsync( SteamId steamid )
|
||||||
{
|
{
|
||||||
await CacheUserInformationAsync( steamid, false );
|
await CacheUserInformationAsync( steamid, false );
|
||||||
return SteamUtils.GetImage( Internal.GetSmallFriendAvatar( steamid ) );
|
return SteamUtils.GetImage( Internal.GetSmallFriendAvatar( steamid ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a medium avatar of the user with the given <paramref name="steamid"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="steamid">The <see cref="SteamId"/> of the user to get.</param>
|
||||||
|
/// <returns>A <see cref="Data.Image"/> with a value if the image was successfully retrieved.</returns>
|
||||||
public static async Task<Data.Image?> GetMediumAvatarAsync( SteamId steamid )
|
public static async Task<Data.Image?> GetMediumAvatarAsync( SteamId steamid )
|
||||||
{
|
{
|
||||||
await CacheUserInformationAsync( steamid, false );
|
await CacheUserInformationAsync( steamid, false );
|
||||||
return SteamUtils.GetImage( Internal.GetMediumFriendAvatar( steamid ) );
|
return SteamUtils.GetImage( Internal.GetMediumFriendAvatar( steamid ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a large avatar of the user with the given <paramref name="steamid"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="steamid">The <see cref="SteamId"/> of the user to get.</param>
|
||||||
|
/// <returns>A <see cref="Data.Image"/> with a value if the image was successfully retrieved.</returns>
|
||||||
public static async Task<Data.Image?> GetLargeAvatarAsync( SteamId steamid )
|
public static async Task<Data.Image?> GetLargeAvatarAsync( SteamId steamid )
|
||||||
{
|
{
|
||||||
await CacheUserInformationAsync( steamid, false );
|
await CacheUserInformationAsync( steamid, false );
|
||||||
@ -346,6 +373,11 @@ public static bool ListenForFriendsMessages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets whether or not the current user is following the user with the given <paramref name="steamID"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="steamID">The <see cref="SteamId"/> to check.</param>
|
||||||
|
/// <returns>Boolean.</returns>
|
||||||
public static async Task<bool> IsFollowing(SteamId steamID)
|
public static async Task<bool> IsFollowing(SteamId steamID)
|
||||||
{
|
{
|
||||||
var r = await Internal.IsFollowing(steamID);
|
var r = await Internal.IsFollowing(steamID);
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for utilizing Steam Input.
|
||||||
|
/// </summary>
|
||||||
public class SteamInput : SteamClientClass<SteamInput>
|
public class SteamInput : SteamClientClass<SteamInput>
|
||||||
{
|
{
|
||||||
internal static ISteamInput Internal => Interface as ISteamInput;
|
internal static ISteamInput Internal => Interface as ISteamInput;
|
||||||
@ -16,7 +19,7 @@ internal override void InitializeInterface( bool server )
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// You shouldn't really need to call this because it get called by RunCallbacks on SteamClient
|
/// You shouldn't really need to call this because it gets called by <see cref="SteamClient.RunCallbacks"/>
|
||||||
/// but Valve think it might be a nice idea if you call it right before you get input info -
|
/// but Valve think it might be a nice idea if you call it right before you get input info -
|
||||||
/// just to make sure the info you're getting is 100% up to date.
|
/// just to make sure the info you're getting is 100% up to date.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -28,7 +31,7 @@ public static void RunFrame()
|
|||||||
static readonly InputHandle_t[] queryArray = new InputHandle_t[STEAM_CONTROLLER_MAX_COUNT];
|
static readonly InputHandle_t[] queryArray = new InputHandle_t[STEAM_CONTROLLER_MAX_COUNT];
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a list of connected controllers.
|
/// Gets a list of connected controllers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IEnumerable<Controller> Controllers
|
public static IEnumerable<Controller> Controllers
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Undocumented Parental Settings
|
/// Class for utilizing the Steam Inventory API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SteamInventory : SteamSharedClass<SteamInventory>
|
public class SteamInventory : SteamSharedClass<SteamInventory>
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ static void LoadDefinitions()
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Call this if you're going to want to access definition information. You should be able to get
|
/// Call this if you're going to want to access definition information. You should be able to get
|
||||||
/// away with calling this once at the start if your game, assuming your items don't change all the time.
|
/// away with calling this once at the start if your game, assuming your items don't change all the time.
|
||||||
/// This will trigger OnDefinitionsUpdated at which point Definitions should be set.
|
/// This will trigger <see cref="OnDefinitionsUpdated"/> at which point Definitions should be set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void LoadItemDefinitions()
|
public static void LoadItemDefinitions()
|
||||||
{
|
{
|
||||||
@ -83,7 +83,7 @@ public static void LoadItemDefinitions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Will call LoadItemDefinitions and wait until Definitions is not null
|
/// Will call <see cref="LoadItemDefinitions"/> and wait until Definitions is not null
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<bool> WaitForDefinitions( float timeoutSeconds = 30 )
|
public static async Task<bool> WaitForDefinitions( float timeoutSeconds = 30 )
|
||||||
{
|
{
|
||||||
@ -300,7 +300,7 @@ public static bool GetAllItems()
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grant all promotional items the user is eligible for
|
/// Grant all promotional items the user is eligible for.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<InventoryResult?> GrantPromoItemsAsync()
|
public static async Task<InventoryResult?> GrantPromoItemsAsync()
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Functions for clients to access matchmaking services, favorites, and to operate on game lobbies
|
/// Methods for clients to access matchmaking services, favorites, and to operate on game lobbies
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SteamMatchmaking : SteamClientClass<SteamMatchmaking>
|
public class SteamMatchmaking : SteamClientClass<SteamMatchmaking>
|
||||||
{
|
{
|
||||||
@ -83,69 +83,69 @@ static private unsafe void OnLobbyChatMessageRecievedAPI( LobbyChatMsg_t callbac
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Someone invited you to a lobby
|
/// Invoked when the current user is invited to a lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Friend, Lobby> OnLobbyInvite;
|
public static event Action<Friend, Lobby> OnLobbyInvite;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// You joined a lobby
|
/// Invoked when the current user joins a lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby> OnLobbyEntered;
|
public static event Action<Lobby> OnLobbyEntered;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// You created a lobby
|
/// Invoked when the current user creates a lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Result, Lobby> OnLobbyCreated;
|
public static event Action<Result, Lobby> OnLobbyCreated;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A game server has been associated with the lobby
|
/// Invoked when a game server has been associated with a lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, uint, ushort, SteamId> OnLobbyGameCreated;
|
public static event Action<Lobby, uint, ushort, SteamId> OnLobbyGameCreated;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lobby metadata has changed
|
/// Invoked when a lobby's metadata is modified.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby> OnLobbyDataChanged;
|
public static event Action<Lobby> OnLobbyDataChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lobby member metadata has changed
|
/// Invoked when a member in a lobby's metadata is modified.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, Friend> OnLobbyMemberDataChanged;
|
public static event Action<Lobby, Friend> OnLobbyMemberDataChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lobby member joined
|
/// Invoked when a member joins a lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, Friend> OnLobbyMemberJoined;
|
public static event Action<Lobby, Friend> OnLobbyMemberJoined;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lobby member left the room
|
/// Invoked when a lobby member leaves the lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, Friend> OnLobbyMemberLeave;
|
public static event Action<Lobby, Friend> OnLobbyMemberLeave;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lobby member left the room
|
/// Invoked when a lobby member leaves the lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, Friend> OnLobbyMemberDisconnected;
|
public static event Action<Lobby, Friend> OnLobbyMemberDisconnected;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lobby member was kicked. The 3rd param is the user that kicked them.
|
/// Invoked when a lobby member is kicked from a lobby. The 3rd param is the user that kicked them.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, Friend, Friend> OnLobbyMemberKicked;
|
public static event Action<Lobby, Friend, Friend> OnLobbyMemberKicked;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The lobby member was banned. The 3rd param is the user that banned them.
|
/// Invoked when a lobby member is kicked from a lobby. The 3rd param is the user that kicked them.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, Friend, Friend> OnLobbyMemberBanned;
|
public static event Action<Lobby, Friend, Friend> OnLobbyMemberBanned;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A chat message was recieved from a member of a lobby
|
/// Invoked when a chat message is received from a member of the lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Lobby, Friend, string> OnChatMessage;
|
public static event Action<Lobby, Friend, string> OnChatMessage;
|
||||||
|
|
||||||
public static LobbyQuery LobbyList => new LobbyQuery();
|
public static LobbyQuery LobbyList => new LobbyQuery();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new invisible lobby. Call lobby.SetPublic to take it online.
|
/// Creates a new invisible lobby. Call <see cref="Lobby.SetPublic"/> to take it online.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<Lobby?> CreateLobbyAsync( int maxMembers = 100 )
|
public static async Task<Lobby?> CreateLobbyAsync( int maxMembers = 100 )
|
||||||
{
|
{
|
||||||
@ -156,7 +156,7 @@ static private unsafe void OnLobbyChatMessageRecievedAPI( LobbyChatMsg_t callbac
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to directly join the specified lobby
|
/// Attempts to directly join the specified lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<Lobby?> JoinLobbyAsync( SteamId lobbyId )
|
public static async Task<Lobby?> JoinLobbyAsync( SteamId lobbyId )
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ static private unsafe void OnLobbyChatMessageRecievedAPI( LobbyChatMsg_t callbac
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a list of servers that are on your favorites list
|
/// Get a list of servers that are on the current user's favorites list.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IEnumerable<ServerInfo> GetFavoriteServers()
|
public static IEnumerable<ServerInfo> GetFavoriteServers()
|
||||||
{
|
{
|
||||||
@ -191,7 +191,7 @@ public static IEnumerable<ServerInfo> GetFavoriteServers()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a list of servers that you have added to your play history
|
/// Get a list of servers that the current user has added to their history.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IEnumerable<ServerInfo> GetHistoryServers()
|
public static IEnumerable<ServerInfo> GetHistoryServers()
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Functions for clients to access matchmaking services, favorites, and to operate on game lobbies
|
/// Methods for clients to access matchmaking services, favorites, and to operate on game lobbies
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class SteamMatchmakingServers : SteamClientClass<SteamMatchmakingServers>
|
internal class SteamMatchmakingServers : SteamClientClass<SteamMatchmakingServers>
|
||||||
{
|
{
|
||||||
|
@ -31,22 +31,22 @@ internal static void InstallEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Playback status changed
|
/// Invoked when playback status is changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnPlaybackChanged;
|
public static event Action OnPlaybackChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Volume changed, parameter is new volume
|
/// Invoked when the volume of the music player is changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<float> OnVolumeChanged;
|
public static event Action<float> OnVolumeChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if Steam Music is enabled
|
/// Checks if Steam Music is enabled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsEnabled => Internal.BIsEnabled();
|
public static bool IsEnabled => Internal.BIsEnabled();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// true if a song is currently playing, paused, or queued up to play; otherwise false.
|
/// <see langword="true"/> if a song is currently playing, paused, or queued up to play; otherwise <see langword="false"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsPlaying => Internal.BIsPlaying();
|
public static bool IsPlaying => Internal.BIsPlaying();
|
||||||
|
|
||||||
@ -55,23 +55,28 @@ internal static void InstallEvents()
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static MusicStatus Status => Internal.GetPlaybackStatus();
|
public static MusicStatus Status => Internal.GetPlaybackStatus();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Plays the music player.
|
||||||
|
/// </summary>
|
||||||
public static void Play() => Internal.Play();
|
public static void Play() => Internal.Play();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Pauses the music player.
|
||||||
|
/// </summary>
|
||||||
public static void Pause() => Internal.Pause();
|
public static void Pause() => Internal.Pause();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Have the Steam Music player play the previous song.
|
/// Forces the music player to play the previous song.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void PlayPrevious() => Internal.PlayPrevious();
|
public static void PlayPrevious() => Internal.PlayPrevious();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Have the Steam Music player skip to the next song
|
/// Forces the music player to skip to the next song.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void PlayNext() => Internal.PlayNext();
|
public static void PlayNext() => Internal.PlayNext();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets/Sets the current volume of the Steam Music player
|
/// Gets and sets the current volume of the Steam Music player
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static float Volume
|
public static float Volume
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for utilizing the Steam Network API.
|
||||||
|
/// </summary>
|
||||||
public class SteamNetworking : SteamSharedClass<SteamNetworking>
|
public class SteamNetworking : SteamSharedClass<SteamNetworking>
|
||||||
{
|
{
|
||||||
internal static ISteamNetworking Internal => Interface as ISteamNetworking;
|
internal static ISteamNetworking Internal => Interface as ISteamNetworking;
|
||||||
@ -26,20 +29,20 @@ internal static void InstallEvents( bool server )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This SteamId wants to send you a message. You should respond by calling AcceptP2PSessionWithUser
|
/// Invoked when a <see cref="SteamId"/> wants to send the current user a message. You should respond by calling <see cref="AcceptP2PSessionWithUser(SteamId)"/>
|
||||||
/// if you want to recieve their messages
|
/// if you want to recieve their messages.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Action<SteamId> OnP2PSessionRequest;
|
public static Action<SteamId> OnP2PSessionRequest;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when packets can't get through to the specified user.
|
/// Invoked when packets can't get through to the specified user.
|
||||||
/// All queued packets unsent at this point will be dropped, further attempts
|
/// All queued packets unsent at this point will be dropped, further attempts
|
||||||
/// to send will retry making the connection (but will be dropped if we fail again).
|
/// to send will retry making the connection (but will be dropped if we fail again).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Action<SteamId, P2PSessionError> OnP2PConnectionFailed;
|
public static Action<SteamId, P2PSessionError> OnP2PConnectionFailed;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This should be called in response to a OnP2PSessionRequest
|
/// This should be called in response to a <see cref="OnP2PSessionRequest"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool AcceptP2PSessionWithUser( SteamId user ) => Internal.AcceptP2PSessionWithUser( user );
|
public static bool AcceptP2PSessionWithUser( SteamId user ) => Internal.AcceptP2PSessionWithUser( user );
|
||||||
|
|
||||||
@ -53,7 +56,7 @@ internal static void InstallEvents( bool server )
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// This should be called when you're done communicating with a user, as this will
|
/// This should be called when you're done communicating with a user, as this will
|
||||||
/// free up all of the resources allocated for the connection under-the-hood.
|
/// free up all of the resources allocated for the connection under-the-hood.
|
||||||
/// If the remote user tries to send data to you again, a new OnP2PSessionRequest
|
/// If the remote user tries to send data to you again, a new <see cref="OnP2PSessionRequest"/>
|
||||||
/// callback will be posted
|
/// callback will be posted
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool CloseP2PSessionWithUser( SteamId user ) => Internal.CloseP2PSessionWithUser( user );
|
public static bool CloseP2PSessionWithUser( SteamId user ) => Internal.CloseP2PSessionWithUser( user );
|
||||||
@ -77,7 +80,7 @@ public static bool IsP2PPacketAvailable( out uint msgSize, int channel = 0 )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads in a packet that has been sent from another user via SendP2PPacket..
|
/// Reads in a packet that has been sent from another user via <c>SendP2PPacket</c>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe static P2Packet? ReadP2PPacket( int channel = 0 )
|
public unsafe static P2Packet? ReadP2PPacket( int channel = 0 )
|
||||||
{
|
{
|
||||||
@ -106,7 +109,7 @@ public static bool IsP2PPacketAvailable( out uint msgSize, int channel = 0 )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads in a packet that has been sent from another user via SendP2PPacket..
|
/// Reads in a packet that has been sent from another user via <c>SendP2PPacket</c>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe static bool ReadP2PPacket( byte[] buffer, ref uint size, ref SteamId steamid, int channel = 0 )
|
public unsafe static bool ReadP2PPacket( byte[] buffer, ref uint size, ref SteamId steamid, int channel = 0 )
|
||||||
{
|
{
|
||||||
@ -116,7 +119,7 @@ public unsafe static bool ReadP2PPacket( byte[] buffer, ref uint size, ref Steam
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads in a packet that has been sent from another user via SendP2PPacket..
|
/// Reads in a packet that has been sent from another user via <c>SendP2PPacket</c>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe static bool ReadP2PPacket( byte* buffer, uint cbuf, ref uint size, ref SteamId steamid, int channel = 0 )
|
public unsafe static bool ReadP2PPacket( byte* buffer, uint cbuf, ref uint size, ref SteamId steamid, int channel = 0 )
|
||||||
{
|
{
|
||||||
|
@ -114,7 +114,7 @@ private static void ConnectionStatusChanged( SteamNetConnectionStatusChangedCall
|
|||||||
/// Creates a "server" socket that listens for clients to connect to by calling
|
/// Creates a "server" socket that listens for clients to connect to by calling
|
||||||
/// Connect, over ordinary UDP (IPv4 or IPv6)
|
/// Connect, over ordinary UDP (IPv4 or IPv6)
|
||||||
///
|
///
|
||||||
/// To use this derive a class from SocketManager and override as much as you want.
|
/// To use this derive a class from <see cref="SocketManager"/> and override as much as you want.
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static T CreateNormalSocket<T>( NetAddress address ) where T : SocketManager, new()
|
public static T CreateNormalSocket<T>( NetAddress address ) where T : SocketManager, new()
|
||||||
@ -132,7 +132,7 @@ private static void ConnectionStatusChanged( SteamNetConnectionStatusChangedCall
|
|||||||
/// Creates a "server" socket that listens for clients to connect to by calling
|
/// Creates a "server" socket that listens for clients to connect to by calling
|
||||||
/// Connect, over ordinary UDP (IPv4 or IPv6).
|
/// Connect, over ordinary UDP (IPv4 or IPv6).
|
||||||
///
|
///
|
||||||
/// To use this you should pass a class that inherits ISocketManager. You can use
|
/// To use this you should pass a class that inherits <see cref="ISocketManager"/>. You can use
|
||||||
/// SocketManager to get connections and send messages, but the ISocketManager class
|
/// SocketManager to get connections and send messages, but the ISocketManager class
|
||||||
/// will received all the appropriate callbacks.
|
/// will received all the appropriate callbacks.
|
||||||
///
|
///
|
||||||
@ -155,7 +155,7 @@ public static SocketManager CreateNormalSocket( NetAddress address, ISocketManag
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Connect to a socket created via <method>CreateListenSocketIP</method>
|
/// Connect to a socket created via <c>CreateListenSocketIP</c>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static T ConnectNormal<T>( NetAddress address ) where T : ConnectionManager, new()
|
public static T ConnectNormal<T>( NetAddress address ) where T : ConnectionManager, new()
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ public static SocketManager CreateNormalSocket( NetAddress address, ISocketManag
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Connect to a socket created via <method>CreateListenSocketIP</method>
|
/// Connect to a socket created via <c>CreateListenSocketIP</c>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ConnectionManager ConnectNormal( NetAddress address, IConnectionManager iface )
|
public static ConnectionManager ConnectNormal( NetAddress address, IConnectionManager iface )
|
||||||
{
|
{
|
||||||
@ -185,9 +185,9 @@ public static ConnectionManager ConnectNormal( NetAddress address, IConnectionMa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a server that will be relayed via Valve's network (hiding the IP and improving ping)
|
/// Creates a server that will be relayed via Valve's network (hiding the IP and improving ping).
|
||||||
///
|
///
|
||||||
/// To use this derive a class from SocketManager and override as much as you want.
|
/// To use this derive a class from <see cref="SocketManager"/> and override as much as you want.
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static T CreateRelaySocket<T>( int virtualport = 0 ) where T : SocketManager, new()
|
public static T CreateRelaySocket<T>( int virtualport = 0 ) where T : SocketManager, new()
|
||||||
@ -201,10 +201,10 @@ public static ConnectionManager ConnectNormal( NetAddress address, IConnectionMa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a server that will be relayed via Valve's network (hiding the IP and improving ping)
|
/// Creates a server that will be relayed via Valve's network (hiding the IP and improving ping).
|
||||||
///
|
///
|
||||||
/// To use this you should pass a class that inherits ISocketManager. You can use
|
/// To use this you should pass a class that inherits <see cref="ISocketManager"/>. You can use
|
||||||
/// SocketManager to get connections and send messages, but the ISocketManager class
|
/// <see cref="SocketManager"/> to get connections and send messages, but the <see cref="ISocketManager"/> class
|
||||||
/// will received all the appropriate callbacks.
|
/// will received all the appropriate callbacks.
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -226,7 +226,7 @@ public static SocketManager CreateRelaySocket( int virtualport, ISocketManager i
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Connect to a relay server
|
/// Connect to a relay server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static T ConnectRelay<T>( SteamId serverId, int virtualport = 0 ) where T : ConnectionManager, new()
|
public static T ConnectRelay<T>( SteamId serverId, int virtualport = 0 ) where T : ConnectionManager, new()
|
||||||
{
|
{
|
||||||
@ -239,7 +239,7 @@ public static SocketManager CreateRelaySocket( int virtualport, ISocketManager i
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Connect to a relay server
|
/// Connect to a relay server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ConnectionManager ConnectRelay( SteamId serverId, int virtualport, IConnectionManager iface )
|
public static ConnectionManager ConnectRelay( SteamId serverId, int virtualport, IConnectionManager iface )
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Undocumented Parental Settings
|
/// Provides Steam Networking utilities.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SteamNetworkingUtils : SteamSharedClass<SteamNetworkingUtils>
|
public class SteamNetworkingUtils : SteamSharedClass<SteamNetworkingUtils>
|
||||||
{
|
{
|
||||||
@ -30,7 +30,7 @@ static void InstallCallbacks( bool server )
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A function to receive debug network information on. This will do nothing
|
/// A function to receive debug network information on. This will do nothing
|
||||||
/// unless you set DebugLevel to something other than None.
|
/// unless you set <see cref="DebugLevel"/> to something other than <see cref="NetDebugOutput.None"/>.
|
||||||
///
|
///
|
||||||
/// You should set this to an appropriate level instead of setting it to the highest
|
/// You should set this to an appropriate level instead of setting it to the highest
|
||||||
/// and then filtering it by hand because a lot of energy is used by creating the strings
|
/// and then filtering it by hand because a lot of energy is used by creating the strings
|
||||||
@ -50,21 +50,24 @@ static void InstallCallbacks( bool server )
|
|||||||
/// relay network. If you do not call this, the initialization will
|
/// relay network. If you do not call this, the initialization will
|
||||||
/// be delayed until the first time you use a feature that requires access
|
/// be delayed until the first time you use a feature that requires access
|
||||||
/// to the relay network, which will delay that first access.
|
/// to the relay network, which will delay that first access.
|
||||||
///
|
/// <para>
|
||||||
/// You can also call this to force a retry if the previous attempt has failed.
|
/// You can also call this to force a retry if the previous attempt has failed.
|
||||||
/// Performing any action that requires access to the relay network will also
|
/// Performing any action that requires access to the relay network will also
|
||||||
/// trigger a retry, and so calling this function is never strictly necessary,
|
/// trigger a retry, and so calling this function is never strictly necessary,
|
||||||
/// but it can be useful to call it a program launch time, if access to the
|
/// but it can be useful to call it a program launch time, if access to the
|
||||||
/// relay network is anticipated.
|
/// relay network is anticipated.
|
||||||
///
|
/// </para>
|
||||||
|
/// <para>
|
||||||
/// Use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t
|
/// Use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t
|
||||||
/// callbacks to know when initialization has completed.
|
/// callbacks to know when initialization has completed.
|
||||||
/// Typically initialization completes in a few seconds.
|
/// Typically initialization completes in a few seconds.
|
||||||
///
|
/// </para>
|
||||||
|
/// <para>
|
||||||
/// Note: dedicated servers hosted in known data centers do *not* need
|
/// Note: dedicated servers hosted in known data centers do *not* need
|
||||||
/// to call this, since they do not make routing decisions. However, if
|
/// to call this, since they do not make routing decisions. However, if
|
||||||
/// the dedicated server will be using P2P functionality, it will act as
|
/// the dedicated server will be using P2P functionality, it will act as
|
||||||
/// a "client" and this should be called.
|
/// a "client" and this should be called.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void InitRelayNetworkAccess()
|
public static void InitRelayNetworkAccess()
|
||||||
{
|
{
|
||||||
@ -105,7 +108,7 @@ public static int EstimatePingTo( NetPingLocation target )
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If you need ping information straight away, wait on this. It will return
|
/// If you need ping information straight away, wait on this. It will return
|
||||||
/// immediately if you already have up to date ping data
|
/// immediately if you already have up to date ping data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task WaitForPingDataAsync( float maxAgeInSeconds = 60 * 5 )
|
public static async Task WaitForPingDataAsync( float maxAgeInSeconds = 60 * 5 )
|
||||||
{
|
{
|
||||||
@ -124,7 +127,7 @@ public static async Task WaitForPingDataAsync( float maxAgeInSeconds = 60 * 5 )
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [0 - 100] - Randomly discard N pct of packets
|
/// [0 - 100] - Randomly discard N pct of packets.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static float FakeSendPacketLoss
|
public static float FakeSendPacketLoss
|
||||||
{
|
{
|
||||||
@ -133,7 +136,7 @@ public static float FakeSendPacketLoss
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [0 - 100] - Randomly discard N pct of packets
|
/// [0 - 100] - Randomly discard N pct of packets.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static float FakeRecvPacketLoss
|
public static float FakeRecvPacketLoss
|
||||||
{
|
{
|
||||||
@ -142,7 +145,7 @@ public static float FakeRecvPacketLoss
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delay all packets by N ms
|
/// Delay all packets by N ms.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static float FakeSendPacketLag
|
public static float FakeSendPacketLag
|
||||||
{
|
{
|
||||||
@ -151,7 +154,7 @@ public static float FakeSendPacketLag
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delay all packets by N ms
|
/// Delay all packets by N ms.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static float FakeRecvPacketLag
|
public static float FakeRecvPacketLag
|
||||||
{
|
{
|
||||||
@ -160,7 +163,7 @@ public static float FakeRecvPacketLag
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Timeout value (in ms) to use when first connecting
|
/// Timeout value (in ms) to use when first connecting.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int ConnectionTimeout
|
public static int ConnectionTimeout
|
||||||
{
|
{
|
||||||
@ -169,7 +172,7 @@ public static int ConnectionTimeout
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Timeout value (in ms) to use after connection is established
|
/// Timeout value (in ms) to use after connection is established.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int Timeout
|
public static int Timeout
|
||||||
{
|
{
|
||||||
@ -180,7 +183,7 @@ public static int Timeout
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Upper limit of buffered pending bytes to be sent.
|
/// Upper limit of buffered pending bytes to be sent.
|
||||||
/// If this is reached SendMessage will return LimitExceeded.
|
/// If this is reached SendMessage will return LimitExceeded.
|
||||||
/// Default is 524288 bytes (512k)
|
/// Default is 524288 bytes (512k).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int SendBufferSize
|
public static int SendBufferSize
|
||||||
{
|
{
|
||||||
@ -194,9 +197,10 @@ public static int SendBufferSize
|
|||||||
/// we don't know our identity or can't get a cert. On the server, it means that
|
/// we don't know our identity or can't get a cert. On the server, it means that
|
||||||
/// we won't automatically reject a connection due to a failure to authenticate.
|
/// we won't automatically reject a connection due to a failure to authenticate.
|
||||||
/// (You can examine the incoming connection and decide whether to accept it.)
|
/// (You can examine the incoming connection and decide whether to accept it.)
|
||||||
///
|
/// <para>
|
||||||
/// This is a dev configuration value, and you should not let users modify it in
|
/// This is a dev configuration value, and you should not let users modify it in
|
||||||
/// production.
|
/// production.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int AllowWithoutAuth
|
public static int AllowWithoutAuth
|
||||||
{
|
{
|
||||||
@ -210,10 +214,11 @@ public static int AllowWithoutAuth
|
|||||||
/// 1: Allowed, but prefer encrypted
|
/// 1: Allowed, but prefer encrypted
|
||||||
/// 2: Allowed, and preferred
|
/// 2: Allowed, and preferred
|
||||||
/// 3: Required. (Fail the connection if the peer requires encryption.)
|
/// 3: Required. (Fail the connection if the peer requires encryption.)
|
||||||
///
|
/// <para>
|
||||||
/// This is a dev configuration value, since its purpose is to disable encryption.
|
/// This is a dev configuration value, since its purpose is to disable encryption.
|
||||||
/// You should not let users modify it in production. (But note that it requires
|
/// You should not let users modify it in production. (But note that it requires
|
||||||
/// the peer to also modify their value in order for encryption to be disabled.)
|
/// the peer to also modify their value in order for encryption to be disabled.)
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int Unencrypted
|
public static int Unencrypted
|
||||||
{
|
{
|
||||||
@ -222,15 +227,17 @@ public static int Unencrypted
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Debug Information via OnDebugOutput event
|
/// Get Debug Information via <see cref="OnDebugOutput"/> event.
|
||||||
///
|
/// <para>
|
||||||
/// Except when debugging, you should only use NetDebugOutput.Msg
|
/// Except when debugging, you should only use <see cref="NetDebugOutput.Msg"/>
|
||||||
/// or NetDebugOutput.Warning. For best performance, do NOT
|
/// or <see cref="NetDebugOutput.Warning"/>. For best performance, do NOT
|
||||||
/// request a high detail level and then filter out messages in the callback.
|
/// request a high detail level and then filter out messages in the callback.
|
||||||
///
|
/// </para>
|
||||||
|
/// <para>
|
||||||
/// This incurs all of the expense of formatting the messages, which are then discarded.
|
/// This incurs all of the expense of formatting the messages, which are then discarded.
|
||||||
/// Setting a high priority value (low numeric value) here allows the library to avoid
|
/// Setting a high priority value (low numeric value) here allows the library to avoid
|
||||||
/// doing this work.
|
/// doing this work.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static NetDebugOutput DebugLevel
|
public static NetDebugOutput DebugLevel
|
||||||
{
|
{
|
||||||
@ -245,12 +252,12 @@ public static NetDebugOutput DebugLevel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// So we can remember and provide a Get for DebugLEvel
|
/// So we can remember and provide a Get for DebugLevel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static NetDebugOutput _debugLevel;
|
private static NetDebugOutput _debugLevel;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// We need to keep the delegate around until it's not used anymore
|
/// We need to keep the delegate around until it's not used anymore.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static NetDebugFunc _debugFunc;
|
static NetDebugFunc _debugFunc;
|
||||||
|
|
||||||
|
@ -30,18 +30,23 @@ internal void InstallEvents( bool server )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The list of possible Party beacon locations has changed
|
/// Invoked when the list of possible Party beacon locations has changed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnBeaconLocationsUpdated;
|
public static event Action OnBeaconLocationsUpdated;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The list of active beacons may have changed
|
/// Invoked when the list of active beacons may have changed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnActiveBeaconsUpdated;
|
public static event Action OnActiveBeaconsUpdated;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the amount of beacons that are active.
|
||||||
|
/// </summary>
|
||||||
public static int ActiveBeaconCount => (int) Internal.GetNumActiveBeacons();
|
public static int ActiveBeaconCount => (int) Internal.GetNumActiveBeacons();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets an <see cref="IEnumerable{T}"/> of active beacons.
|
||||||
|
/// </summary>
|
||||||
public static IEnumerable<PartyBeacon> ActiveBeacons
|
public static IEnumerable<PartyBeacon> ActiveBeacons
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -28,30 +28,30 @@ internal void InstallEvents( bool server )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a session is connected
|
/// Invoked when a session is connected.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<RemotePlaySession> OnSessionConnected;
|
public static event Action<RemotePlaySession> OnSessionConnected;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a session becomes disconnected
|
/// Invoked when a session becomes disconnected.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<RemotePlaySession> OnSessionDisconnected;
|
public static event Action<RemotePlaySession> OnSessionDisconnected;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the number of currently connected Steam Remote Play sessions
|
/// Gets the number of currently connected Steam Remote Play sessions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int SessionCount => (int) Internal.GetSessionCount();
|
public static int SessionCount => (int) Internal.GetSessionCount();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the currently connected Steam Remote Play session ID at the specified index.
|
/// Get the currently connected Steam Remote Play session ID at the specified index.
|
||||||
/// IsValid will return false if it's out of bounds
|
/// IsValid will return <see langword="false"/> if it's out of bounds
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static RemotePlaySession GetSession( int index ) => (RemotePlaySession) Internal.GetSessionID( index ).Value;
|
public static RemotePlaySession GetSession( int index ) => (RemotePlaySession) Internal.GetSessionID( index ).Value;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invite a friend to Remote Play Together
|
/// Invite a friend to Remote Play Together.
|
||||||
/// This returns false if the invite can't be sent
|
/// This returns <see langword="false"/> if the invite can't be sent
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool SendInvite( SteamId steamid ) => Internal.BSendRemotePlayTogetherInvite( steamid );
|
public static bool SendInvite( SteamId steamid ) => Internal.BSendRemotePlayTogetherInvite( steamid );
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Undocumented Parental Settings
|
/// Class for utilizing the Steam Remote Storage API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SteamRemoteStorage : SteamClientClass<SteamRemoteStorage>
|
public class SteamRemoteStorage : SteamClientClass<SteamRemoteStorage>
|
||||||
{
|
{
|
||||||
@ -24,6 +24,9 @@ internal override void InitializeInterface( bool server )
|
|||||||
/// Creates a new file, writes the bytes to the file, and then closes the file.
|
/// Creates a new file, writes the bytes to the file, and then closes the file.
|
||||||
/// If the target file already exists, it is overwritten
|
/// If the target file already exists, it is overwritten
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="filename">The path of the file.</param>
|
||||||
|
/// <param name="data">The bytes of data.</param>
|
||||||
|
/// <returns>A boolean, detailing whether or not the operation was successful.</returns>
|
||||||
public unsafe static bool FileWrite( string filename, byte[] data )
|
public unsafe static bool FileWrite( string filename, byte[] data )
|
||||||
{
|
{
|
||||||
fixed ( byte* ptr = data )
|
fixed ( byte* ptr = data )
|
||||||
@ -35,6 +38,7 @@ public unsafe static bool FileWrite( string filename, byte[] data )
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
|
/// Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="filename">The path of the file.</param>
|
||||||
public unsafe static byte[] FileRead( string filename )
|
public unsafe static byte[] FileRead( string filename )
|
||||||
{
|
{
|
||||||
var size = FileSize( filename );
|
var size = FileSize( filename );
|
||||||
@ -51,26 +55,35 @@ public unsafe static byte[] FileRead( string filename )
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether the specified file exists.
|
/// Checks whether the specified file exists.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="filename">The path of the file.</param>
|
||||||
|
/// <returns>Whether or not the file exists.</returns>
|
||||||
public static bool FileExists( string filename ) => Internal.FileExists( filename );
|
public static bool FileExists( string filename ) => Internal.FileExists( filename );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if a specific file is persisted in the steam cloud.
|
/// Checks if a specific file is persisted in the steam cloud.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="filename">The path of the file.</param>
|
||||||
|
/// <returns>Boolean.</returns>
|
||||||
public static bool FilePersisted( string filename ) => Internal.FilePersisted( filename );
|
public static bool FilePersisted( string filename ) => Internal.FilePersisted( filename );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the specified file's last modified date/time.
|
/// Gets the specified file's last modified date/time.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="filename">The path of the file.</param>
|
||||||
|
/// <returns>A <see cref="DateTime"/> describing when the file was modified last.</returns>
|
||||||
public static DateTime FileTime( string filename ) => Epoch.ToDateTime( Internal.GetFileTimestamp( filename ) );
|
public static DateTime FileTime( string filename ) => Epoch.ToDateTime( Internal.GetFileTimestamp( filename ) );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the specified files size in bytes. 0 if not exists.
|
/// Returns the specified files size in bytes, or <c>0</c> if the file does not exist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="filename">The path of the file.</param>
|
||||||
|
/// <returns>The size of the file in bytes, or <c>0</c> if the file doesn't exist.</returns>
|
||||||
public static int FileSize( string filename ) => Internal.GetFileSize( filename );
|
public static int FileSize( string filename ) => Internal.GetFileSize( filename );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API.
|
/// Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <returns>A boolean, detailing whether or not the operation was successful.</returns>
|
||||||
public static bool FileForget( string filename ) => Internal.FileForget( filename );
|
public static bool FileForget( string filename ) => Internal.FileForget( filename );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -80,7 +93,7 @@ public unsafe static byte[] FileRead( string filename )
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of bytes total
|
/// Gets the total number of quota bytes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ulong QuotaBytes
|
public static ulong QuotaBytes
|
||||||
{
|
{
|
||||||
@ -93,7 +106,7 @@ public static ulong QuotaBytes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of bytes used
|
/// Gets the total number of quota bytes that have been used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ulong QuotaUsedBytes
|
public static ulong QuotaUsedBytes
|
||||||
{
|
{
|
||||||
@ -106,7 +119,7 @@ public static ulong QuotaUsedBytes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of bytes remaining until your quota is used
|
/// Number of bytes remaining until the quota is used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ulong QuotaRemainingBytes
|
public static ulong QuotaRemainingBytes
|
||||||
{
|
{
|
||||||
@ -119,7 +132,7 @@ public static ulong QuotaRemainingBytes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns true if IsCloudEnabledForAccount AND IsCloudEnabledForApp
|
/// returns <see langword="true"/> if <see cref="IsCloudEnabledForAccount"/> AND <see cref="IsCloudEnabledForApp"/> are <see langword="true"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsCloudEnabled => IsCloudEnabledForAccount && IsCloudEnabledForApp;
|
public static bool IsCloudEnabled => IsCloudEnabledForAccount && IsCloudEnabledForApp;
|
||||||
|
|
||||||
@ -149,7 +162,7 @@ public static bool IsCloudEnabledForApp
|
|||||||
public static int FileCount => Internal.GetFileCount();
|
public static int FileCount => Internal.GetFileCount();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a list of filenames synchronized by Steam Cloud
|
/// Gets a list of filenames synchronized by Steam Cloud.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IEnumerable<string> Files
|
public static IEnumerable<string> Files
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Undocumented Parental Settings
|
/// Class for utilizing the Steam Screenshots API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SteamScreenshots : SteamClientClass<SteamScreenshots>
|
public class SteamScreenshots : SteamClientClass<SteamScreenshots>
|
||||||
{
|
{
|
||||||
@ -33,19 +33,19 @@ internal static void InstallEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A screenshot has been requested by the user from the Steam screenshot hotkey.
|
/// Invoked when a screenshot has been requested by the user from the Steam screenshot hotkey.
|
||||||
/// This will only be called if Hooked is true, in which case Steam
|
/// This will only be called if <see cref="Hooked"/> is true, in which case Steam
|
||||||
/// will not take the screenshot itself.
|
/// will not take the screenshot itself.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnScreenshotRequested;
|
public static event Action OnScreenshotRequested;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A screenshot successfully written or otherwise added to the library and can now be tagged.
|
/// Invoked when a screenshot has been successfully written or otherwise added to the library and can now be tagged.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Screenshot> OnScreenshotReady;
|
public static event Action<Screenshot> OnScreenshotReady;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A screenshot attempt failed
|
/// Invoked when a screenshot attempt failed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Result> OnScreenshotFailed;
|
public static event Action<Result> OnScreenshotFailed;
|
||||||
|
|
||||||
@ -81,15 +81,17 @@ internal static void InstallEvents()
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Causes the Steam overlay to take a screenshot.
|
/// Causes the Steam overlay to take a screenshot.
|
||||||
/// If screenshots are being hooked by the game then a
|
/// If screenshots are being hooked by the game then a
|
||||||
/// ScreenshotRequested callback is sent back to the game instead.
|
/// <see cref="OnScreenshotRequested"/> callback is sent back to the game instead.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void TriggerScreenshot() => Internal.TriggerScreenshot();
|
public static void TriggerScreenshot() => Internal.TriggerScreenshot();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them.
|
/// Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them.
|
||||||
|
/// <para>
|
||||||
/// Hooking is disabled by default, and only ever enabled if you do so with this function.
|
/// Hooking is disabled by default, and only ever enabled if you do so with this function.
|
||||||
/// If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or
|
/// If the hooking is enabled, then the <see cref="OnScreenshotRequested"/> callback will be sent if the user presses the hotkey or
|
||||||
/// when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response.
|
/// when TriggerScreenshot is called, and then the game is expected to call <see cref="WriteScreenshot(byte[], int, int)"/> or <see cref="AddScreenshot(string, string, int, int)"/> in response.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool Hooked
|
public static bool Hooked
|
||||||
{
|
{
|
||||||
|
@ -32,35 +32,35 @@ internal static void InstallEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// User has been authed or rejected
|
/// Invoked when aser has been authed or rejected
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<SteamId, SteamId, AuthResponse> OnValidateAuthTicketResponse;
|
public static event Action<SteamId, SteamId, AuthResponse> OnValidateAuthTicketResponse;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a connections to the Steam back-end has been established.
|
/// Invoked when a connection to the Steam back-end has been established.
|
||||||
/// This means the server now is logged on and has a working connection to the Steam master server.
|
/// This means the server now is logged on and has a working connection to the Steam master server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnSteamServersConnected;
|
public static event Action OnSteamServersConnected;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This will occur periodically if the Steam client is not connected, and has failed when retrying to establish a connection (result, stilltrying)
|
/// This will occur periodically if the Steam client is not connected, and has failed when retrying to establish a connection (result, stilltrying).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Result, bool> OnSteamServerConnectFailure;
|
public static event Action<Result, bool> OnSteamServerConnectFailure;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disconnected from Steam
|
/// Invoked when the server is disconnected from Steam
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Result> OnSteamServersDisconnected;
|
public static event Action<Result> OnSteamServersDisconnected;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when authentication status changes, useful for grabbing SteamId once aavailability is current
|
/// Invoked when authentication status changes, useful for grabbing <see cref="SteamId"/> once availability is current.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<SteamNetworkingAvailability> OnSteamNetAuthenticationStatus;
|
public static event Action<SteamNetworkingAvailability> OnSteamNetAuthenticationStatus;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialize the steam server.
|
/// Initialize the steam server.
|
||||||
/// If asyncCallbacks is false you need to call RunCallbacks manually every frame.
|
/// If <paramref name="asyncCallbacks"/> is <see langword="false"/> you need to call <see cref="RunCallbacks"/> manually every frame.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Init( AppId appid, SteamServerInit init, bool asyncCallbacks = true )
|
public static void Init( AppId appid, SteamServerInit init, bool asyncCallbacks = true )
|
||||||
{
|
{
|
||||||
@ -207,7 +207,7 @@ public static string MapName
|
|||||||
private static string _mapname;
|
private static string _mapname;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the current ModDir
|
/// Gets or sets the current ModDir.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ModDir
|
public static string ModDir
|
||||||
{
|
{
|
||||||
@ -217,7 +217,7 @@ public static string ModDir
|
|||||||
private static string _modDir = "";
|
private static string _modDir = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current product
|
/// Gets the current product.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Product
|
public static string Product
|
||||||
{
|
{
|
||||||
@ -227,7 +227,7 @@ public static string Product
|
|||||||
private static string _product = "";
|
private static string _product = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the current Product
|
/// Gets or sets the current Product.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string GameDescription
|
public static string GameDescription
|
||||||
{
|
{
|
||||||
@ -237,7 +237,7 @@ public static string GameDescription
|
|||||||
private static string _gameDescription = "";
|
private static string _gameDescription = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the current ServerName
|
/// Gets or sets the current ServerName.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ServerName
|
public static string ServerName
|
||||||
{
|
{
|
||||||
@ -247,7 +247,7 @@ public static string ServerName
|
|||||||
private static string _serverName = "";
|
private static string _serverName = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set whether the server should report itself as passworded
|
/// Set whether the server should report itself as passworded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool Passworded
|
public static bool Passworded
|
||||||
{
|
{
|
||||||
@ -272,6 +272,9 @@ public static string GameTags
|
|||||||
}
|
}
|
||||||
private static string _gametags = "";
|
private static string _gametags = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the SteamId of the server.
|
||||||
|
/// </summary>
|
||||||
public static SteamId SteamId => Internal.GetSteamID();
|
public static SteamId SteamId => Internal.GetSteamID();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -284,7 +287,7 @@ public static void LogOnAnonymous()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Log onto Steam anonymously.
|
/// Log off of Steam.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void LogOff()
|
public static void LogOff()
|
||||||
{
|
{
|
||||||
@ -293,14 +296,14 @@ public static void LogOff()
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns true if the server is connected and registered with the Steam master server
|
/// Returns true if the server is connected and registered with the Steam master server
|
||||||
/// You should have called LogOnAnonymous etc on startup.
|
/// You should have called <see cref="LogOnAnonymous"/> etc on startup.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool LoggedOn => Internal.BLoggedOn();
|
public static bool LoggedOn => Internal.BLoggedOn();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// To the best of its ability this tries to get the server's
|
/// To the best of its ability this tries to get the server's
|
||||||
/// current public ip address. Be aware that this is likely to return
|
/// current public IP address. Be aware that this is likely to return
|
||||||
/// null for the first few seconds after initialization.
|
/// <see langword="null"/> for the first few seconds after initialization.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static System.Net.IPAddress PublicIp => Internal.GetPublicIP();
|
public static System.Net.IPAddress PublicIp => Internal.GetPublicIP();
|
||||||
|
|
||||||
@ -369,7 +372,7 @@ public static void SetKey( string Key, string Value )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove all key values
|
/// Remove all key values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void ClearKeys()
|
public static void ClearKeys()
|
||||||
{
|
{
|
||||||
@ -449,7 +452,7 @@ public static unsafe void HandleIncomingPacket( IntPtr ptr, int size, uint addre
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Does the user own this app (which could be DLC)
|
/// Does the user own this app (which could be DLC).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamid, AppId appid )
|
public static UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamid, AppId appid )
|
||||||
{
|
{
|
||||||
|
@ -18,10 +18,12 @@ internal override void InitializeInterface( bool server )
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Downloads stats for the user
|
/// Downloads stats for the user.
|
||||||
/// If the user has no stats will return fail
|
/// If the user has no stats, this will return <see cref="Result.Fail"/>.
|
||||||
/// these stats will only be auto-updated for clients playing on the server
|
/// These stats will only be auto-updated for clients playing on the server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="steamid">The SteamId of the user to get stats for.</param>
|
||||||
|
/// <returns>A task describing the progress and result of the download.</returns>
|
||||||
public static async Task<Result> RequestUserStatsAsync( SteamId steamid )
|
public static async Task<Result> RequestUserStatsAsync( SteamId steamid )
|
||||||
{
|
{
|
||||||
var r = await Internal.RequestUserStats( steamid );
|
var r = await Internal.RequestUserStats( steamid );
|
||||||
@ -33,6 +35,9 @@ public static async Task<Result> RequestUserStatsAsync( SteamId steamid )
|
|||||||
/// Set the named stat for this user. Setting stats should follow the rules
|
/// Set the named stat for this user. Setting stats should follow the rules
|
||||||
/// you defined in Steamworks.
|
/// you defined in Steamworks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="steamid">The SteamId of the user to set stats for.</param>
|
||||||
|
/// <param name="name">The name of the stat.</param>
|
||||||
|
/// <param name="stat">The value of the stat.</param>
|
||||||
public static bool SetInt( SteamId steamid, string name, int stat )
|
public static bool SetInt( SteamId steamid, string name, int stat )
|
||||||
{
|
{
|
||||||
return Internal.SetUserStat( steamid, name, stat );
|
return Internal.SetUserStat( steamid, name, stat );
|
||||||
@ -42,6 +47,9 @@ public static bool SetInt( SteamId steamid, string name, int stat )
|
|||||||
/// Set the named stat for this user. Setting stats should follow the rules
|
/// Set the named stat for this user. Setting stats should follow the rules
|
||||||
/// you defined in Steamworks.
|
/// you defined in Steamworks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="steamid">The SteamId of the user to set stats for.</param>
|
||||||
|
/// <param name="name">The name of the stat.</param>
|
||||||
|
/// <param name="stat">The value of the stat.</param>
|
||||||
public static bool SetFloat( SteamId steamid, string name, float stat )
|
public static bool SetFloat( SteamId steamid, string name, float stat )
|
||||||
{
|
{
|
||||||
return Internal.SetUserStat( steamid, name, stat );
|
return Internal.SetUserStat( steamid, name, stat );
|
||||||
@ -49,9 +57,12 @@ public static bool SetFloat( SteamId steamid, string name, float stat )
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the named stat for this user. If getting the stat failed, will return
|
/// Get the named stat for this user. If getting the stat failed, will return
|
||||||
/// defaultValue. You should have called Refresh for this userid - which downloads
|
/// <paramref name="defaultValue"/>. You should have called <see cref="RequestUserStatsAsync(SteamId)"/> for this SteamID - which downloads
|
||||||
/// the stats from the backend. If you didn't call it this will always return defaultValue.
|
/// the stats from the backend. If you didn't call it this will always return <paramref name="defaultValue"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="steamid">The SteamId of the user to get stats for.</param>
|
||||||
|
/// <param name="name">The name of the stat.</param>
|
||||||
|
/// <param name="defaultValue">The value to return if the stats cannot be received.</param>
|
||||||
public static int GetInt( SteamId steamid, string name, int defaultValue = 0 )
|
public static int GetInt( SteamId steamid, string name, int defaultValue = 0 )
|
||||||
{
|
{
|
||||||
int data = defaultValue;
|
int data = defaultValue;
|
||||||
@ -67,6 +78,9 @@ public static int GetInt( SteamId steamid, string name, int defaultValue = 0 )
|
|||||||
/// defaultValue. You should have called Refresh for this userid - which downloads
|
/// defaultValue. You should have called Refresh for this userid - which downloads
|
||||||
/// the stats from the backend. If you didn't call it this will always return defaultValue.
|
/// the stats from the backend. If you didn't call it this will always return defaultValue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="steamid">The SteamId of the user to get stats for.</param>
|
||||||
|
/// <param name="name">The name of the stat.</param>
|
||||||
|
/// <param name="defaultValue">The value to return if the stats cannot be received.</param>
|
||||||
public static float GetFloat( SteamId steamid, string name, float defaultValue = 0 )
|
public static float GetFloat( SteamId steamid, string name, float defaultValue = 0 )
|
||||||
{
|
{
|
||||||
float data = defaultValue;
|
float data = defaultValue;
|
||||||
@ -78,25 +92,29 @@ public static float GetFloat( SteamId steamid, string name, float defaultValue =
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unlocks the specified achievement for the specified user. Must have called Refresh on a steamid first.
|
/// Unlocks the specified achievement for the specified user. Must have called <see cref="RequestUserStatsAsync(SteamId)"/> on a SteamID first.
|
||||||
/// Remember to use Commit after use.
|
/// Remember to use <see cref="StoreUserStats(SteamId)"/> after use.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="steamid">The SteamId of the user to unlock the achievement for.</param>
|
||||||
|
/// <param name="name">The ID of the achievement.</param>
|
||||||
public static bool SetAchievement( SteamId steamid, string name )
|
public static bool SetAchievement( SteamId steamid, string name )
|
||||||
{
|
{
|
||||||
return Internal.SetUserAchievement( steamid, name );
|
return Internal.SetUserAchievement( steamid, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first.
|
/// Resets the unlock status of an achievement for the specified user. Must have called <see cref="RequestUserStatsAsync(SteamId)"/> on a SteamID first.
|
||||||
/// Remember to use Commit after use.
|
/// Remember to use <see cref="StoreUserStats(SteamId)"/> after use.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="steamid">The SteamId of the user to clear the achievement for.</param>
|
||||||
|
/// <param name="name">The ID of the achievement.</param>
|
||||||
public static bool ClearAchievement( SteamId steamid, string name )
|
public static bool ClearAchievement( SteamId steamid, string name )
|
||||||
{
|
{
|
||||||
return Internal.ClearUserAchievement( steamid, name );
|
return Internal.ClearUserAchievement( steamid, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if available, exists and unlocked
|
/// Return <see langword="true"/> if available, exists and unlocked
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool GetAchievement( SteamId steamid, string name )
|
public static bool GetAchievement( SteamId steamid, string name )
|
||||||
{
|
{
|
||||||
@ -110,9 +128,11 @@ public static bool GetAchievement( SteamId steamid, string name )
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Once you've set a stat change on a user you need to commit your changes.
|
/// Once you've set a stat change on a user you need to commit your changes.
|
||||||
/// You can do that using this function. The callback will let you know if
|
/// You can do that using this method. The callback will let you know if
|
||||||
/// your action succeeded, but most of the time you can fire and forget.
|
/// your action succeeded, but most of the time you can fire and forget.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="steamid">The SteamId of the user to store stats for.</param>
|
||||||
|
/// <returns>A task describing the progress and result of the commit.</returns>
|
||||||
public static async Task<Result> StoreUserStats( SteamId steamid )
|
public static async Task<Result> StoreUserStats( SteamId steamid )
|
||||||
{
|
{
|
||||||
var r = await Internal.StoreUserStats( steamid );
|
var r = await Internal.StoreUserStats( steamid );
|
||||||
|
@ -32,12 +32,12 @@ internal static void InstallEvents( bool server )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Posted after Download call
|
/// Invoked after an item is downloaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Result> OnDownloadItemResult;
|
public static event Action<Result> OnDownloadItemResult;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Posted when new item is subscribed
|
/// Invoked when a new item is subscribed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<AppId, PublishedFileId> OnItemSubscribed;
|
public static event Action<AppId, PublishedFileId> OnItemSubscribed;
|
||||||
public static event Action<AppId, PublishedFileId> OnItemUnsubscribed;
|
public static event Action<AppId, PublishedFileId> OnItemUnsubscribed;
|
||||||
@ -50,24 +50,24 @@ public static async Task<bool> DeleteFileAsync( PublishedFileId fileId )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start downloading this item. You'll get notified of completion via OnDownloadItemResult.
|
/// Start downloading this item. You'll get notified of completion via <see cref="OnDownloadItemResult"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fileId">The ID of the file you want to download</param>
|
/// <param name="fileId">The ID of the file to download.</param>
|
||||||
/// <param name="highPriority">If true this should go straight to the top of the download list</param>
|
/// <param name="highPriority">If <see langword="true"/> this should go straight to the top of the download list.</param>
|
||||||
/// <returns>true if nothing went wrong and the download is started</returns>
|
/// <returns><see langword="true"/> if nothing went wrong and the download is started.</returns>
|
||||||
public static bool Download( PublishedFileId fileId, bool highPriority = false )
|
public static bool Download( PublishedFileId fileId, bool highPriority = false )
|
||||||
{
|
{
|
||||||
return Internal.DownloadItem( fileId, highPriority );
|
return Internal.DownloadItem( fileId, highPriority );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Will attempt to download this item asyncronously - allowing you to instantly react to its installation
|
/// Will attempt to download this item asyncronously - allowing you to instantly react to its installation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fileId">The ID of the file you want to download</param>
|
/// <param name="fileId">The ID of the file you download.</param>
|
||||||
/// <param name="progress">An optional callback</param>
|
/// <param name="progress">An optional callback</param>
|
||||||
/// <param name="ct">Allows you to send a message to cancel the download anywhere during the process</param>
|
/// <param name="ct">Allows to send a message to cancel the download anywhere during the process.</param>
|
||||||
/// <param name="milisecondsUpdateDelay">How often to call the progress function</param>
|
/// <param name="milisecondsUpdateDelay">How often to call the progress function.</param>
|
||||||
/// <returns>true if downloaded and installed correctly</returns>
|
/// <returns><see langword="true"/> if downloaded and installed properly.</returns>
|
||||||
public static async Task<bool> DownloadAsync( PublishedFileId fileId, Action<float> progress = null, int milisecondsUpdateDelay = 60, CancellationToken ct = default )
|
public static async Task<bool> DownloadAsync( PublishedFileId fileId, Action<float> progress = null, int milisecondsUpdateDelay = 60, CancellationToken ct = default )
|
||||||
{
|
{
|
||||||
var item = new Steamworks.Ugc.Item( fileId );
|
var item = new Steamworks.Ugc.Item( fileId );
|
||||||
@ -135,7 +135,7 @@ public static bool Download( PublishedFileId fileId, bool highPriority = false )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Utility function to fetch a single item. Internally this uses Ugc.FileQuery -
|
/// Utility function to fetch a single item. Internally this uses <c>Ugc.FileQuery</c> -
|
||||||
/// which you can use to query multiple items if you need to.
|
/// which you can use to query multiple items if you need to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<Ugc.Item?> QueryFileAsync( PublishedFileId fileId )
|
public static async Task<Ugc.Item?> QueryFileAsync( PublishedFileId fileId )
|
||||||
@ -179,12 +179,12 @@ public static async Task<bool> StopPlaytimeTrackingForAllItems()
|
|||||||
public static void SuspendDownloads() => Internal.SuspendDownloads(true);
|
public static void SuspendDownloads() => Internal.SuspendDownloads(true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resumes all workshop downloads
|
/// Resumes all workshop downloads.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void ResumeDownloads() => Internal.SuspendDownloads(false);
|
public static void ResumeDownloads() => Internal.SuspendDownloads(false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show the app's latest Workshop EULA to the user in an overlay window, where they can accept it or not
|
/// Show the app's latest Workshop EULA to the user in an overlay window, where they can accept it or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool ShowWorkshopEula()
|
public static bool ShowWorkshopEula()
|
||||||
{
|
{
|
||||||
@ -192,7 +192,7 @@ public static bool ShowWorkshopEula()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve information related to the user's acceptance or not of the app's specific Workshop EULA
|
/// Retrieve information related to the user's acceptance or not of the app's specific Workshop EULA.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<bool?> GetWorkshopEulaStatus()
|
public static async Task<bool?> GetWorkshopEulaStatus()
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ internal static void InstallEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a connections to the Steam back-end has been established.
|
/// Invoked when a connections to the Steam back-end has been established.
|
||||||
/// This means the Steam client now has a working connection to the Steam servers.
|
/// This means the Steam client now has a working connection to the Steam servers.
|
||||||
/// Usually this will have occurred before the game has launched, and should only be seen if the
|
/// Usually this will have occurred before the game has launched, and should only be seen if the
|
||||||
/// user has dropped connection due to a networking issue or a Steam server update.
|
/// user has dropped connection due to a networking issue or a Steam server update.
|
||||||
@ -51,14 +51,14 @@ internal static void InstallEvents()
|
|||||||
public static event Action OnSteamServersConnected;
|
public static event Action OnSteamServersConnected;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a connection attempt has failed.
|
/// Invoked when a connection attempt has failed.
|
||||||
/// This will occur periodically if the Steam client is not connected,
|
/// This will occur periodically if the Steam client is not connected,
|
||||||
/// and has failed when retrying to establish a connection.
|
/// and has failed when retrying to establish a connection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnSteamServerConnectFailure;
|
public static event Action OnSteamServerConnectFailure;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called if the client has lost connection to the Steam servers.
|
/// Invoked when the client has lost connection to the Steam servers.
|
||||||
/// Real-time services will be disabled until a matching OnSteamServersConnected has been posted.
|
/// Real-time services will be disabled until a matching OnSteamServersConnected has been posted.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnSteamServersDisconnected;
|
public static event Action OnSteamServersDisconnected;
|
||||||
@ -72,25 +72,25 @@ internal static void InstallEvents()
|
|||||||
public static event Action OnClientGameServerDeny;
|
public static event Action OnClientGameServerDeny;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called whenever the users licenses (owned packages) changes.
|
/// Invoked whenever the users licenses (owned packages) changes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnLicensesUpdated;
|
public static event Action OnLicensesUpdated;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when an auth ticket has been validated.
|
/// Invoked when an auth ticket has been validated.
|
||||||
/// The first parameter is the steamid of this user
|
/// The first parameter is the <see cref="SteamId"/> of this user
|
||||||
/// The second is the Steam ID that owns the game, this will be different from the first
|
/// The second is the <see cref="SteamId"/> that owns the game, which will be different from the first
|
||||||
/// if the game is being borrowed via Steam Family Sharing
|
/// if the game is being borrowed via Steam Family Sharing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<SteamId, SteamId, AuthResponse> OnValidateAuthTicketResponse;
|
public static event Action<SteamId, SteamId, AuthResponse> OnValidateAuthTicketResponse;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used internally for GetAuthSessionTicketAsync
|
/// Used internally for <see cref="GetAuthSessionTicketAsync(double)"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static event Action<GetAuthSessionTicketResponse_t> OnGetAuthSessionTicketResponse;
|
internal static event Action<GetAuthSessionTicketResponse_t> OnGetAuthSessionTicketResponse;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a user has responded to a microtransaction authorization request.
|
/// Invoked when a user has responded to a microtransaction authorization request.
|
||||||
/// ( appid, orderid, user authorized )
|
/// ( appid, orderid, user authorized )
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<AppId, ulong, bool> OnMicroTxnAuthorizationResponse;
|
public static event Action<AppId, ulong, bool> OnMicroTxnAuthorizationResponse;
|
||||||
@ -110,9 +110,6 @@ internal static void InstallEvents()
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<DurationControl> OnDurationControl;
|
public static event Action<DurationControl> OnDurationControl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static bool _recordingVoice;
|
static bool _recordingVoice;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -120,7 +117,6 @@ internal static void InstallEvents()
|
|||||||
/// Once started, use GetAvailableVoice and GetVoice to get the data, and then call StopVoiceRecording
|
/// Once started, use GetAvailableVoice and GetVoice to get the data, and then call StopVoiceRecording
|
||||||
/// when the user has released their push-to-talk hotkey or the game session has completed.
|
/// when the user has released their push-to-talk hotkey or the game session has completed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public static bool VoiceRecord
|
public static bool VoiceRecord
|
||||||
{
|
{
|
||||||
get => _recordingVoice;
|
get => _recordingVoice;
|
||||||
@ -134,7 +130,7 @@ public static bool VoiceRecord
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns true if we have voice data waiting to be read
|
/// Returns true if we have voice data waiting to be read.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool HasVoiceData
|
public static bool HasVoiceData
|
||||||
{
|
{
|
||||||
@ -304,7 +300,7 @@ public static unsafe int DecompressVoice( IntPtr from, int length, IntPtr to, in
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you.
|
/// Retrieve an authentication ticket to be sent to the entity who wishes to authenticate you.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static unsafe AuthTicket GetAuthSessionTicket()
|
public static unsafe AuthTicket GetAuthSessionTicket()
|
||||||
{
|
{
|
||||||
@ -329,7 +325,7 @@ public static unsafe AuthTicket GetAuthSessionTicket()
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you.
|
/// Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you.
|
||||||
/// This waits for a positive response from the backend before returning the ticket. This means
|
/// This waits for a positive response from the backend before returning the ticket. This means
|
||||||
/// the ticket is definitely ready to go as soon as it returns. Will return null if the callback
|
/// the ticket is definitely ready to go as soon as it returns. Will return <see langword="null"/> if the callback
|
||||||
/// times out or returns negatively.
|
/// times out or returns negatively.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<AuthTicket> GetAuthSessionTicketAsync( double timeoutSeconds = 10.0f )
|
public static async Task<AuthTicket> GetAuthSessionTicketAsync( double timeoutSeconds = 10.0f )
|
||||||
|
@ -38,25 +38,25 @@ internal static void InstallEvents()
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// called when the achivement icon is loaded
|
/// Invoked when an achivement icon is loaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static event Action<string, int> OnAchievementIconFetched;
|
internal static event Action<string, int> OnAchievementIconFetched;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// called when the latests stats and achievements have been received
|
/// Invoked when the latests stats and achievements have been received
|
||||||
/// from the server
|
/// from the server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<SteamId, Result> OnUserStatsReceived;
|
public static event Action<SteamId, Result> OnUserStatsReceived;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// result of a request to store the user stats for a game
|
/// Result of a request to store the user stats for a game.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Result> OnUserStatsStored;
|
public static event Action<Result> OnUserStatsStored;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// result of a request to store the achievements for a game, or an
|
/// Result of a request to store the achievements for a game, or an
|
||||||
/// "indicate progress" call. If both m_nCurProgress and m_nMaxProgress
|
/// "indicate progress" call. If both m_nCurProgress and m_nMaxProgress
|
||||||
/// are zero, that means the achievement has been fully unlocked
|
/// are zero, that means the achievement has been fully unlocked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<Achievement, int, int> OnAchievementProgress;
|
public static event Action<Achievement, int, int> OnAchievementProgress;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ internal static void InstallEvents()
|
|||||||
public static event Action<SteamId> OnUserStatsUnloaded;
|
public static event Action<SteamId> OnUserStatsUnloaded;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the available achievements
|
/// Get all available achievements.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IEnumerable<Achievement> Achievements
|
public static IEnumerable<Achievement> Achievements
|
||||||
{
|
{
|
||||||
@ -99,7 +99,7 @@ public static bool IndicateAchievementProgress( string achName, int curProg, int
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tries to get the number of players currently playing this game.
|
/// Tries to get the number of players currently playing this game.
|
||||||
/// Or -1 if failed.
|
/// Or <c>-1</c> if failed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<int> PlayerCountAsync()
|
public static async Task<int> PlayerCountAsync()
|
||||||
{
|
{
|
||||||
@ -139,11 +139,11 @@ public static bool RequestCurrentStats()
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Asynchronously fetches global stats data, which is available for stats marked as
|
/// Asynchronously fetches global stats data, which is available for stats marked as
|
||||||
/// "aggregated" in the App Admin panel of the Steamworks website.
|
/// "aggregated" in the App Admin panel of the Steamworks website.
|
||||||
/// You must have called RequestCurrentStats and it needs to return successfully via
|
/// You must have called <see cref="RequestCurrentStats"/> and it needs to return successfully via
|
||||||
/// its callback prior to calling this.
|
/// its callback prior to calling this.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The limit is 60.</param>
|
/// <param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The limit is <c>60</c>.</param>
|
||||||
/// <returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the remote call failed</returns>
|
/// <returns><see cref="Result.OK"/> indicates success, <see cref="Result.InvalidState"/> means you need to call <see cref="RequestCurrentStats"/> first, <see cref="Result.Fail"/> means the remote call failed</returns>
|
||||||
public static async Task<Result> RequestGlobalStatsAsync( int days )
|
public static async Task<Result> RequestGlobalStatsAsync( int days )
|
||||||
{
|
{
|
||||||
var result = await SteamUserStats.Internal.RequestGlobalStats( days );
|
var result = await SteamUserStats.Internal.RequestGlobalStats( days );
|
||||||
@ -206,8 +206,7 @@ public static bool AddStat( string name, float amount = 1.0f )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set a stat value. This will automatically call StoreStats() after a successful call
|
/// Set a stat value. This will automatically call <see cref="StoreStats"/> after a successful call.
|
||||||
/// unless you pass false as the last argument.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool SetStat( string name, int value )
|
public static bool SetStat( string name, int value )
|
||||||
{
|
{
|
||||||
@ -215,8 +214,7 @@ public static bool SetStat( string name, int value )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set a stat value. This will automatically call StoreStats() after a successful call
|
/// Set a stat value. This will automatically call <see cref="StoreStats"/> after a successful call.
|
||||||
/// unless you pass false as the last argument.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool SetStat( string name, float value )
|
public static bool SetStat( string name, float value )
|
||||||
{
|
{
|
||||||
@ -224,7 +222,7 @@ public static bool SetStat( string name, float value )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a Int stat value
|
/// Get an <see langword="int"/> stat value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int GetStatInt( string name )
|
public static int GetStatInt( string name )
|
||||||
{
|
{
|
||||||
@ -234,7 +232,7 @@ public static int GetStatInt( string name )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a float stat value
|
/// Get a <see langword="float"/> stat value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static float GetStatFloat( string name )
|
public static float GetStatFloat( string name )
|
||||||
{
|
{
|
||||||
@ -244,7 +242,7 @@ public static float GetStatFloat( string name )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Practically wipes the slate clean for this user. If includeAchievements is true, will wipe
|
/// Practically wipes the slate clean for this user. If <paramref name="includeAchievements"/> is <see langword="true"/>, will also wipe
|
||||||
/// any achievements too.
|
/// any achievements too.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -36,33 +36,33 @@ private static void SteamClosed()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The country of the user changed
|
/// Invoked when the country of the user changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnIpCountryChanged;
|
public static event Action OnIpCountryChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute
|
/// Invoked when running on a laptop and less than 10 minutes of battery is left, fires then every minute.
|
||||||
/// The parameter is the number of minutes left
|
/// The parameter is the number of minutes left.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<int> OnLowBatteryPower;
|
public static event Action<int> OnLowBatteryPower;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when Steam wants to shutdown
|
/// Invoked when Steam wants to shutdown.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action OnSteamShutdown;
|
public static event Action OnSteamShutdown;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if cancelled etc.
|
/// Invoked when Big Picture gamepad text input has been closed. Parameter is <see langword="true"/> if text was submitted, <see langword="false"/> if cancelled etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static event Action<bool> OnGamepadTextInputDismissed;
|
public static event Action<bool> OnGamepadTextInputDismissed;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the number of seconds since the application was active
|
/// Returns the number of seconds since the application was active.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static uint SecondsSinceAppActive => Internal.GetSecondsSinceAppActive();
|
public static uint SecondsSinceAppActive => Internal.GetSecondsSinceAppActive();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the number of seconds since the user last moved the mouse etc
|
/// Returns the number of seconds since the user last moved the mouse and/or provided other input.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static uint SecondsSinceComputerActive => Internal.GetSecondsSinceComputerActive();
|
public static uint SecondsSinceComputerActive => Internal.GetSecondsSinceComputerActive();
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ private static void SteamClosed()
|
|||||||
public static Universe ConnectedUniverse => Internal.GetConnectedUniverse();
|
public static Universe ConnectedUniverse => Internal.GetConnectedUniverse();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time)
|
/// Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static DateTime SteamServerTime => Epoch.ToDateTime( Internal.GetServerRealTime() );
|
public static DateTime SteamServerTime => Epoch.ToDateTime( Internal.GetServerRealTime() );
|
||||||
|
|
||||||
@ -81,9 +81,9 @@ private static void SteamClosed()
|
|||||||
public static string IpCountry => Internal.GetIPCountry();
|
public static string IpCountry => Internal.GetIPCountry();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns true if the image exists, and the buffer was successfully filled out
|
/// Returns true if the image exists, and the buffer was successfully filled out.
|
||||||
/// results are returned in RGBA format
|
/// Results are returned in RGBA format.
|
||||||
/// the destination buffer size should be 4 * height * width * sizeof(char)
|
/// The destination buffer size should be 4 * height * width * sizeof(char).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool GetImageSize( int image, out uint width, out uint height )
|
public static bool GetImageSize( int image, out uint width, out uint height )
|
||||||
{
|
{
|
||||||
@ -93,7 +93,7 @@ public static bool GetImageSize( int image, out uint width, out uint height )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns the image in RGBA format
|
/// returns the image in RGBA format.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Data.Image? GetImage( int image )
|
public static Data.Image? GetImage( int image )
|
||||||
{
|
{
|
||||||
@ -118,12 +118,12 @@ public static bool GetImageSize( int image, out uint width, out uint height )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns true if we're using a battery (ie, a laptop not plugged in)
|
/// Returns true if we're using a battery (ie, a laptop not plugged in).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool UsingBatteryPower => Internal.GetCurrentBatteryPower() != 255;
|
public static bool UsingBatteryPower => Internal.GetCurrentBatteryPower() != 255;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns battery power [0-1]
|
/// Returns battery power [0-1].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static float CurrentBatteryPower => Math.Min( Internal.GetCurrentBatteryPower() / 100, 1.0f );
|
public static float CurrentBatteryPower => Math.Min( Internal.GetCurrentBatteryPower() / 100, 1.0f );
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ public static async Task<CheckFileSignature> CheckFileSignatureAsync( string fil
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Activates the Big Picture text input dialog which only supports gamepad input
|
/// Activates the Big Picture text input dialog which only supports gamepad input.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool ShowGamepadTextInput( GamepadTextInputMode inputMode, GamepadTextInputLineMode lineInputMode, string description, int maxChars, string existingText = "" )
|
public static bool ShowGamepadTextInput( GamepadTextInputMode inputMode, GamepadTextInputLineMode lineInputMode, string description, int maxChars, string existingText = "" )
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ public static bool ShowGamepadTextInput( GamepadTextInputMode inputMode, Gamepad
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns previously entered text
|
/// Returns previously entered text.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string GetEnteredGamepadText()
|
public static string GetEnteredGamepadText()
|
||||||
{
|
{
|
||||||
@ -202,18 +202,18 @@ public static string GetEnteredGamepadText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns the language the steam client is running in, you probably want
|
/// Returns the language the steam client is running in. You probably want
|
||||||
/// Apps.CurrentGameLanguage instead, this is for very special usage cases
|
/// <see cref="SteamApps.GameLanguage"/> instead, this is for very special usage cases.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string SteamUILanguage => Internal.GetSteamUILanguage();
|
public static string SteamUILanguage => Internal.GetSteamUILanguage();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns true if Steam itself is running in VR mode
|
/// Returns <see langword="true"/> if Steam itself is running in VR mode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsSteamRunningInVR => Internal.IsSteamRunningInVR();
|
public static bool IsSteamRunningInVR => Internal.IsSteamRunningInVR();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition
|
/// Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void SetOverlayNotificationInset( int x, int y )
|
public static void SetOverlayNotificationInset( int x, int y )
|
||||||
{
|
{
|
||||||
@ -221,24 +221,26 @@ public static void SetOverlayNotificationInset( int x, int y )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns true if Steam and the Steam Overlay are running in Big Picture mode
|
/// returns <see langword="true"/> if Steam and the Steam Overlay are running in Big Picture mode
|
||||||
/// Games much be launched through the Steam client to enable the Big Picture overlay. During development,
|
/// Games much be launched through the Steam client to enable the Big Picture overlay. During development,
|
||||||
/// a game can be added as a non-steam game to the developers library to test this feature
|
/// a game can be added as a non-steam game to the developers library to test this feature.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsSteamInBigPictureMode => Internal.IsSteamInBigPictureMode();
|
public static bool IsSteamInBigPictureMode => Internal.IsSteamInBigPictureMode();
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ask SteamUI to create and render its OpenVR dashboard
|
/// Ask Steam UI to create and render its OpenVR dashboard.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void StartVRDashboard() => Internal.StartVRDashboard();
|
public static void StartVRDashboard() => Internal.StartVRDashboard();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set whether the HMD content will be streamed via Steam In-Home Streaming
|
/// Gets or sets whether the HMD content will be streamed via Steam In-Home Streaming.
|
||||||
/// If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed.
|
/// <para>
|
||||||
/// If this is set to false, then the application window will be streamed instead, and remote input will be allowed.
|
/// If this is set to <see langword="true"/>, then the scene in the HMD headset will be streamed, and remote input will not be allowed.
|
||||||
/// The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
|
/// If this is set to <see langword="false"/>, then the application window will be streamed instead, and remote input will be allowed.
|
||||||
/// (this is useful for games that have asymmetric multiplayer gameplay)
|
/// The default is <see langword="true"/> unless "VRHeadsetStreaming" "0" is in the extended app info for a game
|
||||||
|
/// (this is useful for games that have asymmetric multiplayer gameplay).
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool VrHeadsetStreaming
|
public static bool VrHeadsetStreaming
|
||||||
{
|
{
|
||||||
@ -258,13 +260,13 @@ internal static bool IsCallComplete( SteamAPICall_t call, out bool failed )
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns whether this steam client is a Steam China specific client, vs the global client
|
/// Gets whether this steam client is a Steam China specific client (<see langword="true"/>), or the global client (<see langword="false"/>).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsSteamChinaLauncher => Internal.IsSteamChinaLauncher();
|
public static bool IsSteamChinaLauncher => Internal.IsSteamChinaLauncher();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes text filtering, loading dictionaries for the language the game is running in.
|
/// Initializes text filtering, loading dictionaries for the language the game is running in.
|
||||||
/// Users can customize the text filter behavior in their Steam Account preferences
|
/// Users can customize the text filter behavior in their Steam Account preferences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool InitFilterText() => Internal.InitFilterText( 0 );
|
public static bool InitFilterText() => Internal.InitFilterText( 0 );
|
||||||
|
|
||||||
@ -279,13 +281,13 @@ public static string FilterText( TextFilteringContext context, SteamId sourceSte
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns true if Steam itself is running on the Steam Deck
|
/// Gets whether or not Steam itself is running on the Steam Deck.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsRunningOnSteamDeck => Internal.IsSteamRunningOnSteamDeck();
|
public static bool IsRunningOnSteamDeck => Internal.IsSteamRunningOnSteamDeck();
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// In game launchers that don't have controller support you can call this to have
|
/// In game launchers that don't have controller support: You can call this to have
|
||||||
/// Steam Input translate the controller input into mouse/kb to navigate the launcher
|
/// Steam Input translate the controller input into mouse/kb to navigate the launcher
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void SetGameLauncherMode( bool mode ) => Internal.SetGameLauncherMode( mode );
|
public static void SetGameLauncherMode( bool mode ) => Internal.SetGameLauncherMode( mode );
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Undocumented Parental Settings
|
/// Class for utilizing the Steam Video API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SteamVideo : SteamClientClass<SteamVideo>
|
public class SteamVideo : SteamClientClass<SteamVideo>
|
||||||
{
|
{
|
||||||
@ -25,7 +25,7 @@ internal static void InstallEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if currently using Steam's live broadcasting
|
/// Return <see langword="true"/> if currently using Steam's live broadcasting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsBroadcasting
|
public static bool IsBroadcasting
|
||||||
{
|
{
|
||||||
@ -37,7 +37,7 @@ public static bool IsBroadcasting
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If we're broadcasting, will return the number of live viewers
|
/// Returns the number of viewers that are watching the stream, or <c>0</c> if <see cref="IsBroadcasting"/> is <see langword="false"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int NumViewers
|
public static int NumViewers
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
namespace Steamworks.Data
|
namespace Steamworks.Data
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a Steam Achievement.
|
||||||
|
/// </summary>
|
||||||
public struct Achievement
|
public struct Achievement
|
||||||
{
|
{
|
||||||
internal string Value;
|
internal string Value;
|
||||||
@ -18,7 +21,7 @@ public Achievement( string name )
|
|||||||
public override string ToString() => Value;
|
public override string ToString() => Value;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// True if unlocked
|
/// Gets whether or not the achievement has been unlocked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool State
|
public bool State
|
||||||
{
|
{
|
||||||
@ -30,15 +33,24 @@ public bool State
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the identifier of the achievement. This is the "API Name" on Steamworks.
|
||||||
|
/// </summary>
|
||||||
public string Identifier => Value;
|
public string Identifier => Value;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the display name of the achievement.
|
||||||
|
/// </summary>
|
||||||
public string Name => SteamUserStats.Internal.GetAchievementDisplayAttribute( Value, "name" );
|
public string Name => SteamUserStats.Internal.GetAchievementDisplayAttribute( Value, "name" );
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the description of the achievement.
|
||||||
|
/// </summary>
|
||||||
public string Description => SteamUserStats.Internal.GetAchievementDisplayAttribute( Value, "desc" );
|
public string Description => SteamUserStats.Internal.GetAchievementDisplayAttribute( Value, "desc" );
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Should hold the unlock time if State is true
|
/// If <see cref="State"/> is <see langword="true"/>, this value represents the time that the achievement was unlocked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? UnlockTime
|
public DateTime? UnlockTime
|
||||||
{
|
{
|
||||||
@ -56,7 +68,7 @@ public DateTime? UnlockTime
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the icon of the achievement. This can return a null image even though the image exists if the image
|
/// Gets the icon of the achievement. This can return a null image even though the image exists if the image
|
||||||
/// hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be downloaded.
|
/// hasn't been downloaded by Steam yet. You should use <see cref="GetIconAsync(int)"/> if you want to wait for the image to be downloaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Image? GetIcon()
|
public Image? GetIcon()
|
||||||
{
|
{
|
||||||
@ -65,8 +77,9 @@ public DateTime? UnlockTime
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the icon of the achievement, waits for it to load if we have to
|
/// Gets the icon of the achievement, yielding until the icon is received or the <paramref name="timeout"/> is reached.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="timeout">The timeout in milliseconds before the request will be canceled. Defaults to <c>5000</c>.</param>
|
||||||
public async Task<Image?> GetIconAsync( int timeout = 5000 )
|
public async Task<Image?> GetIconAsync( int timeout = 5000 )
|
||||||
{
|
{
|
||||||
var i = SteamUserStats.Internal.GetAchievementIcon( Value );
|
var i = SteamUserStats.Internal.GetAchievementIcon( Value );
|
||||||
@ -107,7 +120,7 @@ void f( string x, int icon )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data available.
|
/// Gets a decimal (0-1) representing the global amount of users who have unlocked the specified achievement, or -1 if no data available.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float GlobalUnlocked
|
public float GlobalUnlocked
|
||||||
{
|
{
|
||||||
@ -123,7 +136,7 @@ public float GlobalUnlocked
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make this achievement earned
|
/// Unlock this achievement.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Trigger( bool apply = true )
|
public bool Trigger( bool apply = true )
|
||||||
{
|
{
|
||||||
@ -138,7 +151,7 @@ public bool Trigger( bool apply = true )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reset this achievement to not achieved
|
/// Reset this achievement to be locked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Clear()
|
public bool Clear()
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the ID of a Steam application.
|
||||||
|
/// </summary>
|
||||||
public struct AppId
|
public struct AppId
|
||||||
{
|
{
|
||||||
public uint Value;
|
public uint Value;
|
||||||
|
@ -6,10 +6,24 @@
|
|||||||
|
|
||||||
namespace Steamworks.Data
|
namespace Steamworks.Data
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides information about a DLC.
|
||||||
|
/// </summary>
|
||||||
public struct DlcInformation
|
public struct DlcInformation
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The <see cref="Steamworks.AppId"/> of the DLC.
|
||||||
|
/// </summary>
|
||||||
public AppId AppId { get; internal set; }
|
public AppId AppId { get; internal set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the DLC.
|
||||||
|
/// </summary>
|
||||||
public string Name { get; internal set; }
|
public string Name { get; internal set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether or not the DLC is available.
|
||||||
|
/// </summary>
|
||||||
public bool Available { get; internal set; }
|
public bool Available { get; internal set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,10 +6,29 @@
|
|||||||
|
|
||||||
namespace Steamworks.Data
|
namespace Steamworks.Data
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents download progress.
|
||||||
|
/// </summary>
|
||||||
public struct DownloadProgress
|
public struct DownloadProgress
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Whether or not the download is currently active.
|
||||||
|
/// </summary>
|
||||||
public bool Active;
|
public bool Active;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How many bytes have been downloaded.
|
||||||
|
/// </summary>
|
||||||
public ulong BytesDownloaded;
|
public ulong BytesDownloaded;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How many bytes in total the download is.
|
||||||
|
/// </summary>
|
||||||
public ulong BytesTotal;
|
public ulong BytesTotal;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the amount of bytes left that need to be downloaded.
|
||||||
|
/// </summary>
|
||||||
|
public ulong BytesRemaining => BytesTotal - BytesDownloaded;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,8 +6,14 @@
|
|||||||
|
|
||||||
namespace Steamworks.Data
|
namespace Steamworks.Data
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents details of a file.
|
||||||
|
/// </summary>
|
||||||
public struct FileDetails
|
public struct FileDetails
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The size of the file in bytes.
|
||||||
|
/// </summary>
|
||||||
public ulong SizeInBytes;
|
public ulong SizeInBytes;
|
||||||
public string Sha1;
|
public string Sha1;
|
||||||
public uint Flags;
|
public uint Flags;
|
||||||
|
@ -7,10 +7,17 @@ public struct Image
|
|||||||
public uint Height;
|
public uint Height;
|
||||||
public byte[] Data;
|
public byte[] Data;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the color of the pixel at the specified position.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="x">X-coordinate</param>
|
||||||
|
/// <param name="y">Y-coordinate</param>
|
||||||
|
/// <returns>The color.</returns>
|
||||||
|
/// <exception cref="System.ArgumentException">If the X and Y or out of bounds.</exception>
|
||||||
public Color GetPixel( int x, int y )
|
public Color GetPixel( int x, int y )
|
||||||
{
|
{
|
||||||
if ( x < 0 || x >= Width ) throw new System.Exception( "x out of bounds" );
|
if ( x < 0 || x >= Width ) throw new System.ArgumentException( "x out of bounds" );
|
||||||
if ( y < 0 || y >= Height ) throw new System.Exception( "y out of bounds" );
|
if ( y < 0 || y >= Height ) throw new System.ArgumentException( "y out of bounds" );
|
||||||
|
|
||||||
Color c = new Color();
|
Color c = new Color();
|
||||||
|
|
||||||
@ -24,12 +31,19 @@ public Color GetPixel( int x, int y )
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns "{Width}x{Height} ({length of <see cref="Data"/>}bytes)"
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{Width}x{Height} ({Data.Length}bytes)";
|
return $"{Width}x{Height} ({Data.Length}bytes)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a color.
|
||||||
|
/// </summary>
|
||||||
public struct Color
|
public struct Color
|
||||||
{
|
{
|
||||||
public byte r, g, b, a;
|
public byte r, g, b, a;
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
namespace Steamworks.Data
|
namespace Steamworks.Data
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a Steam lobby.
|
||||||
|
/// </summary>
|
||||||
public struct Lobby
|
public struct Lobby
|
||||||
{
|
{
|
||||||
public SteamId Id { get; internal set; }
|
public SteamId Id { get; internal set; }
|
||||||
@ -16,8 +19,8 @@ public Lobby( SteamId id )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Try to join this room. Will return RoomEnter.Success on success,
|
/// Try to join this room. Will return <see cref="RoomEnter.Success"/> on success,
|
||||||
/// and anything else is a failure
|
/// and anything else is a failure.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<RoomEnter> Join()
|
public async Task<RoomEnter> Join()
|
||||||
{
|
{
|
||||||
@ -37,9 +40,9 @@ public void Leave()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invite another user to the lobby
|
/// Invite another user to the lobby.
|
||||||
/// will return true if the invite is successfully sent, whether or not the target responds
|
/// Will return <see langword="true"/> if the invite is successfully sent, whether or not the target responds
|
||||||
/// returns false if the local user is not connected to the Steam servers
|
/// returns <see langword="false"/> if the local user is not connected to the Steam servers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool InviteFriend( SteamId steamid )
|
public bool InviteFriend( SteamId steamid )
|
||||||
{
|
{
|
||||||
@ -47,12 +50,12 @@ public bool InviteFriend( SteamId steamid )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns the number of users in the specified lobby
|
/// Gets the number of users in this lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int MemberCount => SteamMatchmaking.Internal.GetNumLobbyMembers( Id );
|
public int MemberCount => SteamMatchmaking.Internal.GetNumLobbyMembers( Id );
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns current members. Need to be in the lobby to see the users.
|
/// Returns current members in the lobby. The current user must be in the lobby in order to see the users.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEnumerable<Friend> Members
|
public IEnumerable<Friend> Members
|
||||||
{
|
{
|
||||||
@ -67,7 +70,7 @@ public IEnumerable<Friend> Members
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get data associated with this lobby
|
/// Get data associated with this lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GetData( string key )
|
public string GetData( string key )
|
||||||
{
|
{
|
||||||
@ -75,7 +78,7 @@ public string GetData( string key )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get data associated with this lobby
|
/// Set data associated with this lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SetData( string key, string value )
|
public bool SetData( string key, string value )
|
||||||
{
|
{
|
||||||
@ -86,7 +89,7 @@ public bool SetData( string key, string value )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Removes a metadata key from the lobby
|
/// Removes a metadata key from the lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DeleteData( string key )
|
public bool DeleteData( string key )
|
||||||
{
|
{
|
||||||
@ -94,7 +97,7 @@ public bool DeleteData( string key )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get all data for this lobby
|
/// Get all data for this lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEnumerable<KeyValuePair<string, string>> Data
|
public IEnumerable<KeyValuePair<string, string>> Data
|
||||||
{
|
{
|
||||||
@ -113,7 +116,7 @@ public IEnumerable<KeyValuePair<string, string>> Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets per-user metadata for someone in this lobby
|
/// Gets per-user metadata for someone in this lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GetMemberData( Friend member, string key )
|
public string GetMemberData( Friend member, string key )
|
||||||
{
|
{
|
||||||
@ -121,7 +124,7 @@ public string GetMemberData( Friend member, string key )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets per-user metadata (for the local user implicitly)
|
/// Sets per-user metadata (for the local user implicitly).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetMemberData( string key, string value )
|
public void SetMemberData( string key, string value )
|
||||||
{
|
{
|
||||||
@ -129,7 +132,7 @@ public void SetMemberData( string key, string value )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends a string to the chat room
|
/// Sends a string to the chat room.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SendChatString( string message )
|
public bool SendChatString( string message )
|
||||||
{
|
{
|
||||||
@ -139,7 +142,7 @@ public bool SendChatString( string message )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends bytes to the chat room
|
/// Sends bytes to the chat room.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe bool SendChatBytes( byte[] data )
|
public unsafe bool SendChatBytes( byte[] data )
|
||||||
{
|
{
|
||||||
@ -150,7 +153,7 @@ public unsafe bool SendChatBytes( byte[] data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends bytes to the chat room from an unsafe buffer
|
/// Sends bytes to the chat room from an unsafe buffer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public unsafe bool SendChatBytesUnsafe( byte* ptr, int length )
|
public unsafe bool SendChatBytesUnsafe( byte* ptr, int length )
|
||||||
{
|
{
|
||||||
@ -158,13 +161,15 @@ public unsafe bool SendChatBytesUnsafe( byte* ptr, int length )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Refreshes metadata for a lobby you're not necessarily in right now
|
/// Refreshes metadata for a lobby you're not necessarily in right now.
|
||||||
/// you never do this for lobbies you're a member of, only if your
|
/// <para>
|
||||||
/// this will send down all the metadata associated with a lobby
|
/// You never do this for lobbies you're a member of, only if your
|
||||||
/// this is an asynchronous call
|
/// this will send down all the metadata associated with a lobby.
|
||||||
/// returns false if the local user is not connected to the Steam servers
|
/// This is an asynchronous call.
|
||||||
/// results will be returned by a LobbyDataUpdate_t callback
|
/// Returns <see langword="false"/> if the local user is not connected to the Steam servers.
|
||||||
/// if the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to false
|
/// Results will be returned by a LobbyDataUpdate_t callback.
|
||||||
|
/// If the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to <see langword="false"/>.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Refresh()
|
public bool Refresh()
|
||||||
{
|
{
|
||||||
@ -172,8 +177,8 @@ public bool Refresh()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Max members able to join this lobby. Cannot be over 250.
|
/// Max members able to join this lobby. Cannot be over <c>250</c>.
|
||||||
/// Can only be set by the owner
|
/// Can only be set by the owner of the lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int MaxMembers
|
public int MaxMembers
|
||||||
{
|
{
|
||||||
@ -181,26 +186,42 @@ public int MaxMembers
|
|||||||
set => SteamMatchmaking.Internal.SetLobbyMemberLimit( Id, value );
|
set => SteamMatchmaking.Internal.SetLobbyMemberLimit( Id, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the lobby as public.
|
||||||
|
/// </summary>
|
||||||
public bool SetPublic()
|
public bool SetPublic()
|
||||||
{
|
{
|
||||||
return SteamMatchmaking.Internal.SetLobbyType( Id, LobbyType.Public );
|
return SteamMatchmaking.Internal.SetLobbyType( Id, LobbyType.Public );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the lobby as private.
|
||||||
|
/// </summary>
|
||||||
public bool SetPrivate()
|
public bool SetPrivate()
|
||||||
{
|
{
|
||||||
return SteamMatchmaking.Internal.SetLobbyType( Id, LobbyType.Private );
|
return SteamMatchmaking.Internal.SetLobbyType( Id, LobbyType.Private );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the lobby as invisible.
|
||||||
|
/// </summary>
|
||||||
public bool SetInvisible()
|
public bool SetInvisible()
|
||||||
{
|
{
|
||||||
return SteamMatchmaking.Internal.SetLobbyType( Id, LobbyType.Invisible );
|
return SteamMatchmaking.Internal.SetLobbyType( Id, LobbyType.Invisible );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the lobby as friends only.
|
||||||
|
/// </summary>
|
||||||
public bool SetFriendsOnly()
|
public bool SetFriendsOnly()
|
||||||
{
|
{
|
||||||
return SteamMatchmaking.Internal.SetLobbyType( Id, LobbyType.FriendsOnly );
|
return SteamMatchmaking.Internal.SetLobbyType( Id, LobbyType.FriendsOnly );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set whether or not the lobby can be joined.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="b">Whether or not the lobby can be joined.</param>
|
||||||
public bool SetJoinable( bool b )
|
public bool SetJoinable( bool b )
|
||||||
{
|
{
|
||||||
return SteamMatchmaking.Internal.SetLobbyJoinable( Id, b );
|
return SteamMatchmaking.Internal.SetLobbyJoinable( Id, b );
|
||||||
@ -242,7 +263,7 @@ public bool GetGameServer( ref uint ip, ref ushort port, ref SteamId serverId )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// You must be the lobby owner to set the owner
|
/// Gets or sets the owner of the lobby. You must be the lobby owner to set the owner
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Friend Owner
|
public Friend Owner
|
||||||
{
|
{
|
||||||
@ -251,7 +272,7 @@ public Friend Owner
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if the specified SteamId owns the lobby
|
/// Check if the specified SteamId owns the lobby.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsOwnedBy( SteamId k ) => Owner.Id == k;
|
public bool IsOwnedBy( SteamId k ) => Owner.Id == k;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ public struct PartyBeacon
|
|||||||
internal PartyBeaconID_t Id;
|
internal PartyBeaconID_t Id;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creator of the beacon
|
/// Gets the owner of the beacon.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SteamId Owner
|
public SteamId Owner
|
||||||
{
|
{
|
||||||
@ -24,7 +24,7 @@ public SteamId Owner
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creator of the beacon
|
/// Gets metadata related to the beacon.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string MetaData
|
public string MetaData
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@ public string MetaData
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Will attempt to join the party. If successful will return a connection string.
|
/// Will attempt to join the party. If successful will return a connection string.
|
||||||
/// If failed, will return null
|
/// If failed, will return <see langword="null"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<string> JoinAsync()
|
public async Task<string> JoinAsync()
|
||||||
{
|
{
|
||||||
@ -52,7 +52,7 @@ public async Task<string> JoinAsync()
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your game a ReservationNotification callback.
|
/// When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your game a ReservationNotification callback.
|
||||||
/// When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined successfully
|
/// When that user joins your party, call this method to notify Steam that the user has joined successfully.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void OnReservationCompleted( SteamId steamid )
|
public void OnReservationCompleted( SteamId steamid )
|
||||||
{
|
{
|
||||||
@ -70,7 +70,7 @@ public void CancelReservation( SteamId steamid )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Turn off the beacon
|
/// Turn off the beacon.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Destroy()
|
public bool Destroy()
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
namespace Steamworks.Data
|
namespace Steamworks.Data
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a screenshot that was taken by a user.
|
||||||
|
/// </summary>
|
||||||
public struct Screenshot
|
public struct Screenshot
|
||||||
{
|
{
|
||||||
internal ScreenshotHandle Value;
|
internal ScreenshotHandle Value;
|
||||||
@ -19,16 +22,13 @@ public bool TagUser( SteamId user )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tags a user as being visible in the screenshot
|
/// Sets the location of the screenshot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SetLocation( string location )
|
public bool SetLocation( string location )
|
||||||
{
|
{
|
||||||
return SteamScreenshots.Internal.SetLocation( Value, location );
|
return SteamScreenshots.Internal.SetLocation( Value, location );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Tags a user as being visible in the screenshot
|
|
||||||
/// </summary>
|
|
||||||
public bool TagPublishedFile( PublishedFileId file )
|
public bool TagPublishedFile( PublishedFileId file )
|
||||||
{
|
{
|
||||||
return SteamScreenshots.Internal.TagPublishedFile( Value, file );
|
return SteamScreenshots.Internal.TagPublishedFile( Value, file );
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the ID of a user or steam lobby.
|
||||||
|
/// </summary>
|
||||||
public struct SteamId
|
public struct SteamId
|
||||||
{
|
{
|
||||||
public ulong Value;
|
public ulong Value;
|
||||||
|
Loading…
Reference in New Issue
Block a user