From 879a284de35bef5b142aba681b5ca6cd39eeaae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Straubmeier?= Date: Mon, 4 Mar 2019 15:55:42 +0100 Subject: [PATCH] Added Client.CurrentCountry --- Facepunch.Steamworks/Client.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Facepunch.Steamworks/Client.cs b/Facepunch.Steamworks/Client.cs index f976692..f55e158 100644 --- a/Facepunch.Steamworks/Client.cs +++ b/Facepunch.Steamworks/Client.cs @@ -42,6 +42,11 @@ public partial class Client : BaseSteamworks public DirectoryInfo InstallFolder { get; private set; } + /// + /// The 2 digit ISO 3166-1-alpha-2 format country code (e.g. "US" or "UK") + /// + public string CurrentCountry { get; } + /// /// The currently selected language /// @@ -128,6 +133,7 @@ public Client( uint appId ) : base( appId ) InstallFolder = new DirectoryInfo(appInstallDir); BuildId = native.apps.GetAppBuildId(); + CurrentCountry = native.utils.GetIPCountry(); CurrentLanguage = native.apps.GetCurrentGameLanguage(); AvailableLanguages = native.apps.GetAvailableGameLanguages().Split( new[] {';'}, StringSplitOptions.RemoveEmptyEntries ); // TODO: Assumed colon separated