Artemis.Modules.Games.EurotruckSimulator2.EurotruckSimulator2ViewModel.FindGameDir C# (CSharp) Method

FindGameDir() public method

public FindGameDir ( ) : void
return void
        public void FindGameDir()
        {
            var gameSettings = (EurotruckSimulator2Settings) GameSettings;
            // Demo is also supported but resides in a different directory, the full game can also be 64-bits
            var dir = GeneralHelpers.FindSteamGame(@"\Euro Truck Simulator 2\bin\win_x64\eurotrucks2.exe") ??
                      GeneralHelpers.FindSteamGame(@"\Euro Truck Simulator 2\bin\win_x86\eurotrucks2.exe") ??
                      GeneralHelpers.FindSteamGame(@"\Euro Truck Simulator 2 Demo\bin\win_x86\eurotrucks2.exe");

            if (string.IsNullOrEmpty(dir))
                return;

            gameSettings.GameDirectory = dir;
            gameSettings.Save();

            if (!File.Exists(dir + "/plugins/ets2-telemetry-server.dll"))   
                PlacePlugin();
        }