add Sandbox.Mounting.InitializeContext.IsDlcInstalled

This commit is contained in:
nixx quality
2025-11-26 13:30:16 +01:00
committed by Matt Stevens
parent 64fc154f39
commit b7f92c73a2
3 changed files with 15 additions and 0 deletions

View File

@@ -3,5 +3,6 @@
internal interface ISteamIntegration
{
public bool IsAppInstalled( long appid );
public bool IsDlcInstalled( long appid );
public string GetAppDirectory( long appid );
}

View File

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

View File

@@ -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 );
}
}