Skip to content

TheGuy920/SteamUtility

Repository files navigation

SteamUtility

Generalized Steam Utility for any game that combines registry utility, SteamAPI.dll, and Steamworks.NET

NuGet version (SteamUtility) .NET 6.0

Steam steam = new("Scrap Mechanic", 387990);

// Connect to game info
if (steam.ConnectToGame())
    Debug.WriteLine("Sucessfully linked to Scrap Mechanic");

// Connect to steam
if (steam.ConnectToSteam())
    Debug.WriteLine("Sucessfully conected to Steam");

// load Avatar Bitmaps
steam.LoadAvatars();

// Avatar Bitmaps
Bitmap img_snall = SmallAvatar;
Bitmap img_med = MediumAvatar;
Bitmap img_large = LargeAvatar;

// base class
DirectoryInfo steam_dir = steam.SteamDirectory;
string display_name = steam.DisplayName;
string user_name = steam.UserName;
CSteamID steam_id = steam.SteamId;
string language = steam.SteamLanguage; 
DirectoryInfo game_dir = steam.GameDirectory; 
bool game_installed = steam.GameInstalled;
bool game_running = steam.GameRunning;
bool game_updating = steam.GameUpdating;

Running RefreshGameStats() will update the values [GameInstalled, GameRunning, GameUpdating]

Also gives full access to the Offical Steamworks API via the C# Steamworks API