mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
add Sandbox.Mounting.InitializeContext.IsDlcInstalled
This commit is contained in:
committed by
Matt Stevens
parent
64fc154f39
commit
b7f92c73a2
@@ -3,5 +3,6 @@
|
||||
internal interface ISteamIntegration
|
||||
{
|
||||
public bool IsAppInstalled( long appid );
|
||||
public bool IsDlcInstalled( long appid );
|
||||
public string GetAppDirectory( long appid );
|
||||
}
|
||||
|
||||
@@ -24,6 +24,14 @@ public ref struct InitializeContext
|
||||
return system.Steam?.IsAppInstalled( appid ) ?? false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return true if this DLC is installed on Steam
|
||||
/// </summary>
|
||||
public bool IsDlcInstalled( long appid )
|
||||
{
|
||||
return system.Steam?.IsDlcInstalled( appid ) ?? false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If this app is installed we'll return the folder in which it is installed
|
||||
/// </summary>
|
||||
|
||||
@@ -216,4 +216,10 @@ class SteamIntegration : ISteamIntegration
|
||||
if ( !NativeEngine.Steam.SteamApps().IsValid ) return false;
|
||||
return NativeEngine.Steam.SteamApps().BIsAppInstalled( (int)appid );
|
||||
}
|
||||
|
||||
public bool IsDlcInstalled( long appid )
|
||||
{
|
||||
if ( !NativeEngine.Steam.SteamApps().IsValid ) return false;
|
||||
return NativeEngine.Steam.SteamApps().BIsDlcInstalled( (int)appid );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user